decocms 4.91.4 → 4.91.5
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-CF1-Ouso.js → AlertCircle-C5JfzsXz.js} +1 -1
- package/dist/client/assets/{AreaChart-C6eOWyou.js → AreaChart-AicMXMjh.js} +1 -1
- package/dist/client/assets/{ArrowUp-DsZMdHlI.js → ArrowUp-DncS146I.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Bxfx0mGn.js → ArrowUpRight-Bwindduz.js} +1 -1
- package/dist/client/assets/{CheckCircle-wiCB7A1l.js → CheckCircle-9OYWikza.js} +1 -1
- package/dist/client/assets/{ChevronDown-DyjAqI3m.js → ChevronDown-KmITfgTF.js} +1 -1
- package/dist/client/assets/{ChevronRight-Df2B68Ds.js → ChevronRight-wz9FFKI_.js} +1 -1
- package/dist/client/assets/{ChevronUp-DAExiZbv.js → ChevronUp-KIwd095M.js} +1 -1
- package/dist/client/assets/{Copy01-yl04KoRE.js → Copy01-CjAIt0B7.js} +1 -1
- package/dist/client/assets/{DotsVertical-bvDG8sRh.js → DotsVertical-BbE0kghC.js} +1 -1
- package/dist/client/assets/{Eye-BFJNvxsd.js → Eye-Dagnh8Dg.js} +1 -1
- package/dist/client/assets/{FilterLines-BqZk99p5.js → FilterLines-JYQ75o4l.js} +1 -1
- package/dist/client/assets/{Globe01-CrriuSxO.js → Globe01-8jjIiOgJ.js} +1 -1
- package/dist/client/assets/{Globe04-DACPo7x7.js → Globe04-D1T0gsTb.js} +1 -1
- package/dist/client/assets/{HardDrive-LjQciFQe.js → HardDrive-Cu04k8YT.js} +1 -1
- package/dist/client/assets/{Image01-BYSIhLh2.js → Image01-DUfewpa2.js} +1 -1
- package/dist/client/assets/{Key01-Lzz0ThQp.js → Key01-DrNnBa_d.js} +1 -1
- package/dist/client/assets/{LayoutLeft-fGt4B_V6.js → LayoutLeft-a8iQv3Q7.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BRIrxBM1.js → LinkExternal01-BxDmoIMS.js} +1 -1
- package/dist/client/assets/{Monitor01-B6UVUJyc.js → Monitor01-BuypQq_L.js} +1 -1
- package/dist/client/assets/{Package-CrYiuzsO.js → Package-CqNFUw0f.js} +1 -1
- package/dist/client/assets/{Palette-C48f3v4Y.js → Palette-W9y7yVz3.js} +1 -1
- package/dist/client/assets/{Play-DIYdniDd.js → Play-BBDiRka6.js} +1 -1
- package/dist/client/assets/{Plus-DT-2W1wT.js → Plus-DK4_uNTp.js} +1 -1
- package/dist/client/assets/{SearchLg-DTthHNBJ.js → SearchLg-DgRDpVmn.js} +1 -1
- package/dist/client/assets/{SearchMd-MXpFHXYg.js → SearchMd-BfjUCRul.js} +1 -1
- package/dist/client/assets/{Settings02-C1s-98Ge.js → Settings02-DUzQYcG3.js} +1 -1
- package/dist/client/assets/{Shield01-DWL6KGgf.js → Shield01-Dlidz0tC.js} +1 -1
- package/dist/client/assets/{Star01-DwAl9-p_.js → Star01-DrYQqgkV.js} +1 -1
- package/dist/client/assets/{Stars01-DNB2jBIt.js → Stars01-D8M_o2P1.js} +1 -1
- package/dist/client/assets/{Stars02-DcCuWVPa.js → Stars02-C6i_bRhr.js} +1 -1
- package/dist/client/assets/{Sun-CF2vhsLR.js → Sun-Cf_C-NpM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DNrUeigm.js → SwitchHorizontal01-BRnfTS5N.js} +1 -1
- package/dist/client/assets/{Tool01-CSRypqfM.js → Tool01-DjXumdS6.js} +1 -1
- package/dist/client/assets/{Tool02-CSWTlCLd.js → Tool02-CGoa2Xad.js} +1 -1
- package/dist/client/assets/{Trash01-UQjosBE6.js → Trash01-B8oIKgg4.js} +1 -1
- package/dist/client/assets/{TrendUp01-Di8K_0Ub.js → TrendUp01-BtM4seSr.js} +1 -1
- package/dist/client/assets/{Upload01-CnCVZJAv.js → Upload01-CHwMJF7R.js} +1 -1
- package/dist/client/assets/{User01-CF6pDsdw.js → User01-DdupyZi_.js} +1 -1
- package/dist/client/assets/{Users01-C_k5OJBp.js → Users01-G8DTyVLY.js} +1 -1
- package/dist/client/assets/{Users03-DTELiT5U.js → Users03-UA8Mu4a1.js} +1 -1
- package/dist/client/assets/{X-BWn3kDs2.js → X-BtlskU8h.js} +1 -1
- package/dist/client/assets/{XCircle-CrP1StfT.js → XCircle-Ckem5_86.js} +1 -1
- package/dist/client/assets/{XClose-CjGp1c1G.js → XClose-C6sEzPYN.js} +1 -1
- package/dist/client/assets/{Zap-BZCkBdl0.js → Zap-BKahSrs2.js} +1 -1
- package/dist/client/assets/{ZapSquare-C6uVpqjQ.js → ZapSquare-CVnk9Op2.js} +1 -1
- package/dist/client/assets/{ZoomOut-D_KRNWSe.js → ZoomOut-B1lVhSeE.js} +1 -1
- package/dist/client/assets/{access-gate-7v8G4_rr.js → access-gate-Cs0O_TOU.js} +1 -1
- package/dist/client/assets/{add-section-modal-Cnxg2RBD.js → add-section-modal-DnVPjhXF.js} +1 -1
- package/dist/client/assets/{agent-icon-DHXwUm9P.js → agent-icon-Dkdhr568.js} +1 -1
- package/dist/client/assets/{agents-list-beV1gPOw.js → agents-list-DQ2syxtK.js} +1 -1
- package/dist/client/assets/{ai-providers-D431dycR.js → ai-providers-Blm4VaIE.js} +1 -1
- package/dist/client/assets/{alert-CuzEy4Gd.js → alert-BnRypq9M.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dp7Qz6rw.js → alert-dialog-C9waqkx6.js} +1 -1
- package/dist/client/assets/{app-editor-DNZzH5Gm.js → app-editor-sULzMoXf.js} +1 -1
- package/dist/client/assets/{auth-SBllEMuV.js → auth-B8yoVRj9.js} +1 -1
- package/dist/client/assets/{auth-catchall-DnleSkVZ.js → auth-catchall-DaV4CGb_.js} +1 -1
- package/dist/client/assets/{auth-entry-DW4XCBMV.js → auth-entry-CbxtoBWo.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CSqKV65d.js → auth-split-layout-wsFCkH92.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-w-vDVvUb.js → authenticate-and-persist-oauth-CXcym41q.js} +1 -1
- package/dist/client/assets/{automation-list-row-DxqyB35q.js → automation-list-row-DmuxFN0d.js} +1 -1
- package/dist/client/assets/{automation-runs-jZQsMT_1.js → automation-runs-BsBW6Pgc.js} +1 -1
- package/dist/client/assets/{automations-B5tYNyFB.js → automations-DhlXvSbC.js} +1 -1
- package/dist/client/assets/{autosend-QH589PVa.js → autosend-w8k2R4c_.js} +1 -1
- package/dist/client/assets/{avatar-C6qQgELM.js → avatar-DojpxCme.js} +1 -1
- package/dist/client/assets/{badge-CHPMmYmt.js → badge-DaF-L4O0.js} +1 -1
- package/dist/client/assets/{block-document-CtQxGr4H.js → block-document-BkW7UGwq.js} +3 -3
- package/dist/client/assets/{brand-context-vrotVwiu.js → brand-context-BXVLx8b-.js} +1 -1
- package/dist/client/assets/{buckets-ClAlu9b3.js → buckets-sDGkPKZn.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DnZCDf5P.js → bulk-category-panel-DjXWMMrC.js} +1 -1
- package/dist/client/assets/{calendar-DCvzWe_7.js → calendar-CM91UsmF.js} +1 -1
- package/dist/client/assets/{capability-load-error-BPWNkWfC.js → capability-load-error-CvAXaOzU.js} +1 -1
- package/dist/client/assets/{card-CHkDvr9O.js → card-CqVmEy4h.js} +1 -1
- package/dist/client/assets/category-editor-fkN0Dayu.js +1 -0
- package/dist/client/assets/{chat-context-CI2whHa1.js → chat-context-BHZI61tL.js} +1 -1
- package/dist/client/assets/{checkbox-BSEtc01G.js → checkbox-BOIV5h-9.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bb23pwY4.js → cli-auth-success-DBt_UxJI.js} +1 -1
- package/dist/client/assets/{collection-detail-B0Zgy7Ob.js → collection-detail-BD3hodZo.js} +1 -1
- package/dist/client/assets/{collection-display-button-C6oMLPQY.js → collection-display-button-DpyfVEuS.js} +1 -1
- package/dist/client/assets/{collection-search-DGOwHYSB.js → collection-search-ChC9xkmI.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-dKvZq1Le.js → collection-table-wrapper-CwcgN4Lt.js} +1 -1
- package/dist/client/assets/{collection-tabs-jDy30S9h.js → collection-tabs-D-a047uL.js} +1 -1
- package/dist/client/assets/{command-BpX9vYDN.js → command-CulNp5Mh.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DMp9zppd.js → commerce-onboarding-BNIe99Cz.js} +1 -1
- package/dist/client/assets/{companions-core-Clem2qTA.js → companions-core-DKh-bgs-.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CJWfZbtR.js → connect-desktop-dialog-CT-XJxTO.js} +1 -1
- package/dist/client/assets/{connection-card-CB_IRhs2.js → connection-card-QY-xBCH6.js} +1 -1
- package/dist/client/assets/{connection-detail-B6Xjo5Ql.js → connection-detail-PxlQ2V-l.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-5SZwR200.js → connection-form-helpers-DdrWFFOA.js} +1 -1
- package/dist/client/assets/{connections-B91jfg3e.js → connections-CfmBoNYf.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Hh2FYfwA.js → decopilot-sse-pool-DMRPySL4.js} +1 -1
- package/dist/client/assets/{dialog-TaEY2Kx_.js → dialog-CNZdX1LQ.js} +1 -1
- package/dist/client/assets/{domain-settings-DYzdwum7.js → domain-settings-TD-AVtr1.js} +1 -1
- package/dist/client/assets/{drawer-67IpHpGQ.js → drawer-BVKpf346.js} +1 -1
- package/dist/client/assets/{dropdown-menu-LEcMeufE.js → dropdown-menu-BFpz1OLx.js} +1 -1
- package/dist/client/assets/{empty-state-BTjg_Aje.js → empty-state-XEvabYsc.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Q7qhs3WT.js → extract-connection-data-BoucLG5_.js} +1 -1
- package/dist/client/assets/{file-explorer-BANMUbbn.js → file-explorer-C6QO6rGe.js} +2 -2
- package/dist/client/assets/{file-type-icon-YUUkD6y6.js → file-type-icon-CVHHrYGv.js} +1 -1
- package/dist/client/assets/{files-CYJC201y.js → files-CISO5HM7.js} +1 -1
- package/dist/client/assets/{form-1PRNTVHF.js → form-HuHRWPyk.js} +1 -1
- package/dist/client/assets/{general-BSy3MbQh.js → general-C14FDTEK.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DljOfDjQ.js → github-repo-picker-CQaq7L0f.js} +1 -1
- package/dist/client/assets/{hooks-DFqR8Hvs.js → hooks-UDVYW1DV.js} +1 -1
- package/dist/client/assets/{index-DMy3809p.js → index-2LHFxjSI.js} +2 -2
- package/dist/client/assets/{index-CTIkkajs.js → index-4E2U5vNz.js} +1 -1
- package/dist/client/assets/{index-Df64NLin.js → index-BO4UMUWN.js} +1 -1
- package/dist/client/assets/{index-BEfXtmlR.js → index-BPHxSiRR.js} +1 -1
- package/dist/client/assets/{index-CySe4zj6.js → index-BcZlVMtV.js} +28 -28
- package/dist/client/assets/{index-VazNHrO3.js → index-BiOK08Ck.js} +3 -3
- package/dist/client/assets/{index-DwzbZGxY.js → index-Blzxttp5.js} +1 -1
- package/dist/client/assets/{index-CMc5FLjP.js → index-Bv2Q6cmW.js} +1 -1
- package/dist/client/assets/{index-AmzNJaB8.js → index-Cml0zRTB.js} +3 -3
- package/dist/client/assets/{index-DcBf7T10.js → index-DD3xC72S.js} +1 -1
- package/dist/client/assets/{index-D3WGUwBg.js → index-DDILE-9H.js} +1 -1
- package/dist/client/assets/{index-Dc6-ECoH.js → index-DOX-0Vob.js} +1 -1
- package/dist/client/assets/{index-redirect-D-Ph1F5B.js → index-redirect-CZH6U-r5.js} +1 -1
- package/dist/client/assets/{index-B-Mwpftd.js → index-w2u--4Cn.js} +1 -1
- package/dist/client/assets/{index-Cq8TJSFy.js → index-zvXOOCPK.js} +1 -1
- package/dist/client/assets/{input-BC7Dr3Si.js → input-DWm5CrG4.js} +1 -1
- package/dist/client/assets/{integration-icon-CHnUYdE2.js → integration-icon-CiMd_U94.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BCDss0Ag.js → invite-member-dialog-D5Xmwmle.js} +1 -1
- package/dist/client/assets/{label-BvlvBg6i.js → label-CCx7flk8.js} +1 -1
- package/dist/client/assets/{layout-D1a-gG8D.js → layout-CfHgVjnU.js} +1 -1
- package/dist/client/assets/{login-DKtieVJi.js → login-DwreDP6h.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DCuASqM5.js → mcp-oauth-ism6UTwZ.js} +1 -1
- package/dist/client/assets/{members-D2hWirsM.js → members-D4JO_rnb.js} +1 -1
- package/dist/client/assets/{monaco-editor-CYnhOzfS.js → monaco-editor-HgwGPonU.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Dckp61zH.js → monitoring-stats-row-B1RBV0Nz.js} +1 -1
- package/dist/client/assets/{multi-select-Dqhtcm0q.js → multi-select-DtN194lc.js} +1 -1
- package/dist/client/assets/{oauth-callback-3dx2KsmZ.js → oauth-callback-CB64HflO.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CwMFtKTo.js → oauth-callback-ai-provider-CGjt5WDB.js} +1 -1
- package/dist/client/assets/{onboarding-NaHufSFJ.js → onboarding-C20hL-kC.js} +1 -1
- package/dist/client/assets/{org-install-CWxIOz3N.js → org-install-Dzgltlsm.js} +1 -1
- package/dist/client/assets/{org-layout-DoB6J4nI.js → org-layout-BufiPd-a.js} +1 -1
- package/dist/client/assets/{organization-choice-BDeZRMou.js → organization-choice-D86uMtCf.js} +1 -1
- package/dist/client/assets/{orgs-Dl1t3n-h.js → orgs-JkHu4WGm.js} +1 -1
- package/dist/client/assets/{page-seo-form-CvhgO2i7.js → page-seo-form-BnpMfois.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BxaprOpi.js +1 -0
- package/dist/client/assets/{popover-kRVVAZo0.js → popover-DO-tE0QM.js} +1 -1
- package/dist/client/assets/{post-editor-BgaavV-R.js → post-editor-BNTtZzAZ.js} +1 -1
- package/dist/client/assets/{primitives-BjxnNwxz.js → primitives-CujPMuYz.js} +1 -1
- package/dist/client/assets/{profile-CS-vUC_g.js → profile-D_2ZyqJr.js} +1 -1
- package/dist/client/assets/project-app-view-5MLww-Ke.js +1 -0
- package/dist/client/assets/record-editor-CON6Bw7x.js +1 -0
- package/dist/client/assets/redirect-editor-B2K6g1KZ.js +1 -0
- package/dist/client/assets/registry-BeziVeOQ.js +2 -0
- package/dist/client/assets/{registry-layout-BTIzKxjo.js → registry-layout-BRfqqURT.js} +1 -1
- package/dist/client/assets/{reports-BH6X5RYl.js → reports-BdFsWG5D.js} +1 -1
- package/dist/client/assets/{require-capability-BD4RU70c.js → require-capability-DcZjJeBv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D_qObw7l.js → required-auth-layout-uACM9t9U.js} +1 -1
- package/dist/client/assets/{reset-password-D7kfSNx6.js → reset-password-CrL-1ZeM.js} +1 -1
- package/dist/client/assets/{roles-BWRXFovz.js → roles-BDbdATuD.js} +1 -1
- package/dist/client/assets/{search-input-D77R2Qlj.js → search-input-B48VsXyl.js} +1 -1
- package/dist/client/assets/{secrets-DRHUCmR6.js → secrets-DK-37DX2.js} +1 -1
- package/dist/client/assets/{sections-editor-D4CZD-ha.js → sections-editor-Cu2sFpPW.js} +1 -1
- package/dist/client/assets/{select-BuKjeCrb.js → select-C0ynmWVK.js} +1 -1
- package/dist/client/assets/{select-model-ByV9smVN.js → select-model-ClKNTBjo.js} +1 -1
- package/dist/client/assets/{self-tool-result-vB7nwgNH.js → self-tool-result-C3GALNUK.js} +1 -1
- package/dist/client/assets/{seo-editor-DfN4TiKO.js → seo-editor-C4hpjhTx.js} +1 -1
- package/dist/client/assets/{settings-layout-Bkj4VHZ3.js → settings-layout-DsoWAepK.js} +1 -1
- package/dist/client/assets/{settings-section-DN4ehJk4.js → settings-section-D1pj4kgG.js} +1 -1
- package/dist/client/assets/{shell-controls-B2nL6uAe.js → shell-controls-Dt5u5QGq.js} +1 -1
- package/dist/client/assets/{shell-layout-Ck7st-mc.js → shell-layout-BSS2lUYR.js} +1 -1
- package/dist/client/assets/{sidebar-BudM_B2c.js → sidebar-D4Kvtuzb.js} +1 -1
- package/dist/client/assets/{skeleton-BmuNVVtD.js → skeleton-BFkQ9BUW.js} +1 -1
- package/dist/client/assets/{sso-BR_gYJ5g.js → sso-BSmu_NAn.js} +1 -1
- package/dist/client/assets/{store-R-81SNCO.js → store-XBqJG7T7.js} +1 -1
- package/dist/client/assets/store-registry-aaYY2NIR.js +2 -0
- package/dist/client/assets/{studio-tools-JQnAx-yt.js → studio-tools-C5d9Psj4.js} +1 -1
- package/dist/client/assets/{switch-IxJ12UUN.js → switch-iUF85ecT.js} +1 -1
- package/dist/client/assets/{table-BRS5-Ghi.js → table-CeL3ZkxH.js} +1 -1
- package/dist/client/assets/{tabs-D-BkrQS_.js → tabs-BhyCz-TB.js} +1 -1
- package/dist/client/assets/{textarea-DILcuTPp.js → textarea-CTO9QDHu.js} +1 -1
- package/dist/client/assets/{toggle-group-BJlPDeJt.js → toggle-group-DW6JRZRc.js} +1 -1
- package/dist/client/assets/{toolbar-DPVCX4kM.js → toolbar-CVOIq5zM.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B_F-FzG4.js → toolbar-icon-button-CTKN-px8.js} +1 -1
- package/dist/client/assets/{tooltip-plNKOrsB.js → tooltip-EYdI7gi-.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CZ05oGju.js → use-ai-providers-Dubk5pUN.js} +1 -1
- package/dist/client/assets/{use-automations-Br3sumHI.js → use-automations-DYiYHQ-u.js} +1 -1
- package/dist/client/assets/{use-autosave-ALvIsg84.js → use-autosave-DHWyz6Ym.js} +1 -1
- package/dist/client/assets/{use-capability-PzwH7JXT.js → use-capability-DQ6R1P8G.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BrUn8fxq.js → use-clock-tick-BPOQdZXJ.js} +1 -1
- package/dist/client/assets/{use-collections-Du2dq1-S.js → use-collections-C2Jcl8E8.js} +1 -1
- package/dist/client/assets/{use-connection-DyhWyxCB.js → use-connection-B42YdYxb.js} +1 -1
- package/dist/client/assets/{use-copy-Dmy-ICQK.js → use-copy-BtPhSLhG.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DXieltJG.js → use-create-virtual-mcp-DgUPjfkV.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DafilSTq.js → use-debounced-autosave-DiiJBWk_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Ky3kW6jR.js → use-debounced-value-EKkLp4kP.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CwFgwpqm.js → use-deco-credits-Dp_Ohz5g.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C0jxY0C-.js → use-decopilot-events-CT3Y1avF.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DrwmEYHq.js → use-delete-connection-CJlKuyNU.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CqKzySYh.js → use-deployment-admin-A4r3TC1G.js} +1 -1
- package/dist/client/assets/{use-file-configs-BSpSzmcW.js → use-file-configs-6cFRIKwC.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-HqU26K5r.js → use-infinite-scroll-BWqOyQGZ.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bkp1mE_c.js → use-join-requests-BXr87JUa.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-bqW_b4Be.js → use-mcp-auth-status-DpriZKVz.js} +1 -1
- package/dist/client/assets/{use-mcp-client-WisUNJdN.js → use-mcp-client-SNuzbU_l.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-gOgcsP4u.js → use-mcp-tools-CJkrEqRM.js} +1 -1
- package/dist/client/assets/{use-members-C6oejWDG.js → use-members-CvmZXDoC.js} +1 -1
- package/dist/client/assets/{use-mobile-D6QzYWiJ.js → use-mobile-CdUX9pmH.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DWfbKHDA.js → use-navigate-to-agent-TqdRbfLS.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-tox-aigT.js → use-org-auth-client-Dq28TR1b.js} +1 -1
- package/dist/client/assets/{use-org-sso-COXxV9mp.js → use-org-sso-STwx3iyk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Ev36QIQK.js → use-organization-roles-CRSiemK9.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DN87XZ2w.js → use-organization-settings-EoQjiXIq.js} +1 -1
- package/dist/client/assets/{use-registry-app-CY_WkCby.js → use-registry-app-DIc1gymd.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CRXkMAIJ.js → use-registry-connections-wAGmqj3Y.js} +1 -1
- package/dist/client/assets/{use-secrets-ANIEIjB0.js → use-secrets-DYhb2kap.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CnhlraH9.js → use-status-sounds-DT45PW7a.js} +1 -1
- package/dist/client/assets/{use-t-CvXQXPPS.js → use-t-D8TK1BOS.js} +1 -1
- package/dist/client/assets/{use-view-mode-DwWWJ97a.js → use-view-mode-B8t8l_pW.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bf2VrYbg.js → use-virtual-mcp-52uGLlLm.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BlKM3DIN.js +1 -0
- package/dist/client/assets/{useRouterState-Cin9t5kL.js → useRouterState-CxIvl2RE.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-GjOLPtBu.js +1 -0
- package/dist/client/assets/{users-C3TOmS20.js → users-DMFvq2uA.js} +1 -1
- package/dist/client/assets/{variant-calendar-BJlmAPbT.js → variant-calendar-CfaxRVsg.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BjgWJl0k.js → view-mode-toggle-BRn4Q_XH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/category-editor-BpJ1RcO2.js +0 -1
- package/dist/client/assets/page-seo-sheet-D91cUBGQ.js +0 -1
- package/dist/client/assets/project-app-view-CLh8fTNH.js +0 -1
- package/dist/client/assets/record-editor-BB2C-EZB.js +0 -1
- package/dist/client/assets/redirect-editor-9mgrgA0Z.js +0 -1
- package/dist/client/assets/registry-D1ROE5Qm.js +0 -2
- package/dist/client/assets/store-registry-DeNKA--a.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B1xeWAsJ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CoSrihVf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,j as t,r as C,E as W,B as L,t as K}from"./index-VazNHrO3.js";import{i as X}from"./AlertCircle-CF1-Ouso.js";import{i as I}from"./HardDrive-LjQciFQe.js";import{s as V}from"./Plus-DT-2W1wT.js";import{s as Y}from"./Trash01-UQjosBE6.js";import{g as Z,c as ee,d as te,b as se,A as ie,e as le,a as ne,f as re}from"./alert-dialog-Dp7Qz6rw.js";import{e as ce,d as ae,D as oe,a as de,h as ue,c as me}from"./dialog-TaEY2Kx_.js";import{I as P}from"./input-BC7Dr3Si.js";import{L as B}from"./label-BvlvBg6i.js";import{S as fe,a as ge,b as xe,c as pe,d as q}from"./select-BuKjeCrb.js";import{S as he}from"./switch-IxJ12UUN.js";import{S as be}from"./skeleton-BmuNVVtD.js";import{T as je}from"./textarea-DILcuTPp.js";import{u as F}from"./use-t-CvXQXPPS.js";import{P as E}from"./index-D3WGUwBg.js";import{c as ke}from"./settings-section-DN4ehJk4.js";import{u as ye,b as ve,c as Se}from"./use-file-configs-BSpSzmcW.js";import{R as Ce}from"./require-capability-BD4RU70c.js";import"./X-BWn3kDs2.js";import"./tooltip-plNKOrsB.js";import"./ChevronUp-DAExiZbv.js";import"./ChevronDown-DyjAqI3m.js";import"./sidebar-BudM_B2c.js";import"./LayoutLeft-fGt4B_V6.js";import"./use-mobile-D6QzYWiJ.js";import"./card-CHkDvr9O.js";import"./ArrowUpRight-Bxfx0mGn.js";import"./studio-tools-JQnAx-yt.js";import"./use-capability-PzwH7JXT.js";import"./access-gate-7v8G4_rr.js";import"./capability-load-error-BPWNkWfC.js";function Ne(i,e){if(!(i instanceof Error))return e;const s=i.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(s)try{const l=JSON.parse(s[0])[0];if(l?.message){const n=l.path?.join(".");return n?`${n}: ${l.message}`:l.message}}catch{}return i.message||e}function Be(i){const e=T.c(6),{error:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:16}),e[0]=l):l=e[0];let n;e[1]!==s.message||e[2]!==r?(n=r("settings.buckets.failedToLoadConfigs",{error:s.message}),e[1]=s.message,e[2]=r,e[3]=n):n=e[3];let c;return e[4]!==n?(c=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=c):c=e[5],c}function Pe(i){const e=T.c(51),{config:s,onDelete:r}=i,l=F();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(I,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==s.name?(c=t.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e[1]=s.name,e[2]=c):c=e[2];let a;e[3]!==s.credentialType||e[4]!==l?(a=s.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):s.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:l("settings.buckets.managed")}):null,e[3]=s.credentialType,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==s.bucket||e[7]!==s.region?(u=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[s.bucket," · ",s.region]}),e[6]=s.bucket,e[7]=s.region,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==a||e[11]!==u?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[c,a,u]}),e[9]=c,e[10]=a,e[11]=u,e[12]=o):o=e[12];let g;e[13]!==s.description?(g=s.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:s.description}):null,e[13]=s.description,e[14]=g):g=e[14];let d;e[15]!==s.endpoint||e[16]!==s.forcePathStyle||e[17]!==l?(d=s.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[s.endpoint,s.forcePathStyle?` (${l("settings.buckets.pathStyle")})`:""]}):null,e[15]=s.endpoint,e[16]=s.forcePathStyle,e[17]=l,e[18]=d):d=e[18];let f;e[19]!==s.prefix||e[20]!==l?(f=s.prefix?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.prefix",{prefix:s.prefix})}):null,e[19]=s.prefix,e[20]=l,e[21]=f):f=e[21];let m;e[22]!==s.publicUrlBase||e[23]!==l?(m=s.publicUrlBase?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.public",{url:s.publicUrlBase})}):null,e[22]=s.publicUrlBase,e[23]=l,e[24]=m):m=e[24];let b;e[25]!==o||e[26]!==g||e[27]!==d||e[28]!==f||e[29]!==m?(b=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,t.jsxs("div",{className:"min-w-0",children:[o,g,d,f,m]})]}),e[25]=o,e[26]=g,e[27]=d,e[28]=f,e[29]=m,e[30]=b):b=e[30];let j;e[31]!==s.createdAt?(j=new Date(s.createdAt).toLocaleDateString(),e[31]=s.createdAt,e[32]=j):j=e[32];let S;e[33]!==j?(S=t.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[33]=j,e[34]=S):S=e[34];let v;e[35]!==s||e[36]!==r?(v=()=>r(s),e[35]=s,e[36]=r,e[37]=v):v=e[37];let k;e[38]!==s.name||e[39]!==l?(k=l("settings.buckets.deleteButton",{name:s.name}),e[38]=s.name,e[39]=l,e[40]=k):k=e[40];let y;e[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Y,{size:14}),e[41]=y):y=e[41];let x;e[42]!==v||e[43]!==k?(x=t.jsx(L,{variant:"ghost",size:"sm",onClick:v,"aria-label":k,children:y}),e[42]=v,e[43]=k,e[44]=x):x=e[44];let p;e[45]!==S||e[46]!==x?(p=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[S,x]}),e[45]=S,e[46]=x,e[47]=p):p=e[47];let N;return e[48]!==b||e[49]!==p?(N=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[b,p]}),e[48]=b,e[49]=p,e[50]=N):N=e[50],N}function De(i){const e=T.c(21),{onCreate:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(I,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let n;e[1]!==r?(n=r("settings.buckets.noBucketsConfigured"),e[1]=r,e[2]=n):n=e[2];let c;e[3]!==n?(c=t.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==r?(a=r("settings.buckets.emptyStateDescription"),e[5]=r,e[6]=a):a=e[6];let u;e[7]!==a?(u=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==u?(o=t.jsxs("div",{children:[c,u]}),e[9]=c,e[10]=u,e[11]=o):o=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),e[12]=g):g=e[12];let d;e[13]!==r?(d=r("settings.buckets.addBucket"),e[13]=r,e[14]=d):d=e[14];let f;e[15]!==s||e[16]!==d?(f=t.jsxs(L,{onClick:s,size:"sm",className:"mt-2",children:[g,d]}),e[15]=s,e[16]=d,e[17]=f):f=e[17];let m;return e[18]!==o||e[19]!==f?(m=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,o,f]}),e[18]=o,e[19]=f,e[20]=m):m=e[20],m}function O({open:i,onOpenChange:e}){const s=F(),[r,l]=C.useState(""),[n,c]=C.useState(""),[a,u]=C.useState(""),[o,g]=C.useState(""),[d,f]=C.useState(""),[m,b]=C.useState(!1),[j,S]=C.useState(""),[v,k]=C.useState(""),[y,x]=C.useState("static"),[p,N]=C.useState(""),[D,w]=C.useState(""),[_,A]=C.useState(""),[$,z]=C.useState(""),U=ve();function H(){l(""),c(""),u(""),g(""),f(""),b(!1),S(""),k(""),x("static"),N(""),w(""),A(""),z("")}const R=y==="sts-session"?!!(_.trim()&&$.trim()):!!(p&&D);async function J(h){if(h.preventDefault(),!r.trim()||!a.trim()||!o.trim()||!R)return;const M=y==="sts-session"?{credentialType:"sts-session",refreshUrl:_.trim(),apiKey:$.trim()}:{credentialType:"static",accessKeyId:p,secretAccessKey:D};try{await U.mutateAsync({name:r.trim(),description:n.trim()||void 0,bucket:a.trim(),region:o.trim(),endpoint:d.trim()||void 0,forcePathStyle:m,prefix:j.trim()||void 0,publicUrlBase:v.trim()||void 0,...M}),K.success(s("settings.buckets.bucketAdded",{name:r.trim()})),H(),e(!1)}catch(Q){K.error(Ne(Q,s("settings.buckets.failedToAddBucket")))}}const G=U.isPending||!r.trim()||!a.trim()||!o.trim()||!R;return t.jsx(ce,{open:i,onOpenChange:e,children:t.jsxs(ae,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(oe,{children:[t.jsx(de,{children:s("settings.buckets.addS3Bucket")}),t.jsx(ue,{children:s("settings.buckets.credentialsEncryptedDescription")})]}),t.jsxs("form",{onSubmit:J,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-name",children:s("settings.buckets.nameLabel")}),t.jsx(P,{id:"file-config-name",value:r,onChange:h=>l(h.target.value),placeholder:s("settings.buckets.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.nameHelperText")})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-bucket",children:s("settings.buckets.bucketLabel")}),t.jsx(P,{id:"file-config-bucket",value:a,onChange:h=>u(h.target.value),placeholder:s("settings.buckets.bucketPlaceholder"),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-region",children:s("settings.buckets.regionLabel")}),t.jsx(P,{id:"file-config-region",value:o,onChange:h=>g(h.target.value),placeholder:s("settings.buckets.regionPlaceholder"),autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-endpoint",children:s("settings.buckets.endpointLabel")}),t.jsx(P,{id:"file-config-endpoint",type:"url",value:d,onChange:h=>f(h.target.value),placeholder:s("settings.buckets.endpointPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.endpointHelperText")})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(B,{htmlFor:"file-config-path-style",className:"text-sm",children:s("settings.buckets.forcePathStyleLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s("settings.buckets.forcePathStyleHelperText")})]}),t.jsx(he,{id:"file-config-path-style",checked:m,onCheckedChange:b})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-prefix",children:s("settings.buckets.prefixLabel")}),t.jsx(P,{id:"file-config-prefix",value:j,onChange:h=>S(h.target.value),placeholder:s("settings.buckets.prefixPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.prefixHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-public-url-base",children:s("settings.buckets.publicUrlBaseLabel")}),t.jsx(P,{id:"file-config-public-url-base",type:"url",value:v,onChange:h=>k(h.target.value),placeholder:s("settings.buckets.publicUrlBasePlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.publicUrlBaseHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-credential-type",children:s("settings.buckets.credentialsLabel")}),t.jsxs(fe,{value:y,onValueChange:h=>x(h),children:[t.jsx(ge,{id:"file-config-credential-type",className:"w-full",children:t.jsx(xe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:s("settings.buckets.staticKeyOption")}),t.jsx(q,{value:"sts-session",children:s("settings.buckets.temporarySessionOption")})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s(y==="sts-session"?"settings.buckets.stsSessionHelperText":"settings.buckets.staticKeyHelperText")})]}),y==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-access-key",children:s("settings.buckets.accessKeyIdLabel")}),t.jsx(P,{id:"file-config-access-key",value:p,onChange:h=>N(h.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-secret-key",children:s("settings.buckets.secretAccessKeyLabel")}),t.jsx(P,{id:"file-config-secret-key",type:"password",value:D,onChange:h=>w(h.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-refresh-url",children:s("settings.buckets.refreshUrlLabel")}),t.jsx(P,{id:"file-config-refresh-url",type:"url",value:_,onChange:h=>A(h.target.value),placeholder:s("settings.buckets.refreshUrlPlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.refreshUrlHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-api-key",children:s("settings.buckets.apiKeyLabel")}),t.jsx(P,{id:"file-config-api-key",type:"password",value:$,onChange:h=>z(h.target.value),autoComplete:"new-password",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.apiKeyHelperText")})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-description",children:s("settings.buckets.descriptionLabel")}),t.jsx(je,{id:"file-config-description",value:n,onChange:h=>c(h.target.value),rows:2,placeholder:s("settings.buckets.descriptionPlaceholder")})]}),t.jsxs(me,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>{H(),e(!1)},disabled:U.isPending,children:s("settings.buckets.cancelButton")}),t.jsx(L,{type:"submit",disabled:G,children:U.isPending?s("settings.buckets.addingButton"):s("settings.buckets.addBucketButton")})]})]})]})})}function Te(i){const e=T.c(41),{config:s,onClose:r}=i,l=F(),n=Se();let c;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l?(c=async function(){if(s)try{await n.mutateAsync(s.id),K.success(l("settings.buckets.bucketRemoved",{name:s.name})),r()}catch(_){const A=_;K.error(A instanceof Error?A.message:l("settings.buckets.failedToRemoveBucket"))}},e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=c):c=e[4];const a=c,u=s!==null;let o;e[5]!==r?(o=w=>!w&&r(),e[5]=r,e[6]=o):o=e[6];let g;e[7]!==l?(g=l("settings.buckets.removeBucketTitle"),e[7]=l,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ee,{children:g}),e[9]=g,e[10]=d):d=e[10];const f=s?.name??"";let m;e[11]!==l||e[12]!==f?(m=l("settings.buckets.removeBucketDescription",{name:f}),e[11]=l,e[12]=f,e[13]=m):m=e[13];let b;e[14]!==m?(b=t.jsx(te,{children:m}),e[14]=m,e[15]=b):b=e[15];let j;e[16]!==d||e[17]!==b?(j=t.jsxs(se,{children:[d,b]}),e[16]=d,e[17]=b,e[18]=j):j=e[18];const S=n.isPending;let v;e[19]!==l?(v=l("settings.buckets.cancelButton"),e[19]=l,e[20]=v):v=e[20];let k;e[21]!==n.isPending||e[22]!==v?(k=t.jsx(ie,{disabled:S,children:v}),e[21]=n.isPending,e[22]=v,e[23]=k):k=e[23];let y;e[24]!==n.isPending||e[25]!==l?(y=n.isPending?l("settings.buckets.removingButton"):l("settings.buckets.removeButton"),e[24]=n.isPending,e[25]=l,e[26]=y):y=e[26];let x;e[27]!==n.isPending||e[28]!==a||e[29]!==y?(x=t.jsx(Z,{onClick:a,disabled:n.isPending,children:y}),e[27]=n.isPending,e[28]=a,e[29]=y,e[30]=x):x=e[30];let p;e[31]!==k||e[32]!==x?(p=t.jsxs(le,{children:[k,x]}),e[31]=k,e[32]=x,e[33]=p):p=e[33];let N;e[34]!==p||e[35]!==j?(N=t.jsxs(ne,{children:[j,p]}),e[34]=p,e[35]=j,e[36]=N):N=e[36];let D;return e[37]!==N||e[38]!==u||e[39]!==o?(D=t.jsx(re,{open:u,onOpenChange:o,children:N}),e[37]=N,e[38]=u,e[39]=o,e[40]=D):D=e[40],D}function Fe(){const i=T.c(32),e=F(),s=ye(),[r,l]=C.useState(!1),[n,c]=C.useState(null);if(s.length===0){let x;i[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(De,{onCreate:()=>l(!0)}),i[0]=x):x=i[0];let p;return i[1]!==r?(p=t.jsxs(t.Fragment,{children:[x,t.jsx(O,{open:r,onOpenChange:l})]}),i[1]=r,i[2]=p):p=i[2],p}let a;i[3]!==s.length||i[4]!==e?(a=e("settings.buckets.bucketsConfigured",{count:s.length}),i[3]=s.length,i[4]=e,i[5]=a):a=i[5];let u;i[6]!==a?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i[6]=a,i[7]=u):u=i[7];let o;i[8]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),i[8]=o):o=i[8];let g;i[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),i[9]=g):g=i[9];let d;i[10]!==e?(d=e("settings.buckets.addBucket"),i[10]=e,i[11]=d):d=i[11];let f;i[12]!==d?(f=t.jsxs(L,{onClick:o,size:"sm",children:[g,d]}),i[12]=d,i[13]=f):f=i[13];let m;i[14]!==u||i[15]!==f?(m=t.jsxs("div",{className:"flex items-center justify-between",children:[u,f]}),i[14]=u,i[15]=f,i[16]=m):m=i[16];let b;if(i[17]!==s){let x;i[19]===Symbol.for("react.memo_cache_sentinel")?(x=p=>t.jsx(Pe,{config:p,onDelete:c},p.id),i[19]=x):x=i[19],b=s.map(x),i[17]=s,i[18]=b}else b=i[18];let j;i[20]!==b?(j=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:b})}),i[20]=b,i[21]=j):j=i[21];let S;i[22]!==r?(S=t.jsx(O,{open:r,onOpenChange:l}),i[22]=r,i[23]=S):S=i[23];let v;i[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>c(null),i[24]=v):v=i[24];let k;i[25]!==n?(k=t.jsx(Te,{config:n,onClose:v}),i[25]=n,i[26]=k):k=i[26];let y;return i[27]!==k||i[28]!==m||i[29]!==j||i[30]!==S?(y=t.jsxs(t.Fragment,{children:[m,j,S,k]}),i[27]=k,i[28]=m,i[29]=j,i[30]=S,i[31]=y):y=i[31],y}function we(){const i=T.c(12),e=F();let s;i[0]!==e?(s=e("settings.buckets.pageTitle"),i[0]=e,i[1]=s):s=i[1];let r;i[2]!==s?(r=t.jsx(E.Title,{children:s}),i[2]=s,i[3]=r):r=i[3];let l;i[4]!==e?(l=u=>{const{error:o}=u;return t.jsx(Be,{error:o??new Error(e("settings.buckets.failedToLoadConfigsFallback"))})},i[4]=e,i[5]=l):l=i[5];let n;i[6]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(C.Suspense,{fallback:t.jsx(be,{className:"h-32 w-full"}),children:t.jsx(Fe,{})}),i[6]=n):n=i[6];let c;i[7]!==l?(c=t.jsx(W,{fallback:l,children:n}),i[7]=l,i[8]=c):c=i[8];let a;return i[9]!==r||i[10]!==c?(a=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ke,{children:[r,c]})})})}),i[9]=r,i[10]=c,i[11]=a):a=i[11],a}function ot(){const i=T.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),i[0]=e):e=i[0],e}export{ot as default};
|
|
1
|
+
import{c as T,j as t,r as C,E as W,B as L,t as K}from"./index-BiOK08Ck.js";import{i as X}from"./AlertCircle-C5JfzsXz.js";import{i as I}from"./HardDrive-Cu04k8YT.js";import{s as V}from"./Plus-DK4_uNTp.js";import{s as Y}from"./Trash01-B8oIKgg4.js";import{g as Z,c as ee,d as te,b as se,A as ie,e as le,a as ne,f as re}from"./alert-dialog-C9waqkx6.js";import{e as ce,d as ae,D as oe,a as de,h as ue,c as me}from"./dialog-CNZdX1LQ.js";import{I as P}from"./input-DWm5CrG4.js";import{L as B}from"./label-CCx7flk8.js";import{S as fe,a as ge,b as xe,c as pe,d as q}from"./select-C0ynmWVK.js";import{S as he}from"./switch-iUF85ecT.js";import{S as be}from"./skeleton-BFkQ9BUW.js";import{T as je}from"./textarea-CTO9QDHu.js";import{u as F}from"./use-t-D8TK1BOS.js";import{P as E}from"./index-DDILE-9H.js";import{c as ke}from"./settings-section-D1pj4kgG.js";import{u as ye,b as ve,c as Se}from"./use-file-configs-6cFRIKwC.js";import{R as Ce}from"./require-capability-DcZjJeBv.js";import"./X-BtlskU8h.js";import"./tooltip-EYdI7gi-.js";import"./ChevronUp-KIwd095M.js";import"./ChevronDown-KmITfgTF.js";import"./sidebar-D4Kvtuzb.js";import"./LayoutLeft-a8iQv3Q7.js";import"./use-mobile-CdUX9pmH.js";import"./card-CqVmEy4h.js";import"./ArrowUpRight-Bwindduz.js";import"./studio-tools-C5d9Psj4.js";import"./use-capability-DQ6R1P8G.js";import"./access-gate-Cs0O_TOU.js";import"./capability-load-error-CvAXaOzU.js";function Ne(i,e){if(!(i instanceof Error))return e;const s=i.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(s)try{const l=JSON.parse(s[0])[0];if(l?.message){const n=l.path?.join(".");return n?`${n}: ${l.message}`:l.message}}catch{}return i.message||e}function Be(i){const e=T.c(6),{error:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:16}),e[0]=l):l=e[0];let n;e[1]!==s.message||e[2]!==r?(n=r("settings.buckets.failedToLoadConfigs",{error:s.message}),e[1]=s.message,e[2]=r,e[3]=n):n=e[3];let c;return e[4]!==n?(c=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=c):c=e[5],c}function Pe(i){const e=T.c(51),{config:s,onDelete:r}=i,l=F();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(I,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==s.name?(c=t.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e[1]=s.name,e[2]=c):c=e[2];let a;e[3]!==s.credentialType||e[4]!==l?(a=s.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):s.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:l("settings.buckets.managed")}):null,e[3]=s.credentialType,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==s.bucket||e[7]!==s.region?(u=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[s.bucket," · ",s.region]}),e[6]=s.bucket,e[7]=s.region,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==a||e[11]!==u?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[c,a,u]}),e[9]=c,e[10]=a,e[11]=u,e[12]=o):o=e[12];let g;e[13]!==s.description?(g=s.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:s.description}):null,e[13]=s.description,e[14]=g):g=e[14];let d;e[15]!==s.endpoint||e[16]!==s.forcePathStyle||e[17]!==l?(d=s.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[s.endpoint,s.forcePathStyle?` (${l("settings.buckets.pathStyle")})`:""]}):null,e[15]=s.endpoint,e[16]=s.forcePathStyle,e[17]=l,e[18]=d):d=e[18];let f;e[19]!==s.prefix||e[20]!==l?(f=s.prefix?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.prefix",{prefix:s.prefix})}):null,e[19]=s.prefix,e[20]=l,e[21]=f):f=e[21];let m;e[22]!==s.publicUrlBase||e[23]!==l?(m=s.publicUrlBase?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.public",{url:s.publicUrlBase})}):null,e[22]=s.publicUrlBase,e[23]=l,e[24]=m):m=e[24];let b;e[25]!==o||e[26]!==g||e[27]!==d||e[28]!==f||e[29]!==m?(b=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,t.jsxs("div",{className:"min-w-0",children:[o,g,d,f,m]})]}),e[25]=o,e[26]=g,e[27]=d,e[28]=f,e[29]=m,e[30]=b):b=e[30];let j;e[31]!==s.createdAt?(j=new Date(s.createdAt).toLocaleDateString(),e[31]=s.createdAt,e[32]=j):j=e[32];let S;e[33]!==j?(S=t.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[33]=j,e[34]=S):S=e[34];let v;e[35]!==s||e[36]!==r?(v=()=>r(s),e[35]=s,e[36]=r,e[37]=v):v=e[37];let k;e[38]!==s.name||e[39]!==l?(k=l("settings.buckets.deleteButton",{name:s.name}),e[38]=s.name,e[39]=l,e[40]=k):k=e[40];let y;e[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Y,{size:14}),e[41]=y):y=e[41];let x;e[42]!==v||e[43]!==k?(x=t.jsx(L,{variant:"ghost",size:"sm",onClick:v,"aria-label":k,children:y}),e[42]=v,e[43]=k,e[44]=x):x=e[44];let p;e[45]!==S||e[46]!==x?(p=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[S,x]}),e[45]=S,e[46]=x,e[47]=p):p=e[47];let N;return e[48]!==b||e[49]!==p?(N=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[b,p]}),e[48]=b,e[49]=p,e[50]=N):N=e[50],N}function De(i){const e=T.c(21),{onCreate:s}=i,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(I,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let n;e[1]!==r?(n=r("settings.buckets.noBucketsConfigured"),e[1]=r,e[2]=n):n=e[2];let c;e[3]!==n?(c=t.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==r?(a=r("settings.buckets.emptyStateDescription"),e[5]=r,e[6]=a):a=e[6];let u;e[7]!==a?(u=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=u):u=e[8];let o;e[9]!==c||e[10]!==u?(o=t.jsxs("div",{children:[c,u]}),e[9]=c,e[10]=u,e[11]=o):o=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),e[12]=g):g=e[12];let d;e[13]!==r?(d=r("settings.buckets.addBucket"),e[13]=r,e[14]=d):d=e[14];let f;e[15]!==s||e[16]!==d?(f=t.jsxs(L,{onClick:s,size:"sm",className:"mt-2",children:[g,d]}),e[15]=s,e[16]=d,e[17]=f):f=e[17];let m;return e[18]!==o||e[19]!==f?(m=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,o,f]}),e[18]=o,e[19]=f,e[20]=m):m=e[20],m}function O({open:i,onOpenChange:e}){const s=F(),[r,l]=C.useState(""),[n,c]=C.useState(""),[a,u]=C.useState(""),[o,g]=C.useState(""),[d,f]=C.useState(""),[m,b]=C.useState(!1),[j,S]=C.useState(""),[v,k]=C.useState(""),[y,x]=C.useState("static"),[p,N]=C.useState(""),[D,w]=C.useState(""),[_,A]=C.useState(""),[$,z]=C.useState(""),U=ve();function H(){l(""),c(""),u(""),g(""),f(""),b(!1),S(""),k(""),x("static"),N(""),w(""),A(""),z("")}const R=y==="sts-session"?!!(_.trim()&&$.trim()):!!(p&&D);async function J(h){if(h.preventDefault(),!r.trim()||!a.trim()||!o.trim()||!R)return;const M=y==="sts-session"?{credentialType:"sts-session",refreshUrl:_.trim(),apiKey:$.trim()}:{credentialType:"static",accessKeyId:p,secretAccessKey:D};try{await U.mutateAsync({name:r.trim(),description:n.trim()||void 0,bucket:a.trim(),region:o.trim(),endpoint:d.trim()||void 0,forcePathStyle:m,prefix:j.trim()||void 0,publicUrlBase:v.trim()||void 0,...M}),K.success(s("settings.buckets.bucketAdded",{name:r.trim()})),H(),e(!1)}catch(Q){K.error(Ne(Q,s("settings.buckets.failedToAddBucket")))}}const G=U.isPending||!r.trim()||!a.trim()||!o.trim()||!R;return t.jsx(ce,{open:i,onOpenChange:e,children:t.jsxs(ae,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(oe,{children:[t.jsx(de,{children:s("settings.buckets.addS3Bucket")}),t.jsx(ue,{children:s("settings.buckets.credentialsEncryptedDescription")})]}),t.jsxs("form",{onSubmit:J,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-name",children:s("settings.buckets.nameLabel")}),t.jsx(P,{id:"file-config-name",value:r,onChange:h=>l(h.target.value),placeholder:s("settings.buckets.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.nameHelperText")})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-bucket",children:s("settings.buckets.bucketLabel")}),t.jsx(P,{id:"file-config-bucket",value:a,onChange:h=>u(h.target.value),placeholder:s("settings.buckets.bucketPlaceholder"),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-region",children:s("settings.buckets.regionLabel")}),t.jsx(P,{id:"file-config-region",value:o,onChange:h=>g(h.target.value),placeholder:s("settings.buckets.regionPlaceholder"),autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-endpoint",children:s("settings.buckets.endpointLabel")}),t.jsx(P,{id:"file-config-endpoint",type:"url",value:d,onChange:h=>f(h.target.value),placeholder:s("settings.buckets.endpointPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.endpointHelperText")})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(B,{htmlFor:"file-config-path-style",className:"text-sm",children:s("settings.buckets.forcePathStyleLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s("settings.buckets.forcePathStyleHelperText")})]}),t.jsx(he,{id:"file-config-path-style",checked:m,onCheckedChange:b})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-prefix",children:s("settings.buckets.prefixLabel")}),t.jsx(P,{id:"file-config-prefix",value:j,onChange:h=>S(h.target.value),placeholder:s("settings.buckets.prefixPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.prefixHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-public-url-base",children:s("settings.buckets.publicUrlBaseLabel")}),t.jsx(P,{id:"file-config-public-url-base",type:"url",value:v,onChange:h=>k(h.target.value),placeholder:s("settings.buckets.publicUrlBasePlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.publicUrlBaseHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-credential-type",children:s("settings.buckets.credentialsLabel")}),t.jsxs(fe,{value:y,onValueChange:h=>x(h),children:[t.jsx(ge,{id:"file-config-credential-type",className:"w-full",children:t.jsx(xe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:s("settings.buckets.staticKeyOption")}),t.jsx(q,{value:"sts-session",children:s("settings.buckets.temporarySessionOption")})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s(y==="sts-session"?"settings.buckets.stsSessionHelperText":"settings.buckets.staticKeyHelperText")})]}),y==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-access-key",children:s("settings.buckets.accessKeyIdLabel")}),t.jsx(P,{id:"file-config-access-key",value:p,onChange:h=>N(h.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-secret-key",children:s("settings.buckets.secretAccessKeyLabel")}),t.jsx(P,{id:"file-config-secret-key",type:"password",value:D,onChange:h=>w(h.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-refresh-url",children:s("settings.buckets.refreshUrlLabel")}),t.jsx(P,{id:"file-config-refresh-url",type:"url",value:_,onChange:h=>A(h.target.value),placeholder:s("settings.buckets.refreshUrlPlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.refreshUrlHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-api-key",children:s("settings.buckets.apiKeyLabel")}),t.jsx(P,{id:"file-config-api-key",type:"password",value:$,onChange:h=>z(h.target.value),autoComplete:"new-password",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.apiKeyHelperText")})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-description",children:s("settings.buckets.descriptionLabel")}),t.jsx(je,{id:"file-config-description",value:n,onChange:h=>c(h.target.value),rows:2,placeholder:s("settings.buckets.descriptionPlaceholder")})]}),t.jsxs(me,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>{H(),e(!1)},disabled:U.isPending,children:s("settings.buckets.cancelButton")}),t.jsx(L,{type:"submit",disabled:G,children:U.isPending?s("settings.buckets.addingButton"):s("settings.buckets.addBucketButton")})]})]})]})})}function Te(i){const e=T.c(41),{config:s,onClose:r}=i,l=F(),n=Se();let c;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l?(c=async function(){if(s)try{await n.mutateAsync(s.id),K.success(l("settings.buckets.bucketRemoved",{name:s.name})),r()}catch(_){const A=_;K.error(A instanceof Error?A.message:l("settings.buckets.failedToRemoveBucket"))}},e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=c):c=e[4];const a=c,u=s!==null;let o;e[5]!==r?(o=w=>!w&&r(),e[5]=r,e[6]=o):o=e[6];let g;e[7]!==l?(g=l("settings.buckets.removeBucketTitle"),e[7]=l,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ee,{children:g}),e[9]=g,e[10]=d):d=e[10];const f=s?.name??"";let m;e[11]!==l||e[12]!==f?(m=l("settings.buckets.removeBucketDescription",{name:f}),e[11]=l,e[12]=f,e[13]=m):m=e[13];let b;e[14]!==m?(b=t.jsx(te,{children:m}),e[14]=m,e[15]=b):b=e[15];let j;e[16]!==d||e[17]!==b?(j=t.jsxs(se,{children:[d,b]}),e[16]=d,e[17]=b,e[18]=j):j=e[18];const S=n.isPending;let v;e[19]!==l?(v=l("settings.buckets.cancelButton"),e[19]=l,e[20]=v):v=e[20];let k;e[21]!==n.isPending||e[22]!==v?(k=t.jsx(ie,{disabled:S,children:v}),e[21]=n.isPending,e[22]=v,e[23]=k):k=e[23];let y;e[24]!==n.isPending||e[25]!==l?(y=n.isPending?l("settings.buckets.removingButton"):l("settings.buckets.removeButton"),e[24]=n.isPending,e[25]=l,e[26]=y):y=e[26];let x;e[27]!==n.isPending||e[28]!==a||e[29]!==y?(x=t.jsx(Z,{onClick:a,disabled:n.isPending,children:y}),e[27]=n.isPending,e[28]=a,e[29]=y,e[30]=x):x=e[30];let p;e[31]!==k||e[32]!==x?(p=t.jsxs(le,{children:[k,x]}),e[31]=k,e[32]=x,e[33]=p):p=e[33];let N;e[34]!==p||e[35]!==j?(N=t.jsxs(ne,{children:[j,p]}),e[34]=p,e[35]=j,e[36]=N):N=e[36];let D;return e[37]!==N||e[38]!==u||e[39]!==o?(D=t.jsx(re,{open:u,onOpenChange:o,children:N}),e[37]=N,e[38]=u,e[39]=o,e[40]=D):D=e[40],D}function Fe(){const i=T.c(32),e=F(),s=ye(),[r,l]=C.useState(!1),[n,c]=C.useState(null);if(s.length===0){let x;i[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(De,{onCreate:()=>l(!0)}),i[0]=x):x=i[0];let p;return i[1]!==r?(p=t.jsxs(t.Fragment,{children:[x,t.jsx(O,{open:r,onOpenChange:l})]}),i[1]=r,i[2]=p):p=i[2],p}let a;i[3]!==s.length||i[4]!==e?(a=e("settings.buckets.bucketsConfigured",{count:s.length}),i[3]=s.length,i[4]=e,i[5]=a):a=i[5];let u;i[6]!==a?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i[6]=a,i[7]=u):u=i[7];let o;i[8]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),i[8]=o):o=i[8];let g;i[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),i[9]=g):g=i[9];let d;i[10]!==e?(d=e("settings.buckets.addBucket"),i[10]=e,i[11]=d):d=i[11];let f;i[12]!==d?(f=t.jsxs(L,{onClick:o,size:"sm",children:[g,d]}),i[12]=d,i[13]=f):f=i[13];let m;i[14]!==u||i[15]!==f?(m=t.jsxs("div",{className:"flex items-center justify-between",children:[u,f]}),i[14]=u,i[15]=f,i[16]=m):m=i[16];let b;if(i[17]!==s){let x;i[19]===Symbol.for("react.memo_cache_sentinel")?(x=p=>t.jsx(Pe,{config:p,onDelete:c},p.id),i[19]=x):x=i[19],b=s.map(x),i[17]=s,i[18]=b}else b=i[18];let j;i[20]!==b?(j=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:b})}),i[20]=b,i[21]=j):j=i[21];let S;i[22]!==r?(S=t.jsx(O,{open:r,onOpenChange:l}),i[22]=r,i[23]=S):S=i[23];let v;i[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>c(null),i[24]=v):v=i[24];let k;i[25]!==n?(k=t.jsx(Te,{config:n,onClose:v}),i[25]=n,i[26]=k):k=i[26];let y;return i[27]!==k||i[28]!==m||i[29]!==j||i[30]!==S?(y=t.jsxs(t.Fragment,{children:[m,j,S,k]}),i[27]=k,i[28]=m,i[29]=j,i[30]=S,i[31]=y):y=i[31],y}function we(){const i=T.c(12),e=F();let s;i[0]!==e?(s=e("settings.buckets.pageTitle"),i[0]=e,i[1]=s):s=i[1];let r;i[2]!==s?(r=t.jsx(E.Title,{children:s}),i[2]=s,i[3]=r):r=i[3];let l;i[4]!==e?(l=u=>{const{error:o}=u;return t.jsx(Be,{error:o??new Error(e("settings.buckets.failedToLoadConfigsFallback"))})},i[4]=e,i[5]=l):l=i[5];let n;i[6]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(C.Suspense,{fallback:t.jsx(be,{className:"h-32 w-full"}),children:t.jsx(Fe,{})}),i[6]=n):n=i[6];let c;i[7]!==l?(c=t.jsx(W,{fallback:l,children:n}),i[7]=l,i[8]=c):c=i[8];let a;return i[9]!==r||i[10]!==c?(a=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ke,{children:[r,c]})})})}),i[9]=r,i[10]=c,i[11]=a):a=i[11],a}function ot(){const i=T.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),i[0]=e):e=i[0],e}export{ot as default};
|
package/dist/client/assets/{bulk-category-panel-DnZCDf5P.js → bulk-category-panel-DjXWMMrC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,l as Y,j as s,r as W,B as J,i as le}from"./index-
|
|
1
|
+
import{c as Q,l as Y,j as s,r as W,B as J,i as le}from"./index-BiOK08Ck.js";import{c as Z}from"./ZoomOut-B1lVhSeE.js";import{i as ae}from"./X-BtlskU8h.js";import{L as O}from"./label-CCx7flk8.js";import{I as ie,R as oe,a as re}from"./index-Blzxttp5.js";import{a as ce}from"./DotsVertical-BbE0kghC.js";import{S as ne,a as de,b as me,c as xe,d as pe}from"./select-C0ynmWVK.js";import{T as fe,a as ue,b as he}from"./tooltip-EYdI7gi-.js";import"./ChevronUp-KIwd095M.js";import"./ChevronDown-KmITfgTF.js";function ge(a){const e=Q.c(8);let i,t;e[0]!==a?({className:i,...t}=a,e[0]=a,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let o;e[3]!==i?(o=Y("grid gap-3",i),e[3]=i,e[4]=o):o=e[4];let l;return e[5]!==t||e[6]!==o?(l=s.jsx(oe,{"data-slot":"radio-group",className:o,...t}),e[5]=t,e[6]=o,e[7]=l):l=e[7],l}function X(a){const e=Q.c(9);let i,t;e[0]!==a?({className:i,...t}=a,e[0]=a,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let o;e[3]!==i?(o=Y("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:opacity-50",i),e[3]=i,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(re,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(ce,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=l):l=e[5];let c;return e[6]!==t||e[7]!==o?(c=s.jsx(ie,{"data-slot":"radio-group-item",className:o,...t,children:l}),e[6]=t,e[7]=o,e[8]=c):c=e[8],c}function ze(a){const e=Q.c(69),{posts:i,categories:t,initialSlug:o,isPending:l,onApply:c,onClose:m}=a,[n,ee]=W.useState(o&&t.some(d=>d.slug===o)?o:t[0]?.slug??""),[x,se]=W.useState("add");let T;if(e[0]!==t||e[1]!==n){let d;e[3]!==n?(d=te=>te.slug===n,e[3]=n,e[4]=d):d=e[4],T=t.find(d),e[0]=t,e[1]=n,e[2]=T}else T=e[2];const p=T,r=i.length,K=r===1?"post":"posts";let f;e[5]!==r||e[6]!==K?(f=s.jsxs("span",{className:"truncate text-sm font-medium",children:[r," ",K," selected"]}),e[5]=r,e[6]=K,e[7]=f):f=e[7];let E;e[8]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ae,{size:14}),e[8]=E):E=e[8];let u;e[9]!==l||e[10]!==m?(u=s.jsx(fe,{asChild:!0,children:s.jsx(J,{type:"button",variant:"ghost",size:"icon",disabled:l,onClick:m,"aria-label":"Exit selection",children:E})}),e[9]=l,e[10]=m,e[11]=u):u=e[11];let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ue,{side:"bottom",children:"Exit selection"}),e[12]=I):I=e[12];let h;e[13]!==u?(h=s.jsxs(he,{children:[u,I]}),e[13]=u,e[14]=h):h=e[14];let g;e[15]!==f||e[16]!==h?(g=s.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[f,h]}),e[15]=f,e[16]=h,e[17]=g):g=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Update category"}),e[18]=A):A=e[18];const M=r===0?"Select posts from the list to choose what this update applies to.":`Choose a category to apply to ${r} ${r===1?"post":"posts"}.`;let j;e[19]!==M?(j=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:M}),e[19]=M,e[20]=j):j=e[20];let B;e[21]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(O,{children:"Category"}),e[21]=B):B=e[21];let b;e[22]!==t||e[23]!==n?(b=s.jsxs("div",{className:"space-y-2",children:[B,t.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No categories yet — create one in the Categories collection."}):s.jsxs(ne,{value:n,onValueChange:ee,children:[s.jsx(de,{className:"w-full",children:s.jsx(me,{placeholder:"Select a category"})}),s.jsx(xe,{children:t.map(be)})]})]}),e[22]=t,e[23]=n,e[24]=b):b=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=d=>se(d),e[25]=F):F=e[25];let V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(X,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[26]=V):V=e[26];let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs(O,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[V,s.jsxs("span",{className:"space-y-0.5",children:[s.jsx("span",{className:"block text-sm font-medium",children:"Add category"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:"Keep existing categories and add this one."})]})]}),e[27]=G):G=e[27];let L;e[28]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(X,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[28]=L):L=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs(O,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[L,s.jsxs("span",{className:"space-y-0.5",children:[s.jsx("span",{className:"block text-sm font-medium",children:"Replace category"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:"Remove all current categories and set only this one."})]})]}),e[29]=P):P=e[29];let y;e[30]!==x?(y=s.jsxs(ge,{value:x,onValueChange:F,className:"gap-2",children:[G,P]}),e[30]=x,e[31]=y):y=e[31];let N;e[32]!==l||e[33]!==m?(N=s.jsx(J,{type:"button",variant:"outline",onClick:m,disabled:l,children:"Cancel"}),e[32]=l,e[33]=m,e[34]=N):N=e[34];const D=!p||l||r===0;let v;e[35]!==x||e[36]!==c||e[37]!==p?(v=()=>p&&c(x,{name:p.name,slug:p.slug}),e[35]=x,e[36]=c,e[37]=p,e[38]=v):v=e[38];let S;e[39]!==l?(S=l?s.jsxs(s.Fragment,{children:[s.jsx(le,{size:14,className:"animate-spin"}),"Updating…"]}):"Apply",e[39]=l,e[40]=S):S=e[40];let _;e[41]!==D||e[42]!==v||e[43]!==S?(_=s.jsx(J,{type:"button",disabled:D,onClick:v,children:S}),e[41]=D,e[42]=v,e[43]=S,e[44]=_):_=e[44];let k;e[45]!==N||e[46]!==_?(k=s.jsxs("div",{className:"flex justify-end gap-2",children:[N,_]}),e[45]=N,e[46]=_,e[47]=k):k=e[47];let C;e[48]!==b||e[49]!==y||e[50]!==k?(C=s.jsxs("div",{className:"mt-6 space-y-4",children:[b,y,k]}),e[48]=b,e[49]=y,e[50]=k,e[51]=C):C=e[51];let U;e[52]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Z,{size:16,className:"shrink-0 text-muted-foreground"}),e[52]=U):U=e[52];const H=r===1?"post":"posts";let w;e[53]!==r||e[54]!==H?(w=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[U,s.jsxs("span",{className:"text-sm",children:[r," selected ",H]})]}),e[53]=r,e[54]=H,e[55]=w):w=e[55];let R;e[56]!==r||e[57]!==i?(R=r===0?s.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:"No posts selected yet — pick them from the list on the left."}):s.jsx("ul",{className:"divide-y border-t bg-background",children:i.map(je)}),e[56]=r,e[57]=i,e[58]=R):R=e[58];let $;e[59]!==w||e[60]!==R?($=s.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[w,R]}),e[59]=w,e[60]=R,e[61]=$):$=e[61];let z;e[62]!==j||e[63]!==C||e[64]!==$?(z=s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[A,j,C,$]})}),e[62]=j,e[63]=C,e[64]=$,e[65]=z):z=e[65];let q;return e[66]!==z||e[67]!==g?(q=s.jsxs("div",{className:"flex h-full flex-col",children:[g,z]}),e[66]=z,e[67]=g,e[68]=q):q=e[68],q}function je(a){return s.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[s.jsx(Z,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:a.title}),a.slug&&s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:a.slug})]})]},a.key)}function be(a){return s.jsx(pe,{value:a.slug,children:s.jsx("span",{className:"truncate",children:a.name})},a.slug)}export{ze as BulkCategoryPanel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-VazNHrO3.js";import{w as Vl}from"./agent-icon-DHXwUm9P.js";import{i as Wl}from"./ChevronRight-Df2B68Ds.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Dn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-BiOK08Ck.js";import{w as Vl}from"./agent-icon-Dkdhr568.js";import{i as Wl}from"./ChevronRight-wz9FFKI_.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Dn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}}ct.empty=new ct(!0);class Kl{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function xs(n){let e=[];do e.push(Gl(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Gl(n){let e=[];do e.push(Xl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Xl(n){let e=ec(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Ql(n,e);else break;return e}function zi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Ql(n,e){let t=zi(n),r=t;return n.eat(",")&&(n.next!="}"?r=zi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Zl(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function ec(n){if(n.eat("(")){let e=xs(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Zl(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function tc(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=t())}else if(s.type=="star"){let l=t();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=t();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=t();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=t();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function vs(n,e){return e-n}function Li(n,e){let t=[];return r(e),t.sort(vs);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&t.indexOf(l)==-1&&r(l)}}}function nc(n){let e=Object.create(null);return t(Li(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Li(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new ct(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(vs);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function rc(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ks(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function ws(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Ss(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function Ms(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new oc(n,r,e[r]);return t}let ji=class Cs{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ms(e,r.attrs),this.defaultAttrs=ks(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ct.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ws(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ye(this,this.computeAttrs(e),v.from(t),j.setFrom(r))}createChecked(e=null,t,r){return t=v.from(t),this.checkContent(t),new ye(this,this.computeAttrs(e),t,j.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=v.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(v.empty,!0);return o?new ye(this,e,t.append(o),j.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Ss(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:j.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Cs(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function ic(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class oc{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?ic(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class jn{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Ms(e,i.attrs),this.excluded=null;let o=ks(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,ws(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new jn(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Ss(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Ns{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Y.from(e.nodes),t.marks=Y.from(e.marks||{}),this.nodes=ji.compile(this.spec.nodes,this),this.marks=jn.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=ct.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?Vi(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Vi(this,s.split(" "))}this.nodeFromJSON=i=>ye.fromJSON(this,i),this.markFromJSON=i=>j.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ji){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new En(r,r.defaultAttrs,e,j.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Vi(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function sc(n){return n.tag!=null}function ac(n){return n.style!=null}class $e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(sc(i))this.tags.push(i);else if(ac(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new $i(this,t,!1);return r.addAll(e,j.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new $i(this,t,!0);return r.addAll(e,j.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(uc(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $e(e,$e.schemaRules(e)))}}const Ds={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},lc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Es={ol:!0,ul:!0},Ut=1,Or=2,$t=4;function Wi(n,e,t){return e!=null?(e?Ut:0)|(e==="full"?Or:0):n&&n.whitespace=="pre"?Ut|Or:t&~$t}class hn{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=j.none,this.match=o||(s&$t?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(v.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ut)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=v.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ds.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $i{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=Wi(null,t.preserveWhitespace,0)|(r?$t:0);i?o=new hn(i.type,i.attrs,j.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new hn(null,null,j.none,!0,null,s):o=new hn(e.schema.topNodeType,null,j.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,o=i.options&Or?"full":this.localPreserveWS||(i.options&Ut)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(s.text(a[l]),t,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Es.hasOwnProperty(s)&&this.parser.normalizeLists&&cc(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:lc.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(Ds.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=l&&l.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,t.attrs||null,r,t.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)t=this.enterInner(i[s],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=j.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Hi(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Wi(e,o,s.options);s.options&$t&&s.content.length==0&&(a|=$t);let l=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Hi(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new hn(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ut)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function cc(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Es.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function uc(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function qi(n){let e={};for(let t in n)e[t]=n[t];return e}function Hi(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class pt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=ir(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=vn(ir(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&vn(ir(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return vn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new pt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ji(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ji(e.marks)}}function Ji(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ir(n){return n.document||window.document}const Yi=new WeakMap;function dc(n){let e=Yi.get(n);return e===void 0&&Yi.set(n,e=fc(n)),e}function fc(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function vn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=dc(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=vn(n,h,t,r);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Ts=65535,Os=Math.pow(2,16);function hc(n,e){return n+e*Os}function Ui(n){return n&Ts}function pc(n){return(n-(n&Ts))/Os}const As=1,Ps=2,kn=4,Rs=8;class Ar{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Rs)>0}get deletedBefore(){return(this.delInfo&(As|kn))>0}get deletedAfter(){return(this.delInfo&(Ps|kn))>0}get deletedAcross(){return(this.delInfo&kn)>0}}class ae{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ae.empty)return ae.empty}recover(e){let t=0,r=Ui(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+pc(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:t:t,f=l+i+(h<0?0:u);if(r)return f;let p=e==(t<0?l:d)?null:hc(a/3,e-l),g=e==l?Ps:e==d?As:kn;return(t<0?e!=l:e!=d)&&(g|=Rs),new Ar(f,g,p)}i+=u-c}return r?e+i:new Ar(e+i,0,null)}touches(e,t){let r=0,i=Ui(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new ae(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ae.empty:new ae(e<0?[0,-e,0]:[0,0,e])}}ae.empty=new ae([]);class Tn{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Tn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Tn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Ar(e,i,null)}}const or=Object.create(null);class Z{getMap(){return ae.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=or[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in or)throw new RangeError("Duplicate use of step JSON ID "+e);return or[e]=t,t.prototype.jsonID=e,t}}class ${constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new $(e,null)}static fail(e){return new $(null,e)}static fromReplace(e,t,r,i){try{return $.ok(e.replace(t,r,i))}catch(o){if(o instanceof Cn)return $.fail(o.message);throw o}}}function Kr(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Kr(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return v.fromArray(r)}class je extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new S(Kr(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,o)}invert(){return new me(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new je(t.pos,r.pos,this.mark)}merge(e){return e instanceof je&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new je(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new je(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("addMark",je);class me extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Kr(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,r)}invert(){return new je(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new me(t.pos,r.pos,this.mark)}merge(e){return e instanceof me&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new me(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new me(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("removeMark",me);class Ve extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Ve(this.pos,t.marks[i]);return new Ve(this.pos,this.mark)}}return new ut(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ve(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ve(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("addNodeMark",Ve);class ut extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ve(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ut(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ut(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("removeNodeMark",ut);class W extends Z{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Pr(e,this.from,this.to)?$.fail("Structure replace would overwrite content"):$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ae([this.from,this.to-this.from,this.slice.size])}invert(e){return new W(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&W.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new W(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof W)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new W(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new W(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new W(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}W.MAP_BIAS=1;Z.jsonID("replace",W);class H extends Z{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Pr(e,this.from,this.gapFrom)||Pr(e,this.gapTo,this.to)))return $.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?$.fromReplace(e,this.from,this.to,r):$.fail("Content does not fit in gap")}getMap(){return new ae([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new H(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new H(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new H(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}Z.jsonID("replaceAround",H);function Pr(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function mc(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==h&&s.mark.eq(d[g])?s.to=f:i.push(s=new me(h,f,d[g])));a&&a.to==h?a.to=f:o.push(a=new je(h,f,r))}}),i.forEach(l=>n.step(l)),o.forEach(l=>n.step(l))}function gc(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof jn){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<i.length;f++){let p=i[f];p.step==o-1&&d.eq(i[f].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>n.step(new me(s.from,s.to,s.style)))}function Gr(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)s.push(new W(a,u,S.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new me(a,u,c.marks[h]));if(i&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new S(v.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new W(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(v.empty,!0);n.replace(a,a,new S(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function yc(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Pt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,o=0;;--r){let s=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-o;if(r<n.depth&&s.canReplace(a,l,t))return r;if(r==0||s.type.spec.isolating||!yc(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function bc(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=v.empty,d=0;for(let p=o,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=v.from(r.node(p).copy(u)),d++):l--;let h=v.empty,f=0;for(let p=o,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,h=v.from(i.node(p).copy(h)),f++):c++;n.step(new H(l,c,s,a,new S(u.append(h),d,f),u.size-d,!0))}function Xr(n,e,t=null,r=n){let i=xc(n,e),o=i&&vc(r,e);return o?i.map(Ki).concat({type:e,attrs:t}).concat(o.map(Ki)):null}function Ki(n){return{type:n,attrs:null}}function xc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function vc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:s}function kc(n,e,t){let r=v.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new H(i,o,i,o,new S(r,0,0),t.length,!0))}function wc(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Sc(n.doc,n.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&_s(n,s,a,o),Gr(n,n.mapping.slice(o).map(a,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(a,1),h=u.map(a+s.nodeSize,1);return n.step(new H(d,h,d+1,h-1,new S(v.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Is(n,s,a,o),!1}})}function Is(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function _s(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
|
package/dist/client/assets/{capability-load-error-BPWNkWfC.js → capability-load-error-CvAXaOzU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-
|
|
1
|
+
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-BiOK08Ck.js";function f(){const e=a.c(5),l=o(),{locator:n}=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(m,{size:28})}),e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Couldn't load your permissions"}),t.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Something went wrong checking your access. This is usually temporary."})]}),e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[s,i,t.jsx(u,{variant:"outline",size:"sm",onClick:()=>l.invalidateQueries({queryKey:x.myCapabilities(n)}),children:"Try again"})]}),e[2]=n,e[3]=l,e[4]=r):r=e[4],r}export{f as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l as n,j as c}from"./index-
|
|
1
|
+
import{c as o,l as n,j as c}from"./index-BiOK08Ck.js";function i(a){const e=o.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as J,r as k,l as Q,j as t,B as U,i as V,t as T}from"./index-BiOK08Ck.js";import{i as X}from"./XCircle-Ckem5_86.js";import{c as I}from"./ZoomOut-B1lVhSeE.js";import{n as Y}from"./LinkExternal01-BxDmoIMS.js";import{aM as Z}from"./agent-icon-Dkdhr568.js";import{f as _,a as K,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-C9waqkx6.js";import{I as M}from"./input-DWm5CrG4.js";import{L}from"./label-CCx7flk8.js";import{v as at,w as mt,_ as nt,o as lt,y as R,B as pt,$ as ct,z as dt}from"./index-BcZlVMtV.js";import{c as ut,B as gt,a as xt}from"./block-document-BkW7UGwq.js";import{u as ft}from"./use-autosave-DHWyz6Ym.js";import{t as ht}from"./ChevronDown-KmITfgTF.js";import{p as yt,q as jt,o as vt}from"./automation-runs-BsBW6Pgc.js";import{s as v,E as bt}from"./primitives-CujPMuYz.js";import"./AlertCircle-C5JfzsXz.js";import"./Tool01-DjXumdS6.js";import"./ArrowUp-DncS146I.js";import"./Settings02-DUzQYcG3.js";import"./Tool02-CGoa2Xad.js";import"./ArrowUpRight-Bwindduz.js";import"./TrendUp01-BtM4seSr.js";import"./ZapSquare-CVnk9Op2.js";import"./Users03-UA8Mu4a1.js";import"./CheckCircle-9OYWikza.js";import"./ChevronUp-KIwd095M.js";import"./ChevronRight-wz9FFKI_.js";import"./DotsVertical-BbE0kghC.js";import"./Stars02-C6i_bRhr.js";import"./Copy01-CjAIt0B7.js";import"./Globe01-8jjIiOgJ.js";import"./Eye-Dagnh8Dg.js";import"./FilterLines-JYQ75o4l.js";import"./Star01-DrYQqgkV.js";import"./Globe04-D1T0gsTb.js";import"./SwitchHorizontal01-BRnfTS5N.js";import"./HardDrive-Cu04k8YT.js";import"./Image01-DUfewpa2.js";import"./Key01-DrNnBa_d.js";import"./LayoutLeft-a8iQv3Q7.js";import"./Monitor01-BuypQq_L.js";import"./Sun-Cf_C-NpM.js";import"./Package-CqNFUw0f.js";import"./Palette-W9y7yVz3.js";import"./Play-BBDiRka6.js";import"./Plus-DK4_uNTp.js";import"./SearchLg-DgRDpVmn.js";import"./SearchMd-BfjUCRul.js";import"./Shield01-Dlidz0tC.js";import"./Stars01-D8M_o2P1.js";import"./Trash01-B8oIKgg4.js";import"./Upload01-CHwMJF7R.js";import"./User01-DdupyZi_.js";import"./Users01-G8DTyVLY.js";import"./XClose-C6sEzPYN.js";import"./X-BtlskU8h.js";import"./Zap-BKahSrs2.js";import"./chat-context-BHZI61tL.js";import"./autosend-w8k2R4c_.js";import"./hooks-UDVYW1DV.js";import"./use-mcp-client-SNuzbU_l.js";import"./auth-B8yoVRj9.js";import"./decopilot-sse-pool-DMRPySL4.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-C5d9Psj4.js";import"./use-virtual-mcp-52uGLlLm.js";import"./use-collections-C2Jcl8E8.js";import"./use-ai-providers-Dubk5pUN.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CT3Y1avF.js";import"./use-organization-settings-EoQjiXIq.js";import"./tooltip-EYdI7gi-.js";import"./dialog-CNZdX1LQ.js";import"./drawer-BVKpf346.js";import"./collection-search-ChC9xkmI.js";import"./use-mobile-CdUX9pmH.js";import"./AreaChart-AicMXMjh.js";import"./index-Bv2Q6cmW.js";import"./calendar-CM91UsmF.js";import"./shell-layout-BSS2lUYR.js";import"./avatar-DojpxCme.js";import"./use-t-D8TK1BOS.js";import"./required-auth-layout-uACM9t9U.js";import"./use-org-sso-STwx3iyk.js";import"./index-2LHFxjSI.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-DIc1gymd.js";import"./use-mcp-tools-CJkrEqRM.js";import"./use-connection-B42YdYxb.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CXcym41q.js";import"./mcp-oauth-ism6UTwZ.js";import"./extract-connection-data-BoucLG5_.js";import"./use-members-CvmZXDoC.js";import"./use-org-auth-client-Dq28TR1b.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-BFpz1OLx.js";import"./popover-DO-tE0QM.js";import"./command-CulNp5Mh.js";import"./index-DD3xC72S.js";import"./use-copy-BtPhSLhG.js";import"./companions-core-DKh-bgs-.js";import"./form-HuHRWPyk.js";import"./select-C0ynmWVK.js";import"./tabs-BhyCz-TB.js";import"./toggle-group-DW6JRZRc.js";import"./use-deco-credits-Dp_Ohz5g.js";import"./connection-card-QY-xBCH6.js";import"./use-registry-connections-wAGmqj3Y.js";import"./useInfiniteQuery-BlKM3DIN.js";import"./use-infinite-scroll-BWqOyQGZ.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CqVmEy4h.js";import"./integration-icon-CiMd_U94.js";import"./textarea-CTO9QDHu.js";import"./connection-form-helpers-DdrWFFOA.js";import"./collection-tabs-D-a047uL.js";import"./badge-DaF-L4O0.js";import"./useSuspenseInfiniteQuery-GjOLPtBu.js";import"./connect-desktop-dialog-CT-XJxTO.js";import"./select-model-ClKNTBjo.js";import"./checkbox-BOIV5h-9.js";import"./skeleton-BFkQ9BUW.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D1pj4kgG.js";import"./index-BO4UMUWN.js";import"./file-type-icon-CVHHrYGv.js";import"./toolbar-CVOIq5zM.js";import"./use-debounced-value-EKkLp4kP.js";import"./index-zvXOOCPK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DT45PW7a.js";import"./empty-state-XEvabYsc.js";import"./use-capability-DQ6R1P8G.js";import"./toolbar-icon-button-CTKN-px8.js";import"./use-debounced-autosave-DiiJBWk_.js";import"./index-DDILE-9H.js";import"./sidebar-D4Kvtuzb.js";import"./search-input-B48VsXyl.js";import"./use-mcp-auth-status-DpriZKVz.js";import"./switch-iUF85ecT.js";import"./github-repo-picker-CQaq7L0f.js";import"./use-navigate-to-agent-TqdRbfLS.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-DYhb2kap.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./monaco-editor-HgwGPonU.js";import"./use-file-configs-6cFRIKwC.js";import"./use-automations-DYiYHQ-u.js";import"./automation-list-row-DmuxFN0d.js";import"./table-CeL3ZkxH.js";import"./use-clock-tick-BPOQdZXJ.js";function Ct(b){const e=J.c(18),{icon:x,title:n,defaultOpen:C,children:d}=b,D=C===void 0?!1:C,[f,A]=k.useState(D);let l;e[0]!==x?(l=t.jsx(x,{size:15}),e[0]=x,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=f&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==f||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:f,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=f,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function yr({orgSlug:b,virtualMcpId:e,branch:x,blockKey:n,block:C,decofile:d,meta:D,onManagePosts:f,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:b,virtualMcpId:e,branch:x}),h=mt(C,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,S)=>p({...r,[o]:S}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=k.useState(a),[m,N]=k.useState(null),[w,$]=k.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=z.length,q=o=>s("slug",o),H=async(o,S)=>{const G=v(r.name);$(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:G,slug:S});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const P={...r,slug:S};await i.mutateAsync({blockKey:n,data:R(n,"categories",P)}),c(P),T.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),N(null)}catch(g){y(o),N(null),T.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},W=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){q(o);return}N({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(M,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:W,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(M,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:D,sandboxRef:{orgSlug:b,virtualMcpId:e,branch:x},emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(I,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>f(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(I,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(_,{open:!!m,onOpenChange:o=>{o||w||(y(a),N(null))},children:t.jsxs(K,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:w,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:w,children:w?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{yr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as je,e as et,r as x,p as tt,a as nt,U as st,ak as at}from"./index-
|
|
1
|
+
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as je,e as et,r as x,p as tt,a as nt,U as st,ak as at}from"./index-BiOK08Ck.js";import{A as Ue,c as ot,a as rt,w as it}from"./autosend-w8k2R4c_.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-UDVYW1DV.js";import{u as pt}from"./studio-tools-C5d9Psj4.js";import{a as ft,u as ht,S as mt}from"./use-mcp-client-SNuzbU_l.js";import{a as gt}from"./use-virtual-mcp-52uGLlLm.js";import{u as yt,a as ge}from"./use-ai-providers-Dubk5pUN.js";import{o as xt,b as St}from"./location-BpLtHjTZ.js";import{d as bt,q as vt,n as It}from"./tab-id-BijBBRwE.js";import{u as kt}from"./use-decopilot-events-CT3Y1avF.js";import{e as Ct}from"./use-organization-settings-EoQjiXIq.js";const Tt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Mt={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},wt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Et={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},At={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},_t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Rt(t){return Qe(t).includes("deepresearch")}const $t=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:$t.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Rt(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Pt(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,Tt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Mt[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,wt[o]??[])),n.image||(n.image=ie(a,s.id,Et[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,At[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,_t[o]??[],Ve))}return n}const Dt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Cn(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Dt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let c;e[5]!==a?(c=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=c):c=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=p):p=e[7];let d;return e[8]!==c?(d=K.jsxs("div",{role:"status",children:[c,p]}),e[8]=c,e[9]=d):d=e[9],d}const Pe={online:!1,capabilities:[],ready:!1};function Ot(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const b=await s.call("LINK_CURRENT_GET",{});return b?{...b,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const c=a?1e3:1e4,p=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==c||e[7]!==p?(d={queryKey:o,queryFn:r,staleTime:c,refetchInterval:p,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=c,e[7]=p,e[8]=d):d=e[8];const{data:g}=Ye(d);return g??Pe}function Lt(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const ve={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Nt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(ve))if(a.harness===t&&a.sandbox===n)return s;return null}function Tn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ft(t,e){return e&&t&&ve[t].sandbox==="user-desktop"?"decopilot":t}function qt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function jt(t){const e=oe.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=Fe(n);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ee(a);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?bt(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const c=r;let p;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(p=[],t&&p.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`),c){let g;e[13]!==c?(g=xt(c),e[13]=c,e[14]=g):g=e[14];const b=g;let A;e[15]!==c?(A=St(c),e[15]=c,e[16]=A):A=e[16],p.push(`### Currently Open File
|
|
4
4
|
The user has this file open in the Library and is most likely referring to it:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-BiOK08Ck.js";import{i as m}from"./ChevronUp-KIwd095M.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-BiOK08Ck.js";import{A as u}from"./auth-split-layout-wsFCkH92.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|