@decocms/mesh 2.76.0 → 2.78.0
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-TbirTaeA.js → AlertCircle-BppvLQSd.js} +1 -1
- package/dist/client/assets/{ArrowUp-DVhz9MPT.js → ArrowUp-D26ZQKRa.js} +1 -1
- package/dist/client/assets/{Calendar-BhleOqT-.js → Calendar-DDieAsd2.js} +1 -1
- package/dist/client/assets/{Check-BIlnRzi6.js → Check-bgVFNRDs.js} +1 -1
- package/dist/client/assets/{CheckCircle-CSYoAEm3.js → CheckCircle-D5tJhsvc.js} +1 -1
- package/dist/client/assets/{CheckDone01-gZo2F6uL.js → CheckDone01-dY3WtOge.js} +1 -1
- package/dist/client/assets/{ChevronDown-jAfIG9nZ.js → ChevronDown-DY4fpd0G.js} +1 -1
- package/dist/client/assets/{ChevronRight-CNYkXy1u.js → ChevronRight-DMzFQQCc.js} +1 -1
- package/dist/client/assets/{Code01-DeVT5m93.js → Code01-7hV4ZDjZ.js} +1 -1
- package/dist/client/assets/{Copy01-BJPi2nBZ.js → Copy01-C35WeFYE.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CZIcl0Ye.js → DotsHorizontal-LbVwX-Tq.js} +1 -1
- package/dist/client/assets/{DotsVertical-CPJps54j.js → DotsVertical-BNqPYTki.js} +1 -1
- package/dist/client/assets/{Download01-BVA62GFI.js → Download01-Cihql6Z7.js} +1 -1
- package/dist/client/assets/{Edit01-CLT1AKyh.js → Edit01-DDrpQJgk.js} +1 -1
- package/dist/client/assets/{File02-M7e4eeKQ.js → File02-GEmd_G7y.js} +1 -1
- package/dist/client/assets/{File06-BUOJeS0C.js → File06-888BgyfZ.js} +1 -1
- package/dist/client/assets/{FilterLines-CDkZPaiO.js → FilterLines-Bvkz4XO7.js} +1 -1
- package/dist/client/assets/{Globe02-CNtZ4Mz7.js → Globe02-DSX2gzp_.js} +1 -1
- package/dist/client/assets/{Grid01-BhCIE3UE.js → Grid01-CfSiTcO8.js} +1 -1
- package/dist/client/assets/{Home02-Zp_wVezk.js → Home02-PhQXF8P6.js} +1 -1
- package/dist/client/assets/{Image01-Bmljn0R6.js → Image01-BUR65REQ.js} +1 -1
- package/dist/client/assets/{Inbox01-Bz-1SNbb.js → Inbox01-Bhe6QhSW.js} +1 -1
- package/dist/client/assets/{InfoCircle-DutDNmXq.js → InfoCircle-5NZyA5WD.js} +1 -1
- package/dist/client/assets/{LinkExternal01-npl2D9IH.js → LinkExternal01-Cr89LzOE.js} +1 -1
- package/dist/client/assets/{List-B95opsr5.js → List-BBkbo-oe.js} +1 -1
- package/dist/client/assets/{Loading01-CudhqwtJ.js → Loading01-C2vqzEw-.js} +1 -1
- package/dist/client/assets/{Lock01-C3j5poil.js → Lock01-ClMI2bMm.js} +1 -1
- package/dist/client/assets/{Pin01-DpTwe7GO.js → Pin01-uiXGtZsb.js} +1 -1
- package/dist/client/assets/{Play-BxFFyAEF.js → Play-Bm8SKfhZ.js} +1 -1
- package/dist/client/assets/{Plus-BVPnBK8D.js → Plus-BMOTPGqH.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Dzlid7sh.js → RefreshCcw01-B1tus5Lj.js} +1 -1
- package/dist/client/assets/{SearchMd-yRVgOeax.js → SearchMd-BqVXNd65.js} +1 -1
- package/dist/client/assets/{Settings01-DGIrqZBI.js → Settings01-CYRp4gjN.js} +1 -1
- package/dist/client/assets/{Settings02-CW4MK9LY.js → Settings02-BiTxgSpC.js} +1 -1
- package/dist/client/assets/{Share07-BKNvns4q.js → Share07-BZVoNuS6.js} +1 -1
- package/dist/client/assets/{Terminal-DV_yPRWa.js → Terminal-DRpoCIsG.js} +1 -1
- package/dist/client/assets/{Tool01-C0EKLKq5.js → Tool01-djk7g7Hv.js} +1 -1
- package/dist/client/assets/{Trash01-py7ft8Od.js → Trash01-d4v7i3Ze.js} +1 -1
- package/dist/client/assets/{Upload01-CCoXEdI4.js → Upload01-Ci_jklEk.js} +1 -1
- package/dist/client/assets/{Users03-D2F2bran.js → Users03-Bw7fWrTD.js} +1 -1
- package/dist/client/assets/{X-CixxHrye.js → X-CslJd5Ib.js} +1 -1
- package/dist/client/assets/{XClose-S1Me7eeg.js → XClose-CjpNuP8c.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DZgc-mir.js → agent-connections-preview-qFrRTce9.js} +1 -1
- package/dist/client/assets/{agent-detail-DPLDxB9n.js → agent-detail-BqrAf6oD.js} +1 -1
- package/dist/client/assets/{agents-CynO2-IY.js → agents-DUQt1GSW.js} +1 -1
- package/dist/client/assets/{alert-dialog-B1nWkQHx.js → alert-dialog-DRso9X1m.js} +1 -1
- package/dist/client/assets/{auth-catchall-CJ49F7Eq.js → auth-catchall-CBFb2pC-.js} +1 -1
- package/dist/client/assets/{avatar-BbH9O0kN.js → avatar-kY9raA-l.js} +1 -1
- package/dist/client/assets/{badge-C898LHvV.js → badge-DBw6AEaX.js} +1 -1
- package/dist/client/assets/{binder-xcUkLvPC.js → binder-Jddq1y1v.js} +1 -1
- package/dist/client/assets/{breadcrumb-t_Ccp20G.js → breadcrumb-ChH6wfcA.js} +1 -1
- package/dist/client/assets/{button-C1iesapY.js → button-D_OpQIQm.js} +1 -1
- package/dist/client/assets/{card-DKzkS6ji.js → card-DAZxrY9k.js} +1 -1
- package/dist/client/assets/{checkbox-B82l7mBw.js → checkbox-C1Sx9y02.js} +1 -1
- package/dist/client/assets/{circle-alert-_5s_KbQk.js → circle-alert-DHI8xRUj.js} +1 -1
- package/dist/client/assets/{collection-detail-B-hnHfhu.js → collection-detail-mD5cqpxJ.js} +1 -1
- package/dist/client/assets/{collection-search-D3a5_1zR.js → collection-search-Bkd4qN8a.js} +1 -1
- package/dist/client/assets/{collection-tab-Y58MHDMK.js → collection-tab-Dw5b9EM9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B6XWzQ-4.js → collection-table-wrapper-DFTdnQhc.js} +1 -1
- package/dist/client/assets/{collection-tabs-BPHWDFL4.js → collection-tabs-N53MF1Jz.js} +1 -1
- package/dist/client/assets/{command-DepzRVHX.js → command-B5nNM5RC.js} +1 -1
- package/dist/client/assets/{connect-OP0J5SPJ.js → connect--hPmG576.js} +1 -1
- package/dist/client/assets/{connection-card-DkCny6Ez.js → connection-card-Ci3H_H7r.js} +1 -1
- package/dist/client/assets/{connection-detail-CdLleACg.js → connection-detail-8nT6j66Y.js} +1 -1
- package/dist/client/assets/{connections-BZUVvBGs.js → connections-ShazCLrP.js} +1 -1
- package/dist/client/assets/constants-1u4R2d-I.js +1 -0
- package/dist/client/assets/{constants-BEco_-y7.js → constants-DisdEZ3l.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-58b_GUv7.js → create-organization-dialog-Ca5pwwfH.js} +1 -1
- package/dist/client/assets/{create-project-dialog-C5GAJOOY.js → create-project-dialog-BDfz4rOz.js} +1 -1
- package/dist/client/assets/{dialog-CpkgwzHW.js → dialog-BPL7ZvPc.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D6YYwFq7.js → dropdown-menu-BxLN4KkF.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BMgNBEQS.js → dynamic-plugin-layout-D9dQ0ajA.js} +1 -1
- package/dist/client/assets/{empty-state-BQPtoYZe.js → empty-state-CbIU_RrP.js} +1 -1
- package/dist/client/assets/{empty-state-CH3e4Xzf.js → empty-state-DXJM9xrV.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Vpi1vdW2.js → env-vars-editor-BbjrljLQ.js} +1 -1
- package/dist/client/assets/{error-boundary-BGFWaL1J.js → error-boundary-BMH0CjEH.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CDmQ7rLP.js → extract-connection-data-wB5jtXsg.js} +1 -1
- package/dist/client/assets/{file-browser-DUDclrRh.js → file-browser-DBOCTon5.js} +2 -2
- package/dist/client/assets/{form-NA0-x5iN.js → form-BpiblhO1.js} +1 -1
- package/dist/client/assets/{grid-view-DbtTgaoS.js → grid-view-Bty4YwjE.js} +1 -1
- package/dist/client/assets/{home-DtmWz3MA.js → home-BIvstm5O.js} +1 -1
- package/dist/client/assets/{index-Kq8ytqk9.js → index--vZ0X2xS.js} +1 -1
- package/dist/client/assets/{index-wUnd_o-U.js → index-B9-4goiW.js} +1 -1
- package/dist/client/assets/{index-HxeE9C0A.js → index-BKpxPW_G.js} +2 -2
- package/dist/client/assets/{index-GRocoNYa.js → index-BV_k_ZyP.js} +1 -1
- package/dist/client/assets/{index-C9Dn0opW.js → index-B_142IPp.js} +1 -1
- package/dist/client/assets/{index-DlY6KFzI.js → index-CnNzyZrg.js} +1 -1
- package/dist/client/assets/{index-43_iGxlN.js → index-D-_nr7La.js} +1 -1
- package/dist/client/assets/{index-Dv4saiJc.js → index-D0nVkmnC.js} +1 -1
- package/dist/client/assets/{index-ByJoFAq_.js → index-fVGDVKMq.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CSOdbqFL.js → infiniteQueryObserver-B8M15Jhm.js} +1 -1
- package/dist/client/assets/{input-DBGu1Yhi.js → input-lpAGMNlp.js} +1 -1
- package/dist/client/assets/{integration-icon-CmJggqPx.js → integration-icon-DFSc5_D8.js} +1 -1
- package/dist/client/assets/{label-11d5Pe_w.js → label-h0it3r-G.js} +1 -1
- package/dist/client/assets/{layout-BQSZy0Ao.js → layout-DaBTH10o.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BxVB7BFB.js → localstorage-keys-CrJngaoW.js} +1 -1
- package/dist/client/assets/{login-CMpn2tdR.js → login-DX4NlTrd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-JrpxCLx4.js → mcp-oauth-DQYLB8aB.js} +1 -1
- package/dist/client/assets/{mcp-server-card-8DET7nVd.js → mcp-server-card-fBAhOAUG.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-CMrzxsYv.js → mcp-server-detail-BZkrf0kt.js} +2 -2
- package/dist/client/assets/{members-CUWgr5ku.js → members-BigA6ZKR.js} +1 -1
- package/dist/client/assets/{monaco-editor-DvJ6AQm-.js → monaco-editor-DZSx9WV6.js} +1 -1
- package/dist/client/assets/{monitoring-Db1K0NxK.js → monitoring-cMb0Xapp.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bh-LWKIz.js → oauth-callback-CjSC6FG1.js} +1 -1
- package/dist/client/assets/{page-Bx3m0Nlj.js → page-BDwNfQ-N.js} +1 -1
- package/dist/client/assets/{page-79TZOOqo.js → page-jq7pkske.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-34Wj3C93.js → plugin-empty-state-CIjn_En1.js} +1 -1
- package/dist/client/assets/{plugin-header-KrvIXXbF.js → plugin-header-DxKd-JRE.js} +1 -1
- package/dist/client/assets/{popover-BbAo_V3q.js → popover-ESVk6nXT.js} +1 -1
- package/dist/client/assets/{project-layout-QE2hcM6x.js → project-layout-DOGEQwDl.js} +1 -1
- package/dist/client/assets/{project-settings-2bxHgR8P.js → project-settings-DPjoRdOS.js} +1 -1
- package/dist/client/assets/{projects-list-CSrfAb2G.js → projects-list-BSPk4OqL.js} +1 -1
- package/dist/client/assets/{registry-utils-CLfG2KJO.js → registry-utils-yxVJe3X4.js} +1 -1
- package/dist/client/assets/{resizable-D5fgPQWp.js → resizable-fcBWjaSA.js} +1 -1
- package/dist/client/assets/{select-CnIfeZ9k.js → select-BbzYJ4VF.js} +1 -1
- package/dist/client/assets/{shell-layout-DIuzNmm5.js → shell-layout-DlF3XvPK.js} +1 -1
- package/dist/client/assets/{spinner-BbdUl9_5.js → spinner-Lv2khbLw.js} +1 -1
- package/dist/client/assets/{store-invite-eQ6O_LcC.js → store-invite-Bg3OdZwq.js} +1 -1
- package/dist/client/assets/{switch-7wa9WQCt.js → switch-sdaV-SJo.js} +1 -1
- package/dist/client/assets/{table-F_F9uG31.js → table-BxUix49E.js} +1 -1
- package/dist/client/assets/{tasks-Bo849zPQ.js → tasks-Bl2i_lGW.js} +1 -1
- package/dist/client/assets/{textarea-CX1AXmSo.js → textarea-BRJpMcB0.js} +1 -1
- package/dist/client/assets/{tools-list-CeBZ5K9_.js → tools-list-Cmzz8Wet.js} +1 -1
- package/dist/client/assets/{topbar-portal-DTnSGvrH.js → topbar-portal-bqTUj07t.js} +1 -1
- package/dist/client/assets/{typewriter-title-CydscG0b.js → typewriter-title-BPMIdq0b.js} +1 -1
- package/dist/client/assets/{use-binding-BIvDtNoa.js → use-binding-DMsO_03X.js} +1 -1
- package/dist/client/assets/{use-connection-DWpxH8iy.js → use-connection-B0740Saa.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CMegJpH_.js → use-create-virtual-mcp-lh01_aoW.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-DeBMXnMx.js → use-deco-chat-open-B2KYtTue.js} +2 -2
- package/dist/client/assets/{use-install-from-registry-CNdLBCwL.js → use-install-from-registry-BjKzt3Pz.js} +1 -1
- package/dist/client/assets/{use-list-state-CqdwrHCA.js → use-list-state-DNfSCsX5.js} +1 -1
- package/dist/client/assets/{use-llm-B2BVGott.js → use-llm-D28vq8-j.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CUow6VVK.js → use-mcp-prompts-FoVTG9k7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DO_-llbI.js → use-mcp-tools-DF65_5AL.js} +1 -1
- package/dist/client/assets/{use-mobile-CqANtQ4e.js → use-mobile-Cu9U-yCu.js} +1 -1
- package/dist/client/assets/{use-organization-settings-ANLw4ex1.js → use-organization-settings-CPNBbiln.js} +1 -1
- package/dist/client/assets/{use-project-C1G7xlcy.js → use-project-CuNldV92.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DaI2d98r.js → use-virtual-mcp-BUCuQhrG.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CsMrU_k5.js +1 -0
- package/dist/client/assets/{useMutation-M3-wug2Q.js → useMutation-Bnsod7M-.js} +1 -1
- package/dist/client/assets/useQuery-Bo6lCSyK.js +1 -0
- package/dist/client/assets/utils-Ckp7rFN8.js +1 -0
- package/dist/client/assets/{view-mode-toggle-JVmuLwXe.js → view-mode-toggle-4jMhv4Z3.js} +1 -1
- package/dist/client/assets/{workflow-BKKAfuJP.js → workflow-BrBoF9SG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +152 -149
- package/dist/server/server.js +127 -124
- package/package.json +1 -1
- package/dist/client/assets/constants-gwxE8_b0.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CL3o6Gdm.js +0 -1
- package/dist/client/assets/useQuery-jRtVXI31.js +0 -1
- package/dist/client/assets/utils-D1Qd9-I_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,c as S,u as K,j as a,a_ as W,am as $,b5 as X,a3 as g,al as E,b6 as Y,an as k,b7 as w,av as Z,aq as I,ao as J,ap as Q}from"./index-
|
|
1
|
+
import{r as v,c as S,u as K,j as a,a_ as W,am as $,b5 as X,a3 as g,al as E,b6 as Y,an as k,b7 as w,av as Z,aq as I,ao as J,ap as Q}from"./index-BKpxPW_G.js";import{B as j}from"./button-D_OpQIQm.js";import{T as ee,a as oe,c as te,b as re}from"./integration-icon-DFSc5_D8.js";import{c as ae}from"./Pin01-uiXGtZsb.js";import{u as se,a as ie}from"./use-organization-settings-CPNBbiln.js";import{i as ne}from"./Loading01-C2vqzEw-.js";const A=({size:n=24,color:e="currentColor",...o})=>v.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},v.createElement("path",{d:"M3 9h13.5a4.5 4.5 0 1 1 0 9H12M3 9l4-4M3 9l4 4"}));A.displayName="FlipBackward";const N=({size:n=24,color:e="currentColor",...o})=>v.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},v.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));N.displayName="Save01";function ye(n){const e=S.c(19),{title:o,url:s,icon:r}=n,{org:t}=K(),c=se(t.id),R=ie(t.id);let p;e[0]!==c?.sidebar_items||e[1]!==s?(p=c?.sidebar_items?.some(C=>C.url===s),e[0]=c?.sidebar_items,e[1]=s,e[2]=p):p=e[2];const u=!!p;let f;e[3]!==R.update||e[4]!==r||e[5]!==u||e[6]!==c?.sidebar_items||e[7]!==o||e[8]!==s?(f=async()=>{const C=c?.sidebar_items||[];let y;u?y=C.filter(H=>H.url!==s):y=[...C,{title:o,url:s,icon:r}],await R.update.mutateAsync({sidebar_items:y})},e[3]=R.update,e[4]=r,e[5]=u,e[6]=c?.sidebar_items,e[7]=o,e[8]=s,e[9]=f):f=e[9];const l=f,m=u?"secondary":"outline";let i;e[10]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(ae,{size:16}),e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==m?(d=a.jsx(ee,{asChild:!0,children:a.jsx(j,{onClick:l,size:"icon",variant:m,className:"size-7 border border-input",children:i})}),e[11]=l,e[12]=m,e[13]=d):d=e[13];const b=u?"Pinned":"Pin to sidebar";let h;e[14]!==b?(h=a.jsx(oe,{children:b}),e[14]=b,e[15]=h):h=e[15];let x;return e[16]!==d||e[17]!==h?(x=a.jsx(te,{children:a.jsxs(re,{children:[d,h]})}),e[16]=d,e[17]=h,e[18]=x):x=e[18],x}function ke(n){const e=S.c(15),{onSave:o,onUndo:s,isDirty:r,isSaving:t,saveLabel:c,undoLabel:R}=n,p=c===void 0?"Save":c,u=R===void 0?"Undo":R;if(!r)return null;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(A,{size:14}),e[0]=f):f=e[0];let l;e[1]!==t||e[2]!==s||e[3]!==u?(l=a.jsxs(j,{variant:"outline",size:"sm",onClick:s,disabled:t,"aria-label":u,children:[f,u]}),e[1]=t,e[2]=s,e[3]=u,e[4]=l):l=e[4];let m;e[5]!==t?(m=t?a.jsx(ne,{size:14,className:"animate-spin"}):a.jsx(N,{size:14}),e[5]=t,e[6]=m):m=e[6];let i;e[7]!==t||e[8]!==o||e[9]!==p||e[10]!==m?(i=a.jsxs(j,{variant:"default",size:"sm",onClick:o,disabled:t,"aria-label":p,children:[m,p]}),e[7]=t,e[8]=o,e[9]=p,e[10]=m,e[11]=i):i=e[11];let d;return e[12]!==l||e[13]!==i?(d=a.jsxs(a.Fragment,{children:[l,i]}),e[12]=l,e[13]=i,e[14]=d):d=e[14],d}var P="Radio",[ce,G]=I(P),[de,le]=ce(P),L=v.forwardRef((n,e)=>{const{__scopeRadio:o,name:s,checked:r=!1,required:t,disabled:c,value:R="on",onCheck:p,form:u,...f}=n,[l,m]=v.useState(null),i=E(e,h=>m(h)),d=v.useRef(!1),b=l?u||!!l.closest("form"):!0;return a.jsxs(de,{scope:o,checked:r,disabled:c,children:[a.jsx(g.button,{type:"button",role:"radio","aria-checked":r,"data-state":B(r),"data-disabled":c?"":void 0,disabled:c,value:R,...f,ref:i,onClick:k(n.onClick,h=>{r||p?.(),b&&(d.current=h.isPropagationStopped(),d.current||h.stopPropagation())})}),b&&a.jsx(T,{control:l,bubbles:!d.current,name:s,value:R,checked:r,required:t,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});L.displayName=P;var z="RadioIndicator",M=v.forwardRef((n,e)=>{const{__scopeRadio:o,forceMount:s,...r}=n,t=le(z,o);return a.jsx(Z,{present:s||t.checked,children:a.jsx(g.span,{"data-state":B(t.checked),"data-disabled":t.disabled?"":void 0,...r,ref:e})})});M.displayName=z;var ue="RadioBubbleInput",T=v.forwardRef(({__scopeRadio:n,control:e,checked:o,bubbles:s=!0,...r},t)=>{const c=v.useRef(null),R=E(c,t),p=J(o),u=Q(e);return v.useEffect(()=>{const f=c.current;if(!f)return;const l=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(l,"checked").set;if(p!==o&&i){const d=new Event("click",{bubbles:s});i.call(f,o),f.dispatchEvent(d)}},[p,o,s]),a.jsx(g.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:R,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});T.displayName=ue;function B(n){return n?"checked":"unchecked"}var pe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_="RadioGroup",[fe]=I(_,[w,G]),D=w(),O=G(),[me,ve]=fe(_),F=v.forwardRef((n,e)=>{const{__scopeRadioGroup:o,name:s,defaultValue:r,value:t,required:c=!1,disabled:R=!1,orientation:p,dir:u,loop:f=!0,onValueChange:l,...m}=n,i=D(o),d=W(u),[b,h]=$({prop:t,defaultProp:r??null,onChange:l,caller:_});return a.jsx(me,{scope:o,name:s,required:c,disabled:R,value:b,onValueChange:h,children:a.jsx(X,{asChild:!0,...i,orientation:p,dir:d,loop:f,children:a.jsx(g.div,{role:"radiogroup","aria-required":c,"aria-orientation":p,"data-disabled":R?"":void 0,dir:d,...m,ref:e})})})});F.displayName=_;var V="RadioGroupItem",U=v.forwardRef((n,e)=>{const{__scopeRadioGroup:o,disabled:s,...r}=n,t=ve(V,o),c=t.disabled||s,R=D(o),p=O(o),u=v.useRef(null),f=E(e,u),l=t.value===r.value,m=v.useRef(!1);return v.useEffect(()=>{const i=b=>{pe.includes(b.key)&&(m.current=!0)},d=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",d),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",d)}},[]),a.jsx(Y,{asChild:!0,...R,focusable:!c,active:l,children:a.jsx(L,{disabled:c,required:t.required,checked:l,...p,...r,name:t.name,ref:f,onCheck:()=>t.onValueChange(r.value),onKeyDown:k(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:k(r.onFocus,()=>{m.current&&u.current?.click()})})})});U.displayName=V;var Re="RadioGroupIndicator",q=v.forwardRef((n,e)=>{const{__scopeRadioGroup:o,...s}=n,r=O(o);return a.jsx(M,{...r,...s,ref:e})});q.displayName=Re;var je=F,Ee=U,Pe=q;export{Ee as I,ye as P,je as R,ke as S,Pe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as U,c as ae,o as Nx,h as Cw,k as _w,j as T,s as Nb,a2 as Ix,b$ as wx,bY as Nw,bt as At,c0 as Iw,u as ci,t as _n,c1 as ww,aW as Rx,c2 as Rw,c3 as dn,c4 as il,c5 as Ow,c6 as al,c7 as Lw,c8 as Dw,c9 as Mw,ca as Pw,y as Fw,K as qm,cb as Bw,cc as Uw,cd as Hw,ce as $w,z as Ox,m as Lx,O as as,b4 as jm,bX as Es,g as zw}from"./index-HxeE9C0A.js";import{c as pe}from"./utils-D1Qd9-I_.js";import{i as qw}from"./X-CixxHrye.js";import{u as ka,S as Ib,a as jw,i as Gw,m as Dx,M as Vw,c as Ww,g as Yw,C as Kw,t as Mx,b as Xw,h as Zw}from"./use-deco-chat-open-DeBMXnMx.js";import{b as di,P as pi,a as fi}from"./popover-BbAo_V3q.js";import{S as So}from"./spinner-BbdUl9_5.js";import{b as wn,T as Rn,a as On,c as Ao,I as Gm}from"./integration-icon-CmJggqPx.js";import{d as Px,u as Vm,i as Qr,f as Qw}from"./constants-BEco_-y7.js";import{u as Jw,g as Fx,l as wb,a as Rb,r as eR}from"./use-mcp-prompts-CUow6VVK.js";import{E as tR,i as nR}from"./error-boundary-BGFWaL1J.js";import{B as et}from"./button-C1iesapY.js";import{c as rR,b as iR,e as aR,a as sR,D as oR}from"./dialog-CpkgwzHW.js";import{a as lR,F as uR,b as cR,c as dR,d as pR,f as fR}from"./form-NA0-x5iN.js";import{I as Bx}from"./input-DBGu1Yhi.js";import{i as Ux}from"./AlertCircle-TbirTaeA.js";import{i as hR}from"./ArrowUp-DVhz9MPT.js";import{t as Hh}from"./ChevronDown-jAfIG9nZ.js";import{i as mR}from"./Edit01-CLT1AKyh.js";import{t as ia}from"./Users03-D2F2bran.js";import{i as Hx}from"./ChevronRight-CNYkXy1u.js";import{i as xa}from"./Check-BIlnRzi6.js";import{a as Wm}from"./Copy01-BJPi2nBZ.js";import{i as gR}from"./Terminal-DV_yPRWa.js";import{M as $x,s as Ob}from"./monaco-editor-DvJ6AQm-.js";import{u as bR,L as ER}from"./localstorage-keys-BxVB7BFB.js";import{E as yR}from"./empty-state-CH3e4Xzf.js";import{g as TR,h as SR}from"./use-connection-DWpxH8iy.js";import{g as AR}from"./generate-id-Dyweu44Y.js";import{i as zx}from"./SearchMd-yRVgOeax.js";import{s as kR}from"./Trash01-py7ft8Od.js";import{B as xR}from"./badge-C898LHvV.js";import{i as vR}from"./Code01-DeVT5m93.js";import{b as CR}from"./use-virtual-mcp-DaI2d98r.js";import{u as _R}from"./use-create-virtual-mcp-CMegJpH_.js";const qx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));qx.displayName="Atom02";const jx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));jx.displayName="Attachment01";const Gx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));Gx.displayName="Coins01";const Vx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Vx.displayName="Lightbulb01";const Wx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Wx.displayName="Stop";const Yx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));Yx.displayName="Target04";const Kx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Kx.displayName="XCircle";function NR(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?Nb().min(1,"Required"):Nb();return Nx(e)}function IR(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function Xx(t){const e=ae.c(64),{prompt:n,setPrompt:r,onSubmit:i}=t,a=U.useId();let s;if(e[0]!==n){const H=n?NR(n):Nx({});s=Cw(H),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?IR(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=_w(c);let f;e[7]!==n?.arguments?(f=n?.arguments??[],e[7]=n?.arguments,e[8]=f):f=e[8];const p=f;let h;e[9]!==d||e[10]!==i||e[11]!==r?(h=async H=>{await i(H),r(null),d.reset()},e[9]=d,e[10]=i,e[11]=r,e[12]=h):h=e[12];const g=h;let b;e[13]!==d||e[14]!==r?(b=H=>{H||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=b):b=e[15];const E=b;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=T.jsx(rR,{children:y}),e[19]=y,e[20]=S):S=e[20];let k;e[21]!==n.description?(k=n.description&&T.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=k):k=e[22];let x;e[23]!==k||e[24]!==S?(x=T.jsxs(iR,{children:[S,k]}),e[23]=k,e[24]=S,e[25]=x):x=e[25];let A;e[26]!==d||e[27]!==g?(A=H=>{H.stopPropagation(),d.handleSubmit(g)(H)},e[26]=d,e[27]=g,e[28]=A):A=e[28];let v;if(e[29]!==p||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let H;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(H=J=>T.jsx(uR,{control:d.control,name:J.name,render:I=>{const{field:X}=I;return T.jsxs(cR,{children:[T.jsxs(dR,{className:"text-xs",children:[J.name,J.required?null:T.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),T.jsx(pR,{children:T.jsx(Bx,{...X,value:X.value??"",required:J.required,placeholder:J.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),T.jsx(fR,{})]})}},J.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=H):H=e[35],v=p.map(H),e[29]=p,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=v}else v=e[32];let w;e[36]!==E?(w=()=>E(!1),e[36]=E,e[37]=w):w=e[37];let N;e[38]!==d.formState.isSubmitting||e[39]!==w?(N=T.jsx(et,{type:"button",variant:"ghost",onClick:w,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=w,e[40]=N):N=e[40];const _=!d.formState.isValid||d.formState.isSubmitting;let D;e[41]!==d.formState.isSubmitting?(D=d.formState.isSubmitting?T.jsxs("span",{className:"flex items-center gap-2",children:[T.jsx(So,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=D):D=e[42];let M;e[43]!==a||e[44]!==_||e[45]!==D?(M=T.jsx(et,{type:"submit",form:a,disabled:_,children:D}),e[43]=a,e[44]=_,e[45]=D,e[46]=M):M=e[46];let q;e[47]!==N||e[48]!==M?(q=T.jsxs(aR,{children:[N,M]}),e[47]=N,e[48]=M,e[49]=q):q=e[49];let P;e[50]!==a||e[51]!==A||e[52]!==v||e[53]!==q?(P=T.jsxs("form",{id:a,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[v,q]}),e[50]=a,e[51]=A,e[52]=v,e[53]=q,e[54]=P):P=e[54];let F;e[55]!==d||e[56]!==P?(F=T.jsx(lR,{...d,children:P}),e[55]=d,e[56]=P,e[57]=F):F=e[57];let $;e[58]!==x||e[59]!==F?($=T.jsxs(sR,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[x,F]}),e[58]=x,e[59]=F,e[60]=$):$=e[60];let G;return e[61]!==E||e[62]!==$?(G=T.jsx(oR,{open:!0,onOpenChange:E,children:$}),e[61]=E,e[62]=$,e[63]=G):G=e[63],G}function it(t){this.content=t}it.prototype={constructor:it,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),a=r.content.slice();return i==-1?a.push(n||t,e):(a[i+1]=e,n&&(a[i]=n)),new it(a)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new it(n)},addToStart:function(t,e){return new it([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new it(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),a=r.find(t);return i.splice(a==-1?i.length:a,0,e,n),new it(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=it.from(t),t.size?new it(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=it.from(t),t.size?new it(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=it.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};it.from=function(t){if(t instanceof it)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new it(e)};function Zx(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),a=e.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){let s=Zx(i.content,a.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Qx(t,e,n,r){for(let i=t.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let s=t.child(--i),o=e.child(--a),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=Qx(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class W{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,a){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,i+o,a||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let a="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?i?typeof i=="function"?i(o):i:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:a+=r),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new W(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let a=0,s=0;s<n;a++){let o=this.content[a],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),i+=o.nodeSize),s=l}return new W(r,i)}cutByIndex(e,n){return e==n?W.empty:e==0&&n==this.content.length?this:new W(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new W(i,a)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Zx(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Qx(this,e,n,r)}findIndex(e){if(e==0)return Fa(0,e);if(e==this.size)return Fa(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),a=r+i.nodeSize;if(a>=e)return a==e?Fa(n+1,a):Fa(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return W.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let n,r=0;for(let i=0;i<e.length;i++){let a=e[i];r+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(n||(n=e.slice(0,i)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new W(n||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const sl={index:0,offset:0};function Fa(t,e){return sl.index=t,sl.offset=e,sl}function ys(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!ys(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ys(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let _e=class $h{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))n||(n=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!r&&a.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ys(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $h.none;if(e instanceof $h)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};_e.none=[];class Ts extends Error{}class ee{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=ev(this.content,e+this.openStart,n);return r&&new ee(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ee(Jx(this.content,e+this.openStart,n+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,n){if(!n)return ee.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ee(W.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=e.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)i++;return new ee(e,r,i)}}ee.empty=new ee(W.empty,0,0);function Jx(t,e,n){let{index:r,offset:i}=t.findIndex(e),a=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(i==e||a.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,a.copy(Jx(a.content,e-i-1,n-i-1)))}function ev(t,e,n,r){let{index:i,offset:a}=t.findIndex(e),s=t.maybeChild(i);if(a==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=ev(s.content,e-a-1,n,s);return o&&t.replaceChild(i,s.copy(o))}function wR(t,e,n){if(n.openStart>t.depth)throw new Ts("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ts("Inconsistent open depths");return tv(t,e,n,0)}function tv(t,e,n,r){let i=t.index(r),a=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=tv(t,e,n,r+1);return a.copy(a.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return br(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=RR(n,t);return br(a,rv(t,s,o,e,r))}else return br(a,Ss(t,e,r))}function nv(t,e){if(!e.type.compatibleContent(t.type))throw new Ts("Cannot join "+e.type.name+" onto "+t.type.name)}function zh(t,e,n){let r=t.node(n);return nv(r,e.node(n)),r}function gr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ui(t,e,n,r){let i=(e||t).node(n),a=0,s=e?e.index(n):i.childCount;t&&(a=t.index(n),t.depth>n?a++:t.textOffset&&(gr(t.nodeAfter,r),a++));for(let o=a;o<s;o++)gr(i.child(o),r);e&&e.depth==n&&e.textOffset&&gr(e.nodeBefore,r)}function br(t,e){return t.type.checkContent(e),t.copy(e)}function rv(t,e,n,r,i){let a=t.depth>i&&zh(t,e,i+1),s=r.depth>i&&zh(n,r,i+1),o=[];return Ui(null,t,i,o),a&&s&&e.index(i)==n.index(i)?(nv(a,s),gr(br(a,rv(t,e,n,r,i+1)),o)):(a&&gr(br(a,Ss(t,e,i+1)),o),Ui(e,n,i,o),s&&gr(br(s,Ss(n,r,i+1)),o)),Ui(r,null,i,o),new W(o)}function Ss(t,e,n){let r=[];if(Ui(null,t,n,r),t.depth>n){let i=zh(t,e,n+1);gr(br(i,Ss(t,e,n+1)),r)}return Ui(e,null,n,r),new W(r)}function RR(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let a=n-1;a>=0;a--)i=e.node(a).copy(W.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class aa{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let a=0;a<e;a++)i+=r.child(a).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let o=r;r=i,i=o}let a=r.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!i||!a[s].isInSet(i.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<r.length;a++)r[a].type.spec.inclusive===!1&&(!i||!r[a].isInSet(i.marks))&&(r=r[a--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new As(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,a=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(a),u=a-l;if(r.push(s,o,i+l),!u||(s=s.child(o),s.isText))break;a=u-1,i+=l+1}return new aa(n,r,a)}static resolveCached(e,n){let r=Lb.get(e);if(r)for(let a=0;a<r.elts.length;a++){let s=r.elts[a];if(s.pos==n)return s}else Lb.set(e,r=new OR);let i=r.elts[r.i]=aa.resolve(e,n);return r.i=(r.i+1)%LR,i}}class OR{constructor(){this.elts=[],this.i=0}}const LR=12,Lb=new WeakMap;class As{constructor(e,n,r){this.$from=e,this.$to=n,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 DR=Object.create(null);let Xn=class qh{constructor(e,n,r,i=_e.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||W.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,n,r,i=0){this.content.nodesBetween(e,n,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,n,r,i){return this.content.textBetween(e,n,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,n,r){return this.type==e&&ys(this.attrs,n||e.defaultAttrs||DR)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new qh(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qh(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ee.empty;let i=this.resolve(e),a=this.resolve(n),s=r?0:i.sharedDepth(n),o=i.start(s),u=i.node(s).content.cut(i.pos-o,a.pos-o);return new ee(u,i.depth-s,a.depth-s)}replace(e,n,r){return wR(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return aa.resolveCached(this,e)}resolveNoCache(e){return aa.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,a=>(r.isInSet(a.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()+")"),iv(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=W.empty,i=0,a=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,a),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(r),s=a&&a.matchFragment(this.content,n);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=_e.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=W.fromJSON(e,n.content),a=e.nodeType(n.type).create(n.attrs,i,r);return a.type.checkAttrs(a.attrs),a}};Xn.prototype.text=void 0;class ks extends Xn{constructor(e,n,r,i){if(super(e,n,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):iv(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ks(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ks(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function iv(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new MR(e,n);if(r.next==null)return kr.empty;let i=av(r);r.next&&r.err("Unexpected trailing text");let a=zR($R(i));return qR(a,r),a}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let a=n;i&&a<r;a++)i=i.matchType(e.child(a).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function a(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return W.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=a(d,o.concat(c));if(f)return f}}return null}return a(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),a=i.match;if(a.matchType(e)){let s=[];for(let o=i;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:o,next:l}=a.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!i.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:i}),n[o.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 n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let a=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)a+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return a}).join(`
|
|
1
|
+
import{r as U,c as ae,o as Nx,h as Cw,k as _w,j as T,s as Nb,a2 as Ix,b$ as wx,bY as Nw,bt as At,c0 as Iw,u as ci,t as _n,c1 as ww,aW as Rx,c2 as Rw,c3 as dn,c4 as il,c5 as Ow,c6 as al,c7 as Lw,c8 as Dw,c9 as Mw,ca as Pw,y as Fw,K as qm,cb as Bw,cc as Uw,cd as Hw,ce as $w,z as Ox,m as Lx,O as as,b4 as jm,bX as Es,g as zw}from"./index-BKpxPW_G.js";import{c as pe}from"./utils-Ckp7rFN8.js";import{i as qw}from"./X-CslJd5Ib.js";import{u as ka,S as Ib,a as jw,i as Gw,m as Dx,M as Vw,c as Ww,g as Yw,C as Kw,t as Mx,b as Xw,h as Zw}from"./use-deco-chat-open-B2KYtTue.js";import{b as di,P as pi,a as fi}from"./popover-ESVk6nXT.js";import{S as So}from"./spinner-Lv2khbLw.js";import{b as wn,T as Rn,a as On,c as Ao,I as Gm}from"./integration-icon-DFSc5_D8.js";import{d as Px,u as Vm,i as Qr,f as Qw}from"./constants-DisdEZ3l.js";import{u as Jw,g as Fx,l as wb,a as Rb,r as eR}from"./use-mcp-prompts-FoVTG9k7.js";import{E as tR,i as nR}from"./error-boundary-BMH0CjEH.js";import{B as et}from"./button-D_OpQIQm.js";import{c as rR,b as iR,e as aR,a as sR,D as oR}from"./dialog-BPL7ZvPc.js";import{a as lR,F as uR,b as cR,c as dR,d as pR,f as fR}from"./form-BpiblhO1.js";import{I as Bx}from"./input-lpAGMNlp.js";import{i as Ux}from"./AlertCircle-BppvLQSd.js";import{i as hR}from"./ArrowUp-D26ZQKRa.js";import{t as Hh}from"./ChevronDown-DY4fpd0G.js";import{i as mR}from"./Edit01-DDrpQJgk.js";import{t as ia}from"./Users03-Bw7fWrTD.js";import{i as Hx}from"./ChevronRight-DMzFQQCc.js";import{i as xa}from"./Check-bgVFNRDs.js";import{a as Wm}from"./Copy01-C35WeFYE.js";import{i as gR}from"./Terminal-DRpoCIsG.js";import{M as $x,s as Ob}from"./monaco-editor-DZSx9WV6.js";import{u as bR,L as ER}from"./localstorage-keys-CrJngaoW.js";import{E as yR}from"./empty-state-DXJM9xrV.js";import{g as TR,h as SR}from"./use-connection-B0740Saa.js";import{g as AR}from"./generate-id-Dyweu44Y.js";import{i as zx}from"./SearchMd-BqVXNd65.js";import{s as kR}from"./Trash01-d4v7i3Ze.js";import{B as xR}from"./badge-DBw6AEaX.js";import{i as vR}from"./Code01-7hV4ZDjZ.js";import{b as CR}from"./use-virtual-mcp-BUCuQhrG.js";import{u as _R}from"./use-create-virtual-mcp-lh01_aoW.js";const qx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));qx.displayName="Atom02";const jx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));jx.displayName="Attachment01";const Gx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));Gx.displayName="Coins01";const Vx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Vx.displayName="Lightbulb01";const Wx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Wx.displayName="Stop";const Yx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));Yx.displayName="Target04";const Kx=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Kx.displayName="XCircle";function NR(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?Nb().min(1,"Required"):Nb();return Nx(e)}function IR(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function Xx(t){const e=ae.c(64),{prompt:n,setPrompt:r,onSubmit:i}=t,a=U.useId();let s;if(e[0]!==n){const H=n?NR(n):Nx({});s=Cw(H),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?IR(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=_w(c);let f;e[7]!==n?.arguments?(f=n?.arguments??[],e[7]=n?.arguments,e[8]=f):f=e[8];const p=f;let h;e[9]!==d||e[10]!==i||e[11]!==r?(h=async H=>{await i(H),r(null),d.reset()},e[9]=d,e[10]=i,e[11]=r,e[12]=h):h=e[12];const g=h;let b;e[13]!==d||e[14]!==r?(b=H=>{H||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=b):b=e[15];const E=b;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=T.jsx(rR,{children:y}),e[19]=y,e[20]=S):S=e[20];let k;e[21]!==n.description?(k=n.description&&T.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=k):k=e[22];let x;e[23]!==k||e[24]!==S?(x=T.jsxs(iR,{children:[S,k]}),e[23]=k,e[24]=S,e[25]=x):x=e[25];let A;e[26]!==d||e[27]!==g?(A=H=>{H.stopPropagation(),d.handleSubmit(g)(H)},e[26]=d,e[27]=g,e[28]=A):A=e[28];let v;if(e[29]!==p||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let H;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(H=J=>T.jsx(uR,{control:d.control,name:J.name,render:I=>{const{field:X}=I;return T.jsxs(cR,{children:[T.jsxs(dR,{className:"text-xs",children:[J.name,J.required?null:T.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),T.jsx(pR,{children:T.jsx(Bx,{...X,value:X.value??"",required:J.required,placeholder:J.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),T.jsx(fR,{})]})}},J.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=H):H=e[35],v=p.map(H),e[29]=p,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=v}else v=e[32];let w;e[36]!==E?(w=()=>E(!1),e[36]=E,e[37]=w):w=e[37];let N;e[38]!==d.formState.isSubmitting||e[39]!==w?(N=T.jsx(et,{type:"button",variant:"ghost",onClick:w,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=w,e[40]=N):N=e[40];const _=!d.formState.isValid||d.formState.isSubmitting;let D;e[41]!==d.formState.isSubmitting?(D=d.formState.isSubmitting?T.jsxs("span",{className:"flex items-center gap-2",children:[T.jsx(So,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=D):D=e[42];let M;e[43]!==a||e[44]!==_||e[45]!==D?(M=T.jsx(et,{type:"submit",form:a,disabled:_,children:D}),e[43]=a,e[44]=_,e[45]=D,e[46]=M):M=e[46];let q;e[47]!==N||e[48]!==M?(q=T.jsxs(aR,{children:[N,M]}),e[47]=N,e[48]=M,e[49]=q):q=e[49];let P;e[50]!==a||e[51]!==A||e[52]!==v||e[53]!==q?(P=T.jsxs("form",{id:a,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[v,q]}),e[50]=a,e[51]=A,e[52]=v,e[53]=q,e[54]=P):P=e[54];let F;e[55]!==d||e[56]!==P?(F=T.jsx(lR,{...d,children:P}),e[55]=d,e[56]=P,e[57]=F):F=e[57];let $;e[58]!==x||e[59]!==F?($=T.jsxs(sR,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[x,F]}),e[58]=x,e[59]=F,e[60]=$):$=e[60];let G;return e[61]!==E||e[62]!==$?(G=T.jsx(oR,{open:!0,onOpenChange:E,children:$}),e[61]=E,e[62]=$,e[63]=G):G=e[63],G}function it(t){this.content=t}it.prototype={constructor:it,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),a=r.content.slice();return i==-1?a.push(n||t,e):(a[i+1]=e,n&&(a[i]=n)),new it(a)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new it(n)},addToStart:function(t,e){return new it([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new it(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),a=r.find(t);return i.splice(a==-1?i.length:a,0,e,n),new it(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=it.from(t),t.size?new it(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=it.from(t),t.size?new it(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=it.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};it.from=function(t){if(t instanceof it)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new it(e)};function Zx(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),a=e.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){let s=Zx(i.content,a.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Qx(t,e,n,r){for(let i=t.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let s=t.child(--i),o=e.child(--a),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=Qx(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class W{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,a){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,i+o,a||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let a="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?i?typeof i=="function"?i(o):i:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:a+=r),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new W(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let a=0,s=0;s<n;a++){let o=this.content[a],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),i+=o.nodeSize),s=l}return new W(r,i)}cutByIndex(e,n){return e==n?W.empty:e==0&&n==this.content.length?this:new W(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new W(i,a)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Zx(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Qx(this,e,n,r)}findIndex(e){if(e==0)return Fa(0,e);if(e==this.size)return Fa(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),a=r+i.nodeSize;if(a>=e)return a==e?Fa(n+1,a):Fa(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return W.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let n,r=0;for(let i=0;i<e.length;i++){let a=e[i];r+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(n||(n=e.slice(0,i)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new W(n||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const sl={index:0,offset:0};function Fa(t,e){return sl.index=t,sl.offset=e,sl}function ys(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!ys(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ys(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let _e=class $h{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))n||(n=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!r&&a.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ys(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $h.none;if(e instanceof $h)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};_e.none=[];class Ts extends Error{}class ee{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=ev(this.content,e+this.openStart,n);return r&&new ee(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ee(Jx(this.content,e+this.openStart,n+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,n){if(!n)return ee.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ee(W.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=e.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)i++;return new ee(e,r,i)}}ee.empty=new ee(W.empty,0,0);function Jx(t,e,n){let{index:r,offset:i}=t.findIndex(e),a=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(i==e||a.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,a.copy(Jx(a.content,e-i-1,n-i-1)))}function ev(t,e,n,r){let{index:i,offset:a}=t.findIndex(e),s=t.maybeChild(i);if(a==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=ev(s.content,e-a-1,n,s);return o&&t.replaceChild(i,s.copy(o))}function wR(t,e,n){if(n.openStart>t.depth)throw new Ts("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ts("Inconsistent open depths");return tv(t,e,n,0)}function tv(t,e,n,r){let i=t.index(r),a=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=tv(t,e,n,r+1);return a.copy(a.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return br(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=RR(n,t);return br(a,rv(t,s,o,e,r))}else return br(a,Ss(t,e,r))}function nv(t,e){if(!e.type.compatibleContent(t.type))throw new Ts("Cannot join "+e.type.name+" onto "+t.type.name)}function zh(t,e,n){let r=t.node(n);return nv(r,e.node(n)),r}function gr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ui(t,e,n,r){let i=(e||t).node(n),a=0,s=e?e.index(n):i.childCount;t&&(a=t.index(n),t.depth>n?a++:t.textOffset&&(gr(t.nodeAfter,r),a++));for(let o=a;o<s;o++)gr(i.child(o),r);e&&e.depth==n&&e.textOffset&&gr(e.nodeBefore,r)}function br(t,e){return t.type.checkContent(e),t.copy(e)}function rv(t,e,n,r,i){let a=t.depth>i&&zh(t,e,i+1),s=r.depth>i&&zh(n,r,i+1),o=[];return Ui(null,t,i,o),a&&s&&e.index(i)==n.index(i)?(nv(a,s),gr(br(a,rv(t,e,n,r,i+1)),o)):(a&&gr(br(a,Ss(t,e,i+1)),o),Ui(e,n,i,o),s&&gr(br(s,Ss(n,r,i+1)),o)),Ui(r,null,i,o),new W(o)}function Ss(t,e,n){let r=[];if(Ui(null,t,n,r),t.depth>n){let i=zh(t,e,n+1);gr(br(i,Ss(t,e,n+1)),r)}return Ui(e,null,n,r),new W(r)}function RR(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let a=n-1;a>=0;a--)i=e.node(a).copy(W.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class aa{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let a=0;a<e;a++)i+=r.child(a).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let o=r;r=i,i=o}let a=r.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!i||!a[s].isInSet(i.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<r.length;a++)r[a].type.spec.inclusive===!1&&(!i||!r[a].isInSet(i.marks))&&(r=r[a--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new As(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,a=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(a),u=a-l;if(r.push(s,o,i+l),!u||(s=s.child(o),s.isText))break;a=u-1,i+=l+1}return new aa(n,r,a)}static resolveCached(e,n){let r=Lb.get(e);if(r)for(let a=0;a<r.elts.length;a++){let s=r.elts[a];if(s.pos==n)return s}else Lb.set(e,r=new OR);let i=r.elts[r.i]=aa.resolve(e,n);return r.i=(r.i+1)%LR,i}}class OR{constructor(){this.elts=[],this.i=0}}const LR=12,Lb=new WeakMap;class As{constructor(e,n,r){this.$from=e,this.$to=n,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 DR=Object.create(null);let Xn=class qh{constructor(e,n,r,i=_e.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||W.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,n,r,i=0){this.content.nodesBetween(e,n,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,n,r,i){return this.content.textBetween(e,n,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,n,r){return this.type==e&&ys(this.attrs,n||e.defaultAttrs||DR)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new qh(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qh(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ee.empty;let i=this.resolve(e),a=this.resolve(n),s=r?0:i.sharedDepth(n),o=i.start(s),u=i.node(s).content.cut(i.pos-o,a.pos-o);return new ee(u,i.depth-s,a.depth-s)}replace(e,n,r){return wR(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return aa.resolveCached(this,e)}resolveNoCache(e){return aa.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,a=>(r.isInSet(a.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()+")"),iv(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=W.empty,i=0,a=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,a),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(r),s=a&&a.matchFragment(this.content,n);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=_e.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=W.fromJSON(e,n.content),a=e.nodeType(n.type).create(n.attrs,i,r);return a.type.checkAttrs(a.attrs),a}};Xn.prototype.text=void 0;class ks extends Xn{constructor(e,n,r,i){if(super(e,n,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):iv(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ks(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ks(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function iv(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new MR(e,n);if(r.next==null)return kr.empty;let i=av(r);r.next&&r.err("Unexpected trailing text");let a=zR($R(i));return qR(a,r),a}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let a=n;i&&a<r;a++)i=i.matchType(e.child(a).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function a(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return W.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=a(d,o.concat(c));if(f)return f}}return null}return a(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),a=i.match;if(a.matchType(e)){let s=[];for(let o=i;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:o,next:l}=a.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!i.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:i}),n[o.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 n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let a=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)a+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return a}).join(`
|
|
2
2
|
`)}}kr.empty=new kr(!0);class MR{constructor(e,n){this.string=e,this.nodeTypes=n,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 av(t){let e=[];do e.push(PR(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function PR(t){let e=[];do e.push(FR(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function FR(t){let e=HR(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=BR(t,e);else break;return e}function Db(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function BR(t,e){let n=Db(t),r=n;return t.eat(",")&&(t.next!="}"?r=Db(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function UR(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let a in n){let s=n[a];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function HR(t){if(t.eat("(")){let e=av(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=UR(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function $R(t){let e=[[]];return i(a(t,0),n()),e;function n(){return e.push([])-1}function r(s,o,l){let u={term:l,to:o};return e[s].push(u),u}function i(s,o){s.forEach(l=>l.to=o)}function a(s,o){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(a(u,o)),[]);if(s.type=="seq")for(let l=0;;l++){let u=a(s.exprs[l],o);if(l==s.exprs.length-1)return u;i(u,o=n())}else if(s.type=="star"){let l=n();return r(o,l),i(a(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(a(s.expr,o),l),i(a(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(o)].concat(a(s.expr,o));if(s.type=="range"){let l=o;for(let u=0;u<s.min;u++){let c=n();i(a(s.expr,l),c),l=c}if(s.max==-1)i(a(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),i(a(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(o,void 0,s.value)];throw new Error("Unknown expr type")}}}}function sv(t,e){return e-t}function Mb(t,e){let n=[];return r(e),n.sort(sv);function r(i){let a=t[i];if(a.length==1&&!a[0].term)return r(a[0].to);n.push(i);for(let s=0;s<a.length;s++){let{term:o,to:l}=a[s];!o&&n.indexOf(l)==-1&&r(l)}}}function zR(t){let e=Object.create(null);return n(Mb(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let c=0;c<i.length;c++)i[c][0]==o&&(u=i[c][1]);Mb(t,l).forEach(c=>{u||i.push([o,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=e[r.join(",")]=new kr(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let o=i[s][1].sort(sv);a.next.push({type:i[s][0],next:e[o.join(",")]||n(o)})}return a}}function qR(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],a=!i.validEnd,s=[];for(let o=0;o<i.next.length;o++){let{type:l,next:u}=i.next[o];s.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),r.indexOf(u)==-1&&r.push(u)}a&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ov(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function lv(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let a=t[r];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function uv(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let a=t[i];a.validate&&a.validate(e[i])}}function cv(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new GR(t,r,e[r]);return n}let Pb=class dv{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=cv(e,r.attrs),this.defaultAttrs=ov(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==kr.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:lv(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Xn(this,this.computeAttrs(e),W.from(n),_e.setFrom(r))}createChecked(e=null,n,r){return n=W.from(n),this.checkContent(n),new Xn(this,this.computeAttrs(e),n,_e.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=W.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),a=i&&i.fillBefore(W.empty,!0);return a?new Xn(this,e,n.append(a),_e.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.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){uv(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 n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:_e.none:e}static compile(e,n){let r=Object.create(null);e.forEach((a,s)=>r[a]=new dv(a,n,s));let i=n.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 a in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function jR(t,e,n){let r=n.split("|");return i=>{let a=i===null?"null":typeof i;if(r.indexOf(a)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${a}`)}}class GR{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?jR(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ko{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=cv(e,i.attrs),this.excluded=null;let a=ov(this.attrs);this.instance=a?new _e(this,a):null}create(e=null){return!e&&this.instance?this.instance:new _e(this,lv(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((a,s)=>r[a]=new ko(a,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){uv(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let pv=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=it.from(e.nodes),n.marks=it.from(e.marks||{}),this.nodes=Pb.compile(this.spec.nodes,this),this.marks=ko.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 a=this.nodes[i],s=a.spec.content||"",o=a.spec.marks;if(a.contentMatch=r[s]||(r[s]=kr.parse(s,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=o=="_"?null:o?Fb(this,o.split(" ")):o==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],s=a.spec.excludes;a.excluded=s==null?[a]:s==""?[]:Fb(this,s.split(" "))}this.nodeFromJSON=i=>Xn.fromJSON(this,i),this.markFromJSON=i=>_e.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Pb){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(n,r,i)}text(e,n){let r=this.nodes.text;return new ks(r,r.defaultAttrs,e,_e.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function Fb(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.marks[i],s=a;if(a)n.push(a);else for(let o in t.marks){let l=t.marks[o];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function VR(t){return t.tag!=null}function WR(t){return t.style!=null}class Zn{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(VR(i))this.tags.push(i);else if(WR(i)){let a=/[^=]*/.exec(i.style)[0];r.indexOf(a)<0&&r.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,n={}){let r=new Ub(this,n,!1);return r.addAll(e,_e.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Ub(this,n,!0);return r.addAll(e,_e.none,n.from,n.to),ee.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(XR(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||n.matchesContext(a.context))){if(a.getAttrs){let s=a.getAttrs(e);if(s===!1)continue;a.attrs=s||void 0}return a}}}matchStyle(e,n,r,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let s=this.styles[a],o=s.style;if(!(o.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||o.length>e.length&&(o.charCodeAt(e.length)!=61||o.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let a=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let o=n[s];if((o.priority==null?50:o.priority)<a)break}n.splice(s,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(s=>{r(s=Hb(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(s=>{r(s=Hb(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Zn(e,Zn.schemaRules(e)))}}const fv={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},YR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hv={ol:!0,ul:!0},sa=1,jh=2,Hi=4;function Bb(t,e,n){return e!=null?(e?sa:0)|(e==="full"?jh:0):t&&t.whitespace=="pre"?sa|jh:n&~Hi}class Ba{constructor(e,n,r,i,a,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=_e.none,this.match=a||(s&Hi?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(W.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);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&sa)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let a=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let n=W.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(W.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!fv.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ub{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,a,s=Bb(null,n.preserveWhitespace,0)|(r?Hi:0);i?a=new Ba(i.type,i.attrs,_e.none,!0,n.topMatch||i.type.contentMatch,s):r?a=new Ba(null,null,_e.none,!0,null,s):a=new Ba(e.schema.topNodeType,null,_e.none,!0,null,s),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,a=i.options&jh?"full":this.localPreserveWS||(i.options&sa)>0,{schema:s}=this.parser;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(a)if(a==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[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 o=i.content[i.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;hv.hasOwnProperty(s)&&this.parser.normalizeLists&&KR(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));e:if(l?l.ignore:YR.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);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 u,c=this.needsBlock;if(fv.hasOwnProperty(s))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(a),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],s=r.getPropertyValue(a);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(a,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(e,n,r,i){let a,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(a=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}a&&this.sync(o)&&this.open--}addAll(e,n,r,i){let a=r||0;for(let s=r?e.childNodes[r]:e.firstChild,o=i==null?null:e.childNodes[i];s!=o;s=s.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(s,n);this.findAtPoint(e,a)}findPlace(e,n,r){let i,a;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+o)&&(i=u,a=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!i)return null;this.sync(a);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(n=this.enterInner(a,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let s=_e.none;for(let o of i.concat(e.marks))(a.type?a.type.allowsMarkType(o.type):$b(o.type,e.type))&&(s=o.addToSet(s));return a.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let a=this.findPlace(e.create(n),r,!1);return a&&(a=this.enterInner(e,n,r,!0,i)),a}enterInner(e,n,r,i=!1,a){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=Bb(e,a,s.options);s.options&Hi&&s.content.length==0&&(o|=Hi);let l=_e.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):$b(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Ba(e,n,l,i,null,o)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].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 n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=sa)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&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)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),a=-(r?r.depth+1:0)+(i?0:1),s=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=a;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=a?r.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function KR(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hv.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function XR(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Hb(t){let e={};for(let n in t)e[n]=t[n];return e}function $b(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let a=[],s=o=>{a.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:c}=o.edge(l);if(u==e||a.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class wr{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ol(n).createDocumentFragment());let i=r,a=[];return e.forEach(s=>{if(a.length||s.marks.length){let o=0,l=0;for(;o<a.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<a.length;)i=a.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(a.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=ss(ol(n),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,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,n);a&&((a.contentDOM||a.dom).appendChild(r),r=a.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&ss(ol(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return ss(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new wr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=zb(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return zb(e.marks)}}function zb(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ol(t){return t.document||window.document}const qb=new WeakMap;function ZR(t){let e=qb.get(t);return e===void 0&&qb.set(t,e=QR(t)),e}function QR(t){let e=null;function n(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++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function ss(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(a=ZR(r))&&a.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&&(n=i.slice(0,s),i=i.slice(s+1));let o,l=n?t.createElementNS(n,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=ss(t,f,n,r);if(l.appendChild(p),h){if(o)throw new RangeError("Multiple content holes");o=h}}}return{dom:l,contentDOM:o}}const mv=65535,gv=Math.pow(2,16);function JR(t,e){return t+e*gv}function jb(t){return t&mv}function eO(t){return(t-(t&mv))/gv}const bv=1,Ev=2,ls=4,yv=8;class Gh{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&yv)>0}get deletedBefore(){return(this.delInfo&(bv|ls))>0}get deletedAfter(){return(this.delInfo&(Ev|ls))>0}get deletedAcross(){return(this.delInfo&ls)>0}}class Ut{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ut.empty)return Ut.empty}recover(e){let n=0,r=jb(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+eO(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,a=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[o+a],c=this.ranges[o+s],d=l+u;if(e<=d){let f=u?e==l?-1:e==d?1:n:n,p=l+i+(f<0?0:c);if(r)return p;let h=e==(n<0?l:d)?null:JR(o/3,e-l),g=e==l?Ev:e==d?bv:ls;return(n<0?e!=l:e!=d)&&(g|=yv),new Gh(p,g,h)}i+=c-u}return r?e+i:new Gh(e+i,0,null)}touches(e,n){let r=0,i=jb(n),a=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[o+a],c=l+u;if(e<=c&&o==i*3)return!0;r+=this.ranges[o+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let s=this.ranges[i],o=s-(this.inverted?a:0),l=s+(this.inverted?0:a),u=this.ranges[i+n],c=this.ranges[i+r];e(o,o+u,l,l+c),a+=c-u}}invert(){return new Ut(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ut.empty:new Ut(e<0?[0,-e,0]:[0,0,e])}}Ut.empty=new Ut([]);class oa{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new oa(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new oa;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let a=this.from;a<this.to;a++){let s=this._maps[a],o=s.mapResult(e,n);if(o.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(o.recover);continue}}i|=o.delInfo,e=o.pos}return r?e:new Gh(e,i,null)}}const ll=Object.create(null);class ht{getMap(){return Ut.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ll[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ll)throw new RangeError("Duplicate use of step JSON ID "+e);return ll[e]=n,n.prototype.jsonID=e,n}}class Ge{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ge(e,null)}static fail(e){return new Ge(null,e)}static fromReplace(e,n,r,i){try{return Ge.ok(e.replace(n,r,i))}catch(a){if(a instanceof Ts)return Ge.fail(a.message);throw a}}}function Ym(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let a=t.child(i);a.content.size&&(a=a.copy(Ym(a.content,e,a))),a.isInline&&(a=e(a,n,i)),r.push(a)}return W.fromArray(r)}class Gn extends ht{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),a=new ee(Ym(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Ge.fromReplace(e,this.from,this.to,a)}invert(){return new tn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Gn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Gn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Gn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Gn(n.from,n.to,e.markFromJSON(n.mark))}}ht.jsonID("addMark",Gn);class tn extends ht{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ee(Ym(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ge.fromReplace(e,this.from,this.to,r)}invert(){return new Gn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new tn(n.pos,r.pos,this.mark)}merge(e){return e instanceof tn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new tn(n.from,n.to,e.markFromJSON(n.mark))}}ht.jsonID("removeMark",tn);class Vn extends ht{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ge.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ge.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Vn(this.pos,n.marks[i]);return new Vn(this.pos,this.mark)}}return new xr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Vn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Vn(n.pos,e.markFromJSON(n.mark))}}ht.jsonID("addNodeMark",Vn);class xr extends ht{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ge.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ge.fromReplace(e,this.pos,this.pos+1,new ee(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Vn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new xr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new xr(n.pos,e.markFromJSON(n.mark))}}ht.jsonID("removeNodeMark",xr);class Qe extends ht{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Vh(e,this.from,this.to)?Ge.fail("Structure replace would overwrite content"):Ge.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ut([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Qe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ee.empty:new ee(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ee.empty:new ee(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,n,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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(n.from,n.to,ee.fromJSON(e,n.slice),!!n.structure)}}ht.jsonID("replace",Qe);class tt extends ht{constructor(e,n,r,i,a,s,o=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=a,this.insert=s,this.structure=o}apply(e){if(this.structure&&(Vh(e,this.from,this.gapFrom)||Vh(e,this.gapTo,this.to)))return Ge.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ge.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ge.fromReplace(e,this.from,this.to,r):Ge.fail("Content does not fit in gap")}getMap(){return new Ut([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new tt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new tt(n.pos,r.pos,i,a,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tt(n.from,n.to,n.gapFrom,n.gapTo,ee.fromJSON(e,n.slice),n.insert,!!n.structure)}}ht.jsonID("replaceAround",tt);function Vh(t,e,n){let r=t.resolve(e),i=n-e,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let s=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function tO(t,e,n,r){let i=[],a=[],s,o;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,e),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=p:i.push(s=new tn(f,p,d[g])));o&&o.to==f?o.to=p:a.push(o=new Gn(f,p,r))}}),i.forEach(l=>t.step(l)),a.forEach(l=>t.step(l))}function nO(t,e,n,r){let i=[],a=0;t.doc.nodesBetween(e,n,(s,o)=>{if(!s.isInline)return;a++;let l=null;if(r instanceof ko){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let p=0;p<i.length;p++){let h=i[p];h.step==a-1&&d.eq(i[p].style)&&(f=h)}f?(f.to=u,f.step=a):i.push({style:d,from:Math.max(o,e),to:u,step:a})}}}),i.forEach(s=>t.step(new tn(s.from,s.to,s.style)))}function Km(t,e,n,r=n.contentMatch,i=!0){let a=t.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),c=o+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new Qe(o,c,ee.empty));else{r=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||t.step(new tn(o,c,u.marks[f]));if(i&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new ee(W.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Qe(o+f.index,o+f.index+f[0].length,h))}}o=c}if(!r.validEnd){let l=r.fillBefore(W.empty,!0);t.replace(o,o,new ee(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function rO(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function hi(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,a=0;;--r){let s=t.$from.node(r),o=t.$from.index(r)+i,l=t.$to.indexAfter(r)-a;if(r<t.depth&&s.canReplace(o,l,n))return r;if(r==0||s.type.spec.isolating||!rO(s,o,l))break;o&&(i=1),l<s.childCount&&(a=1)}return null}function iO(t,e,n){let{$from:r,$to:i,depth:a}=e,s=r.before(a+1),o=i.after(a+1),l=s,u=o,c=W.empty,d=0;for(let h=a,g=!1;h>n;h--)g||r.index(h)>0?(g=!0,c=W.from(r.node(h).copy(c)),d++):l--;let f=W.empty,p=0;for(let h=a,g=!1;h>n;h--)g||i.after(h+1)<i.end(h)?(g=!0,f=W.from(i.node(h).copy(f)),p++):u++;t.step(new tt(l,u,s,o,new ee(c.append(f),d,p),c.size-d,!0))}function Xm(t,e,n=null,r=t){let i=aO(t,e),a=i&&sO(r,e);return a?i.map(Gb).concat({type:e,attrs:n}).concat(a.map(Gb)):null}function Gb(t){return{type:t,attrs:null}}function aO(t,e){let{parent:n,startIndex:r,endIndex:i}=t,a=n.contentMatchAt(r).findWrapping(e);if(!a)return null;let s=a.length?a[0]:e;return n.canReplaceWith(r,i,s)?a:null}function sO(t,e){let{parent:n,startIndex:r,endIndex:i}=t,a=n.child(r),s=e.contentMatch.findWrapping(a.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<i;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function oO(t,e,n){let r=W.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=W.from(n[s].type.create(n[s].attrs,r))}let i=e.start,a=e.end;t.step(new tt(i,a,i,a,new ee(r,0,0),n.length,!0))}function lO(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=t.steps.length;t.doc.nodesBetween(e,n,(s,o)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&uO(t.doc,t.mapping.slice(a).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&Sv(t,s,o,a),Km(t,t.mapping.slice(a).map(o,1),r,void 0,u===null);let c=t.mapping.slice(a),d=c.map(o,1),f=c.map(o+s.nodeSize,1);return t.step(new tt(d,f,d+1,f-1,new ee(W.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&Tv(t,s,o,a),!1}})}function Tv(t,e,n,r){e.forEach((i,a)=>{if(i.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(i.text);){let l=t.mapping.slice(r).map(n+1+a+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Sv(t,e,n,r){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+a);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,at as L,aX as R,B as ke,G as Ee,H as Se,D as xe,aY as q}from"./index-HxeE9C0A.js";const Ce=({size:t=24,color:l="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:l,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M17 9a1.99 1.99 0 0 0-.586-1.414A1.994 1.994 0 0 0 15 7m0 8a6 6 0 1 0-5.946-5.193c.058.434.087.651.068.789a.853.853 0 0 1-.117.346c-.068.121-.187.24-.426.479l-5.11 5.11c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C3 17.296 3 17.418 3 17.663V19.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H7v-2h2v-2h2l1.58-1.58c.238-.238.357-.357.478-.425a.852.852 0 0 1 .346-.117c.138-.02.355.01.789.068.264.036.533.054.807.054Z"}));Ce.displayName="Key01";var de=1,Ie=.9,Re=.8,Ae=.17,Z=.1,Q=.999,Me=.9999,$e=.99,De=/[\\\/_+.#"@\[\(\{&]/,Ke=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:$e;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,k,C;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:De.test(t.charAt(i-1))?(h*=Re,k=t.slice(u,i-1).match(Ke),k&&u>0&&(h*=Math.pow(Q,k.length))):Fe.test(t.charAt(i-1))?(h*=Ie,C=t.slice(u,i-1).match(ve),C&&u>0&&(h*=Math.pow(Q,C.length))):(h*=Ae,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Me)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Le(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var j='[cmdk-group=""]',_='[cmdk-group-items=""]',Ve='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",K="data-value",je=(t,l,r)=>Le(t,l,r),pe=n.createContext(void 0),P=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=F(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=F(()=>new Set),u=F(()=>new Map),c=F(()=>new Map),d=F(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:k,loop:C,disablePointerSelection:H=!1,vimBindings:A=!0,...B}=t,N=L(),ne=L(),U=L(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,E.emit()}},[p]),$(()=>{w(6,ae)},[]);let E=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")X(),G(),w(1,T);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(U);y?y.focus():(a=document.getElementById(N))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,E.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}E.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),W=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{G(),E.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{X(),G(),r.current.value||T(),E.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{X(),s?.getAttribute("id")===e&&T(),E.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:N,inputId:U,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:je;return e?m(e,r.current.search,o):0}function G(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;V().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${j}[${K}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function T(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(K);E.setState("value",o||void 0)}function X(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(j))==null?void 0:o.querySelector(Ve))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Y(e){let o=V()[e];o&&E.setState("value",o.getAttribute(K))}function J(e){var o;let s=D(),a=V(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&E.setState("value",g.getAttribute(K))}function ue(e){let o=D(),s=o?.closest(j),a;for(;s&&!a;)s=e>0?We(s,j):Ge(s,j),a=s?.querySelector(fe);a?E.setState("value",a.getAttribute(K)):J(e)}let ie=()=>Y(V().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):J(1)},ce=e=>{e.preventDefault(),e.metaKey?Y(0):e.altKey?ue(-1):J(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Y(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:Ye},b),z(t,e=>n.createElement(he.Provider,{value:E},n.createElement(pe.Provider,{value:W},e))))}),qe=n.forwardRef((t,l)=>{var r,f;let u=L(),c=n.useRef(null),d=n.useContext(ge),v=P(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=I(w=>w.value&&w.value===p.current),k=I(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,C),()=>w.removeEventListener(te,C)},[k,t.onSelect,t.disabled]);function C(){var w,E;H(),(E=(w=b.current).onSelect)==null||E.call(w,p.current)}function H(){h.setState("value",p.current,!0)}if(!k)return null;let{disabled:A,value:B,onSelect:N,forceMount:ne,keywords:U,...M}=t;return n.createElement(R.div,{ref:q(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:H,onClick:A?void 0:C},t.children)}),Pe=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=L(),v=n.useRef(null),b=n.useRef(null),i=L(),p=P(),h=I(k=>u||p.filter()===!1?!0:k.search?k.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:q(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,k=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},k))))}),Be=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=I(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:q(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=I(i=>i.search),v=I(i=>i.selectedItemId),b=P();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),ze=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=I(i=>i.selectedItemId),b=P();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let k=i.offsetHeight;p.style.setProperty("--cmdk-list-height",k.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:q(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:q(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),He=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(ke,{open:r,onOpenChange:f},n.createElement(Ee,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ne=n.forwardRef((t,l)=>I(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ze=Object.assign(be,{List:ze,Item:qe,Input:Oe,Group:Pe,Separator:Be,Dialog:He,Empty:Ne,Loading:Ue});function We(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ge(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function F(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function I(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=P();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(K,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=F(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Xe(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Xe(l),{ref:l.ref},r(l.props.children)):r(l)}var Ye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ze as _,Ce as i};
|
|
1
|
+
import{r as n,at as L,aX as R,B as ke,G as Ee,H as Se,D as xe,aY as q}from"./index-BKpxPW_G.js";const Ce=({size:t=24,color:l="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:l,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M17 9a1.99 1.99 0 0 0-.586-1.414A1.994 1.994 0 0 0 15 7m0 8a6 6 0 1 0-5.946-5.193c.058.434.087.651.068.789a.853.853 0 0 1-.117.346c-.068.121-.187.24-.426.479l-5.11 5.11c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C3 17.296 3 17.418 3 17.663V19.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H7v-2h2v-2h2l1.58-1.58c.238-.238.357-.357.478-.425a.852.852 0 0 1 .346-.117c.138-.02.355.01.789.068.264.036.533.054.807.054Z"}));Ce.displayName="Key01";var de=1,Ie=.9,Re=.8,Ae=.17,Z=.1,Q=.999,Me=.9999,$e=.99,De=/[\\\/_+.#"@\[\(\{&]/,Ke=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:$e;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,k,C;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:De.test(t.charAt(i-1))?(h*=Re,k=t.slice(u,i-1).match(Ke),k&&u>0&&(h*=Math.pow(Q,k.length))):Fe.test(t.charAt(i-1))?(h*=Ie,C=t.slice(u,i-1).match(ve),C&&u>0&&(h*=Math.pow(Q,C.length))):(h*=Ae,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Me)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Le(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var j='[cmdk-group=""]',_='[cmdk-group-items=""]',Ve='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",K="data-value",je=(t,l,r)=>Le(t,l,r),pe=n.createContext(void 0),P=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=F(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=F(()=>new Set),u=F(()=>new Map),c=F(()=>new Map),d=F(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:k,loop:C,disablePointerSelection:H=!1,vimBindings:A=!0,...B}=t,N=L(),ne=L(),U=L(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,E.emit()}},[p]),$(()=>{w(6,ae)},[]);let E=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")X(),G(),w(1,T);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(U);y?y.focus():(a=document.getElementById(N))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,E.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}E.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),W=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{G(),E.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{X(),G(),r.current.value||T(),E.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{X(),s?.getAttribute("id")===e&&T(),E.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:N,inputId:U,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:je;return e?m(e,r.current.search,o):0}function G(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;V().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${j}[${K}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function T(){let e=V().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(K);E.setState("value",o||void 0)}function X(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(j))==null?void 0:o.querySelector(Ve))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Y(e){let o=V()[e];o&&E.setState("value",o.getAttribute(K))}function J(e){var o;let s=D(),a=V(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&E.setState("value",g.getAttribute(K))}function ue(e){let o=D(),s=o?.closest(j),a;for(;s&&!a;)s=e>0?We(s,j):Ge(s,j),a=s?.querySelector(fe);a?E.setState("value",a.getAttribute(K)):J(e)}let ie=()=>Y(V().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):J(1)},ce=e=>{e.preventDefault(),e.metaKey?Y(0):e.altKey?ue(-1):J(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Y(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:Ye},b),z(t,e=>n.createElement(he.Provider,{value:E},n.createElement(pe.Provider,{value:W},e))))}),qe=n.forwardRef((t,l)=>{var r,f;let u=L(),c=n.useRef(null),d=n.useContext(ge),v=P(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=I(w=>w.value&&w.value===p.current),k=I(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,C),()=>w.removeEventListener(te,C)},[k,t.onSelect,t.disabled]);function C(){var w,E;H(),(E=(w=b.current).onSelect)==null||E.call(w,p.current)}function H(){h.setState("value",p.current,!0)}if(!k)return null;let{disabled:A,value:B,onSelect:N,forceMount:ne,keywords:U,...M}=t;return n.createElement(R.div,{ref:q(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:H,onClick:A?void 0:C},t.children)}),Pe=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=L(),v=n.useRef(null),b=n.useRef(null),i=L(),p=P(),h=I(k=>u||p.filter()===!1?!0:k.search?k.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:q(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,k=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},k))))}),Be=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=I(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:q(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=I(i=>i.search),v=I(i=>i.selectedItemId),b=P();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),ze=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=I(i=>i.selectedItemId),b=P();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let k=i.offsetHeight;p.style.setProperty("--cmdk-list-height",k.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:q(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:q(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),He=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(ke,{open:r,onOpenChange:f},n.createElement(Ee,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ne=n.forwardRef((t,l)=>I(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ze=Object.assign(be,{List:ze,Item:qe,Input:Oe,Group:Pe,Separator:Be,Dialog:He,Empty:Ne,Loading:Ue});function We(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ge(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function F(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function I(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=P();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(K,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=F(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Xe(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Xe(l),{ref:l.ref},r(l.props.children)):r(l)}var Ye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ze as _,Ce as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as n,L as r,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-
|
|
1
|
+
import{C as n,L as r,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-BKpxPW_G.js";import{E as m,b as d,a as L,c as g,u as T,d as x,e as y,f as S,g as E,h as b}from"./use-connection-B0740Saa.js";import{S as e}from"./constants-DisdEZ3l.js";import{K as h,a as O,W as R,c as K,g as _,b as A,d as I,e as W,f as V,h as w,i as D,u as Q,j}from"./constants-DisdEZ3l.js";import{u as G,a as N,b as Y,c as k,d as v}from"./use-mcp-tools-DF65_5AL.js";import{g as F,l as H,a as J,r as q,u as z,b as X,c as Z,d as $}from"./use-mcp-prompts-FoVTG9k7.js";import{u as es,a as os,b as ts}from"./use-virtual-mcp-BUCuQhrG.js";import{a as is,h as ns,i as rs}from"./mcp-oauth-DQYLB8aB.js";import"./useMutation-Bnsod7M-.js";import"./useQuery-Bo6lCSyK.js";export{n as ConnectionEntitySchema,m as EMPTY_COLLECTION_LIST_RESULT,h as KEYS,r as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,O as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,R as WellKnownOrgMCPId,is as authenticateMcp,d as buildCollectionQueryKey,L as buildOrderByExpression,g as buildWhereExpression,K as createMCPClient,_ as getDecopilotId,F as getPrompt,A as getWellKnownCommunityRegistryConnection,I as getWellKnownDecopilotVirtualMCP,W as getWellKnownMcpStudioConnection,V as getWellKnownOpenRouterConnection,w as getWellKnownRegistryConnection,ns as handleOAuthCallback,rs as isConnectionAuthenticated,D as isDecopilot,c as isStdioParameters,H as listPrompts,J as listResources,P as parseVirtualUrl,q as readResource,T as useCollectionActions,x as useCollectionItem,y as useCollectionList,S as useConnection,E as useConnectionActions,b as useConnections,Q as useMCPClient,j as useMCPClientOptional,z as useMCPPromptsList,X as useMCPPromptsListQuery,Z as useMCPResourcesList,$ as useMCPResourcesListQuery,G as useMCPToolCall,N as useMCPToolCallMutation,Y as useMCPToolCallQuery,k as useMCPToolsList,v as useMCPToolsListQuery,p as useProjectContext,es as useVirtualMCP,os as useVirtualMCPActions,ts as useVirtualMCPs};
|