decocms 2.281.4-alpha.1 → 2.282.1
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-7JjFgLc7.js → AlertCircle-CJ_7BsPP.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-Dede_Ne2.js → ArrowNarrowLeft-DtS9FYAN.js} +1 -1
- package/dist/client/assets/{CheckCircle-CTW72EON.js → CheckCircle-smRbUGaN.js} +1 -1
- package/dist/client/assets/{ChevronDown-kxc5hHzL.js → ChevronDown-xWqM1qJV.js} +1 -1
- package/dist/client/assets/{ChevronRight-DDbSh6n1.js → ChevronRight-BCgvkwtC.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dp8gBsiQ.js → ChevronUp-CrL9TH1K.js} +1 -1
- package/dist/client/assets/{Container-DbPEBCPd.js → Container-B7M87Wz6.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DGpodMuQ.js → LinkExternal01-DLKyZWWz.js} +1 -1
- package/dist/client/assets/{Lock01-DWeyLAgC.js → Lock01-bZF1KUvq.js} +1 -1
- package/dist/client/assets/{Palette-9DjyOnf4.js → Palette-Dl7lzquw.js} +1 -1
- package/dist/client/assets/{Play-CGVWyYId.js → Play-DtJ0cxBf.js} +1 -1
- package/dist/client/assets/{Plus-BZ8TfrO6.js → Plus-IUiAby9e.js} +1 -1
- package/dist/client/assets/{SearchMd-DiHiiShh.js → SearchMd-A2WzjBhy.js} +1 -1
- package/dist/client/assets/{Settings02-BrMLRmyq.js → Settings02-uCCFk89X.js} +1 -1
- package/dist/client/assets/{Star01-DOZUyUGI.js → Star01-07LmVEi1.js} +1 -1
- package/dist/client/assets/{Sun-D9NMWxb1.js → Sun-NZLaiUcL.js} +1 -1
- package/dist/client/assets/{Tool01-CPwXEQb5.js → Tool01-1Tm6sx2D.js} +1 -1
- package/dist/client/assets/{Trash01-JJPVWHIh.js → Trash01-2of3D7QX.js} +1 -1
- package/dist/client/assets/{Upload01-CAASdeK2.js → Upload01-BPC1olzj.js} +1 -1
- package/dist/client/assets/{User01-DzewYYcp.js → User01-Dj2-no-V.js} +1 -1
- package/dist/client/assets/{Users03-1bfUrVZT.js → Users03-B_ZFhEj7.js} +1 -1
- package/dist/client/assets/{X-CyqBZIBt.js → X-BXQFKahF.js} +1 -1
- package/dist/client/assets/{XCircle-C0Pb9VbS.js → XCircle-ByksmUze.js} +1 -1
- package/dist/client/assets/{Zap-WS6KKy8N.js → Zap-Ct-Bt-7a.js} +1 -1
- package/dist/client/assets/{ZapSquare-DBz9qdVm.js → ZapSquare-CLlEU1BK.js} +1 -1
- package/dist/client/assets/{accordion-iHKIJir4.js → accordion-CBx4kF0A.js} +1 -1
- package/dist/client/assets/agent-icon-uOxmWZzX.js +1 -0
- package/dist/client/assets/{agents-list-EtMSypXC.js → agents-list-c4HvLnHM.js} +1 -1
- package/dist/client/assets/ai-providers-DNv3Q1EX.js +1 -0
- package/dist/client/assets/{alert-dialog-CvUq9c2l.js → alert-dialog-P8pjafE2.js} +1 -1
- package/dist/client/assets/{auth-catchall-C2AFIXKV.js → auth-catchall-8f9iLpUP.js} +1 -1
- package/dist/client/assets/{automation-list-row-srgvCKZh.js → automation-list-row-BDBawYyn.js} +1 -1
- package/dist/client/assets/{automations-Dp2hsJvG.js → automations-C_zdEQX8.js} +1 -1
- package/dist/client/assets/{avatar-BAGLgwIy.js → avatar-F9o71OJ0.js} +1 -1
- package/dist/client/assets/{badge-Csg5fgRc.js → badge-D2Q0fk8p.js} +1 -1
- package/dist/client/assets/{brand-context-D7GISA6v.js → brand-context-CW58R34a.js} +1 -1
- package/dist/client/assets/{card-bx_QeXw_.js → card-fcmwdw-g.js} +1 -1
- package/dist/client/assets/{chat-context-OvrSchhz.js → chat-context-CXS-qe2G.js} +1 -1
- package/dist/client/assets/{checkbox-C7KSBfZr.js → checkbox-CqcJoypg.js} +1 -1
- package/dist/client/assets/{collection-detail-BcTctJfQ.js → collection-detail-DhZtELgd.js} +1 -1
- package/dist/client/assets/{collection-display-button-B4SGVjCw.js → collection-display-button-CgNICB5x.js} +1 -1
- package/dist/client/assets/{collection-search-DOj_zhXC.js → collection-search-BhW0WppR.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C7ZPBElG.js → collection-table-wrapper-rCxyye9m.js} +1 -1
- package/dist/client/assets/{collection-tabs-DrO0tDqW.js → collection-tabs-CCiykiFm.js} +1 -1
- package/dist/client/assets/{collections-DRefuj7X.js → collections-C5k4gitm.js} +1 -1
- package/dist/client/assets/{command-CGYZopFY.js → command-Bap7RtnO.js} +1 -1
- package/dist/client/assets/{connection-card-x5-U4xYO.js → connection-card-CAIl5zuH.js} +1 -1
- package/dist/client/assets/{connection-detail-DNT7n-qD.js → connection-detail-C-murm81.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cieg3At7.js → connection-form-helpers-Kb2X2zWy.js} +1 -1
- package/dist/client/assets/{connections-CcMp0k3e.js → connections-BUYyasfH.js} +1 -1
- package/dist/client/assets/{constants-BTGWOBGG.js → constants-BYqEB04Y.js} +1 -1
- package/dist/client/assets/{constants-DfNucTio.js → constants-Cz3vSCG9.js} +4 -4
- package/dist/client/assets/{dialog-CDZoEVTf.js → dialog-BEtDzaNY.js} +1 -1
- package/dist/client/assets/{drawer-BtA5XqsS.js → drawer-BXhHhfPv.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DU8JG2pk.js → dropdown-menu-CPrJeiSb.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DI-gMMKE.js → dynamic-plugin-layout-B3frXkTC.js} +1 -1
- package/dist/client/assets/{empty-state-B2WkME-3.js → empty-state-D17b8ueP.js} +1 -1
- package/dist/client/assets/{empty-state-BxCE5vnH.js → empty-state-QyaCdfZt.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DBjTfzuX.js → extract-connection-data-Df_ti4Xy.js} +1 -1
- package/dist/client/assets/{features-BTMuaR90.js → features-DpwKJvfV.js} +1 -1
- package/dist/client/assets/{form-nehB0yqt.js → form-CyOS6D3q.js} +1 -1
- package/dist/client/assets/{general-aaZSKs7j.js → general-BXFZtoDZ.js} +1 -1
- package/dist/client/assets/{index-BFKRaI9q.js → index-B6nAXVWE.js} +1 -1
- package/dist/client/assets/{index-DkLXfxeF.js → index-C27Pbex0.js} +2 -2
- package/dist/client/assets/{index-CFqkoEQr.js → index-C6iu8syV.js} +1 -1
- package/dist/client/assets/{index-0Nuumosr.js → index-CjRdG1Vp.js} +1 -1
- package/dist/client/assets/{index-A1TjNoro.js → index-CpMJ05u5.js} +1 -1
- package/dist/client/assets/{index-FCEJcMKv.js → index-D2u00J0R.js} +31 -31
- package/dist/client/assets/index-DHRo5LVc.css +1 -0
- package/dist/client/assets/{index-nsskrYaZ.js → index-DYJpZ_hI.js} +1 -1
- package/dist/client/assets/{index-DvGOE4TR.js → index-DsXJm4s8.js} +1 -1
- package/dist/client/assets/{index-BD-lTLoS.js → index-FD-g03rr.js} +1 -1
- package/dist/client/assets/{index-C7LpArfe.js → index-tiUiHjMI.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-VUPo5ONC.js → infiniteQueryObserver-Bm_4nXxh.js} +1 -1
- package/dist/client/assets/{input-Dxp3-aWz.js → input-BMDCCsVs.js} +1 -1
- package/dist/client/assets/integration-icon-gIhUX9GC.js +1 -0
- package/dist/client/assets/{label-BVoDYtUr.js → label-2vBVhIzi.js} +1 -1
- package/dist/client/assets/{layout-C9Y7P28P.js → layout-BU5OyVXS.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-N8EVMVv5.js → lean-canvas-recruit-modal-BpJpmMV7.js} +2 -2
- package/dist/client/assets/{login-kx3MQEcu.js → login-mUATXvn9.js} +1 -1
- package/dist/client/assets/{members-BucBnRu5.js → members-CEd1LJk0.js} +1 -1
- package/dist/client/assets/{monaco-editor-WwGGEq4E.js → monaco-editor-BnguFt9B.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D5uhoKE2.js → monitoring-stats-row-DRhzCagY.js} +1 -1
- package/dist/client/assets/{oauth-callback-BB1bfQ0C.js → oauth-callback-BeAxhA0O.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cx11JY4J.js → oauth-callback-ai-provider-BNMpbB2T.js} +1 -1
- package/dist/client/assets/{onboarding-CRDp-7ts.js → onboarding-DXyWyIV-.js} +1 -1
- package/dist/client/assets/{org-layout-DWgxefUR.js → org-layout-DJZ7Z_p1.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-B0IS-vI9.js → org-plugin-layout-nQpaPqCP.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C9Il8L-B.js → plugin-empty-state-D4pz75Eg.js} +1 -1
- package/dist/client/assets/{plugin-header-DF-027xA.js → plugin-header-D_Oa6gN8.js} +1 -1
- package/dist/client/assets/{plugin-layout-CQviDmLQ.js → plugin-layout-csD4Blom.js} +1 -1
- package/dist/client/assets/{popover-_s_tQK3Z.js → popover-C6ihUqMx.js} +1 -1
- package/dist/client/assets/{profile-BAAvq5PA.js → profile-725q4zwE.js} +1 -1
- package/dist/client/assets/{project-app-view-CWfRTdtF.js → project-app-view-BgI1ObN0.js} +1 -1
- package/dist/client/assets/registry-DiyPXzzy.js +2 -0
- package/dist/client/assets/{registry-layout-DQKjQh-i.js → registry-layout-CZiwWJ4l.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CXhuopzx.js → required-auth-layout-DYZPY8fJ.js} +1 -1
- package/dist/client/assets/{reset-password-DZzWPbSN.js → reset-password-D92BxTuZ.js} +1 -1
- package/dist/client/assets/{scroll-area-hAa33XcH.js → scroll-area-BjkPDLjB.js} +1 -1
- package/dist/client/assets/{search-input-C61ZvpPR.js → search-input-BsH-Fhn1.js} +1 -1
- package/dist/client/assets/{select-DRB8tE_p.js → select-ByGBjkSM.js} +1 -1
- package/dist/client/assets/{select-model-CP81c55I.js → select-model-ipn8mtVw.js} +1 -1
- package/dist/client/assets/settings-layout-DaVsMStD.js +1 -0
- package/dist/client/assets/{shell-layout-DAhaxub0.js → shell-layout-CBHcQlP6.js} +1 -1
- package/dist/client/assets/{skeleton-3sAmljB_.js → skeleton-CKW2-ArL.js} +1 -1
- package/dist/client/assets/{sso-BmmBRsro.js → sso-GNLrvSnU.js} +1 -1
- package/dist/client/assets/{store-Dq5sv0Ed.js → store-Bv7PRV1N.js} +1 -1
- package/dist/client/assets/store-registry-IxsRTF9k.js +2 -0
- package/dist/client/assets/{switch-DL640Ue6.js → switch-D_oyEj-7.js} +1 -1
- package/dist/client/assets/{table-Dbi2W1JY.js → table-DmvqYMYA.js} +1 -1
- package/dist/client/assets/{tabs-BByMWKiD.js → tabs-CHeB-_P1.js} +1 -1
- package/dist/client/assets/{task-status-CmmBYEnr.js → task-status-CGy28UD5.js} +1 -1
- package/dist/client/assets/{textarea-DHlYLEvo.js → textarea-Bo2Nbyc2.js} +1 -1
- package/dist/client/assets/{toggle-group-CZBEspMS.js → toggle-group-hicYHCaj.js} +1 -1
- package/dist/client/assets/{tools-list-DuX1kehi.js → tools-list-Bc5L72jI.js} +1 -1
- package/dist/client/assets/{types-DvTqSron.js → types-Qy_lXSZi.js} +1 -1
- package/dist/client/assets/{use-ai-providers-ClS89y7X.js → use-ai-providers-D5svCGwH.js} +1 -1
- package/dist/client/assets/{use-collections-Dv9KwC2D.js → use-collections-C9mDhhDp.js} +1 -1
- package/dist/client/assets/{use-connection-BmcG6E0P.js → use-connection-labJovV0.js} +1 -1
- package/dist/client/assets/{use-copy-BkRNxEwn.js → use-copy-C--xeydh.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CH8VJize.js → use-create-virtual-mcp-Dmy-tzU3.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BwyevFSM.js → use-decopilot-events-BQ6lKiUz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DfVzQzgY.js → use-delete-connection-Bj5gBc4Q.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C0yn-Y6f.js → use-infinite-scroll-CSBdO1Tg.js} +1 -1
- package/dist/client/assets/{use-list-state-D4yuEOh_.js → use-list-state-BjQoZx3U.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B1TR0GK5.js → use-mcp-tools-C0TDyIdf.js} +1 -1
- package/dist/client/assets/{use-members-BSe-l5RV.js → use-members-BJMZeTol.js} +1 -1
- package/dist/client/assets/{use-mobile-D7gj1mMa.js → use-mobile-49sQdb0b.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BOFYFzjJ.js → use-navigate-to-agent-DHv3qU4y.js} +1 -1
- package/dist/client/assets/{use-org-sso-BIx4Rk_Y.js → use-org-sso-DZn2rTnY.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CcY3Vn-c.js → use-organization-settings-BhA6YmfT.js} +1 -1
- package/dist/client/assets/{use-registry-connections-G41Zams2.js → use-registry-connections-Bvn4-1Jy.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cq0X5c0g.js → use-status-sounds-hwHn7ByT.js} +1 -1
- package/dist/client/assets/{use-tasks-DqpLygvk.js → use-tasks-CEfchIrz.js} +1 -1
- package/dist/client/assets/{use-view-mode-hEZSGIRN.js → use-view-mode-BZEJDQ3u.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B0nMlTA1.js → use-virtual-mcp-kjgk684A.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bices_FL.js +1 -0
- package/dist/client/assets/{user-B-lqJM9i.js → user-DxIuCi_O.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DSiIUGAP.js → view-mode-toggle-KKeD1zNQ.js} +1 -1
- package/dist/client/assets/{workflow-C2B3R0BC.js → workflow-3PvqRa7g.js} +1 -1
- package/dist/client/assets/workflow-detail-BLyd9EdB.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +54 -54
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/onetime/index.d.ts +64 -0
- package/dist/server/node_modules/onetime/index.js +44 -0
- package/dist/server/node_modules/onetime/license +9 -0
- package/dist/server/node_modules/onetime/package.json +43 -0
- package/dist/server/node_modules/onetime/readme.md +94 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/{xtend/LICENSE → postgres-array/license} +2 -1
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-OPgA0_xh.js +0 -1
- package/dist/client/assets/ai-providers-BkPyz71b.js +0 -1
- package/dist/client/assets/index-C_Ncklfg.css +0 -1
- package/dist/client/assets/integration-icon-DUduEF01.js +0 -1
- package/dist/client/assets/registry-BO9_rH5u.js +0 -2
- package/dist/client/assets/settings-layout-UJNERdUa.js +0 -1
- package/dist/client/assets/store-registry-BfCS4xd0.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D-Fu49PN.js +0 -1
- package/dist/client/assets/workflow-detail-EmQ0YEuI.js +0 -1
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,s as w,o as E,bL as N,j as i,a6 as _,aH as K,K as C,z as R}from"./index-
|
|
1
|
+
import{e as S,s as w,o as E,bL as N,j as i,a6 as _,aH as K,K as C,z as R}from"./index-C27Pbex0.js";import{P as y}from"./index-DsXJm4s8.js";import{b as T}from"./use-organization-settings-BhA6YmfT.js";import{S as q}from"./switch-D_oyEj-7.js";import{n as z}from"./Container-B7M87Wz6.js";import"./use-mobile-49sQdb0b.js";import"./X-BXQFKahF.js";import"./constants-Cz3vSCG9.js";function Q(t){const e=S.c(33),{plugin:n,isEnabled:l,isSaving:c,description:d,label:f,icon:p,onToggle:g}=t;let u;e[0]!==l||e[1]!==c||e[2]!==g||e[3]!==n.id?(u=()=>!c&&g(n.id,!l),e[0]=l,e[1]=c,e[2]=g,e[3]=n.id,e[4]=u):u=e[4];const h=c?void 0:"pointer";let x;e[5]!==h?(x={cursor:h},e[5]=h,e[6]=x):x=e[6];let j;e[7]!==p?(j=p&&i.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:p}),e[7]=p,e[8]=j):j=e[8];let o;e[9]!==f?(o=i.jsx("p",{className:"text-sm font-medium text-foreground",children:f}),e[9]=f,e[10]=o):o=e[10];let m;e[11]!==d?(m=d&&i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:d}),e[11]=d,e[12]=m):m=e[12];let s;e[13]!==o||e[14]!==m?(s=i.jsxs("div",{className:"min-w-0",children:[o,m]}),e[13]=o,e[14]=m,e[15]=s):s=e[15];let r;e[16]!==j||e[17]!==s?(r=i.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[j,s]}),e[16]=j,e[17]=s,e[18]=r):r=e[18];let a;e[19]!==g||e[20]!==n.id?(a=k=>g(n.id,k),e[19]=g,e[20]=n.id,e[21]=a):a=e[21];let b;e[22]!==l||e[23]!==c||e[24]!==a?(b=i.jsx("div",{onClick:$,className:"shrink-0",children:i.jsx(q,{checked:l,onCheckedChange:a,disabled:c})}),e[22]=l,e[23]=c,e[24]=a,e[25]=b):b=e[25];let P;e[26]!==b||e[27]!==r?(P=i.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[r,b]}),e[26]=b,e[27]=r,e[28]=P):P=e[28];let v;return e[29]!==u||e[30]!==P||e[31]!==x?(v=i.jsx("div",{className:"flex flex-col border-b border-border last:border-0",onClick:u,style:x,children:P}),e[29]=u,e[30]=P,e[31]=x,e[32]=v):v=e[32],v}function $(t){return t.stopPropagation()}function F(){const t=S.c(17),{org:e,project:n}=w(),l=E();let c;t[0]!==n.enabledPlugins?(c=n.enabledPlugins??[],t[0]=n.enabledPlugins,t[1]=c):c=t[1];const d=c,f=T();let p;t[2]!==e||t[3]!==n.slug||t[4]!==l?(p=()=>{l.invalidateQueries({queryKey:C.project(e.id,n.slug)}),l.invalidateQueries({queryKey:C.projects(e.id)}),l.invalidateQueries({predicate:s=>{const r=s.queryKey;return r[1]===e.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},t[2]=e,t[3]=n.slug,t[4]=l,t[5]=p):p=t[5];const g=p;let u;t[6]!==g||t[7]!==f||t[8]!==d?(u=(s,r)=>{const a=new Set(d);r?a.add(s):a.delete(s),f.mutate({enabled_plugins:Array.from(a)},{onSuccess:g,onError:A})},t[6]=g,t[7]=f,t[8]=d,t[9]=u):u=t[9];const h=u,x=U,j=I;if(N.length===0){let s;return t[10]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),t[10]=s):s=t[10],s}let o;t[11]!==h||t[12]!==f||t[13]!==d?(o=N.map(s=>{const r=x(s.id),a=j(s.id),b=d.includes(s.id);return i.jsx(Q,{plugin:s,isEnabled:b,isSaving:f.isPending,description:a,label:r?.label??s.id,icon:r?.icon??i.jsx(z,{size:14}),onToggle:h},s.id)}),t[11]=h,t[12]=f,t[13]=d,t[14]=o):o=t[14];let m;return t[15]!==o?(m=i.jsx("div",{className:"flex flex-col",children:o}),t[15]=o,t[16]=m):m=t[16],m}function I(t){return N.find(n=>n.id===t)?.description??null}function U(t){const e=_.find(l=>l.pluginId===t);if(e)return{label:e.label,icon:e.items[0]?.icon};const n=K.find(l=>l.pluginId===t);return n?{label:n.label,icon:n.icon}:null}function A(t){R.error("Failed to update plugin: "+(t instanceof Error?t.message:"Unknown error"))}function D(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(y,{children:i.jsx(y.Content,{children:i.jsx(y.Body,{children:i.jsxs("div",{className:"flex flex-col gap-6",children:[i.jsx(y.Title,{children:"Plugins"}),i.jsx(F,{})]})})})}),t[0]=e):e=t[0],e}function J(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(D,{}),t[0]=e):e=t[0],e}export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bV as C,e as f,j as c,aC as b,r as d,c as p,aZ as j,bW as v,bX as h}from"./index-
|
|
1
|
+
import{bV as C,e as f,j as c,aC as b,r as d,c as p,aZ as j,bW as v,bX as h}from"./index-C27Pbex0.js";import{L as N}from"./label-2vBVhIzi.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(b,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,M as a,w as b,L as c,P as d,R as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as J,r as V,z as C,j as s,B as T,f as ie,s as Y,o as H,x as ne,w as oe,a as U,t as w,K as B,b as W,v as le,y as Q,n as re}from"./index-DkLXfxeF.js";import{P as $}from"./index-DvGOE4TR.js";import{C as X,b as ee,c as te,a as se,d as ce,e as de}from"./card-bx_QeXw_.js";import{I as Z}from"./input-Dxp3-aWz.js";import{L as R}from"./label-BVoDYtUr.js";import{i as me}from"./Upload01-CAASdeK2.js";import{i as ue}from"./X-CyqBZIBt.js";import{u as K}from"./unwrap-tool-result-BYXdCQMg.js";import{S as ge,u as xe}from"./constants-DfNucTio.js";import{S as fe}from"./switch-DL640Ue6.js";import"./use-mobile-D7gj1mMa.js";function he(e){const t=J.c(28),{value:g,onChange:r,name:j,disabled:a}=e,c=V.useRef(null);let x;t[0]!==r?(x=_=>{const z=_.target.files?.[0];if(z){if(z.size>2097152){C.error("Image must be smaller than 2MB");return}const p=new FileReader;p.onerror=()=>{const S=p.error;console.error("FileReader error:",S),C.error(S?.message||"Failed to read image file. Please try again."),c.current&&(c.current.value="")},p.onloadend=()=>{p.readyState===FileReader.DONE&&p.result&&r(p.result),c.current&&(c.current.value="")},p.readAsDataURL(z)}},t[0]=r,t[1]=x):x=t[1];const y=x;let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{c.current?.click()},t[2]=m):m=t[2];const n=m;let f;t[3]!==r?(f=_=>{_.stopPropagation(),r("")},t[3]=r,t[4]=f):f=t[4];const d=f;let l;t[5]!==a||t[6]!==y?(l=s.jsx("input",{type:"file",ref:c,className:"hidden",accept:"image/*",onChange:y,disabled:a}),t[5]=a,t[6]=y,t[7]=l):l=t[7];let o;t[8]!==a||t[9]!==d||t[10]!==j||t[11]!==g?(o=g?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:g,alt:j||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:d,disabled:a,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(ue,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:n,disabled:a,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(me,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[8]=a,t[9]=d,t[10]=j,t[11]=g,t[12]=o):o=t[12];const E=g?"Change Logo":"Upload Logo";let b;t[13]!==a||t[14]!==E?(b=s.jsx(T,{type:"button",variant:"outline",size:"sm",onClick:n,disabled:a,className:"mb-2",children:E}),t[13]=a,t[14]=E,t[15]=b):b=t[15];let N;t[16]!==a||t[17]!==d||t[18]!==g?(N=g&&s.jsx(T,{type:"button",variant:"ghost",size:"sm",onClick:d,disabled:a,className:"ml-2",children:"Remove"}),t[16]=a,t[17]=d,t[18]=g,t[19]=N):N=t[19];let u;t[20]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[20]=u):u=t[20];let h;t[21]!==b||t[22]!==N?(h=s.jsxs("div",{className:"flex-1",children:[b,N,u]}),t[21]=b,t[22]=N,t[23]=h):h=t[23];let v;return t[24]!==h||t[25]!==l||t[26]!==o?(v=s.jsxs("div",{className:"flex items-start gap-4",children:[l,o,h]}),t[24]=h,t[25]=l,t[26]=o,t[27]=v):v=t[27],v}const pe=le({name:Q().min(1,"Name is required").max(255,"Name is too long"),slug:Q().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:Q().optional()});function je(){const e=ie(),{org:t}=Y(),g=H(),[r,j]=V.useState(!1),a=ne({resolver:oe(pe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=U({mutationFn:async n=>{const f={name:n.name,slug:n.slug};n.logo&&(f.logo=n.logo);const d=await W.organization.update({organizationId:t.id,data:f});if(d?.error)throw new Error(d.error.message||"Failed to update organization");return d},onSuccess:n=>{w("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a.formState.dirtyFields)}),g.invalidateQueries({queryKey:B.organizations()}),g.invalidateQueries({queryKey:B.activeOrganization(t.slug)}),C.success("Organization settings updated successfully"),n?.data?.slug&&n.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:n.data.slug}})},onError:n=>{w("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a.formState.dirtyFields),error:n instanceof Error?n.message:String(n)}),C.error(n instanceof Error?n.message:"Failed to update organization")},onSettled:()=>{j(!1)}}),x=n=>{j(!0),c.mutate(n)},y=a.formState.isDirty,m=a.formState.errors;return s.jsx("form",{onSubmit:a.handleSubmit(x),className:"flex flex-col gap-6",children:s.jsxs(X,{className:"p-6",children:[s.jsx(ee,{className:"p-0",children:s.jsx(te,{className:"text-sm",children:"Overview"})}),s.jsxs(se,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(he,{value:a.watch("logo"),onChange:n=>a.setValue("logo",n??"",{shouldDirty:!0}),name:a.watch("name"),disabled:r}),m.logo&&s.jsx("p",{className:"text-xs text-destructive",children:m.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(Z,{id:"org-name",...a.register("name"),placeholder:"Organization name",disabled:r}),m.name&&s.jsx("p",{className:"text-xs text-destructive",children:m.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(Z,{id:"org-slug",...a.register("slug"),placeholder:"my-organization",disabled:r,onChange:n=>{const f=n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),m.slug&&s.jsx("p",{className:"text-xs text-destructive",children:m.slug.message})]})]})]}),y&&s.jsxs(ce,{className:"p-0 pt-2 gap-2",children:[s.jsx(T,{type:"submit",disabled:r,children:r?"Saving…":"Save"}),s.jsx(T,{type:"button",variant:"outline",onClick:()=>a.reset(),disabled:r,children:"Cancel"})]})]})})}function Ne(){const e=J.c(62),{org:t}=Y(),{data:g}=W.useSession(),r=H();let j;e[0]!==t.id?(j={connectionId:ge,orgId:t.id},e[0]=t.id,e[1]=j):j=e[1];const a=xe(j);let c;e[2]!==t.id?(c=B.organizationDomain(t.id),e[2]=t.id,e[3]=c):c=e[3];let x;e[4]!==a?(x=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return K(i)},e[4]=a,e[5]=x):x=e[5];let y;e[6]!==c||e[7]!==x?(y={queryKey:c,queryFn:x},e[6]=c,e[7]=x,e[8]=y):y=e[8];const{data:m,isPending:n}=re(y),f=g?.user?.email??"";let d;e[9]!==f?(d=f.split("@")[1]?.toLowerCase()??"",e[9]=f,e[10]=d):d=e[10];const l=d,o=m?.domain??null,E=m?.autoJoinEnabled??!1,b=l&&l!==o;let N;e[11]!==t.id||e[12]!==r?(N=()=>r.invalidateQueries({queryKey:B.organizationDomain(t.id)}),e[11]=t.id,e[12]=r,e[13]=N):N=e[13];const u=N;let h;e[14]!==a||e[15]!==l?(h=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:l,autoJoinEnabled:!1}});return K(i)},e[14]=a,e[15]=l,e[16]=h):h=e[16];let v;e[17]!==u||e[18]!==t.id||e[19]!==l?(v=()=>{w("organization_domain_claimed",{organization_id:t.id,email_domain:l}),u(),C.success("Domain claimed")},e[17]=u,e[18]=t.id,e[19]=l,e[20]=v):v=e[20];let _;e[21]!==t.id||e[22]!==l?(_=i=>{w("organization_domain_claim_failed",{organization_id:t.id,email_domain:l,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to claim domain")},e[21]=t.id,e[22]=l,e[23]=_):_=e[23];let z;e[24]!==h||e[25]!==v||e[26]!==_?(z={mutationFn:h,onSuccess:v,onError:_},e[24]=h,e[25]=v,e[26]=_,e[27]=z):z=e[27];const p=U(z);let S;e[28]!==a?(S=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return K(i)},e[28]=a,e[29]=S):S=e[29];let O;e[30]!==o||e[31]!==u||e[32]!==t.id?(O=()=>{w("organization_domain_cleared",{organization_id:t.id,email_domain:o}),u(),C.success("Domain removed")},e[30]=o,e[31]=u,e[32]=t.id,e[33]=O):O=e[33];let D;e[34]!==o||e[35]!==t.id?(D=i=>{w("organization_domain_clear_failed",{organization_id:t.id,email_domain:o,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to remove domain")},e[34]=o,e[35]=t.id,e[36]=D):D=e[36];let k;e[37]!==S||e[38]!==O||e[39]!==D?(k={mutationFn:S,onSuccess:O,onError:D},e[37]=S,e[38]=O,e[39]=D,e[40]=k):k=e[40];const M=U(k);let F;e[41]!==a||e[42]!==o||e[43]!==t.id?(F=async i=>{if(!o)return;w("organization_auto_join_toggled",{organization_id:t.id,enabled:i});const ae=await a.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:i}});return K(ae)},e[41]=a,e[42]=o,e[43]=t.id,e[44]=F):F=e[44];let I;e[45]!==u?(I=()=>{u(),C.success("Auto-join setting updated")},e[45]=u,e[46]=I):I=e[46];let A;e[47]!==t.id?(A=i=>{w("organization_auto_join_toggle_failed",{organization_id:t.id,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to update auto-join")},e[47]=t.id,e[48]=A):A=e[48];let P;e[49]!==F||e[50]!==I||e[51]!==A?(P={mutationFn:F,onSuccess:I,onError:A},e[49]=F,e[50]=I,e[51]=A,e[52]=P):P=e[52];const L=U(P);if(n)return null;let q;e[53]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsxs(ee,{className:"p-0",children:[s.jsx(te,{className:"text-sm",children:"Email Domain"}),s.jsx(de,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),e[53]=q):q=e[53];let G;return e[54]!==E||e[55]!==b||e[56]!==M||e[57]!==o||e[58]!==p||e[59]!==L||e[60]!==l?(G=s.jsxs(X,{className:"p-6",children:[q,s.jsx(se,{className:"flex flex-col gap-4 p-0 pt-4",children:o?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:o})]}),s.jsx(T,{variant:"outline",size:"sm",onClick:()=>M.mutate(),disabled:M.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(R,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",o," emails will automatically join this organization on signup."]})]}),s.jsx(fe,{checked:E,onCheckedChange:i=>L.mutate(i),disabled:L.isPending})]})]}):b?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:l})]}),s.jsx(T,{size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:p.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),e[54]=E,e[55]=b,e[56]=M,e[57]=o,e[58]=p,e[59]=L,e[60]=l,e[61]=G):G=e[61],G}function ve(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx($,{children:s.jsx($.Content,{children:s.jsx($.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx($.Title,{children:"Organization"}),s.jsx(je,{}),s.jsx(Ne,{})]})})})}),e[0]=t):t=e[0],t}function Ie(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ve,{}),e[0]=t):t=e[0],t}export{Ie as default};
|
|
1
|
+
import{e as J,r as V,z as C,j as s,B as T,f as ie,s as Y,o as H,x as ne,w as oe,a as U,t as w,K as B,b as W,v as le,y as Q,n as re}from"./index-C27Pbex0.js";import{P as $}from"./index-DsXJm4s8.js";import{C as X,b as ee,c as te,a as se,d as ce,e as de}from"./card-fcmwdw-g.js";import{I as Z}from"./input-BMDCCsVs.js";import{L as R}from"./label-2vBVhIzi.js";import{i as me}from"./Upload01-BPC1olzj.js";import{i as ue}from"./X-BXQFKahF.js";import{u as K}from"./unwrap-tool-result-BYXdCQMg.js";import{S as ge,u as xe}from"./constants-Cz3vSCG9.js";import{S as fe}from"./switch-D_oyEj-7.js";import"./use-mobile-49sQdb0b.js";function he(e){const t=J.c(28),{value:g,onChange:r,name:j,disabled:a}=e,c=V.useRef(null);let x;t[0]!==r?(x=_=>{const z=_.target.files?.[0];if(z){if(z.size>2097152){C.error("Image must be smaller than 2MB");return}const p=new FileReader;p.onerror=()=>{const S=p.error;console.error("FileReader error:",S),C.error(S?.message||"Failed to read image file. Please try again."),c.current&&(c.current.value="")},p.onloadend=()=>{p.readyState===FileReader.DONE&&p.result&&r(p.result),c.current&&(c.current.value="")},p.readAsDataURL(z)}},t[0]=r,t[1]=x):x=t[1];const y=x;let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{c.current?.click()},t[2]=m):m=t[2];const n=m;let f;t[3]!==r?(f=_=>{_.stopPropagation(),r("")},t[3]=r,t[4]=f):f=t[4];const d=f;let l;t[5]!==a||t[6]!==y?(l=s.jsx("input",{type:"file",ref:c,className:"hidden",accept:"image/*",onChange:y,disabled:a}),t[5]=a,t[6]=y,t[7]=l):l=t[7];let o;t[8]!==a||t[9]!==d||t[10]!==j||t[11]!==g?(o=g?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:g,alt:j||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:d,disabled:a,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(ue,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:n,disabled:a,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(me,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[8]=a,t[9]=d,t[10]=j,t[11]=g,t[12]=o):o=t[12];const E=g?"Change Logo":"Upload Logo";let b;t[13]!==a||t[14]!==E?(b=s.jsx(T,{type:"button",variant:"outline",size:"sm",onClick:n,disabled:a,className:"mb-2",children:E}),t[13]=a,t[14]=E,t[15]=b):b=t[15];let N;t[16]!==a||t[17]!==d||t[18]!==g?(N=g&&s.jsx(T,{type:"button",variant:"ghost",size:"sm",onClick:d,disabled:a,className:"ml-2",children:"Remove"}),t[16]=a,t[17]=d,t[18]=g,t[19]=N):N=t[19];let u;t[20]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[20]=u):u=t[20];let h;t[21]!==b||t[22]!==N?(h=s.jsxs("div",{className:"flex-1",children:[b,N,u]}),t[21]=b,t[22]=N,t[23]=h):h=t[23];let v;return t[24]!==h||t[25]!==l||t[26]!==o?(v=s.jsxs("div",{className:"flex items-start gap-4",children:[l,o,h]}),t[24]=h,t[25]=l,t[26]=o,t[27]=v):v=t[27],v}const pe=le({name:Q().min(1,"Name is required").max(255,"Name is too long"),slug:Q().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:Q().optional()});function je(){const e=ie(),{org:t}=Y(),g=H(),[r,j]=V.useState(!1),a=ne({resolver:oe(pe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=U({mutationFn:async n=>{const f={name:n.name,slug:n.slug};n.logo&&(f.logo=n.logo);const d=await W.organization.update({organizationId:t.id,data:f});if(d?.error)throw new Error(d.error.message||"Failed to update organization");return d},onSuccess:n=>{w("organization_settings_updated",{organization_id:t.id,fields:Object.keys(a.formState.dirtyFields)}),g.invalidateQueries({queryKey:B.organizations()}),g.invalidateQueries({queryKey:B.activeOrganization(t.slug)}),C.success("Organization settings updated successfully"),n?.data?.slug&&n.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:n.data.slug}})},onError:n=>{w("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(a.formState.dirtyFields),error:n instanceof Error?n.message:String(n)}),C.error(n instanceof Error?n.message:"Failed to update organization")},onSettled:()=>{j(!1)}}),x=n=>{j(!0),c.mutate(n)},y=a.formState.isDirty,m=a.formState.errors;return s.jsx("form",{onSubmit:a.handleSubmit(x),className:"flex flex-col gap-6",children:s.jsxs(X,{className:"p-6",children:[s.jsx(ee,{className:"p-0",children:s.jsx(te,{className:"text-sm",children:"Overview"})}),s.jsxs(se,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(he,{value:a.watch("logo"),onChange:n=>a.setValue("logo",n??"",{shouldDirty:!0}),name:a.watch("name"),disabled:r}),m.logo&&s.jsx("p",{className:"text-xs text-destructive",children:m.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(Z,{id:"org-name",...a.register("name"),placeholder:"Organization name",disabled:r}),m.name&&s.jsx("p",{className:"text-xs text-destructive",children:m.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(R,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(Z,{id:"org-slug",...a.register("slug"),placeholder:"my-organization",disabled:r,onChange:n=>{const f=n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),m.slug&&s.jsx("p",{className:"text-xs text-destructive",children:m.slug.message})]})]})]}),y&&s.jsxs(ce,{className:"p-0 pt-2 gap-2",children:[s.jsx(T,{type:"submit",disabled:r,children:r?"Saving…":"Save"}),s.jsx(T,{type:"button",variant:"outline",onClick:()=>a.reset(),disabled:r,children:"Cancel"})]})]})})}function Ne(){const e=J.c(62),{org:t}=Y(),{data:g}=W.useSession(),r=H();let j;e[0]!==t.id?(j={connectionId:ge,orgId:t.id},e[0]=t.id,e[1]=j):j=e[1];const a=xe(j);let c;e[2]!==t.id?(c=B.organizationDomain(t.id),e[2]=t.id,e[3]=c):c=e[3];let x;e[4]!==a?(x=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return K(i)},e[4]=a,e[5]=x):x=e[5];let y;e[6]!==c||e[7]!==x?(y={queryKey:c,queryFn:x},e[6]=c,e[7]=x,e[8]=y):y=e[8];const{data:m,isPending:n}=re(y),f=g?.user?.email??"";let d;e[9]!==f?(d=f.split("@")[1]?.toLowerCase()??"",e[9]=f,e[10]=d):d=e[10];const l=d,o=m?.domain??null,E=m?.autoJoinEnabled??!1,b=l&&l!==o;let N;e[11]!==t.id||e[12]!==r?(N=()=>r.invalidateQueries({queryKey:B.organizationDomain(t.id)}),e[11]=t.id,e[12]=r,e[13]=N):N=e[13];const u=N;let h;e[14]!==a||e[15]!==l?(h=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:l,autoJoinEnabled:!1}});return K(i)},e[14]=a,e[15]=l,e[16]=h):h=e[16];let v;e[17]!==u||e[18]!==t.id||e[19]!==l?(v=()=>{w("organization_domain_claimed",{organization_id:t.id,email_domain:l}),u(),C.success("Domain claimed")},e[17]=u,e[18]=t.id,e[19]=l,e[20]=v):v=e[20];let _;e[21]!==t.id||e[22]!==l?(_=i=>{w("organization_domain_claim_failed",{organization_id:t.id,email_domain:l,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to claim domain")},e[21]=t.id,e[22]=l,e[23]=_):_=e[23];let z;e[24]!==h||e[25]!==v||e[26]!==_?(z={mutationFn:h,onSuccess:v,onError:_},e[24]=h,e[25]=v,e[26]=_,e[27]=z):z=e[27];const p=U(z);let S;e[28]!==a?(S=async()=>{const i=await a.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return K(i)},e[28]=a,e[29]=S):S=e[29];let O;e[30]!==o||e[31]!==u||e[32]!==t.id?(O=()=>{w("organization_domain_cleared",{organization_id:t.id,email_domain:o}),u(),C.success("Domain removed")},e[30]=o,e[31]=u,e[32]=t.id,e[33]=O):O=e[33];let D;e[34]!==o||e[35]!==t.id?(D=i=>{w("organization_domain_clear_failed",{organization_id:t.id,email_domain:o,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to remove domain")},e[34]=o,e[35]=t.id,e[36]=D):D=e[36];let k;e[37]!==S||e[38]!==O||e[39]!==D?(k={mutationFn:S,onSuccess:O,onError:D},e[37]=S,e[38]=O,e[39]=D,e[40]=k):k=e[40];const M=U(k);let F;e[41]!==a||e[42]!==o||e[43]!==t.id?(F=async i=>{if(!o)return;w("organization_auto_join_toggled",{organization_id:t.id,enabled:i});const ae=await a.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:i}});return K(ae)},e[41]=a,e[42]=o,e[43]=t.id,e[44]=F):F=e[44];let I;e[45]!==u?(I=()=>{u(),C.success("Auto-join setting updated")},e[45]=u,e[46]=I):I=e[46];let A;e[47]!==t.id?(A=i=>{w("organization_auto_join_toggle_failed",{organization_id:t.id,error:i instanceof Error?i.message:String(i)}),C.error(i instanceof Error?i.message:"Failed to update auto-join")},e[47]=t.id,e[48]=A):A=e[48];let P;e[49]!==F||e[50]!==I||e[51]!==A?(P={mutationFn:F,onSuccess:I,onError:A},e[49]=F,e[50]=I,e[51]=A,e[52]=P):P=e[52];const L=U(P);if(n)return null;let q;e[53]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsxs(ee,{className:"p-0",children:[s.jsx(te,{className:"text-sm",children:"Email Domain"}),s.jsx(de,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),e[53]=q):q=e[53];let G;return e[54]!==E||e[55]!==b||e[56]!==M||e[57]!==o||e[58]!==p||e[59]!==L||e[60]!==l?(G=s.jsxs(X,{className:"p-6",children:[q,s.jsx(se,{className:"flex flex-col gap-4 p-0 pt-4",children:o?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:o})]}),s.jsx(T,{variant:"outline",size:"sm",onClick:()=>M.mutate(),disabled:M.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(R,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",o," emails will automatically join this organization on signup."]})]}),s.jsx(fe,{checked:E,onCheckedChange:i=>L.mutate(i),disabled:L.isPending})]})]}):b?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(R,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:l})]}),s.jsx(T,{size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:p.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),e[54]=E,e[55]=b,e[56]=M,e[57]=o,e[58]=p,e[59]=L,e[60]=l,e[61]=G):G=e[61],G}function ve(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx($,{children:s.jsx($.Content,{children:s.jsx($.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx($.Title,{children:"Organization"}),s.jsx(je,{}),s.jsx(Ne,{})]})})})}),e[0]=t):t=e[0],t}function Ie(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ve,{}),e[0]=t):t=e[0],t}export{Ie as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,z as qe,c as le,bb as Rn,n as Ys,K as $t,E as os,d as zs,t as Bt}from"./index-
|
|
1
|
+
import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,z as qe,c as le,bb as Rn,n as Ys,K as $t,E as os,d as zs,t as Bt}from"./index-C27Pbex0.js";import{S as Bs}from"./search-input-BsH-Fhn1.js";import{r as is,n as ls,o as cs,p as ds,P as Ue}from"./index-DsXJm4s8.js";import{E as dn}from"./empty-state-D17b8ueP.js";import{B as Ke}from"./badge-D2Q0fk8p.js";import{b as ct,P as dt,a as ut}from"./popover-C6ihUqMx.js";import{c as Mt,a as kt,b as Ct}from"./use-mobile-49sQdb0b.js";import{i as Ht,t as gt}from"./ChevronDown-xWqM1qJV.js";import{d as un,e as _t,n as Wn}from"./XCircle-ByksmUze.js";import{b as Hs}from"./SearchMd-A2WzjBhy.js";import{i as qs}from"./Play-DtJ0cxBf.js";import{$ as Vs,a0 as Us,Q as Ks,a1 as Gs,_ as Qs}from"./agent-icon-uOxmWZzX.js";import{M as $n}from"./monaco-editor-BnguFt9B.js";import{u as Js}from"./use-members-BJMZeTol.js";import{u as An}from"./use-connection-labJovV0.js";import{S as mn,u as fn,i as Xs,g as Zs,d as ea}from"./constants-Cz3vSCG9.js";import{u as ta}from"./use-virtual-mcp-kjgk684A.js";import{n as Ge}from"./Container-B7M87Wz6.js";import{s as na}from"./Plus-IUiAby9e.js";import{s as sa}from"./Trash01-2of3D7QX.js";import{I as pt}from"./input-BMDCCsVs.js";import{C as Yn}from"./checkbox-CqcJoypg.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la,u as us}from"./command-Bap7RtnO.js";import{c as Pt,d as Tt,S as Ot,b as Re,a as Ft}from"./select-ByGBjkSM.js";import{e as ca}from"./scroll-area-BjkPDLjB.js";import{a as da}from"./ZapSquare-CLlEU1BK.js";import{i as ua}from"./ChevronRight-BCgvkwtC.js";import{T as ma}from"./textarea-Bo2Nbyc2.js";import{C as ms}from"./collection-tabs-CCiykiFm.js";import{S as fa}from"./switch-D_oyEj-7.js";import{L as ha}from"./label-2vBVhIzi.js";import{I as ze}from"./integration-icon-gIhUX9GC.js";import{A as At}from"./avatar-F9o71OJ0.js";import{C as fs}from"./card-fcmwdw-g.js";import{K as st}from"./monitoring-stats-row-DRhzCagY.js";import{c as hs}from"./use-mcp-tools-C0TDyIdf.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-DmvqYMYA.js";import{n as xs}from"./ChevronUp-CrL9TH1K.js";import{u as gn}from"./use-infinite-scroll-CSBdO1Tg.js";import{u as pa}from"./useInfiniteQuery-Bices_FL.js";import{z as Lt,u as ga,h as va}from"./task-status-CGy28UD5.js";import"./X-BXQFKahF.js";import"./AlertCircle-CJ_7BsPP.js";import"./Tool01-1Tm6sx2D.js";import"./ArrowNarrowLeft-DtS9FYAN.js";import"./Users03-B_ZFhEj7.js";import"./CheckCircle-smRbUGaN.js";import"./Star01-07LmVEi1.js";import"./Palette-Dl7lzquw.js";import"./LinkExternal01-DLKyZWWz.js";import"./Lock01-bZF1KUvq.js";import"./Sun-NZLaiUcL.js";import"./Settings02-uCCFk89X.js";import"./Upload01-BPC1olzj.js";import"./User01-Dj2-no-V.js";import"./Zap-Ct-Bt-7a.js";import"./use-collections-C9mDhhDp.js";import"./infiniteQueryObserver-Bm_4nXxh.js";import"./index-DYJpZ_hI.js";import"./index-tiUiHjMI.js";import"./use-copy-C--xeydh.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-BEtDzaNY.js";import"./content-blocks-o63cs2vh.js";import"./types-Qy_lXSZi.js";import"./chat-context-CXS-qe2G.js";import"./use-ai-providers-D5svCGwH.js";import"./use-decopilot-events-BQ6lKiUz.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-CEfchIrz.js";import"./use-organization-settings-BhA6YmfT.js";import"./shell-layout-CBHcQlP6.js";import"./required-auth-layout-DYZPY8fJ.js";import"./use-org-sso-DZn2rTnY.js";const tn={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Qe(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),a=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${a}`}).join(",")}function ba(t){return t?t.split(",").map(e=>{const[n,a,...r]=e.split(":");return{key:decodeURIComponent(n||""),operator:a||"eq",value:decodeURIComponent(r.join(":")||"")}}):[]}function St(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Bn(t){return t.trim()?t.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[n,...a]=e.split("=");return{key:n||"",operator:"eq",value:a.join("=")}}if(e.includes("~")){const[n,...a]=e.split("~");return{key:n||"",operator:"contains",value:a.join("~")}}if(e.includes("@")){const[n,...a]=e.split("@");return{key:n||"",operator:"in",value:a.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function ya(t){const e={},n={},a=[],r={};for(const o of t)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(n[o.key]=`%${o.value}%`);break;case"exists":a.push(o.key);break;case"in":o.value&&(r[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(n).length>0?n:void 0,propertyKeys:a.length>0?a:void 0,propertyInValues:Object.keys(r).length>0?r:void 0}}function Hn(t){if(!t)return{content:"null",isTruncated:!1,originalSize:4};if(typeof t._decocms_truncated=="string")return{content:t._decocms_truncated,isTruncated:!0,originalSize:t._decocms_truncated.length};const e=JSON.stringify(t,null,2),n=e.length;return n<=tn.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:n}:{content:e.slice(0,tn.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-D_Oa6gN8.js","assets/ChevronDown-xWqM1qJV.js","assets/login-mUATXvn9.js","assets/input-BMDCCsVs.js","assets/reset-password-D92BxTuZ.js","assets/shell-layout-CBHcQlP6.js","assets/dialog-BEtDzaNY.js","assets/X-BXQFKahF.js","assets/required-auth-layout-DYZPY8fJ.js","assets/use-tasks-CEfchIrz.js","assets/use-collections-C9mDhhDp.js","assets/constants-Cz3vSCG9.js","assets/use-organization-settings-BhA6YmfT.js","assets/use-org-sso-DZn2rTnY.js","assets/Lock01-bZF1KUvq.js","assets/onboarding-DXyWyIV-.js","assets/label-2vBVhIzi.js","assets/Users03-B_ZFhEj7.js","assets/CheckCircle-smRbUGaN.js","assets/Palette-Dl7lzquw.js","assets/index-D2u00J0R.js","assets/chat-context-CXS-qe2G.js","assets/use-virtual-mcp-kjgk684A.js","assets/use-ai-providers-D5svCGwH.js","assets/use-decopilot-events-BQ6lKiUz.js","assets/create-sse-subscription-CxkOgzKf.js","assets/task-status-CGy28UD5.js","assets/agent-icon-uOxmWZzX.js","assets/AlertCircle-CJ_7BsPP.js","assets/Tool01-1Tm6sx2D.js","assets/SearchMd-A2WzjBhy.js","assets/ArrowNarrowLeft-DtS9FYAN.js","assets/XCircle-ByksmUze.js","assets/ZapSquare-CLlEU1BK.js","assets/ChevronRight-BCgvkwtC.js","assets/ChevronUp-CrL9TH1K.js","assets/Container-B7M87Wz6.js","assets/Star01-07LmVEi1.js","assets/index-DsXJm4s8.js","assets/use-mobile-49sQdb0b.js","assets/LinkExternal01-DLKyZWWz.js","assets/Sun-NZLaiUcL.js","assets/Play-DtJ0cxBf.js","assets/Plus-IUiAby9e.js","assets/Settings02-uCCFk89X.js","assets/Trash01-2of3D7QX.js","assets/Upload01-BPC1olzj.js","assets/User01-Dj2-no-V.js","assets/Zap-Ct-Bt-7a.js","assets/scroll-area-BjkPDLjB.js","assets/select-ByGBjkSM.js","assets/use-copy-C--xeydh.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-Qy_lXSZi.js","assets/integration-icon-gIhUX9GC.js","assets/drawer-BXhHhfPv.js","assets/collection-search-BhW0WppR.js","assets/tabs-CHeB-_P1.js","assets/form-CyOS6D3q.js","assets/dropdown-menu-CPrJeiSb.js","assets/toggle-group-hicYHCaj.js","assets/select-model-ipn8mtVw.js","assets/checkbox-CqcJoypg.js","assets/skeleton-CKW2-ArL.js","assets/ai-providers-logos-CS4PCiqI.js","assets/card-fcmwdw-g.js","assets/switch-D_oyEj-7.js","assets/avatar-F9o71OJ0.js","assets/alert-dialog-P8pjafE2.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/accordion-CBx4kF0A.js","assets/use-connection-labJovV0.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-CAIl5zuH.js","assets/use-registry-connections-Bvn4-1Jy.js","assets/useInfiniteQuery-Bices_FL.js","assets/infiniteQueryObserver-Bm_4nXxh.js","assets/extract-connection-data-Df_ti4Xy.js","assets/constants-BYqEB04Y.js","assets/collections-C5k4gitm.js","assets/collection-tabs-CCiykiFm.js","assets/badge-D2Q0fk8p.js","assets/textarea-Bo2Nbyc2.js","assets/connection-form-helpers-Kb2X2zWy.js","assets/use-infinite-scroll-CSBdO1Tg.js","assets/command-Bap7RtnO.js","assets/index-DYJpZ_hI.js","assets/lean-canvas-recruit-modal-BpJpmMV7.js","assets/use-navigate-to-agent-DHv3qU4y.js","assets/use-mcp-tools-C0TDyIdf.js","assets/use-create-virtual-mcp-Dmy-tzU3.js","assets/popover-C6ihUqMx.js","assets/empty-state-D17b8ueP.js","assets/index-C6iu8syV.js","assets/use-status-sounds-hwHn7ByT.js","assets/tools-list-Bc5L72jI.js","assets/view-mode-toggle-KKeD1zNQ.js","assets/user-DxIuCi_O.js","assets/automation-list-row-BDBawYyn.js","assets/search-input-BsH-Fhn1.js","assets/index-DDGTF8rc.css","assets/settings-layout-DaVsMStD.js","assets/connections-BUYyasfH.js","assets/collection-display-button-CgNICB5x.js","assets/use-delete-connection-Bj5gBc4Q.js","assets/use-list-state-BjQoZx3U.js","assets/use-view-mode-BZEJDQ3u.js","assets/connection-detail-C-murm81.js","assets/index-FD-g03rr.js","assets/index-CjRdG1Vp.js","assets/index-tiUiHjMI.js","assets/use-members-BJMZeTol.js","assets/layout-BU5OyVXS.js","assets/monitoring-stats-row-DRhzCagY.js","assets/collection-detail-DhZtELgd.js","assets/index-CpMJ05u5.js","assets/monaco-editor-BnguFt9B.js","assets/empty-state-QyaCdfZt.js","assets/index-B6nAXVWE.js","assets/table-DmvqYMYA.js","assets/general-BXFZtoDZ.js","assets/features-DpwKJvfV.js","assets/brand-context-CW58R34a.js","assets/ai-providers-DNv3Q1EX.js","assets/members-CEd1LJk0.js","assets/collection-table-wrapper-rCxyye9m.js","assets/sso-GNLrvSnU.js","assets/profile-725q4zwE.js","assets/store-Bv7PRV1N.js","assets/workflow-3PvqRa7g.js","assets/workflow-detail-BLyd9EdB.js","assets/org-plugin-layout-nQpaPqCP.js","assets/plugin-layout-csD4Blom.js","assets/agents-list-c4HvLnHM.js","assets/automations-C_zdEQX8.js","assets/dynamic-plugin-layout-B3frXkTC.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function j$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const U$="modulepreload",z$=function(e){return"/"+e},W2={},Lt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=z$(f),f in W2)return;W2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":U$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Yae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},Fu={};var Q2;function F$(){if(Q2)return Fu;Q2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Fu.Fragment=t,Fu.jsx=n,Fu.jsxs=n,Fu}var X2;function V$(){return X2||(X2=1,__.exports=F$()),__.exports}var T=V$(),y_={exports:{}},Vu={},b_={exports:{}},w_={};var J2;function B$(){return J2||(J2=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,B=q[K],D=K+1,z=q[D];if(0>i(B,ee))D<Q&&0>i(z,B)?(q[ae]=z,q[D]=ee,ae=D):(q[ae]=B,q[K]=ee,ae=K);else if(D<Q&&0>i(z,ee))q[ae]=z,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,V());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?V():A=!1}}}var V;if(typeof R=="function")V=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,V=function(){Z.postMessage(null)}}else V=function(){S(j,0)};function re(q,W){M=S(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,V()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(w_)),w_}var eO;function q$(){return eO||(eO=1,b_.exports=B$()),b_.exports}var S_={exports:{}},rt={};var tO;function H$(){if(tO)return rt;tO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,B){var D=B.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:B}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function V(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(B){return K[B]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,B,D,z){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,B,D,z)}}if(fe)return z=z(k),fe=D===""?"."+Z(k,0):D,O(z)?(B="",fe!=null&&(B=fe.replace(U,"$&/")+"/"),q(z,K,B,"",function(Ue){return Ue})):z!=null&&(j(z)&&(z=H(z,B+(z.key==null||k&&k.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+fe)),K.push(z)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,B,X,z);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,B,X,z);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,B,D,z);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,B){if(k==null)return k;var D=[],z=0;return q(k,D,"","",function(X){return K.call(B,X,z++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(B){(k._status===0||k._status===-1)&&(k._status=1,k._result=B)},function(B){(k._status===0||k._status===-1)&&(k._status=2,k._result=B)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,B){W(k,function(){K.apply(this,arguments)},B)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,B){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),z=k.key;if(K!=null)for(X in K.key!==void 0&&(z=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=B;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,z,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,B){var D,z={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(z[D]=K[D]);var fe=arguments.length-2;if(fe===1)z.children=B;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];z.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)z[D]===void 0&&(z[D]=fe[D]);return L(k,X,z)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,B={};M.T=B;try{var D=k(),z=M.S;z!==null&&z(B,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&B.types!==null&&(K.types=B.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,B){return M.H.useActionState(k,K,B)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,B){return M.H.useImperativeHandle(k,K,B)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,B){return M.H.useReducer(k,K,B)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,B){return M.H.useSyncExternalStore(k,K,B)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var nO;function ca(){return nO||(nO=1,S_.exports=H$()),S_.exports}var E_={exports:{}},yr={};var rO;function G$(){if(rO)return yr;rO=1;var e=ca();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},yr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var iO;function CM(){if(iO)return E_.exports;iO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),E_.exports=G$(),E_.exports}var oO;function K$(){if(oO)return Vu;oO=1;var e=q$(),t=ca(),n=CM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function V(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function B(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),z=k(null),X=k(null),fe=k(null);function pe(o,a){switch(B(X,a),B(z,o),B(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?y2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=y2(a),o=b2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),B(D,o)}function xe(){K(D),K(z),K(X)}function Ue(o){o.memoizedState!==null&&B(fe,o);var a=D.current,u=b2(a,o.type);a!==u&&(B(z,o),B(D,u))}function Y(o){z.current===o&&(K(D),K(z)),fe.current===o&&(K(fe),$u._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-DF-027xA.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-C9Il8L-B.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-kx3MQEcu.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-DZzWPbSN.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-C2AFIXKV.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-BB1bfQ0C.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-Cx11JY4J.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-DAhaxub0.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-CRDp-7ts.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-DWgxefUR.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-FCEJcMKv.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,5,8,13,55,56,57,58,59,16,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-UJNERdUa.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,47,48,97,74,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-CcMp0k3e.js"),__vite__mapDeps([105,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,83,76,75,77,73,10,11,12,78,79,80,66,55,95,107,69,87,108,109,63,6,56,59,16,3,50,85,22,86]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-DNT7n-qD.js"),__vite__mapDeps([110,81,82,95,86,3,43,45,111,11,92,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,48,73,10,112,113,80,77,12,50,89,94,22,93,91,98,84,54,114,68,58,55,59,16,107,69,115,116,75,57,66,60]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-BcTctJfQ.js"),__vite__mapDeps([117,95,10,11,59,16,3,85,115,38,39,7,118,112,82,113,22,119,49,50,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,48,84,99,73,92,6,60,55,96,120,25,54,111,80,81,77,12,89,94,93,91,75,98,53,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-BFKRaI9q.js"),__vite__mapDeps([121,102,30,38,39,7,95,84,94,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,48,119,49,50,114,73,10,11,22,3,63,88,79,89,85,83,67,16,55,68,66,116,113,92,75,122,87,78,26,51,52,6,53,54,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-aaZSKs7j.js"),__vite__mapDeps([123,38,39,7,66,3,16,46,71,11,67])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-BTMuaR90.js"),__vite__mapDeps([124,38,39,7,12,11,67,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-D7GISA6v.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,48,3,85,38,39,71])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-BkPyz71b.js"),__vite__mapDeps([126,62,63,1,3,6,7,56,39,50,35,64,29,30,44,23,11,21,22,10,24,25,9,12,65,48,28,18,45,38,66,67,61,68,47,69,70,52,71])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-BucBnRu5.js"),__vite__mapDeps([127,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,128,122,65,55,87,63,88,79,89,11,57,114,73,10,23,68,69,6,3,67,95,59,16,50,85,66,94])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-BmmBRsro.js"),__vite__mapDeps([129,38,39,7,3,16,67,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-BAAvq5PA.js"),__vite__mapDeps([130,38,39,7,68,47,66,67,50,1,35,61,3,16,41,42,74,96])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-Dq5sv0Ed.js"),__vite__mapDeps([131,28,34,43,45,66,3,67,64,68,47,94,73,10,11,38,39,7,77,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-BO9_rH5u.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-BfCS4xd0.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-C2B3R0BC.js"),__vite__mapDeps([132,11,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,57,66,55,128,122,120,100,68,95,108,109,75,69,10,73,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-EmQ0YEuI.js"),__vite__mapDeps([133,118,112,11,82,113,22,10,119,49,50,39,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,48,84,99,115,73,92,6,60,55,96,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-B0IS-vI9.js"),__vite__mapDeps([134,135,73,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-EtMSypXC.js"),__vite__mapDeps([136,60,1,34,32,17,90,11,91,22,10,6,7,30,57,56,39,55,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,48,73,92,63,80,81,82,66,70,52,95,93,69,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-Dp2hsJvG.js"),__vite__mapDeps([137,43,48,102,30,38,39,7,95,101,69,60,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,47,22,10,11,91])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-DI-gMMKE.js"),__vite__mapDeps([138,135,73,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,It as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,ele as aA,Kle as aB,JH as aC,wt as aD,DD as aE,Lt as aF,kJ as aG,Uae as aH,Wae as aI,jt as aJ,Xt as aK,Ie as aL,QH as aM,Gle as aN,Hle as aO,qS as aP,vg as aQ,NY as aR,S3 as aS,W4 as aT,af as aU,ta as aV,PY as aW,ds as aX,v4 as aY,$w as aZ,Wr as a_,tle as aa,xo as ab,XJ as ac,ht as ad,ne as ae,no as af,aW as ag,lW as ah,yn as ai,lt as aj,cW as ak,uW as al,hW as am,_W as an,C3 as ao,dl as ap,dW as aq,fW as ar,pW as as,mW as at,gW as au,vW as av,yW as aw,wW as ax,SW as ay,dw as az,Mg as b,XK as b$,Ye as b0,EB as b1,zP as b2,hw as b3,Ek as b4,Rk as b5,KW as b6,Wn as b7,yQ as b8,c3 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,Y4 as ba,eae as bb,la as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-D_Oa6gN8.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-D4pz75Eg.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-mUATXvn9.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-D92BxTuZ.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-8f9iLpUP.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-BeAxhA0O.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-BNMpbB2T.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-CBHcQlP6.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-DXyWyIV-.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-DJZ7Z_p1.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-D2u00J0R.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,5,8,13,55,56,57,58,59,16,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-DaVsMStD.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,47,48,97,74,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-BUYyasfH.js"),__vite__mapDeps([105,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,83,76,75,77,73,10,11,12,78,79,80,66,55,95,107,69,87,108,109,63,6,56,59,16,3,50,85,22,86]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-C-murm81.js"),__vite__mapDeps([110,81,82,95,86,3,43,45,111,11,92,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,48,73,10,112,113,80,77,12,50,89,94,22,93,91,98,84,54,114,68,58,55,59,16,107,69,115,116,75,57,66,60]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-DhZtELgd.js"),__vite__mapDeps([117,95,10,11,59,16,3,85,115,38,39,7,118,112,82,113,22,119,49,50,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,48,84,99,73,92,6,60,55,96,120,25,54,111,80,81,77,12,89,94,93,91,75,98,53,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-B6nAXVWE.js"),__vite__mapDeps([121,102,30,38,39,7,95,84,94,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,48,119,49,50,114,73,10,11,22,3,63,88,79,89,85,83,67,16,55,68,66,116,113,92,75,122,87,78,26,51,52,6,53,54,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-BXFZtoDZ.js"),__vite__mapDeps([123,38,39,7,66,3,16,46,71,11,67])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-DpwKJvfV.js"),__vite__mapDeps([124,38,39,7,12,11,67,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-CW58R34a.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,48,3,85,38,39,71])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-DNv3Q1EX.js"),__vite__mapDeps([126,62,63,1,3,6,7,56,39,50,35,64,29,30,44,23,11,21,22,10,24,25,9,12,65,48,28,18,45,38,66,67,61,68,47,69,70,52,71])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-CEd1LJk0.js"),__vite__mapDeps([127,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,128,122,65,55,87,63,88,79,89,11,57,114,73,10,23,68,69,6,3,67,95,59,16,50,85,66,94])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-GNLrvSnU.js"),__vite__mapDeps([129,38,39,7,3,16,67,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-725q4zwE.js"),__vite__mapDeps([130,38,39,7,68,47,66,67,50,1,35,61,3,16,41,42,74,96])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-Bv7PRV1N.js"),__vite__mapDeps([131,28,34,43,45,66,3,67,64,68,47,94,73,10,11,38,39,7,77,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-DiyPXzzy.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-IxsRTF9k.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-3PvqRa7g.js"),__vite__mapDeps([132,11,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,57,66,55,128,122,120,100,68,95,108,109,75,69,10,73,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-BLyd9EdB.js"),__vite__mapDeps([133,118,112,11,82,113,22,10,119,49,50,39,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,48,84,99,115,73,92,6,60,55,96,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-nQpaPqCP.js"),__vite__mapDeps([134,135,73,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-c4HvLnHM.js"),__vite__mapDeps([136,60,1,34,32,17,90,11,91,22,10,6,7,30,57,56,39,55,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,48,73,92,63,80,81,82,66,70,52,95,93,69,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-C_zdEQX8.js"),__vite__mapDeps([137,43,48,102,30,38,39,7,95,101,69,60,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,47,22,10,11,91])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-B3frXkTC.js"),__vite__mapDeps([138,135,73,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,It as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,ele as aA,Kle as aB,JH as aC,wt as aD,DD as aE,Lt as aF,kJ as aG,Uae as aH,Wae as aI,jt as aJ,Xt as aK,Ie as aL,QH as aM,Gle as aN,Hle as aO,qS as aP,vg as aQ,NY as aR,S3 as aS,W4 as aT,af as aU,ta as aV,PY as aW,ds as aX,v4 as aY,$w as aZ,Wr as a_,tle as aa,xo as ab,XJ as ac,ht as ad,ne as ae,no as af,aW as ag,lW as ah,yn as ai,lt as aj,cW as ak,uW as al,hW as am,_W as an,C3 as ao,dl as ap,dW as aq,fW as ar,pW as as,mW as at,gW as au,vW as av,yW as aw,wW as ax,SW as ay,dw as az,Mg as b,XK as b$,Ye as b0,EB as b1,zP as b2,hw as b3,Ek as b4,Rk as b5,KW as b6,Wn as b7,yQ as b8,c3 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,Y4 as ba,eae as bb,la as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-C27Pbex0.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{co as Fe,bm as Os,y as oe,aD as ge,a$ as ti,bR as _i,aL as Ie,bk as mt,b0 as qe,_ as mr,cp as rn,v as _e,cq as Ii,cr as ws,cs as ec,bP as tc,ct as ia,cu as nc,cv as rc,cw as ic,cx as fn,cy as Tr,cz as xs,bK as sa,bC as sc,aK as ze,bQ as oc,aJ as On,bc as Ci,cA as ac,r as N,j as w,cB as oa,cC as lc}from"./index-DkLXfxeF.js";import{e as cc,f as uc,n as fc,h as dc,C as hc,A as pc}from"./constants-DfNucTio.js";import{B as Ti,c as Pi}from"./collections-DRefuj7X.js";import{R as Es}from"./index-C7LpArfe.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
1
|
+
import{co as Fe,bm as Os,y as oe,aD as ge,a$ as ti,bR as _i,aL as Ie,bk as mt,b0 as qe,_ as mr,cp as rn,v as _e,cq as Ii,cr as ws,cs as ec,bP as tc,ct as ia,cu as nc,cv as rc,cw as ic,cx as fn,cy as Tr,cz as xs,bK as sa,bC as sc,aK as ze,bQ as oc,aJ as On,bc as Ci,cA as ac,r as N,j as w,cB as oa,cC as lc}from"./index-C27Pbex0.js";import{e as cc,f as uc,n as fc,h as dc,C as hc,A as pc}from"./constants-Cz3vSCG9.js";import{B as Ti,c as Pi}from"./collections-C5k4gitm.js";import{R as Es}from"./index-tiUiHjMI.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
2
2
|
The stepInput is the resolved value of the references in the input field. Example:
|
|
3
3
|
{
|
|
4
4
|
"input": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ci as ne,e as _,j as o,B as te,l as ln,ae as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,ai as hs,aj as fe,aX as an,c5 as gs,aU as bs,c3 as js,c6 as dn,b7 as Ss,cc as ys,cd as vs,ap as ws,ce as Ns,ck as $t,cl as un,z as ks,D as _s,cm as Cs,cn as Is}from"./index-
|
|
1
|
+
import{ci as ne,e as _,j as o,B as te,l as ln,ae as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,ai as hs,aj as fe,aX as an,c5 as gs,aU as bs,c3 as js,c6 as dn,b7 as Ss,cc as ys,cd as vs,ap as ws,ce as Ns,ck as $t,cl as un,z as ks,D as _s,cm as Cs,cn as Is}from"./index-C27Pbex0.js";import{D as Ts,F as Es,B as $s}from"./index-CjRdG1Vp.js";import{b as Fe,i as Os,u as ae}from"./constants-Cz3vSCG9.js";import{u as fn}from"./use-virtual-mcp-kjgk684A.js";import{M as Re}from"./monaco-editor-BnguFt9B.js";import{S as Rs,A as Ms,c as Ls,a as Ps,b as As,e as zs,R as Ut,d as Ws}from"./accordion-CBx4kF0A.js";import{B as le}from"./badge-D2Q0fk8p.js";import{S as vt,a as wt,b as nt,d as Nt,c as kt}from"./select-ByGBjkSM.js";import{N as Ds,j as Fs,k as Hs,m as Be,P as Vs,i as Us,R as qs,c as Ks,l as Bs,f as qt,d as Xs,S as st,n as Js,e as Gs}from"./scroll-area-BjkPDLjB.js";import{V as Qs}from"./view-mode-toggle-KKeD1zNQ.js";import{af as Ys,ag as Zs,j as eo,ah as mn,ai as to,d as no,L as so,aj as pn,s as Ot,a0 as oo,Y as xn,ak as ro,al as io,W as bt,am as lo}from"./agent-icon-uOxmWZzX.js";import{i as hn}from"./Play-DtJ0cxBf.js";import{b as co,a as ao,V as Qe}from"./layout-BU5OyVXS.js";import{T as gn,c as bn,a as jn,b as Sn}from"./use-mobile-49sQdb0b.js";import{u as uo,b as fo}from"./use-connection-labJovV0.js";import{u as Rt,d as Mt,b as yn}from"./use-mcp-tools-C0TDyIdf.js";import{a as mo,D as po,e as xo,b as ho,c as go,d as bo}from"./dialog-BEtDzaNY.js";import"./index-tiUiHjMI.js";import{c as vn,d as wn,e as Nn,D as Ye}from"./dropdown-menu-CPrJeiSb.js";import{s as jo}from"./Plus-IUiAby9e.js";import{b as kn}from"./Tool01-1Tm6sx2D.js";import{i as He}from"./ChevronDown-xWqM1qJV.js";import{I as Lt}from"./integration-icon-gIhUX9GC.js";import"./index-C6iu8syV.js";import{i as _n}from"./X-BXQFKahF.js";import{u as Cn,a as So}from"./use-collections-C9mDhhDp.js";import{E as In}from"./empty-state-QyaCdfZt.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-BMDCCsVs.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,d=c===void 0?"Undo":c;if(!i)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ys,{size:14}),e[0]=u):u=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==d?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":d,children:[u,d]}),e[1]=r,e[2]=s,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Zs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(w=>[!0,w]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[w,N]=y;if(p=r.merge(N,(j=s())!=null?j:x),n(p,!0),w)return f()}).then(()=>{S===c&&(v?.(s(),void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{S===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
2
2
|
${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
|
|
3
3
|
`:""} ${d}${f}: ${n(u)};`}).join(`
|
|
4
4
|
`)}
|