decocms 2.306.13 → 2.306.14
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-UghQPlAa.js → AlertCircle-VdAWApZT.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-1BfkUm85.js → ArrowNarrowLeft-Cb6jcK-n.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-1rqShrTM.js → ArrowUpRight-B2ZjjZJQ.js} +1 -1
- package/dist/client/assets/{Check-DBWnyOFJ.js → Check-BiM2-TvW.js} +1 -1
- package/dist/client/assets/{CheckCircle-CBMgXE-F.js → CheckCircle-Ch05HHgc.js} +1 -1
- package/dist/client/assets/{ChevronDown-D452dgSU.js → ChevronDown-v_6fVP4M.js} +1 -1
- package/dist/client/assets/{ChevronRight-DoY3rcf9.js → ChevronRight-Dzob6m1m.js} +1 -1
- package/dist/client/assets/{ChevronUp-BlZFoG59.js → ChevronUp-CUfrmF0I.js} +1 -1
- package/dist/client/assets/{Container-BQVUd9tN.js → Container-D0YzBjXF.js} +1 -1
- package/dist/client/assets/{DotsVertical-CAgAGLKz.js → DotsVertical-D--w_iaX.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CGcDVdEi.js → LinkExternal01-QD8wgK8o.js} +1 -1
- package/dist/client/assets/{Lock01-FiMk9Cv6.js → Lock01-DJV5JMDy.js} +1 -1
- package/dist/client/assets/{Palette-DXyBGBQu.js → Palette-CEmO1kUS.js} +1 -1
- package/dist/client/assets/{Play-CDjH79to.js → Play-CRDhnWxZ.js} +1 -1
- package/dist/client/assets/{Plus-FC_C8qkl.js → Plus-DDMryLp9.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Cd8Km121.js → RefreshCcw01-BNG_5rJW.js} +1 -1
- package/dist/client/assets/{SearchMd-B780aQOS.js → SearchMd-BL69FKVv.js} +1 -1
- package/dist/client/assets/{Settings02--XuHa5eI.js → Settings02-CHdnS1Le.js} +1 -1
- package/dist/client/assets/{Shield01-Bg1T1EGa.js → Shield01-CDWmokZC.js} +1 -1
- package/dist/client/assets/{Star01-DRidtrYn.js → Star01-C0QV--XQ.js} +1 -1
- package/dist/client/assets/{Sun-Bpli4t2N.js → Sun-B4qv1AhA.js} +1 -1
- package/dist/client/assets/{Tool01-NWIcFn9q.js → Tool01-DZ5nMk2X.js} +1 -1
- package/dist/client/assets/{Trash01-4w6_aW9X.js → Trash01-EHajsAd0.js} +1 -1
- package/dist/client/assets/{User01-CxpWRrdM.js → User01-DMVSPQ8_.js} +1 -1
- package/dist/client/assets/{Users03-CK1Aa1HI.js → Users03-Bpy5JElG.js} +1 -1
- package/dist/client/assets/{X-BGh8G2l7.js → X-BdF-Ta2X.js} +1 -1
- package/dist/client/assets/{XCircle-CYGTZyzW.js → XCircle-Mzs74oa5.js} +1 -1
- package/dist/client/assets/{XClose-Dz5yGfpm.js → XClose-BKDvrGgg.js} +1 -1
- package/dist/client/assets/{Zap-Druw6RpX.js → Zap-B1XrF636.js} +1 -1
- package/dist/client/assets/{ZapSquare-BLhBRchY.js → ZapSquare-CM6EGSyy.js} +1 -1
- package/dist/client/assets/{accordion-DdQd4o33.js → accordion-BG6WV2yf.js} +1 -1
- package/dist/client/assets/{agent-icon-CznXZlOI.js → agent-icon-CkZZqRPj.js} +1 -1
- package/dist/client/assets/{agents-list-CaQhK_9Q.js → agents-list-Gt0A9Rtw.js} +1 -1
- package/dist/client/assets/ai-providers-vZDvpB2X.js +1 -0
- package/dist/client/assets/{alert-dialog-BiN56dOX.js → alert-dialog-BiImvuLv.js} +1 -1
- package/dist/client/assets/{auth-catchall-6Av77aQi.js → auth-catchall-CI5uzK_0.js} +1 -1
- package/dist/client/assets/{automation-list-row-DdlSuO-v.js → automation-list-row-DgBTeHKk.js} +1 -1
- package/dist/client/assets/{automations-BMuo3AXx.js → automations-1RQ_Ya9s.js} +1 -1
- package/dist/client/assets/{avatar-Z1wN1pq-.js → avatar-q80j4hVX.js} +1 -1
- package/dist/client/assets/{badge-CTmf2TW8.js → badge-C8h2D-cf.js} +1 -1
- package/dist/client/assets/{brand-context-CUDRGuTh.js → brand-context--QAUCooh.js} +1 -1
- package/dist/client/assets/{card-Bd8klEwI.js → card-Dv-Qnw_l.js} +1 -1
- package/dist/client/assets/{chat-context-DGU47jw7.js → chat-context-Cs8XiFv-.js} +1 -1
- package/dist/client/assets/{checkbox-B3EwrxkO.js → checkbox-cUUI4UbZ.js} +1 -1
- package/dist/client/assets/{collection-detail-Cgmw3RVY.js → collection-detail-DdBUKeCk.js} +1 -1
- package/dist/client/assets/{collection-display-button-DMmbKfya.js → collection-display-button-CTTtVxZI.js} +1 -1
- package/dist/client/assets/{collection-search-D-x3SJ1z.js → collection-search-BEV6zp35.js} +1 -1
- package/dist/client/assets/{collection-search-Do2r8Bif.js → collection-search-CSWcPc5L.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CtvRahI-.js → collection-table-wrapper-DQYbUgU8.js} +1 -1
- package/dist/client/assets/{collection-tabs-BKqleLTU.js → collection-tabs-CfplzF48.js} +1 -1
- package/dist/client/assets/{collections-67ZnQ_LS.js → collections-ohRmFoyb.js} +1 -1
- package/dist/client/assets/{command-BAMG06m5.js → command-DDwhSRvD.js} +1 -1
- package/dist/client/assets/{connection-card-DQm8aezN.js → connection-card-D5kgRWc3.js} +1 -1
- package/dist/client/assets/{connection-detail-BhxCMY6j.js → connection-detail-Bn-xI-SY.js} +1 -1
- package/dist/client/assets/{connection-form-helpers--6zqXj9i.js → connection-form-helpers-Bi1lg2fC.js} +1 -1
- package/dist/client/assets/{connections-C0gQbHBs.js → connections-0dR0fYEw.js} +1 -1
- package/dist/client/assets/{constants-BDk5hb7z.js → constants-B0iAJAyD.js} +1 -1
- package/dist/client/assets/{constants-DXQgV2hu.js → constants-BGb3csMB.js} +1 -1
- package/dist/client/assets/{dialog-DUgfuVrb.js → dialog-B9k-J44Q.js} +1 -1
- package/dist/client/assets/{domain-settings-DpONcUPd.js → domain-settings-BDwmEILK.js} +1 -1
- package/dist/client/assets/{drawer-DeyjQQc7.js → drawer-C2prDcqZ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Cbx_bdO_.js → dropdown-menu-DCt7nnpF.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-D7HG8B_t.js → dynamic-plugin-layout-DMU6tYwj.js} +1 -1
- package/dist/client/assets/{empty-state-BIAZXmQO.js → empty-state-DMA3XSg2.js} +1 -1
- package/dist/client/assets/{empty-state-BnjbbhBR.js → empty-state-DkUQz5Y_.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dgw7Sgd3.js → extract-connection-data-Du0Nr7p1.js} +1 -1
- package/dist/client/assets/{features-De6GvAAs.js → features-DS7y3VlZ.js} +1 -1
- package/dist/client/assets/{form-O0xus6j8.js → form-kltPHESZ.js} +1 -1
- package/dist/client/assets/{general-tEcdYerZ.js → general-DdyLkb4p.js} +1 -1
- package/dist/client/assets/{index-CdFJkiAN.js → index-B5mfsg_s.js} +1 -1
- package/dist/client/assets/{index-DdsW868M.js → index-BCJLKe3B.js} +1 -1
- package/dist/client/assets/{index-DJiWK6lj.js → index-BFJo4vrg.js} +1 -1
- package/dist/client/assets/{index-CZLTTN-z.js → index-BKV2fRzm.js} +1 -1
- package/dist/client/assets/{index-CuVn0uMY.js → index-BPz6vLPS.js} +1 -1
- package/dist/client/assets/{index-XGdWuQyL.js → index-BikT2EMs.js} +1 -1
- package/dist/client/assets/{index-Dcg8Qevd.js → index-CHrUmZgp.js} +2 -2
- package/dist/client/assets/{index-DZjKh5eS.js → index-CPTlnotN.js} +3 -3
- package/dist/client/assets/{index-DV-VioVg.js → index-Che5DeTo.js} +1 -1
- package/dist/client/assets/{index-CG3ceZHc.js → index-CxB2xnH4.js} +1 -1
- package/dist/client/assets/{index-i68m5nvc.js → index-D9ZWPEnV.js} +1 -1
- package/dist/client/assets/{index-DPM8__xA.js → index-DB0YdXxd.js} +1 -1
- package/dist/client/assets/index-DKSxK_Wl.js +1 -0
- package/dist/client/assets/{index-CqFBXkjQ.js → index-DV65bUQf.js} +1 -1
- package/dist/client/assets/{index-DtUGvIts.js → index-Dq__xIAQ.js} +1 -1
- package/dist/client/assets/{index-EV8zcDnc.js → index-jJk33FDJ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D9yYekai.js → infiniteQueryObserver-BondwvTH.js} +1 -1
- package/dist/client/assets/{input-Cvo2jJQf.js → input-Do0Zx2-t.js} +1 -1
- package/dist/client/assets/{integration-icon-DTJ2wb4X.js → integration-icon-BU0UtHw1.js} +1 -1
- package/dist/client/assets/{label-_jNQo8Ll.js → label-xFeGPJPK.js} +1 -1
- package/dist/client/assets/{layout-DbwGS2qx.js → layout-Bh0Tzv5J.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-tP8fRQib.js → lean-canvas-recruit-modal-Bi0R10xw.js} +1 -1
- package/dist/client/assets/{login-DehPjhCM.js → login-DFLXeUmR.js} +1 -1
- package/dist/client/assets/{members-BMPf1BpS.js → members-DMjA2IwS.js} +1 -1
- package/dist/client/assets/{monaco-editor-BVARKKWN.js → monaco-editor-BZYPmAIH.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D7tWgW-Q.js → monitoring-stats-row-B44nIKev.js} +1 -1
- package/dist/client/assets/{oauth-callback-l4PY6t1A.js → oauth-callback-CoQK7QX3.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DC-UED8v.js → oauth-callback-ai-provider-DWII6eI4.js} +1 -1
- package/dist/client/assets/{onboarding-Bd6pQbk3.js → onboarding-D-GymYEI.js} +1 -1
- package/dist/client/assets/{org-layout-COoj2PVG.js → org-layout-B4d_ZkIu.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DGnpwRtk.js → org-plugin-layout-PFHlgq8g.js} +1 -1
- package/dist/client/assets/{pair-_253DGSq.js → pair-BVw6SD1z.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CakFVZ2i.js → plugin-empty-state-9i7dQecv.js} +1 -1
- package/dist/client/assets/{plugin-header-6TMFE3Ls.js → plugin-header-Yv_MlSUJ.js} +1 -1
- package/dist/client/assets/{plugin-layout-3m9okTPI.js → plugin-layout-CmfsA57I.js} +1 -1
- package/dist/client/assets/{popover-DNu8C4Ll.js → popover-C6TGJ7tP.js} +1 -1
- package/dist/client/assets/{profile-CLBWN3L8.js → profile-B5Uqg-1n.js} +1 -1
- package/dist/client/assets/{project-app-view-5ZnU4fo7.js → project-app-view-Cym9YWZI.js} +1 -1
- package/dist/client/assets/registry-D_eMoOoM.js +2 -0
- package/dist/client/assets/{registry-layout-Hazgpecz.js → registry-layout-DN05Co_7.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cg8CZTlk.js → required-auth-layout-BgC3m76H.js} +1 -1
- package/dist/client/assets/{reset-password-CzwUFBho.js → reset-password-DIKcKBJA.js} +1 -1
- package/dist/client/assets/{roles-DUtgWupV.js → roles-YwWd0IU_.js} +1 -1
- package/dist/client/assets/{scroll-area-DGEAK3pH.js → scroll-area-Dm9XewPU.js} +1 -1
- package/dist/client/assets/{search-input-C50ImRzg.js → search-input-B6ULbBJE.js} +1 -1
- package/dist/client/assets/{select-DkBE5ypj.js → select-CQme0ALA.js} +1 -1
- package/dist/client/assets/{select-model-B9xghDV8.js → select-model-DXawshPk.js} +1 -1
- package/dist/client/assets/{settings-layout-u6gOtHmU.js → settings-layout-B6BcNt_F.js} +1 -1
- package/dist/client/assets/{settings-section-DeAx6MsQ.js → settings-section-CX6DrRQc.js} +1 -1
- package/dist/client/assets/{shell-layout-xLg1cKrj.js → shell-layout-BYMnLoch.js} +1 -1
- package/dist/client/assets/{skeleton-BL7idETO.js → skeleton-CcWsdROd.js} +1 -1
- package/dist/client/assets/{sso-UHrPOY4-.js → sso-Bn24EPSu.js} +1 -1
- package/dist/client/assets/{store-CCrp-zDu.js → store-CnYcJcjA.js} +1 -1
- package/dist/client/assets/store-registry-avYOji8Y.js +2 -0
- package/dist/client/assets/{switch-Ba2DX0J8.js → switch-iFtU_Uj0.js} +1 -1
- package/dist/client/assets/{table-Dpjp6sno.js → table-CrLtxirL.js} +1 -1
- package/dist/client/assets/{tabs-CUXWIghp.js → tabs-CLXQLaZb.js} +1 -1
- package/dist/client/assets/{task-status-D6HaLDfU.js → task-status-CAq0fkQN.js} +1 -1
- package/dist/client/assets/{textarea-e7WVG0Uq.js → textarea-Biq9f3vB.js} +1 -1
- package/dist/client/assets/{toggle-group-Bzjy8IQq.js → toggle-group-Dj5MlNbV.js} +1 -1
- package/dist/client/assets/{tools-list-ddVo-6Vs.js → tools-list-CEc7i5TR.js} +1 -1
- package/dist/client/assets/{tooltip-sn7TXXXA.js → tooltip-oz4PgHaK.js} +1 -1
- package/dist/client/assets/{types-ClFDwb3j.js → types-0ZrdjKIw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D1ZzNZfi.js → use-ai-providers-BfAEQYsq.js} +1 -1
- package/dist/client/assets/{use-collections-DDocavcC.js → use-collections-wkyc_t0D.js} +1 -1
- package/dist/client/assets/{use-connection-wzOJDB7e.js → use-connection-BUWHubVp.js} +1 -1
- package/dist/client/assets/{use-copy-D0VCYdzD.js → use-copy-B_R6LHdW.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BQ9UAVGc.js → use-create-virtual-mcp-BZc2oenO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-vxXjJ2-V.js → use-debounced-autosave-Xsez6aVB.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CQn9-0iO.js → use-decopilot-events-Dr4V34eZ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C1mV-M2x.js → use-delete-connection-BLaFqj11.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CyUixfAd.js → use-infinite-scroll-B6tdlom4.js} +1 -1
- package/dist/client/assets/{use-list-state-BkqBgDIi.js → use-list-state-CJyagGju.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cu2GPPjO.js → use-mcp-tools-bTkNBvHW.js} +1 -1
- package/dist/client/assets/{use-members-Bw_9meIY.js → use-members-DzIKSYZr.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BvnJAyr6.js → use-navigate-to-agent-DC4juKfS.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-uXh4lV5h.js → use-org-auth-client-C9dbWRTq.js} +1 -1
- package/dist/client/assets/{use-org-sso-Co0XjU-j.js → use-org-sso-Oco51-Ud.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CXi0dKrO.js → use-organization-roles-CKRT39Yc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-OER3kM7D.js → use-organization-settings-B78MMPj6.js} +1 -1
- package/dist/client/assets/{use-registry-connections-LYUFCGgQ.js → use-registry-connections-BfK6vb9O.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CQVr-jwf.js → use-status-sounds-CD6ccTBR.js} +1 -1
- package/dist/client/assets/{use-tasks-B8ZzLgVK.js → use-tasks-LY5kqeAJ.js} +1 -1
- package/dist/client/assets/{use-view-mode-ti5AMLDX.js → use-view-mode-Bp7xTow9.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Cvy2Xx_N.js → use-virtual-mcp-BBYFAnp2.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-7WbFFwUo.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-aIoxf3FE.js +1 -0
- package/dist/client/assets/{user-Dst4Prvf.js → user-40IaywxT.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Ca3EQ8LL.js → view-mode-toggle-b04RsQAD.js} +1 -1
- package/dist/client/assets/{workflow-BUQXpyzH.js → workflow-BzGWQKQG.js} +1 -1
- package/dist/client/assets/workflow-detail-DpYh98qm.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +12 -1
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +11 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-C_QaV2LV.js +0 -1
- package/dist/client/assets/index-BZ6nkz4a.js +0 -1
- package/dist/client/assets/registry-D_jmaKr2.js +0 -2
- package/dist/client/assets/store-registry-dlSCWL84.js +0 -2
- package/dist/client/assets/useInfiniteQuery-eCacXMD5.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Ck-t1SMi.js +0 -1
- package/dist/client/assets/workflow-detail-DLo-hD09.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/license +0 -9
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-Dcg8Qevd.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-DXQgV2hu.js";import{B as Ti,c as Pi}from"./collections-67ZnQ_LS.js";import{R as Es}from"./index-CqFBXkjQ.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{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-CHrUmZgp.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-BGb3csMB.js";import{B as Ti,c as Pi}from"./collections-ohRmFoyb.js";import{R as Es}from"./index-DV65bUQf.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 +1 @@
|
|
|
1
|
-
import{P as z,a as G,D as H,o as J,p as Q}from"./index-
|
|
1
|
+
import{P as z,a as G,D as H,o as J,p as Q}from"./index-BKV2fRzm.js";function V(x){var l;const{char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:v}=x,B=b&&!P,y=Q(D),K=new RegExp(`\\s${y}$`),h=F?"^":"",M=P?"":y,N=B?new RegExp(`${h}${y}.*?(?=\\s${M}|$)`,"gm"):new RegExp(`${h}(?:^)?${y}[^\\s${M}]*`,"gm"),q=((l=v.nodeBefore)==null?void 0:l.isText)&&v.nodeBefore.text;if(!q)return null;const O=v.pos-q.length,u=Array.from(q.matchAll(N)).pop();if(!u||u.input===void 0||u.index===void 0)return null;const d=u.input.slice(Math.max(0,u.index-1),u.index),e=new RegExp(`^[${E?.join("")}\0]?$`).test(d);if(E!==null&&!e)return null;const I=O+u.index;let p=I+u[0].length;return B&&K.test(q.slice(p-1,p+1))&&(u[0]+=" ",p+=1),I<v.pos&&p>=v.pos?{range:{from:I,to:p},query:u[0].slice(D.length),text:u[0]}:null}var W=new z("suggestion");function Y({pluginKey:x=W,editor:l,char:D="@",allowSpaces:b=!1,allowToIncludeChar:P=!1,allowedPrefixes:E=[" "],startOfLine:F=!1,decorationTag:v="span",decorationClass:B="suggestion",decorationContent:y="",decorationEmptyClass:K="is-empty",command:h=()=>null,items:M=()=>[],render:N=()=>({}),allow:q=()=>!0,findSuggestionMatch:O=V,shouldShow:u}){let d;const e=N?.(),I=()=>{const n=l.state.selection.$anchor.pos,a=l.view.coordsAtPos(n),{top:r,right:s,bottom:o,left:c}=a;try{return new DOMRect(c,r,s-c,o-r)}catch{return null}},p=(n,a)=>a?()=>{const r=x.getState(l.state),s=r?.decorationId,o=n.dom.querySelector(`[data-decoration-id="${s}"]`);return o?.getBoundingClientRect()||null}:I;function U(n,a){var r;try{const o=x.getState(n.state),c=o?.decorationId?n.dom.querySelector(`[data-decoration-id="${o.decorationId}"]`):null,g={editor:l,range:o?.range||{from:0,to:0},query:o?.query||null,text:o?.text||null,items:[],command:m=>h({editor:l,range:o?.range||{from:0,to:0},props:m}),decorationNode:c,clientRect:p(n,c)};(r=e?.onExit)==null||r.call(e,g)}catch{}const s=n.state.tr.setMeta(a,{exit:!0});n.dispatch(s)}const C=new G({key:x,view(){return{update:async(n,a)=>{var r,s,o,c,g,m,S;const t=(r=this.key)==null?void 0:r.getState(a),f=(s=this.key)==null?void 0:s.getState(n.state),i=t.active&&f.active&&t.range.from!==f.range.from,_=!t.active&&f.active,A=t.active&&!f.active,R=!_&&!A&&t.query!==f.query,w=_||i&&R,k=R||i,j=A||i&&R;if(!w&&!k&&!j)return;const $=j&&!w?t:f,T=n.dom.querySelector(`[data-decoration-id="${$.decorationId}"]`);d={editor:l,range:$.range,query:$.query,text:$.text,items:[],command:L=>h({editor:l,range:$.range,props:L}),decorationNode:T,clientRect:p(n,T)},w&&((o=e?.onBeforeStart)==null||o.call(e,d)),k&&((c=e?.onBeforeUpdate)==null||c.call(e,d)),(k||w)&&(d.items=await M({editor:l,query:$.query})),j&&((g=e?.onExit)==null||g.call(e,d)),k&&((m=e?.onUpdate)==null||m.call(e,d)),w&&((S=e?.onStart)==null||S.call(e,d))},destroy:()=>{var n;d&&((n=e?.onExit)==null||n.call(e,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(n,a,r,s){const{isEditable:o}=l,{composing:c}=l.view,{selection:g}=n,{empty:m,from:S}=g,t={...a},f=n.getMeta(x);if(f&&f.exit)return t.active=!1,t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null,t;if(t.composing=c,o&&(m||l.view.composing)){(S<a.range.from||S>a.range.to)&&!c&&!a.composing&&(t.active=!1);const i=O({char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:g.$from}),_=`id_${Math.floor(Math.random()*4294967295)}`;i&&q({editor:l,state:s,range:i.range,isActive:a.active})&&(!u||u({editor:l,range:i.range,query:i.query,text:i.text,transaction:n}))?(t.active=!0,t.decorationId=a.decorationId?a.decorationId:_,t.range=i.range,t.query=i.query,t.text=i.text):t.active=!1}else t.active=!1;return t.active||(t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null),t}},props:{handleKeyDown(n,a){var r,s,o,c;const{active:g,range:m}=C.getState(n.state);if(!g)return!1;if(a.key==="Escape"||a.key==="Esc"){const t=C.getState(n.state),f=(r=d?.decorationNode)!=null?r:null,i=f??(t?.decorationId?n.dom.querySelector(`[data-decoration-id="${t.decorationId}"]`):null);if(((s=e?.onKeyDown)==null?void 0:s.call(e,{view:n,event:a,range:t.range}))||!1)return!0;const A={editor:l,range:t.range,query:t.query,text:t.text,items:[],command:R=>h({editor:l,range:t.range,props:R}),decorationNode:i,clientRect:i?()=>i.getBoundingClientRect()||null:null};return(o=e?.onExit)==null||o.call(e,A),U(n,x),!0}return((c=e?.onKeyDown)==null?void 0:c.call(e,{view:n,event:a,range:m}))||!1},decorations(n){const{active:a,range:r,decorationId:s,query:o}=C.getState(n);if(!a)return null;const c=!o?.length,g=[B];return c&&g.push(K),H.create(n.doc,[J.inline(r.from,r.to,{nodeName:v,class:g.join(" "),"data-decoration-id":s,"data-decoration-content":y})])}}});return C}export{Y as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,x as qe,c as le,ba as Rn,n as Ys,K as At,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,x as qe,c as le,ba as Rn,n as Ys,K as At,E as os,d as zs,t as Bt}from"./index-CHrUmZgp.js";import{S as Bs}from"./search-input-B6ULbBJE.js";import{r as is,c as ls,d as cs,e as ds,P as Ue}from"./index-Dq__xIAQ.js";import{E as dn}from"./empty-state-DkUQz5Y_.js";import{B as Ke}from"./badge-C8h2D-cf.js";import{b as ct,P as dt,a as ut}from"./popover-C6TGJ7tP.js";import{T as Mt,a as kt,b as Ct}from"./tooltip-oz4PgHaK.js";import{i as Ht}from"./Check-BiM2-TvW.js";import{e as un,c as _t,n as Wn}from"./XCircle-Mzs74oa5.js";import{a as Hs}from"./SearchMd-BL69FKVv.js";import{i as qs}from"./Play-CRDhnWxZ.js";import{X as Vs,Y as Us,x as Ks,W as Gs}from"./agent-icon-CkZZqRPj.js";import{M as An}from"./monaco-editor-BZYPmAIH.js";import{u as Qs}from"./use-members-DzIKSYZr.js";import{u as $n}from"./use-connection-BUWHubVp.js";import{S as mn,u as fn,i as Js,g as Xs,d as Zs}from"./constants-BGb3csMB.js";import{b as ea}from"./use-virtual-mcp-BBYFAnp2.js";import{n as Ge}from"./Container-D0YzBjXF.js";import{c as ta}from"./XClose-BKDvrGgg.js";import{s as na}from"./Plus-DDMryLp9.js";import{s as sa}from"./Trash01-EHajsAd0.js";import{I as pt}from"./input-Do0Zx2-t.js";import{C as Yn}from"./checkbox-cUUI4UbZ.js";import{t as gt}from"./ChevronDown-v_6fVP4M.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la}from"./command-DDwhSRvD.js";import{a as Pt,b as Tt,c as Ot,d as Re,S as Ft}from"./select-CQme0ALA.js";import{S as ca}from"./scroll-area-Dm9XewPU.js";import{n as da}from"./ZapSquare-CM6EGSyy.js";import{i as ua}from"./ChevronRight-Dzob6m1m.js";import{T as ma}from"./textarea-Biq9f3vB.js";import{C as us}from"./collection-tabs-CfplzF48.js";import{S as fa}from"./switch-iFtU_Uj0.js";import{L as ha}from"./label-xFeGPJPK.js";import{I as ze}from"./integration-icon-BU0UtHw1.js";import{A as $t}from"./avatar-q80j4hVX.js";import{C as ms}from"./card-Dv-Qnw_l.js";import{K as st}from"./monitoring-stats-row-B44nIKev.js";import{c as fs}from"./use-mcp-tools-bTkNBvHW.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{u as hs}from"./useSuspenseInfiniteQuery-aIoxf3FE.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-CrLtxirL.js";import{n as xs}from"./ChevronUp-CUfrmF0I.js";import{u as gn}from"./use-infinite-scroll-B6tdlom4.js";import{u as pa}from"./useInfiniteQuery-7WbFFwUo.js";import{w as ga,x as va}from"./pair-BVw6SD1z.js";import{S as Lt}from"./task-status-CAq0fkQN.js";import"./X-BdF-Ta2X.js";import"./AlertCircle-VdAWApZT.js";import"./Tool01-DZ5nMk2X.js";import"./RefreshCcw01-BNG_5rJW.js";import"./ArrowNarrowLeft-Cb6jcK-n.js";import"./ArrowUpRight-B2ZjjZJQ.js";import"./Users03-Bpy5JElG.js";import"./CheckCircle-Ch05HHgc.js";import"./DotsVertical-D--w_iaX.js";import"./Star01-C0QV--XQ.js";import"./Palette-CEmO1kUS.js";import"./LinkExternal01-QD8wgK8o.js";import"./Lock01-DJV5JMDy.js";import"./Sun-B4qv1AhA.js";import"./Settings02-CHdnS1Le.js";import"./Shield01-CDWmokZC.js";import"./User01-DMVSPQ8_.js";import"./Zap-B1XrF636.js";import"./index-BKV2fRzm.js";import"./use-org-auth-client-C9dbWRTq.js";import"./use-collections-wkyc_t0D.js";import"./index-BPz6vLPS.js";import"./index-DV65bUQf.js";import"./infiniteQueryObserver-BondwvTH.js";import"./use-copy-B_R6LHdW.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-B9k-J44Q.js";import"./content-blocks-o63cs2vh.js";import"./types-0ZrdjKIw.js";import"./chat-context-Cs8XiFv-.js";import"./use-ai-providers-BfAEQYsq.js";import"./use-decopilot-events-Dr4V34eZ.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-LY5kqeAJ.js";import"./use-organization-settings-B78MMPj6.js";import"./shell-layout-BYMnLoch.js";import"./required-auth-layout-BgC3m76H.js";import"./use-org-sso-Oco51-Ud.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 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-CHrUmZgp.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})`}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as n,j as r,r as d,g as h,O as f,l as u}from"./index-CHrUmZgp.js";import{S as j,a as b,b as S}from"./index-Dq__xIAQ.js";import{u as _}from"./tooltip-oz4PgHaK.js";import{u as k,T as y,a as T,b as i,S as g}from"./index-BCJLKe3B.js";import{C as v}from"./chat-context-Cs8XiFv-.js";import"./X-BdF-Ta2X.js";import"./agent-icon-CkZZqRPj.js";import"./AlertCircle-VdAWApZT.js";import"./Tool01-DZ5nMk2X.js";import"./XClose-BKDvrGgg.js";import"./RefreshCcw01-BNG_5rJW.js";import"./ArrowNarrowLeft-Cb6jcK-n.js";import"./XCircle-Mzs74oa5.js";import"./ArrowUpRight-B2ZjjZJQ.js";import"./ZapSquare-CM6EGSyy.js";import"./Users03-Bpy5JElG.js";import"./CheckCircle-Ch05HHgc.js";import"./Check-BiM2-TvW.js";import"./ChevronDown-v_6fVP4M.js";import"./ChevronRight-Dzob6m1m.js";import"./ChevronUp-CUfrmF0I.js";import"./DotsVertical-D--w_iaX.js";import"./Container-D0YzBjXF.js";import"./Star01-C0QV--XQ.js";import"./Palette-CEmO1kUS.js";import"./SearchMd-BL69FKVv.js";import"./LinkExternal01-QD8wgK8o.js";import"./Lock01-DJV5JMDy.js";import"./Sun-B4qv1AhA.js";import"./Play-CRDhnWxZ.js";import"./Plus-DDMryLp9.js";import"./Settings02-CHdnS1Le.js";import"./Shield01-CDWmokZC.js";import"./Trash01-EHajsAd0.js";import"./User01-DMVSPQ8_.js";import"./Zap-B1XrF636.js";import"./shell-layout-BYMnLoch.js";import"./dialog-B9k-J44Q.js";import"./required-auth-layout-BgC3m76H.js";import"./use-tasks-LY5kqeAJ.js";import"./use-collections-wkyc_t0D.js";import"./constants-BGb3csMB.js";import"./use-organization-settings-B78MMPj6.js";import"./use-org-sso-Oco51-Ud.js";import"./pair-BVw6SD1z.js";import"./index-BKV2fRzm.js";import"./use-copy-B_R6LHdW.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-0ZrdjKIw.js";import"./integration-icon-BU0UtHw1.js";import"./use-virtual-mcp-BBYFAnp2.js";import"./skeleton-CcWsdROd.js";import"./popover-C6TGJ7tP.js";import"./drawer-C2prDcqZ.js";import"./avatar-q80j4hVX.js";import"./alert-dialog-BiImvuLv.js";import"./form-kltPHESZ.js";import"./label-xFeGPJPK.js";import"./input-Do0Zx2-t.js";import"./index-DB0YdXxd.js";import"./use-mcp-tools-bTkNBvHW.js";import"./use-ai-providers-BfAEQYsq.js";import"./index-BFJo4vrg.js";import"./switch-iFtU_Uj0.js";import"./use-connection-BUWHubVp.js";import"./lean-canvas-recruit-modal-Bi0R10xw.js";import"./use-navigate-to-agent-DC4juKfS.js";import"./collection-search-BEV6zp35.js";import"./checkbox-cUUI4UbZ.js";import"./extract-connection-data-Du0Nr7p1.js";import"./constants-B0iAJAyD.js";import"./collections-ohRmFoyb.js";import"./tabs-CLXQLaZb.js";import"./dropdown-menu-DCt7nnpF.js";import"./select-CQme0ALA.js";import"./toggle-group-Dj5MlNbV.js";import"./select-model-DXawshPk.js";import"./ai-providers-logos-DD3qZ33J.js";import"./use-debounced-autosave-Xsez6aVB.js";import"./settings-section-CX6DrRQc.js";import"./card-Dv-Qnw_l.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-CxB2xnH4.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D5kgRWc3.js";import"./use-registry-connections-BfK6vb9O.js";import"./useInfiniteQuery-7WbFFwUo.js";import"./infiniteQueryObserver-BondwvTH.js";import"./collection-tabs-CfplzF48.js";import"./badge-C8h2D-cf.js";import"./textarea-Biq9f3vB.js";import"./connection-form-helpers-Bi1lg2fC.js";import"./use-infinite-scroll-B6tdlom4.js";import"./useSuspenseInfiniteQuery-aIoxf3FE.js";import"./collection-search-CSWcPc5L.js";import"./use-create-virtual-mcp-BZc2oenO.js";import"./empty-state-DkUQz5Y_.js";import"./use-decopilot-events-Dr4V34eZ.js";import"./create-sse-subscription-CxkOgzKf.js";import"./task-status-CAq0fkQN.js";const N=280;function P(){const t=n.c(2),{tasksOpen:e}=k();if(!e)return null;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:`${N}px`},t[0]=o):o=t[0];let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx("aside",{className:"shrink-0 h-full bg-sidebar pb-1",style:o,children:r.jsx("div",{className:"h-full p-0.5 pt-0.25",children:r.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden card-shadow",children:r.jsx(y,{})})})}),t[1]=m):m=t[1],m}function C(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:null,children:r.jsx(P,{})}),t[0]=e):e=t[0],e}function x(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"flex-1 flex items-center justify-center",children:r.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function gr(){const t=n.c(7),e=_();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const c=!!h(o).taskId;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={"--sidebar-width-icon":"3.5rem"},t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(g,{}),t[2]=l):l=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},t[3]=p):p=t[3];let a;return t[4]!==c||t[5]!==e?(a=r.jsx(j,{defaultOpen:!1,children:r.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:r.jsxs(b,{className:"flex-1 bg-sidebar",style:s,children:[l,r.jsx(S,{className:"flex flex-col",style:p,children:r.jsx(v,{children:r.jsx(T,{children:e?r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})}):r.jsxs(i,{children:[r.jsxs(i.Header,{children:[r.jsxs(i.LeftColumn,{children:[r.jsx(i.Nav,{}),r.jsx(i.TogglesSlot,{})]}),r.jsx(i.CenterSlot,{}),r.jsxs(i.RightColumn,{children:[r.jsx(i.TabsSlot,{}),r.jsx(i.RightSlot,{})]})]}),r.jsxs("div",{className:"flex-1 min-h-0 flex flex-row",children:[c&&r.jsx(C,{}),r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})})]})]})})})})]})})}),t[4]=c,t[5]=e,t[6]=a):a=t[6],a}export{gr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as _}from"./index-
|
|
1
|
+
import{bb as _}from"./index-CHrUmZgp.js";var b={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,b.exports=I()),b.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-Dcg8Qevd.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-sn7TXXXA.js";import{i as U}from"./X-BGh8G2l7.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
|
|
1
|
+
import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-CHrUmZgp.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-oz4PgHaK.js";import{i as U}from"./X-BdF-Ta2X.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
|