decocms 4.46.2 → 4.46.4
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-D9sGnK-9.js → AlertCircle-BesCMDS0.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B1h7NYT7.js → ArrowUpRight-Go8sBq25.js} +1 -1
- package/dist/client/assets/{Check-BjITlV29.js → Check-Dm5ESjHa.js} +1 -1
- package/dist/client/assets/{CheckCircle-BB6vk6oF.js → CheckCircle-Cp3stx_U.js} +1 -1
- package/dist/client/assets/{ChevronDown-CP20sAWY.js → ChevronDown-DnTmPo-Z.js} +1 -1
- package/dist/client/assets/{ChevronRight-ChI3PJvZ.js → ChevronRight-kjTTTYjA.js} +1 -1
- package/dist/client/assets/{ChevronUp-C5771OOc.js → ChevronUp-ZcXMWp15.js} +1 -1
- package/dist/client/assets/{Circle-9F0vtvpH.js → Circle-BHD7h_nD.js} +1 -1
- package/dist/client/assets/{Copy01-9jeLkfsF.js → Copy01-DUdq-NQv.js} +1 -1
- package/dist/client/assets/{DotsVertical-BqEs4xQp.js → DotsVertical-k6OtiFxK.js} +1 -1
- package/dist/client/assets/{Eye-Dr_xTPtU.js → Eye-DTuW0TON.js} +1 -1
- package/dist/client/assets/{FilterLines-BZ5zsaAc.js → FilterLines-Ccyc-eUu.js} +1 -1
- package/dist/client/assets/{Globe01-B461Nwwh.js → Globe01-BJZHLlv7.js} +1 -1
- package/dist/client/assets/{Globe04-DOJ4tEQ7.js → Globe04-CWPdNB4s.js} +1 -1
- package/dist/client/assets/{HardDrive-B2RZmWGJ.js → HardDrive-BiJrAS_Z.js} +1 -1
- package/dist/client/assets/{Key01-CIqvP5Ev.js → Key01-D-5fV-U4.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CLNH1DfF.js → LayoutLeft-dfj02VmP.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BFwOFRst.js → LinkExternal01-CMfJjpLH.js} +1 -1
- package/dist/client/assets/{List-BaCDQ99v.js → List-Bug9pmiY.js} +1 -1
- package/dist/client/assets/{Loading02-CC5chJbg.js → Loading02-C2o878Bj.js} +1 -1
- package/dist/client/assets/{Monitor01-B-0ksZCH.js → Monitor01-BXk1APte.js} +1 -1
- package/dist/client/assets/{Palette-DsapFGR6.js → Palette-B-gsq7vu.js} +1 -1
- package/dist/client/assets/{Play-CiLKvyf1.js → Play-Vc_rOusg.js} +1 -1
- package/dist/client/assets/{Plus-C4ugKimL.js → Plus-1ng4gjYL.js} +1 -1
- package/dist/client/assets/{SearchLg-DU6XNSBT.js → SearchLg-B72UA_UA.js} +1 -1
- package/dist/client/assets/{SearchMd-BKdnEqzA.js → SearchMd-BlS1_9IW.js} +1 -1
- package/dist/client/assets/{Settings02-DQPzjW01.js → Settings02-c0IoQpJn.js} +1 -1
- package/dist/client/assets/{Shield01-2mEYEYRl.js → Shield01-DkH7Np8y.js} +1 -1
- package/dist/client/assets/{Star01-2wUlEqlq.js → Star01-CYOx9mF5.js} +1 -1
- package/dist/client/assets/{Stars01-BbVTOrWm.js → Stars01-DYW1Ue2r.js} +1 -1
- package/dist/client/assets/{Stars02-Dit_hv0j.js → Stars02-DBIfNQU7.js} +1 -1
- package/dist/client/assets/{Sun-9eC9mMX9.js → Sun-B6GB8iJu.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-8RU2_S-C.js → SwitchHorizontal01-CEpMuOrt.js} +1 -1
- package/dist/client/assets/{Tool01-oblzQ_m4.js → Tool01-D3LmAIF7.js} +1 -1
- package/dist/client/assets/{Trash01-Dhd1UnVB.js → Trash01-D_2bKiRr.js} +1 -1
- package/dist/client/assets/{Upload01-DBe4YIZX.js → Upload01-BXk9XU4W.js} +1 -1
- package/dist/client/assets/{User01-CF_Gf7t9.js → User01-DOpmPeGR.js} +1 -1
- package/dist/client/assets/{Users01-C6QDIkrj.js → Users01-D2imm0RI.js} +1 -1
- package/dist/client/assets/{Users03-DNOs9Pga.js → Users03-DtaNDPUj.js} +1 -1
- package/dist/client/assets/{X-CW256acn.js → X-HTDFt_4A.js} +1 -1
- package/dist/client/assets/{XCircle-Ubd_lt39.js → XCircle-6HMBNNDh.js} +1 -1
- package/dist/client/assets/{XClose-DetSXJQx.js → XClose-gEf91vuJ.js} +1 -1
- package/dist/client/assets/{Zap-BWjK0pR8.js → Zap-CfA1sQc0.js} +1 -1
- package/dist/client/assets/{ZapSquare-CPKbKk6M.js → ZapSquare-BPABqngz.js} +1 -1
- package/dist/client/assets/{ZoomOut-Dzv5qUFR.js → ZoomOut-ZBUUT0Rv.js} +1 -1
- package/dist/client/assets/{access-gate-Bnbz-F0X.js → access-gate-eNBW8UCF.js} +1 -1
- package/dist/client/assets/{add-section-modal-Ct6xmoDd.js → add-section-modal-DxysqrVc.js} +1 -1
- package/dist/client/assets/{agent-capabilities-BA64EPhR.js → agent-capabilities-CG9JW9RR.js} +1 -1
- package/dist/client/assets/{agent-icon-WFSZC34Q.js → agent-icon-DBuu5nto.js} +1 -1
- package/dist/client/assets/{agents-list-BrKTooje.js → agents-list-C8dmmkXg.js} +1 -1
- package/dist/client/assets/{ai-providers-8-EH7ro1.js → ai-providers-CJgvvARo.js} +1 -1
- package/dist/client/assets/{alert-DG3EBcCO.js → alert-BzRsQLi2.js} +1 -1
- package/dist/client/assets/{alert-dialog-CtGxaRKW.js → alert-dialog-CSKbbXu1.js} +1 -1
- package/dist/client/assets/app-editor-BzsMwvN0.js +1 -0
- package/dist/client/assets/{auth-DEyPYEvA.js → auth-CQEpDOqQ.js} +1 -1
- package/dist/client/assets/{auth-catchall-C7ETGqnK.js → auth-catchall-NCEi8hlr.js} +1 -1
- package/dist/client/assets/{auth-entry-CbkA6iJs.js → auth-entry-BlXPQpbt.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BebkeKms.js → auth-split-layout-DkL0G_pq.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-g9OCjj13.js → authenticate-and-persist-oauth-B2nzGDPf.js} +1 -1
- package/dist/client/assets/{automation-list-row-CtJ-FXg2.js → automation-list-row-Dbg4eyNL.js} +1 -1
- package/dist/client/assets/{automation-runs-CPrAv5hK.js → automation-runs-CiDcCsw6.js} +1 -1
- package/dist/client/assets/{automations-DEkIcBFJ.js → automations-V27H2Ozo.js} +1 -1
- package/dist/client/assets/{autosend-DsvSEeKi.js → autosend-BL34pOJn.js} +1 -1
- package/dist/client/assets/{avatar-DbN4IBGI.js → avatar-Br6d-tNW.js} +1 -1
- package/dist/client/assets/{badge-Co1sD3N3.js → badge-DetkesDd.js} +1 -1
- package/dist/client/assets/{block-document-DSXDa6dk.js → block-document-BP9PEgOK.js} +2 -2
- package/dist/client/assets/{brand-context-ds3aRbzh.js → brand-context-DXc368dS.js} +1 -1
- package/dist/client/assets/{breadcrumb-DXL2uvmv.js → breadcrumb-xk0vhdK8.js} +1 -1
- package/dist/client/assets/{buckets-CaajrYgi.js → buckets-DiJ8juM6.js} +1 -1
- package/dist/client/assets/{bulk-category-panel--rOm14jB.js → bulk-category-panel-CcYC-s0_.js} +1 -1
- package/dist/client/assets/{calendar-CmJTWNZE.js → calendar-C6ttWVwF.js} +1 -1
- package/dist/client/assets/{capability-load-error-sobVTtf7.js → capability-load-error-DX9neg2m.js} +1 -1
- package/dist/client/assets/{card-Bnar-Iu5.js → card-HSSdQLhy.js} +1 -1
- package/dist/client/assets/category-editor-5AynSD13.js +1 -0
- package/dist/client/assets/{chat-context-C9RZ_u31.js → chat-context-DrP38cnA.js} +1 -1
- package/dist/client/assets/{checkbox-B0M0CFfW.js → checkbox-Cohapdc4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BSzrP9kG.js → cli-auth-success-rlm18qpo.js} +1 -1
- package/dist/client/assets/{collection-detail-Dm3KeGJT.js → collection-detail-aDE_7EGa.js} +1 -1
- package/dist/client/assets/{collection-display-button-DUndX653.js → collection-display-button-CKHi85Fc.js} +1 -1
- package/dist/client/assets/{collection-search-D0a-m_NL.js → collection-search-D604bOGw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CPVrFz5z.js → collection-table-wrapper-Bsyl29eV.js} +1 -1
- package/dist/client/assets/{collection-tabs-CNA3an60.js → collection-tabs-CkBBgRXV.js} +1 -1
- package/dist/client/assets/{command-DGmwoZuF.js → command-DKgDtpKr.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BF31ad1W.js → commerce-onboarding-CVL8UgS8.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DFIRz6n5.js → connect-desktop-dialog-gd4MP2Wq.js} +1 -1
- package/dist/client/assets/{connection-card-CCG2U4yN.js → connection-card-_5vsHFhc.js} +1 -1
- package/dist/client/assets/{connection-detail-C8qxmxUv.js → connection-detail-WHtWiXFl.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-rgxormxA.js → connection-form-helpers-CdTf7VjM.js} +1 -1
- package/dist/client/assets/{connections-CHoCKduO.js → connections-CB5grnKe.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D2QRgr6F.js → decopilot-sse-pool-BbnLH6Ve.js} +1 -1
- package/dist/client/assets/{dialog-BfE-bxwJ.js → dialog-uKhdVqJA.js} +1 -1
- package/dist/client/assets/{domain-settings-BCExLb2e.js → domain-settings-BuOk0UUg.js} +1 -1
- package/dist/client/assets/{drawer-CQgkwous.js → drawer-Bw7fcnVM.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C88JkCey.js → dropdown-menu-B9AtA-ud.js} +1 -1
- package/dist/client/assets/{empty-state-Beqd7aNQ.js → empty-state-CwYkMZ80.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DXV17csC.js → extract-connection-data-BPZJfaxl.js} +1 -1
- package/dist/client/assets/{file-explorer-CsYRpzO9.js → file-explorer-D1Nn5OxI.js} +1 -1
- package/dist/client/assets/{file-type-icon-Z3xofeT9.js → file-type-icon-BLdK0XSX.js} +1 -1
- package/dist/client/assets/{files-Bka1f3WC.js → files-BY2gXF9Z.js} +1 -1
- package/dist/client/assets/{form-DDJB0Kef.js → form-D0k9F-Ve.js} +1 -1
- package/dist/client/assets/{general-BUawMCEA.js → general-BYQRYcEy.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CPC5WYZv.js → github-repo-picker-DCqCY0h-.js} +1 -1
- package/dist/client/assets/{hooks-Cp3yA0hj.js → hooks-D4jDRo4J.js} +1 -1
- package/dist/client/assets/{index-DLeaFjhW.js → index-BPsg--Rr.js} +1 -1
- package/dist/client/assets/{index-EDsGyjEV.js → index-Bq3iM_o_.js} +1 -1
- package/dist/client/assets/{index-rTl_zI5y.js → index-CLI0HQX-.js} +1 -1
- package/dist/client/assets/{index-qZ858nUo.js → index-Cqd1ksWV.js} +1 -1
- package/dist/client/assets/{index-a8TddNOX.js → index-DL-IxF9S.js} +1 -1
- package/dist/client/assets/{index-D1QwQZ3L.js → index-DZnQksMp.js} +1 -1
- package/dist/client/assets/{index-X0QSQvwS.js → index-Dxfub_dn.js} +1 -1
- package/dist/client/assets/{index-_9_If8hV.js → index-EwY8NV0K.js} +3 -3
- package/dist/client/assets/{index-CbRx1KlA.js → index-L0Wb7a86.js} +1 -1
- package/dist/client/assets/{index-n9tzDuyG.js → index-RczXdqWh.js} +1 -1
- package/dist/client/assets/{index-D4DIF5Ub.js → index-_y-1S30C.js} +1 -1
- package/dist/client/assets/{index-q89_jVMH.js → index-haP3CQuD.js} +27 -27
- package/dist/client/assets/{index-FwoHu01Q.js → index-oK7QkoIv.js} +1 -1
- package/dist/client/assets/{index-redirect-CDwbRb3Y.js → index-redirect-Bkzdn5wg.js} +1 -1
- package/dist/client/assets/{index-K1TULXrf.js → index-yUxZlOjL.js} +1 -1
- package/dist/client/assets/{input-keyrerlc.js → input-gQLmL-Hg.js} +1 -1
- package/dist/client/assets/{integration-icon-FbMUhCw2.js → integration-icon-B27GbdA2.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-HmSAAs32.js → invite-member-dialog-VSfjl8M3.js} +1 -1
- package/dist/client/assets/{label-77EmLnyJ.js → label-391BBFhc.js} +1 -1
- package/dist/client/assets/{login-DLuWZdNi.js → login-B62wMsxn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ULZ6x3CO.js → mcp-oauth-5UuoqyFh.js} +1 -1
- package/dist/client/assets/{members-DXp_PL5e.js → members-DH8XdXH8.js} +1 -1
- package/dist/client/assets/{monaco-editor-DJn77EfB.js → monaco-editor-zjGV-1fv.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DsucjWjf.js → monitoring-stats-row-ujaaBOBm.js} +1 -1
- package/dist/client/assets/{oauth-callback-BHEpPOWa.js → oauth-callback-CtDichjK.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-tq6e7Jrv.js → oauth-callback-ai-provider-CY1kYHKX.js} +1 -1
- package/dist/client/assets/{onboarding-D3902BZ7.js → onboarding-wuEreiP1.js} +1 -1
- package/dist/client/assets/{org-install-DlplPO8t.js → org-install-BNwBH8Hg.js} +1 -1
- package/dist/client/assets/{org-layout-QAoMH7FC.js → org-layout-BiHQOqNw.js} +1 -1
- package/dist/client/assets/{organization-choice-BU6VxPhK.js → organization-choice-fRp52IZB.js} +1 -1
- package/dist/client/assets/{page-seo-form-BbcbQDOg.js → page-seo-form-BeBMrPD7.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C8lyoDIL.js +1 -0
- package/dist/client/assets/{popover-JdHRslRj.js → popover-CUL8mDnT.js} +1 -1
- package/dist/client/assets/{post-editor-Ftlv1_B7.js → post-editor-fgBatoPz.js} +1 -1
- package/dist/client/assets/{primitives-sdV34vpG.js → primitives-DVFocAIn.js} +1 -1
- package/dist/client/assets/{profile-Bpz1yCnD.js → profile-DZh4xY6j.js} +1 -1
- package/dist/client/assets/project-app-view-BjLovkNt.js +1 -0
- package/dist/client/assets/record-editor-DqEJ3lS6.js +1 -0
- package/dist/client/assets/registry-BG-xXHkR.js +2 -0
- package/dist/client/assets/{registry-layout-CDZ5Aq1h.js → registry-layout-CrIQXpMQ.js} +1 -1
- package/dist/client/assets/{require-capability-DzSwcsvh.js → require-capability-COkJkMhN.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BbzaCJga.js → required-auth-layout-CyG-Dw8D.js} +1 -1
- package/dist/client/assets/{reset-password-Dm1B1ak0.js → reset-password-PyZhVzOR.js} +1 -1
- package/dist/client/assets/{roles-lA00vDfm.js → roles-CzIzFSha.js} +1 -1
- package/dist/client/assets/{search-input-DETYTi0x.js → search-input-t1rg8c3m.js} +1 -1
- package/dist/client/assets/{secrets-BhpaAx2G.js → secrets-B4BIo2i6.js} +1 -1
- package/dist/client/assets/sections-editor-D-50vJIB.js +2 -0
- package/dist/client/assets/{select-Bljv__bR.js → select-DzbqXUcB.js} +1 -1
- package/dist/client/assets/{select-model-Dbg7lBPI.js → select-model-BWuYEwR6.js} +1 -1
- package/dist/client/assets/{seo-editor-DaRNiJ_l.js → seo-editor-0GEMl_aC.js} +1 -1
- package/dist/client/assets/{settings-layout-C_bdIstz.js → settings-layout-OZLjlrBx.js} +1 -1
- package/dist/client/assets/{settings-section-Blbpk6ox.js → settings-section-BQEDNgFm.js} +1 -1
- package/dist/client/assets/{shell-controls-UilXtoei.js → shell-controls-DawPEewY.js} +1 -1
- package/dist/client/assets/{shell-layout-DyS6Gvz7.js → shell-layout-DFjMT1kt.js} +1 -1
- package/dist/client/assets/{sidebar-DMA1r0AO.js → sidebar-BLRhTFxO.js} +1 -1
- package/dist/client/assets/{skeleton-CbZ62d8f.js → skeleton-BIG5A0jD.js} +1 -1
- package/dist/client/assets/{sso-4t2R03nl.js → sso-DnhjaWnn.js} +1 -1
- package/dist/client/assets/{store-7VVCK2Yq.js → store-UF_cnr-_.js} +1 -1
- package/dist/client/assets/store-registry-G4lb87Ue.js +2 -0
- package/dist/client/assets/{studio-tools-CKe88Nyn.js → studio-tools-BgiCb0dU.js} +1 -1
- package/dist/client/assets/{switch-FcQwIjoX.js → switch-DhQcwcK-.js} +1 -1
- package/dist/client/assets/{table-CT3SbJYL.js → table-fe2OuOpR.js} +1 -1
- package/dist/client/assets/{tabs-C67z6z0u.js → tabs-CikThblR.js} +1 -1
- package/dist/client/assets/{textarea-5xpZZEZ9.js → textarea-EdI2QJ_y.js} +1 -1
- package/dist/client/assets/{toggle-group-COgQnBbS.js → toggle-group-Bq3Ku7M9.js} +1 -1
- package/dist/client/assets/{toolbar-CxFn3h3s.js → toolbar-COzRV_lZ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cju6I9oc.js → toolbar-icon-button-CbREYw4E.js} +1 -1
- package/dist/client/assets/{tools-list-CDDnJx86.js → tools-list-DUtpssRD.js} +1 -1
- package/dist/client/assets/{tooltip-TevqeZrN.js → tooltip-D5Xm72-i.js} +1 -1
- package/dist/client/assets/{types-DbmHevzr.js → types-B7A5fQVG.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BQPMvCiK.js → use-ai-providers-DubywYem.js} +1 -1
- package/dist/client/assets/{use-automations-DA6_tOqf.js → use-automations-CKjvxtRZ.js} +1 -1
- package/dist/client/assets/{use-capability-BD-cXUBD.js → use-capability-DQv78B3C.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DBEC1lDq.js → use-clock-tick-DNccK1vY.js} +1 -1
- package/dist/client/assets/{use-collections-CBcI2DFH.js → use-collections-CU9Ik1vU.js} +1 -1
- package/dist/client/assets/{use-connection-Ce9zhGhj.js → use-connection-DwzQTt1G.js} +1 -1
- package/dist/client/assets/{use-copy-1w6BBUlk.js → use-copy-rlUJFqyD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Czq-xVWo.js → use-create-virtual-mcp-DfXEJZUy.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D5y8MFA-.js → use-debounced-autosave-CC8-WPA8.js} +1 -1
- package/dist/client/assets/{use-debounced-value-KNtpfE1L.js → use-debounced-value-BTckcxgE.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-kUUObkR0.js → use-decopilot-events-FA84-DDr.js} +1 -1
- package/dist/client/assets/{use-delete-connection-8tbVczHM.js → use-delete-connection-BjsKEQDW.js} +1 -1
- package/dist/client/assets/{use-file-configs-DSNRtEad.js → use-file-configs-8-VV1ZIA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-XnGTmELt.js → use-infinite-scroll-B4YYueyN.js} +1 -1
- package/dist/client/assets/{use-join-requests-BQVKXd1A.js → use-join-requests-VIFxQLEw.js} +1 -1
- package/dist/client/assets/{use-mcp-client-OHo8USpe.js → use-mcp-client-DC5eUde6.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DR3AEXCG.js → use-mcp-prompts-u6lm7jM9.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DUvuQsnJ.js → use-mcp-tools-ByMVdtvY.js} +1 -1
- package/dist/client/assets/{use-members-D-UWukwW.js → use-members-HEwKDSZW.js} +1 -1
- package/dist/client/assets/{use-mobile-B8GotXbv.js → use-mobile-D5IfeevQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-nPCo0XqD.js → use-navigate-to-agent-alM4INC3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DA-s7_Te.js → use-org-auth-client-BrFkPMSa.js} +1 -1
- package/dist/client/assets/{use-org-sso-BxrJwsL0.js → use-org-sso-ygG1rHWE.js} +1 -1
- package/dist/client/assets/{use-organization-roles-AdIRuUD7.js → use-organization-roles-BoozhZxu.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bbnv1Tgt.js → use-organization-settings-B_wSTZlk.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bam9Xvh6.js → use-registry-connections-SmWa3XND.js} +1 -1
- package/dist/client/assets/{use-secrets-Coat2fzG.js → use-secrets-C13v7vOo.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Ole3p-tS.js → use-status-sounds-BrEy-L9k.js} +1 -1
- package/dist/client/assets/{use-view-mode-Dp93w6NF.js → use-view-mode-DBGTodqT.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bl0CdGKq.js → use-virtual-mcp-DA4Lhfp-.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dmm16Uo9.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DvL0adQn.js +1 -0
- package/dist/client/assets/{variant-calendar-BtYwzOUi.js → variant-calendar-DYGP-x8e.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Cls2kTwk.js → view-mode-toggle-DyIwkWfM.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-DUb-JCFJ.js +0 -1
- package/dist/client/assets/category-editor-1bOtS65t.js +0 -1
- package/dist/client/assets/page-seo-sheet-BiP6ywvB.js +0 -1
- package/dist/client/assets/project-app-view-CNLjRDfU.js +0 -1
- package/dist/client/assets/record-editor-DjtjK277.js +0 -1
- package/dist/client/assets/registry-Dw-S8OOY.js +0 -2
- package/dist/client/assets/sections-editor-D8MMUxK-.js +0 -2
- package/dist/client/assets/store-registry-B9o25eoh.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DTJPJ103.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BqbqsWlq.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{df as _t,dg as St,be as R,H as c,dh as de,bk as Ve,br as Et,bd as It,aU as Tt,ab as O,aa as W,a8 as oe,G as _,bf as f,a$ as F,di as wt,dj as E,a9 as Mt,t as ge,c as Ee,r as Y,$ as At,j as Ot}from"./index-
|
|
1
|
+
import{df as _t,dg as St,be as R,H as c,dh as de,bk as Ve,br as Et,bd as It,aU as Tt,ab as O,aa as W,a8 as oe,G as _,bf as f,a$ as F,di as wt,dj as E,a9 as Mt,t as ge,c as Ee,r as Y,$ as At,j as Ot}from"./index-EwY8NV0K.js";import{u as Ct}from"./use-mcp-client-DC5eUde6.js";import{S as Rt}from"./constants-B72Xmt_K.js";import{d as Nt,D as xt}from"./decopilot-sse-pool-BbnLH6Ve.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ae;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ae||(Ae={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var ze="vercel.ai.error",kt=Symbol.for(ze),Oe,Ce,Z=class Je extends(Ce=Error,Oe=kt,Ce){constructor({name:e,message:a,cause:r}){super(a),this[Oe]=!0,this.name=e,this.cause=r}static isInstance(e){return Je.hasMarker(e,ze)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var We="AI_InvalidArgumentError",qe=`vercel.ai.error.${We}`,Lt=Symbol.for(qe),Re,Ne,jt=class extends(Ne=Z,Re=Lt,Ne){constructor({message:t,cause:e,argument:a}){super({name:We,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},He="AI_JSONParseError",Ge=`vercel.ai.error.${He}`,Zt=Symbol.for(Ge),xe,Pe,De=class extends(Pe=Z,xe=Zt,Pe){constructor({text:t,cause:e}){super({name:He,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[xe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Ge)}},Xe="AI_TypeValidationError",Qe=`vercel.ai.error.${Xe}`,$t=Symbol.for(Qe),ke,Le,X=class ve extends(Le=Z,ke=$t,Le){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Xe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Qe)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new jt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ut=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Ft=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function je(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ut.test(t)===!1&&Ft.test(t)===!1?e:Bt(e)}function Bt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function Vt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return je(t)}try{return je(t)}finally{Error.stackTraceLimit=e}}function Ie(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Ie(t)}var zt=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Jt=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function N(){return{}}function Yt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Wt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function Ke(t,e){return b(t.type._def,e)}var Ht=(t,e)=>b(t.innerType._def,e);function et(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>et(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Gt(t)}}var Gt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Xt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Qt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function Kt(t){return{type:"string",enum:Array.from(t.values)}}var ea=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ta(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ea(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function aa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?sa(t):t}var ra=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sa(t){let e="";for(let a=0;a<t.length;a++)ra.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:$e(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=$e(e,r)}function $e(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,$ as ce,p as Je,d as We,K as Q,k as ie,aV as kn,r as k,al as Ss,l as de,j as l,a1 as Ns,i as zs,B as J,aJ as Sn,t as ue,aC as Cs,a6 as $s,e as Ps,b as Nn,u as zn,P as Tt}from"./index-_9_If8hV.js";import{i as Es}from"./ChevronRight-ChI3PJvZ.js";import{s as Cn}from"./Eye-Dr_xTPtU.js";import{n as Ge,i as yt}from"./Globe01-B461Nwwh.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,h as Ls,d as Os}from"./ZoomOut-Dzv5qUFR.js";import{a as ht}from"./Palette-DsapFGR6.js";import{s as Rs}from"./Plus-C4ugKimL.js";import{i as As}from"./SearchLg-DU6XNSBT.js";import{t as _s}from"./Stars01-BbVTOrWm.js";import{i as mt}from"./Upload01-DBe4YIZX.js";import{s as Pn}from"./XClose-DetSXJQx.js";import{i as qt}from"./Zap-BWjK0pR8.js";import{u as En}from"./use-mobile-B8GotXbv.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Vs,g as Gs}from"./alert-dialog-CtGxaRKW.js";import{c as Dn,a as Ue,d as Ze,e as et,f as Tn,b as Xs,D as Qs}from"./dialog-BfE-bxwJ.js";import{I as Xe}from"./input-keyrerlc.js";import{S as oe}from"./skeleton-CbZ62d8f.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-Z3xofeT9.js";import{T as Ys}from"./toolbar-CxFn3h3s.js";import{u as Js}from"./use-debounced-value-KNtpfE1L.js";import{i as vt}from"./DotsVertical-BqEs4xQp.js";import{i as Mn}from"./Key01-CIqvP5Ev.js";import{s as wt}from"./Trash01-Dhd1UnVB.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-C88JkCey.js";import{T as Zs}from"./textarea-5xpZZEZ9.js";import{t as el}from"./ChevronDown-CP20sAWY.js";import{n as tl}from"./ChevronUp-C5771OOc.js";import{i as pt}from"./X-CW256acn.js";import{a as nl,P as sl,b as ll}from"./popover-JdHRslRj.js";import{T as ye,a as ve,b as we}from"./tooltip-TevqeZrN.js";import{i as rl}from"./Check-BjITlV29.js";import{a as il}from"./Copy01-9jeLkfsF.js";import{n as In}from"./LinkExternal01-BFwOFRst.js";import{l as al,F as ol}from"./index-CbRx1KlA.js";import{i as cl}from"./LayoutLeft-CLNH1DfF.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],ie(a)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const a=n!==null;let o;s[4]!==t?(o=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=o):o=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==a||s[12]!==o||s[13]!==c?(d={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},s[10]=i,s[11]=a,s[12]=o,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==r.slug?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=o):o=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},t[5]=i,t[6]=a,t[7]=o,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const a=n.length>0;let o;t[3]!==s||t[4]!==r.slug||t[5]!==n?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=o):o=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c={queryKey:i,enabled:a,placeholderData:kn,queryFn:o},t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],ie(c)}function Da(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const o=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==s||e[5]!==r||e[6]!==i?(a={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=a):a=e[7],ie(a)}function ml(n){return{volume:n.volume,path:n.path}}async function Ta(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Fa(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&o.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):a.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){a.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),a.sort(),{files:d,omittedPaths:a}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Je();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let a;e[7]!==s?(a=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Je();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==n?(a=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==i||e[8]!==a?(o={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=o):o=e[9];const c=We(o);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Gt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Gt(a),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:o,minSize:c},id:v,idIsFromProps:a!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=a!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=o,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Vn)!==0,r=(e&Gn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,a={a:t.a.at(-1),b:t.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Vn=2,Gn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:a}=e,o={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(a))!==null&&i!==void 0?i:0;return Te.set(a,c+1),Qe.add(o),xt(),function(){var f;St.delete(n),Qe.delete(o);const u=(f=Te.get(a))!==null&&f!==void 0?f:1;if(Te.set(a,u-1),xt(),u===1&&Te.delete(a),xe.includes(o)){const h=xe.indexOf(o);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:a}=r,o=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=o,h=Ml?a.coarse:a.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),o)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:a=100,minSize:o=0}=s;if(Me(t,o)<0)if(i){const c=(r+o)/2;Me(t,c)<0?t=r:t=o}else t=o;return t=Math.min(a,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const a=[...e],[o,c]=s;G(o!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:o,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?o:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:o,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?o:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,a[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,a))return r;{const u=n<0?c:o,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(a[u]=p,!me(p,m)){let g=m-p,x=n<0?c:o;for(;x>=0&&x<t.length;){const y=a[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,a[x]=N),me(g,0))break;n>0?x--:x++}}}const f=a.reduce((u,h)=>h+u,0);return me(f,100)?a:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,a=0;const o=t[0];G(o!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===o?(s=g,r=p):(i+=g,a+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-a),f=n[o];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Jn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Zn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,a,o;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(a=(o=t[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:a}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const o=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=o[c];if(h!=null){const m=r[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{o.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const o=e.current;G(o,"Eager values not found");const{panelDataArray:c}=o,d=Zn(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&a(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,a])}function on(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",a=Nt(e,r);G(a,`No resize handle element found for id "${e}"`);const o=a.getAttribute(se.groupId);G(o,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Zn(o,r);G(f,`No group element found for id "${o}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const a=t==="horizontal";let o=0;n.shiftKey?o=100:r!=null?o=r:o=10;let c=0;switch(n.key){case"ArrowDown":c=a?0:o;break;case"ArrowLeft":c=a?-o:0;break;case"ArrowRight":c=a?o:0;break;case"ArrowUp":c=a?0:-o;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;o!=null&&(s++,e[i]=o,r-=o)}for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;if(o!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];G(i,`Panel data not found for index ${r}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:d=0,collapsible:f}=o,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=a;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const a=t[r];let o;return a==null?o=n!=null?n.toPrecision(i):"1":s.length===1?o="1":o=a.toPrecision(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},a=ns(e);return(r=i[a])!==null&&r!==void 0?r:null}function Gl(n,e,t,s,r){var i;const a=ts(n),o=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(a,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,a)=>i+a,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=100/s*a;t[i]=o}let r=0;for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=Ae({panelConstraints:e,panelIndex:i,size:a});a!=o&&(r+=a-o,t[i]=o)}if(!me(r,0))for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=a+r,c=Ae({panelConstraints:e,panelIndex:i,size:o});if(a!==c&&(r-=c-a,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:o,onLayout:a,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});on(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=a,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Gl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(G(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,ae=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,ae)||(x(ae),w.current.layout=ae,R&&R(ae),Ie(T,ae,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return G(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});on(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Jn(fe,S,H);let ae=Hl(T,S,Y,te,E,H);const ot=Y==="horizontal";ot&&O&&(ae=-ae);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:ae,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=ae&&(z.current=ae,!ct&&ae!==0?ot?Lt(S,ae<0?Wn:Vn):Lt(S,ae<0?Gn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);G(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),V=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);G(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),Z=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:V,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:Z,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,V,A,_,B,q,ee,Z]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],a=t[s];return{...e.constraints,panelSize:a,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),t(a);break}case"F6":{a.preventDefault();const o=r.getAttribute(se.groupId);G(o,`No group element found for id "${o}"`);const c=Ye(o,s),d=Yn(o,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:a,onDragging:o,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:a,onDragging:o,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=a,y.current.onDragging=o,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Gt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),V=k.useRef({state:v});Fe(()=>{V.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;G(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,G(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=V.current;K=!0,T!=="drag"&&P("hover"),G(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const Z={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...Z,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let a;return e[6]!==s||e[7]!==r||e[8]!==i?(a=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Jl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let a;e[6]!==r?(a=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=a):a=e[7];let o;return e[8]!==s||e[9]!==i||e[10]!==a?(o=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:a}),e[8]=s,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Zl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Zl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Ma(n){return`/${sr(n)}`}const Ia=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function La(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Oa(n,e){return e==="directory"?n:rr(n)}function Ra(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Aa(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function _a(n,e){return ir(n)>=lr&&!e.has(n)}function Ua(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ba(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ha(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function qa(n,e=[]){const t={children:[]},s=i=>{const o=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of o){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const o=Ut(i).split("/").filter(Boolean);let c=t,d="";o.forEach((f,u)=>{d+=`/${f}`;const h=u===o.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((a,o)=>a.kind!==o.kind?a.kind==="directory"?-1:1:a.name.localeCompare(o.name));for(const a of i)a.children.length>0&&r(a.children)};return r(t.children),t.children}function or(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...or(r.children,e,t+1)));return s}function Ka(n){return n.split(`
|
|
1
|
+
import{c as $,$ as ce,p as Je,d as We,K as Q,k as ie,aV as kn,r as k,al as Ss,l as de,j as l,a1 as Ns,i as zs,B as J,aJ as Sn,t as ue,aC as Cs,a6 as $s,e as Ps,b as Nn,u as zn,P as Tt}from"./index-EwY8NV0K.js";import{i as Es}from"./ChevronRight-kjTTTYjA.js";import{s as Cn}from"./Eye-DTuW0TON.js";import{n as Ge,i as yt}from"./Globe01-BJZHLlv7.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,h as Ls,d as Os}from"./ZoomOut-ZBUUT0Rv.js";import{a as ht}from"./Palette-B-gsq7vu.js";import{s as Rs}from"./Plus-1ng4gjYL.js";import{i as As}from"./SearchLg-B72UA_UA.js";import{t as _s}from"./Stars01-DYW1Ue2r.js";import{i as mt}from"./Upload01-BXk9XU4W.js";import{s as Pn}from"./XClose-gEf91vuJ.js";import{i as qt}from"./Zap-CfA1sQc0.js";import{u as En}from"./use-mobile-D5IfeevQ.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Vs,g as Gs}from"./alert-dialog-CSKbbXu1.js";import{c as Dn,a as Ue,d as Ze,e as et,f as Tn,b as Xs,D as Qs}from"./dialog-uKhdVqJA.js";import{I as Xe}from"./input-gQLmL-Hg.js";import{S as oe}from"./skeleton-BIG5A0jD.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-BLdK0XSX.js";import{T as Ys}from"./toolbar-COzRV_lZ.js";import{u as Js}from"./use-debounced-value-BTckcxgE.js";import{i as vt}from"./DotsVertical-k6OtiFxK.js";import{i as Mn}from"./Key01-D-5fV-U4.js";import{s as wt}from"./Trash01-D_2bKiRr.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-B9AtA-ud.js";import{T as Zs}from"./textarea-EdI2QJ_y.js";import{t as el}from"./ChevronDown-DnTmPo-Z.js";import{n as tl}from"./ChevronUp-ZcXMWp15.js";import{i as pt}from"./X-HTDFt_4A.js";import{a as nl,P as sl,b as ll}from"./popover-CUL8mDnT.js";import{T as ye,a as ve,b as we}from"./tooltip-D5Xm72-i.js";import{i as rl}from"./Check-Dm5ESjHa.js";import{a as il}from"./Copy01-DUdq-NQv.js";import{n as In}from"./LinkExternal01-CMfJjpLH.js";import{l as al,F as ol}from"./index-L0Wb7a86.js";import{i as cl}from"./LayoutLeft-dfj02VmP.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],ie(a)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const a=n!==null;let o;s[4]!==t?(o=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=o):o=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==a||s[12]!==o||s[13]!==c?(d={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},s[10]=i,s[11]=a,s[12]=o,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==r.slug?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=o):o=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},t[5]=i,t[6]=a,t[7]=o,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const a=n.length>0;let o;t[3]!==s||t[4]!==r.slug||t[5]!==n?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=o):o=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c={queryKey:i,enabled:a,placeholderData:kn,queryFn:o},t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],ie(c)}function Da(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const o=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==s||e[5]!==r||e[6]!==i?(a={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=a):a=e[7],ie(a)}function ml(n){return{volume:n.volume,path:n.path}}async function Ta(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Fa(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&o.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):a.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){a.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),a.sort(),{files:d,omittedPaths:a}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Je();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let a;e[7]!==s?(a=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Je();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==n?(a=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==i||e[8]!==a?(o={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=o):o=e[9];const c=We(o);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Gt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Gt(a),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:o,minSize:c},id:v,idIsFromProps:a!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=a!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=o,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Vn)!==0,r=(e&Gn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,a={a:t.a.at(-1),b:t.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Vn=2,Gn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:a}=e,o={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(a))!==null&&i!==void 0?i:0;return Te.set(a,c+1),Qe.add(o),xt(),function(){var f;St.delete(n),Qe.delete(o);const u=(f=Te.get(a))!==null&&f!==void 0?f:1;if(Te.set(a,u-1),xt(),u===1&&Te.delete(a),xe.includes(o)){const h=xe.indexOf(o);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:a}=r,o=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=o,h=Ml?a.coarse:a.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),o)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:a=100,minSize:o=0}=s;if(Me(t,o)<0)if(i){const c=(r+o)/2;Me(t,c)<0?t=r:t=o}else t=o;return t=Math.min(a,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const a=[...e],[o,c]=s;G(o!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:o,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?o:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:o,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?o:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,a[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,a))return r;{const u=n<0?c:o,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(a[u]=p,!me(p,m)){let g=m-p,x=n<0?c:o;for(;x>=0&&x<t.length;){const y=a[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,a[x]=N),me(g,0))break;n>0?x--:x++}}}const f=a.reduce((u,h)=>h+u,0);return me(f,100)?a:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,a=0;const o=t[0];G(o!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===o?(s=g,r=p):(i+=g,a+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-a),f=n[o];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Jn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Zn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,a,o;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(a=(o=t[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:a}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const o=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=o[c];if(h!=null){const m=r[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{o.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const o=e.current;G(o,"Eager values not found");const{panelDataArray:c}=o,d=Zn(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&a(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,a])}function on(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",a=Nt(e,r);G(a,`No resize handle element found for id "${e}"`);const o=a.getAttribute(se.groupId);G(o,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Zn(o,r);G(f,`No group element found for id "${o}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const a=t==="horizontal";let o=0;n.shiftKey?o=100:r!=null?o=r:o=10;let c=0;switch(n.key){case"ArrowDown":c=a?0:o;break;case"ArrowLeft":c=a?-o:0;break;case"ArrowRight":c=a?o:0;break;case"ArrowUp":c=a?0:-o;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;o!=null&&(s++,e[i]=o,r-=o)}for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;if(o!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];G(i,`Panel data not found for index ${r}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:d=0,collapsible:f}=o,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=a;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const a=t[r];let o;return a==null?o=n!=null?n.toPrecision(i):"1":s.length===1?o="1":o=a.toPrecision(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},a=ns(e);return(r=i[a])!==null&&r!==void 0?r:null}function Gl(n,e,t,s,r){var i;const a=ts(n),o=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(a,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,a)=>i+a,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=100/s*a;t[i]=o}let r=0;for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=Ae({panelConstraints:e,panelIndex:i,size:a});a!=o&&(r+=a-o,t[i]=o)}if(!me(r,0))for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=a+r,c=Ae({panelConstraints:e,panelIndex:i,size:o});if(a!==c&&(r-=c-a,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:o,onLayout:a,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});on(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=a,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Gl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(G(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,ae=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,ae)||(x(ae),w.current.layout=ae,R&&R(ae),Ie(T,ae,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return G(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});on(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Jn(fe,S,H);let ae=Hl(T,S,Y,te,E,H);const ot=Y==="horizontal";ot&&O&&(ae=-ae);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:ae,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=ae&&(z.current=ae,!ct&&ae!==0?ot?Lt(S,ae<0?Wn:Vn):Lt(S,ae<0?Gn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);G(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),V=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);G(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),Z=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:V,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:Z,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,V,A,_,B,q,ee,Z]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],a=t[s];return{...e.constraints,panelSize:a,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),t(a);break}case"F6":{a.preventDefault();const o=r.getAttribute(se.groupId);G(o,`No group element found for id "${o}"`);const c=Ye(o,s),d=Yn(o,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:a,onDragging:o,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:a,onDragging:o,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=a,y.current.onDragging=o,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Gt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),V=k.useRef({state:v});Fe(()=>{V.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;G(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,G(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=V.current;K=!0,T!=="drag"&&P("hover"),G(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const Z={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...Z,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let a;return e[6]!==s||e[7]!==r||e[8]!==i?(a=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Jl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let a;e[6]!==r?(a=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=a):a=e[7];let o;return e[8]!==s||e[9]!==i||e[10]!==a?(o=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:a}),e[8]=s,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Zl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Zl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Ma(n){return`/${sr(n)}`}const Ia=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function La(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Oa(n,e){return e==="directory"?n:rr(n)}function Ra(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Aa(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function _a(n,e){return ir(n)>=lr&&!e.has(n)}function Ua(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ba(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ha(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function qa(n,e=[]){const t={children:[]},s=i=>{const o=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of o){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const o=Ut(i).split("/").filter(Boolean);let c=t,d="";o.forEach((f,u)=>{d+=`/${f}`;const h=u===o.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((a,o)=>a.kind!==o.kind?a.kind==="directory"?-1:1:a.name.localeCompare(o.name));for(const a of i)a.children.length>0&&r(a.children)};return r(t.children),t.children}function or(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...or(r.children,e,t+1)));return s}function Ka(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}al.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let a;e[0]!==s?(a=ar(s),e[0]=s,e[1]=a):a=e[1];const o=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==a||e[8]!==o||e[9]!==t?(h=l.jsx(ol,{path:s,language:a,value:t,theme:o,loading:c,options:u},s),e[6]=s,e[7]=a,e[8]=o,e[9]=t,e[10]=h):h=e[10],h}function as(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function os(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(oe,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(oe,{className:"h-3 w-full"}),l.jsx(oe,{className:"h-3 w-5/6"}),l.jsx(oe,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let a;e[4]!==t.size?(a=as(t.size),e[4]=t.size,e[5]=a):a=e[5];const o=s?` · ${s}`:"";let c;e[6]!==a||e[7]!==o?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[a,o]}),e[6]=a,e[7]=o,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ge,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(J,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let a;e[4]!==r||e[5]!==i?(a={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=a):a=e[6];const{data:o,isPending:c,isError:d}=ie(a);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(os,{}),e[7]=u):u=e[7],u}if(d||o===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==o||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:o})})}),e[10]=o,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==o||e[14]!==t.filename?(f=l.jsx(cr,{value:o,filename:t.filename}),e[13]=o,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let a;e[0]!==t?(a=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=a):a=e[1];const o=a;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(J,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==o?(d=()=>window.open(o,"_blank","noopener"),e[4]=o,e[5]=d):d=e[5];let f;e[6]!==o?(f=l.jsx("span",{className:"truncate",children:o}),e[6]=o,e[7]=f):f=e[7];let u;e[8]!==o||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:o,children:f}),e[8]=o,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(J,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:de(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==o||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ge,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:o,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:o,download:r,children:l.jsx(Ge,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=o,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==o?(b=()=>window.open(o,"_blank","noopener"),e[23]=o,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,a=r[i];if(!a)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");a.remove();break}case"duplicate":{const c=a.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");a.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(a,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");a.setAttribute(e.name,e.value);break}case"remove-attr":{a.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");a.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,r as K,b as yt,$ as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,ag as rs,u as os,M as xt,P as ls}from"./index-
|
|
1
|
+
import{c as oe,r as K,b as yt,$ as Be,j as t,B as Z,t as Se,l as de,K as it,k as wt,ag as rs,u as os,M as xt,P as ls}from"./index-EwY8NV0K.js";import{S as as}from"./search-input-t1rg8c3m.js";import{P as De}from"./index-Cqd1ksWV.js";import{E as St}from"./empty-state-CwYkMZ80.js";import{R as ns}from"./require-capability-COkJkMhN.js";import{N as Tt,A as is,Q as cs,U as Mt,V as Ze,W as Pt,X as ft,Y as ds,Z as _t,_ as At,L as ms,$ as us,a0 as xs,a1 as pt}from"./automation-runs-CiDcCsw6.js";import{u as vt}from"./use-connection-DwzQTt1G.js";import{g as Vt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-DetkesDd.js";import{P as ct,a as dt,b as mt}from"./popover-CUL8mDnT.js";import{T as et,a as tt,b as st}from"./tooltip-D5Xm72-i.js";import{i as ht}from"./Check-Dm5ESjHa.js";import{a as Xe}from"./Copy01-DUdq-NQv.js";import{n as Dt}from"./Globe01-BJZHLlv7.js";import{i as Ut}from"./FilterLines-Ccyc-eUu.js";import{i as fs}from"./Key01-D-5fV-U4.js";import{i as ps}from"./Play-Vc_rOusg.js";import{as as hs,W as gs}from"./agent-icon-DBuu5nto.js";import{M as Lt}from"./monaco-editor-zjGV-1fv.js";import{u as js}from"./use-members-HEwKDSZW.js";import{u as vs}from"./use-mcp-client-DC5eUde6.js";import{a as Ns}from"./use-virtual-mcp-DA4Lhfp-.js";import{S as bs,W as ys}from"./constants-B72Xmt_K.js";import{n as Ge}from"./XCircle-6HMBNNDh.js";import{c as ws}from"./SwitchHorizontal01-CEpMuOrt.js";import{s as Ss}from"./Plus-1ng4gjYL.js";import{s as Is}from"./Trash01-D_2bKiRr.js";import{I as Qe}from"./input-gQLmL-Hg.js";import{c as ot,d as lt,S as at,b as Re,a as nt}from"./select-DzbqXUcB.js";import{t as Kt}from"./ChevronDown-DnTmPo-Z.js";import{s as Cs}from"./Stars02-DBIfNQU7.js";import{C as ks}from"./calendar-C6ttWVwF.js";import{a as Ts}from"./Loading02-C2o878Bj.js";import{T as Ms}from"./textarea-EdI2QJ_y.js";import{C as qt}from"./collection-tabs-CkBBgRXV.js";import{S as _s}from"./switch-DhQcwcK-.js";import{L as Ds}from"./label-391BBFhc.js";import{I as qe}from"./integration-icon-B27GbdA2.js";import{A as Bt}from"./avatar-Br6d-tNW.js";import{A as Ls,a as $s,b as Fs}from"./alert-BzRsQLi2.js";import{C as Ht}from"./card-HSSdQLhy.js";import{K as Me}from"./monitoring-stats-row-ujaaBOBm.js";import{u as Jt}from"./studio-tools-BgiCb0dU.js";import{u as Rs}from"./useSuspenseInfiniteQuery-DvL0adQn.js";import{o as zs,m as Os,p as Es,q as Ps}from"./sidebar-BLRhTFxO.js";import{T as $e,a as ut,b as Qt,c as Gt,d as Wt,e as ae}from"./table-fe2OuOpR.js";import{n as As}from"./ChevronUp-ZcXMWp15.js";import{u as Vs}from"./use-infinite-scroll-B4YYueyN.js";import{c as Us,b as Ks}from"./use-automations-CKjvxtRZ.js";import"./SearchMd-BlS1_9IW.js";import"./use-capability-DQv78B3C.js";import"./access-gate-eNBW8UCF.js";import"./capability-load-error-DX9neg2m.js";import"./useInfiniteQuery-Dmm16Uo9.js";import"./use-clock-tick-DNccK1vY.js";import"./AlertCircle-BesCMDS0.js";import"./CheckCircle-Cp3stx_U.js";import"./Circle-BHD7h_nD.js";import"./checkbox-Cohapdc4.js";import"./command-DKgDtpKr.js";import"./index-CLI0HQX-.js";import"./dialog-uKhdVqJA.js";import"./X-HTDFt_4A.js";import"./Stars01-DYW1Ue2r.js";import"./ChevronRight-kjTTTYjA.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-rlUJFqyD.js";import"./file-type-icon-BLdK0XSX.js";import"./ZoomOut-ZBUUT0Rv.js";import"./use-mobile-D5IfeevQ.js";import"./tab-id-DAJ8K7VA.js";import"./types-B7A5fQVG.js";import"./chat-context-DrP38cnA.js";import"./autosend-BL34pOJn.js";import"./hooks-D4jDRo4J.js";import"./decopilot-sse-pool-BbnLH6Ve.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-DubywYem.js";import"./use-decopilot-events-FA84-DDr.js";import"./use-organization-settings-B_wSTZlk.js";import"./Eye-DTuW0TON.js";import"./Star01-CYOx9mF5.js";import"./XClose-gEf91vuJ.js";import"./ZapSquare-BPABqngz.js";import"./Tool01-D3LmAIF7.js";import"./Monitor01-BXk1APte.js";import"./Upload01-BXk9XU4W.js";import"./shell-layout-DFjMT1kt.js";import"./Users03-DtaNDPUj.js";import"./SearchLg-B72UA_UA.js";import"./Zap-CfA1sQc0.js";import"./alert-dialog-CSKbbXu1.js";import"./required-auth-layout-CyG-Dw8D.js";import"./use-org-sso-ygG1rHWE.js";import"./LinkExternal01-CMfJjpLH.js";import"./ArrowUpRight-Go8sBq25.js";import"./Palette-B-gsq7vu.js";import"./use-navigate-to-agent-alM4INC3.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-u6lm7jM9.js";import"./form-D0k9F-Ve.js";import"./use-collections-CU9Ik1vU.js";import"./Settings02-c0IoQpJn.js";import"./DotsVertical-k6OtiFxK.js";import"./Globe04-CWPdNB4s.js";import"./HardDrive-BiJrAS_Z.js";import"./LayoutLeft-dfj02VmP.js";import"./List-Bug9pmiY.js";import"./Sun-B6GB8iJu.js";import"./Shield01-DkH7Np8y.js";import"./User01-DOpmPeGR.js";import"./Users01-D2imm0RI.js";import"./index-L0Wb7a86.js";import"./use-org-auth-client-BrFkPMSa.js";import"./auth-CQEpDOqQ.js";import"./index-DL-IxF9S.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Fe(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function $t(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...o]=e.split("=");return{key:r||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[r,...o]=e.split("~");return{key:r||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[r,...o]=e.split("@");return{key:r||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},o=[],a={};for(const l of s)if(l.key.trim())switch(l.operator){case"eq":l.value&&(e[l.key]=l.value);break;case"contains":l.value&&(r[l.key]=`%${l.value}%`);break;case"exists":o.push(l.key);break;case"in":l.value&&(a[l.key]=l.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Ft(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,aT as q,cq as R,cr as Ee,cs as ke,ct as Se,bM as xe,cu as j}from"./index-_9_If8hV.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:T=!1,vimBindings:A=!0,...O}=t,U=q(),ne=q(),H=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(H);y?y.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?He(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;T(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function T(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:U,forceMount:ne,keywords:H,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:T,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Te=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:ze,Empty:Te,Loading:Ue});function He(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
1
|
+
import{r as n,aT as q,cq as R,cr as Ee,cs as ke,ct as Se,bM as xe,cu as j}from"./index-EwY8NV0K.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:T=!1,vimBindings:A=!0,...O}=t,U=q(),ne=q(),H=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(H);y?y.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?He(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;T(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function T(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:U,forceMount:ne,keywords:H,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:T,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Te=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:ze,Empty:Te,Loading:Ue});function He(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-EwY8NV0K.js";import{r as w}from"./sidebar-BLRhTFxO.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bt as _}from"./index-
|
|
1
|
+
import{bt as _}from"./index-EwY8NV0K.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,$ as at,k as Nt,p as jt,d as Je,K as ot,r as A,j as s,l as L,B as et,i as vt}from"./index-_9_If8hV.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Me}from"./avatar-DbN4IBGI.js";import{B as yt}from"./badge-Co1sD3N3.js";import{i as Dt,a as tt,s as Ct,b as St}from"./Loading02-CC5chJbg.js";import{i as Tt}from"./List-BaCDQ99v.js";import{s as wt}from"./Plus-C4ugKimL.js";import{s as nt}from"./User01-CF_Gf7t9.js";import{u as rt}from"./use-members-D-UWukwW.js";import{u as it}from"./studio-tools-CKe88Nyn.js";import{f as ct}from"./format-time-Cy7tTmZp.js";import{i as It}from"./AlertCircle-D9sGnK-9.js";import{i as _t}from"./CheckCircle-BB6vk6oF.js";import{i as kt}from"./Circle-9F0vtvpH.js";import{s as zt}from"./Eye-Dr_xTPtU.js";import{d as At,e as Ot,a as Et}from"./dialog-BfE-bxwJ.js";import{a as Ve,c as We,d as Oe,D as Xe}from"./dropdown-menu-C88JkCey.js";import{a as $t,b as Mt,P as Bt}from"./popover-JdHRslRj.js";import{C as Lt}from"./calendar-CmJTWNZE.js";import{t as Ee}from"./ChevronDown-CP20sAWY.js";import{s as Pt}from"./Trash01-Dhd1UnVB.js";import{i as Rt}from"./X-CW256acn.js";function Ft(){const t=O.c(13),{locator:e}=at(),l=it();let o;t[0]!==e?(o=ot.taskBoardItems(e),t[0]=e,t[1]=o):o=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let r;t[4]!==o||t[5]!==a?(r={queryKey:o,queryFn:a},t[4]=o,t[5]=a,t[6]=r):r=t[6];const d=Nt(r);let n;t[7]!==d.data?(n=d.data??[],t[7]=d.data,t[8]=n):n=t[8];let i;return t[9]!==d.error||t[10]!==d.isLoading||t[11]!==n?(i={items:n,isLoading:d.isLoading,error:d.error},t[9]=d.error,t[10]=d.isLoading,t[11]=n,t[12]=i):i=t[12],i}function Kt(){const t=O.c(30),{locator:e}=at(),l=it(),o=jt();let a;t[0]!==e?(a=ot.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const r=a;let d;t[2]!==o||t[3]!==r?(d=()=>o.invalidateQueries({queryKey:r}),t[2]=o,t[3]=r,t[4]=d):d=t[4];const n=d;let i;t[5]!==l?(i=D=>l.call("TASK_BOARD_ITEM_CREATE",D),t[5]=l,t[6]=i):i=t[6];let c;t[7]!==n||t[8]!==i?(c={mutationFn:i,onSuccess:n},t[7]=n,t[8]=i,t[9]=c):c=t[9];const m=Je(c);let x;t[10]!==l?(x=D=>l.call("TASK_BOARD_ITEM_UPDATE",D),t[10]=l,t[11]=x):x=t[11];let g,p;t[12]!==o||t[13]!==r?(g=async D=>{await o.cancelQueries({queryKey:r});const T=o.getQueryData(r);return o.setQueryData(r,h=>h?.map(v=>v.id===D.id?{...v,...D}:v)),{previous:T}},p=(D,T,h)=>{h?.previous&&o.setQueryData(r,h.previous)},t[12]=o,t[13]=r,t[14]=g,t[15]=p):(g=t[14],p=t[15]);let u;t[16]!==n||t[17]!==x||t[18]!==g||t[19]!==p?(u={mutationFn:x,onMutate:g,onError:p,onSettled:n},t[16]=n,t[17]=x,t[18]=g,t[19]=p,t[20]=u):u=t[20];const N=Je(u);let y;t[21]!==l?(y=D=>l.call("TASK_BOARD_ITEM_DELETE",{id:D}),t[21]=l,t[22]=y):y=t[22];let C;t[23]!==n||t[24]!==y?(C={mutationFn:y,onSuccess:n},t[23]=n,t[24]=y,t[25]=C):C=t[25];const b=Je(C);let j;return t[26]!==m||t[27]!==b||t[28]!==N?(j={create:m,update:N,remove:b},t[26]=m,t[27]=b,t[28]=N,t[29]=j):j=t[29],j}const dt=["triage","todo","in_progress","in_review","done"],Q={triage:{label:"Triage",icon:It,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:kt,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Dt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:zt,iconClassName:"text-amber-500"},done:{label:"Done",icon:_t,iconClassName:"text-green-600"}},Ut=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Qt(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function st(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const qt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Yt(t){const e=O.c(133),{open:l,onClose:o,item:a,onSubmit:r,onDelete:d,isSaving:n}=t,{data:i}=rt(),c=i?.data?.members??[],[m,x]=A.useState(a?.title??""),[g,p]=A.useState(a?.description??""),[u,N]=A.useState(a?.status??"triage"),[y,C]=A.useState(a?.priority??"medium"),[b,j]=A.useState(a?.assigneeId??null),D=a?.dueDate;let T;e[0]!==D?(T=st(D),e[0]=D,e[1]=T):T=e[1];const[h,v]=A.useState(T),[_,w]=A.useState(!1);let k;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==j||e[9]!==p||e[10]!==v?(k=()=>{x(a?.title??""),p(a?.description??""),N(a?.status??"triage"),C(a?.priority??"medium"),j(a?.assigneeId??null),v(st(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=j,e[9]=p,e[10]=v,e[11]=k):k=e[11];const E=k;let z;e[12]!==o||e[13]!==E?(z=()=>{o(),E()},e[12]=o,e[13]=E,e[14]=z):z=e[14];const $=z;let P;e[15]!==b||e[16]!==g||e[17]!==h||e[18]!==r||e[19]!==y||e[20]!==u||e[21]!==m?(P=()=>{const f=m.trim();f&&r({title:f,description:g.trim()||null,status:u,priority:y,assigneeId:b,dueDate:h?Qt(h):null})},e[15]=b,e[16]=g,e[17]=h,e[18]=r,e[19]=y,e[20]=u,e[21]=m,e[22]=P):P=e[22];const R=P;let F;e[23]!==b?(F=f=>f.userId===b,e[23]=b,e[24]=F):F=e[24];const K=c.find(F),M=Ot;let I;e[25]!==$?(I=f=>!f&&$(),e[25]=$,e[26]=I):I=e[26];const B=At,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(Et,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const ft="flex min-h-0 flex-1 flex-col overflow-y-auto",xt="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=f=>x(f.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==m?(G=s.jsx("input",{value:m,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=m,e[31]=G):G=e[31];const gt="flex flex-wrap items-center gap-2",Be=Q[u].icon,Le=Q[u];let Se;e[32]!==Be||e[33]!==Le.iconClassName?(Se=s.jsx(Be,{size:13,className:Le.iconClassName}),e[32]=Be,e[33]=Le.iconClassName,e[34]=Se):Se=e[34];const Pe=Se,Re=Q[u];let Te;e[35]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[35]=Te):Te=e[35];let H;e[36]!==Pe||e[37]!==Re.label?(H=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Pe,Re.label,Te]})}),e[36]=Pe,e[37]=Re.label,e[38]=H):H=e[38];let we;e[39]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(We,{align:"start",className:"w-44",children:dt.map(f=>{const U=Q[f].icon;return s.jsxs(Oe,{onSelect:()=>N(f),className:"gap-2",children:[s.jsx(U,{size:13,className:Q[f].iconClassName}),Q[f].label]},f)})}),e[39]=we):we=e[39];let J;e[40]!==H?(J=s.jsxs(Xe,{children:[H,we]}),e[40]=H,e[41]=J):J=e[41];const Fe=ye[y];let V;e[42]!==Fe.badgeClassName?(V=L("size-2 rounded-full",Fe.badgeClassName),e[42]=Fe.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ke=ye[y];let Ie;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[46]=Ie):Ie=e[46];let X;e[47]!==W||e[48]!==Ke.label?(X=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ke.label,Ie]})}),e[47]=W,e[48]=Ke.label,e[49]=X):X=e[49];let _e;e[50]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(We,{align:"start",className:"w-40",children:Ut.map(f=>s.jsx(Oe,{onSelect:()=>C(f),children:ye[f].label},f))}),e[50]=_e):_e=e[50];let Z;e[51]!==X?(Z=s.jsxs(Xe,{children:[X,_e]}),e[51]=X,e[52]=Z):Z=e[52];const Ue=Xe,Qe=Ve,pt=!0,bt="button",ht="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=K?s.jsx(Me,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground"}),Ye=K?.user?.name??"Unassigned";let ke;e[53]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[53]=ke):ke=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:bt,className:ht,children:[qe,Ye,ke]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:pt,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==j?(se=s.jsx(Oe,{onSelect:()=>j(null),children:"Unassigned"}),e[60]=j,e[61]=se):se=e[61];let le;if(e[62]!==c||e[63]!==j){let f;e[65]!==j?(f=U=>s.jsxs(Oe,{onSelect:()=>j(U.userId),className:"gap-2",children:[s.jsx(Me,{url:U.user?.image??void 0,fallback:$e(U.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:U.user?.name??U.userId})]},U.userId),e[65]=j,e[66]=f):f=e[66],le=c.map(f),e[62]=c,e[63]=j,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(We,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let oe;e[70]!==Ue||e[71]!==te||e[72]!==ae?(oe=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=oe):oe=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(tt,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let ne;e[75]!==h?(ne=h?qt.format(h):"Due date",e[75]=h,e[76]=ne):ne=e[76];let re;e[77]!==h||e[78]!==v?(re=h?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:f=>{f.stopPropagation(),v(null)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),v(null))},children:s.jsx(Rt,{size:12})}):s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[77]=h,e[78]=v,e[79]=re):re=e[79];let ie;e[80]!==ne||e[81]!==re?(ie=s.jsx($t,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,ne,re]})}),e[80]=ne,e[81]=re,e[82]=ie):ie=e[82];const Ge=h??void 0;let ce;e[83]!==v||e[84]!==w?(ce=f=>{v(f??null),f&&w(!1)},e[83]=v,e[84]=w,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx(Mt,{className:"w-auto p-0",align:"start",children:s.jsx(Lt,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==_||e[90]!==w||e[91]!==ie||e[92]!==de?(me=s.jsxs(Bt,{open:_,onOpenChange:w,children:[ie,de]}),e[89]=_,e[90]=w,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==J||e[95]!==Z||e[96]!==oe||e[97]!==me?(ue=s.jsxs("div",{className:gt,children:[J,Z,oe,me]}),e[94]=J,e[95]=Z,e[96]=oe,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:xt,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==p?(xe=f=>p(f.target.value),e[102]=p,e[103]=xe):xe=e[103];let ge;e[104]!==g||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:g,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=g,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:ft,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==d?(be=a&&d&&s.jsx(et,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:d,children:s.jsx(Pt,{size:14})}),e[110]=a,e[111]=d,e[112]=be):be=e[112];let he;e[113]!==n||e[114]!==m?(he=!m.trim()||n,e[113]=n,e[114]=m,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==R||e[117]!==he||e[118]!==He?(Ne=s.jsx(et,{size:"sm",className:"ml-auto",disabled:he,onClick:R,children:He}),e[116]=R,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==B||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs(B,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=B,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Ae;return e[128]!==M||e[129]!==l||e[130]!==ve||e[131]!==I?(Ae=s.jsx(M,{open:l,onOpenChange:I,children:ve}),e[128]=M,e[129]=l,e[130]=ve,e[131]=I,e[132]=Ae):Ae=e[132],Ae}function Gt(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ut,{})})})}),t[0]=e):e=t[0],e}const Ht=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function mt(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Ht.format(e),overdue:l}}function Jt(t){const e=O.c(8),{iso:l}=t;let o;e[0]!==l?(o=mt(l),e[0]=l,e[1]=o):o=e[1];const{label:a,overdue:r}=o,d=r?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let n;e[2]!==d?(n=L("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",d),e[2]=d,e[3]=n):n=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(tt,{size:10}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==n?(c=s.jsxs("span",{className:n,children:[i,a]}),e[5]=a,e[6]=n,e[7]=c):c=e[7],c}function ut(){const t=O.c(45),{items:e,isLoading:l}=Ft(),o=Kt(),{data:a}=rt();let r;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];r=new Map(S.map(Vt)),t[0]=a?.data?.members,t[1]=r}else r=t[1];const d=r,[n,i]=A.useState("board"),[c,m]=A.useState(!1),[x,g]=A.useState(null);let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{g(null),m(!0)},t[2]=p):p=t[2];const u=p;let N;t[3]===Symbol.for("react.memo_cache_sentinel")?(N=S=>{g(S),m(!0)},t[3]=N):N=t[3];const y=N;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(vt,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const C=n==="board"?"max-w-[1400px]":"max-w-[900px]";let b;t[5]!==C?(b=L("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",C),t[5]=C,t[6]=b):b=t[6];let j;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[7]=j):j=t[7];let D;t[8]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs(et,{size:"sm",onClick:u,children:[s.jsx(wt,{size:16}),"New task"]}),t[8]=D):D=t[8];const T=n==="list";let h;t[9]===Symbol.for("react.memo_cache_sentinel")?(h=()=>i("list"),t[9]=h):h=t[9];let v;t[10]!==T?(v=s.jsx(lt,{active:T,onClick:h,icon:Tt,label:"List"}),t[10]=T,t[11]=v):v=t[11];const _=n==="board";let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>i("board"),t[12]=w):w=t[12];let k;t[13]!==_?(k=s.jsx(lt,{active:_,onClick:w,icon:St,label:"Board"}),t[13]=_,t[14]=k):k=t[14];let E;t[15]!==k||t[16]!==v?(E=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[D,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[v,k]})]}),t[15]=k,t[16]=v,t[17]=E):E=t[17];let z;t[18]!==o.update||t[19]!==e||t[20]!==n||t[21]!==d?(z=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):n==="board"?s.jsx(Wt,{items:e,memberByUserId:d,onOpen:y,onMove:(S,De)=>o.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Zt,{item:S,assignee:S.assigneeId?d.get(S.assigneeId):void 0,onOpen:()=>y(S)},S.id))}),t[18]=o.update,t[19]=e,t[20]=n,t[21]=d,t[22]=z):z=t[22];let $;t[23]!==E||t[24]!==z||t[25]!==b?($=s.jsxs("div",{className:b,children:[j,E,z]}),t[23]=E,t[24]=z,t[25]=b,t[26]=$):$=t[26];const P=c?x?.id??"new":"closed";let R;t[27]===Symbol.for("react.memo_cache_sentinel")?(R=()=>m(!1),t[27]=R):R=t[27];const F=x??void 0,K=o.create.isPending||o.update.isPending;let M;t[28]!==o.create||t[29]!==o.update||t[30]!==x?(M=S=>{x?o.update.mutate({id:x.id,...S}):o.create.mutate(S),m(!1)},t[28]=o.create,t[29]=o.update,t[30]=x,t[31]=M):M=t[31];let I;t[32]!==o.remove||t[33]!==x?(I=x?()=>{o.remove.mutate(x.id),m(!1)}:void 0,t[32]=o.remove,t[33]=x,t[34]=I):I=t[34];let B;t[35]!==c||t[36]!==P||t[37]!==F||t[38]!==K||t[39]!==M||t[40]!==I?(B=s.jsx(Yt,{open:c,onClose:R,item:F,isSaving:K,onSubmit:M,onDelete:I},P),t[35]=c,t[36]=P,t[37]=F,t[38]=K,t[39]=M,t[40]=I,t[41]=B):B=t[41];let q;return t[42]!==$||t[43]!==B?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[$,B]}),t[42]=$,t[43]=B,t[44]=q):q=t[44],q}function Vt(t){return[t.userId,t]}function lt(t){const e=O.c(11),{active:l,onClick:o,icon:a,label:r}=t,d=`${r} view`,n=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let i;e[0]!==n?(i=L("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",n),e[0]=n,e[1]=i):i=e[1];let c;e[2]!==a?(c=s.jsx(a,{size:14}),e[2]=a,e[3]=c):c=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==o||e[7]!==d||e[8]!==i||e[9]!==c?(m=s.jsxs("button",{type:"button",onClick:o,"aria-label":d,"aria-pressed":l,className:i,children:[c,r]}),e[4]=l,e[5]=r,e[6]=o,e[7]=d,e[8]=i,e[9]=c,e[10]=m):m=e[10],m}function Wt(t){const e=O.c(8),{items:l,memberByUserId:o,onOpen:a,onMove:r}=t,[d,n]=A.useState(null);let i;e[0]!==l||e[1]!==o||e[2]!==r||e[3]!==a||e[4]!==d?(i=dt.map(m=>{const x=l.filter(u=>u.status===m),g=Q[m],p=g.icon;return s.jsxs("div",{onDragOver:u=>{u.preventDefault(),n(m)},onDragLeave:u=>{u.currentTarget.contains(u.relatedTarget)||n(null)},onDrop:u=>{u.preventDefault();const N=u.dataTransfer.getData("text/plain");N&&r(N,m),n(null)},className:L("flex flex-col rounded-xl p-1 transition-colors",d===m&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(p,{size:14,className:L("shrink-0",g.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:g.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:x.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:x.map(u=>s.jsx(Xt,{item:u,assignee:u.assigneeId?o.get(u.assigneeId):void 0,onOpen:()=>a(u)},u.id))})]},m)}),e[0]=l,e[1]=o,e[2]=r,e[3]=a,e[4]=d,e[5]=i):i=e[5];let c;return e[6]!==i?(c=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:i}),e[6]=i,e[7]=c):c=e[7],c}function Xt(t){const e=O.c(38),{item:l,assignee:o,onOpen:a}=t,r=ye[l.priority];let d;e[0]!==l.dueDate?(d=l.dueDate?mt(l.dueDate):null,e[0]=l.dueDate,e[1]=d):d=e[1];const n=d;let i;e[2]!==l.id?(i=w=>{w.dataTransfer.setData("text/plain",l.id),w.dataTransfer.effectAllowed="move"},e[2]=l.id,e[3]=i):i=e[3];let c;e[4]!==l.title?(c=s.jsx("span",{className:"min-w-0 truncate text-[13px] font-medium leading-snug text-foreground",children:l.title}),e[4]=l.title,e[5]=c):c=e[5];let m;e[6]!==o?(m=o?s.jsx(Me,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground/60"}),e[6]=o,e[7]=m):m=e[7];const x=o?.user?.name;let g;e[8]!==m||e[9]!==x?(g=s.jsx(Ze,{icon:m,value:x}),e[8]=m,e[9]=x,e[10]=g):g=e[10];const p=n?.overdue?"text-red-500":"text-muted-foreground/60";let u;e[11]!==p?(u=L(p),e[11]=p,e[12]=u):u=e[12];let N;e[13]!==u?(N=s.jsx(tt,{size:13,className:u}),e[13]=u,e[14]=N):N=e[14];const y=n?.label,C=n?.overdue?"text-red-600":void 0;let b;e[15]!==y||e[16]!==C||e[17]!==N?(b=s.jsx(Ze,{icon:N,value:y,valueClassName:C}),e[15]=y,e[16]=C,e[17]=N,e[18]=b):b=e[18];let j;e[19]!==r.flagClassName?(j=s.jsx(Ct,{size:13,className:r.flagClassName}),e[19]=r.flagClassName,e[20]=j):j=e[20];let D;e[21]!==r.label||e[22]!==j?(D=s.jsx(Ze,{icon:j,value:r.label}),e[21]=r.label,e[22]=j,e[23]=D):D=e[23];let T;e[24]!==b||e[25]!==D||e[26]!==g?(T=s.jsxs("div",{className:"flex flex-col gap-1.5 text-[12px] text-muted-foreground",children:[g,b,D]}),e[24]=b,e[25]=D,e[26]=g,e[27]=T):T=e[27];let h;e[28]!==l.createdAt?(h=ct(new Date(l.createdAt)),e[28]=l.createdAt,e[29]=h):h=e[29];let v;e[30]!==h?(v=s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:h}),e[30]=h,e[31]=v):v=e[31];let _;return e[32]!==a||e[33]!==T||e[34]!==v||e[35]!==i||e[36]!==c?(_=s.jsxs("button",{type:"button",draggable:!0,onDragStart:i,onClick:a,className:"flex cursor-grab flex-col gap-2.5 rounded-[10px] border border-border bg-card px-3.5 py-3 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",children:[c,T,v]}),e[32]=a,e[33]=T,e[34]=v,e[35]=i,e[36]=c,e[37]=_):_=e[37],_}function Ze(t){const e=O.c(10),{icon:l,value:o,valueClassName:a}=t;let r;e[0]!==l?(r=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:l}),e[0]=l,e[1]=r):r=e[1];const d=o?a:"text-muted-foreground/50";let n;e[2]!==d?(n=L("min-w-0 truncate",d),e[2]=d,e[3]=n):n=e[3];const i=o??"—";let c;e[4]!==n||e[5]!==i?(c=s.jsx("span",{className:n,children:i}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let m;return e[7]!==r||e[8]!==c?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[r,c]}),e[7]=r,e[8]=c,e[9]=m):m=e[9],m}function Zt(t){const e=O.c(28),{item:l,assignee:o,onOpen:a}=t,r=Q[l.status],d=r.icon;let n;e[0]!==r.iconClassName?(n=L("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=n):n=e[1];let i;e[2]!==d||e[3]!==n?(i=s.jsx(d,{size:15,className:n}),e[2]=d,e[3]=n,e[4]=i):i=e[4];let c;e[5]!==l.title?(c=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=c):c=e[6];const m=ye[l.priority];let x;e[7]!==m.badgeClassName?(x=L("shrink-0 text-[10px]",m.badgeClassName),e[7]=m.badgeClassName,e[8]=x):x=e[8];const g=ye[l.priority];let p;e[9]!==x||e[10]!==g.label?(p=s.jsx(yt,{className:x,children:g.label}),e[9]=x,e[10]=g.label,e[11]=p):p=e[11];let u;e[12]!==l.dueDate?(u=l.dueDate&&s.jsx(Jt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=u):u=e[13];let N;e[14]!==o?(N=o&&s.jsx(Me,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}),e[14]=o,e[15]=N):N=e[15];let y;e[16]!==l.createdAt?(y=ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=y):y=e[17];let C;e[18]!==y?(C=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:y}),e[18]=y,e[19]=C):C=e[19];let b;return e[20]!==a||e[21]!==C||e[22]!==i||e[23]!==c||e[24]!==p||e[25]!==u||e[26]!==N?(b=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[i,c,p,u,N,C]}),e[20]=a,e[21]=C,e[22]=i,e[23]=c,e[24]=p,e[25]=u,e[26]=N,e[27]=b):b=e[27],b}const ys=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ut,default:Gt},Symbol.toStringTag,{value:"Module"}));export{Q as S,ut as T,ys as i,Ft as u};
|
|
1
|
+
import{c as O,$ as at,k as Nt,p as jt,d as Je,K as ot,r as A,j as s,l as L,B as et,i as vt}from"./index-EwY8NV0K.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Me}from"./avatar-Br6d-tNW.js";import{B as yt}from"./badge-DetkesDd.js";import{i as Dt,a as tt,s as Ct,b as St}from"./Loading02-C2o878Bj.js";import{i as Tt}from"./List-Bug9pmiY.js";import{s as wt}from"./Plus-1ng4gjYL.js";import{s as nt}from"./User01-DOpmPeGR.js";import{u as rt}from"./use-members-HEwKDSZW.js";import{u as it}from"./studio-tools-BgiCb0dU.js";import{f as ct}from"./format-time-Cy7tTmZp.js";import{i as It}from"./AlertCircle-BesCMDS0.js";import{i as _t}from"./CheckCircle-Cp3stx_U.js";import{i as kt}from"./Circle-BHD7h_nD.js";import{s as zt}from"./Eye-DTuW0TON.js";import{d as At,e as Ot,a as Et}from"./dialog-uKhdVqJA.js";import{a as Ve,c as We,d as Oe,D as Xe}from"./dropdown-menu-B9AtA-ud.js";import{a as $t,b as Mt,P as Bt}from"./popover-CUL8mDnT.js";import{C as Lt}from"./calendar-C6ttWVwF.js";import{t as Ee}from"./ChevronDown-DnTmPo-Z.js";import{s as Pt}from"./Trash01-D_2bKiRr.js";import{i as Rt}from"./X-HTDFt_4A.js";function Ft(){const t=O.c(13),{locator:e}=at(),l=it();let o;t[0]!==e?(o=ot.taskBoardItems(e),t[0]=e,t[1]=o):o=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let r;t[4]!==o||t[5]!==a?(r={queryKey:o,queryFn:a},t[4]=o,t[5]=a,t[6]=r):r=t[6];const d=Nt(r);let n;t[7]!==d.data?(n=d.data??[],t[7]=d.data,t[8]=n):n=t[8];let i;return t[9]!==d.error||t[10]!==d.isLoading||t[11]!==n?(i={items:n,isLoading:d.isLoading,error:d.error},t[9]=d.error,t[10]=d.isLoading,t[11]=n,t[12]=i):i=t[12],i}function Kt(){const t=O.c(30),{locator:e}=at(),l=it(),o=jt();let a;t[0]!==e?(a=ot.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const r=a;let d;t[2]!==o||t[3]!==r?(d=()=>o.invalidateQueries({queryKey:r}),t[2]=o,t[3]=r,t[4]=d):d=t[4];const n=d;let i;t[5]!==l?(i=D=>l.call("TASK_BOARD_ITEM_CREATE",D),t[5]=l,t[6]=i):i=t[6];let c;t[7]!==n||t[8]!==i?(c={mutationFn:i,onSuccess:n},t[7]=n,t[8]=i,t[9]=c):c=t[9];const m=Je(c);let x;t[10]!==l?(x=D=>l.call("TASK_BOARD_ITEM_UPDATE",D),t[10]=l,t[11]=x):x=t[11];let g,p;t[12]!==o||t[13]!==r?(g=async D=>{await o.cancelQueries({queryKey:r});const T=o.getQueryData(r);return o.setQueryData(r,h=>h?.map(v=>v.id===D.id?{...v,...D}:v)),{previous:T}},p=(D,T,h)=>{h?.previous&&o.setQueryData(r,h.previous)},t[12]=o,t[13]=r,t[14]=g,t[15]=p):(g=t[14],p=t[15]);let u;t[16]!==n||t[17]!==x||t[18]!==g||t[19]!==p?(u={mutationFn:x,onMutate:g,onError:p,onSettled:n},t[16]=n,t[17]=x,t[18]=g,t[19]=p,t[20]=u):u=t[20];const N=Je(u);let y;t[21]!==l?(y=D=>l.call("TASK_BOARD_ITEM_DELETE",{id:D}),t[21]=l,t[22]=y):y=t[22];let C;t[23]!==n||t[24]!==y?(C={mutationFn:y,onSuccess:n},t[23]=n,t[24]=y,t[25]=C):C=t[25];const b=Je(C);let j;return t[26]!==m||t[27]!==b||t[28]!==N?(j={create:m,update:N,remove:b},t[26]=m,t[27]=b,t[28]=N,t[29]=j):j=t[29],j}const dt=["triage","todo","in_progress","in_review","done"],Q={triage:{label:"Triage",icon:It,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:kt,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Dt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:zt,iconClassName:"text-amber-500"},done:{label:"Done",icon:_t,iconClassName:"text-green-600"}},Ut=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Qt(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function st(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const qt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Yt(t){const e=O.c(133),{open:l,onClose:o,item:a,onSubmit:r,onDelete:d,isSaving:n}=t,{data:i}=rt(),c=i?.data?.members??[],[m,x]=A.useState(a?.title??""),[g,p]=A.useState(a?.description??""),[u,N]=A.useState(a?.status??"triage"),[y,C]=A.useState(a?.priority??"medium"),[b,j]=A.useState(a?.assigneeId??null),D=a?.dueDate;let T;e[0]!==D?(T=st(D),e[0]=D,e[1]=T):T=e[1];const[h,v]=A.useState(T),[_,w]=A.useState(!1);let k;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==j||e[9]!==p||e[10]!==v?(k=()=>{x(a?.title??""),p(a?.description??""),N(a?.status??"triage"),C(a?.priority??"medium"),j(a?.assigneeId??null),v(st(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=j,e[9]=p,e[10]=v,e[11]=k):k=e[11];const E=k;let z;e[12]!==o||e[13]!==E?(z=()=>{o(),E()},e[12]=o,e[13]=E,e[14]=z):z=e[14];const $=z;let P;e[15]!==b||e[16]!==g||e[17]!==h||e[18]!==r||e[19]!==y||e[20]!==u||e[21]!==m?(P=()=>{const f=m.trim();f&&r({title:f,description:g.trim()||null,status:u,priority:y,assigneeId:b,dueDate:h?Qt(h):null})},e[15]=b,e[16]=g,e[17]=h,e[18]=r,e[19]=y,e[20]=u,e[21]=m,e[22]=P):P=e[22];const R=P;let F;e[23]!==b?(F=f=>f.userId===b,e[23]=b,e[24]=F):F=e[24];const K=c.find(F),M=Ot;let I;e[25]!==$?(I=f=>!f&&$(),e[25]=$,e[26]=I):I=e[26];const B=At,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(Et,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const ft="flex min-h-0 flex-1 flex-col overflow-y-auto",xt="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=f=>x(f.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==m?(G=s.jsx("input",{value:m,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=m,e[31]=G):G=e[31];const gt="flex flex-wrap items-center gap-2",Be=Q[u].icon,Le=Q[u];let Se;e[32]!==Be||e[33]!==Le.iconClassName?(Se=s.jsx(Be,{size:13,className:Le.iconClassName}),e[32]=Be,e[33]=Le.iconClassName,e[34]=Se):Se=e[34];const Pe=Se,Re=Q[u];let Te;e[35]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[35]=Te):Te=e[35];let H;e[36]!==Pe||e[37]!==Re.label?(H=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Pe,Re.label,Te]})}),e[36]=Pe,e[37]=Re.label,e[38]=H):H=e[38];let we;e[39]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(We,{align:"start",className:"w-44",children:dt.map(f=>{const U=Q[f].icon;return s.jsxs(Oe,{onSelect:()=>N(f),className:"gap-2",children:[s.jsx(U,{size:13,className:Q[f].iconClassName}),Q[f].label]},f)})}),e[39]=we):we=e[39];let J;e[40]!==H?(J=s.jsxs(Xe,{children:[H,we]}),e[40]=H,e[41]=J):J=e[41];const Fe=ye[y];let V;e[42]!==Fe.badgeClassName?(V=L("size-2 rounded-full",Fe.badgeClassName),e[42]=Fe.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ke=ye[y];let Ie;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[46]=Ie):Ie=e[46];let X;e[47]!==W||e[48]!==Ke.label?(X=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ke.label,Ie]})}),e[47]=W,e[48]=Ke.label,e[49]=X):X=e[49];let _e;e[50]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(We,{align:"start",className:"w-40",children:Ut.map(f=>s.jsx(Oe,{onSelect:()=>C(f),children:ye[f].label},f))}),e[50]=_e):_e=e[50];let Z;e[51]!==X?(Z=s.jsxs(Xe,{children:[X,_e]}),e[51]=X,e[52]=Z):Z=e[52];const Ue=Xe,Qe=Ve,pt=!0,bt="button",ht="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=K?s.jsx(Me,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground"}),Ye=K?.user?.name??"Unassigned";let ke;e[53]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[53]=ke):ke=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:bt,className:ht,children:[qe,Ye,ke]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:pt,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==j?(se=s.jsx(Oe,{onSelect:()=>j(null),children:"Unassigned"}),e[60]=j,e[61]=se):se=e[61];let le;if(e[62]!==c||e[63]!==j){let f;e[65]!==j?(f=U=>s.jsxs(Oe,{onSelect:()=>j(U.userId),className:"gap-2",children:[s.jsx(Me,{url:U.user?.image??void 0,fallback:$e(U.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:U.user?.name??U.userId})]},U.userId),e[65]=j,e[66]=f):f=e[66],le=c.map(f),e[62]=c,e[63]=j,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(We,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let oe;e[70]!==Ue||e[71]!==te||e[72]!==ae?(oe=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=oe):oe=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(tt,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let ne;e[75]!==h?(ne=h?qt.format(h):"Due date",e[75]=h,e[76]=ne):ne=e[76];let re;e[77]!==h||e[78]!==v?(re=h?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:f=>{f.stopPropagation(),v(null)},onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),v(null))},children:s.jsx(Rt,{size:12})}):s.jsx(Ee,{size:12,className:"text-muted-foreground"}),e[77]=h,e[78]=v,e[79]=re):re=e[79];let ie;e[80]!==ne||e[81]!==re?(ie=s.jsx($t,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,ne,re]})}),e[80]=ne,e[81]=re,e[82]=ie):ie=e[82];const Ge=h??void 0;let ce;e[83]!==v||e[84]!==w?(ce=f=>{v(f??null),f&&w(!1)},e[83]=v,e[84]=w,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx(Mt,{className:"w-auto p-0",align:"start",children:s.jsx(Lt,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==_||e[90]!==w||e[91]!==ie||e[92]!==de?(me=s.jsxs(Bt,{open:_,onOpenChange:w,children:[ie,de]}),e[89]=_,e[90]=w,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==J||e[95]!==Z||e[96]!==oe||e[97]!==me?(ue=s.jsxs("div",{className:gt,children:[J,Z,oe,me]}),e[94]=J,e[95]=Z,e[96]=oe,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:xt,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==p?(xe=f=>p(f.target.value),e[102]=p,e[103]=xe):xe=e[103];let ge;e[104]!==g||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:g,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=g,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:ft,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==d?(be=a&&d&&s.jsx(et,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:d,children:s.jsx(Pt,{size:14})}),e[110]=a,e[111]=d,e[112]=be):be=e[112];let he;e[113]!==n||e[114]!==m?(he=!m.trim()||n,e[113]=n,e[114]=m,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==R||e[117]!==he||e[118]!==He?(Ne=s.jsx(et,{size:"sm",className:"ml-auto",disabled:he,onClick:R,children:He}),e[116]=R,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==B||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs(B,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=B,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Ae;return e[128]!==M||e[129]!==l||e[130]!==ve||e[131]!==I?(Ae=s.jsx(M,{open:l,onOpenChange:I,children:ve}),e[128]=M,e[129]=l,e[130]=ve,e[131]=I,e[132]=Ae):Ae=e[132],Ae}function Gt(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ut,{})})})}),t[0]=e):e=t[0],e}const Ht=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function mt(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Ht.format(e),overdue:l}}function Jt(t){const e=O.c(8),{iso:l}=t;let o;e[0]!==l?(o=mt(l),e[0]=l,e[1]=o):o=e[1];const{label:a,overdue:r}=o,d=r?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let n;e[2]!==d?(n=L("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",d),e[2]=d,e[3]=n):n=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(tt,{size:10}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==n?(c=s.jsxs("span",{className:n,children:[i,a]}),e[5]=a,e[6]=n,e[7]=c):c=e[7],c}function ut(){const t=O.c(45),{items:e,isLoading:l}=Ft(),o=Kt(),{data:a}=rt();let r;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];r=new Map(S.map(Vt)),t[0]=a?.data?.members,t[1]=r}else r=t[1];const d=r,[n,i]=A.useState("board"),[c,m]=A.useState(!1),[x,g]=A.useState(null);let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{g(null),m(!0)},t[2]=p):p=t[2];const u=p;let N;t[3]===Symbol.for("react.memo_cache_sentinel")?(N=S=>{g(S),m(!0)},t[3]=N):N=t[3];const y=N;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(vt,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const C=n==="board"?"max-w-[1400px]":"max-w-[900px]";let b;t[5]!==C?(b=L("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",C),t[5]=C,t[6]=b):b=t[6];let j;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[7]=j):j=t[7];let D;t[8]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs(et,{size:"sm",onClick:u,children:[s.jsx(wt,{size:16}),"New task"]}),t[8]=D):D=t[8];const T=n==="list";let h;t[9]===Symbol.for("react.memo_cache_sentinel")?(h=()=>i("list"),t[9]=h):h=t[9];let v;t[10]!==T?(v=s.jsx(lt,{active:T,onClick:h,icon:Tt,label:"List"}),t[10]=T,t[11]=v):v=t[11];const _=n==="board";let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>i("board"),t[12]=w):w=t[12];let k;t[13]!==_?(k=s.jsx(lt,{active:_,onClick:w,icon:St,label:"Board"}),t[13]=_,t[14]=k):k=t[14];let E;t[15]!==k||t[16]!==v?(E=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[D,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[v,k]})]}),t[15]=k,t[16]=v,t[17]=E):E=t[17];let z;t[18]!==o.update||t[19]!==e||t[20]!==n||t[21]!==d?(z=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):n==="board"?s.jsx(Wt,{items:e,memberByUserId:d,onOpen:y,onMove:(S,De)=>o.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Zt,{item:S,assignee:S.assigneeId?d.get(S.assigneeId):void 0,onOpen:()=>y(S)},S.id))}),t[18]=o.update,t[19]=e,t[20]=n,t[21]=d,t[22]=z):z=t[22];let $;t[23]!==E||t[24]!==z||t[25]!==b?($=s.jsxs("div",{className:b,children:[j,E,z]}),t[23]=E,t[24]=z,t[25]=b,t[26]=$):$=t[26];const P=c?x?.id??"new":"closed";let R;t[27]===Symbol.for("react.memo_cache_sentinel")?(R=()=>m(!1),t[27]=R):R=t[27];const F=x??void 0,K=o.create.isPending||o.update.isPending;let M;t[28]!==o.create||t[29]!==o.update||t[30]!==x?(M=S=>{x?o.update.mutate({id:x.id,...S}):o.create.mutate(S),m(!1)},t[28]=o.create,t[29]=o.update,t[30]=x,t[31]=M):M=t[31];let I;t[32]!==o.remove||t[33]!==x?(I=x?()=>{o.remove.mutate(x.id),m(!1)}:void 0,t[32]=o.remove,t[33]=x,t[34]=I):I=t[34];let B;t[35]!==c||t[36]!==P||t[37]!==F||t[38]!==K||t[39]!==M||t[40]!==I?(B=s.jsx(Yt,{open:c,onClose:R,item:F,isSaving:K,onSubmit:M,onDelete:I},P),t[35]=c,t[36]=P,t[37]=F,t[38]=K,t[39]=M,t[40]=I,t[41]=B):B=t[41];let q;return t[42]!==$||t[43]!==B?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[$,B]}),t[42]=$,t[43]=B,t[44]=q):q=t[44],q}function Vt(t){return[t.userId,t]}function lt(t){const e=O.c(11),{active:l,onClick:o,icon:a,label:r}=t,d=`${r} view`,n=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let i;e[0]!==n?(i=L("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",n),e[0]=n,e[1]=i):i=e[1];let c;e[2]!==a?(c=s.jsx(a,{size:14}),e[2]=a,e[3]=c):c=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==o||e[7]!==d||e[8]!==i||e[9]!==c?(m=s.jsxs("button",{type:"button",onClick:o,"aria-label":d,"aria-pressed":l,className:i,children:[c,r]}),e[4]=l,e[5]=r,e[6]=o,e[7]=d,e[8]=i,e[9]=c,e[10]=m):m=e[10],m}function Wt(t){const e=O.c(8),{items:l,memberByUserId:o,onOpen:a,onMove:r}=t,[d,n]=A.useState(null);let i;e[0]!==l||e[1]!==o||e[2]!==r||e[3]!==a||e[4]!==d?(i=dt.map(m=>{const x=l.filter(u=>u.status===m),g=Q[m],p=g.icon;return s.jsxs("div",{onDragOver:u=>{u.preventDefault(),n(m)},onDragLeave:u=>{u.currentTarget.contains(u.relatedTarget)||n(null)},onDrop:u=>{u.preventDefault();const N=u.dataTransfer.getData("text/plain");N&&r(N,m),n(null)},className:L("flex flex-col rounded-xl p-1 transition-colors",d===m&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(p,{size:14,className:L("shrink-0",g.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:g.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:x.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:x.map(u=>s.jsx(Xt,{item:u,assignee:u.assigneeId?o.get(u.assigneeId):void 0,onOpen:()=>a(u)},u.id))})]},m)}),e[0]=l,e[1]=o,e[2]=r,e[3]=a,e[4]=d,e[5]=i):i=e[5];let c;return e[6]!==i?(c=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:i}),e[6]=i,e[7]=c):c=e[7],c}function Xt(t){const e=O.c(38),{item:l,assignee:o,onOpen:a}=t,r=ye[l.priority];let d;e[0]!==l.dueDate?(d=l.dueDate?mt(l.dueDate):null,e[0]=l.dueDate,e[1]=d):d=e[1];const n=d;let i;e[2]!==l.id?(i=w=>{w.dataTransfer.setData("text/plain",l.id),w.dataTransfer.effectAllowed="move"},e[2]=l.id,e[3]=i):i=e[3];let c;e[4]!==l.title?(c=s.jsx("span",{className:"min-w-0 truncate text-[13px] font-medium leading-snug text-foreground",children:l.title}),e[4]=l.title,e[5]=c):c=e[5];let m;e[6]!==o?(m=o?s.jsx(Me,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}):s.jsx(nt,{size:13,className:"text-muted-foreground/60"}),e[6]=o,e[7]=m):m=e[7];const x=o?.user?.name;let g;e[8]!==m||e[9]!==x?(g=s.jsx(Ze,{icon:m,value:x}),e[8]=m,e[9]=x,e[10]=g):g=e[10];const p=n?.overdue?"text-red-500":"text-muted-foreground/60";let u;e[11]!==p?(u=L(p),e[11]=p,e[12]=u):u=e[12];let N;e[13]!==u?(N=s.jsx(tt,{size:13,className:u}),e[13]=u,e[14]=N):N=e[14];const y=n?.label,C=n?.overdue?"text-red-600":void 0;let b;e[15]!==y||e[16]!==C||e[17]!==N?(b=s.jsx(Ze,{icon:N,value:y,valueClassName:C}),e[15]=y,e[16]=C,e[17]=N,e[18]=b):b=e[18];let j;e[19]!==r.flagClassName?(j=s.jsx(Ct,{size:13,className:r.flagClassName}),e[19]=r.flagClassName,e[20]=j):j=e[20];let D;e[21]!==r.label||e[22]!==j?(D=s.jsx(Ze,{icon:j,value:r.label}),e[21]=r.label,e[22]=j,e[23]=D):D=e[23];let T;e[24]!==b||e[25]!==D||e[26]!==g?(T=s.jsxs("div",{className:"flex flex-col gap-1.5 text-[12px] text-muted-foreground",children:[g,b,D]}),e[24]=b,e[25]=D,e[26]=g,e[27]=T):T=e[27];let h;e[28]!==l.createdAt?(h=ct(new Date(l.createdAt)),e[28]=l.createdAt,e[29]=h):h=e[29];let v;e[30]!==h?(v=s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:h}),e[30]=h,e[31]=v):v=e[31];let _;return e[32]!==a||e[33]!==T||e[34]!==v||e[35]!==i||e[36]!==c?(_=s.jsxs("button",{type:"button",draggable:!0,onDragStart:i,onClick:a,className:"flex cursor-grab flex-col gap-2.5 rounded-[10px] border border-border bg-card px-3.5 py-3 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",children:[c,T,v]}),e[32]=a,e[33]=T,e[34]=v,e[35]=i,e[36]=c,e[37]=_):_=e[37],_}function Ze(t){const e=O.c(10),{icon:l,value:o,valueClassName:a}=t;let r;e[0]!==l?(r=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:l}),e[0]=l,e[1]=r):r=e[1];const d=o?a:"text-muted-foreground/50";let n;e[2]!==d?(n=L("min-w-0 truncate",d),e[2]=d,e[3]=n):n=e[3];const i=o??"—";let c;e[4]!==n||e[5]!==i?(c=s.jsx("span",{className:n,children:i}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let m;return e[7]!==r||e[8]!==c?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[r,c]}),e[7]=r,e[8]=c,e[9]=m):m=e[9],m}function Zt(t){const e=O.c(28),{item:l,assignee:o,onOpen:a}=t,r=Q[l.status],d=r.icon;let n;e[0]!==r.iconClassName?(n=L("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=n):n=e[1];let i;e[2]!==d||e[3]!==n?(i=s.jsx(d,{size:15,className:n}),e[2]=d,e[3]=n,e[4]=i):i=e[4];let c;e[5]!==l.title?(c=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=c):c=e[6];const m=ye[l.priority];let x;e[7]!==m.badgeClassName?(x=L("shrink-0 text-[10px]",m.badgeClassName),e[7]=m.badgeClassName,e[8]=x):x=e[8];const g=ye[l.priority];let p;e[9]!==x||e[10]!==g.label?(p=s.jsx(yt,{className:x,children:g.label}),e[9]=x,e[10]=g.label,e[11]=p):p=e[11];let u;e[12]!==l.dueDate?(u=l.dueDate&&s.jsx(Jt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=u):u=e[13];let N;e[14]!==o?(N=o&&s.jsx(Me,{url:o.user?.image??void 0,fallback:$e(o.user?.name),shape:"circle",size:"2xs"}),e[14]=o,e[15]=N):N=e[15];let y;e[16]!==l.createdAt?(y=ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=y):y=e[17];let C;e[18]!==y?(C=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:y}),e[18]=y,e[19]=C):C=e[19];let b;return e[20]!==a||e[21]!==C||e[22]!==i||e[23]!==c||e[24]!==p||e[25]!==u||e[26]!==N?(b=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[i,c,p,u,N,C]}),e[20]=a,e[21]=C,e[22]=i,e[23]=c,e[24]=p,e[25]=u,e[26]=N,e[27]=b):b=e[27],b}const ys=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ut,default:Gt},Symbol.toStringTag,{value:"Module"}));export{Q as S,ut as T,ys as i,Ft as u};
|