decocms 4.82.9 → 4.82.11
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-CasESeW6.js → AlertCircle-B5S0Howv.js} +1 -1
- package/dist/client/assets/{AreaChart-DqvPPaTC.js → AreaChart-BqhmXRim.js} +1 -1
- package/dist/client/assets/{ArrowUp-FPNlktOK.js → ArrowUp-C2Uom_QG.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-M9tqNBZh.js → ArrowUpRight-CWABXTLe.js} +1 -1
- package/dist/client/assets/{Check-D3n4gRJc.js → Check-2hvdb-vm.js} +1 -1
- package/dist/client/assets/{CheckCircle-C7IpeM2l.js → CheckCircle-Dtlxzayc.js} +1 -1
- package/dist/client/assets/{ChevronDown-D4DHAf0j.js → ChevronDown-BOF5C-lc.js} +1 -1
- package/dist/client/assets/{ChevronRight-RInm-aVw.js → ChevronRight-Gt0dyTZv.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cu19ewZf.js → ChevronUp-BgF4lo04.js} +1 -1
- package/dist/client/assets/{Circle-D9nZXcv9.js → Circle-WCex1xh9.js} +1 -1
- package/dist/client/assets/{Copy01-D0NIZWk6.js → Copy01-JoQTJv1g.js} +1 -1
- package/dist/client/assets/{DotsVertical-ZkH87H22.js → DotsVertical-D5iMp6bE.js} +1 -1
- package/dist/client/assets/{Eye-CuMpXJkc.js → Eye-u_eyLJkM.js} +1 -1
- package/dist/client/assets/{FilterLines-CZAAcWWi.js → FilterLines-9uIhD3OH.js} +1 -1
- package/dist/client/assets/{Flag01-DiSJyFcN.js → Flag01-B66NcKmx.js} +1 -1
- package/dist/client/assets/{Globe01-CtGNOAC_.js → Globe01-BLXYE4Cy.js} +1 -1
- package/dist/client/assets/{Globe04-CtsA--DL.js → Globe04-f79X3HKE.js} +1 -1
- package/dist/client/assets/{HardDrive-B7Komd_c.js → HardDrive-al9D_s63.js} +1 -1
- package/dist/client/assets/{Image01-BAGsNaQU.js → Image01-DVYnawJP.js} +1 -1
- package/dist/client/assets/{Key01-BDTnv2QH.js → Key01-TX-oFrbw.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DFfT9PNh.js → LayoutLeft-C1tijNFg.js} +1 -1
- package/dist/client/assets/{LinkExternal01-0cXhXnwo.js → LinkExternal01-B0gcEmkE.js} +1 -1
- package/dist/client/assets/{List-DUr-xsD7.js → List-LBmnlI0P.js} +1 -1
- package/dist/client/assets/{Monitor01-CCca9VX6.js → Monitor01-CdKZX-bL.js} +1 -1
- package/dist/client/assets/{Package-BI2BjUtD.js → Package-CMkd2sHI.js} +1 -1
- package/dist/client/assets/{Palette-DCkpyAzO.js → Palette-Q_tRuOMf.js} +1 -1
- package/dist/client/assets/{Play-Bp-NfS7s.js → Play-Bm9V641L.js} +1 -1
- package/dist/client/assets/{Plus-BnnQdSS2.js → Plus-Bt0qDPEV.js} +1 -1
- package/dist/client/assets/{SearchLg-CJDpvrzu.js → SearchLg-DSuw112A.js} +1 -1
- package/dist/client/assets/{SearchMd-CWXkSlvi.js → SearchMd-CVmGoUfY.js} +1 -1
- package/dist/client/assets/{Settings02-BOgQYQhy.js → Settings02-C28ltUF9.js} +1 -1
- package/dist/client/assets/{Shield01-DROOCFo5.js → Shield01-Bxz1cNPl.js} +1 -1
- package/dist/client/assets/{Star01-Dqxud4cG.js → Star01-ijVxXmb8.js} +1 -1
- package/dist/client/assets/{Stars01-BQF4fDG0.js → Stars01-yVlwMkQy.js} +1 -1
- package/dist/client/assets/{Stars02-BwTUcjpB.js → Stars02-ClLIxwPM.js} +1 -1
- package/dist/client/assets/{Sun-CGU_J3YG.js → Sun-BHNbv08f.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CU1Z25ud.js → SwitchHorizontal01-DEvDgDFu.js} +1 -1
- package/dist/client/assets/{Tool01-C5UcZe4X.js → Tool01-MVmzVfJA.js} +1 -1
- package/dist/client/assets/{Tool02-C3DiBnvC.js → Tool02-B4J4k_Jq.js} +1 -1
- package/dist/client/assets/{Trash01-CnVHiwXT.js → Trash01-D3uneq9V.js} +1 -1
- package/dist/client/assets/{TrendUp01-D4nDXsC7.js → TrendUp01-BnB7HNcK.js} +1 -1
- package/dist/client/assets/{Upload01-B1HnYX_L.js → Upload01-Dz_C9C_o.js} +1 -1
- package/dist/client/assets/{User01-DDQH6RKB.js → User01-B21uLVgH.js} +1 -1
- package/dist/client/assets/{UserPlus01-BuJJCUTQ.js → UserPlus01-B1r5BrnS.js} +1 -1
- package/dist/client/assets/{Users01-BgsiD61H.js → Users01-DS-6elOB.js} +1 -1
- package/dist/client/assets/{Users03-Bq6sidtE.js → Users03-5UfvMRx2.js} +1 -1
- package/dist/client/assets/{X-C1Hb-T06.js → X-CuXL2cLN.js} +1 -1
- package/dist/client/assets/{XCircle-D_1ilOF2.js → XCircle-Bqih3VAo.js} +1 -1
- package/dist/client/assets/{XClose-bVEi_3Z9.js → XClose-DEI4maVJ.js} +1 -1
- package/dist/client/assets/{Zap-DenhxUDB.js → Zap-CbZARwtr.js} +1 -1
- package/dist/client/assets/{ZapSquare-CoeP1pL7.js → ZapSquare-DntY_gJw.js} +1 -1
- package/dist/client/assets/{ZoomOut-ZBq0pI6d.js → ZoomOut-CUl1mvu1.js} +1 -1
- package/dist/client/assets/{access-gate-CeqiNeAt.js → access-gate-DDYRYhpb.js} +1 -1
- package/dist/client/assets/{add-section-modal-D88nYKjy.js → add-section-modal-D3akZWgZ.js} +1 -1
- package/dist/client/assets/{agent-icon-gbgOnB97.js → agent-icon-BD0Dhqds.js} +1 -1
- package/dist/client/assets/{agents-list-D4pvJOPZ.js → agents-list-BYgzGNrl.js} +1 -1
- package/dist/client/assets/{ai-providers-DwFphwmz.js → ai-providers-CC2a0KaA.js} +1 -1
- package/dist/client/assets/{alert-dialog-AMD4bxPu.js → alert-dialog-YVSboGyg.js} +1 -1
- package/dist/client/assets/{alert-5e3SG1g3.js → alert-r0EE7buF.js} +1 -1
- package/dist/client/assets/{app-editor-DxIPuBrZ.js → app-editor-D3NrrquY.js} +1 -1
- package/dist/client/assets/{auth-DKNOF6Pv.js → auth-CQTZH4-O.js} +1 -1
- package/dist/client/assets/{auth-catchall-B0iXh3jj.js → auth-catchall-DjuiYYzw.js} +1 -1
- package/dist/client/assets/{auth-entry-D4Ql-X3u.js → auth-entry-CsE0cCZS.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DJPHJkcG.js → auth-split-layout-BXWnGvvD.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DwbkuScw.js → authenticate-and-persist-oauth-BWBUH6FO.js} +1 -1
- package/dist/client/assets/{automation-list-row-BvEcB9tE.js → automation-list-row-mah_f33i.js} +1 -1
- package/dist/client/assets/{automation-runs-DMvzL5XU.js → automation-runs-CI_DXiSg.js} +1 -1
- package/dist/client/assets/automations-Bo6bbj7e.js +1 -0
- package/dist/client/assets/{autosend-4jNArwYp.js → autosend-Cy6yTFx0.js} +1 -1
- package/dist/client/assets/{avatar-D8cqehrs.js → avatar-B26L6f3M.js} +1 -1
- package/dist/client/assets/{badge-BD9n0Dfq.js → badge-Cagw1NWA.js} +1 -1
- package/dist/client/assets/{block-document-DJVwi8r7.js → block-document-4o_mZ5Wu.js} +1 -1
- package/dist/client/assets/{brand-context-CBkXfvqu.js → brand-context-BIWhPFQh.js} +1 -1
- package/dist/client/assets/{buckets-B3aSLV4N.js → buckets-CYkE09pb.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BECxvOsP.js → bulk-category-panel-D6Gvn6u4.js} +1 -1
- package/dist/client/assets/{calendar-BstnI_Yr.js → calendar-C3xMag-0.js} +1 -1
- package/dist/client/assets/{capability-load-error-C0fAl7Vj.js → capability-load-error-zjT6zavB.js} +1 -1
- package/dist/client/assets/{card-S6Aa8yjq.js → card-DaWNzsoz.js} +1 -1
- package/dist/client/assets/{category-editor-BGw2UKNB.js → category-editor-BdTKt4Wb.js} +1 -1
- package/dist/client/assets/{chat-context-BIBgMmSP.js → chat-context-DsgMhUkR.js} +1 -1
- package/dist/client/assets/{checkbox-Cl_AUlvc.js → checkbox-Bfo0_7OX.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D6eQ3LJC.js → cli-auth-success-CXRXasyO.js} +1 -1
- package/dist/client/assets/{collection-detail-2cgHK4yH.js → collection-detail-DN9ZxScE.js} +1 -1
- package/dist/client/assets/{collection-display-button-CrS1mtS3.js → collection-display-button-BKjWwtNp.js} +1 -1
- package/dist/client/assets/{collection-search-CDWYBpbb.js → collection-search-B1Ombzts.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CaHfX_Ha.js → collection-table-wrapper-X2s9eJ1l.js} +1 -1
- package/dist/client/assets/{collection-tabs-BedmQqrC.js → collection-tabs-WaSVL-dS.js} +1 -1
- package/dist/client/assets/{command-DRdHD2LV.js → command-Cn83qANG.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CiZ-ukOP.js → commerce-onboarding-BuAsGrLS.js} +1 -1
- package/dist/client/assets/{companions-core-CMtMZANc.js → companions-core-DekO4Tau.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DOTPKvtV.js → connect-desktop-dialog-IeFRacue.js} +1 -1
- package/dist/client/assets/{connection-card-CO4Zt6un.js → connection-card-CGYwJ0pB.js} +1 -1
- package/dist/client/assets/{connection-detail-CBL5s1oA.js → connection-detail-CeB50ytn.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B3-hYGek.js → connection-form-helpers-CmcaSfzc.js} +1 -1
- package/dist/client/assets/{connections-BRoc1zTX.js → connections-CfHN_-P2.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CAAPJES7.js → decopilot-sse-pool-DZSk4S2t.js} +1 -1
- package/dist/client/assets/{dialog-7Hh4EEds.js → dialog-B71p2x2p.js} +1 -1
- package/dist/client/assets/{domain-settings-BQsoathe.js → domain-settings-B8r_-ck2.js} +1 -1
- package/dist/client/assets/{drawer-C9w90-t7.js → drawer-Do-PSohO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BJz5vhZu.js → dropdown-menu-CCDOmXjQ.js} +1 -1
- package/dist/client/assets/{empty-state-BFIwmfIY.js → empty-state-pDQBZsd9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CWqIHi--.js → extract-connection-data-DZ42iEpK.js} +1 -1
- package/dist/client/assets/{file-explorer-CtjmBpKr.js → file-explorer-BDF4Y5o5.js} +1 -1
- package/dist/client/assets/{file-type-icon-oaWPVcXq.js → file-type-icon-CrVWqTLg.js} +3 -3
- package/dist/client/assets/{files-Dys5CuAI.js → files-B3NTZjcB.js} +1 -1
- package/dist/client/assets/{form-DNDzmHY7.js → form-IQF2IyvU.js} +1 -1
- package/dist/client/assets/{general-D_WcrNxB.js → general-CxQInQw2.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C9Dg6j7e.js → github-repo-picker-DS0e520o.js} +1 -1
- package/dist/client/assets/{hooks-8LO2nFxS.js → hooks-Ce88nl_8.js} +1 -1
- package/dist/client/assets/index-B1f7loQR.js +1 -0
- package/dist/client/assets/{index-q_ZBGy7p.js → index-B3Lao2pE.js} +5 -5
- package/dist/client/assets/{index-CKjd7FVQ.js → index-BB6iYbEk.js} +3 -3
- package/dist/client/assets/{index-CvhBtFuW.js → index-BQmin4cH.js} +1 -1
- package/dist/client/assets/{index-Bu9LEqep.js → index-BZJ9XJhj.js} +2 -2
- package/dist/client/assets/{index-CMdl54QV.js → index-CP-UVMqF.js} +1 -1
- package/dist/client/assets/{index-BpxVmSwt.js → index-CdSATOtN.js} +1 -1
- package/dist/client/assets/{index-Dv0yuO1h.js → index-CoSY6fwz.js} +1 -1
- package/dist/client/assets/{index-BcxWRa-k.js → index-D5mw-efR.js} +1 -1
- package/dist/client/assets/{index-B941tipH.js → index-DKGDY3AR.js} +1 -1
- package/dist/client/assets/{index-CjOpN5P_.js → index-DdQdmhmf.js} +1 -1
- package/dist/client/assets/{index-Brnwm4tN.js → index-DpU56SgE.js} +1 -1
- package/dist/client/assets/{index-BSxh64hl.js → index-JkzY1USm.js} +3 -3
- package/dist/client/assets/{index-redirect-CmTrCf2J.js → index-redirect-De-_NmXc.js} +1 -1
- package/dist/client/assets/{index-BtmuUE9g.js → index-tJkQ3pGR.js} +1 -1
- package/dist/client/assets/{input-HA5GlV6J.js → input-typWdmM2.js} +1 -1
- package/dist/client/assets/{integration-icon-CxEZQlxS.js → integration-icon-CTpNPfCm.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BBhywTvU.js → invite-member-dialog-D3bZ7PY8.js} +1 -1
- package/dist/client/assets/{label-DNj28QS5.js → label-6eYPMIMn.js} +1 -1
- package/dist/client/assets/{layout-DN_hrCBE.js → layout-CTMgqxil.js} +1 -1
- package/dist/client/assets/{login-DeWd-DAB.js → login-s_mFeh5v.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D8kd56GU.js → mcp-oauth-HL_Y9nO8.js} +1 -1
- package/dist/client/assets/{members-CMLRo_zA.js → members-BL33Np9a.js} +1 -1
- package/dist/client/assets/{monaco-editor-Db_KtlDF.js → monaco-editor-B1MWJFdI.js} +1 -1
- package/dist/client/assets/monitoring-stats-row-CAKSC2D3.js +28 -0
- package/dist/client/assets/{multi-select-Dkp8_I-Q.js → multi-select--lKhvO-B.js} +1 -1
- package/dist/client/assets/{oauth-callback-o7bBsowp.js → oauth-callback-DCPcIBMz.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dj4JuuuW.js → oauth-callback-ai-provider-5L_Z_1xs.js} +1 -1
- package/dist/client/assets/{onboarding-DCxeX6Wn.js → onboarding-lSuasVhF.js} +1 -1
- package/dist/client/assets/{org-install-BGUWdrUX.js → org-install-BiDNis-e.js} +1 -1
- package/dist/client/assets/{org-layout-B1tOgtz6.js → org-layout-BxReJo9f.js} +1 -1
- package/dist/client/assets/{organization-choice-Bm8tTm8T.js → organization-choice-CJNcxP4s.js} +1 -1
- package/dist/client/assets/{orgs-Fb0PvU8Z.js → orgs-Dcte6nVl.js} +1 -1
- package/dist/client/assets/{page-seo-form-CH1lAwBC.js → page-seo-form-Q5I4DhzQ.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DJO-4Ve3.js +1 -0
- package/dist/client/assets/{popover-tA9PDjW1.js → popover--4QSfinM.js} +1 -1
- package/dist/client/assets/{post-editor-DX-lnsH9.js → post-editor-Y4xJXCQh.js} +1 -1
- package/dist/client/assets/{primitives-CAtuLkMY.js → primitives-BZ0jR3FH.js} +1 -1
- package/dist/client/assets/{profile-XmAUDAXJ.js → profile-BsKSKdiq.js} +1 -1
- package/dist/client/assets/project-app-view-BndTM51x.js +1 -0
- package/dist/client/assets/record-editor-BvebEElK.js +1 -0
- package/dist/client/assets/redirect-editor-DnWBgwhK.js +1 -0
- package/dist/client/assets/registry-Ci2-56YH.js +2 -0
- package/dist/client/assets/{registry-layout-BAA3FULf.js → registry-layout-BJ3nc_ht.js} +2 -2
- package/dist/client/assets/{reports-C7ATuCQR.js → reports-BNm1jTDx.js} +1 -1
- package/dist/client/assets/{require-capability-9TYWYZRa.js → require-capability-Bd1LXPXR.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DjUuTkxW.js → required-auth-layout-CLFVeE7_.js} +1 -1
- package/dist/client/assets/{reset-password-BjL0GpIh.js → reset-password-BtRqnFx3.js} +1 -1
- package/dist/client/assets/{roles-BR46OYWc.js → roles-BFfEI8kY.js} +1 -1
- package/dist/client/assets/{search-input-B38BWJHH.js → search-input-D9-x3yYV.js} +1 -1
- package/dist/client/assets/{secrets-6uwJ_dU6.js → secrets-Yg2E60R5.js} +1 -1
- package/dist/client/assets/{sections-editor-BqwcPQUc.js → sections-editor-b1Ixv47y.js} +1 -1
- package/dist/client/assets/{select-Bml7Rs0T.js → select-Bd-q1yCw.js} +1 -1
- package/dist/client/assets/{select-model-5SsfzBU3.js → select-model-K2oi5fLk.js} +1 -1
- package/dist/client/assets/{self-tool-result-Cha3UFDj.js → self-tool-result-BiEjz1Ry.js} +1 -1
- package/dist/client/assets/{seo-editor-CBtnVpDS.js → seo-editor-CdjtqxtA.js} +1 -1
- package/dist/client/assets/{settings-layout-CK7U4bD1.js → settings-layout-5c1plOIU.js} +1 -1
- package/dist/client/assets/{settings-section--qFkAAhx.js → settings-section-shb-u7Ue.js} +1 -1
- package/dist/client/assets/{shell-controls-HQgubU7I.js → shell-controls-BpqLtOsH.js} +1 -1
- package/dist/client/assets/{shell-layout-ChVVxyRA.js → shell-layout-BIqZZ6_U.js} +1 -1
- package/dist/client/assets/{sidebar-Da7wzFWC.js → sidebar-CfdFP1cX.js} +1 -1
- package/dist/client/assets/{skeleton-CFpB1jha.js → skeleton-BN44BcrT.js} +1 -1
- package/dist/client/assets/{sso-CGyGYtGf.js → sso-BXhJwgt8.js} +1 -1
- package/dist/client/assets/{store-BlxWaMnF.js → store-BKjhBvgx.js} +1 -1
- package/dist/client/assets/store-registry-g5R_VlWb.js +2 -0
- package/dist/client/assets/{studio-tools-Bjw0Jr43.js → studio-tools-BbXlY124.js} +1 -1
- package/dist/client/assets/{switch-C2Mm6_qS.js → switch-CuIkQ0ts.js} +1 -1
- package/dist/client/assets/{table-B2on39xb.js → table-BXIfO88i.js} +1 -1
- package/dist/client/assets/{tabs-TPHxWTyx.js → tabs-7EuH5ewS.js} +1 -1
- package/dist/client/assets/{textarea-Z5OnX3vK.js → textarea-COeZkp4P.js} +1 -1
- package/dist/client/assets/{toggle-group-Ex1OojBb.js → toggle-group-DuFTDXUv.js} +1 -1
- package/dist/client/assets/{toolbar-J4RI9xFD.js → toolbar-B6T3nvfB.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BPMkXTme.js → toolbar-icon-button-DzWXQwu7.js} +1 -1
- package/dist/client/assets/{tooltip-Di8Co4Sg.js → tooltip-8XxDCvjI.js} +1 -1
- package/dist/client/assets/{use-ai-providers-EAIs9V5s.js → use-ai-providers-CJ46O17u.js} +1 -1
- package/dist/client/assets/{use-automations-DuO6aGrd.js → use-automations-CX5x-Uqw.js} +1 -1
- package/dist/client/assets/{use-autosave-ZNRJmIC1.js → use-autosave-V0-E8XGy.js} +1 -1
- package/dist/client/assets/{use-capability-NLzcv---.js → use-capability-FmP_AGyE.js} +1 -1
- package/dist/client/assets/{use-clock-tick-B5ExQuB8.js → use-clock-tick-DNb1k8Bx.js} +1 -1
- package/dist/client/assets/{use-collections-Dz-cDGRH.js → use-collections-BUbpxhiU.js} +1 -1
- package/dist/client/assets/{use-connection-Tzw-gM9_.js → use-connection-Bk3dYNpt.js} +1 -1
- package/dist/client/assets/{use-copy-Dlp2drKX.js → use-copy-Cw847YgD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CXi0Nslh.js → use-create-virtual-mcp-BRbI72EV.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CIHnH-Z_.js → use-debounced-autosave-JeuWph6h.js} +1 -1
- package/dist/client/assets/{use-debounced-value--fL8uLzq.js → use-debounced-value-CNzGGbsu.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CbKP4RkY.js → use-deco-credits-B4BR0gFr.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-bEeBCG8g.js → use-decopilot-events-D28_JGgq.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DqqWPkeA.js → use-delete-connection-CjmQkOW1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DEHWWJw1.js → use-deployment-admin-Dyk7hBaE.js} +1 -1
- package/dist/client/assets/{use-file-configs-DJ9EWhri.js → use-file-configs-DL_xMbOi.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BXgYebaV.js → use-infinite-scroll-OAX5SxNS.js} +1 -1
- package/dist/client/assets/{use-join-requests-SiDEVOz4.js → use-join-requests-B3tUIQS3.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DaaoI_us.js → use-mcp-auth-status-CPftzmcf.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C8CUpc9I.js → use-mcp-client-FLTjUCG7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cb9NQ6Rf.js → use-mcp-tools-D2FBN-6Y.js} +1 -1
- package/dist/client/assets/{use-members-Cbq-KhlP.js → use-members-Dq8ZMPmz.js} +1 -1
- package/dist/client/assets/{use-mobile-jR7vc4lZ.js → use-mobile-DCYqAZ4D.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DJUvOfFB.js → use-navigate-to-agent-zGXO_gBb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DaulafqZ.js → use-org-auth-client-asYkCBii.js} +1 -1
- package/dist/client/assets/{use-org-sso-BYe3M43L.js → use-org-sso-DGvCB7c3.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BtvYl6eT.js → use-organization-roles-DNoMRyWZ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BZRqZCOI.js → use-organization-settings-vZiR9w_k.js} +1 -1
- package/dist/client/assets/{use-registry-app-CDi6-sFg.js → use-registry-app-DEcBrUWC.js} +1 -1
- package/dist/client/assets/{use-registry-connections-_izo0bxC.js → use-registry-connections-ZIIAN618.js} +1 -1
- package/dist/client/assets/{use-secrets-DUdJCh_2.js → use-secrets-BPGFw9d3.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BCav02M9.js → use-status-sounds-lae0TShH.js} +1 -1
- package/dist/client/assets/{use-view-mode-BPJ2wr8B.js → use-view-mode-CPvsHu0J.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BoNQ0wEI.js → use-virtual-mcp-qUMQTRyD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-sJT3Rp66.js +1 -0
- package/dist/client/assets/{useRouterState-Dn4czoAO.js → useRouterState-B99a8RMJ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QwMQXCnx.js +1 -0
- package/dist/client/assets/{users-BYNIJvAA.js → users-_WAywRSq.js} +1 -1
- package/dist/client/assets/{variant-calendar-BtFPRCWy.js → variant-calendar-DV02T715.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CRdEbwTX.js → view-mode-toggle-vOT0KHyw.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +470 -470
- package/dist/server/server.js +317 -317
- package/package.json +1 -1
- package/dist/client/assets/automations-BWjpI0nS.js +0 -1
- package/dist/client/assets/index-DY5BC5zx.js +0 -1
- package/dist/client/assets/monitoring-stats-row-9ZdejwGF.js +0 -28
- package/dist/client/assets/page-seo-sheet-CVotwhzI.js +0 -1
- package/dist/client/assets/project-app-view-BkKlOSPd.js +0 -1
- package/dist/client/assets/record-editor-BSKrfQSg.js +0 -1
- package/dist/client/assets/redirect-editor-C6-v5Dep.js +0 -1
- package/dist/client/assets/registry-Bv-r_l-Q.js +0 -2
- package/dist/client/assets/store-registry-wjNVj2Go.js +0 -2
- package/dist/client/assets/useInfiniteQuery-uUKZgZ1F.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BUWsAQNT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{C as bt,a as Fs,n as Wt,r as z,t as pt,ac as Bs,c as O,l as E,j as s,m as us,d as kt,K as Xt,B as ye,b as Rs,u as Ps,aX as Ms,i as ms}from"./index-BSxh64hl.js";import{g as Ne}from"./get-initials-D-f_fDFw.js";import{A as ve}from"./avatar-D8cqehrs.js";import{f as Jt,b as Ls,t as Us,d as fs,g as Gs,h as qs,j as It,c as ht,s as Ks,i as Hs,e as Qs,a as Ys}from"./UserPlus01-BuJJCUTQ.js";import{i as Vs}from"./List-DUr-xsD7.js";import{s as Zt}from"./Plus-BnnQdSS2.js";import{S as Ws,e as Xs,a as Js}from"./constants-BHDe7bIw.js";import{u as Zs,G as el}from"./use-registry-app-CDi6-sFg.js";import{d as xs,e as ps,a as gs,D as tl,h as sl,c as ll}from"./dialog-7Hh4EEds.js";import{b as nl,u as al}from"./use-connection-Tzw-gM9_.js";import{g as rl}from"./github-repo-scope-DjMZbiKa.js";import{u as il}from"./use-mcp-client-C8CUpc9I.js";import{a as ol}from"./authenticate-and-persist-oauth-DwbkuScw.js";import{e as cl}from"./extract-connection-data-CWqIHi--.js";import{u as hs}from"./use-members-Cbq-KhlP.js";import{u as es}from"./studio-tools-Bjw0Jr43.js";import{t as dl,T as ul,S as $e}from"./decopilot-sse-pool-CAAPJES7.js";import{u as ml}from"./use-decopilot-events-bEeBCG8g.js";import{a as fl}from"./format-time-BnbuEtat.js";import{i as bs}from"./AlertCircle-CasESeW6.js";import{i as js}from"./CheckCircle-C7IpeM2l.js";import{i as xl}from"./Circle-D9nZXcv9.js";import{s as pl}from"./Eye-CuMpXJkc.js";import{a as Tt,c as At,d as mt,D as zt}from"./dropdown-menu-BJz5vhZu.js";import{P as qt,b as Kt,a as Ht}from"./popover-tA9PDjW1.js";import{b as ys,C as Ns,a as ze,e as $t,d as vs,c as Ss}from"./command-DRdHD2LV.js";import{C as gl}from"./calendar-BstnI_Yr.js";import{u as hl}from"./use-copy-Dlp2drKX.js";import{i as bl}from"./Check-D3n4gRJc.js";import{i as jl}from"./ChevronRight-RInm-aVw.js";import{a as yl}from"./Copy01-D0NIZWk6.js";import{n as Nl}from"./LinkExternal01-0cXhXnwo.js";import{s as Qt}from"./User01-DDQH6RKB.js";import{i as ns}from"./X-C1Hb-T06.js";import{g as vl,b as Sl,e as Cl,f as wl,a as _l,D as Dl}from"./drawer-C9w90-t7.js";import{t as ts}from"./ChevronDown-D4DHAf0j.js";import{i as Cs}from"./FilterLines-CZAAcWWi.js";import{s as kl}from"./Flag01-DiSJyFcN.js";import{u as Il}from"./shell-layout-ChVVxyRA.js";import{u as Tl}from"./hooks-8LO2nFxS.js";import{w as Al}from"./autosend-4jNArwYp.js";import{u as zl}from"./use-organization-settings-BZRqZCOI.js";function $l(t){const{org:e}=bt(),{data:l}=Fs.useSession(),a=nl(),n=Wt(),r=il({connectionId:Ws,orgId:e.id,orgSlug:e.slug}),[o,i]=z.useState(!1),d=Zs(t,{enabled:!1});return{connect:async()=>{if(!(o||!l?.user?.id||!e)){i(!0);try{const f=d.data??(await d.refetch()).data;if(!f){pt.error("Could not find this integration in the registry");return}const p=cl(f,e.id,l.user.id,{remoteIndex:0});if(!p.connection_url){pt.error("This integration has no connection method available");return}const c=p.app_name?await El(r,p.app_name):null,m=!c,b=c?.id??(await a.create.mutateAsync(p)).id,x=await ol({connectionId:b,orgId:e.id,orgSlug:e.slug,persistFallback:j=>a.update.mutateAsync({id:b,data:{connection_token:j}}).then(()=>{})});if(x.ran&&!x.ok){if(m)try{await a.delete.mutateAsync(b)}catch{}pt.error(`Authentication failed: ${x.error??"no token"}`);return}Bs(n,e.id),pt.success(m?"Connected successfully":"Already connected")}catch(f){pt.error(`Failed to connect: ${f instanceof Error?f.message:String(f)}`)}finally{i(!1)}}},isConnecting:o}}async function El(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Ie(t){const e=O.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==a?(o=E("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==r||e[6]!==o?(i=s.jsx("img",{src:Xs,alt:"Super Agent",width:n,height:n,style:r,className:o}),e[4]=n,e[5]=r,e[6]=o,e[7]=i):i=e[7],i}const as=()=>0;function Ol(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,r=z.useRef(a);r.current=a;const o=z.useRef(n);o.current=n;const i=z.useRef(null),d=z.useRef(l),u=z.useRef(e);(!i.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,i.current=p=>{if(!l||!e)return()=>{};const c=m=>{let b;try{b=JSON.parse(m.data)}catch{return}b.data&&(m.type===ul?o.current?.(b.data.id):r.current(b.data)),p()};return dl.subscribe(e,c)}),z.useSyncExternalStore(i.current,as,as)}function Fl(){const t=O.c(27),{org:e,locator:l}=bt(),a=es(),n=Wt();let r;t[0]!==l?(r=Xt.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const o=r;let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=i):i=t[3];let d;t[4]!==o||t[5]!==i?(d={queryKey:o,queryFn:i},t[4]=o,t[5]=i,t[6]=d):d=t[6];const u=us(d);let f,p;t[7]!==n||t[8]!==o?(f=h=>{n.setQueryData(o,y=>{const g=y??[],N=h;return g.some(v=>v.id===N.id)?g.map(v=>v.id===N.id?N:v):[N,...g]})},p=h=>{n.setQueryData(o,y=>y?.filter(g=>g.id!==h))},t[7]=n,t[8]=o,t[9]=f,t[10]=p):(f=t[9],p=t[10]);let c;t[11]!==e.slug||t[12]!==f||t[13]!==p?(c={orgSlug:e.slug,onUpdate:f,onDelete:p},t[11]=e.slug,t[12]=f,t[13]=p,t[14]=c):c=t[14],Ol(c);let m;t[15]!==n||t[16]!==o?(m=h=>{const y=h.subject,g=h.data.status;n.setQueryData(o,N=>N?.map(v=>v.threads.some(w=>w.threadId===y)?{...v,threads:v.threads.map(w=>w.threadId===y?{...w,status:g}:w)}:v))},t[15]=n,t[16]=o,t[17]=m):m=t[17];let b;t[18]!==e.slug||t[19]!==m?(b={orgSlug:e.slug,onTaskStatus:m},t[18]=e.slug,t[19]=m,t[20]=b):b=t[20],ml(b);let x;t[21]!==u.data?(x=u.data??[],t[21]=u.data,t[22]=x):x=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==x?(j={items:x,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=x,t[26]=j):j=t[26],j}function Bl(){const t=O.c(36),{locator:e}=bt(),l=es(),a=Wt();let n;t[0]!==e?(n=Xt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let o;t[2]!==a||t[3]!==r?(o=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=o):o=t[4];const i=o;let d;t[5]!==l?(d=C=>l.call("TASK_BOARD_ITEM_CREATE",C),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==i||t[8]!==d?(u={mutationFn:d,onSuccess:i},t[7]=i,t[8]=d,t[9]=u):u=t[9];const f=kt(u);let p;t[10]!==l?(p=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[10]=l,t[11]=p):p=t[11];let c,m;t[12]!==a||t[13]!==r?(c=async C=>{await a.cancelQueries({queryKey:r});const _=a.getQueryData(r);return a.setQueryData(r,R=>R?.map(G=>G.id===C.id?{...G,...C}:G)),{previous:_}},m=(C,_,R)=>{R?.previous&&a.setQueryData(r,R.previous)},t[12]=a,t[13]=r,t[14]=c,t[15]=m):(c=t[14],m=t[15]);let b;t[16]!==i||t[17]!==p||t[18]!==c||t[19]!==m?(b={mutationFn:p,onMutate:c,onError:m,onSettled:i},t[16]=i,t[17]=p,t[18]=c,t[19]=m,t[20]=b):b=t[20];const x=kt(b);let j;t[21]!==l?(j=C=>l.call("TASK_BOARD_ITEM_DELETE",{id:C}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==i||t[24]!==j?(h={mutationFn:j,onSuccess:i},t[23]=i,t[24]=j,t[25]=h):h=t[25];const y=kt(h);let g;t[26]!==l?(g=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[26]=l,t[27]=g):g=t[27];let N;t[28]!==i||t[29]!==g?(N={mutationFn:g,onSuccess:i},t[28]=i,t[29]=g,t[30]=N):N=t[30];const v=kt(N);let w;return t[31]!==f||t[32]!==v||t[33]!==y||t[34]!==x?(w={create:f,update:x,remove:y,link:v},t[31]=f,t[32]=v,t[33]=y,t[34]=x,t[35]=w):w=t[35],w}function Yt(t){return t.threads.some(e=>e.status==="requires_action")}function Rl(t){return t.threads[0]}const ws=["triage","todo","in_progress","in_review","done"],je={triage:{label:"Backlog",icon:bs,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:xl,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Jt,iconClassName:"text-primary"},in_review:{label:"In Review",icon:pl,iconClassName:"text-warning"},done:{label:"Done",icon:js,iconClassName:"text-success"}},_s=["none","low","medium","high","urgent"],Se={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Pl(t){const e=O.c(10),{locator:l}=bt(),a=es();let n;e[0]!==t||e[1]!==l?(n=Xt.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const r=!!t;let o;e[3]!==t||e[4]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==r||e[8]!==o?(i={queryKey:n,enabled:r,queryFn:o},e[6]=n,e[7]=r,e[8]=o,e[9]=i):i=e[9],us(i)}function Ml(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function rs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ll=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),gt="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Ul={failed:{label:"Error",className:"text-destructive",icon:Gs},requires_action:{label:"Needs input",className:"text-warning",icon:fs},in_progress:{label:"Running",className:"text-primary",icon:Jt,spin:!0},completed:{label:"Completed",className:"text-success",icon:js},expired:{label:"Expired",className:"text-muted-foreground",icon:bs}};function Gl(t){const e=O.c(188),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:o,onDelete:i,onOpenThread:d,onNewChat:u,isSaving:f}=t,{data:p}=hs(),c=p?.data?.members??[],{handleCopy:m,copied:b}=hl(),[x,j]=z.useState(n?.title??""),[h,y]=z.useState(n?.description??""),[g,N]=z.useState(n?.status??r??"triage"),[v,w]=z.useState(n?.priority??"medium"),[C,_]=z.useState(n?.assigneeId??null),R=n?.dueDate;let G;e[0]!==R?(G=rs(R),e[0]=R,e[1]=G):G=e[1];const[A,P]=z.useState(G),[se,L]=z.useState(!1),[U,$]=z.useState(!1);let H;e[2]!==r||e[3]!==n?.assigneeId||e[4]!==n?.description||e[5]!==n?.dueDate||e[6]!==n?.priority||e[7]!==n?.status||e[8]!==n?.title||e[9]!==_||e[10]!==P?(H=()=>{j(n?.title??""),y(n?.description??""),N(n?.status??r??"triage"),w(n?.priority??"medium"),_(n?.assigneeId??null),P(rs(n?.dueDate))},e[2]=r,e[3]=n?.assigneeId,e[4]=n?.description,e[5]=n?.dueDate,e[6]=n?.priority,e[7]=n?.status,e[8]=n?.title,e[9]=_,e[10]=P,e[11]=H):H=e[11];const Q=H;let Y;e[12]!==a||e[13]!==Q?(Y=()=>{a(),Q()},e[12]=a,e[13]=Q,e[14]=Y):Y=e[14];const D=Y;let F;e[15]!==C||e[16]!==h||e[17]!==A||e[18]!==o||e[19]!==v||e[20]!==g||e[21]!==x?(F=()=>{const S=x.trim();S&&o({title:S,description:h.trim()||null,status:g,priority:v,assigneeId:C,dueDate:A?Ml(A):null})},e[15]=C,e[16]=h,e[17]=A,e[18]=o,e[19]=v,e[20]=g,e[21]=x,e[22]=F):F=e[22];const I=F,T=C===$e;let q;e[23]!==C?(q=S=>S.userId===C,e[23]=C,e[24]=q):q=e[24];const K=c.find(q),M=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,me=je[g].icon,le=ps;let fe;e[25]!==D?(fe=S=>!S&&D(),e[25]=D,e[26]=fe):fe=e[26];const Te=xs,ft="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",xt="hidden",xe=n?"Edit task":"New task";let X;e[27]!==xe?(X=s.jsx(gs,{className:"sr-only",children:xe}),e[27]=xe,e[28]=X):X=e[28];let ne;e[29]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(ns,{size:16}),e[29]=ne):ne=e[29];let J;e[30]!==D?(J=s.jsx("button",{type:"button","aria-label":"Close",onClick:D,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ne}),e[30]=D,e[31]=J):J=e[31];const Ce="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ae;e[32]===Symbol.for("react.memo_cache_sentinel")?(ae=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[32]=ae):ae=e[32];let re;e[33]!==x?(re=s.jsx("textarea",{ref:Kl,value:x,onChange:ae,onKeyDown:ql,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[33]=x,e[34]=re):re=e[34];let B;e[35]===Symbol.for("react.memo_cache_sentinel")?(B=S=>y(S.target.value),e[35]=B):B=e[35];let V;e[36]!==h?(V=s.jsx("textarea",{value:h,onChange:B,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[36]=h,e[37]=V):V=e[37];let W;e[38]!==b||e[39]!==h||e[40]!==m?(W=h&&s.jsx(ye,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>m(h),children:b?s.jsx(bl,{size:14}):s.jsx(yl,{size:14})}),e[38]=b,e[39]=h,e[40]=m,e[41]=W):W=e[41];let pe;e[42]!==V||e[43]!==W?(pe=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[V,W]}),e[42]=V,e[43]=W,e[44]=pe):pe=e[44];const we=n&&n.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:n.threads.map(S=>s.jsx(Hl,{thread:S,startedBy:M??K,onOpen:d},S.threadId))});let _e;e[45]!==n?(_e=n?.id&&s.jsx(Vl,{itemId:n.id}),e[45]=n,e[46]=_e):_e=e[46];let ie;e[47]!==re||e[48]!==pe||e[49]!==we||e[50]!==_e?(ie=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[re,pe,we,_e]}),e[47]=re,e[48]=pe,e[49]=we,e[50]=_e,e[51]=ie):ie=e[51];const ls="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let be;e[52]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[52]=be):be=e[52];const Ee="flex flex-wrap gap-2 sm:flex-col",De=je[g];let Z;e[53]!==me||e[54]!==De.iconClassName?(Z=s.jsx(me,{size:16,className:De.iconClassName}),e[53]=me,e[54]=De.iconClassName,e[55]=Z):Z=e[55];const Ae=je[g];let oe;e[56]!==Z||e[57]!==Ae.label?(oe=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:gt,children:[Z,Ae.label]})}),e[56]=Z,e[57]=Ae.label,e[58]=oe):oe=e[58];let ce;e[59]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(At,{align:"start",className:"w-44",children:ws.map(S=>{const he=je[S].icon;return s.jsxs(mt,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(he,{size:16,className:je[S].iconClassName}),je[S].label]},S)})}),e[59]=ce):ce=e[59];let ge;e[60]!==oe?(ge=s.jsxs(zt,{children:[oe,ce]}),e[60]=oe,e[61]=ge):ge=e[61];const ke=v==="none"&&"text-muted-foreground";let ee;e[62]!==ke?(ee=E(gt,ke),e[62]=ke,e[63]=ee):ee=e[63];let te;e[64]!==v?(te=v==="none"?s.jsxs(s.Fragment,{children:[s.jsx(Ls,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:E("size-2 rounded-full",Se[v].dotClassName)}),Se[v].label]}),e[64]=v,e[65]=te):te=e[65];let de;e[66]!==ee||e[67]!==te?(de=s.jsx(Tt,{asChild:!0,children:s.jsx("button",{type:"button",className:ee,children:te})}),e[66]=ee,e[67]=te,e[68]=de):de=e[68];let ue;e[69]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(At,{align:"start",className:"w-40",children:_s.map(S=>s.jsxs(mt,{onSelect:()=>w(S),children:[s.jsx("span",{className:E("size-2 rounded-full",Se[S].dotClassName)}),Se[S].label]},S))}),e[69]=ue):ue=e[69];let k;e[70]!==de?(k=s.jsxs(zt,{children:[de,ue]}),e[70]=de,e[71]=k):k=e[71];const Ft="flex flex-col",Bt=Kt,$s=!0,Rt=qt,Es=!0,Os="button",Pt=!C&&"text-muted-foreground";let Oe;e[72]!==Pt?(Oe=E(gt,Pt),e[72]=Pt,e[73]=Oe):Oe=e[73];const Mt=T&&M?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:M.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Ie,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):T?s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16}),"Super Agent"]}):K?s.jsxs(s.Fragment,{children:[s.jsx(ve,{url:K.user?.image??void 0,fallback:Ne(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Us,{size:16,className:"text-muted-foreground"}),"Assign"]});let Fe;e[74]!==Oe||e[75]!==Mt?(Fe=s.jsx("button",{type:Os,className:Oe,children:Mt}),e[74]=Oe,e[75]=Mt,e[76]=Fe):Fe=e[76];let Be;e[77]!==Rt||e[78]!==Fe?(Be=s.jsx(Rt,{asChild:Es,children:Fe}),e[77]=Rt,e[78]=Fe,e[79]=Be):Be=e[79];let jt;e[80]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(ys,{placeholder:"Assign to…",className:"h-9"}),e[80]=jt):jt=e[80];let yt;e[81]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(Ns,{children:"No members found."}),e[81]=yt):yt=e[81];let Re;e[82]!==_||e[83]!==$?(Re=()=>{_($e),$(!1)},e[82]=_,e[83]=$,e[84]=Re):Re=e[84];let Nt,vt;e[85]===Symbol.for("react.memo_cache_sentinel")?(Nt=s.jsx(Ie,{size:16}),vt=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[85]=Nt,e[86]=vt):(Nt=e[85],vt=e[86]);let Pe;e[87]!==Re?(Pe=s.jsxs(ze,{value:"Super Agent",onSelect:Re,className:"gap-2",children:[Nt,vt]}),e[87]=Re,e[88]=Pe):Pe=e[88];let Me;e[89]!==_||e[90]!==$?(Me=()=>{_(null),$(!1)},e[89]=_,e[90]=$,e[91]=Me):Me=e[91];let St,Ct;e[92]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),Ct=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[92]=St,e[93]=Ct):(St=e[92],Ct=e[93]);let Le;e[94]!==Me?(Le=s.jsxs(ze,{value:"Unassigned",onSelect:Me,className:"gap-2",children:[St,Ct]}),e[94]=Me,e[95]=Le):Le=e[95];let Ue;e[96]!==Pe||e[97]!==Le?(Ue=s.jsxs($t,{children:[Pe,Le]}),e[96]=Pe,e[97]=Le,e[98]=Ue):Ue=e[98];let Ge;if(e[99]!==c||e[100]!==_||e[101]!==$){let S;e[103]!==_||e[104]!==$?(S=he=>s.jsxs(ze,{value:he.user?.name??he.userId,onSelect:()=>{_(he.userId),$(!1)},className:"gap-2",children:[s.jsx(ve,{url:he.user?.image??void 0,fallback:Ne(he.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:he.user?.name??he.userId})]},he.userId),e[103]=_,e[104]=$,e[105]=S):S=e[105],Ge=c.map(S),e[99]=c,e[100]=_,e[101]=$,e[102]=Ge}else Ge=e[102];let qe;e[106]!==Ge?(qe=s.jsx($t,{heading:"Members",children:Ge}),e[106]=Ge,e[107]=qe):qe=e[107];let Ke;e[108]!==Ue||e[109]!==qe?(Ke=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[jt,s.jsxs(Ss,{children:[yt,Ue,qe]})]})}),e[108]=Ue,e[109]=qe,e[110]=Ke):Ke=e[110];let He;e[111]!==Bt||e[112]!==U||e[113]!==$||e[114]!==Be||e[115]!==Ke?(He=s.jsxs(Bt,{open:U,onOpenChange:$,modal:$s,children:[Be,Ke]}),e[111]=Bt,e[112]=U,e[113]=$,e[114]=Be,e[115]=Ke,e[116]=He):He=e[116];let Qe;e[117]!==M||e[118]!==T?(Qe=T&&M&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:E(gt,"pointer-events-none"),children:[s.jsx(Ie,{size:16}),"Super Agent"]})]}),e[117]=M,e[118]=T,e[119]=Qe):Qe=e[119];let Ye;e[120]!==He||e[121]!==Qe?(Ye=s.jsxs("div",{className:Ft,children:[He,Qe]}),e[120]=He,e[121]=Qe,e[122]=Ye):Ye=e[122];const Lt=!A&&"text-muted-foreground";let Ve;e[123]!==Lt?(Ve=E(gt,Lt),e[123]=Lt,e[124]=Ve):Ve=e[124];let wt;e[125]===Symbol.for("react.memo_cache_sentinel")?(wt=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[125]=wt):wt=e[125];let We;e[126]!==A?(We=A?Ll.format(A):"Due date",e[126]=A,e[127]=We):We=e[127];let Xe;e[128]!==A||e[129]!==P?(Xe=A&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),P(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),P(null))},children:s.jsx(ns,{size:12})}),e[128]=A,e[129]=P,e[130]=Xe):Xe=e[130];let Je;e[131]!==Ve||e[132]!==We||e[133]!==Xe?(Je=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ve,children:[wt,We,Xe]})}),e[131]=Ve,e[132]=We,e[133]=Xe,e[134]=Je):Je=e[134];const Ut=A??void 0;let Ze;e[135]!==P||e[136]!==L?(Ze=S=>{P(S??null),S&&L(!1)},e[135]=P,e[136]=L,e[137]=Ze):Ze=e[137];let et;e[138]!==Ut||e[139]!==Ze?(et=s.jsx(Ht,{className:"w-auto p-0",align:"start",children:s.jsx(gl,{mode:"single",selected:Ut,onSelect:Ze,initialFocus:!0})}),e[138]=Ut,e[139]=Ze,e[140]=et):et=e[140];let tt;e[141]!==se||e[142]!==L||e[143]!==Je||e[144]!==et?(tt=s.jsxs(Kt,{open:se,onOpenChange:L,children:[Je,et]}),e[141]=se,e[142]=L,e[143]=Je,e[144]=et,e[145]=tt):tt=e[145];let st;e[146]!==ge||e[147]!==k||e[148]!==Ye||e[149]!==tt?(st=s.jsxs("div",{className:Ee,children:[ge,k,Ye,tt]}),e[146]=ge,e[147]=k,e[148]=Ye,e[149]=tt,e[150]=st):st=e[150];let lt;e[151]!==be||e[152]!==st?(lt=s.jsxs("div",{className:ls,children:[be,st]}),e[151]=be,e[152]=st,e[153]=lt):lt=e[153];let nt;e[154]!==ie||e[155]!==lt?(nt=s.jsxs("div",{className:Ce,children:[ie,lt]}),e[154]=ie,e[155]=lt,e[156]=nt):nt=e[156];let at;e[157]!==n||e[158]!==i?(at=n&&i?s.jsx(ye,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:i,children:s.jsx(Ks,{size:16})}):s.jsx("span",{}),e[157]=n,e[158]=i,e[159]=at):at=e[159];let rt;e[160]!==n||e[161]!==u?(rt=n&&u&&s.jsxs(ye,{variant:"outline",size:"sm",onClick:u,children:[s.jsx(Hs,{size:16}),"New chat"]}),e[160]=n,e[161]=u,e[162]=rt):rt=e[162];let it;e[163]!==f||e[164]!==x?(it=!x.trim()||f,e[163]=f,e[164]=x,e[165]=it):it=e[165];let _t;e[166]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Zt,{size:16}),e[166]=_t):_t=e[166];const Gt=n?"Save":"Create task";let ot;e[167]!==I||e[168]!==it||e[169]!==Gt?(ot=s.jsxs(ye,{size:"sm",disabled:it,onClick:I,children:[_t,Gt]}),e[167]=I,e[168]=it,e[169]=Gt,e[170]=ot):ot=e[170];let ct;e[171]!==rt||e[172]!==ot?(ct=s.jsxs("div",{className:"flex items-center gap-2",children:[rt,ot]}),e[171]=rt,e[172]=ot,e[173]=ct):ct=e[173];let dt;e[174]!==at||e[175]!==ct?(dt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[at,ct]}),e[174]=at,e[175]=ct,e[176]=dt):dt=e[176];let ut;e[177]!==Te||e[178]!==X||e[179]!==J||e[180]!==nt||e[181]!==dt?(ut=s.jsxs(Te,{className:ft,closeButtonClassName:xt,children:[X,J,nt,dt]}),e[177]=Te,e[178]=X,e[179]=J,e[180]=nt,e[181]=dt,e[182]=ut):ut=e[182];let Dt;return e[183]!==le||e[184]!==l||e[185]!==fe||e[186]!==ut?(Dt=s.jsx(le,{open:l,onOpenChange:fe,children:ut}),e[183]=le,e[184]=l,e[185]=fe,e[186]=ut,e[187]=Dt):Dt=e[187],Dt}function ql(t){t.key==="Enter"&&t.preventDefault()}function Kl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Hl(t){const e=O.c(16),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Ul[l.status]:null,o=l.lastMessage;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16}),e[0]=i):i=e[0];const d=l.title||"Super Agent";let u;e[1]!==d?(u=s.jsx("span",{className:"truncate text-sm text-foreground",children:d}),e[1]=d,e[2]=u):u=e[2];let f;e[3]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ve,{url:a.user?.image??void 0,fallback:Ne(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[3]=a,e[4]=f):f=e[4];let p;e[5]!==u||e[6]!==f?(p=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[i,u,f]}),e[5]=u,e[6]=f,e[7]=p):p=e[7];let c;e[8]!==o||e[9]!==n||e[10]!==r||e[11]!==l?(c=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:E("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:E(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),o&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:o}),n&&s.jsx(jl,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[8]=o,e[9]=n,e[10]=r,e[11]=l,e[12]=c):c=e[12];let m;return e[13]!==p||e[14]!==c?(m=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[p,c]}),e[13]=p,e[14]=c,e[15]=m):m=e[15],m}function Ql(t){return t.merged?{label:"Merged",className:"text-special",icon:qs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:It}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:It}:{label:"Open",className:"text-success",icon:It}}function Yl(t){const e=O.c(38),{pr:l}=t;let a,n,r,o,i,d,u,f;if(e[0]!==l){n=Ql(l);let v;e[9]!==l.body?(v=l.body?.trim(),e[9]=l.body,e[10]=v):v=e[10],a=v,i=l.url,d="_blank",u="noreferrer",f="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",o="flex items-center gap-2",r=E("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=r,e[4]=o,e[5]=i,e[6]=d,e[7]=u,e[8]=f}else a=e[1],n=e[2],r=e[3],o=e[4],i=e[5],d=e[6],u=e[7],f=e[8];let p;e[11]!==n.icon?(p=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=p):p=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let m;e[15]!==r||e[16]!==p||e[17]!==c?(m=s.jsxs("span",{className:r,children:[p,c]}),e[15]=r,e[16]=p,e[17]=c,e[18]=m):m=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let x;e[19]!==b?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=x):x=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Nl,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let y;e[24]!==x||e[25]!==j||e[26]!==o||e[27]!==m?(y=s.jsxs("span",{className:o,children:[m,x,j,h]}),e[24]=x,e[25]=j,e[26]=o,e[27]=m,e[28]=y):y=e[28];let g;e[29]!==a?(g=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=g):g=e[30];let N;return e[31]!==y||e[32]!==g||e[33]!==i||e[34]!==d||e[35]!==u||e[36]!==f?(N=s.jsxs("a",{href:i,target:d,rel:u,className:f,children:[y,g]}),e[31]=y,e[32]=g,e[33]=i,e[34]=d,e[35]=u,e[36]=f,e[37]=N):N=e[37],N}function Vl(t){const e=O.c(5),{itemId:l}=t,{data:a,isLoading:n}=Pl(l);if(!n&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=r):r=e[0];let o;e[1]!==a?(o=a?a.map(Wl):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Jt,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=o):o=e[2];let i;return e[3]!==o?(i=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[r,o]}),e[3]=o,e[4]=i):i=e[4],i}function Wl(t){return s.jsx(Yl,{pr:t},t.url)}const Vt="__unassigned__",Et={assignee:null,priority:null,due:null};function Xl(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Jl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Zl=864e5;function en(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function tn(t,e){if(e.assignee!==null){if(e.assignee===Vt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!en(l,a)||e.due==="week"&&(l<a||l>a+7*Zl))return!1}return!0}const is=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function Ot(t,e=!1){return E("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function sn(t){const e=O.c(62),{value:l,members:a,onChange:n,block:r}=t,[o,i]=z.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,f="Assignee";if(l===Vt)f="Unassigned";else if(l===$e){let D;e[1]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ie,{size:14}),e[1]=D):D=e[1],u=D,f="Super Agent"}else if(l){let D,F,I,T;if(e[2]!==a||e[3]!==l){let K;e[8]!==l?(K=M=>M.userId===l,e[8]=l,e[9]=K):K=e[9],F=a.find(K),D=ve,I=F?.user?.image??void 0,T=Ne(F?.user?.name),e[2]=a,e[3]=l,e[4]=D,e[5]=F,e[6]=I,e[7]=T}else D=e[4],F=e[5],I=e[6],T=e[7];let q;e[10]!==D||e[11]!==I||e[12]!==T?(q=s.jsx(D,{url:I,fallback:T,shape:"circle",size:"2xs"}),e[10]=D,e[11]=I,e[12]=T,e[13]=q):q=e[13],u=q,f=F?.user?.name??"Member"}let p;e[14]!==n?(p=D=>{n(D),i(!1)},e[14]=n,e[15]=p):p=e[15];const c=p,m=l!==null;let b;e[16]!==r||e[17]!==m?(b=Ot(m,r),e[16]=r,e[17]=m,e[18]=b):b=e[18];const x=b,j=r&&"ml-auto";let h;e[19]!==j?(h=E("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const y=h;let g;e[21]!==f?(g=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[21]=f,e[22]=g):g=e[22];let N;e[23]!==y?(N=s.jsx(ts,{size:12,className:y}),e[23]=y,e[24]=N):N=e[24];let v;e[25]!==u||e[26]!==g||e[27]!==N||e[28]!==x?(v=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:x,children:[u,g,N]})}),e[25]=u,e[26]=g,e[27]=N,e[28]=x,e[29]=v):v=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ys,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ns,{children:"No members found."}),e[31]=C):C=e[31];let _;e[32]!==c?(_=s.jsx(ze,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=_):_=e[33];let R;e[34]!==c?(R=()=>c(Vt),e[34]=c,e[35]=R):R=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[36]=G):G=e[36];let A;e[37]!==R?(A=s.jsxs(ze,{value:"Unassigned",onSelect:R,className:"gap-2",children:[G,"Unassigned"]}),e[37]=R,e[38]=A):A=e[38];let P;e[39]!==c?(P=()=>c($e),e[39]=c,e[40]=P):P=e[40];let se;e[41]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Ie,{size:16}),e[41]=se):se=e[41];let L;e[42]!==P?(L=s.jsxs(ze,{value:"Super Agent",onSelect:P,className:"gap-2",children:[se,"Super Agent"]}),e[42]=P,e[43]=L):L=e[43];let U;e[44]!==_||e[45]!==A||e[46]!==L?(U=s.jsxs($t,{children:[_,A,L]}),e[44]=_,e[45]=A,e[46]=L,e[47]=U):U=e[47];let $;if(e[48]!==a||e[49]!==c){let D;e[51]!==c?(D=F=>s.jsxs(ze,{value:F.user?.name??F.userId,onSelect:()=>c(F.userId),className:"gap-2",children:[s.jsx(ve,{url:F.user?.image??void 0,fallback:Ne(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??F.userId})]},F.userId),e[51]=c,e[52]=D):D=e[52],$=a.map(D),e[48]=a,e[49]=c,e[50]=$}else $=e[50];let H;e[53]!==$?(H=s.jsx($t,{heading:"Members",children:$}),e[53]=$,e[54]=H):H=e[54];let Q;e[55]!==U||e[56]!==H?(Q=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[w,s.jsxs(Ss,{children:[C,U,H]})]})}),e[55]=U,e[56]=H,e[57]=Q):Q=e[57];let Y;return e[58]!==o||e[59]!==Q||e[60]!==v?(Y=s.jsxs(Kt,{open:o,onOpenChange:i,children:[v,Q]}),e[58]=o,e[59]=Q,e[60]=v,e[61]=Y):Y=e[61],Y}function ln(t){const e=O.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let o;e[0]!==n||e[1]!==r?(o=Ot(r,n),e[0]=n,e[1]=r,e[2]=o):o=e[2];const i=o,d=n&&"ml-auto";let u;e[3]!==d?(u=E("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const f=u;let p;e[5]!==l?(p=l?s.jsx("span",{className:E("size-2 shrink-0 rounded-full",Se[l].dotClassName)}):s.jsx(kl,{size:14,className:"shrink-0"}),e[5]=l,e[6]=p):p=e[6];const c=l?Se[l].label:"Priority";let m;e[7]!==f?(m=s.jsx(ts,{size:12,className:f}),e[7]=f,e[8]=m):m=e[8];let b;e[9]!==p||e[10]!==c||e[11]!==m||e[12]!==i?(b=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:i,children:[p,c,m]})}),e[9]=p,e[10]=c,e[11]=m,e[12]=i,e[13]=b):b=e[13];let x,j;e[14]!==a?(j=s.jsx(mt,{onSelect:()=>a(null),children:"Any priority"}),x=_s.map(g=>s.jsxs(mt,{onSelect:()=>a(g),className:"gap-2",children:[s.jsx("span",{className:E("size-2 rounded-full",Se[g].dotClassName)}),Se[g].label]},g)),e[14]=a,e[15]=x,e[16]=j):(x=e[15],j=e[16]);let h;e[17]!==x||e[18]!==j?(h=s.jsxs(At,{align:"start",className:"w-40",children:[j,x]}),e[17]=x,e[18]=j,e[19]=h):h=e[19];let y;return e[20]!==h||e[21]!==b?(y=s.jsxs(zt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=y):y=e[22],y}function nn(t){const e=O.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=is.find(C=>C.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const o=r,i=l!==null;let d;e[2]!==n||e[3]!==i?(d=Ot(i,n),e[2]=n,e[3]=i,e[4]=d):d=e[4];const u=d,f=n&&"ml-auto";let p;e[5]!==f?(p=E("shrink-0 opacity-60",f),e[5]=f,e[6]=p):p=e[6];const c=p;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ht,{size:14,className:"shrink-0"}),e[7]=m):m=e[7];const b=o??"Due date";let x;e[8]!==c?(x=s.jsx(ts,{size:12,className:c}),e[8]=c,e[9]=x):x=e[9];let j;e[10]!==b||e[11]!==x||e[12]!==u?(j=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[m,b,x]})}),e[10]=b,e[11]=x,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[16]=y):y=e[16];let g;e[17]!==h?(g=s.jsxs(mt,{onSelect:h,className:"gap-2",children:[y,"Any time"]}),e[17]=h,e[18]=g):g=e[18];let N;e[19]!==a?(N=is.map(C=>{const _=C.value==="overdue";return s.jsxs(mt,{onSelect:()=>a(C.value),className:E("gap-2",_&&"text-destructive"),children:[s.jsx(ht,{size:16,className:E("shrink-0",_?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==g||e[22]!==N?(v=s.jsxs(At,{align:"start",className:"w-44",children:[g,N]}),e[21]=g,e[22]=N,e[23]=v):v=e[23];let w;return e[24]!==v||e[25]!==j?(w=s.jsxs(zt,{children:[j,v]}),e[24]=v,e[25]=j,e[26]=w):w=e[26],w}function Ds(t){const e=O.c(26),{filters:l,members:a,onChange:n,block:r}=t;let o;e[0]!==l||e[1]!==n?(o=m=>n({...l,assignee:m}),e[0]=l,e[1]=n,e[2]=o):o=e[2];let i;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==o?(i=s.jsx(sn,{block:r,value:l.assignee,members:a,onChange:o}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=o,e[7]=i):i=e[7];let d;e[8]!==l||e[9]!==n?(d=m=>n({...l,priority:m}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==r||e[12]!==l.priority||e[13]!==d?(u=s.jsx(ln,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==n?(f=m=>n({...l,due:m}),e[15]=l,e[16]=n,e[17]=f):f=e[17];let p;e[18]!==r||e[19]!==l.due||e[20]!==f?(p=s.jsx(nn,{block:r,value:l.due,onChange:f}),e[18]=r,e[19]=l.due,e[20]=f,e[21]=p):p=e[21];let c;return e[22]!==i||e[23]!==u||e[24]!==p?(c=s.jsxs(s.Fragment,{children:[i,u,p]}),e[22]=i,e[23]=u,e[24]=p,e[25]=c):c=e[25],c}function an(t){const e=O.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Cs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let o;e[1]!==l||e[2]!==a||e[3]!==n?(o=s.jsx(Ds,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=o):o=e[4];let i;e[5]!==l||e[6]!==n?(i=Xl(l)&&s.jsx("button",{type:"button",onClick:()=>n(Et),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=i):i=e[7];let d;return e[8]!==o||e[9]!==i?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,o,i]}),e[8]=o,e[9]=i,e[10]=d):d=e[10],d}function rn(t){const e=O.c(26),{filters:l,members:a,onChange:n}=t,[r,o]=z.useState(!1),i=Jl(l),d=i>0;let u;e[0]!==d?(u=Ot(d),e[0]=d,e[1]=u):u=e[1];const f=u;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Cs,{size:14,className:"shrink-0"}),e[2]=p):p=e[2];let c;e[3]!==i?(c=i>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:i}),e[3]=i,e[4]=c):c=e[4];let m;e[5]!==c||e[6]!==f?(m=s.jsx(vl,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[p,"Filters",c]})}),e[5]=c,e[6]=f,e[7]=m):m=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Sl,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let x;e[9]!==l||e[10]!==a||e[11]!==n?(x=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ds,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=x):x=e[12];let j;e[13]!==i||e[14]!==n?(j=i>0&&s.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>n(Et),children:"Clear all"}),e[13]=i,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Cl,{asChild:!0,children:s.jsx(ye,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let y;e[17]!==j?(y=s.jsxs(wl,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=y):y=e[18];let g;e[19]!==y||e[20]!==x?(g=s.jsxs(_l,{className:"p-0",children:[b,x,y]}),e[19]=y,e[20]=x,e[21]=g):g=e[21];let N;return e[22]!==r||e[23]!==g||e[24]!==m?(N=s.jsxs(Dl,{open:r,onOpenChange:o,direction:"bottom",children:[m,g]}),e[22]=r,e[23]=g,e[24]=m,e[25]=N):N=e[25],N}const os=380,on=90,cs=5,cn="cubic-bezier(0.22, 0.61, 0.36, 1)",dn=8;function un(t,e){const l=z.useRef(new Map);z.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,o=new Map,i=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const m=c.dataset.flipId;if(!m)continue;const b=c.getBoundingClientRect();o.set(m,b);const x=r.get(m);if(!x)continue;const j=x.left-b.left,h=x.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>dn})}if(l.current=o,i||d.length===0)return;for(const c of d){const m=c.lane?` rotate(${c.dx>0?cs:-cs}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${m}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const f=[],p=requestAnimationFrame(()=>{for(const c of d){const m=c.lane?u++*on:0;c.el.style.transition=`transform ${os}ms ${cn} ${m}ms`,c.el.style.transform="",f.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},os+m+30))}});return()=>{cancelAnimationFrame(p);for(const c of f)clearTimeout(c)}},[e,t])}Ms(()=>import("./index-q_ZBGy7p.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157])).catch(()=>{});function mn(){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(zs,{})})})}),t[0]=e):e=t[0],e}const fn=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function xn(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:fn.format(e),overdue:l}}const ss="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function ks(){const t=O.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=E(ss,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(fs,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function Is(t){const e=O.c(7),{priority:l}=t,a=Se[l];let n;e[0]!==a.dotClassName?(n=E("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a.label||e[5]!==r?(o=s.jsxs("span",{className:ss,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=o):o=e[6],o}function Ts(t){const e=O.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:i,overdue:d}=xn(l);a=i,n=E(ss,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ht,{size:14}),e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==n?(o=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=o):o=e[6],o}function As(t){const e=O.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===$e){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let o;e[0]!==n?(o=n&&s.jsx(ve,{url:n.user?.image??void 0,fallback:Ne(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16,className:"ring-2 ring-background"}),e[2]=i):i=e[2];let d;return e[3]!==r||e[4]!==o?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[o,i]}),e[3]=r,e[4]=o,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,o=a.user?.name;let i;e[6]!==o?(i=Ne(o),e[6]=o,e[7]=i):i=e[7];let d;return e[8]!==r||e[9]!==i?(d=s.jsx(ve,{url:r,fallback:i,shape:"circle",size:"2xs"}),e[8]=r,e[9]=i,e[10]=d):d=e[10],d}return null}function zs(){const t=O.c(102),{items:e,isLoading:l}=Fl(),a=Bl(),n=zl();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const o=al(r);let i;t[1]!==o?(i=rl(o),t[1]=o,t[2]=i):i=t[2];const d=i.length>0,[u,f]=z.useState(!1),{data:p}=hs();let c,m;t[3]!==p?.data?.members?(c=p?.data?.members??[],m=new Map(c.map(pn)),t[3]=p?.data?.members,t[4]=c,t[5]=m):(c=t[4],m=t[5]);const b=m,[x,j]=z.useState("board"),[h,y]=z.useState(Et),[g,N]=z.useState(!1),[v,w]=z.useState(null),[C,_]=z.useState(null),{setTaskId:R}=Il(),{create:G}=Tl(),{org:A,locator:P}=bt(),se=Rs();let L;t[6]===Symbol.for("react.memo_cache_sentinel")?(L={strict:!1},t[6]=L):L=t[6];const{task:U}=Ps(L);let $;t[7]!==U||t[8]!==e?($=U?e.find(B=>B.id===U)??null:null,t[7]=U,t[8]=e,t[9]=$):$=t[9];const H=$;let Q;t[10]!==U||t[11]!==se||t[12]!==A?(Q=()=>{U&&se({to:"/$org/board",params:{org:A.slug},search:{},replace:!0})},t[10]=U,t[11]=se,t[12]=A,t[13]=Q):Q=t[13];const Y=Q;let D;t[14]!==a||t[15]!==G||t[16]!==P||t[17]!==A||t[18]!==R?(D=async B=>{const V=crypto.randomUUID(),W=Js(A.id).id,pe=[B.title,B.description?.trim()].filter(Boolean).join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B3Lao2pE.js","assets/index-JkzY1USm.js","assets/index-BGqqvTWB.css","assets/ArrowUp-C2Uom_QG.js","assets/chat-context-DsgMhUkR.js","assets/autosend-Cy6yTFx0.js","assets/hooks-Ce88nl_8.js","assets/use-mcp-client-FLTjUCG7.js","assets/constants-BHDe7bIw.js","assets/auth-CQTZH4-O.js","assets/decopilot-sse-pool-DZSk4S2t.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-BbXlY124.js","assets/use-virtual-mcp-qUMQTRyD.js","assets/use-collections-BUbpxhiU.js","assets/use-ai-providers-CJ46O17u.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-D28_JGgq.js","assets/use-organization-settings-vZiR9w_k.js","assets/automation-runs-CI_DXiSg.js","assets/select-Bd-q1yCw.js","assets/tooltip-8XxDCvjI.js","assets/Check-2hvdb-vm.js","assets/ChevronDown-BOF5C-lc.js","assets/ChevronUp-BgF4lo04.js","assets/useInfiniteQuery-sJT3Rp66.js","assets/use-infinite-scroll-OAX5SxNS.js","assets/use-connection-Bk3dYNpt.js","assets/card-DaWNzsoz.js","assets/sidebar-CfdFP1cX.js","assets/LayoutLeft-C1tijNFg.js","assets/use-mobile-DCYqAZ4D.js","assets/X-CuXL2cLN.js","assets/table-BXIfO88i.js","assets/empty-state-pDQBZsd9.js","assets/use-members-Dq8ZMPmz.js","assets/use-org-auth-client-asYkCBii.js","assets/use-clock-tick-DNb1k8Bx.js","assets/AlertCircle-B5S0Howv.js","assets/CheckCircle-Dtlxzayc.js","assets/Circle-WCex1xh9.js","assets/agent-icon-BD0Dhqds.js","assets/UserPlus01-B1r5BrnS.js","assets/Tool01-MVmzVfJA.js","assets/Settings02-C28ltUF9.js","assets/Tool02-B4J4k_Jq.js","assets/XCircle-Bqih3VAo.js","assets/ArrowUpRight-CWABXTLe.js","assets/TrendUp01-BnB7HNcK.js","assets/ZapSquare-DntY_gJw.js","assets/ZoomOut-CUl1mvu1.js","assets/Users03-5UfvMRx2.js","assets/ChevronRight-Gt0dyTZv.js","assets/Stars02-ClLIxwPM.js","assets/Copy01-JoQTJv1g.js","assets/DotsVertical-D5iMp6bE.js","assets/Globe01-BLXYE4Cy.js","assets/Eye-u_eyLJkM.js","assets/FilterLines-9uIhD3OH.js","assets/Flag01-B66NcKmx.js","assets/Star01-ijVxXmb8.js","assets/Globe04-f79X3HKE.js","assets/SwitchHorizontal01-DEvDgDFu.js","assets/HardDrive-al9D_s63.js","assets/Image01-DVYnawJP.js","assets/Key01-TX-oFrbw.js","assets/LinkExternal01-B0gcEmkE.js","assets/List-LBmnlI0P.js","assets/Monitor01-CdKZX-bL.js","assets/Sun-BHNbv08f.js","assets/Package-CMkd2sHI.js","assets/Palette-Q_tRuOMf.js","assets/Play-Bm9V641L.js","assets/Plus-Bt0qDPEV.js","assets/SearchLg-DSuw112A.js","assets/SearchMd-CVmGoUfY.js","assets/Shield01-Bxz1cNPl.js","assets/Stars01-yVlwMkQy.js","assets/Trash01-D3uneq9V.js","assets/Upload01-Dz_C9C_o.js","assets/User01-B21uLVgH.js","assets/Users01-DS-6elOB.js","assets/XClose-DEI4maVJ.js","assets/Zap-CbZARwtr.js","assets/use-automations-CX5x-Uqw.js","assets/useSuspenseInfiniteQuery-QwMQXCnx.js","assets/avatar-B26L6f3M.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-Cw847YgD.js","assets/file-type-icon-CrVWqTLg.js","assets/dialog-B71p2x2p.js","assets/monaco-editor-B1MWJFdI.js","assets/index-CoSY6fwz.js","assets/index-D5mw-efR.js","assets/shell-layout-BIqZZ6_U.js","assets/required-auth-layout-CLFVeE7_.js","assets/use-org-sso-DGvCB7c3.js","assets/integration-icon-CTpNPfCm.js","assets/use-navigate-to-agent-zGXO_gBb.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-BqhmXRim.js","assets/form-IQF2IyvU.js","assets/label-6eYPMIMn.js","assets/input-typWdmM2.js","assets/drawer-Do-PSohO.js","assets/collection-search-B1Ombzts.js","assets/tabs-7EuH5ewS.js","assets/toggle-group-DuFTDXUv.js","assets/use-deco-credits-B4BR0gFr.js","assets/extract-connection-data-DZ42iEpK.js","assets/connection-card-CGYwJ0pB.js","assets/use-registry-connections-ZIIAN618.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-COeZkp4P.js","assets/connection-form-helpers-CmcaSfzc.js","assets/authenticate-and-persist-oauth-BWBUH6FO.js","assets/mcp-oauth-HL_Y9nO8.js","assets/collection-tabs-WaSVL-dS.js","assets/badge-Cagw1NWA.js","assets/connect-desktop-dialog-IeFRacue.js","assets/select-model-K2oi5fLk.js","assets/checkbox-Bfo0_7OX.js","assets/skeleton-BN44BcrT.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-shb-u7Ue.js","assets/command-Cn83qANG.js","assets/index-DKGDY3AR.js","assets/popover--4QSfinM.js","assets/dropdown-menu-CCDOmXjQ.js","assets/index-CdSATOtN.js","assets/alert-dialog-YVSboGyg.js","assets/toolbar-B6T3nvfB.js","assets/use-debounced-value-CNzGGbsu.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-lae0TShH.js","assets/use-mcp-tools-D2FBN-6Y.js","assets/use-capability-FmP_AGyE.js","assets/toolbar-icon-button-DzWXQwu7.js","assets/use-debounced-autosave-JeuWph6h.js","assets/index-BQmin4cH.js","assets/search-input-D9-x3yYV.js","assets/use-mcp-auth-status-CPftzmcf.js","assets/switch-CuIkQ0ts.js","assets/use-registry-app-DEcBrUWC.js","assets/github-repo-picker-DS0e520o.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/use-secrets-BPGFw9d3.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-DekO4Tau.js","assets/calendar-C3xMag-0.js","assets/use-file-configs-DL_xMbOi.js","assets/automation-list-row-mah_f33i.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as bt,a as Fs,n as Wt,r as z,t as pt,ac as Bs,c as O,l as E,j as s,m as us,d as kt,K as Xt,B as ye,b as Rs,u as Ps,aX as Ms,i as ms}from"./index-JkzY1USm.js";import{g as Ne}from"./get-initials-D-f_fDFw.js";import{A as ve}from"./avatar-B26L6f3M.js";import{f as Jt,b as Ls,t as Us,d as fs,g as Gs,h as qs,j as It,c as ht,s as Ks,i as Hs,e as Qs,a as Ys}from"./UserPlus01-B1r5BrnS.js";import{i as Vs}from"./List-LBmnlI0P.js";import{s as Zt}from"./Plus-Bt0qDPEV.js";import{S as Ws,e as Xs,a as Js}from"./constants-BHDe7bIw.js";import{u as Zs,G as el}from"./use-registry-app-DEcBrUWC.js";import{d as xs,e as ps,a as gs,D as tl,h as sl,c as ll}from"./dialog-B71p2x2p.js";import{b as nl,u as al}from"./use-connection-Bk3dYNpt.js";import{g as rl}from"./github-repo-scope-DjMZbiKa.js";import{u as il}from"./use-mcp-client-FLTjUCG7.js";import{a as ol}from"./authenticate-and-persist-oauth-BWBUH6FO.js";import{e as cl}from"./extract-connection-data-DZ42iEpK.js";import{u as hs}from"./use-members-Dq8ZMPmz.js";import{u as es}from"./studio-tools-BbXlY124.js";import{t as dl,T as ul,S as $e}from"./decopilot-sse-pool-DZSk4S2t.js";import{u as ml}from"./use-decopilot-events-D28_JGgq.js";import{a as fl}from"./format-time-BnbuEtat.js";import{i as bs}from"./AlertCircle-B5S0Howv.js";import{i as js}from"./CheckCircle-Dtlxzayc.js";import{i as xl}from"./Circle-WCex1xh9.js";import{s as pl}from"./Eye-u_eyLJkM.js";import{a as Tt,c as At,d as mt,D as zt}from"./dropdown-menu-CCDOmXjQ.js";import{P as qt,b as Kt,a as Ht}from"./popover--4QSfinM.js";import{b as ys,C as Ns,a as ze,e as $t,d as vs,c as Ss}from"./command-Cn83qANG.js";import{C as gl}from"./calendar-C3xMag-0.js";import{u as hl}from"./use-copy-Cw847YgD.js";import{i as bl}from"./Check-2hvdb-vm.js";import{i as jl}from"./ChevronRight-Gt0dyTZv.js";import{a as yl}from"./Copy01-JoQTJv1g.js";import{n as Nl}from"./LinkExternal01-B0gcEmkE.js";import{s as Qt}from"./User01-B21uLVgH.js";import{i as ns}from"./X-CuXL2cLN.js";import{g as vl,b as Sl,e as Cl,f as wl,a as _l,D as Dl}from"./drawer-Do-PSohO.js";import{t as ts}from"./ChevronDown-BOF5C-lc.js";import{i as Cs}from"./FilterLines-9uIhD3OH.js";import{s as kl}from"./Flag01-B66NcKmx.js";import{u as Il}from"./shell-layout-BIqZZ6_U.js";import{u as Tl}from"./hooks-Ce88nl_8.js";import{w as Al}from"./autosend-Cy6yTFx0.js";import{u as zl}from"./use-organization-settings-vZiR9w_k.js";function $l(t){const{org:e}=bt(),{data:l}=Fs.useSession(),a=nl(),n=Wt(),r=il({connectionId:Ws,orgId:e.id,orgSlug:e.slug}),[o,i]=z.useState(!1),d=Zs(t,{enabled:!1});return{connect:async()=>{if(!(o||!l?.user?.id||!e)){i(!0);try{const f=d.data??(await d.refetch()).data;if(!f){pt.error("Could not find this integration in the registry");return}const p=cl(f,e.id,l.user.id,{remoteIndex:0});if(!p.connection_url){pt.error("This integration has no connection method available");return}const c=p.app_name?await El(r,p.app_name):null,m=!c,b=c?.id??(await a.create.mutateAsync(p)).id,x=await ol({connectionId:b,orgId:e.id,orgSlug:e.slug,persistFallback:j=>a.update.mutateAsync({id:b,data:{connection_token:j}}).then(()=>{})});if(x.ran&&!x.ok){if(m)try{await a.delete.mutateAsync(b)}catch{}pt.error(`Authentication failed: ${x.error??"no token"}`);return}Bs(n,e.id),pt.success(m?"Connected successfully":"Already connected")}catch(f){pt.error(`Failed to connect: ${f instanceof Error?f.message:String(f)}`)}finally{i(!1)}}},isConnecting:o}}async function El(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Ie(t){const e=O.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==a?(o=E("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==r||e[6]!==o?(i=s.jsx("img",{src:Xs,alt:"Super Agent",width:n,height:n,style:r,className:o}),e[4]=n,e[5]=r,e[6]=o,e[7]=i):i=e[7],i}const as=()=>0;function Ol(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,r=z.useRef(a);r.current=a;const o=z.useRef(n);o.current=n;const i=z.useRef(null),d=z.useRef(l),u=z.useRef(e);(!i.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,i.current=p=>{if(!l||!e)return()=>{};const c=m=>{let b;try{b=JSON.parse(m.data)}catch{return}b.data&&(m.type===ul?o.current?.(b.data.id):r.current(b.data)),p()};return dl.subscribe(e,c)}),z.useSyncExternalStore(i.current,as,as)}function Fl(){const t=O.c(27),{org:e,locator:l}=bt(),a=es(),n=Wt();let r;t[0]!==l?(r=Xt.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const o=r;let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=i):i=t[3];let d;t[4]!==o||t[5]!==i?(d={queryKey:o,queryFn:i},t[4]=o,t[5]=i,t[6]=d):d=t[6];const u=us(d);let f,p;t[7]!==n||t[8]!==o?(f=h=>{n.setQueryData(o,y=>{const g=y??[],N=h;return g.some(v=>v.id===N.id)?g.map(v=>v.id===N.id?N:v):[N,...g]})},p=h=>{n.setQueryData(o,y=>y?.filter(g=>g.id!==h))},t[7]=n,t[8]=o,t[9]=f,t[10]=p):(f=t[9],p=t[10]);let c;t[11]!==e.slug||t[12]!==f||t[13]!==p?(c={orgSlug:e.slug,onUpdate:f,onDelete:p},t[11]=e.slug,t[12]=f,t[13]=p,t[14]=c):c=t[14],Ol(c);let m;t[15]!==n||t[16]!==o?(m=h=>{const y=h.subject,g=h.data.status;n.setQueryData(o,N=>N?.map(v=>v.threads.some(w=>w.threadId===y)?{...v,threads:v.threads.map(w=>w.threadId===y?{...w,status:g}:w)}:v))},t[15]=n,t[16]=o,t[17]=m):m=t[17];let b;t[18]!==e.slug||t[19]!==m?(b={orgSlug:e.slug,onTaskStatus:m},t[18]=e.slug,t[19]=m,t[20]=b):b=t[20],ml(b);let x;t[21]!==u.data?(x=u.data??[],t[21]=u.data,t[22]=x):x=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==x?(j={items:x,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=x,t[26]=j):j=t[26],j}function Bl(){const t=O.c(36),{locator:e}=bt(),l=es(),a=Wt();let n;t[0]!==e?(n=Xt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let o;t[2]!==a||t[3]!==r?(o=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=o):o=t[4];const i=o;let d;t[5]!==l?(d=C=>l.call("TASK_BOARD_ITEM_CREATE",C),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==i||t[8]!==d?(u={mutationFn:d,onSuccess:i},t[7]=i,t[8]=d,t[9]=u):u=t[9];const f=kt(u);let p;t[10]!==l?(p=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[10]=l,t[11]=p):p=t[11];let c,m;t[12]!==a||t[13]!==r?(c=async C=>{await a.cancelQueries({queryKey:r});const _=a.getQueryData(r);return a.setQueryData(r,R=>R?.map(G=>G.id===C.id?{...G,...C}:G)),{previous:_}},m=(C,_,R)=>{R?.previous&&a.setQueryData(r,R.previous)},t[12]=a,t[13]=r,t[14]=c,t[15]=m):(c=t[14],m=t[15]);let b;t[16]!==i||t[17]!==p||t[18]!==c||t[19]!==m?(b={mutationFn:p,onMutate:c,onError:m,onSettled:i},t[16]=i,t[17]=p,t[18]=c,t[19]=m,t[20]=b):b=t[20];const x=kt(b);let j;t[21]!==l?(j=C=>l.call("TASK_BOARD_ITEM_DELETE",{id:C}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==i||t[24]!==j?(h={mutationFn:j,onSuccess:i},t[23]=i,t[24]=j,t[25]=h):h=t[25];const y=kt(h);let g;t[26]!==l?(g=C=>l.call("TASK_BOARD_ITEM_UPDATE",C),t[26]=l,t[27]=g):g=t[27];let N;t[28]!==i||t[29]!==g?(N={mutationFn:g,onSuccess:i},t[28]=i,t[29]=g,t[30]=N):N=t[30];const v=kt(N);let w;return t[31]!==f||t[32]!==v||t[33]!==y||t[34]!==x?(w={create:f,update:x,remove:y,link:v},t[31]=f,t[32]=v,t[33]=y,t[34]=x,t[35]=w):w=t[35],w}function Yt(t){return t.threads.some(e=>e.status==="requires_action")}function Rl(t){return t.threads[0]}const ws=["triage","todo","in_progress","in_review","done"],je={triage:{label:"Backlog",icon:bs,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:xl,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Jt,iconClassName:"text-primary"},in_review:{label:"In Review",icon:pl,iconClassName:"text-warning"},done:{label:"Done",icon:js,iconClassName:"text-success"}},_s=["none","low","medium","high","urgent"],Se={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Pl(t){const e=O.c(10),{locator:l}=bt(),a=es();let n;e[0]!==t||e[1]!==l?(n=Xt.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const r=!!t;let o;e[3]!==t||e[4]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==r||e[8]!==o?(i={queryKey:n,enabled:r,queryFn:o},e[6]=n,e[7]=r,e[8]=o,e[9]=i):i=e[9],us(i)}function Ml(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function rs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ll=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),gt="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Ul={failed:{label:"Error",className:"text-destructive",icon:Gs},requires_action:{label:"Needs input",className:"text-warning",icon:fs},in_progress:{label:"Running",className:"text-primary",icon:Jt,spin:!0},completed:{label:"Completed",className:"text-success",icon:js},expired:{label:"Expired",className:"text-muted-foreground",icon:bs}};function Gl(t){const e=O.c(188),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:o,onDelete:i,onOpenThread:d,onNewChat:u,isSaving:f}=t,{data:p}=hs(),c=p?.data?.members??[],{handleCopy:m,copied:b}=hl(),[x,j]=z.useState(n?.title??""),[h,y]=z.useState(n?.description??""),[g,N]=z.useState(n?.status??r??"triage"),[v,w]=z.useState(n?.priority??"medium"),[C,_]=z.useState(n?.assigneeId??null),R=n?.dueDate;let G;e[0]!==R?(G=rs(R),e[0]=R,e[1]=G):G=e[1];const[A,P]=z.useState(G),[se,L]=z.useState(!1),[U,$]=z.useState(!1);let H;e[2]!==r||e[3]!==n?.assigneeId||e[4]!==n?.description||e[5]!==n?.dueDate||e[6]!==n?.priority||e[7]!==n?.status||e[8]!==n?.title||e[9]!==_||e[10]!==P?(H=()=>{j(n?.title??""),y(n?.description??""),N(n?.status??r??"triage"),w(n?.priority??"medium"),_(n?.assigneeId??null),P(rs(n?.dueDate))},e[2]=r,e[3]=n?.assigneeId,e[4]=n?.description,e[5]=n?.dueDate,e[6]=n?.priority,e[7]=n?.status,e[8]=n?.title,e[9]=_,e[10]=P,e[11]=H):H=e[11];const Q=H;let Y;e[12]!==a||e[13]!==Q?(Y=()=>{a(),Q()},e[12]=a,e[13]=Q,e[14]=Y):Y=e[14];const D=Y;let F;e[15]!==C||e[16]!==h||e[17]!==A||e[18]!==o||e[19]!==v||e[20]!==g||e[21]!==x?(F=()=>{const S=x.trim();S&&o({title:S,description:h.trim()||null,status:g,priority:v,assigneeId:C,dueDate:A?Ml(A):null})},e[15]=C,e[16]=h,e[17]=A,e[18]=o,e[19]=v,e[20]=g,e[21]=x,e[22]=F):F=e[22];const I=F,T=C===$e;let q;e[23]!==C?(q=S=>S.userId===C,e[23]=C,e[24]=q):q=e[24];const K=c.find(q),M=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,me=je[g].icon,le=ps;let fe;e[25]!==D?(fe=S=>!S&&D(),e[25]=D,e[26]=fe):fe=e[26];const Te=xs,ft="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",xt="hidden",xe=n?"Edit task":"New task";let X;e[27]!==xe?(X=s.jsx(gs,{className:"sr-only",children:xe}),e[27]=xe,e[28]=X):X=e[28];let ne;e[29]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(ns,{size:16}),e[29]=ne):ne=e[29];let J;e[30]!==D?(J=s.jsx("button",{type:"button","aria-label":"Close",onClick:D,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ne}),e[30]=D,e[31]=J):J=e[31];const Ce="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ae;e[32]===Symbol.for("react.memo_cache_sentinel")?(ae=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[32]=ae):ae=e[32];let re;e[33]!==x?(re=s.jsx("textarea",{ref:Kl,value:x,onChange:ae,onKeyDown:ql,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[33]=x,e[34]=re):re=e[34];let B;e[35]===Symbol.for("react.memo_cache_sentinel")?(B=S=>y(S.target.value),e[35]=B):B=e[35];let V;e[36]!==h?(V=s.jsx("textarea",{value:h,onChange:B,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[36]=h,e[37]=V):V=e[37];let W;e[38]!==b||e[39]!==h||e[40]!==m?(W=h&&s.jsx(ye,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>m(h),children:b?s.jsx(bl,{size:14}):s.jsx(yl,{size:14})}),e[38]=b,e[39]=h,e[40]=m,e[41]=W):W=e[41];let pe;e[42]!==V||e[43]!==W?(pe=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[V,W]}),e[42]=V,e[43]=W,e[44]=pe):pe=e[44];const we=n&&n.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:n.threads.map(S=>s.jsx(Hl,{thread:S,startedBy:M??K,onOpen:d},S.threadId))});let _e;e[45]!==n?(_e=n?.id&&s.jsx(Vl,{itemId:n.id}),e[45]=n,e[46]=_e):_e=e[46];let ie;e[47]!==re||e[48]!==pe||e[49]!==we||e[50]!==_e?(ie=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[re,pe,we,_e]}),e[47]=re,e[48]=pe,e[49]=we,e[50]=_e,e[51]=ie):ie=e[51];const ls="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let be;e[52]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[52]=be):be=e[52];const Ee="flex flex-wrap gap-2 sm:flex-col",De=je[g];let Z;e[53]!==me||e[54]!==De.iconClassName?(Z=s.jsx(me,{size:16,className:De.iconClassName}),e[53]=me,e[54]=De.iconClassName,e[55]=Z):Z=e[55];const Ae=je[g];let oe;e[56]!==Z||e[57]!==Ae.label?(oe=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:gt,children:[Z,Ae.label]})}),e[56]=Z,e[57]=Ae.label,e[58]=oe):oe=e[58];let ce;e[59]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(At,{align:"start",className:"w-44",children:ws.map(S=>{const he=je[S].icon;return s.jsxs(mt,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(he,{size:16,className:je[S].iconClassName}),je[S].label]},S)})}),e[59]=ce):ce=e[59];let ge;e[60]!==oe?(ge=s.jsxs(zt,{children:[oe,ce]}),e[60]=oe,e[61]=ge):ge=e[61];const ke=v==="none"&&"text-muted-foreground";let ee;e[62]!==ke?(ee=E(gt,ke),e[62]=ke,e[63]=ee):ee=e[63];let te;e[64]!==v?(te=v==="none"?s.jsxs(s.Fragment,{children:[s.jsx(Ls,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:E("size-2 rounded-full",Se[v].dotClassName)}),Se[v].label]}),e[64]=v,e[65]=te):te=e[65];let de;e[66]!==ee||e[67]!==te?(de=s.jsx(Tt,{asChild:!0,children:s.jsx("button",{type:"button",className:ee,children:te})}),e[66]=ee,e[67]=te,e[68]=de):de=e[68];let ue;e[69]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(At,{align:"start",className:"w-40",children:_s.map(S=>s.jsxs(mt,{onSelect:()=>w(S),children:[s.jsx("span",{className:E("size-2 rounded-full",Se[S].dotClassName)}),Se[S].label]},S))}),e[69]=ue):ue=e[69];let k;e[70]!==de?(k=s.jsxs(zt,{children:[de,ue]}),e[70]=de,e[71]=k):k=e[71];const Ft="flex flex-col",Bt=Kt,$s=!0,Rt=qt,Es=!0,Os="button",Pt=!C&&"text-muted-foreground";let Oe;e[72]!==Pt?(Oe=E(gt,Pt),e[72]=Pt,e[73]=Oe):Oe=e[73];const Mt=T&&M?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:M.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ve,{url:M.user?.image??void 0,fallback:Ne(M.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Ie,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):T?s.jsxs(s.Fragment,{children:[s.jsx(Ie,{size:16}),"Super Agent"]}):K?s.jsxs(s.Fragment,{children:[s.jsx(ve,{url:K.user?.image??void 0,fallback:Ne(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Us,{size:16,className:"text-muted-foreground"}),"Assign"]});let Fe;e[74]!==Oe||e[75]!==Mt?(Fe=s.jsx("button",{type:Os,className:Oe,children:Mt}),e[74]=Oe,e[75]=Mt,e[76]=Fe):Fe=e[76];let Be;e[77]!==Rt||e[78]!==Fe?(Be=s.jsx(Rt,{asChild:Es,children:Fe}),e[77]=Rt,e[78]=Fe,e[79]=Be):Be=e[79];let jt;e[80]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(ys,{placeholder:"Assign to…",className:"h-9"}),e[80]=jt):jt=e[80];let yt;e[81]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(Ns,{children:"No members found."}),e[81]=yt):yt=e[81];let Re;e[82]!==_||e[83]!==$?(Re=()=>{_($e),$(!1)},e[82]=_,e[83]=$,e[84]=Re):Re=e[84];let Nt,vt;e[85]===Symbol.for("react.memo_cache_sentinel")?(Nt=s.jsx(Ie,{size:16}),vt=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[85]=Nt,e[86]=vt):(Nt=e[85],vt=e[86]);let Pe;e[87]!==Re?(Pe=s.jsxs(ze,{value:"Super Agent",onSelect:Re,className:"gap-2",children:[Nt,vt]}),e[87]=Re,e[88]=Pe):Pe=e[88];let Me;e[89]!==_||e[90]!==$?(Me=()=>{_(null),$(!1)},e[89]=_,e[90]=$,e[91]=Me):Me=e[91];let St,Ct;e[92]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),Ct=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[92]=St,e[93]=Ct):(St=e[92],Ct=e[93]);let Le;e[94]!==Me?(Le=s.jsxs(ze,{value:"Unassigned",onSelect:Me,className:"gap-2",children:[St,Ct]}),e[94]=Me,e[95]=Le):Le=e[95];let Ue;e[96]!==Pe||e[97]!==Le?(Ue=s.jsxs($t,{children:[Pe,Le]}),e[96]=Pe,e[97]=Le,e[98]=Ue):Ue=e[98];let Ge;if(e[99]!==c||e[100]!==_||e[101]!==$){let S;e[103]!==_||e[104]!==$?(S=he=>s.jsxs(ze,{value:he.user?.name??he.userId,onSelect:()=>{_(he.userId),$(!1)},className:"gap-2",children:[s.jsx(ve,{url:he.user?.image??void 0,fallback:Ne(he.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:he.user?.name??he.userId})]},he.userId),e[103]=_,e[104]=$,e[105]=S):S=e[105],Ge=c.map(S),e[99]=c,e[100]=_,e[101]=$,e[102]=Ge}else Ge=e[102];let qe;e[106]!==Ge?(qe=s.jsx($t,{heading:"Members",children:Ge}),e[106]=Ge,e[107]=qe):qe=e[107];let Ke;e[108]!==Ue||e[109]!==qe?(Ke=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[jt,s.jsxs(Ss,{children:[yt,Ue,qe]})]})}),e[108]=Ue,e[109]=qe,e[110]=Ke):Ke=e[110];let He;e[111]!==Bt||e[112]!==U||e[113]!==$||e[114]!==Be||e[115]!==Ke?(He=s.jsxs(Bt,{open:U,onOpenChange:$,modal:$s,children:[Be,Ke]}),e[111]=Bt,e[112]=U,e[113]=$,e[114]=Be,e[115]=Ke,e[116]=He):He=e[116];let Qe;e[117]!==M||e[118]!==T?(Qe=T&&M&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:E(gt,"pointer-events-none"),children:[s.jsx(Ie,{size:16}),"Super Agent"]})]}),e[117]=M,e[118]=T,e[119]=Qe):Qe=e[119];let Ye;e[120]!==He||e[121]!==Qe?(Ye=s.jsxs("div",{className:Ft,children:[He,Qe]}),e[120]=He,e[121]=Qe,e[122]=Ye):Ye=e[122];const Lt=!A&&"text-muted-foreground";let Ve;e[123]!==Lt?(Ve=E(gt,Lt),e[123]=Lt,e[124]=Ve):Ve=e[124];let wt;e[125]===Symbol.for("react.memo_cache_sentinel")?(wt=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[125]=wt):wt=e[125];let We;e[126]!==A?(We=A?Ll.format(A):"Due date",e[126]=A,e[127]=We):We=e[127];let Xe;e[128]!==A||e[129]!==P?(Xe=A&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),P(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),P(null))},children:s.jsx(ns,{size:12})}),e[128]=A,e[129]=P,e[130]=Xe):Xe=e[130];let Je;e[131]!==Ve||e[132]!==We||e[133]!==Xe?(Je=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ve,children:[wt,We,Xe]})}),e[131]=Ve,e[132]=We,e[133]=Xe,e[134]=Je):Je=e[134];const Ut=A??void 0;let Ze;e[135]!==P||e[136]!==L?(Ze=S=>{P(S??null),S&&L(!1)},e[135]=P,e[136]=L,e[137]=Ze):Ze=e[137];let et;e[138]!==Ut||e[139]!==Ze?(et=s.jsx(Ht,{className:"w-auto p-0",align:"start",children:s.jsx(gl,{mode:"single",selected:Ut,onSelect:Ze,initialFocus:!0})}),e[138]=Ut,e[139]=Ze,e[140]=et):et=e[140];let tt;e[141]!==se||e[142]!==L||e[143]!==Je||e[144]!==et?(tt=s.jsxs(Kt,{open:se,onOpenChange:L,children:[Je,et]}),e[141]=se,e[142]=L,e[143]=Je,e[144]=et,e[145]=tt):tt=e[145];let st;e[146]!==ge||e[147]!==k||e[148]!==Ye||e[149]!==tt?(st=s.jsxs("div",{className:Ee,children:[ge,k,Ye,tt]}),e[146]=ge,e[147]=k,e[148]=Ye,e[149]=tt,e[150]=st):st=e[150];let lt;e[151]!==be||e[152]!==st?(lt=s.jsxs("div",{className:ls,children:[be,st]}),e[151]=be,e[152]=st,e[153]=lt):lt=e[153];let nt;e[154]!==ie||e[155]!==lt?(nt=s.jsxs("div",{className:Ce,children:[ie,lt]}),e[154]=ie,e[155]=lt,e[156]=nt):nt=e[156];let at;e[157]!==n||e[158]!==i?(at=n&&i?s.jsx(ye,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:i,children:s.jsx(Ks,{size:16})}):s.jsx("span",{}),e[157]=n,e[158]=i,e[159]=at):at=e[159];let rt;e[160]!==n||e[161]!==u?(rt=n&&u&&s.jsxs(ye,{variant:"outline",size:"sm",onClick:u,children:[s.jsx(Hs,{size:16}),"New chat"]}),e[160]=n,e[161]=u,e[162]=rt):rt=e[162];let it;e[163]!==f||e[164]!==x?(it=!x.trim()||f,e[163]=f,e[164]=x,e[165]=it):it=e[165];let _t;e[166]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Zt,{size:16}),e[166]=_t):_t=e[166];const Gt=n?"Save":"Create task";let ot;e[167]!==I||e[168]!==it||e[169]!==Gt?(ot=s.jsxs(ye,{size:"sm",disabled:it,onClick:I,children:[_t,Gt]}),e[167]=I,e[168]=it,e[169]=Gt,e[170]=ot):ot=e[170];let ct;e[171]!==rt||e[172]!==ot?(ct=s.jsxs("div",{className:"flex items-center gap-2",children:[rt,ot]}),e[171]=rt,e[172]=ot,e[173]=ct):ct=e[173];let dt;e[174]!==at||e[175]!==ct?(dt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[at,ct]}),e[174]=at,e[175]=ct,e[176]=dt):dt=e[176];let ut;e[177]!==Te||e[178]!==X||e[179]!==J||e[180]!==nt||e[181]!==dt?(ut=s.jsxs(Te,{className:ft,closeButtonClassName:xt,children:[X,J,nt,dt]}),e[177]=Te,e[178]=X,e[179]=J,e[180]=nt,e[181]=dt,e[182]=ut):ut=e[182];let Dt;return e[183]!==le||e[184]!==l||e[185]!==fe||e[186]!==ut?(Dt=s.jsx(le,{open:l,onOpenChange:fe,children:ut}),e[183]=le,e[184]=l,e[185]=fe,e[186]=ut,e[187]=Dt):Dt=e[187],Dt}function ql(t){t.key==="Enter"&&t.preventDefault()}function Kl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Hl(t){const e=O.c(16),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Ul[l.status]:null,o=l.lastMessage;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16}),e[0]=i):i=e[0];const d=l.title||"Super Agent";let u;e[1]!==d?(u=s.jsx("span",{className:"truncate text-sm text-foreground",children:d}),e[1]=d,e[2]=u):u=e[2];let f;e[3]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ve,{url:a.user?.image??void 0,fallback:Ne(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[3]=a,e[4]=f):f=e[4];let p;e[5]!==u||e[6]!==f?(p=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[i,u,f]}),e[5]=u,e[6]=f,e[7]=p):p=e[7];let c;e[8]!==o||e[9]!==n||e[10]!==r||e[11]!==l?(c=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:E("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:E(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),o&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:o}),n&&s.jsx(jl,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[8]=o,e[9]=n,e[10]=r,e[11]=l,e[12]=c):c=e[12];let m;return e[13]!==p||e[14]!==c?(m=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[p,c]}),e[13]=p,e[14]=c,e[15]=m):m=e[15],m}function Ql(t){return t.merged?{label:"Merged",className:"text-special",icon:qs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:It}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:It}:{label:"Open",className:"text-success",icon:It}}function Yl(t){const e=O.c(38),{pr:l}=t;let a,n,r,o,i,d,u,f;if(e[0]!==l){n=Ql(l);let v;e[9]!==l.body?(v=l.body?.trim(),e[9]=l.body,e[10]=v):v=e[10],a=v,i=l.url,d="_blank",u="noreferrer",f="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",o="flex items-center gap-2",r=E("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=r,e[4]=o,e[5]=i,e[6]=d,e[7]=u,e[8]=f}else a=e[1],n=e[2],r=e[3],o=e[4],i=e[5],d=e[6],u=e[7],f=e[8];let p;e[11]!==n.icon?(p=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=p):p=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let m;e[15]!==r||e[16]!==p||e[17]!==c?(m=s.jsxs("span",{className:r,children:[p,c]}),e[15]=r,e[16]=p,e[17]=c,e[18]=m):m=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let x;e[19]!==b?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=x):x=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Nl,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let y;e[24]!==x||e[25]!==j||e[26]!==o||e[27]!==m?(y=s.jsxs("span",{className:o,children:[m,x,j,h]}),e[24]=x,e[25]=j,e[26]=o,e[27]=m,e[28]=y):y=e[28];let g;e[29]!==a?(g=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=g):g=e[30];let N;return e[31]!==y||e[32]!==g||e[33]!==i||e[34]!==d||e[35]!==u||e[36]!==f?(N=s.jsxs("a",{href:i,target:d,rel:u,className:f,children:[y,g]}),e[31]=y,e[32]=g,e[33]=i,e[34]=d,e[35]=u,e[36]=f,e[37]=N):N=e[37],N}function Vl(t){const e=O.c(5),{itemId:l}=t,{data:a,isLoading:n}=Pl(l);if(!n&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=r):r=e[0];let o;e[1]!==a?(o=a?a.map(Wl):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Jt,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=o):o=e[2];let i;return e[3]!==o?(i=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[r,o]}),e[3]=o,e[4]=i):i=e[4],i}function Wl(t){return s.jsx(Yl,{pr:t},t.url)}const Vt="__unassigned__",Et={assignee:null,priority:null,due:null};function Xl(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Jl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Zl=864e5;function en(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function tn(t,e){if(e.assignee!==null){if(e.assignee===Vt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!en(l,a)||e.due==="week"&&(l<a||l>a+7*Zl))return!1}return!0}const is=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function Ot(t,e=!1){return E("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function sn(t){const e=O.c(62),{value:l,members:a,onChange:n,block:r}=t,[o,i]=z.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,f="Assignee";if(l===Vt)f="Unassigned";else if(l===$e){let D;e[1]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ie,{size:14}),e[1]=D):D=e[1],u=D,f="Super Agent"}else if(l){let D,F,I,T;if(e[2]!==a||e[3]!==l){let K;e[8]!==l?(K=M=>M.userId===l,e[8]=l,e[9]=K):K=e[9],F=a.find(K),D=ve,I=F?.user?.image??void 0,T=Ne(F?.user?.name),e[2]=a,e[3]=l,e[4]=D,e[5]=F,e[6]=I,e[7]=T}else D=e[4],F=e[5],I=e[6],T=e[7];let q;e[10]!==D||e[11]!==I||e[12]!==T?(q=s.jsx(D,{url:I,fallback:T,shape:"circle",size:"2xs"}),e[10]=D,e[11]=I,e[12]=T,e[13]=q):q=e[13],u=q,f=F?.user?.name??"Member"}let p;e[14]!==n?(p=D=>{n(D),i(!1)},e[14]=n,e[15]=p):p=e[15];const c=p,m=l!==null;let b;e[16]!==r||e[17]!==m?(b=Ot(m,r),e[16]=r,e[17]=m,e[18]=b):b=e[18];const x=b,j=r&&"ml-auto";let h;e[19]!==j?(h=E("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const y=h;let g;e[21]!==f?(g=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[21]=f,e[22]=g):g=e[22];let N;e[23]!==y?(N=s.jsx(ts,{size:12,className:y}),e[23]=y,e[24]=N):N=e[24];let v;e[25]!==u||e[26]!==g||e[27]!==N||e[28]!==x?(v=s.jsx(qt,{asChild:!0,children:s.jsxs("button",{type:"button",className:x,children:[u,g,N]})}),e[25]=u,e[26]=g,e[27]=N,e[28]=x,e[29]=v):v=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ys,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ns,{children:"No members found."}),e[31]=C):C=e[31];let _;e[32]!==c?(_=s.jsx(ze,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=_):_=e[33];let R;e[34]!==c?(R=()=>c(Vt),e[34]=c,e[35]=R):R=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[36]=G):G=e[36];let A;e[37]!==R?(A=s.jsxs(ze,{value:"Unassigned",onSelect:R,className:"gap-2",children:[G,"Unassigned"]}),e[37]=R,e[38]=A):A=e[38];let P;e[39]!==c?(P=()=>c($e),e[39]=c,e[40]=P):P=e[40];let se;e[41]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Ie,{size:16}),e[41]=se):se=e[41];let L;e[42]!==P?(L=s.jsxs(ze,{value:"Super Agent",onSelect:P,className:"gap-2",children:[se,"Super Agent"]}),e[42]=P,e[43]=L):L=e[43];let U;e[44]!==_||e[45]!==A||e[46]!==L?(U=s.jsxs($t,{children:[_,A,L]}),e[44]=_,e[45]=A,e[46]=L,e[47]=U):U=e[47];let $;if(e[48]!==a||e[49]!==c){let D;e[51]!==c?(D=F=>s.jsxs(ze,{value:F.user?.name??F.userId,onSelect:()=>c(F.userId),className:"gap-2",children:[s.jsx(ve,{url:F.user?.image??void 0,fallback:Ne(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??F.userId})]},F.userId),e[51]=c,e[52]=D):D=e[52],$=a.map(D),e[48]=a,e[49]=c,e[50]=$}else $=e[50];let H;e[53]!==$?(H=s.jsx($t,{heading:"Members",children:$}),e[53]=$,e[54]=H):H=e[54];let Q;e[55]!==U||e[56]!==H?(Q=s.jsx(Ht,{align:"start",className:"w-56 p-0",children:s.jsxs(vs,{children:[w,s.jsxs(Ss,{children:[C,U,H]})]})}),e[55]=U,e[56]=H,e[57]=Q):Q=e[57];let Y;return e[58]!==o||e[59]!==Q||e[60]!==v?(Y=s.jsxs(Kt,{open:o,onOpenChange:i,children:[v,Q]}),e[58]=o,e[59]=Q,e[60]=v,e[61]=Y):Y=e[61],Y}function ln(t){const e=O.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let o;e[0]!==n||e[1]!==r?(o=Ot(r,n),e[0]=n,e[1]=r,e[2]=o):o=e[2];const i=o,d=n&&"ml-auto";let u;e[3]!==d?(u=E("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const f=u;let p;e[5]!==l?(p=l?s.jsx("span",{className:E("size-2 shrink-0 rounded-full",Se[l].dotClassName)}):s.jsx(kl,{size:14,className:"shrink-0"}),e[5]=l,e[6]=p):p=e[6];const c=l?Se[l].label:"Priority";let m;e[7]!==f?(m=s.jsx(ts,{size:12,className:f}),e[7]=f,e[8]=m):m=e[8];let b;e[9]!==p||e[10]!==c||e[11]!==m||e[12]!==i?(b=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:i,children:[p,c,m]})}),e[9]=p,e[10]=c,e[11]=m,e[12]=i,e[13]=b):b=e[13];let x,j;e[14]!==a?(j=s.jsx(mt,{onSelect:()=>a(null),children:"Any priority"}),x=_s.map(g=>s.jsxs(mt,{onSelect:()=>a(g),className:"gap-2",children:[s.jsx("span",{className:E("size-2 rounded-full",Se[g].dotClassName)}),Se[g].label]},g)),e[14]=a,e[15]=x,e[16]=j):(x=e[15],j=e[16]);let h;e[17]!==x||e[18]!==j?(h=s.jsxs(At,{align:"start",className:"w-40",children:[j,x]}),e[17]=x,e[18]=j,e[19]=h):h=e[19];let y;return e[20]!==h||e[21]!==b?(y=s.jsxs(zt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=y):y=e[22],y}function nn(t){const e=O.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=is.find(C=>C.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const o=r,i=l!==null;let d;e[2]!==n||e[3]!==i?(d=Ot(i,n),e[2]=n,e[3]=i,e[4]=d):d=e[4];const u=d,f=n&&"ml-auto";let p;e[5]!==f?(p=E("shrink-0 opacity-60",f),e[5]=f,e[6]=p):p=e[6];const c=p;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ht,{size:14,className:"shrink-0"}),e[7]=m):m=e[7];const b=o??"Due date";let x;e[8]!==c?(x=s.jsx(ts,{size:12,className:c}),e[8]=c,e[9]=x):x=e[9];let j;e[10]!==b||e[11]!==x||e[12]!==u?(j=s.jsx(Tt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[m,b,x]})}),e[10]=b,e[11]=x,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ht,{size:16,className:"text-muted-foreground"}),e[16]=y):y=e[16];let g;e[17]!==h?(g=s.jsxs(mt,{onSelect:h,className:"gap-2",children:[y,"Any time"]}),e[17]=h,e[18]=g):g=e[18];let N;e[19]!==a?(N=is.map(C=>{const _=C.value==="overdue";return s.jsxs(mt,{onSelect:()=>a(C.value),className:E("gap-2",_&&"text-destructive"),children:[s.jsx(ht,{size:16,className:E("shrink-0",_?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==g||e[22]!==N?(v=s.jsxs(At,{align:"start",className:"w-44",children:[g,N]}),e[21]=g,e[22]=N,e[23]=v):v=e[23];let w;return e[24]!==v||e[25]!==j?(w=s.jsxs(zt,{children:[j,v]}),e[24]=v,e[25]=j,e[26]=w):w=e[26],w}function Ds(t){const e=O.c(26),{filters:l,members:a,onChange:n,block:r}=t;let o;e[0]!==l||e[1]!==n?(o=m=>n({...l,assignee:m}),e[0]=l,e[1]=n,e[2]=o):o=e[2];let i;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==o?(i=s.jsx(sn,{block:r,value:l.assignee,members:a,onChange:o}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=o,e[7]=i):i=e[7];let d;e[8]!==l||e[9]!==n?(d=m=>n({...l,priority:m}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==r||e[12]!==l.priority||e[13]!==d?(u=s.jsx(ln,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==n?(f=m=>n({...l,due:m}),e[15]=l,e[16]=n,e[17]=f):f=e[17];let p;e[18]!==r||e[19]!==l.due||e[20]!==f?(p=s.jsx(nn,{block:r,value:l.due,onChange:f}),e[18]=r,e[19]=l.due,e[20]=f,e[21]=p):p=e[21];let c;return e[22]!==i||e[23]!==u||e[24]!==p?(c=s.jsxs(s.Fragment,{children:[i,u,p]}),e[22]=i,e[23]=u,e[24]=p,e[25]=c):c=e[25],c}function an(t){const e=O.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Cs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let o;e[1]!==l||e[2]!==a||e[3]!==n?(o=s.jsx(Ds,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=o):o=e[4];let i;e[5]!==l||e[6]!==n?(i=Xl(l)&&s.jsx("button",{type:"button",onClick:()=>n(Et),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=i):i=e[7];let d;return e[8]!==o||e[9]!==i?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,o,i]}),e[8]=o,e[9]=i,e[10]=d):d=e[10],d}function rn(t){const e=O.c(26),{filters:l,members:a,onChange:n}=t,[r,o]=z.useState(!1),i=Jl(l),d=i>0;let u;e[0]!==d?(u=Ot(d),e[0]=d,e[1]=u):u=e[1];const f=u;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Cs,{size:14,className:"shrink-0"}),e[2]=p):p=e[2];let c;e[3]!==i?(c=i>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:i}),e[3]=i,e[4]=c):c=e[4];let m;e[5]!==c||e[6]!==f?(m=s.jsx(vl,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[p,"Filters",c]})}),e[5]=c,e[6]=f,e[7]=m):m=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Sl,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let x;e[9]!==l||e[10]!==a||e[11]!==n?(x=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ds,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=x):x=e[12];let j;e[13]!==i||e[14]!==n?(j=i>0&&s.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>n(Et),children:"Clear all"}),e[13]=i,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Cl,{asChild:!0,children:s.jsx(ye,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let y;e[17]!==j?(y=s.jsxs(wl,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=y):y=e[18];let g;e[19]!==y||e[20]!==x?(g=s.jsxs(_l,{className:"p-0",children:[b,x,y]}),e[19]=y,e[20]=x,e[21]=g):g=e[21];let N;return e[22]!==r||e[23]!==g||e[24]!==m?(N=s.jsxs(Dl,{open:r,onOpenChange:o,direction:"bottom",children:[m,g]}),e[22]=r,e[23]=g,e[24]=m,e[25]=N):N=e[25],N}const os=380,on=90,cs=5,cn="cubic-bezier(0.22, 0.61, 0.36, 1)",dn=8;function un(t,e){const l=z.useRef(new Map);z.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,o=new Map,i=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const m=c.dataset.flipId;if(!m)continue;const b=c.getBoundingClientRect();o.set(m,b);const x=r.get(m);if(!x)continue;const j=x.left-b.left,h=x.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>dn})}if(l.current=o,i||d.length===0)return;for(const c of d){const m=c.lane?` rotate(${c.dx>0?cs:-cs}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${m}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const f=[],p=requestAnimationFrame(()=>{for(const c of d){const m=c.lane?u++*on:0;c.el.style.transition=`transform ${os}ms ${cn} ${m}ms`,c.el.style.transform="",f.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},os+m+30))}});return()=>{cancelAnimationFrame(p);for(const c of f)clearTimeout(c)}},[e,t])}Ms(()=>import("./index-B3Lao2pE.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157])).catch(()=>{});function mn(){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(zs,{})})})}),t[0]=e):e=t[0],e}const fn=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function xn(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:fn.format(e),overdue:l}}const ss="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function ks(){const t=O.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=E(ss,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(fs,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function Is(t){const e=O.c(7),{priority:l}=t,a=Se[l];let n;e[0]!==a.dotClassName?(n=E("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a.label||e[5]!==r?(o=s.jsxs("span",{className:ss,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=o):o=e[6],o}function Ts(t){const e=O.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:i,overdue:d}=xn(l);a=i,n=E(ss,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ht,{size:14}),e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==n?(o=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=o):o=e[6],o}function As(t){const e=O.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===$e){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let o;e[0]!==n?(o=n&&s.jsx(ve,{url:n.user?.image??void 0,fallback:Ne(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{size:16,className:"ring-2 ring-background"}),e[2]=i):i=e[2];let d;return e[3]!==r||e[4]!==o?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[o,i]}),e[3]=r,e[4]=o,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,o=a.user?.name;let i;e[6]!==o?(i=Ne(o),e[6]=o,e[7]=i):i=e[7];let d;return e[8]!==r||e[9]!==i?(d=s.jsx(ve,{url:r,fallback:i,shape:"circle",size:"2xs"}),e[8]=r,e[9]=i,e[10]=d):d=e[10],d}return null}function zs(){const t=O.c(102),{items:e,isLoading:l}=Fl(),a=Bl(),n=zl();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const o=al(r);let i;t[1]!==o?(i=rl(o),t[1]=o,t[2]=i):i=t[2];const d=i.length>0,[u,f]=z.useState(!1),{data:p}=hs();let c,m;t[3]!==p?.data?.members?(c=p?.data?.members??[],m=new Map(c.map(pn)),t[3]=p?.data?.members,t[4]=c,t[5]=m):(c=t[4],m=t[5]);const b=m,[x,j]=z.useState("board"),[h,y]=z.useState(Et),[g,N]=z.useState(!1),[v,w]=z.useState(null),[C,_]=z.useState(null),{setTaskId:R}=Il(),{create:G}=Tl(),{org:A,locator:P}=bt(),se=Rs();let L;t[6]===Symbol.for("react.memo_cache_sentinel")?(L={strict:!1},t[6]=L):L=t[6];const{task:U}=Ps(L);let $;t[7]!==U||t[8]!==e?($=U?e.find(B=>B.id===U)??null:null,t[7]=U,t[8]=e,t[9]=$):$=t[9];const H=$;let Q;t[10]!==U||t[11]!==se||t[12]!==A?(Q=()=>{U&&se({to:"/$org/board",params:{org:A.slug},search:{},replace:!0})},t[10]=U,t[11]=se,t[12]=A,t[13]=Q):Q=t[13];const Y=Q;let D;t[14]!==a||t[15]!==G||t[16]!==P||t[17]!==A||t[18]!==R?(D=async B=>{const V=crypto.randomUUID(),W=Js(A.id).id,pe=[B.title,B.description?.trim()].filter(Boolean).join(`
|
|
3
3
|
|
|
4
4
|
`);Al(sessionStorage,P,V,{tiptapDoc:{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:pe}]}]}}),N(!1);try{await G({id:V,virtual_mcp_id:W}),await a.link.mutateAsync({id:B.id,linkThreadId:V})}catch{}R(V,W,{autosend:!0})},t[14]=a,t[15]=G,t[16]=P,t[17]=A,t[18]=R,t[19]=D):D=t[19];const F=D;let I,T,q,K,M,me,le;if(t[20]!==a||t[21]!==Y||t[22]!==H||t[23]!==g||t[24]!==v||t[25]!==h||t[26]!==d||t[27]!==l||t[28]!==e||t[29]!==x||t[30]!==b||t[31]!==c||t[32]!==n){M=Symbol.for("react.early_return_sentinel");e:{let B;t[40]!==h?(B=k=>tn(k,h),t[40]=h,t[41]=B):B=t[41];const V=e.filter(B);let W;t[42]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{w(null),_(null),N(!0)},t[42]=W):W=t[42];const pe=W;let we;t[43]===Symbol.for("react.memo_cache_sentinel")?(we=k=>{w(null),_(k),N(!0)},t[43]=we):we=t[43];const _e=we;let ie;t[44]===Symbol.for("react.memo_cache_sentinel")?(ie=k=>{w(k),N(!0)},t[44]=ie):ie=t[44];const be=ie;I=v??H,q=g||!!H;let Ee;if(t[45]!==Y?(Ee=()=>{N(!1),w(null),_(null),Y()},t[45]=Y,t[46]=Ee):Ee=t[46],T=Ee,l&&e.length===0){let k;t[47]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ms,{size:20,className:"animate-spin text-muted-foreground"})}),t[47]=k):k=t[47],M=k;break e}me="flex min-h-0 flex-1 flex-col";let De;t[48]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[48]=De):De=t[48];let Z;t[49]!==h||t[50]!==e.length||t[51]!==c?(Z=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(rn,{filters:h,members:c,onChange:y})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(an,{filters:h,members:c,onChange:y})})]}),t[49]=h,t[50]=e.length,t[51]=c,t[52]=Z):Z=t[52];const Ae=x==="list";let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>j("list"),t[53]=oe):oe=t[53];let ce;t[54]!==Ae?(ce=s.jsx(ds,{active:Ae,onClick:oe,icon:Vs,label:"List"}),t[54]=Ae,t[55]=ce):ce=t[55];const ge=x==="board";let ke;t[56]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>j("board"),t[56]=ke):ke=t[56];let ee;t[57]!==ge?(ee=s.jsx(ds,{active:ge,onClick:ke,icon:Qs,label:"Board"}),t[57]=ge,t[58]=ee):ee=t[58];let te;t[59]!==ce||t[60]!==ee?(te=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[ce,ee]}),t[59]=ce,t[60]=ee,t[61]=te):te=t[61];let de;t[62]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsxs(ye,{size:"sm",onClick:pe,children:[s.jsx(Zt,{size:16}),"New task"]}),t[62]=de):de=t[62];let ue;t[63]!==te?(ue=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[te,de]}),t[63]=te,t[64]=ue):ue=t[64],t[65]!==Z||t[66]!==ue?(le=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[De,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Z,ue]})]}),t[65]=Z,t[66]=ue,t[67]=le):le=t[67],K=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):V.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(ye,{variant:"outline",size:"sm",onClick:()=>y(Et),children:"Clear filters"})]})}):x==="board"?s.jsx(hn,{items:V,memberByUserId:b,onOpen:be,onCreate:_e,onMove:(k,Ft)=>a.update.mutate({id:k,status:Ft}),onAutoFix:n?k=>{if(!d){f(!0);return}a.update.mutate({id:k.id,assigneeId:$e})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:V.map(k=>s.jsx(yn,{item:k,assignee:k.assigneeId?b.get(k.assigneeId):void 0,assignedBy:k.assignedBy?b.get(k.assignedBy):void 0,onOpen:()=>be(k)},k.id))})})}t[20]=a,t[21]=Y,t[22]=H,t[23]=g,t[24]=v,t[25]=h,t[26]=d,t[27]=l,t[28]=e,t[29]=x,t[30]=b,t[31]=c,t[32]=n,t[33]=I,t[34]=T,t[35]=q,t[36]=K,t[37]=M,t[38]=me,t[39]=le}else I=t[33],T=t[34],q=t[35],K=t[36],M=t[37],me=t[38],le=t[39];if(M!==Symbol.for("react.early_return_sentinel"))return M;const fe=q?I?.id??`new-${C??"default"}`:"closed",Te=I??void 0,ft=C??void 0,xt=a.create.isPending||a.update.isPending;let xe;t[68]!==a.create||t[69]!==a.update||t[70]!==I||t[71]!==T?(xe=B=>{I?a.update.mutate({id:I.id,...B}):a.create.mutate(B),T()},t[68]=a.create,t[69]=a.update,t[70]=I,t[71]=T,t[72]=xe):xe=t[72];let X;t[73]!==a.remove||t[74]!==I||t[75]!==T?(X=I?()=>{a.remove.mutate(I.id),T()}:void 0,t[73]=a.remove,t[74]=I,t[75]=T,t[76]=X):X=t[76];let ne;t[77]!==I||t[78]!==F?(ne=I?()=>{F(I)}:void 0,t[77]=I,t[78]=F,t[79]=ne):ne=t[79];let J;t[80]!==T||t[81]!==R?(J=B=>{B.virtualMcpId&&(T(),R(B.threadId,B.virtualMcpId,{main:B.hasPreview?"preview":"board"}))},t[80]=T,t[81]=R,t[82]=J):J=t[82];let Ce;t[83]!==T||t[84]!==q||t[85]!==fe||t[86]!==Te||t[87]!==ft||t[88]!==xt||t[89]!==xe||t[90]!==X||t[91]!==ne||t[92]!==J?(Ce=s.jsx(Gl,{open:q,onClose:T,item:Te,defaultStatus:ft,isSaving:xt,onSubmit:xe,onDelete:X,onNewChat:ne,onOpenThread:J},fe),t[83]=T,t[84]=q,t[85]=fe,t[86]=Te,t[87]=ft,t[88]=xt,t[89]=xe,t[90]=X,t[91]=ne,t[92]=J,t[93]=Ce):Ce=t[93];let ae;t[94]!==u?(ae=s.jsx(gn,{open:u,onOpenChange:f}),t[94]=u,t[95]=ae):ae=t[95];let re;return t[96]!==K||t[97]!==Ce||t[98]!==ae||t[99]!==me||t[100]!==le?(re=s.jsxs("div",{className:me,children:[le,K,Ce,ae]}),t[96]=K,t[97]=Ce,t[98]=ae,t[99]=me,t[100]=le,t[101]=re):re=t[101],re}function pn(t){return[t.userId,t]}function gn(t){const e=O.c(14),{open:l,onOpenChange:a}=t,{connect:n,isConnecting:r}=$l("deco/mcp-github");let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(tl,{children:[s.jsx(gs,{children:"Connect GitHub"}),s.jsx(sl,{children:"Auto-fix hands the task to the Super Agent, which opens a pull request with the change. Connect GitHub so it can push and open PRs."})]}),e[0]=o):o=e[0];let i;e[1]!==n||e[2]!==a?(i=async()=>{await n(),a(!1)},e[1]=n,e[2]=a,e[3]=i):i=e[3];let d;e[4]!==r?(d=r?s.jsx(ms,{size:16,className:"animate-spin"}):s.jsx(el,{className:"size-4"}),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==r||e[7]!==i||e[8]!==d?(u=s.jsxs(xs,{className:"sm:max-w-md",children:[o,s.jsx(ll,{children:s.jsxs(ye,{onClick:i,disabled:r,className:"gap-2",children:[d,"Connect GitHub"]})})]}),e[6]=r,e[7]=i,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==a||e[11]!==l||e[12]!==u?(f=s.jsx(ps,{open:l,onOpenChange:a,children:u}),e[10]=a,e[11]=l,e[12]=u,e[13]=f):f=e[13],f}function ds(t){const e=O.c(11),{active:l,onClick:a,icon:n,label:r}=t,o=`${r} view`,i=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==i?(d=E("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",i),e[0]=i,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx(n,{size:14}),e[2]=n,e[3]=u):u=e[3];let f;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==d||e[9]!==u?(f=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,"aria-pressed":l,className:d,children:[u,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=o,e[8]=d,e[9]=u,e[10]=f):f=e[10],f}function hn(t){const e=O.c(12),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:o,onAutoFix:i}=t,[d,u]=z.useState(null),f=z.useRef(null);let p;e[0]!==l?(p=l.map(bn).join(","),e[0]=l,e[1]=p):p=e[1],un(f,p);let m;e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==d?(m=ws.map(x=>{const j=l.filter(g=>g.status===x),h=je[x],y=h.icon;return s.jsxs("div",{onDragOver:g=>{g.preventDefault(),u(x)},onDragLeave:g=>{g.currentTarget.contains(g.relatedTarget)||u(null)},onDrop:g=>{g.preventDefault();const N=g.dataTransfer.getData("text/plain");N&&o(N,x),u(null)},className:E("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",d===x&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(y,{size:15,className:E("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>r(x),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Zt,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(g=>s.jsx(jn,{item:g,assignee:g.assigneeId?a.get(g.assigneeId):void 0,assignedBy:g.assignedBy?a.get(g.assignedBy):void 0,onOpen:()=>n(g),onAutoFix:i?()=>i(g):void 0},g.id))})]},x)}),e[2]=l,e[3]=a,e[4]=i,e[5]=r,e[6]=o,e[7]=n,e[8]=d,e[9]=m):m=e[9];let b;return e[10]!==m?(b=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:m})}),e[10]=m,e[11]=b):b=e[11],b}function bn(t){return`${t.id}:${t.status}`}function jn(t){const e=O.c(33),{item:l,assignee:a,assignedBy:n,onOpen:r,onAutoFix:o}=t,i=je[l.status],d=i.icon,u=Rl(l)?.lastMessage,f=o&&(l.status==="triage"||l.status==="todo")&&l.assigneeId!==$e,p=l.id;let c;e[0]!==l.id?(c=C=>{C.dataTransfer.setData("text/plain",l.id),C.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=c):c=e[1];const m=l.title;let b;e[2]!==i.iconClassName?(b=E("mt-px shrink-0",i.iconClassName),e[2]=i.iconClassName,e[3]=b):b=e[3];let x;e[4]!==d||e[5]!==b?(x=s.jsx(d,{size:16,className:b}),e[4]=d,e[5]=b,e[6]=x):x=e[6];let j;e[7]!==l.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=j):j=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(As,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let y;e[13]!==x||e[14]!==j||e[15]!==h?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[x,j,h]}),e[13]=x,e[14]=j,e[15]=h,e[16]=y):y=e[16];let g;e[17]!==u?(g=u&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:u}),e[17]=u,e[18]=g):g=e[18];let N;e[19]!==l?(N=(Yt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Yt(l)&&s.jsx(ks,{}),l.priority!=="none"&&s.jsx(Is,{priority:l.priority}),l.dueDate&&s.jsx(Ts,{iso:l.dueDate})]}),e[19]=l,e[20]=N):N=e[20];let v;e[21]!==o||e[22]!==f?(v=f&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),o()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ys,{size:12}),"Auto-fix"]}),e[21]=o,e[22]=f,e[23]=v):v=e[23];let w;return e[24]!==l.id||e[25]!==l.title||e[26]!==r||e[27]!==N||e[28]!==v||e[29]!==c||e[30]!==y||e[31]!==g?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":p,onDragStart:c,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:m,children:[y,g,N,v]}),e[24]=l.id,e[25]=l.title,e[26]=r,e[27]=N,e[28]=v,e[29]=c,e[30]=y,e[31]=g,e[32]=w):w=e[32],w}function yn(t){const e=O.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,o=je[l.status],i=o.icon;let d;e[0]!==o.iconClassName?(d=E("shrink-0",o.iconClassName),e[0]=o.iconClassName,e[1]=d):d=e[1];let u;e[2]!==i||e[3]!==d?(u=s.jsx(i,{size:16,className:d}),e[2]=i,e[3]=d,e[4]=u):u=e[4];let f;e[5]!==l.title?(f=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]=f):f=e[6];let p;e[7]!==l?(p=Yt(l)&&s.jsx(ks,{}),e[7]=l,e[8]=p):p=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Is,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let m;e[11]!==l.dueDate?(m=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ts,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=m):m=e[12];let b;e[13]!==n||e[14]!==a||e[15]!==l?(b=s.jsx(As,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=b):b=e[16];let x;e[17]!==l.createdAt?(x=fl(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=x):x=e[18];let j;e[19]!==x?(j=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:x}),e[19]=x,e[20]=j):j=e[20];let h;return e[21]!==r||e[22]!==u||e[23]!==f||e[24]!==p||e[25]!==c||e[26]!==m||e[27]!==b||e[28]!==j?(h=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[u,f,p,c,m,b,j]}),e[21]=r,e[22]=u,e[23]=f,e[24]=p,e[25]=c,e[26]=m,e[27]=b,e[28]=j,e[29]=h):h=e[29],h}const ca=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:zs,default:mn},Symbol.toStringTag,{value:"Module"}));export{Se as P,je as S,Gl as T,Fl as a,Bl as b,Ie as c,zs as d,ca as i,$l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-JkzY1USm.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as Cs,l as ce,j as r,U as $s,i as Ps,B as J,aL as jn,t as ue,w as Es,L as Ds,e as Ts,b as kn,u as Sn,E as Et}from"./index-BSxh64hl.js";import{s as Nn}from"./Eye-CuMpXJkc.js";import{a as ut}from"./Palette-DCkpyAzO.js";import{s as Fs}from"./Plus-BnnQdSS2.js";import{i as Is}from"./SearchLg-CJDpvrzu.js";import{i as ft}from"./Upload01-B1HnYX_L.js";import{s as zn}from"./XClose-bVEi_3Z9.js";import{i as Ut}from"./Zap-DenhxUDB.js";import{u as Cn}from"./use-mobile-jR7vc4lZ.js";import{f as Ms,a as Ls,b as Os,c as Rs,d as As,e as _s,A as Us,g as Bs}from"./alert-dialog-AMD4bxPu.js";import{D as $n,a as Ue,d as Je,e as et,i as Pn,h as Hs,c as qs}from"./dialog-7Hh4EEds.js";import{I as Ve}from"./input-HA5GlV6J.js";import{F as ke,M as Bt,d as En}from"./file-type-icon-oaWPVcXq.js";import{T as Ks}from"./toolbar-J4RI9xFD.js";import{a as Ws}from"./Package-BI2BjUtD.js";import{u as Gs}from"./use-debounced-value--fL8uLzq.js";import{p as gt,b as le,a as Me,c as Dn,d as Vs}from"./location-BpLtHjTZ.js";import{b as Xs,f as at,s as Qs,c as tn,d as Ys,g as Zs,i as Js,h as Tn,a as Fn,j as el,e as tl}from"./ZoomOut-ZBq0pI6d.js";import{S as ae}from"./skeleton-CFpB1jha.js";import{T as nl}from"./textarea-Z5OnX3vK.js";import{t as sl}from"./ChevronDown-D4DHAf0j.js";import{n as ll}from"./ChevronUp-Cu19ewZf.js";import{i as ht}from"./X-C1Hb-T06.js";import{P as rl,b as il,a as ol}from"./popover-tA9PDjW1.js";import{b as be,T as ye,a as ve}from"./tooltip-Di8Co4Sg.js";import{i as al}from"./Check-D3n4gRJc.js";import{a as cl}from"./Copy01-D0NIZWk6.js";import{n as Xe,i as bt}from"./Globe01-CtGNOAC_.js";import{i as In}from"./Key01-BDTnv2QH.js";import{n as Mn}from"./LinkExternal01-0cXhXnwo.js";import{l as dl,F as ul}from"./index-Dv0yuO1h.js";import{a as fl}from"./Image01-BAGsNaQU.js";import{D as Ht,a as qt,c as Kt,d as Fe}from"./dropdown-menu-BJz5vhZu.js";import{i as hl}from"./LayoutLeft-DFfT9PNh.js";import{i as ml}from"./ChevronRight-RInm-aVw.js";import{t as pl}from"./Stars01-BQF4fDG0.js";import{i as Ln}from"./DotsVertical-ZkH87H22.js";import{s as On}from"./Trash01-CnVHiwXT.js";function Rn(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Wt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(xl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function xl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function An(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function gl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function bl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function yl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Oo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(vl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function vl(n){return{volume:n.volume,path:n.path}}async function Ro(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function wl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const jl=new Set(["md","mdx","markdown","txt","text"]),kl=25,Sl=64*1024,Nl=256*1024,zl=4;function Cl(n){const e=n.lastIndexOf(".");return e===-1?!1:jl.has(n.slice(e+1).toLowerCase())}async function Ao(n,e,t){const s=t?`${t}/`:"",l=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await fe(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<zl&&a.push({path:m.path,depth:u.depth+1});continue}Cl(m.path)&&m.size<=Sl&&i.length<kl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>wl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>Nl){o.push(l(u));return}f+=m.length,d.push({relPath:l(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function _n(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function $l(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function Un(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Pl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(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]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.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 o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Ot(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await fe(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]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await fe(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 fe(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 yt=S.createContext(null);yt.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"},Gt=10,Te=S.useLayoutEffect,nn=Cs.useId,El=typeof nn=="function"?nn:()=>null;let Dl=0;function Vt(n=null){const e=El(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Dl++),n??t.current}function Bn({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(yt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Vt(o),I=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=I.current,H={...O};I.current.id=v,I.current.idIsFromProps=o!==void 0,I.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(I.current,H)}),Te(()=>{const U=I.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(I.current)},expand:U=>{y(I.current,U)},getId(){return v},getSize(){return j(I.current)},isCollapsed(){return k(I.current)},isExpanded(){return!k(I.current)},resize:U=>{R(I.current,U)}}),[x,y,j,k,v,R]);const Z=N(I.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Hn=S.forwardRef((n,e)=>S.createElement(Bn,{...n,forwardedRef:e}));Bn.displayName="Panel";Hn.displayName="forwardRef(Panel)";let Rt=null,dt=-1,ze=null;function Tl(n,e){if(e){const t=(e&Vn)!==0,s=(e&Xn)!==0,l=(e&Qn)!==0,i=(e&Yn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)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 Fl(){ze!==null&&(document.head.removeChild(ze),Rt=null,ze=null,dt=-1)}function Dt(n,e){var t,s;const l=Tl(n,e);if(Rt!==l){if(Rt=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),dt>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(dt)}dt=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function qn(n){return n.type==="keydown"}function Kn(n){return n.type.startsWith("pointer")}function Wn(n){return n.type.startsWith("mouse")}function vt(n){if(Kn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Wn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Il(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ml(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 Ll(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:rn(n),b:rn(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 l={a:ln(sn(t.a)),b:ln(sn(t.b))};if(l.a===l.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(l.a-l.b)}const Ol=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Rl(n){var e;const t=getComputedStyle((e=Gn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Al(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Rl(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"||Ol.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function sn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Al(t))return t}return null}function ln(n){return n&&Number(getComputedStyle(n).zIndex)||0}function rn(n){const e=[];for(;n;)e.push(n),n=Gn(n);return e}function Gn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Vn=1,Xn=2,Qn=4,Yn=8,_l=Il()==="coarse";let xe=[],_e=!1,De=new Map,wt=new Map;const Qe=new Set;function Ul(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),mt(),function(){var f;wt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),mt(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),l("up",!0,null)}}}function Bl(n){const{target:e}=n,{x:t,y:s}=vt(n);_e=!0,Xt({target:e,x:t,y:s}),mt(),xe.length>0&&(pt("down",n),n.preventDefault(),Zn(e)||n.stopImmediatePropagation())}function Tt(n){const{x:e,y:t}=vt(n);if(_e&&n.buttons===0&&(_e=!1,pt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}pt("move",n),Qt(),xe.length>0&&n.preventDefault()}function Ft(n){const{target:e}=n,{x:t,y:s}=vt(n);wt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Zn(e)||n.stopImmediatePropagation()),pt("up",n),Xt({target:e,x:t,y:s}),Qt(),mt()}function Zn(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(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=_l?o.coarse:o.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)&&Ll(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Ml(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function It(n,e){wt.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;wt.forEach(s=>{t|=s}),n&&e?Dt("intersection",t):n?Dt("horizontal",t):e?Dt("vertical",t):Fl()}let Mt=new AbortController;function mt(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Ft,n),s.addEventListener("pointerleave",Tt,n),s.addEventListener("pointermove",Tt,n))}),window.addEventListener("pointerup",Ft,n),window.addEventListener("pointercancel",Ft,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Bl,n),s.addEventListener("pointermove",Tt,n))}))}function pt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Hl(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Ie(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Gt){return Ie(n,e,t)===0}function me(n,e,t){return Ie(n,e,t)===0}function ql(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,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:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Ie(t,a)<0)if(i){const c=(l+a)/2;Ie(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,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;Ie(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a: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;Ie(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,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?a: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,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(ql(l,o))return l;{const u=n<0?c:a,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(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[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,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:l}function Kl({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,l=p):(i+=g,o+=p)});const c=Math.min(l,100-i),d=Math.max(s,100-o),f=n[a];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 Jn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function es(n,e,t){const s=Jn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function ts(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 jt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Wl(n,e,t,s=document){var l,i,o,a;const c=jt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Gl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Kl({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[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()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=ts(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]=Wl(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:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:es(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}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 ns(n,e){const t=n==="horizontal",{x:s,y:l}=vt(e);return t?s:l}function Vl(n,e,t,s,l){const i=t==="horizontal",o=jt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ns(t,n),f=ts(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Xl(n,e,t,s,l,i){if(qn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Vl(n,e,t,s,i)}function Ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Le(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function ct(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 Yl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Zl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function an(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 ss(n){return`react-resizable-panels:${n}`}function ls(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function rs(n,e){try{const t=ss(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Jl(n,e,t){var s,l;const i=(s=rs(n,t))!==null&&s!==void 0?s:{},o=ls(e);return(l=i[o])!==null&&l!==void 0?l:null}function er(n,e,t,s,l){var i;const o=ss(n),a=ls(e),c=(i=rs(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function cn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,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 o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const tr=100,qe={getItem:n=>(an(qe),qe.getItem(n)),setItem:(n,e)=>{an(qe),qe.setItem(n,e)}},dn={};function is({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Hl(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:M,panelDataArray:L}=w.current,D=cn({layout:z,panelConstraints:L.map(A=>A.constraints)});on(M,D)||(x(D),w.current.layout=D,F&&F(D),Le(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Gl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=dn[n];F==null&&(F=Zl(er,tr),dn[n]=F);const M=[...z],L=new Map(N.current);F(n,M,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:M,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,M);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:M,panelConstraints:D,pivotIndices:te,prevLayout:M,trigger:"imperative-api"});ct(M,V)||(x(V),w.current.layout=V,F&&F(V),Le(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:M}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});ct(L,oe)||(x(oe),w.current.layout=oe,M&&M(oe),Le(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{panelSize:L}=Ee(M,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:M}=w.current,L=Oe(M,z);return Yl({defaultSize:F,dragState:p,layout:b,panelData:M,panelIndex:L})},[p,b]),I=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(M,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(M,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Ie(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((M,L)=>{const D=M.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:M}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Jl(z,D,M);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Ql({panelDataArray:D}));const Q=cn({layout:A,panelConstraints:D.map(te=>te.constraints)});on(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Le(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const M=m.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=es(he,z,A);let oe=Xl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const $t=ge.map(Pt=>Pt.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:$t,pivotIndices:$e,prevLayout:ne,trigger:qn(D)?"keyboard":"mouse-or-touch"}),it=!ct(ne,Pe);(Kn(D)||Wn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?It(z,oe<0?Vn:Xn):It(z,oe<0?Qn:Yn):It(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Le(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:M}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});ct(L,V)||(x(V),w.current.layout=V,M&&M(V),Le(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:M,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,M);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:M}=k.current,{layout:L}=w.current;if(!m.current)return;const D=jt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ns(M,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,M=Oe(F,z);M>=0&&(F.splice(M,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:I,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,I,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(yt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const os=S.forwardRef((n,e)=>S.createElement(is,{...n,forwardedRef:e}));is.displayName="PanelGroup";os.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function nr({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=jt(e,s);if(l==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Jn(a,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function as({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(yt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Vt(l),[v,I]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ul(_,T,N,{coarse:q,fine:ee},(F,M,L)=>{if(!M){I("inactive");return}switch(F){case"down":{I("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&I("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{I("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),nr({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}as.displayName="PanelResizeHandle";function sr(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==l||e[8]!==i?(o=r.jsx(os,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function un(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=r.jsx(Hn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function lr(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("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 o;e[6]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Xs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(as,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function rr(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 ir(n){if(rr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function or(n){try{return decodeURIComponent(n)}catch{return n}}function ar(n){return ir(n),encodeURIComponent(n)}function cr(n){return`.deco/blocks/${ar(n)}.json`}function _o(n){return`/${cr(n)}`}const Uo=1e4,dr=3;function At(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function kt(n){return n.startsWith("/")?n.slice(1):n}function Bo(n){const e=kt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function xt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function ur(n){const e=xt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ho(n,e){const t=e.replace(/^\/+|\/+$/g,"");return xt(t?`${n==="/"?"":n}/${t}`:n)}function qo(n,e){return e==="directory"?n:ur(n)}function Ko(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 fr(n){const e=kt(n);return e?e.split("/").filter(Boolean).length:0}function Wo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Go(n,e){return fr(n)>=dr&&!e.has(n)}function Vo(n,e,t=[]){const s=kt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Xo(n){const e=kt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return or(s)}function hr(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"}const mr="#94a3b8";function Qo(n){const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:at,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:at,color:"#d9a441"}:e.endsWith(".json")?{Icon:Qs,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:at,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:at,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:fl,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:tn,color:"#64748b"}:{Icon:tn,color:mr}}function Yo(n){const e=At(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Zo(n,e=[]){const t={children:[]},s=i=>{const a=At(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){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 a=At(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.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(xt(i));const l=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&l(o.children)};return l(t.children),t.children}function pr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...pr(l.children,e,t+1)));return s}function Jo(n){return n.split(`
|
|
1
|
+
import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as Cs,l as ce,j as r,U as $s,i as Ps,B as J,aL as jn,t as ue,w as Es,L as Ds,e as Ts,b as kn,u as Sn,E as Et}from"./index-JkzY1USm.js";import{s as Nn}from"./Eye-u_eyLJkM.js";import{a as ut}from"./Palette-Q_tRuOMf.js";import{s as Fs}from"./Plus-Bt0qDPEV.js";import{i as Is}from"./SearchLg-DSuw112A.js";import{i as ft}from"./Upload01-Dz_C9C_o.js";import{s as zn}from"./XClose-DEI4maVJ.js";import{i as Ut}from"./Zap-CbZARwtr.js";import{u as Cn}from"./use-mobile-DCYqAZ4D.js";import{f as Ms,a as Ls,b as Os,c as Rs,d as As,e as _s,A as Us,g as Bs}from"./alert-dialog-YVSboGyg.js";import{D as $n,a as Ue,d as Je,e as et,i as Pn,h as Hs,c as qs}from"./dialog-B71p2x2p.js";import{I as Ve}from"./input-typWdmM2.js";import{F as ke,M as Bt,d as En}from"./file-type-icon-CrVWqTLg.js";import{T as Ks}from"./toolbar-B6T3nvfB.js";import{a as Ws}from"./Package-CMkd2sHI.js";import{u as Gs}from"./use-debounced-value-CNzGGbsu.js";import{p as gt,b as le,a as Me,c as Dn,d as Vs}from"./location-BpLtHjTZ.js";import{b as Xs,f as at,s as Qs,c as tn,d as Ys,g as Zs,i as Js,h as Tn,a as Fn,j as el,e as tl}from"./ZoomOut-CUl1mvu1.js";import{S as ae}from"./skeleton-BN44BcrT.js";import{T as nl}from"./textarea-COeZkp4P.js";import{t as sl}from"./ChevronDown-BOF5C-lc.js";import{n as ll}from"./ChevronUp-BgF4lo04.js";import{i as ht}from"./X-CuXL2cLN.js";import{P as rl,b as il,a as ol}from"./popover--4QSfinM.js";import{b as be,T as ye,a as ve}from"./tooltip-8XxDCvjI.js";import{i as al}from"./Check-2hvdb-vm.js";import{a as cl}from"./Copy01-JoQTJv1g.js";import{n as Xe,i as bt}from"./Globe01-BLXYE4Cy.js";import{i as In}from"./Key01-TX-oFrbw.js";import{n as Mn}from"./LinkExternal01-B0gcEmkE.js";import{l as dl,F as ul}from"./index-CoSY6fwz.js";import{a as fl}from"./Image01-DVYnawJP.js";import{D as Ht,a as qt,c as Kt,d as Fe}from"./dropdown-menu-CCDOmXjQ.js";import{i as hl}from"./LayoutLeft-C1tijNFg.js";import{i as ml}from"./ChevronRight-Gt0dyTZv.js";import{t as pl}from"./Stars01-yVlwMkQy.js";import{i as Ln}from"./DotsVertical-D5iMp6bE.js";import{s as On}from"./Trash01-D3uneq9V.js";function Rn(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Wt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(xl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function xl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function An(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function gl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function bl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function yl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Oo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(vl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function vl(n){return{volume:n.volume,path:n.path}}async function Ro(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function wl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const jl=new Set(["md","mdx","markdown","txt","text"]),kl=25,Sl=64*1024,Nl=256*1024,zl=4;function Cl(n){const e=n.lastIndexOf(".");return e===-1?!1:jl.has(n.slice(e+1).toLowerCase())}async function Ao(n,e,t){const s=t?`${t}/`:"",l=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await fe(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<zl&&a.push({path:m.path,depth:u.depth+1});continue}Cl(m.path)&&m.size<=Sl&&i.length<kl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>wl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>Nl){o.push(l(u));return}f+=m.length,d.push({relPath:l(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function _n(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function $l(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function Un(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Pl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(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]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.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 o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Ot(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await fe(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]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await fe(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 fe(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 yt=S.createContext(null);yt.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"},Gt=10,Te=S.useLayoutEffect,nn=Cs.useId,El=typeof nn=="function"?nn:()=>null;let Dl=0;function Vt(n=null){const e=El(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Dl++),n??t.current}function Bn({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(yt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Vt(o),I=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=I.current,H={...O};I.current.id=v,I.current.idIsFromProps=o!==void 0,I.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(I.current,H)}),Te(()=>{const U=I.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(I.current)},expand:U=>{y(I.current,U)},getId(){return v},getSize(){return j(I.current)},isCollapsed(){return k(I.current)},isExpanded(){return!k(I.current)},resize:U=>{R(I.current,U)}}),[x,y,j,k,v,R]);const Z=N(I.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Hn=S.forwardRef((n,e)=>S.createElement(Bn,{...n,forwardedRef:e}));Bn.displayName="Panel";Hn.displayName="forwardRef(Panel)";let Rt=null,dt=-1,ze=null;function Tl(n,e){if(e){const t=(e&Vn)!==0,s=(e&Xn)!==0,l=(e&Qn)!==0,i=(e&Yn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)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 Fl(){ze!==null&&(document.head.removeChild(ze),Rt=null,ze=null,dt=-1)}function Dt(n,e){var t,s;const l=Tl(n,e);if(Rt!==l){if(Rt=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),dt>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(dt)}dt=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function qn(n){return n.type==="keydown"}function Kn(n){return n.type.startsWith("pointer")}function Wn(n){return n.type.startsWith("mouse")}function vt(n){if(Kn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Wn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Il(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ml(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 Ll(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:rn(n),b:rn(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 l={a:ln(sn(t.a)),b:ln(sn(t.b))};if(l.a===l.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(l.a-l.b)}const Ol=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Rl(n){var e;const t=getComputedStyle((e=Gn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Al(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Rl(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"||Ol.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function sn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Al(t))return t}return null}function ln(n){return n&&Number(getComputedStyle(n).zIndex)||0}function rn(n){const e=[];for(;n;)e.push(n),n=Gn(n);return e}function Gn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Vn=1,Xn=2,Qn=4,Yn=8,_l=Il()==="coarse";let xe=[],_e=!1,De=new Map,wt=new Map;const Qe=new Set;function Ul(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),mt(),function(){var f;wt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),mt(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),l("up",!0,null)}}}function Bl(n){const{target:e}=n,{x:t,y:s}=vt(n);_e=!0,Xt({target:e,x:t,y:s}),mt(),xe.length>0&&(pt("down",n),n.preventDefault(),Zn(e)||n.stopImmediatePropagation())}function Tt(n){const{x:e,y:t}=vt(n);if(_e&&n.buttons===0&&(_e=!1,pt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}pt("move",n),Qt(),xe.length>0&&n.preventDefault()}function Ft(n){const{target:e}=n,{x:t,y:s}=vt(n);wt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Zn(e)||n.stopImmediatePropagation()),pt("up",n),Xt({target:e,x:t,y:s}),Qt(),mt()}function Zn(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(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=_l?o.coarse:o.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)&&Ll(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Ml(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function It(n,e){wt.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;wt.forEach(s=>{t|=s}),n&&e?Dt("intersection",t):n?Dt("horizontal",t):e?Dt("vertical",t):Fl()}let Mt=new AbortController;function mt(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Ft,n),s.addEventListener("pointerleave",Tt,n),s.addEventListener("pointermove",Tt,n))}),window.addEventListener("pointerup",Ft,n),window.addEventListener("pointercancel",Ft,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Bl,n),s.addEventListener("pointermove",Tt,n))}))}function pt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Hl(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Ie(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Gt){return Ie(n,e,t)===0}function me(n,e,t){return Ie(n,e,t)===0}function ql(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,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:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Ie(t,a)<0)if(i){const c=(l+a)/2;Ie(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,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;Ie(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a: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;Ie(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,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?a: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,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(ql(l,o))return l;{const u=n<0?c:a,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(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[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,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:l}function Kl({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,l=p):(i+=g,o+=p)});const c=Math.min(l,100-i),d=Math.max(s,100-o),f=n[a];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 Jn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function es(n,e,t){const s=Jn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function ts(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 jt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Wl(n,e,t,s=document){var l,i,o,a;const c=jt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Gl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Kl({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[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()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=ts(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]=Wl(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:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:es(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}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 ns(n,e){const t=n==="horizontal",{x:s,y:l}=vt(e);return t?s:l}function Vl(n,e,t,s,l){const i=t==="horizontal",o=jt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ns(t,n),f=ts(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Xl(n,e,t,s,l,i){if(qn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Vl(n,e,t,s,i)}function Ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Le(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function ct(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 Yl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Zl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function an(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 ss(n){return`react-resizable-panels:${n}`}function ls(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function rs(n,e){try{const t=ss(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Jl(n,e,t){var s,l;const i=(s=rs(n,t))!==null&&s!==void 0?s:{},o=ls(e);return(l=i[o])!==null&&l!==void 0?l:null}function er(n,e,t,s,l){var i;const o=ss(n),a=ls(e),c=(i=rs(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function cn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,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 o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const tr=100,qe={getItem:n=>(an(qe),qe.getItem(n)),setItem:(n,e)=>{an(qe),qe.setItem(n,e)}},dn={};function is({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Hl(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:M,panelDataArray:L}=w.current,D=cn({layout:z,panelConstraints:L.map(A=>A.constraints)});on(M,D)||(x(D),w.current.layout=D,F&&F(D),Le(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Gl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=dn[n];F==null&&(F=Zl(er,tr),dn[n]=F);const M=[...z],L=new Map(N.current);F(n,M,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:M,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,M);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:M,panelConstraints:D,pivotIndices:te,prevLayout:M,trigger:"imperative-api"});ct(M,V)||(x(V),w.current.layout=V,F&&F(V),Le(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:M}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});ct(L,oe)||(x(oe),w.current.layout=oe,M&&M(oe),Le(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{panelSize:L}=Ee(M,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:M}=w.current,L=Oe(M,z);return Yl({defaultSize:F,dragState:p,layout:b,panelData:M,panelIndex:L})},[p,b]),I=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(M,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:M}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(M,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Ie(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((M,L)=>{const D=M.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:M}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Jl(z,D,M);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Ql({panelDataArray:D}));const Q=cn({layout:A,panelConstraints:D.map(te=>te.constraints)});on(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Le(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const M=m.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=es(he,z,A);let oe=Xl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const $t=ge.map(Pt=>Pt.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:$t,pivotIndices:$e,prevLayout:ne,trigger:qn(D)?"keyboard":"mouse-or-touch"}),it=!ct(ne,Pe);(Kn(D)||Wn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?It(z,oe<0?Vn:Xn):It(z,oe<0?Qn:Yn):It(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Le(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:M}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});ct(L,V)||(x(V),w.current.layout=V,M&&M(V),Le(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:M,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,M);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:M}=k.current,{layout:L}=w.current;if(!m.current)return;const D=jt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ns(M,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,M=Oe(F,z);M>=0&&(F.splice(M,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:I,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,I,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(yt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const os=S.forwardRef((n,e)=>S.createElement(is,{...n,forwardedRef:e}));is.displayName="PanelGroup";os.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function nr({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=jt(e,s);if(l==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Jn(a,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function as({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(yt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Vt(l),[v,I]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ul(_,T,N,{coarse:q,fine:ee},(F,M,L)=>{if(!M){I("inactive");return}switch(F){case"down":{I("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&I("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{I("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),nr({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}as.displayName="PanelResizeHandle";function sr(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==l||e[8]!==i?(o=r.jsx(os,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function un(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=r.jsx(Hn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function lr(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);let i;e[4]!==t?(i=ce("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 o;e[6]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Xs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(as,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function rr(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 ir(n){if(rr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function or(n){try{return decodeURIComponent(n)}catch{return n}}function ar(n){return ir(n),encodeURIComponent(n)}function cr(n){return`.deco/blocks/${ar(n)}.json`}function _o(n){return`/${cr(n)}`}const Uo=1e4,dr=3;function At(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function kt(n){return n.startsWith("/")?n.slice(1):n}function Bo(n){const e=kt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function xt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function ur(n){const e=xt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ho(n,e){const t=e.replace(/^\/+|\/+$/g,"");return xt(t?`${n==="/"?"":n}/${t}`:n)}function qo(n,e){return e==="directory"?n:ur(n)}function Ko(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 fr(n){const e=kt(n);return e?e.split("/").filter(Boolean).length:0}function Wo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Go(n,e){return fr(n)>=dr&&!e.has(n)}function Vo(n,e,t=[]){const s=kt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Xo(n){const e=kt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return or(s)}function hr(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"}const mr="#94a3b8";function Qo(n){const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:at,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:at,color:"#d9a441"}:e.endsWith(".json")?{Icon:Qs,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:at,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:at,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:fl,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:tn,color:"#64748b"}:{Icon:tn,color:mr}}function Yo(n){const e=At(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Zo(n,e=[]){const t={children:[]},s=i=>{const a=At(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){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 a=At(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.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(xt(i));const l=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&l(o.children)};return l(t.children),t.children}function pr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...pr(l.children,e,t+1)));return s}function Jo(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}dl.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function xr(n){const e=$.c(11),{value:t,filename:s}=n,[l]=$s(),i=l.theme==="dark"||l.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=hr(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsx(Ps,{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]!==o||e[8]!==a||e[9]!==t?(h=r.jsx(ul,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function cs(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const gr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),br=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),fn=2*1024*1024;function yr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return gr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=fn?"markdown":"download":br.has(t)&&e<=fn?"text":"download"}function ds(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx(ae,{className:"h-3 w-full"}),r.jsx(ae,{className:"h-3 w-5/6"}),r.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function us(n){const e=$.c(20),{file:t,note:s}=n;let l;e[0]!==t.filename?(l=r.jsx(ke,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=l):l=e[1];let i;e[2]!==t.filename?(i=r.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=cs(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=r.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=r.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=r.jsx(Xe,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=r.jsx(J,{asChild:!0,variant:"outline",size:"sm",children:r.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]!==l||e[17]!==d||e[18]!==u?(h=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[l,d,u]})}),e[16]=l,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function hn(n){const e=$.c(16),{file:t,markdown:s}=n;let l;e[0]!==t.downloadUrl?(l=X.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=l):l=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 o;e[4]!==l||e[5]!==i?(o={queryKey:l,queryFn:i,staleTime:6e4,retry:!1},e[4]=l,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(ds,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=r.jsx(us,{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]!==a||e[11]!==u?(h=r.jsx("div",{className:"h-full overflow-y-auto",children:r.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:r.jsx(Bt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=r.jsx(xr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function fs(n){const e=$.c(15),{file:t}=n;switch(yr(t.filename,t.size)){case"image":{let l;return e[0]!==t.downloadUrl||e[1]!==t.filename?(l=r.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:r.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]=l):l=e[2],l}case"pdf":{let l;return e[3]!==t.downloadUrl||e[4]!==t.filename?(l=r.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]=l):l=e[5],l}case"html":{let l;return e[6]!==t.downloadUrl||e[7]!==t.filename?(l=r.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]=l):l=e[8],l}case"markdown":{let l;return e[9]!==t?(l=r.jsx(hn,{file:t,markdown:!0}),e[9]=t,e[10]=l):l=e[10],l}case"text":{let l;return e[11]!==t?(l=r.jsx(hn,{file:t,markdown:!1}),e[11]=t,e[12]=l):l=e[12],l}default:{let l;return e[13]!==t?(l=r.jsx(us,{file:t}),e[13]=t,e[14]=l):l=e[14],l}}}function vr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:l,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.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:r.jsx(hl,{size:14})})}),r.jsx(ve,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=r.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=r.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:a,children:f}),e[8]=a,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&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[r.jsx(jn,{size:12}),"Agent updated — reload"]})}),r.jsx(ve,{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&&r.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&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:r.jsx(Ys,{size:14})})}),r.jsx(ve,{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]!==a||e[20]!==l||e[21]!==s.deckDetected?(g=s.deckDetected?r.jsxs(Ht,{children:[r.jsx(qt,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",children:r.jsx(Xe,{size:14})})}),r.jsxs(Kt,{align:"end",children:[r.jsxs(Fe,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[r.jsx(Zs,{size:14}),"Export as PDF"]}),r.jsx(Fe,{asChild:!0,children:r.jsxs("a",{href:a,download:l,children:[r.jsx(Js,{size:14}),"Download HTML"]})})]})]}):r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:r.jsx("a",{href:a,download:l,children:r.jsx(Xe,{size:14})})})}),r.jsx(ve,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=l,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Mn,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=r.jsx(ye,{asChild:!0,children:r.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=r.jsx(ve,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=r.jsxs(be,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let C;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?(C=r.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]=C):C=e[39],C}const Re=1;function wr(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 Ne extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function hs(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function jr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?hs(t).length:null}function kr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new Ne("no <deck-viewer> element in source","no-viewer");const l=hs(s),i=e.kind==="move"?e.from:e.at,o=l[i];if(!o)throw new Ne(`slide index ${i} out of range (${l.length})`,"stale-index");switch(e.kind){case"remove":{if(l.length<=1)throw new Ne("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=l.length)throw new Ne(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?l[e.to]:l[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new Ne(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new Ne("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new Ne(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|