@auto-ai/agent 2.1.201 → 2.1.203
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/safe-a/404/index.html +1 -1
- package/dist/safe-a/404.html +1 -1
- package/dist/safe-a/_next/static/chunks/00307121901a0bb9.js +1 -0
- package/dist/safe-a/_next/static/chunks/01bd042e327bca99.js +1 -0
- package/dist/safe-a/_next/static/chunks/1289fc2bb1119e18.js +1 -0
- package/dist/safe-a/_next/static/chunks/1c5adfc7c1c7d389.js +1 -0
- package/dist/safe-a/_next/static/chunks/1cdda0f50397fe52.js +1 -0
- package/dist/safe-a/_next/static/chunks/1ed40908b6f6169a.js +1 -0
- package/dist/safe-a/_next/static/chunks/{79e8fd2602ccb6b6.js → 40a2fb9cf3a7e6fd.js} +1 -1
- package/dist/safe-a/_next/static/chunks/461246e3ff85f221.js +1 -0
- package/dist/safe-a/_next/static/chunks/49faa314532847c5.css +1 -0
- package/dist/safe-a/_next/static/chunks/550b56a3434336c3.js +1 -0
- package/dist/safe-a/_next/static/chunks/{0fde2a8866dd02fc.js → 5798600d2ea8a3e8.js} +1 -1
- package/dist/safe-a/_next/static/chunks/6f3dea9281b00eb5.js +1 -0
- package/dist/safe-a/_next/static/chunks/72d507de2b27af4a.js +1 -0
- package/dist/safe-a/_next/static/chunks/7dd32128bdee61f7.js +1 -0
- package/dist/safe-a/_next/static/chunks/82614b5de9f78114.js +1 -0
- package/dist/safe-a/_next/static/chunks/{8085c74f26fa2c4e.js → 8989a60219113c80.js} +1 -1
- package/dist/safe-a/_next/static/chunks/{76ad71e591609488.js → 8be4fcbf0be681f0.js} +1 -1
- package/dist/safe-a/_next/static/chunks/{178385dc7308eb36.js → 8d49e72566260942.js} +1 -1
- package/dist/safe-a/_next/static/chunks/93f9fdbbd32e67ba.js +1 -0
- package/dist/safe-a/_next/static/chunks/9884401a1ada05a2.js +1 -0
- package/dist/safe-a/_next/static/chunks/bbaef90b0ce43019.js +1 -0
- package/dist/safe-a/_next/static/chunks/bbc5dbf5b7ca95b9.js +1 -0
- package/dist/safe-a/_next/static/chunks/cfd9aff2dcf3adb9.js +1 -0
- package/dist/safe-a/_next/static/chunks/d9b295c816662d1e.css +7 -0
- package/dist/safe-a/_next/static/chunks/f26b1d39b7d80da1.js +1 -0
- package/dist/safe-a/index.html +2 -2
- package/dist/safe-a/index.txt +12 -12
- package/dist/safe-a/manage/about/index.html +2 -2
- package/dist/safe-a/manage/about/index.txt +11 -11
- package/dist/safe-a/manage/env/index.html +2 -2
- package/dist/safe-a/manage/env/index.txt +13 -13
- package/dist/safe-a/manage/geelib/index.html +2 -2
- package/dist/safe-a/manage/geelib/index.txt +13 -13
- package/dist/safe-a/manage/general/index.html +2 -2
- package/dist/safe-a/manage/general/index.txt +11 -11
- package/dist/safe-a/manage/git/index.html +2 -2
- package/dist/safe-a/manage/git/index.txt +13 -13
- package/dist/safe-a/manage/im/index.html +2 -2
- package/dist/safe-a/manage/im/index.txt +13 -13
- package/dist/safe-a/manage/index.html +2 -2
- package/dist/safe-a/manage/index.txt +8 -8
- package/dist/safe-a/manage/library/index.html +2 -2
- package/dist/safe-a/manage/library/index.txt +11 -11
- package/dist/safe-a/manage/mcp/index.html +2 -2
- package/dist/safe-a/manage/mcp/index.txt +11 -11
- package/dist/safe-a/manage/permissions/index.html +2 -2
- package/dist/safe-a/manage/permissions/index.txt +11 -11
- package/dist/safe-a/manage/skills/index.html +2 -2
- package/dist/safe-a/manage/skills/index.txt +11 -11
- package/dist/safe-a/manage/task/index.html +2 -2
- package/dist/safe-a/manage/task/index.txt +11 -11
- package/dist/safe-a/manage/teams/index.html +2 -2
- package/dist/safe-a/manage/teams/index.txt +11 -11
- package/dist/safe-a/manage/tools/index.html +2 -2
- package/dist/safe-a/manage/tools/index.txt +11 -11
- package/package.json +6 -6
- package/dist/safe-a/_next/static/chunks/18e96a88f5f08332.js +0 -1
- package/dist/safe-a/_next/static/chunks/226a1a31a4fb9bfe.js +0 -1
- package/dist/safe-a/_next/static/chunks/4015dfbc67587781.css +0 -7
- package/dist/safe-a/_next/static/chunks/4cea3dc4bc693bae.js +0 -1
- package/dist/safe-a/_next/static/chunks/533f4a6fee15c104.js +0 -1
- package/dist/safe-a/_next/static/chunks/6ede5e68b521425a.js +0 -1
- package/dist/safe-a/_next/static/chunks/7b2661b7ec3fa4f6.js +0 -1
- package/dist/safe-a/_next/static/chunks/89ac60ccbd69e7d0.js +0 -1
- package/dist/safe-a/_next/static/chunks/94b5979f28d28841.js +0 -1
- package/dist/safe-a/_next/static/chunks/9edfab69bc0e5607.js +0 -1
- package/dist/safe-a/_next/static/chunks/b46207ccaa54a4c8.js +0 -1
- package/dist/safe-a/_next/static/chunks/c987866e1b5e538e.js +0 -1
- package/dist/safe-a/_next/static/chunks/cfe7d9b6ed958a07.js +0 -1
- package/dist/safe-a/_next/static/chunks/d4b8cc084b9746c8.js +0 -1
- package/dist/safe-a/_next/static/chunks/d9b7639801e15731.css +0 -1
- package/dist/safe-a/_next/static/chunks/d9d8a33623a1847b.js +0 -1
- package/dist/safe-a/_next/static/chunks/df782b0b8467faa1.js +0 -1
- package/dist/safe-a/_next/static/chunks/e49f12b147341b78.js +0 -1
- package/dist/safe-a/_next/static/chunks/f660a559fce684d3.js +0 -1
- package/dist/safe-a/_next/static/chunks/fddc8491e9085327.js +0 -1
- /package/dist/safe-a/_next/static/{mMQVE_-d0CNKsetqhCJm4 → VYbu3HIpBN9vCGzjc-YP4}/_buildManifest.js +0 -0
- /package/dist/safe-a/_next/static/{mMQVE_-d0CNKsetqhCJm4 → VYbu3HIpBN9vCGzjc-YP4}/_clientMiddlewareManifest.json +0 -0
- /package/dist/safe-a/_next/static/{mMQVE_-d0CNKsetqhCJm4 → VYbu3HIpBN9vCGzjc-YP4}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28370,e=>{"use strict";e.s(["AgentEnvGroupSettingsView",()=>w],28370);var t=e.i(18050),r=e.i(85413),n=e.i(2839),l=e.i(19455),i=e.i(93479),o=e.i(24687),a=e.i(67489),s=e.i(75157);let u="__empty__",d=[{value:"anthropic",label:"anthropic"},{value:"openai",label:"openai"}],c=[{value:"1",label:"启用全部 MCP 常驻会话"},{value:"0",label:"禁用"}];function f(e){let{group:r,fields:n,fieldValues:l,whentouseValue:f,onFieldChange:p,onWhentouseChange:g}=e;return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col divide-y divide-[var(--ds-color-border-default)]",children:["system"===r?(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 py-4 first:pt-0",children:[(0,t.jsx)("label",{className:"text-[var(--ds-text)]",htmlFor:"agent-env-whentouse",children:"使用时机(whentouse)"}),(0,t.jsx)(o.Textarea,{id:"agent-env-whentouse",rows:3,spellCheck:!1,autoComplete:"off",placeholder:"输入该 agent 的使用时机描述","aria-label":"agent.json whentouse",className:"min-h-[88px] flex-1 resize-none border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-default)] placeholder:text-[var(--text-placeholder)]",value:f,onChange:e=>g(e.target.value)})]}):null,n.map(e=>{let r="agent-env-field-".concat(e.key),n="string"==typeof l[e.key]?l[e.key]:"";if("LLM_PROVIDER"===e.key){let l="anthropic"===n||"openai"===n?n:"";return(0,t.jsxs)("div",{className:"flex flex-col gap-2 py-4 first:pt-0",children:[(0,t.jsx)("label",{className:"text-basic text-[var(--ds-text)]",htmlFor:r,children:e.label}),(0,t.jsxs)(a.Select,{value:l||u,onValueChange:t=>p(e.key,t===u?"":t),children:[(0,t.jsx)(a.SelectTrigger,{id:r,className:(0,s.cn)("h-10 w-full border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-default)]",!l&&"text-[var(--text-placeholder)]"),children:(0,t.jsx)(a.SelectValue,{placeholder:"请选择"})}),(0,t.jsxs)(a.SelectContent,{children:[(0,t.jsx)(a.SelectItem,{value:u,children:"请选择"}),d.map(e=>(0,t.jsx)(a.SelectItem,{value:e.value,children:e.label},e.value))]})]})]},e.key)}if("TUITUI_CHANNEL_SESSION"===e.key){let l="1"===n?"1":"0";return(0,t.jsxs)("div",{className:"flex flex-col gap-2 py-4 first:pt-0",children:[(0,t.jsx)("label",{className:"text-basic text-[var(--ds-text)]",htmlFor:r,children:e.label}),(0,t.jsxs)(a.Select,{value:l,onValueChange:t=>p(e.key,t),children:[(0,t.jsx)(a.SelectTrigger,{id:r,className:"h-10 w-full border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-default)]",children:(0,t.jsx)(a.SelectValue,{placeholder:"请选择"})}),(0,t.jsx)(a.SelectContent,{children:c.map(e=>(0,t.jsx)(a.SelectItem,{value:e.value,children:e.label},e.value))})]})]},e.key)}return(0,t.jsxs)("div",{className:"flex flex-col gap-2 py-4 first:pt-0",children:[(0,t.jsx)("label",{className:"text-[var(--ds-text)]",htmlFor:r,children:e.label}),(0,t.jsx)(i.Input,{id:r,type:"text",spellCheck:!1,autoComplete:"off",placeholder:e.placeholder,className:"h-10 border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-default)] placeholder:text-[var(--text-placeholder)]",value:n,onChange:t=>p(e.key,t.target.value)})]},e.key)})]})}var p=e.i(71645),g=e.i(13354),h=e.i(87243),m=e.i(67327);let b=["llm","git","geelib","tutui","system"];var v=e.i(99650),y=e.i(18900),x=e.i(69051),A=e.i(65934);function w(e){let{group:i}=e,{loading:o,saving:a,groupFields:s,fieldValues:u,whentouseValue:d,setField:c,setWhentouseValue:w,reset:j,save:S}=function(e){let t=(0,A.useAppStore)(e=>e.wsUrl),r=(0,A.useAppStore)(e=>e.apiBase),n=(0,A.useAppStore)(e=>e.agentConfig),{currentAgent:l,loadAgentConfig:i}=(0,h.useSession)(),{sendReloadAgentConfig:o}=(0,m.useWebSocketSender)(),[a,s]=(0,p.useState)(!0),[u,d]=(0,p.useState)(!1),[c,f]=(0,p.useState)([]),[w,j]=(0,p.useState)({}),[S,C]=(0,p.useState)({}),[_,E]=(0,p.useState)(""),k=(0,p.useMemo)(()=>(function(e){let t={};for(let e of b)t[e]=[];for(let r of e)b.includes(r.group)&&t[r.group].push(r);return t})(c)[e],[c,e]),O=(0,p.useCallback)(e=>{C(function(e,t,r){let n={};for(let l of t){let t=e[l.key];if("string"==typeof t&&t.length>0){n[l.key]=t;continue}let i=r[l.key];n[l.key]="string"==typeof i?i:""}return n}(e,k,w))},[k,w]),P=(0,p.useCallback)(e=>{E("string"==typeof e?e:"")},[]),R=(0,p.useCallback)(async()=>{try{let e=await (0,x.loadSystemEnv)(t,r,l()),n="string"==typeof e.content?e.content:"",i=function(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||"object"!=typeof r)continue;let e="string"==typeof r.key?r.key.trim():"",n="string"==typeof r.group?r.group.trim():"";e&&b.includes(n)&&t.push({key:e,group:n,label:"string"==typeof r.label&&r.label.trim()?r.label.trim():e,placeholder:"string"==typeof r.placeholder?r.placeholder:""})}return t}(e.schema),o=(0,y.parseEnvContentToMap)(n);f(i),j(function(e,t){let r={};for(let l of e){var n;r[l.key]=null!=(n=t[l.key])?n:""}return r}(i,o))}catch(e){g.appToast.error("加载环境变量表单配置失败:".concat(e instanceof Error?e.message:String(e))),f([]),j({})}},[t,r,l]),N=(0,p.useCallback)(async()=>{s(!0);try{await Promise.all([i(),R()])}finally{s(!1)}},[i,R]);(0,p.useEffect)(()=>{N()},[N]),(0,p.useEffect)(()=>{!a&&k.length&&O({...n.env})},[n.env,O,a,k.length]),(0,p.useEffect)(()=>{a||"system"!==e||P(n.whentouse)},[n.whentouse,e,a,P]);let z=(0,p.useCallback)((e,t)=>{C(r=>({...r,[e]:t}))},[]),M=(0,p.useCallback)(()=>{O({...n.env}),"system"===e&&P(n.whentouse)},[n.env,n.whentouse,e,O,P]),I=(0,p.useCallback)(async()=>{let n=function(e,t,r){let n={...e};for(let e of t){var l;let t=String(null!=(l=r[e.key])?l:"").trim();t?n[e.key]=t:delete n[e.key]}return n}(A.useAppStore.getState().agentConfig.env,k,S);d(!0);try{if("system"===e){let e=A.useAppStore.getState().agentConfig;A.useAppStore.getState().setAgentConfig({...e,whentouse:_})}await (0,v.persistAgentEnv)(t,r,l(),n,o),await i()}catch(e){g.appToast.error("保存环境变量失败:".concat(e instanceof Error?e.message:String(e)))}finally{d(!1)}},[k,S,_,e,t,r,l,o,i]);return{loading:a,saving:u,groupFields:k,fieldValues:S,whentouseValue:_,setField:z,setWhentouseValue:E,reset:M,save:I}}(i),C="system"===i||s.length>0;return(0,t.jsxs)("div",{className:"manage-page-content flex min-h-0 flex-1 flex-col rounded-xl border bg-[#fff] shadow-[var(--shadow-md)]",children:[(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:o?(0,t.jsx)(n.Loading,{className:"min-h-[240px]",text:"加载中…"}):C?(0,t.jsx)(f,{group:i,fields:s,fieldValues:u,whentouseValue:d,onFieldChange:c,onWhentouseChange:w}):(0,t.jsx)(r.Empty,{className:"min-h-[240px]",text:"暂无可配置项"})}),(0,t.jsxs)("div",{className:"flex shrink-0 justify-end gap-2 border-t border-[var(--ds-color-border-default)] px-4 py-3",children:[(0,t.jsx)(l.Button,{type:"button",variant:"plain-outline",size:"lg",disabled:o||a||!C,onClick:()=>j(),className:"cursor-pointer",children:"取消"}),(0,t.jsx)(l.Button,{type:"button",size:"lg",disabled:o||a||!C,onClick:()=>void S(),className:"cursor-pointer",children:a?"保存中…":"保存"})]})]})}},2839,e=>{"use strict";e.s(["Loading",()=>o],2839);var t=e.i(18050),r=e.i(57688);let n={src:e.i(51239).default,width:951,height:482,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAj0lEQVR42gGEAHv/AAAAAAANERAObXJwYaGko5N/gYBwDg8PCgAAAAAAAAAAAAMEBAJic2xp2+3m7fL8+P7l6ujjUlhWTAYGBgUAAAAAADM3NTG6x8LB7fr1/vD89/7f9+3+wNXNzycpKB4AAAAAAJ+qpozL2dO/0NvWx9Td2c6gzrzRpcq8u2FpZk8CAgIBCRI7kCfNfAcAAAAASUVORK5CYII="};var l=e.i(87968),i=e.i(75157);function o(e){let{text:o="加载中",className:a,showImage:s=!0,imageSrc:u=n,imageAlt:d="加载中",imageSize:c=180,imageClassName:f}=e,p="string"==typeof u?{width:c,height:c}:{width:u.width,height:u.height};return(0,t.jsxs)("div",{className:(0,i.cn)("flex min-h-[180px] w-full flex-col items-center justify-center gap-2 py-4 text-[var(--ds-muted)]",a),role:"status","aria-live":"polite",children:[s?(0,t.jsx)("span",{className:(0,i.cn)("block shrink-0",f),style:{width:c},children:(0,t.jsx)(r.default,{src:u,alt:d,width:p.width,height:p.height,unoptimized:!0,draggable:!1,sizes:"".concat(c,"px"),className:"h-auto w-full object-contain"})}):null,(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(l.Spinner,{className:"mr-2"}),o]})]})}},96920,e=>{e.v("/app/_next/static/media/no-data.48c973b9.png")},51239,e=>{e.v("/app/_next/static/media/data-loading.be8d921a.png")},93479,e=>{"use strict";e.s(["Input",()=>n]);var t=e.i(18050),r=e.i(75157);function n(e){let{className:n,type:l="text",size:i="default",...o}=e;return(0,t.jsx)("input",{type:l,"data-slot":"input","data-size":i,className:(0,r.cn)("h-9 w-full appearance-none rounded-md border border-solid border-border bg-transparent px-3 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none] data-[size=default]:h-9 data-[size=lg]:h-10 data-[size=sm]:h-7",n),...o})}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=i(e,n)),t&&(l.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88143,(e,t,r)=>{"use strict";function n(e){let{widthInt:t,heightInt:r,blurWidth:n,blurHeight:l,blurDataURL:i,objectFit:o}=e,a=n?40*n:t,s=l?40*l:r,u=a&&s?"viewBox='0 0 "+a+" "+s+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return l}});let n=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumResponseBody:5e7,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return s}}),e.r(33525);let n=e.r(88143),l=e.r(87690),i=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var r,s;let u,d,c,{src:f,sizes:p,unoptimized:g=!1,priority:h=!1,loading:m,className:b,quality:v,width:y,height:x,fill:A=!1,style:w,overrideSrc:j,onLoad:S,onLoadingComplete:C,placeholder:_="empty",blurDataURL:E,fetchPriority:k,decoding:O="async",layout:P,objectFit:R,objectPosition:N,lazyBoundary:z,lazyRoot:M,...I}=e,{imgConf:T,showAltText:D,blurComplete:U,defaultLoader:B}=t,L=T||l.imageConfigDefault;if("allSizes"in L)u=L;else{let e=[...L.deviceSizes,...L.imageSizes].sort((e,t)=>e-t),t=L.deviceSizes.sort((e,t)=>e-t),n=null==(r=L.qualities)?void 0:r.sort((e,t)=>e-t);u={...L,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===B)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let G=I.loader||B;delete I.loader,delete I.srcSet;let V="__next_img_default"in G;if(V){if("custom"===u.loader)throw Object.defineProperty(Error('Image with src "'+f+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader'),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=G;G=t=>{let{config:r,...n}=t;return e(n)}}if(P){"fill"===P&&(A=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(w={...w,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!p&&(p=t)}let F="",W=a(y),q=a(x);if((s=f)&&"object"==typeof s&&(o(s)||void 0!==s.src)){let e=o(f)?f.default:f;if(!e.src)throw Object.defineProperty(Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e)),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!e.height||!e.width)throw Object.defineProperty(Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e)),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(d=e.blurWidth,c=e.blurHeight,E=E||e.blurDataURL,F=e.src,!A)if(W||q){if(W&&!q){let t=W/e.width;q=Math.round(e.height*t)}else if(!W&&q){let t=q/e.height;W=Math.round(e.width*t)}}else W=e.width,q=e.height}let H=!h&&("lazy"===m||void 0===m);(!(f="string"==typeof f?f:F)||f.startsWith("data:")||f.startsWith("blob:"))&&(g=!0,H=!1),u.unoptimized&&(g=!0),V&&!u.dangerouslyAllowSVG&&f.split("?",1)[0].endsWith(".svg")&&(g=!0);let J=a(v),K=Object.assign(A?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:N}:{},D?{}:{color:"transparent"},w),Y=U||"empty"===_?null:"blur"===_?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:W,heightInt:q,blurWidth:d,blurHeight:c,blurDataURL:E||"",objectFit:K.objectFit})+'")':'url("'+_+'")',X=i.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Q=Y?{backgroundSize:X,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},Z=function(e){let{config:t,src:r,unoptimized:n,width:l,quality:i,sizes:o,loader:a}=e;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:s,kind:u}=function(e,t,r){let{deviceSizes:n,allSizes:l}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:l.filter(t=>t>=n[0]*e),kind:"w"}}return{widths:l,kind:"w"}}return"number"!=typeof t?{widths:n,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>l.find(t=>t>=e)||l[l.length-1]))],kind:"x"}}(t,l,o),d=s.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:s.map((e,n)=>a({config:t,src:r,quality:i,width:e})+" "+("w"===u?e:n+1)+u).join(", "),src:a({config:t,src:r,quality:i,width:s[d]})}}({config:u,src:f,unoptimized:g,width:W,quality:J,sizes:p,loader:G});return{props:{...I,loading:H?"lazy":m,fetchPriority:k,width:W,height:q,decoding:O,className:b,style:{...K,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:j||Z.src},meta:{unoptimized:g,priority:h,placeholder:_,fill:A}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(71645),l="undefined"==typeof window,i=l?()=>{}:n.useLayoutEffect,o=l?()=>{}:n.useEffect;function a(e){let{headManager:t,reduceComponentsToState:r}=e;function a(){if(t&&t.mountedInstances){let l=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(l,e))}}if(l){var s;null==t||null==(s=t.mountedInstances)||s.add(e.children),a()}return i(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),i(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},58908,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"AmpStateContext",{enumerable:!0,get:function(){return n}});let n=e.r(55682)._(e.r(71645)).default.createContext({})},15986,(e,t,r)=>{"use strict";function n(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isInAmpMode",{enumerable:!0,get:function(){return n}})},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{default:function(){return h},defaultHead:function(){return c}});let n=e.r(55682),l=e.r(90809),i=e.r(18050),o=l._(e.r(71645)),a=n._(e.r(98879)),s=e.r(58908),u=e.r(42732),d=e.r(15986);function c(e){void 0===e&&(e=!1);let t=[(0,i.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let p=["name","httpEquiv","charSet","itemProp"];function g(e,t){let{inAmpMode:r}=t;return e.reduce(f,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return l=>{let i=!0,o=!1;if(l.key&&"number"!=typeof l.key&&l.key.indexOf("$")>0){o=!0;let t=l.key.slice(l.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(l.type){case"title":case"base":t.has(l.type)?i=!1:t.add(l.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(l.props.hasOwnProperty(t))if("charSet"===t)r.has(t)?i=!1:r.add(t);else{let e=l.props[t],r=n[t]||new Set;("name"!==t||!o)&&r.has(e)?i=!1:(r.add(e),n[t]=r)}}}return i}}()).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let h=function(e){let{children:t}=e,r=(0,o.useContext)(s.AmpStateContext),n=(0,o.useContext)(u.HeadManagerContext);return(0,i.jsx)(a.default,{reduceComponentsToState:g,headManager:n,inAmpMode:(0,d.isInAmpMode)(r),children:t})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(71645)),l=e.r(87690),i=n.default.createContext(l.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return n}});let n=e.r(55682)._(e.r(71645)).default.createContext(null)},1948,(e,t,r)=>{"use strict";function n(e){var t;let{config:r,src:n,width:l,quality:i}=e,o=i||(null==(t=r.qualities)?void 0:t.reduce((e,t)=>Math.abs(t-75)<Math.abs(e-75)?t:e))||75;return r.path+"?url="+encodeURIComponent(n)+"&w="+l+"&q="+o+(n.startsWith("/_next/static/media/"),"")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}}),n.__next_img_default=!0;let l=n},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return x}});let n=e.r(55682),l=e.r(90809),i=e.r(18050),o=l._(e.r(71645)),a=n._(e.r(74080)),s=n._(e.r(25633)),u=e.r(8927),d=e.r(87690),c=e.r(18556);e.r(33525);let f=e.r(65856),p=n._(e.r(1948)),g=e.r(18581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/app/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,r,n,l,i,o){let a=null==e?void 0:e.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&l(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,l=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>l,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{l=!0,t.stopPropagation()}})}(null==n?void 0:n.current)&&n.current(e)}}))}function b(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,o.forwardRef)((e,t)=>{let{src:r,srcSet:n,sizes:l,height:a,width:s,decoding:u,className:d,style:c,fetchPriority:f,placeholder:p,loading:h,unoptimized:v,fill:y,onLoadRef:x,onLoadingCompleteRef:A,setBlurComplete:w,setShowAltText:j,sizesInput:S,onLoad:C,onError:_,...E}=e,k=(0,o.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&m(e,p,x,A,w,v,S))},[r,p,x,A,w,_,v,S]),O=(0,g.useMergedRef)(t,k);return(0,i.jsx)("img",{...E,...b(f),loading:h,width:s,height:a,decoding:u,"data-nimg":y?"fill":"1",className:d,style:c,sizes:l,srcSet:n,src:r,ref:O,onLoad:e=>{m(e.currentTarget,p,x,A,w,v,S)},onError:e=>{j(!0),"empty"!==p&&w(!0),_&&_(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,n={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...b(r.fetchPriority)};return t&&a.default.preload?(a.default.preload(r.src,n),null):(0,i.jsx)(s.default,{children:(0,i.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...n},"__nimg-"+r.src+r.srcSet+r.sizes)})}let x=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(f.RouterContext),n=(0,o.useContext)(c.ImageConfigContext),l=(0,o.useMemo)(()=>{var e;let t=h||n||d.imageConfigDefault,r=[...t.deviceSizes,...t.imageSizes].sort((e,t)=>e-t),l=t.deviceSizes.sort((e,t)=>e-t),i=null==(e=t.qualities)?void 0:e.sort((e,t)=>e-t);return{...t,allSizes:r,deviceSizes:l,qualities:i}},[n]),{onLoad:a,onLoadingComplete:s}=e,g=(0,o.useRef)(a);(0,o.useEffect)(()=>{g.current=a},[a]);let m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let[b,x]=(0,o.useState)(!1),[A,w]=(0,o.useState)(!1),{props:j,meta:S}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:l,blurComplete:b,showAltText:A});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{...j,unoptimized:S.unoptimized,placeholder:S.placeholder,fill:S.fill,onLoadRef:g,onLoadingCompleteRef:m,setBlurComplete:x,setShowAltText:w,sizesInput:e.sizes,ref:t}),S.priority?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:j}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{default:function(){return s},getImageProps:function(){return a}});let n=e.r(55682),l=e.r(8927),i=e.r(5500),o=n._(e.r(1948));function a(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/app/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let s=i.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},85413,e=>{"use strict";e.s(["Empty",()=>i],85413);var t=e.i(18050),r=e.i(57688);let n={src:e.i(96920).default,width:973,height:482,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAj0lEQVR42gGEAHv/AAAAAAATGRcXg4uIgcjJycORlJOKDxEQDAAAAAAAAAAAAAQEBANfa2Zj5fTu9ff9+/7q8u7uc3p3cgoLCwkAAAAAAEJGRELH1M/S4/jw/tD25v7U9ef+1ubf4jg8OjAAAAAAAHqBfmqxvLiisMG7rK7GvLKxxb2wpbKtoVNYVlADAwMC5U08HYgBOJwAAAAASUVORK5CYII="};var l=e.i(75157);function i(e){let{text:i="暂无数据",className:o,showImage:a=!0,imageSrc:s=n,imageAlt:u="暂无数据",imageSize:d=180,imageClassName:c}=e,f="string"==typeof s?{width:d,height:d}:{width:s.width,height:s.height};return(0,t.jsxs)("div",{className:(0,l.cn)("flex min-h-[180px] w-full flex-col items-center justify-center gap-2 py-4 text-[var(--ds-muted)]",o),role:"status","aria-live":"polite",children:[a?(0,t.jsx)("span",{className:(0,l.cn)("block shrink-0",c),style:{width:d},children:(0,t.jsx)(r.default,{src:s,alt:u,width:f.width,height:f.height,unoptimized:!0,draggable:!1,sizes:"".concat(d,"px"),className:"h-auto w-full object-contain"})}):null,(0,t.jsx)("span",{children:i})]})}},99650,e=>{"use strict";e.s(["persistAgentEnv",()=>i]);var t=e.i(13354),r=e.i(70074),n=e.i(82136),l=e.i(65934);async function i(e,i,o,a,s,u){var d,c,f,p;let g=l.useAppStore.getState(),h={tools:g.agentConfig.tools.slice(),disallowedTools:g.agentConfig.disallowedTools.slice(),mcpServers:g.agentConfig.mcpServers.slice(),skills:g.agentConfig.skills.slice(),agentTeams:g.agentConfig.agentTeams.slice(),model:g.agentConfig.model,rules:g.agentConfig.rules.slice(),effort:null!=(d=g.agentConfig.effort)?d:null,background:null!=(c=g.agentConfig.background)&&c,isolation:null!=(f=g.agentConfig.isolation)?f:"",whentouse:null!=(p=g.agentConfig.whentouse)?p:"",env:a,llmProviders:g.agentConfig.llmProviders.map(e=>({...e,models:e.models.map(e=>({...e}))})),...u},m=await (0,n.loadAgentPrompt)(e,i,o);await (0,n.saveAgentConfig)(e,i,o,h,{prompt:m}),g.setAgentConfig({...h,env:{...a}}),l.useAppStore.getState().wsConnected&&s();let b=l.useAppStore.getState();b.setStatus("环境变量已保存"+(b.wsConnected?",已请求 worker 重新加载配置":""),(0,r.resolveInfoStatusClass)(b.bridgeReady,b.wsConnected)),t.appToast.success(b.wsConnected?"已保存到 agent.json,并已请求 worker 重新加载配置。":"已保存到 agent.json。重连 WebSocket 后子进程环境将同步。")}},20783,e=>{"use strict";e.s(["composeRefs",()=>n,"useComposedRefs",()=>l]);var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1,l=t.map(t=>{let l=r(t,e);return n||"function"!=typeof l||(n=!0),l});if(n)return()=>{for(let e=0;e<l.length;e++){let n=l[e];"function"==typeof n?n():r(t[e],null)}}}}function l(){for(var e=arguments.length,r=Array(e),l=0;l<e;l++)r[l]=arguments[l];return t.useCallback(n(...r),r)}},24687,e=>{"use strict";e.s(["Textarea",()=>n]);var t=e.i(18050),r=e.i(75157);function n(e){let{className:n,...l}=e;return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex min-h-20 w-full rounded-md border border-solid border-border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none]",n),...l})}},18900,69051,e=>{"use strict";function t(e){let t=null==e?"":String(e);return""===t?'""':/[\s#"'\\\n]/.test(t)||t!==t.trim()?'"'.concat(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t}function r(e){let t=String(e).split(/\r?\n/),r={},n=/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;for(let e=0;e<t.length;e++){let l=t[e],i=n.exec(l);i&&(r[i[1]]=function(e){let t=e.trimEnd();return t.length>=2&&'"'===t[0]&&'"'===t[t.length-1]?t.slice(1,-1).replace(/\\(.)/g,(e,t)=>"n"===t?"\n":'"'===t?'"':"\\"===t?"\\":"\\".concat(t)):t.length>=2&&"'"===t[0]&&"'"===t[t.length-1]?t.slice(1,-1):e}(i[2]))}return r}function n(e,r){let n=Array.isArray(e)?e:[],l=new Set;for(let e=0;e<n.length;e++){let t=n[e];t&&"object"==typeof t&&"string"==typeof t.key&&l.add(t.key)}let i=[];for(let e=0;e<n.length;e++){let l=n[e];if(!l||"object"!=typeof l||"string"!=typeof l.key)continue;let o=l.key;if(!Object.prototype.hasOwnProperty.call(r,o))continue;let a=r[o];null!=a&&""!==String(a).trim()&&i.push("".concat(o,"=").concat(t(String(a))))}let o=Object.keys(r).filter(e=>!l.has(e)).sort();for(let e=0;e<o.length;e++){let n=o[e],l=r[n];null!=l&&""!==String(l).trim()&&i.push("".concat(n,"=").concat(t(String(l))))}let a=i.join("\n");return a.length>0?"".concat(a,"\n"):""}e.s(["buildEnvFileContentFromForm",()=>n,"parseEnvContentToMap",()=>r],18900),e.s(["loadDemoSingleMessage",()=>u,"loadSystemEnv",()=>o,"saveSystemEnv",()=>a,"saveSystemMcpJson",()=>s],69051);var l=e.i(29250),i=e.i(36845);async function o(e,t,r){return(0,l.get)((0,i.buildSystemEnvApiUrl)(e,t,r))}async function a(e,t,r,n){await (0,l.patch)((0,i.buildSystemEnvApiUrl)(e,t,r),{content:n})}async function s(e,t,r,n){await (0,l.patch)((0,i.buildSystemMcpJsonApiUrl)(e,t,r),{content:n})}async function u(){return(0,l.get)("/api/demo/single-message")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20783,e=>{"use strict";e.s(["composeRefs",()=>n,"useComposedRefs",()=>o]);var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1,o=t.map(t=>{let o=r(t,e);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let e=0;e<o.length;e++){let n=o[e];"function"==typeof n?n():r(t[e],null)}}}}function o(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.useCallback(n(...r),r)}},24687,e=>{"use strict";e.s(["Textarea",()=>n]);var t=e.i(18050),r=e.i(75157);function n(e){let{className:n,...o}=e;return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex min-h-20 w-full rounded-md border border-solid border-border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none]",n),...o})}},98183,(e,t,r)=>{"use strict";function n(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function u(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{assign:function(){return i},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return u}})},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{formatUrl:function(){return u},formatWithValidation:function(){return a},urlObjectKeys:function(){return i}});let n=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function u(e){let{auth:t,hostname:r}=e,u=e.protocol||"",i=e.pathname||"",a=e.hash||"",s=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(l+=":"+e.port)),s&&"object"==typeof s&&(s=String(n.urlQueryToSearchParams(s)));let c=e.search||s&&"?"+s||"";return u&&!u.endsWith(":")&&(u+=":"),e.slashes||(!u||o.test(u))&&!1!==l?(l="//"+(l||""),i&&"/"!==i[0]&&(i="/"+i)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),""+u+l+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+a}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function a(e){return u(e)}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{DecodeError:function(){return b},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return o},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return s},isAbsoluteUrl:function(){return i},isResSent:function(){return c},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return P}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),u=0;u<n;u++)o[u]=arguments[u];return r||(r=!0,t=e(...o)),t}}let u=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>u.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function c(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&c(r))return n;if(!n)throw Object.defineProperty(Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let p="undefined"!=typeof performance,h=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class y extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function P(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(18967),o=e.r(52817);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{default:function(){return y},useLinkStatus:function(){return m}});let n=e.r(90809),o=e.r(18050),u=n._(e.r(71645)),i=e.r(95057),a=e.r(8372),s=e.r(18581),l=e.r(18967),c=e.r(84395);e.r(33525);let f=e.r(91949),d=e.r(73668),p=e.r(99781);e.r(84508);let h=e.r(65165);function b(e){return"string"==typeof e?e:(0,i.formatUrl)(e)}function y(e){var t;let r,n,i,[y,m]=(0,u.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,u.useRef)(null),{href:P,as:x,children:E,prefetch:O=null,passHref:T,replace:_,shallow:j,scroll:S,onClick:C,onMouseEnter:A,onTouchStart:N,legacyBehavior:R=!1,onNavigate:w,ref:L,unstable_dynamicOnHover:U,...I}=e;r=E,R&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let M=u.default.useContext(a.AppRouterContext),k=!1!==O,F=!1!==O?null===(t=O)||"auto"===t?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:D,as:K}=u.default.useMemo(()=>{let e=b(P);return{href:e,as:x?b(x):e}},[P,x]);R&&(n=u.default.Children.only(r));let B=R?n&&"object"==typeof n&&n.ref:L,z=u.default.useCallback(e=>(null!==M&&(v.current=(0,f.mountLinkInstance)(e,D,M,F,k,m)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[k,D,M,F,m]),Q={ref:(0,s.useMergedRef)(z,B),onClick(e){R||"function"!=typeof C||C(e),R&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),M&&(e.defaultPrevented||function(e,t,r,n,o,i,a){let{nodeName:s}=e.currentTarget;if(!("A"===s.toUpperCase()&&function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||e.currentTarget.hasAttribute("download"))){if(!(0,d.isLocalURL)(t)){o&&(e.preventDefault(),location.replace(t));return}if(e.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}u.default.startTransition(()=>{(0,p.dispatchNavigateAction)(r||t,o?"replace":"push",null==i||i,n.current)})}}(e,D,K,v,_,S,w))},onMouseEnter(e){R||"function"!=typeof A||A(e),R&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),M&&k&&(0,f.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){R||"function"!=typeof N||N(e),R&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),M&&k&&(0,f.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,l.isAbsoluteUrl)(K)?Q.href=K:R&&!T&&("a"!==n.type||"href"in n.props)||(Q.href=(0,c.addBasePath)(K)),i=R?u.default.cloneElement(n,Q):(0,o.jsx)("a",{...I,...Q,children:r}),(0,o.jsx)(g.Provider,{value:y,children:i})}let g=(0,u.createContext)(f.IDLE_LINK_STATUS),m=()=>(0,u.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96920,e=>{e.v("/app/_next/static/media/no-data.48c973b9.png")},93479,e=>{"use strict";e.s(["Input",()=>i]);var t=e.i(18050),r=e.i(75157);function i(e){let{className:i,type:l="text",size:n="default",...o}=e;return(0,t.jsx)("input",{type:l,"data-slot":"input","data-size":n,className:(0,r.cn)("h-9 w-full appearance-none rounded-md border border-solid border-border bg-transparent px-3 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none] data-[size=default]:h-9 data-[size=lg]:h-10 data-[size=sm]:h-7",i),...o})}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let i=e.r(71645);function l(e,t){let r=(0,i.useRef)(null),l=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=n(e,i)),t&&(l.current=n(t,i))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88143,(e,t,r)=>{"use strict";function i(e){let{widthInt:t,heightInt:r,blurWidth:i,blurHeight:l,blurDataURL:n,objectFit:o}=e,a=i?40*i:t,s=l?40*l:r,u=a&&s?"viewBox='0 0 "+a+" "+s+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+n+"'/%3E%3C/svg%3E"}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return i}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}});let i=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumResponseBody:5e7,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return s}}),e.r(33525);let i=e.r(88143),l=e.r(87690),n=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var r,s;let u,d,c,{src:f,sizes:p,unoptimized:m=!1,priority:b=!1,loading:g,className:h,quality:v,width:y,height:w,fill:x=!1,style:j,overrideSrc:_,onLoad:A,onLoadingComplete:R,placeholder:C="empty",blurDataURL:S,fetchPriority:M,decoding:E="async",layout:O,objectFit:P,objectPosition:k,lazyBoundary:N,lazyRoot:z,...I}=e,{imgConf:T,showAltText:U,blurComplete:D,defaultLoader:L}=t,B=T||l.imageConfigDefault;if("allSizes"in B)u=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),i=null==(r=B.qualities)?void 0:r.sort((e,t)=>e-t);u={...B,allSizes:e,deviceSizes:t,qualities:i}}if(void 0===L)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let F=I.loader||L;delete I.loader,delete I.srcSet;let G="__next_img_default"in F;if(G){if("custom"===u.loader)throw Object.defineProperty(Error('Image with src "'+f+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader'),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=F;F=t=>{let{config:r,...i}=t;return e(i)}}if(O){"fill"===O&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[O];e&&(j={...j,...e});let t={responsive:"100vw",fill:"100vw"}[O];t&&!p&&(p=t)}let V="",H=a(y),q=a(w);if((s=f)&&"object"==typeof s&&(o(s)||void 0!==s.src)){let e=o(f)?f.default:f;if(!e.src)throw Object.defineProperty(Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e)),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!e.height||!e.width)throw Object.defineProperty(Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e)),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(d=e.blurWidth,c=e.blurHeight,S=S||e.blurDataURL,V=e.src,!x)if(H||q){if(H&&!q){let t=H/e.width;q=Math.round(e.height*t)}else if(!H&&q){let t=q/e.height;H=Math.round(e.width*t)}}else H=e.width,q=e.height}let J=!b&&("lazy"===g||void 0===g);(!(f="string"==typeof f?f:V)||f.startsWith("data:")||f.startsWith("blob:"))&&(m=!0,J=!1),u.unoptimized&&(m=!0),G&&!u.dangerouslyAllowSVG&&f.split("?",1)[0].endsWith(".svg")&&(m=!0);let K=a(v),W=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:k}:{},U?{}:{color:"transparent"},j),X=D||"empty"===C?null:"blur"===C?'url("data:image/svg+xml;charset=utf-8,'+(0,i.getImageBlurSvg)({widthInt:H,heightInt:q,blurWidth:d,blurHeight:c,blurDataURL:S||"",objectFit:W.objectFit})+'")':'url("'+C+'")',Y=n.includes(W.objectFit)?"fill"===W.objectFit?"100% 100%":"cover":W.objectFit,Q=X?{backgroundSize:Y,backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},$=function(e){let{config:t,src:r,unoptimized:i,width:l,quality:n,sizes:o,loader:a}=e;if(i)return{src:r,srcSet:void 0,sizes:void 0};let{widths:s,kind:u}=function(e,t,r){let{deviceSizes:i,allSizes:l}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let i;i=e.exec(r);)t.push(parseInt(i[2]));if(t.length){let e=.01*Math.min(...t);return{widths:l.filter(t=>t>=i[0]*e),kind:"w"}}return{widths:l,kind:"w"}}return"number"!=typeof t?{widths:i,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>l.find(t=>t>=e)||l[l.length-1]))],kind:"x"}}(t,l,o),d=s.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:s.map((e,i)=>a({config:t,src:r,quality:n,width:e})+" "+("w"===u?e:i+1)+u).join(", "),src:a({config:t,src:r,quality:n,width:s[d]})}}({config:u,src:f,unoptimized:m,width:H,quality:K,sizes:p,loader:F});return{props:{...I,loading:J?"lazy":g,fetchPriority:M,width:H,height:q,decoding:E,className:h,style:{...W,...Q},sizes:$.sizes,srcSet:$.srcSet,src:_||$.src},meta:{unoptimized:m,priority:b,placeholder:C,fill:x}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let i=e.r(71645),l="undefined"==typeof window,n=l?()=>{}:i.useLayoutEffect,o=l?()=>{}:i.useEffect;function a(e){let{headManager:t,reduceComponentsToState:r}=e;function a(){if(t&&t.mountedInstances){let l=i.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(l,e))}}if(l){var s;null==t||null==(s=t.mountedInstances)||s.add(e.children),a()}return n(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),n(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},58908,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"AmpStateContext",{enumerable:!0,get:function(){return i}});let i=e.r(55682)._(e.r(71645)).default.createContext({})},15986,(e,t,r)=>{"use strict";function i(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:i=!1}=void 0===e?{}:e;return t||r&&i}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isInAmpMode",{enumerable:!0,get:function(){return i}})},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{default:function(){return b},defaultHead:function(){return c}});let i=e.r(55682),l=e.r(90809),n=e.r(18050),o=l._(e.r(71645)),a=i._(e.r(98879)),s=e.r(58908),u=e.r(42732),d=e.r(15986);function c(e){void 0===e&&(e=!1);let t=[(0,n.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let p=["name","httpEquiv","charSet","itemProp"];function m(e,t){let{inAmpMode:r}=t;return e.reduce(f,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,i={};return l=>{let n=!0,o=!1;if(l.key&&"number"!=typeof l.key&&l.key.indexOf("$")>0){o=!0;let t=l.key.slice(l.key.indexOf("$")+1);e.has(t)?n=!1:e.add(t)}switch(l.type){case"title":case"base":t.has(l.type)?n=!1:t.add(l.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(l.props.hasOwnProperty(t))if("charSet"===t)r.has(t)?n=!1:r.add(t);else{let e=l.props[t],r=i[t]||new Set;("name"!==t||!o)&&r.has(e)?n=!1:(r.add(e),i[t]=r)}}}return n}}()).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let b=function(e){let{children:t}=e,r=(0,o.useContext)(s.AmpStateContext),i=(0,o.useContext)(u.HeadManagerContext);return(0,n.jsx)(a.default,{reduceComponentsToState:m,headManager:i,inAmpMode:(0,d.isInAmpMode)(r),children:t})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return n}});let i=e.r(55682)._(e.r(71645)),l=e.r(87690),n=i.default.createContext(l.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return i}});let i=e.r(55682)._(e.r(71645)).default.createContext(null)},1948,(e,t,r)=>{"use strict";function i(e){var t;let{config:r,src:i,width:l,quality:n}=e,o=n||(null==(t=r.qualities)?void 0:t.reduce((e,t)=>Math.abs(t-75)<Math.abs(e-75)?t:e))||75;return r.path+"?url="+encodeURIComponent(i)+"&w="+l+"&q="+o+(i.startsWith("/_next/static/media/"),"")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}}),i.__next_img_default=!0;let l=i},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let i=e.r(55682),l=e.r(90809),n=e.r(18050),o=l._(e.r(71645)),a=i._(e.r(74080)),s=i._(e.r(25633)),u=e.r(8927),d=e.r(87690),c=e.r(18556);e.r(33525);let f=e.r(65856),p=i._(e.r(1948)),m=e.r(18581),b={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/app/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,r,i,l,n,o){let a=null==e?void 0:e.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&l(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,l=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>l,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{l=!0,t.stopPropagation()}})}(null==i?void 0:i.current)&&i.current(e)}}))}function h(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,o.forwardRef)((e,t)=>{let{src:r,srcSet:i,sizes:l,height:a,width:s,decoding:u,className:d,style:c,fetchPriority:f,placeholder:p,loading:b,unoptimized:v,fill:y,onLoadRef:w,onLoadingCompleteRef:x,setBlurComplete:j,setShowAltText:_,sizesInput:A,onLoad:R,onError:C,...S}=e,M=(0,o.useCallback)(e=>{e&&(C&&(e.src=e.src),e.complete&&g(e,p,w,x,j,v,A))},[r,p,w,x,j,C,v,A]),E=(0,m.useMergedRef)(t,M);return(0,n.jsx)("img",{...S,...h(f),loading:b,width:s,height:a,decoding:u,"data-nimg":y?"fill":"1",className:d,style:c,sizes:l,srcSet:i,src:r,ref:E,onLoad:e=>{g(e.currentTarget,p,w,x,j,v,A)},onError:e=>{_(!0),"empty"!==p&&j(!0),C&&C(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,i={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...h(r.fetchPriority)};return t&&a.default.preload?(a.default.preload(r.src,i),null):(0,n.jsx)(s.default,{children:(0,n.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...i},"__nimg-"+r.src+r.srcSet+r.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(f.RouterContext),i=(0,o.useContext)(c.ImageConfigContext),l=(0,o.useMemo)(()=>{var e;let t=b||i||d.imageConfigDefault,r=[...t.deviceSizes,...t.imageSizes].sort((e,t)=>e-t),l=t.deviceSizes.sort((e,t)=>e-t),n=null==(e=t.qualities)?void 0:e.sort((e,t)=>e-t);return{...t,allSizes:r,deviceSizes:l,qualities:n}},[i]),{onLoad:a,onLoadingComplete:s}=e,m=(0,o.useRef)(a);(0,o.useEffect)(()=>{m.current=a},[a]);let g=(0,o.useRef)(s);(0,o.useEffect)(()=>{g.current=s},[s]);let[h,w]=(0,o.useState)(!1),[x,j]=(0,o.useState)(!1),{props:_,meta:A}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:l,blurComplete:h,showAltText:x});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{..._,unoptimized:A.unoptimized,placeholder:A.placeholder,fill:A.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),A.priority?(0,n.jsx)(y,{isAppRouter:!r,imgAttributes:_}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{default:function(){return s},getImageProps:function(){return a}});let i=e.r(55682),l=e.r(8927),n=e.r(5500),o=i._(e.r(1948));function a(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/app/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let s=n.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},85413,e=>{"use strict";e.s(["Empty",()=>n],85413);var t=e.i(18050),r=e.i(57688);let i={src:e.i(96920).default,width:973,height:482,blurWidth:8,blurHeight:4,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAj0lEQVR42gGEAHv/AAAAAAATGRcXg4uIgcjJycORlJOKDxEQDAAAAAAAAAAAAAQEBANfa2Zj5fTu9ff9+/7q8u7uc3p3cgoLCwkAAAAAAEJGRELH1M/S4/jw/tD25v7U9ef+1ubf4jg8OjAAAAAAAHqBfmqxvLiisMG7rK7GvLKxxb2wpbKtoVNYVlADAwMC5U08HYgBOJwAAAAASUVORK5CYII="};var l=e.i(75157);function n(e){let{text:n="暂无数据",className:o,showImage:a=!0,imageSrc:s=i,imageAlt:u="暂无数据",imageSize:d=180,imageClassName:c}=e,f="string"==typeof s?{width:d,height:d}:{width:s.width,height:s.height};return(0,t.jsxs)("div",{className:(0,l.cn)("flex min-h-[180px] w-full flex-col items-center justify-center gap-2 py-4 text-[var(--ds-muted)]",o),role:"status","aria-live":"polite",children:[a?(0,t.jsx)("span",{className:(0,l.cn)("block shrink-0",c),style:{width:d},children:(0,t.jsx)(r.default,{src:s,alt:u,width:f.width,height:f.height,unoptimized:!0,draggable:!1,sizes:"".concat(d,"px"),className:"h-auto w-full object-contain"})}):null,(0,t.jsx)("span",{children:n})]})}},94197,e=>{"use strict";e.s(["IconTooltipButton",()=>a]);var t=e.i(18050),r=e.i(72064),i=e.i(19455),l=e.i(46798),n=e.i(75157);let o={muted:"text-[var(--ds-muted)] hover:text-[var(--ds-text)]",danger:"text-red-600 hover:text-red-800 [&_svg]:!text-red-600 hover:[&_svg]:!text-red-800"};function a(e){let{icon:a,label:s,ariaLabel:u,tone:d="muted",disabled:c,className:f,iconClassName:p,href:m,download:b,onClick:g,iconSize:h=16,strokeWidth:v=1}=e,y=(0,n.cn)("icon-tooltip-btn","inline-flex h-4 w-4 items-center justify-center rounded border-none p-0 transition-colors",o[d],f);return(0,t.jsx)(l.TooltipProvider,{delayDuration:150,children:(0,t.jsxs)(l.Tooltip,{children:[(0,t.jsx)(l.TooltipTrigger,{asChild:!0,children:m?(0,t.jsx)("a",{href:c?void 0:m,download:b,className:y,"aria-label":null!=u?u:s,"aria-disabled":c||void 0,onClick:c?void 0:g,children:(0,t.jsx)(r.default,{name:a,size:h,className:p,strokeWidth:v})}):(0,t.jsx)(i.Button,{type:"button",variant:"plain",size:"icon",className:y,disabled:c,"aria-label":null!=u?u:s,onClick:g,children:(0,t.jsx)(r.default,{name:a,size:16,className:p})})}),(0,t.jsx)(l.TooltipContent,{side:"bottom",align:"center",className:"",children:s})]})})}},55242,e=>{"use strict";e.s(["AppDialog",()=>n]);var t=e.i(18050),r=e.i(71645),i=e.i(76639),l=e.i(75157);function n(e){let{open:n,onOpenChange:o,title:a,children:s,footer:u,width:d="max-w-3xl",minHeight:c}=e,f=(0,r.useId)();return(0,t.jsx)(i.Dialog,{open:n,onOpenChange:o,children:(0,t.jsxs)(i.DialogContent,{"aria-labelledby":f,className:(0,l.cn)(d,c?"!min-h-[--min-h]":""),style:c?{"--min-h":c}:void 0,children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{id:f,children:a}),(0,t.jsx)(i.DialogClose,{"aria-label":"关闭"})]}),(0,t.jsx)(i.DialogBody,{className:"!px-4 !py-3",children:s}),u?(0,t.jsx)("div",{className:"flex flex-shrink-0 justify-end gap-2 border-t border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-sidebar)] px-4 py-3",children:u}):null]})})}},62427,e=>{"use strict";e.s(["clearRuntimeMcpItemConfig",()=>x,"deleteRuntimeMcp",()=>f,"deleteRuntimeSkill",()=>j,"deleteRuntimeTool",()=>c,"exportRuntimeMcpUrl",()=>m,"exportRuntimeSkillUrl",()=>_,"exportRuntimeToolUrl",()=>p,"importRuntimeMcp",()=>g,"importRuntimeTool",()=>b,"installCloudSkill",()=>R,"listBaseSkills",()=>n,"listCloudSkillCatalog",()=>A,"listInstalledSkills",()=>o,"listInstalledTools",()=>l,"listMcpServers",()=>i,"listRuntimeMcpPackages",()=>d,"listRuntimeTools",()=>u,"loadBaseSkillMd",()=>a,"loadRemoteMcpJson",()=>h,"loadRuntimeMcpItemConfig",()=>y,"saveBaseSkillMd",()=>s,"saveRemoteMcpJson",()=>v,"saveRuntimeMcpItemConfig",()=>w]);var t=e.i(29250),r=e.i(36845);async function i(e,i,l){let n=await (0,t.get)((0,r.buildMcpServersListUrl)(e,i,l));return{servers:Array.isArray(n.servers)?n.servers:[]}}async function l(e,i,l){let n=await (0,t.get)((0,r.buildToolInstalledListUrl)(e,i,l));return{tools:Array.isArray(n.tools)?n.tools:[]}}async function n(e,i,l){let n=await (0,t.get)((0,r.buildSkillBaseListUrl)(e,i,l));return{skills:Array.isArray(n.skills)?n.skills:[]}}async function o(e,i,l){let n=await (0,t.get)((0,r.buildSkillInstalledListUrl)(e,i,l));return{skills:Array.isArray(n.skills)?n.skills:[]}}async function a(e,i,l,n){return(0,t.get)((0,r.buildBaseSkillMdUrl)(e,i,l,n))}async function s(e,i,l,n,o){await (0,t.put)((0,r.buildBaseSkillMdUrl)(e,i,l,n),{content:o})}async function u(e,i,l){let n=await (0,t.get)((0,r.buildToolsRuntimeFilesUrl)(e,i,l));return{runtimeToolsDir:"string"==typeof n.runtimeToolsDir?n.runtimeToolsDir:"",items:Array.isArray(n.items)?n.items.filter(e=>!!(e&&e.id)):[]}}async function d(e,i,l){let n=await (0,t.get)((0,r.buildMcpRuntimeFilesUrl)(e,i,l));return{mcpRuntimeDir:"string"==typeof n.mcpRuntimeDir?n.mcpRuntimeDir:"",items:Array.isArray(n.items)?n.items.filter(e=>!!(e&&e.id)):[]}}async function c(e,i,l,n){return(0,t.del)((0,r.buildToolsRuntimeDeleteUrl)(e,i,l,n))}async function f(e,i,l,n){return(0,t.del)((0,r.buildMcpRuntimeDeleteUrl)(e,i,l,n))}function p(e,t,i,l){return(0,r.buildToolsRuntimeExportUrl)(e,t,i,l)}function m(e,t,i,l){return(0,r.buildMcpRuntimeExportUrl)(e,t,i,l)}async function b(e,i,l,n){let o=new FormData;return o.append("file",n),(0,t.post)((0,r.buildToolsRuntimeImportUrl)(e,i,l),o,{type:"file"})}async function g(e,i,l,n){let o=new FormData;return o.append("file",n),(0,t.post)((0,r.buildMcpRuntimeImportUrl)(e,i,l),o,{type:"file"})}async function h(e,i,l){return(0,t.get)((0,r.buildRemoteMcpJsonUrl)(e,i,l))}async function v(e,i,l,n){await (0,t.post)((0,r.buildRemoteMcpJsonUrl)(e,i,l),{content:n})}async function y(e,i,l,n,o){return(0,t.get)((0,r.buildRuntimeMcpItemConfigUrl)(e,i,l,n,o))}async function w(e,i,l,n,o,a){await (0,t.put)((0,r.buildRuntimeMcpItemConfigUrl)(e,i,l,n,o),{server:a})}async function x(e,i,l,n,o){await (0,t.del)((0,r.buildRuntimeMcpItemConfigUrl)(e,i,l,n,o))}async function j(e,i,l,n){return(0,t.del)((0,r.buildSkillsRuntimeDeleteUrl)(e,i,l,n))}function _(e,t,i,l){return(0,r.buildSkillsRuntimeExportUrl)(e,t,i,l)}async function A(e,i,l,n,o,a){let s=await (0,t.get)((0,r.buildCloudSkillCatalogUrl)(e,i,l,n,o,a));return{items:Array.isArray(s.items)?s.items:[],totalPages:Number(s.totalPages||0)}}async function R(e,i,l,n){await (0,t.post)((0,r.buildCloudSkillInstallUrl)(e,i,l),{id:n})}},92715,e=>{"use strict";e.s(["AppTable",()=>c],92715);var t=e.i(18050),r=e.i(85413),i=e.i(71645),l=e.i(75157);let n=i.forwardRef((e,r)=>{let{className:i,...n}=e;return(0,t.jsx)("div",{className:"relative w-full overflow-auto",children:(0,t.jsx)("table",{ref:r,className:(0,l.cn)("w-full caption-bottom border-collapse",i),...n})})});n.displayName="Table";let o=i.forwardRef((e,r)=>{let{className:i,...n}=e;return(0,t.jsx)("thead",{ref:r,className:(0,l.cn)("[&_tr]:table [&_tr]:w-full [&_tr]:table-fixed [&_tr]:border-b",i),...n})});o.displayName="TableHeader";let a=i.forwardRef((e,r)=>{let{className:n,viewportFit:o=!0,viewportReserveBottom:a=16,viewportPaginationReserve:s=0,style:u,...d}=e,c=i.useRef(null),f=i.useCallback(e=>{c.current=e,"function"==typeof r?r(e):r&&(r.current=e)},[r]),[p,m]=i.useState(void 0);return i.useLayoutEffect(()=>{var e,t;if(!o)return void m(void 0);let r=()=>{var e,t;let r=c.current;if(!r)return;let i=r.getBoundingClientRect().top;m(Math.max(80,Math.floor((null!=(t=null==(e=window.visualViewport)?void 0:e.height)?t:window.innerHeight)-i-(a+s))))};r();let i=new ResizeObserver(()=>{r()});try{i.observe(document.body)}catch(e){}return window.addEventListener("resize",r),null==(e=window.visualViewport)||e.addEventListener("resize",r),null==(t=window.visualViewport)||t.addEventListener("scroll",r),window.addEventListener("scroll",r,!0),()=>{var e,t;i.disconnect(),window.removeEventListener("resize",r),null==(e=window.visualViewport)||e.removeEventListener("resize",r),null==(t=window.visualViewport)||t.removeEventListener("scroll",r),window.removeEventListener("scroll",r,!0)}},[o,a,s]),(0,t.jsx)("tbody",{ref:f,className:(0,l.cn)("block overflow-y-auto [&_tr:last-child]:border-b-0 [&_tr:last-child_td]:border-b-0 [&_tr]:table [&_tr]:w-full [&_tr]:table-fixed",n),style:o&&void 0!==p?{...u,maxHeight:p}:u,...d})});a.displayName="TableBody";let s=i.forwardRef((e,r)=>{let{className:i,hoverable:n=!0,...o}=e;return(0,t.jsx)("tr",{ref:r,className:(0,l.cn)("border-b transition-colors [&>td]:transition-colors data-[state=selected]:[&>td]:!bg-[var(--ds-color-surface-item-active)]",n&&"group/table-row",i),...o})});s.displayName="TableRow";let u=i.forwardRef((e,r)=>{let{className:i,...n}=e;return(0,t.jsx)("th",{ref:r,className:(0,l.cn)("h-10 border-b border-[var(--ds-color-border-subtle)] bg-[var(--surface-2)] px-3 text-left align-middle text-[14px] font-medium !text-[var(--ds-text)] text-muted-foreground",i),...n})});u.displayName="TableHead";let d=i.forwardRef((e,r)=>{let{className:i,...n}=e;return(0,t.jsx)("td",{ref:r,className:(0,l.cn)("border-x-0 border-b border-t-0 border-solid border-[var(--ds-color-border-subtle)] p-3 align-middle transition-colors group-has-[td:hover]/table-row:!bg-[var(--ds-color-surface-item-hover)]",i),...n})});function c(e){let{rows:i,columns:c,getRowKey:f,className:p,rowClassName:m,headerRowClassName:b,emptyText:g,emptyNode:h,bodyProps:v}=e;return(0,t.jsx)("div",{className:(0,l.cn)("overflow-hidden border border-[var(--ds-color-border-default)]",p),children:(0,t.jsxs)(n,{children:[(0,t.jsx)(o,{children:(0,t.jsx)(s,{className:(0,l.cn)("bg-[var(--ds-color-surface-main-tint)] hover:bg-[var(--ds-color-surface-main-tint)]",b),children:c.map(e=>(0,t.jsx)(u,{className:e.headerClassName,children:e.title},e.key))})}),(0,t.jsx)(a,{...v,children:i.length?i.map(e=>(0,t.jsx)(s,{className:"function"==typeof m?m(e):m,children:c.map(r=>(0,t.jsx)(d,{className:r.cellClassName,children:r.render(e)},r.key))},f(e))):(0,t.jsx)(s,{hoverable:!1,children:(0,t.jsx)(d,{colSpan:c.length,className:"py-6",children:null!=h?h:(0,t.jsx)(r.Empty,{text:g})})})})]})})}d.displayName="TableCell"}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20783,e=>{"use strict";e.s(["composeRefs",()=>n,"useComposedRefs",()=>o]);var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1,o=t.map(t=>{let o=r(t,e);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let e=0;e<o.length;e++){let n=o[e];"function"==typeof n?n():r(t[e],null)}}}}function o(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.useCallback(n(...r),r)}},24687,e=>{"use strict";e.s(["Textarea",()=>n]);var t=e.i(18050),r=e.i(75157);function n(e){let{className:n,...o}=e;return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex min-h-20 w-full rounded-md border border-solid border-border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none]",n),...o})}},18900,69051,e=>{"use strict";function t(e){let t=null==e?"":String(e);return""===t?'""':/[\s#"'\\\n]/.test(t)||t!==t.trim()?'"'.concat(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t}function r(e){let t=String(e).split(/\r?\n/),r={},n=/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;for(let e=0;e<t.length;e++){let o=t[e],i=n.exec(o);i&&(r[i[1]]=function(e){let t=e.trimEnd();return t.length>=2&&'"'===t[0]&&'"'===t[t.length-1]?t.slice(1,-1).replace(/\\(.)/g,(e,t)=>"n"===t?"\n":'"'===t?'"':"\\"===t?"\\":"\\".concat(t)):t.length>=2&&"'"===t[0]&&"'"===t[t.length-1]?t.slice(1,-1):e}(i[2]))}return r}function n(e,r){let n=Array.isArray(e)?e:[],o=new Set;for(let e=0;e<n.length;e++){let t=n[e];t&&"object"==typeof t&&"string"==typeof t.key&&o.add(t.key)}let i=[];for(let e=0;e<n.length;e++){let o=n[e];if(!o||"object"!=typeof o||"string"!=typeof o.key)continue;let l=o.key;if(!Object.prototype.hasOwnProperty.call(r,l))continue;let s=r[l];null!=s&&""!==String(s).trim()&&i.push("".concat(l,"=").concat(t(String(s))))}let l=Object.keys(r).filter(e=>!o.has(e)).sort();for(let e=0;e<l.length;e++){let n=l[e],o=r[n];null!=o&&""!==String(o).trim()&&i.push("".concat(n,"=").concat(t(String(o))))}let s=i.join("\n");return s.length>0?"".concat(s,"\n"):""}e.s(["buildEnvFileContentFromForm",()=>n,"parseEnvContentToMap",()=>r],18900),e.s(["loadDemoSingleMessage",()=>c,"loadSystemEnv",()=>l,"saveSystemEnv",()=>s,"saveSystemMcpJson",()=>a],69051);var o=e.i(29250),i=e.i(36845);async function l(e,t,r){return(0,o.get)((0,i.buildSystemEnvApiUrl)(e,t,r))}async function s(e,t,r,n){await (0,o.patch)((0,i.buildSystemEnvApiUrl)(e,t,r),{content:n})}async function a(e,t,r,n){await (0,o.patch)((0,i.buildSystemMcpJsonApiUrl)(e,t,r),{content:n})}async function c(){return(0,o.get)("/api/demo/single-message")}},96188,e=>{"use strict";e.s(["LLM_MODEL_KEY",()=>t,"LLM_PROVIDER_ID_KEY",()=>r,"PERMISSION_MODE_EMPTY_SENTINEL",()=>s,"WS_ALLOW_TOOL_ASK_ALLOWED",()=>l,"WS_ALLOW_TOOL_ASK_KEY",()=>o,"WS_PERMISSION_MODE_ALLOWED",()=>i,"WS_PERMISSION_MODE_KEY",()=>n]);let t="LLM_MODEL",r="LLM_PROVIDER_ID",n="WS_PERMISSION_MODE",o="WS_ALLOW_TOOL_ASK",i=["acceptEdits","plan","default","dontAsk","bypassPermissions"],l=new Set(["0","1"]),s="__empty__"},50052,e=>{"use strict";e.s(["deleteRepoFile",()=>i,"fetchRepoEntries",()=>n,"fetchRepoFilePreview",()=>o,"uploadWorkspaceFile",()=>l]);var t=e.i(29250),r=e.i(36845);async function n(e,n,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",l=await (0,t.get)((0,r.buildRepoEntriesUrl)(e,n,o,i));if(!l.entries)throw Error(l.message||"获取目录条目失败");return l.entries}async function o(e,n,o,i){return(await (0,t.bridgeFetch)((0,r.buildRepoFileUrl)(e,n,o,i,!0),{method:"GET",raw:!0})).text()}async function i(e,n,o,i){await (0,t.del)((0,r.buildRepoFileUrl)(e,n,o,i))}async function l(e,n,o,i){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=new FormData;s.append("file",i),s.append("path",l);let a=await (0,t.post)((0,r.buildRepoUploadUrl)(e,n,o),s,{type:"file"}),c="string"==typeof a.path?a.path.trim():"";if(!c)throw Error(a.message||a.error||"上传失败:未返回文件路径");return{path:c}}},51996,e=>{e.v("/app/_next/static/media/upload-file.88541e18.png")}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51419,e=>{"use strict";e.s(["AppTabs",()=>ea,"AppTabsPanel",()=>el],51419);var t=e.i(18050),n=e.i(71645),i=e.i(75157);e.s(["Indicator",()=>j,"List",()=>Q,"Panel",()=>z,"Root",()=>b,"Tab",()=>T],32532),e.s([],93115),e.i(93115),e.i(47167);var r=e.i(94349),a=e.i(977),l=e.i(76477),o=e.i(69095),u=e.i(39060),s=e.i(67805);let c=n.createContext(void 0);function d(){let e=n.useContext(c);if(void 0===e)throw Error((0,s.default)(64));return e}let f=function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e}({}),p={tabActivationDirection:e=>({[f.activationDirection]:e})};var g=e.i(31888),v=e.i(71403);let b=n.forwardRef(function(e,i){let{className:s,defaultValue:d=0,onValueChange:f,orientation:b="horizontal",render:m,value:y,style:R,...A}=e,x=void 0!==e.defaultValue,S=n.useRef([]),[w,E]=n.useState(()=>new Map),[T,C]=(0,r.useControlled)({controlled:y,default:d,name:"Tabs",state:"value"}),I=void 0!==y,[O,M]=n.useState(()=>new Map),N=n.useCallback(e=>{if(void 0===e)return null;for(let[n,i]of O.entries()){var t;if(null!=i&&e===(null!=(t=i.value)?t:i.index))return n}return null},[O]),[L,D]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:_}=L,W=_,j=!1;k!==T&&(W=h(k,T,b,O),j=null!=k&&null!=T&&null==N(T));let P=j?k:T,H=k!==P||_!==W;(0,a.useIsoLayoutEffect)(()=>{H&&D({previousValue:P,tabActivationDirection:W})},[P,H,W]);let B=(0,l.useStableCallback)((e,t)=>{t.activationDirection=h(T,e,b,O),null==f||f(e,t),t.isCanceled||C(e)}),U=(0,l.useStableCallback)((e,t)=>{null==f||f(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),K=(0,l.useStableCallback)((e,t)=>{E(n=>{if(n.get(e)===t)return n;let i=new Map(n);return i.set(e,t),i})}),Y=(0,l.useStableCallback)((e,t)=>{E(n=>{if(!n.has(e)||n.get(e)!==t)return n;let i=new Map(n);return i.delete(e),i})}),V=n.useCallback(e=>w.get(e),[w]),z=n.useCallback(e=>{for(let t of O.values())if(e===(null==t?void 0:t.value))return null==t?void 0:t.id},[O]),F=n.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:z,getTabPanelIdByValue:V,onValueChange:B,orientation:b,registerMountedTabPanel:K,setTabMap:M,unregisterMountedTabPanel:Y,tabActivationDirection:W,value:T}),[N,z,V,B,b,K,M,Y,W,T]),G=n.useMemo(()=>{for(let e of O.values())if(null!=e&&e.value===T)return e},[O,T]),q=n.useMemo(()=>{for(let e of O.values())if(null!=e&&!e.disabled)return e.value},[O]),X=n.useRef(!x),Z=n.useRef(x),$=n.useRef(!1);(0,a.useIsoLayoutEffect)(()=>{if(I)return;function e(e,t){C(e),D(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),U(e,t),X.current=!1}if(0===O.size){if(!$.current||null===T)return;e(null,v.REASONS.missing);return}$.current=!0;let t=null==G?void 0:G.disabled,n=null==G&&null!==T;if(t||T!==d||(Z.current=!1),Z.current&&t&&T===d)return;let i=X.current;if(t||n){let n=null!=q?q:null;if(T===n){X.current=!1;return}let r=v.REASONS.missing;i?r=v.REASONS.initial:t&&(r=v.REASONS.disabled),e(n,r);return}i&&null!=G&&(U(T,v.REASONS.initial),X.current=!1)},[d,q,I,U,G,C,O,T]);let J={orientation:b,tabActivationDirection:W},Q=(0,o.useRenderElement)("div",e,{state:J,ref:i,props:A,stateAttributesMapping:p});return(0,t.jsx)(c.Provider,{value:F,children:(0,t.jsx)(u.CompositeList,{elementsRef:S,children:Q})})});function h(e,t,n,i){if(null==e||null==t)return"none";let r=null,a=null;for(let[n,o]of i.entries()){var l;if(null==o)continue;let i=null!=(l=o.value)?l:o.index;if(e===i&&(r=n),t===i&&(a=n),null!=r&&null!=a)break}if(null==r||null==a)return r!==a&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===n?t>e?"right":"left":t>e?"down":"up":"none";let o=r.getBoundingClientRect(),u=a.getBoundingClientRect();if("horizontal"===n){if(u.left<o.left)return"left";if(u.left>o.left)return"right"}else{if(u.top<o.top)return"up";if(u.top>o.top)return"down"}return"none"}var m=e.i(90219),y=e.i(86790),R=e.i(53402);let A="data-composite-item-active";var x=e.i(37081);let S=n.createContext(void 0);function w(){let e=n.useContext(S);if(void 0===e)throw Error((0,s.default)(65));return e}var E=e.i(30780);let T=n.forwardRef(function(e,t){let{className:i,disabled:r=!1,render:l,value:u,id:s,nativeButton:c=!0,style:f,...p}=e,{value:b,getTabPanelIdByValue:h,orientation:S}=d(),{activateOnFocus:T,highlightedTabIndex:C,onTabActivation:I,registerTabResizeObserverElement:O,setHighlightedTabIndex:M,tabsListElement:N}=w(),L=(0,y.useBaseUiId)(s),D=n.useMemo(()=>({disabled:r,id:L,value:u}),[r,L,u]),{compositeProps:k,compositeRef:_,index:W}=(0,x.useCompositeItem)({metadata:D}),j=u===b,P=n.useRef(!1),H=n.useRef(null);n.useEffect(()=>{let e=H.current;if(e)return O(e)},[O]),(0,a.useIsoLayoutEffect)(()=>{if(P.current){P.current=!1;return}if(j&&W>-1&&C!==W){if(null!=N){let e=(0,E.activeElement)((0,m.ownerDocument)(N));if(e&&(0,E.contains)(N,e))return}r||M(W)}},[j,W,C,M,r,N]);let{getButtonProps:B,buttonRef:U}=(0,R.useButton)({disabled:r,native:c,focusableWhenDisabled:!0}),K=h(u),Y=n.useRef(!1),V=n.useRef(!1);return(0,o.useRenderElement)("button",e,{state:{disabled:r,active:j,orientation:S},ref:[t,U,_,H],props:[k,{role:"tab","aria-controls":K,"aria-selected":j,id:L,onClick:function(e){j||r||I(u,(0,g.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){!j&&(W>-1&&!r&&M(W),!r&&T&&(!Y.current||Y.current&&V.current)&&I(u,(0,g.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){j||r||(Y.current=!0,e.button&&0!==e.button||(V.current=!0,(0,m.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){Y.current=!1,V.current=!1},{once:!0})))},[A]:j?"":void 0,onKeyDownCapture(){P.current=!0}},p,B]})});var C=e.i(53585),I=e.i(2239),O=e.i(17514);function M(){return O.NOOP}function N(){return!1}function L(){return!0}let D=function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e}({}),k=n.createContext(void 0),_={disableStyleElements:!1},W={...p,activeTabPosition:()=>null,activeTabSize:()=>null},j=n.forwardRef(function(e,i){var r;let{className:a,render:l,renderBeforeHydration:u=!1,style:s,...c}=e,{nonce:f}=null!=(r=n.useContext(k))?r:_,{getTabElementBySelectedValue:p,orientation:g,tabActivationDirection:v,value:b}=d(),{tabsListElement:h,registerIndicatorUpdateListener:m}=w(),y=(0,I.useSyncExternalStore)(M,N,L),R=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>m(R),[m,R]);let A=0,x=0,S=0,E=0,T=0,O=0,j=!1;if(null!=b&&null!=h){let e=p(b);if(j=!0,null!=e){let{width:t,height:n}=(0,C.getCssDimensions)(e),{width:i,height:r}=(0,C.getCssDimensions)(h),a=e.getBoundingClientRect(),l=h.getBoundingClientRect(),o=i>0?l.width/i:1,u=r>0?l.height/r:1;if(Math.abs(o)>Number.EPSILON&&Math.abs(u)>Number.EPSILON){let e=a.left-l.left,t=a.top-l.top;A=e/o+h.scrollLeft-h.clientLeft,S=t/u+h.scrollTop-h.clientTop}else A=e.offsetLeft,S=e.offsetTop;T=t,O=n,x=h.scrollWidth-A-T,E=h.scrollHeight-S-O}}let P=j?{left:A,right:x,top:S,bottom:E}:null,H=j?{width:T,height:O}:null,B=j?{[D.activeTabLeft]:"".concat(A,"px"),[D.activeTabRight]:"".concat(x,"px"),[D.activeTabTop]:"".concat(S,"px"),[D.activeTabBottom]:"".concat(E,"px"),[D.activeTabWidth]:"".concat(T,"px"),[D.activeTabHeight]:"".concat(O,"px")}:void 0,U=j&&T>0&&O>0,K=(0,o.useRenderElement)("span",e,{state:{orientation:g,activeTabPosition:P,activeTabSize:H,tabActivationDirection:v},ref:i,props:[{role:"presentation",style:B,hidden:!U},c,{suppressHydrationWarning:!0}],stateAttributesMapping:W});return null==b?null:(0,t.jsxs)(n.Fragment,{children:[K,y&&u&&(0,t.jsx)("script",{nonce:f,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var P=e.i(58130),H=e.i(14060),B=e.i(23715),U=e.i(61463),K=e.i(13952);let Y=function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",e[e.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",e}({}),V={...p,...H.transitionStatusMapping},z=n.forwardRef(function(e,t){let{className:i,value:r,render:l,keepMounted:u=!1,style:s,...c}=e,{value:f,getTabIdByPanelValue:p,orientation:g,tabActivationDirection:v,registerMountedTabPanel:b,unregisterMountedTabPanel:h}=d(),m=(0,y.useBaseUiId)(),R=n.useMemo(()=>({id:m,value:r}),[m,r]),{ref:A,index:x}=(0,K.useCompositeListItem)({metadata:R}),S=r===f,{mounted:w,transitionStatus:E,setMounted:T}=(0,U.useTransitionStatus)(S),C=!w,I=p(r),O=n.useRef(null),M=(0,o.useRenderElement)("div",e,{state:{hidden:C,orientation:g,tabActivationDirection:v,transitionStatus:E},ref:[t,A,O],props:[{"aria-labelledby":I,hidden:C,id:m,role:"tabpanel",tabIndex:S?0:-1,inert:(0,P.inertValue)(!S),[Y.index]:x},c],stateAttributesMapping:V});return((0,B.useOpenChangeComplete)({open:S,ref:O,onComplete(){S||T(!1)}}),(0,a.useIsoLayoutEffect)(()=>{if((!C||u)&&null!=m)return b(r,m),()=>{h(r,m)}},[C,u,r,m,b,h]),u||w)?M:null});var F=e.i(26292),G=e.i(96374),q=e.i(43801);let X=[];var Z=e.i(84977),$=e.i(91822);function J(e){let{render:i,className:r,style:a,refs:s=O.EMPTY_ARRAY,props:c=O.EMPTY_ARRAY,state:d=O.EMPTY_OBJECT,stateAttributesMapping:f,highlightedIndex:p,onHighlightedIndexChange:g,orientation:v,dense:b,itemSizes:h,loopFocus:m,onLoop:y,cols:R,enableHomeAndEndKeys:x,onMapChange:S,stopEventPropagation:w=!0,rootRef:T,disabledIndices:C,modifierKeys:I,highlightItemOnHover:M=!1,tag:N="div",...L}=e,{props:D,highlightedIndex:k,onHighlightedIndexChange:_,elementsRef:W,onMapChange:j,relayKeyboardEvent:P}=function(e){let{itemSizes:t,cols:i=1,loopFocus:r=!0,onLoop:a,dense:o=!1,orientation:u="both",direction:s,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:p=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:b=X}=e,[h,m]=n.useState(0),y=i>1,R=n.useRef(null),x=(0,F.useMergedRefs)(R,f),S=n.useRef([]),w=n.useRef(!1),T=null!=c?c:h,C=(0,l.useStableCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((null!=d?d:m)(e),t){let t=S.current[e];(0,G.scrollIntoViewIfNeeded)(R.current,t,s,u)}}),I=(0,l.useStableCallback)(e=>{var t;if(0===e.size||w.current)return;w.current=!0;let n=Array.from(e.keys()),i=null!=(t=n.find(e=>null==e?void 0:e.hasAttribute(A)))?t:null,r=i?n.indexOf(i):-1;-1!==r&&C(r),(0,G.scrollIntoViewIfNeeded)(R.current,i,s,u)}),O=(0,l.useStableCallback)((e,t,n)=>a?null==a?void 0:a(e,t,n,S):n),M=n.useMemo(()=>({"aria-orientation":"both"===u?void 0:u,ref:x,onFocus(e){var t;let n=R.current,i=(0,E.getTarget)(e.nativeEvent);n&&null!=i&&(0,G.isNativeInput)(i)&&i.setSelectionRange(0,null!=(t=i.value.length)?t:0)},onKeyDown(e){var n;let l=p?G.COMPOSITE_KEYS:G.ARROW_KEYS;if(!l.has(e.key)||function(e,t){for(let n of G.MODIFIER_KEYS.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}(e,b)||!R.current)return;let c="rtl"===s,d=c?G.ARROW_LEFT:G.ARROW_RIGHT,f={horizontal:d,vertical:G.ARROW_DOWN,both:d}[u],h=c?G.ARROW_RIGHT:G.ARROW_LEFT,m={horizontal:h,vertical:G.ARROW_UP,both:h}[u],A=(0,E.getTarget)(e.nativeEvent);if(null!=A&&(0,G.isNativeInput)(A)&&!(null==A||A.hasAttribute("disabled")||"true"===A.getAttribute("aria-disabled"))){let t=A.selectionStart,i=A.selectionEnd,r=null!=(n=A.value)?n:"";if(null==t||e.shiftKey||t!==i||e.key!==m&&t<r.length||e.key!==f&&t>0)return}let x=T,w=(0,q.getMinListIndex)(S,v),I=(0,q.getMaxListIndex)(S,v);if(y){let n=t||Array.from({length:S.current.length},()=>({width:1,height:1})),a=(0,q.createGridCellMap)(n,i,o),l=a.findIndex(e=>null!=e&&!(0,q.isListIndexDisabled)(S.current,e,v)),s=a.reduce((e,t,n)=>null==t||(0,q.isListIndexDisabled)(S.current,t,v)?e:n,-1);x=a[(0,q.getGridNavigatedIndex)(a.map(e=>null!=e?S.current[e]:null),{event:e,orientation:u,loopFocus:r,onLoop:O,cols:i,disabledIndices:(0,q.getGridCellIndices)([...v||S.current.map((e,t)=>(0,q.isListIndexDisabled)(S.current,t)?t:void 0),void 0],a),minIndex:l,maxIndex:s,prevIndex:(0,q.getGridCellIndexOfCorner)(T>I?w:T,n,a,i,e.key===G.ARROW_DOWN?"bl":e.key===G.ARROW_RIGHT?"tr":"tl"),rtl:c})]}let M={horizontal:[d],vertical:[G.ARROW_DOWN],both:[d,G.ARROW_DOWN]}[u],N={horizontal:[h],vertical:[G.ARROW_UP],both:[h,G.ARROW_UP]}[u],L=y?l:({horizontal:p?G.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:G.HORIZONTAL_KEYS,vertical:p?G.VERTICAL_KEYS_WITH_EXTRA_KEYS:G.VERTICAL_KEYS,both:l})[u];p&&(e.key===G.HOME?x=w:e.key===G.END&&(x=I)),x===T&&(M.includes(e.key)||N.includes(e.key))&&(r&&x===I&&M.includes(e.key)?(x=w,a&&(x=a(e,T,x,S))):r&&x===w&&N.includes(e.key)?(x=I,a&&(x=a(e,T,x,S))):x=(0,q.findNonDisabledListIndex)(S.current,{startingIndex:x,decrement:N.includes(e.key),disabledIndices:v})),x===T||(0,q.isIndexOutOfListBounds)(S.current,x)||(g&&e.stopPropagation(),L.has(e.key)&&e.preventDefault(),C(x,!0),queueMicrotask(()=>{var e;null==(e=S.current[x])||e.focus()}))}}),[i,o,s,v,S,p,T,y,t,r,a,O,x,b,C,u,g]);return n.useMemo(()=>({props:M,highlightedIndex:T,onHighlightedIndexChange:C,elementsRef:S,disabledIndices:v,onMapChange:I,relayKeyboardEvent:M.onKeyDown}),[M,T,C,S,v,I])}({itemSizes:h,cols:R,loopFocus:m,onLoop:y,dense:b,orientation:v,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:x,direction:(0,$.useDirection)(),disabledIndices:C,modifierKeys:I}),H=(0,o.useRenderElement)(N,e,{state:d,ref:s,props:[D,...c,L],stateAttributesMapping:f}),B=n.useMemo(()=>({highlightedIndex:k,onHighlightedIndexChange:_,highlightItemOnHover:M,relayKeyboardEvent:P}),[k,_,M,P]);return(0,t.jsx)(Z.CompositeRootContext.Provider,{value:B,children:(0,t.jsx)(u.CompositeList,{elementsRef:W,onMapChange:e=>{null==S||S(e),j(e)},children:H})})}let Q=n.forwardRef(function(e,i){let{activateOnFocus:r=!1,className:a,loopFocus:o=!0,render:u,style:s,...c}=e,{onValueChange:f,orientation:g,value:v,setTabMap:b,tabActivationDirection:h}=d(),[m,y]=n.useState(0),[R,A]=n.useState(null),x=n.useRef(new Set),w=n.useRef(new Set),E=n.useRef(null);n.useEffect(()=>{if("undefined"==typeof ResizeObserver)return;let e=new ResizeObserver(()=>{x.current.forEach(e=>{e()})});return E.current=e,R&&e.observe(R),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),E.current=null}},[R]);let T=(0,l.useStableCallback)(e=>(x.current.add(e),()=>{x.current.delete(e)})),C=(0,l.useStableCallback)(e=>{var t;return w.current.add(e),null==(t=E.current)||t.observe(e),()=>{var t;w.current.delete(e),null==(t=E.current)||t.unobserve(e)}}),I=(0,l.useStableCallback)((e,t)=>{e!==v&&f(e,t)}),M=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:m,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:C,onTabActivation:I,setHighlightedTabIndex:y,tabsListElement:R}),[r,m,T,C,I,y,R]);return(0,t.jsx)(S.Provider,{value:M,children:(0,t.jsx)(J,{render:u,className:a,style:s,state:{orientation:g,tabActivationDirection:h},refs:[i,A],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:p,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:y,onMapChange:b,disabledIndices:O.EMPTY_ARRAY})})});var ee=e.i(32532),ee=ee;function et(e){let{className:n,onValueChange:r,...a}=e;return(0,t.jsx)(ee.Root,{"data-slot":"tabs",className:(0,i.cn)("group/tabs flex min-h-0 min-w-0 flex-col",n),onValueChange:e=>null==r?void 0:r(String(e)),...a})}function en(e){let{className:n,variant:r="default",...a}=e;return(0,t.jsx)(ee.List,{"data-slot":"tabs-list","data-variant":r,className:(0,i.cn)("group/tabs-list inline-flex items-center","default"===r&&"h-10 w-fit rounded-lg border border-[var(--ds-border)] bg-[var(--ds-main-tint)] p-1","line"===r&&"h-11","pill"===r&&"gap-1 rounded-full border border-black/[0.06] bg-[#e9e9e9] p-1 shadow-sm",n),style:{..."line"===r&&{borderBottom:"1px solid var(--border-hover)"}},...a})}function ei(e){let{className:n,...r}=e;return(0,t.jsx)(ee.Tab,{"data-slot":"tabs-trigger",className:(0,i.cn)("inline-flex items-center justify-center transition-colors","cursor-pointer disabled:pointer-events-none disabled:opacity-50","group-data-[variant=default]/tabs-list:h-8 ",'relative inline-flex pb-[1px] items-center justify-center gap-1.5 h-[calc(100%-2px)] bg-transparent border-0 mr-4 text-[var(--ds-muted)] mb-[-2px] hover:text-[var(--ds-text)] data-[active]:text-[var(--ds-accent)] data-[active]:font-medium data-[active]:after:absolute data-[active]:after:bottom-[-1px] data-[active]:after:left-0 data-[active]:after:right-0 data-[active]:after:h-[2px] data-[active]:after:bg-[var(--ds-accent)] data-[active]:after:content-[""]',"group-data-[variant=pill]/tabs-list:h-9 group-data-[variant=pill]/tabs-list:px-5 group-data-[variant=pill]/tabs-list:mr-0 group-data-[variant=pill]/tabs-list:mb-0 group-data-[variant=pill]/tabs-list:pb-0 group-data-[variant=pill]/tabs-list:rounded-full group-data-[variant=pill]/ group-data-[variant=pill]/tabs-list:font-semibold group-data-[variant=pill]/tabs-list:text-[#828282] group-data-[variant=pill]/tabs-list:data-[active]:bg-[#fff] group-data-[variant=pill]/tabs-list:data-[active]:text-[#333333] group-data-[variant=pill]/tabs-list:data-[active]:font-bold group-data-[variant=pill]/tabs-list:data-[active]:shadow-[0_2px_10px_rgba(15,23,42,0.08)] group-data-[variant=pill]/tabs-list:data-[active]:after:[content:none]",n),...r})}function er(e){let{className:n,...r}=e;return(0,t.jsx)(ee.Panel,{"data-slot":"tabs-content",className:(0,i.cn)("mt-4 min-h-0 min-w-0 outline-none",n),...r})}function ea(e){var r,a;let{tabs:l,defaultValue:o,value:u,onChange:s,className:c,listVariant:d="default",listClassName:f,triggerClassName:p,contentClassName:g,children:v}=e,b=null!=(a=null==(r=l[0])?void 0:r.value)?a:"",[h,m]=n.useState(null!=o?o:b),y=void 0!==u,R=y?u:h;n.useEffect(()=>{if(!l.length||l.some(e=>e.value===R))return;let e=l[0].value;y||m(e),null==s||s(e)},[l,R,y,s]);let A=n.useCallback(e=>{y||m(e),null==s||s(e)},[y,s]),x="function"==typeof v?v(R):v;return(0,t.jsxs)(et,{value:R,defaultValue:o,onValueChange:A,className:(0,i.cn)("flex min-h-0 min-w-0 flex-1 flex-col",c),children:[(0,t.jsx)(en,{variant:d,className:f,children:l.map(e=>(0,t.jsx)(ei,{value:e.value,disabled:e.disabled,className:p,children:e.label},e.value))}),(0,t.jsx)("div",{className:(0,i.cn)("min-h-0 min-w-0 flex-1",g),children:x})]})}function el(e){let{value:n,className:r,children:a}=e;return(0,t.jsx)(er,{value:n,className:(0,i.cn)("mt-4",r),children:a})}},8279,e=>{"use strict";e.s(["avatarBgForLabel",()=>i,"initialsFromLabel",()=>n]);let t=["#9A3B32","#1db887","#4da3ff","#8b5cf6","#e84855","#f5c518"];function n(e){let t=e.trim();if(!t)return"?";let n=t.split(/\s+/).filter(Boolean);if(n.length>=2){var i,r;let e=null==(i=n[0])?void 0:i.slice(0,1),t=null==(r=n[1])?void 0:r.slice(0,1);if(e&&t)return"".concat(e).concat(t).toUpperCase()}return t.slice(0,2).toUpperCase()}function i(e){var n;let i=String(e||"?"),r=0;for(let e=0;e<i.length;e++)r=(r+17*i.charCodeAt(e))%t.length;return null!=(n=t[r])?n:t[0]}},52727,e=>{"use strict";e.s(["addTeamMember",()=>v,"createAgent",()=>f,"deleteAgentItem",()=>h,"getAgentDetail",()=>d,"listAgents",()=>u,"listAgentsForManage",()=>s,"removeTeamMember",()=>b,"updateAgent",()=>p]);var t=e.i(29250),n=e.i(36845);function i(e){let t=null!=e.id?String(e.id).trim():"";if(!t)return null;let n="string"==typeof e.displayName&&e.displayName.trim()?e.displayName.trim():t;return{id:t,displayName:n}}function r(e){if("string"==typeof e.whentouse)return e.whentouse;let t=e.config;if(t&&"object"==typeof t&&!Array.isArray(t)){let e=t.whentouse;if("string"==typeof e)return e}return""}function a(e){let t=e.agentTeamMembers;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||"object"!=typeof e)continue;let t=null!=e.agentType?String(e.agentType).trim():"";t&&n.push({agentType:t,whentouse:"string"==typeof e.whentouse?e.whentouse:""})}return n}function l(e){let t=i(e);return t?{...t,whentouse:r(e),agentTeamMembers:a(e)}:null}function o(e,t){let n=e&&"object"==typeof e?e:{},i=n.env&&"object"==typeof n.env&&!Array.isArray(n.env)?Object.fromEntries(Object.entries(n.env).map(e=>{let[t,n]=e;return[t,null==n?"":String(n)]})):{},r={tools:Array.isArray(n.tools)?n.tools.map(String):[],disallowedTools:Array.isArray(n.disallowedTools)?n.disallowedTools.map(String):[],mcpServers:Array.isArray(n.mcpServers)?n.mcpServers.map(String):[],skills:Array.isArray(n.skills)?n.skills.map(String):[],agentTeams:Array.isArray(n.agentTeams)?n.agentTeams.map(String):[],rules:Array.isArray(n.rules)?n.rules.map(String):[],model:"string"==typeof n.model?n.model:"",background:!0===n.background,isolation:"string"==typeof n.isolation?n.isolation:"",whentouse:"string"==typeof t?t:"",env:i,effort:null};return("string"==typeof n.effort||"number"==typeof n.effort)&&(r.effort=n.effort),r}async function u(e,t){return(await c(e,t)).map(i).filter(e=>null!=e)}async function s(e,t){return(await c(e,t)).map(l).filter(e=>null!=e)}async function c(e,i){let r=(await (0,t.get)((0,n.buildAgentsListUrl)(e,i))).agents;return Array.isArray(r)?r.filter(e=>null!=e&&"object"==typeof e):[]}async function d(e,i,a){let l=a.trim(),o=(await (0,t.get)((0,n.buildAgentItemUrl)(e,i,l))).agent,u=o&&"string"==typeof o.prompt?o.prompt:"",s=(null==o?void 0:o.config)&&"object"==typeof o.config?o.config:null;return{id:l,prompt:u,whentouse:r({whentouse:null==o?void 0:o.whentouse,config:null==o?void 0:o.config}),config:s}}async function f(e,i,r){let a=r.id.trim();await (0,t.post)((0,n.buildAgentsListUrl)(e,i),{name:a,prompt:r.prompt});let l=await d(e,i,a);return await (0,t.patch)((0,n.buildAgentItemUrl)(e,i,a),{config:o(l.config,r.whentouse)}),a}async function p(e,i,r){let a=r.id.trim();if(!a)throw Error("缺少 agent id");return await (0,t.patch)((0,n.buildAgentItemUrl)(e,i,a),{prompt:r.prompt,config:o(r.baseConfig,r.whentouse)}),a}function g(e){return e&&"object"==typeof e?a(e):[]}async function v(e,i,r,a){let l=r.trim(),o=a.trim();if(!l)throw Error("缺少 leader id");if(!o)throw Error("缺少 agentType");return g((await (0,t.post)((0,n.buildAgentTeamMembersUrl)(e,i,l),{agentType:o})).agent)}async function b(e,i,r,a){let l=r.trim(),o=a.trim();if(!l)throw Error("缺少 leader id");if(!o)throw Error("缺少 agentType");return g((await (0,t.del)((0,n.buildAgentTeamMemberUrl)(e,i,l,o))).agent)}async function h(e,i,r){let a=r.trim();if(!a)throw Error("缺少 agent id");try{await (0,t.del)((0,n.buildAgentItemUrl)(e,i,a))}catch(r){if(r instanceof t.ApiError&&400===r.status&&String(r.message).includes("missing required query parameter: agent"))return void await (0,t.del)((0,n.buildAgentApiUrl)(e,i,a));throw r}}}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51419,e=>{"use strict";e.s(["AppTabs",()=>ea,"AppTabsPanel",()=>el],51419);var t=e.i(18050),n=e.i(71645),i=e.i(75157);e.s(["Indicator",()=>j,"List",()=>Q,"Panel",()=>z,"Root",()=>b,"Tab",()=>T],32532),e.s([],93115),e.i(93115),e.i(47167);var r=e.i(94349),a=e.i(977),l=e.i(76477),o=e.i(69095),u=e.i(39060),s=e.i(67805);let c=n.createContext(void 0);function d(){let e=n.useContext(c);if(void 0===e)throw Error((0,s.default)(64));return e}let f=function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e}({}),p={tabActivationDirection:e=>({[f.activationDirection]:e})};var g=e.i(31888),v=e.i(71403);let b=n.forwardRef(function(e,i){let{className:s,defaultValue:d=0,onValueChange:f,orientation:b="horizontal",render:m,value:y,style:R,...A}=e,x=void 0!==e.defaultValue,S=n.useRef([]),[w,E]=n.useState(()=>new Map),[T,C]=(0,r.useControlled)({controlled:y,default:d,name:"Tabs",state:"value"}),I=void 0!==y,[O,M]=n.useState(()=>new Map),N=n.useCallback(e=>{if(void 0===e)return null;for(let[n,i]of O.entries()){var t;if(null!=i&&e===(null!=(t=i.value)?t:i.index))return n}return null},[O]),[L,D]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:_}=L,W=_,j=!1;k!==T&&(W=h(k,T,b,O),j=null!=k&&null!=T&&null==N(T));let P=j?k:T,H=k!==P||_!==W;(0,a.useIsoLayoutEffect)(()=>{H&&D({previousValue:P,tabActivationDirection:W})},[P,H,W]);let B=(0,l.useStableCallback)((e,t)=>{t.activationDirection=h(T,e,b,O),null==f||f(e,t),t.isCanceled||C(e)}),U=(0,l.useStableCallback)((e,t)=>{null==f||f(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),K=(0,l.useStableCallback)((e,t)=>{E(n=>{if(n.get(e)===t)return n;let i=new Map(n);return i.set(e,t),i})}),Y=(0,l.useStableCallback)((e,t)=>{E(n=>{if(!n.has(e)||n.get(e)!==t)return n;let i=new Map(n);return i.delete(e),i})}),V=n.useCallback(e=>w.get(e),[w]),z=n.useCallback(e=>{for(let t of O.values())if(e===(null==t?void 0:t.value))return null==t?void 0:t.id},[O]),F=n.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:z,getTabPanelIdByValue:V,onValueChange:B,orientation:b,registerMountedTabPanel:K,setTabMap:M,unregisterMountedTabPanel:Y,tabActivationDirection:W,value:T}),[N,z,V,B,b,K,M,Y,W,T]),G=n.useMemo(()=>{for(let e of O.values())if(null!=e&&e.value===T)return e},[O,T]),q=n.useMemo(()=>{for(let e of O.values())if(null!=e&&!e.disabled)return e.value},[O]),X=n.useRef(!x),Z=n.useRef(x),$=n.useRef(!1);(0,a.useIsoLayoutEffect)(()=>{if(I)return;function e(e,t){C(e),D(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),U(e,t),X.current=!1}if(0===O.size){if(!$.current||null===T)return;e(null,v.REASONS.missing);return}$.current=!0;let t=null==G?void 0:G.disabled,n=null==G&&null!==T;if(t||T!==d||(Z.current=!1),Z.current&&t&&T===d)return;let i=X.current;if(t||n){let n=null!=q?q:null;if(T===n){X.current=!1;return}let r=v.REASONS.missing;i?r=v.REASONS.initial:t&&(r=v.REASONS.disabled),e(n,r);return}i&&null!=G&&(U(T,v.REASONS.initial),X.current=!1)},[d,q,I,U,G,C,O,T]);let J={orientation:b,tabActivationDirection:W},Q=(0,o.useRenderElement)("div",e,{state:J,ref:i,props:A,stateAttributesMapping:p});return(0,t.jsx)(c.Provider,{value:F,children:(0,t.jsx)(u.CompositeList,{elementsRef:S,children:Q})})});function h(e,t,n,i){if(null==e||null==t)return"none";let r=null,a=null;for(let[n,o]of i.entries()){var l;if(null==o)continue;let i=null!=(l=o.value)?l:o.index;if(e===i&&(r=n),t===i&&(a=n),null!=r&&null!=a)break}if(null==r||null==a)return r!==a&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===n?t>e?"right":"left":t>e?"down":"up":"none";let o=r.getBoundingClientRect(),u=a.getBoundingClientRect();if("horizontal"===n){if(u.left<o.left)return"left";if(u.left>o.left)return"right"}else{if(u.top<o.top)return"up";if(u.top>o.top)return"down"}return"none"}var m=e.i(90219),y=e.i(86790),R=e.i(53402);let A="data-composite-item-active";var x=e.i(37081);let S=n.createContext(void 0);function w(){let e=n.useContext(S);if(void 0===e)throw Error((0,s.default)(65));return e}var E=e.i(30780);let T=n.forwardRef(function(e,t){let{className:i,disabled:r=!1,render:l,value:u,id:s,nativeButton:c=!0,style:f,...p}=e,{value:b,getTabPanelIdByValue:h,orientation:S}=d(),{activateOnFocus:T,highlightedTabIndex:C,onTabActivation:I,registerTabResizeObserverElement:O,setHighlightedTabIndex:M,tabsListElement:N}=w(),L=(0,y.useBaseUiId)(s),D=n.useMemo(()=>({disabled:r,id:L,value:u}),[r,L,u]),{compositeProps:k,compositeRef:_,index:W}=(0,x.useCompositeItem)({metadata:D}),j=u===b,P=n.useRef(!1),H=n.useRef(null);n.useEffect(()=>{let e=H.current;if(e)return O(e)},[O]),(0,a.useIsoLayoutEffect)(()=>{if(P.current){P.current=!1;return}if(j&&W>-1&&C!==W){if(null!=N){let e=(0,E.activeElement)((0,m.ownerDocument)(N));if(e&&(0,E.contains)(N,e))return}r||M(W)}},[j,W,C,M,r,N]);let{getButtonProps:B,buttonRef:U}=(0,R.useButton)({disabled:r,native:c,focusableWhenDisabled:!0}),K=h(u),Y=n.useRef(!1),V=n.useRef(!1);return(0,o.useRenderElement)("button",e,{state:{disabled:r,active:j,orientation:S},ref:[t,U,_,H],props:[k,{role:"tab","aria-controls":K,"aria-selected":j,id:L,onClick:function(e){j||r||I(u,(0,g.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){!j&&(W>-1&&!r&&M(W),!r&&T&&(!Y.current||Y.current&&V.current)&&I(u,(0,g.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){j||r||(Y.current=!0,e.button&&0!==e.button||(V.current=!0,(0,m.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){Y.current=!1,V.current=!1},{once:!0})))},[A]:j?"":void 0,onKeyDownCapture(){P.current=!0}},p,B]})});var C=e.i(53585),I=e.i(2239),O=e.i(17514);function M(){return O.NOOP}function N(){return!1}function L(){return!0}let D=function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e}({}),k=n.createContext(void 0),_={disableStyleElements:!1},W={...p,activeTabPosition:()=>null,activeTabSize:()=>null},j=n.forwardRef(function(e,i){var r;let{className:a,render:l,renderBeforeHydration:u=!1,style:s,...c}=e,{nonce:f}=null!=(r=n.useContext(k))?r:_,{getTabElementBySelectedValue:p,orientation:g,tabActivationDirection:v,value:b}=d(),{tabsListElement:h,registerIndicatorUpdateListener:m}=w(),y=(0,I.useSyncExternalStore)(M,N,L),R=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>m(R),[m,R]);let A=0,x=0,S=0,E=0,T=0,O=0,j=!1;if(null!=b&&null!=h){let e=p(b);if(j=!0,null!=e){let{width:t,height:n}=(0,C.getCssDimensions)(e),{width:i,height:r}=(0,C.getCssDimensions)(h),a=e.getBoundingClientRect(),l=h.getBoundingClientRect(),o=i>0?l.width/i:1,u=r>0?l.height/r:1;if(Math.abs(o)>Number.EPSILON&&Math.abs(u)>Number.EPSILON){let e=a.left-l.left,t=a.top-l.top;A=e/o+h.scrollLeft-h.clientLeft,S=t/u+h.scrollTop-h.clientTop}else A=e.offsetLeft,S=e.offsetTop;T=t,O=n,x=h.scrollWidth-A-T,E=h.scrollHeight-S-O}}let P=j?{left:A,right:x,top:S,bottom:E}:null,H=j?{width:T,height:O}:null,B=j?{[D.activeTabLeft]:"".concat(A,"px"),[D.activeTabRight]:"".concat(x,"px"),[D.activeTabTop]:"".concat(S,"px"),[D.activeTabBottom]:"".concat(E,"px"),[D.activeTabWidth]:"".concat(T,"px"),[D.activeTabHeight]:"".concat(O,"px")}:void 0,U=j&&T>0&&O>0,K=(0,o.useRenderElement)("span",e,{state:{orientation:g,activeTabPosition:P,activeTabSize:H,tabActivationDirection:v},ref:i,props:[{role:"presentation",style:B,hidden:!U},c,{suppressHydrationWarning:!0}],stateAttributesMapping:W});return null==b?null:(0,t.jsxs)(n.Fragment,{children:[K,y&&u&&(0,t.jsx)("script",{nonce:f,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var P=e.i(58130),H=e.i(14060),B=e.i(23715),U=e.i(61463),K=e.i(13952);let Y=function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",e[e.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",e}({}),V={...p,...H.transitionStatusMapping},z=n.forwardRef(function(e,t){let{className:i,value:r,render:l,keepMounted:u=!1,style:s,...c}=e,{value:f,getTabIdByPanelValue:p,orientation:g,tabActivationDirection:v,registerMountedTabPanel:b,unregisterMountedTabPanel:h}=d(),m=(0,y.useBaseUiId)(),R=n.useMemo(()=>({id:m,value:r}),[m,r]),{ref:A,index:x}=(0,K.useCompositeListItem)({metadata:R}),S=r===f,{mounted:w,transitionStatus:E,setMounted:T}=(0,U.useTransitionStatus)(S),C=!w,I=p(r),O=n.useRef(null),M=(0,o.useRenderElement)("div",e,{state:{hidden:C,orientation:g,tabActivationDirection:v,transitionStatus:E},ref:[t,A,O],props:[{"aria-labelledby":I,hidden:C,id:m,role:"tabpanel",tabIndex:S?0:-1,inert:(0,P.inertValue)(!S),[Y.index]:x},c],stateAttributesMapping:V});return((0,B.useOpenChangeComplete)({open:S,ref:O,onComplete(){S||T(!1)}}),(0,a.useIsoLayoutEffect)(()=>{if((!C||u)&&null!=m)return b(r,m),()=>{h(r,m)}},[C,u,r,m,b,h]),u||w)?M:null});var F=e.i(26292),G=e.i(96374),q=e.i(43801);let X=[];var Z=e.i(84977),$=e.i(91822);function J(e){let{render:i,className:r,style:a,refs:s=O.EMPTY_ARRAY,props:c=O.EMPTY_ARRAY,state:d=O.EMPTY_OBJECT,stateAttributesMapping:f,highlightedIndex:p,onHighlightedIndexChange:g,orientation:v,dense:b,itemSizes:h,loopFocus:m,onLoop:y,cols:R,enableHomeAndEndKeys:x,onMapChange:S,stopEventPropagation:w=!0,rootRef:T,disabledIndices:C,modifierKeys:I,highlightItemOnHover:M=!1,tag:N="div",...L}=e,{props:D,highlightedIndex:k,onHighlightedIndexChange:_,elementsRef:W,onMapChange:j,relayKeyboardEvent:P}=function(e){let{itemSizes:t,cols:i=1,loopFocus:r=!0,onLoop:a,dense:o=!1,orientation:u="both",direction:s,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:p=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:b=X}=e,[h,m]=n.useState(0),y=i>1,R=n.useRef(null),x=(0,F.useMergedRefs)(R,f),S=n.useRef([]),w=n.useRef(!1),T=null!=c?c:h,C=(0,l.useStableCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((null!=d?d:m)(e),t){let t=S.current[e];(0,G.scrollIntoViewIfNeeded)(R.current,t,s,u)}}),I=(0,l.useStableCallback)(e=>{var t;if(0===e.size||w.current)return;w.current=!0;let n=Array.from(e.keys()),i=null!=(t=n.find(e=>null==e?void 0:e.hasAttribute(A)))?t:null,r=i?n.indexOf(i):-1;-1!==r&&C(r),(0,G.scrollIntoViewIfNeeded)(R.current,i,s,u)}),O=(0,l.useStableCallback)((e,t,n)=>a?null==a?void 0:a(e,t,n,S):n),M=n.useMemo(()=>({"aria-orientation":"both"===u?void 0:u,ref:x,onFocus(e){var t;let n=R.current,i=(0,E.getTarget)(e.nativeEvent);n&&null!=i&&(0,G.isNativeInput)(i)&&i.setSelectionRange(0,null!=(t=i.value.length)?t:0)},onKeyDown(e){var n;let l=p?G.COMPOSITE_KEYS:G.ARROW_KEYS;if(!l.has(e.key)||function(e,t){for(let n of G.MODIFIER_KEYS.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}(e,b)||!R.current)return;let c="rtl"===s,d=c?G.ARROW_LEFT:G.ARROW_RIGHT,f={horizontal:d,vertical:G.ARROW_DOWN,both:d}[u],h=c?G.ARROW_RIGHT:G.ARROW_LEFT,m={horizontal:h,vertical:G.ARROW_UP,both:h}[u],A=(0,E.getTarget)(e.nativeEvent);if(null!=A&&(0,G.isNativeInput)(A)&&!(null==A||A.hasAttribute("disabled")||"true"===A.getAttribute("aria-disabled"))){let t=A.selectionStart,i=A.selectionEnd,r=null!=(n=A.value)?n:"";if(null==t||e.shiftKey||t!==i||e.key!==m&&t<r.length||e.key!==f&&t>0)return}let x=T,w=(0,q.getMinListIndex)(S,v),I=(0,q.getMaxListIndex)(S,v);if(y){let n=t||Array.from({length:S.current.length},()=>({width:1,height:1})),a=(0,q.createGridCellMap)(n,i,o),l=a.findIndex(e=>null!=e&&!(0,q.isListIndexDisabled)(S.current,e,v)),s=a.reduce((e,t,n)=>null==t||(0,q.isListIndexDisabled)(S.current,t,v)?e:n,-1);x=a[(0,q.getGridNavigatedIndex)(a.map(e=>null!=e?S.current[e]:null),{event:e,orientation:u,loopFocus:r,onLoop:O,cols:i,disabledIndices:(0,q.getGridCellIndices)([...v||S.current.map((e,t)=>(0,q.isListIndexDisabled)(S.current,t)?t:void 0),void 0],a),minIndex:l,maxIndex:s,prevIndex:(0,q.getGridCellIndexOfCorner)(T>I?w:T,n,a,i,e.key===G.ARROW_DOWN?"bl":e.key===G.ARROW_RIGHT?"tr":"tl"),rtl:c})]}let M={horizontal:[d],vertical:[G.ARROW_DOWN],both:[d,G.ARROW_DOWN]}[u],N={horizontal:[h],vertical:[G.ARROW_UP],both:[h,G.ARROW_UP]}[u],L=y?l:({horizontal:p?G.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:G.HORIZONTAL_KEYS,vertical:p?G.VERTICAL_KEYS_WITH_EXTRA_KEYS:G.VERTICAL_KEYS,both:l})[u];p&&(e.key===G.HOME?x=w:e.key===G.END&&(x=I)),x===T&&(M.includes(e.key)||N.includes(e.key))&&(r&&x===I&&M.includes(e.key)?(x=w,a&&(x=a(e,T,x,S))):r&&x===w&&N.includes(e.key)?(x=I,a&&(x=a(e,T,x,S))):x=(0,q.findNonDisabledListIndex)(S.current,{startingIndex:x,decrement:N.includes(e.key),disabledIndices:v})),x===T||(0,q.isIndexOutOfListBounds)(S.current,x)||(g&&e.stopPropagation(),L.has(e.key)&&e.preventDefault(),C(x,!0),queueMicrotask(()=>{var e;null==(e=S.current[x])||e.focus()}))}}),[i,o,s,v,S,p,T,y,t,r,a,O,x,b,C,u,g]);return n.useMemo(()=>({props:M,highlightedIndex:T,onHighlightedIndexChange:C,elementsRef:S,disabledIndices:v,onMapChange:I,relayKeyboardEvent:M.onKeyDown}),[M,T,C,S,v,I])}({itemSizes:h,cols:R,loopFocus:m,onLoop:y,dense:b,orientation:v,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:x,direction:(0,$.useDirection)(),disabledIndices:C,modifierKeys:I}),H=(0,o.useRenderElement)(N,e,{state:d,ref:s,props:[D,...c,L],stateAttributesMapping:f}),B=n.useMemo(()=>({highlightedIndex:k,onHighlightedIndexChange:_,highlightItemOnHover:M,relayKeyboardEvent:P}),[k,_,M,P]);return(0,t.jsx)(Z.CompositeRootContext.Provider,{value:B,children:(0,t.jsx)(u.CompositeList,{elementsRef:W,onMapChange:e=>{null==S||S(e),j(e)},children:H})})}let Q=n.forwardRef(function(e,i){let{activateOnFocus:r=!1,className:a,loopFocus:o=!0,render:u,style:s,...c}=e,{onValueChange:f,orientation:g,value:v,setTabMap:b,tabActivationDirection:h}=d(),[m,y]=n.useState(0),[R,A]=n.useState(null),x=n.useRef(new Set),w=n.useRef(new Set),E=n.useRef(null);n.useEffect(()=>{if("undefined"==typeof ResizeObserver)return;let e=new ResizeObserver(()=>{x.current.forEach(e=>{e()})});return E.current=e,R&&e.observe(R),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),E.current=null}},[R]);let T=(0,l.useStableCallback)(e=>(x.current.add(e),()=>{x.current.delete(e)})),C=(0,l.useStableCallback)(e=>{var t;return w.current.add(e),null==(t=E.current)||t.observe(e),()=>{var t;w.current.delete(e),null==(t=E.current)||t.unobserve(e)}}),I=(0,l.useStableCallback)((e,t)=>{e!==v&&f(e,t)}),M=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:m,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:C,onTabActivation:I,setHighlightedTabIndex:y,tabsListElement:R}),[r,m,T,C,I,y,R]);return(0,t.jsx)(S.Provider,{value:M,children:(0,t.jsx)(J,{render:u,className:a,style:s,state:{orientation:g,tabActivationDirection:h},refs:[i,A],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:p,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:y,onMapChange:b,disabledIndices:O.EMPTY_ARRAY})})});var ee=e.i(32532),ee=ee;function et(e){let{className:n,onValueChange:r,...a}=e;return(0,t.jsx)(ee.Root,{"data-slot":"tabs",className:(0,i.cn)("group/tabs flex min-h-0 min-w-0 flex-col",n),onValueChange:e=>null==r?void 0:r(String(e)),...a})}function en(e){let{className:n,variant:r="default",...a}=e;return(0,t.jsx)(ee.List,{"data-slot":"tabs-list","data-variant":r,className:(0,i.cn)("group/tabs-list inline-flex items-center","default"===r&&"h-10 w-fit rounded-lg border border-[var(--ds-color-border-default)] bg-[var(--ds-color-surface-main-tint)] p-1","line"===r&&"h-11","pill"===r&&"gap-1 rounded-full border border-black/[0.06] bg-[#e9e9e9] p-1 shadow-sm",n),style:{..."line"===r&&{borderBottom:"1px solid var(--ds-color-border-hover)"}},...a})}function ei(e){let{className:n,...r}=e;return(0,t.jsx)(ee.Tab,{"data-slot":"tabs-trigger",className:(0,i.cn)("inline-flex items-center justify-center transition-colors","cursor-pointer disabled:pointer-events-none disabled:opacity-50","group-data-[variant=default]/tabs-list:h-8 ",'relative inline-flex pb-[1px] items-center justify-center gap-1.5 h-[calc(100%-2px)] bg-transparent border-0 mr-4 text-[var(--ds-muted)] mb-[-2px] hover:text-[var(--ds-text)] data-[active]:text-[var(--ds-color-accent)] data-[active]:font-medium data-[active]:after:absolute data-[active]:after:bottom-[-1px] data-[active]:after:left-0 data-[active]:after:right-0 data-[active]:after:h-[2px] data-[active]:after:bg-[var(--ds-color-accent)] data-[active]:after:content-[""]',"group-data-[variant=pill]/tabs-list:h-9 group-data-[variant=pill]/tabs-list:px-5 group-data-[variant=pill]/tabs-list:mr-0 group-data-[variant=pill]/tabs-list:mb-0 group-data-[variant=pill]/tabs-list:pb-0 group-data-[variant=pill]/tabs-list:rounded-full group-data-[variant=pill]/ group-data-[variant=pill]/tabs-list:font-semibold group-data-[variant=pill]/tabs-list:text-[#828282] group-data-[variant=pill]/tabs-list:data-[active]:bg-[#fff] group-data-[variant=pill]/tabs-list:data-[active]:text-[#333333] group-data-[variant=pill]/tabs-list:data-[active]:font-bold group-data-[variant=pill]/tabs-list:data-[active]:shadow-[0_2px_10px_rgba(15,23,42,0.08)] group-data-[variant=pill]/tabs-list:data-[active]:after:[content:none]",n),...r})}function er(e){let{className:n,...r}=e;return(0,t.jsx)(ee.Panel,{"data-slot":"tabs-content",className:(0,i.cn)("mt-4 min-h-0 min-w-0 outline-none",n),...r})}function ea(e){var r,a;let{tabs:l,defaultValue:o,value:u,onChange:s,className:c,listVariant:d="default",listClassName:f,triggerClassName:p,contentClassName:g,children:v}=e,b=null!=(a=null==(r=l[0])?void 0:r.value)?a:"",[h,m]=n.useState(null!=o?o:b),y=void 0!==u,R=y?u:h;n.useEffect(()=>{if(!l.length||l.some(e=>e.value===R))return;let e=l[0].value;y||m(e),null==s||s(e)},[l,R,y,s]);let A=n.useCallback(e=>{y||m(e),null==s||s(e)},[y,s]),x="function"==typeof v?v(R):v;return(0,t.jsxs)(et,{value:R,defaultValue:o,onValueChange:A,className:(0,i.cn)("flex min-h-0 min-w-0 flex-1 flex-col",c),children:[(0,t.jsx)(en,{variant:d,className:f,children:l.map(e=>(0,t.jsx)(ei,{value:e.value,disabled:e.disabled,className:p,children:e.label},e.value))}),(0,t.jsx)("div",{className:(0,i.cn)("min-h-0 min-w-0 flex-1",g),children:x})]})}function el(e){let{value:n,className:r,children:a}=e;return(0,t.jsx)(er,{value:n,className:(0,i.cn)("mt-4",r),children:a})}},8279,e=>{"use strict";e.s(["avatarBgForLabel",()=>i,"initialsFromLabel",()=>n]);let t=["#9A3B32","#1db887","#4da3ff","#8b5cf6","#e84855","#f5c518"];function n(e){let t=e.trim();if(!t)return"?";let n=t.split(/\s+/).filter(Boolean);if(n.length>=2){var i,r;let e=null==(i=n[0])?void 0:i.slice(0,1),t=null==(r=n[1])?void 0:r.slice(0,1);if(e&&t)return"".concat(e).concat(t).toUpperCase()}return t.slice(0,2).toUpperCase()}function i(e){var n;let i=String(e||"?"),r=0;for(let e=0;e<i.length;e++)r=(r+17*i.charCodeAt(e))%t.length;return null!=(n=t[r])?n:t[0]}},52727,e=>{"use strict";e.s(["addTeamMember",()=>v,"createAgent",()=>f,"deleteAgentItem",()=>h,"getAgentDetail",()=>d,"listAgents",()=>u,"listAgentsForManage",()=>s,"removeTeamMember",()=>b,"updateAgent",()=>p]);var t=e.i(29250),n=e.i(36845);function i(e){let t=null!=e.id?String(e.id).trim():"";if(!t)return null;let n="string"==typeof e.displayName&&e.displayName.trim()?e.displayName.trim():t;return{id:t,displayName:n}}function r(e){if("string"==typeof e.whentouse)return e.whentouse;let t=e.config;if(t&&"object"==typeof t&&!Array.isArray(t)){let e=t.whentouse;if("string"==typeof e)return e}return""}function a(e){let t=e.agentTeamMembers;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||"object"!=typeof e)continue;let t=null!=e.agentType?String(e.agentType).trim():"";t&&n.push({agentType:t,whentouse:"string"==typeof e.whentouse?e.whentouse:""})}return n}function l(e){let t=i(e);return t?{...t,whentouse:r(e),agentTeamMembers:a(e)}:null}function o(e,t){let n=e&&"object"==typeof e?e:{},i=n.env&&"object"==typeof n.env&&!Array.isArray(n.env)?Object.fromEntries(Object.entries(n.env).map(e=>{let[t,n]=e;return[t,null==n?"":String(n)]})):{},r={tools:Array.isArray(n.tools)?n.tools.map(String):[],disallowedTools:Array.isArray(n.disallowedTools)?n.disallowedTools.map(String):[],mcpServers:Array.isArray(n.mcpServers)?n.mcpServers.map(String):[],skills:Array.isArray(n.skills)?n.skills.map(String):[],agentTeams:Array.isArray(n.agentTeams)?n.agentTeams.map(String):[],rules:Array.isArray(n.rules)?n.rules.map(String):[],model:"string"==typeof n.model?n.model:"",background:!0===n.background,isolation:"string"==typeof n.isolation?n.isolation:"",whentouse:"string"==typeof t?t:"",env:i,effort:null};return("string"==typeof n.effort||"number"==typeof n.effort)&&(r.effort=n.effort),r}async function u(e,t){return(await c(e,t)).map(i).filter(e=>null!=e)}async function s(e,t){return(await c(e,t)).map(l).filter(e=>null!=e)}async function c(e,i){let r=(await (0,t.get)((0,n.buildAgentsListUrl)(e,i))).agents;return Array.isArray(r)?r.filter(e=>null!=e&&"object"==typeof e):[]}async function d(e,i,a){let l=a.trim(),o=(await (0,t.get)((0,n.buildAgentItemUrl)(e,i,l))).agent,u=o&&"string"==typeof o.prompt?o.prompt:"",s=(null==o?void 0:o.config)&&"object"==typeof o.config?o.config:null;return{id:l,prompt:u,whentouse:r({whentouse:null==o?void 0:o.whentouse,config:null==o?void 0:o.config}),config:s}}async function f(e,i,r){let a=r.id.trim();await (0,t.post)((0,n.buildAgentsListUrl)(e,i),{name:a,prompt:r.prompt});let l=await d(e,i,a);return await (0,t.patch)((0,n.buildAgentItemUrl)(e,i,a),{config:o(l.config,r.whentouse)}),a}async function p(e,i,r){let a=r.id.trim();if(!a)throw Error("缺少 agent id");return await (0,t.patch)((0,n.buildAgentItemUrl)(e,i,a),{prompt:r.prompt,config:o(r.baseConfig,r.whentouse)}),a}function g(e){return e&&"object"==typeof e?a(e):[]}async function v(e,i,r,a){let l=r.trim(),o=a.trim();if(!l)throw Error("缺少 leader id");if(!o)throw Error("缺少 agentType");return g((await (0,t.post)((0,n.buildAgentTeamMembersUrl)(e,i,l),{agentType:o})).agent)}async function b(e,i,r,a){let l=r.trim(),o=a.trim();if(!l)throw Error("缺少 leader id");if(!o)throw Error("缺少 agentType");return g((await (0,t.del)((0,n.buildAgentTeamMemberUrl)(e,i,l,o))).agent)}async function h(e,i,r){let a=r.trim();if(!a)throw Error("缺少 agent id");try{await (0,t.del)((0,n.buildAgentItemUrl)(e,i,a))}catch(r){if(r instanceof t.ApiError&&400===r.status&&String(r.message).includes("missing required query parameter: agent"))return void await (0,t.del)((0,n.buildAgentApiUrl)(e,i,a));throw r}}}]);
|