thursday-agent 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/probe/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +56 -56
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0oo-wlv._.js → [root-of-the-server]__0cxqzfc._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0zuns7e._.js → [root-of-the-server]__1-d2tgh._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1se25x0._.js +1 -1
- package/.next/server/chunks/ssr/{_0scf7xy._.js → _05rxyf9._.js} +2 -2
- package/.next/server/chunks/ssr/_070nv1_._.js +1 -1
- package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
- package/.next/server/chunks/ssr/{_1uy0xom._.js → _0bp-_fi._.js} +3 -3
- package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
- package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0hlxij-._.js} +2 -2
- package/.next/server/chunks/ssr/{_1a-nuxx._.js → _0p9pmxe._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ital-2._.js → _0s41irp._.js} +2 -2
- package/.next/server/chunks/ssr/{_1z74dmq._.js → _0tg0vf8._.js} +4 -4
- package/.next/server/chunks/ssr/{_1tmu8z-._.js → _173siic._.js} +2 -2
- package/.next/server/chunks/ssr/{_1x-kojb._.js → _17v-33v._.js} +3 -3
- package/.next/server/chunks/ssr/{_0l_mcfz._.js → _19n08g5._.js} +2 -2
- package/.next/server/chunks/ssr/{_0urj3mc._.js → _1doidrw._.js} +2 -2
- package/.next/server/chunks/ssr/{_1-zyvdb._.js → _1flsjeo._.js} +2 -2
- package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ng831c._.js +3 -0
- package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1u2jw0i._.js} +3 -3
- package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
- package/.next/server/chunks/ssr/{_1flbs77._.js → _1yk6yak._.js} +2 -2
- package/.next/server/chunks/ssr/features_bot_1yr-_pm._.js +3 -0
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_048wmmj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_04t200t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0511ha-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_08g12f-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_0cdu6jq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_0eb4rx7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_0f2k5l0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_0piws2a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0pk6i-e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_0s1lwc9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0wq4-ts._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0zjqwz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_11hbkuj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_18woe20._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1_afpz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1_ban4u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1cxc8kn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_1dcbvfw._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_1expacw._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_1ksh9gy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1m2ho33._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_1n0h9sf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1qehmwm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_1xzo2wn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_1zf46lp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1zkpek5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0avl8-1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_14oslro._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +57 -57
- package/.next/static/chunks/03kgfyrli_0gz.js +1 -0
- package/.next/static/chunks/{245hb85nsy6j4.js → 09120tms63y21.js} +1 -1
- package/.next/static/chunks/{2c64drdevdla3.js → 0o980477kfqez.js} +1 -1
- package/.next/static/chunks/{13ixzheqw7o-w.js → 0oz3rs47yy3p8.js} +2 -2
- package/.next/static/chunks/0w20wnnfrscq7.js +1 -0
- package/.next/static/chunks/{3bbzsitgiltnt.js → 19ojn4lomsk0r.js} +1 -1
- package/.next/static/chunks/{38301ji-85i30.js → 1mwee7xvitlp9.js} +1 -1
- package/.next/static/chunks/1p764d75_0lhv.js +18 -0
- package/.next/static/chunks/{27tvv1i-smrck.js → 1pjygp7hqib6j.js} +1 -1
- package/.next/static/chunks/{0_awn8tucznxc.js → 22shnca_6zfzs.js} +1 -1
- package/.next/static/chunks/{0ge-hx0ed83a1.js → 24dst4mgurbsh.js} +1 -1
- package/.next/static/chunks/{06nt9tatr-dug.js → 25zq8gzhbdsr7.js} +1 -1
- package/.next/static/chunks/{37j27b3e1gt7r.js → 2d4z3er53ng8r.js} +1 -1
- package/.next/static/chunks/2ky81z-jgvasc.js +1 -0
- package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
- package/.next/static/chunks/{1grkt5gr8pbg1.js → 2qod5tqlpz8b7.js} +7 -7
- package/.next/static/chunks/{1yugpvvi8qrbu.js → 30skcjexa57zn.js} +2 -2
- package/.next/static/chunks/{427qsc6kahxyo.js → 35kwn237o4wdn.js} +1 -1
- package/.next/static/chunks/{0qmd8n52hp-6v.js → 3exjsi8pfdvzj.js} +1 -1
- package/.next/static/chunks/3qq4o8w2rv_e9.css +1 -0
- package/.next/static/chunks/{3h2e-xv1zxh_f.js → 3vynnr71ghvom.js} +2 -2
- package/.next/static/chunks/42890jqk049q1.js +1 -0
- package/README.md +4 -0
- package/components/ui/radio-group.tsx +2 -2
- package/features/bot/components/bot-setting.tsx +4 -4
- package/features/routine/components/routine-setting.tsx +1 -1
- package/features/thursday/components/thursday-setting.tsx +5 -5
- package/guide/bots.md +1 -1
- package/knip.json +1 -0
- package/package.json +1 -1
- package/seed-skills/analyst/README.md +19 -0
- package/seed-skills/analyst/data-report/SKILL.md +59 -0
- package/seed-skills/analyst/data-report/references/brief.md +31 -0
- package/seed-skills/analyst/data-report/references/company.md +41 -0
- package/seed-skills/analyst/data-report/references/comparison.md +42 -0
- package/seed-skills/analyst/data-report/references/decision.md +28 -0
- package/seed-skills/analyst/data-report/references/market-size.md +49 -0
- package/seed-skills/analyst/data-report/references/price-check.md +33 -0
- package/seed-skills/analyst/data-report/references/sources.md +51 -0
- package/seed-skills/analyst/data-report/references/trend.md +39 -0
- package/seed-skills/analyst/data-report/scripts/chart.mjs +679 -0
- package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
- package/seed-skills/insta/instagram/SKILL.md +33 -0
- package/seed-skills/insta/instagram/references/dm.md +49 -0
- package/seed-skills/insta/instagram/references/post.md +74 -0
- package/seed-skills/insta/instagram/scripts/compose.mjs +329 -0
- package/seed-skills/insta/instagram/scripts/image-size.mjs +30 -0
- package/seed-skills/insta/instagram/scripts/inbox.mjs +159 -0
- package/seed-skills/insta/instagram/scripts/lib.mjs +91 -0
- package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
- package/seed-skills/insta/instagram/scripts/profile.mjs +139 -0
- package/seed-skills/insta/instagram/scripts/read.mjs +240 -0
- package/seed-skills/insta/instagram/scripts/render.mjs +126 -0
- package/seed-skills/insta/instagram/scripts/search.mjs +133 -0
- package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
- package/seed-skills/insta/instagram/scripts/sheet.mjs +100 -0
- package/seed-skills/insta/instagram/scripts/webimage.mjs +105 -0
- package/seed-skills/insta/instagram/templates/carousel.html +62 -0
- package/seed-skills/mail/mail/SKILL.md +37 -0
- package/seed-skills/mail/mail/recipes/gmail.mjs +448 -0
- package/seed-skills/mail/mail/references/recipes.md +55 -0
- package/seed-skills/mail/mail/scripts/mail.mjs +202 -0
- package/seed-skills/marketer/README.md +6 -4
- package/seed-skills/marketer/copywriting/SKILL.md +1 -1
- package/seed-skills/marketer/emails/SKILL.md +1 -1
- package/seed-skills/marketer/launch/SKILL.md +1 -1
- package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
- package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
- package/seed-skills/marketer/social/SKILL.md +1 -1
- package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
- package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
- package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
- package/.next/static/chunks/27lkanxvtdn09.js +0 -1
- package/.next/static/chunks/3fec-aeteddr-.js +0 -1
- package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
- package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
- package/.next/static/chunks/3j1y335o95mj7.js +0 -1
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_buildManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → Ar5V4kMdL4CE1trx8anrH}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),n=e.i(225913);e.i(271645);var s=e.i(647163);function a({className:e,...n}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}e.i(652225);let r=(0,n.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:n="vertical",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":n,className:(0,s.cn)(r({orientation:n}),e),...a})},"FieldContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,s.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...n})},"FieldLabel",0,function({className:e,...n}){return(0,t.jsx)(a,{"data-slot":"field-label",className:(0,s.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...n})}],986530)},787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),a=e.i(867927),r=e.i(21357),o=e.i(77071),i=e.i(456420);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let l=(0,i.default)(c),d={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};d.node;let m=(0,i.default)(d);var p=e.i(759659),u=e.i(263676),h=e.i(271645),f=e.i(798120),g=e.i(167881),x=e.i(986530),v=e.i(23750),j=e.i(647163);let b=(0,h.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let a=(0,h.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(y,{data:a,name:n,depth:0,initialExpandDepth:s})})});b.displayName="JsonView";let y=(0,h.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:a})=>{var r;let o=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,h.useState)("string"!==o&&s<a),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(o){case"object":case"array":let d,m,p;return m=(d=(r="array"===o)?e:Object.entries(e)).length,p={open:r?"[":"{",close:r?"]":"}",collapsed:r?"[ ... ]":"{ ... }",empty:r?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:p.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:r?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:a})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:n,name:e,depth:s+1,initialExpandDepth:a})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:p.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,j.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[o]||l.default,children:null===e?"null":String(e)})]})}});y.displayName="JsonNode";var N=e.i(917162),k=e.i(818125),S=e.i(319036),w=e.i(127341),C=e.i(184762),z=e.i(6799),O=e.i(95187);let A=(0,O.createServerReference)("7f9f7203d69588d2a7607491fa423f8974ed7d8271",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),T=(0,O.createServerReference)("7f3ffbe43cd0e53bcef209cec6c741a97021df5ec0",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f37aeae9f639b84e3375d6c3d50d4e5c13c749973",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),F=(0,O.createServerReference)("7f86f9bf2207bdccd91bb068c5bbbb14fb0b889db9",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var P=e.i(681307),$=e.i(245629);let M=P.z.object({url:P.z.url(),headers:P.z.record(P.z.string(),P.z.string()).optional(),oauthClient:P.z.object({clientId:P.z.string().min(1),clientSecret:P.z.string().optional()}).optional()}),D=P.z.object({command:P.z.string().min(1),args:P.z.array(P.z.string()).optional(),env:P.z.record(P.z.string(),P.z.string()).optional()}),R=P.z.union([M,D]),L=P.z.object({name:P.z.string(),description:P.z.string().optional(),inputSchema:P.z.looseObject({}).optional(),outputSchema:P.z.looseObject({}).optional()});function E(e){return"url"in e}P.z.object({clientInformation:P.z.looseObject({}).optional(),tokens:P.z.looseObject({}).optional(),authorizationServer:P.z.looseObject({}).optional(),codeVerifier:P.z.string().optional(),state:P.z.string().optional()});let q=P.z.object({name:P.z.string().min(1).max(40),config:R,toolCount:P.z.number().int(),lastError:P.z.string().nullish()}),B=L.extend({id:P.z.number().int(),description:P.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=P.z.object({name:P.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:R}),U=P.z.union([P.z.object({mcpServers:P.z.record(P.z.string(),R)}),P.z.record(P.z.string(),R)]),K=[{name:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var H=e.i(895836),V=e.i(333999),W=e.i(609856),_=e.i(283653);function G({name:e,onDone:n}){let{data:s,isLoading:a}=(0,_.useServerRoute)(f.queryKey.mcpServer(e)),[r,o]=(0,W.useServerAction)(I,{...ei,onOk:t=>{ei.onOk(t),(0,_.revalidate)(f.queryKey.mcpServer(e))}}),[i,c]=(0,W.useServerAction)(T,{okMessage:"Server deleted",onOk:()=>{n(),(0,_.revalidate)(f.queryKey.mcp)}}),d=async()=>{await N.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&i(e)};if(a)return(0,t.jsx)(H.SettingSkeleton,{rows:4});if(!s)return null;let m=s.tools.length,u=E(s.config)?"HTTP":"STDIO";return(0,t.jsxs)(H.SettingDialogContent,{title:s.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:u}),(0,t.jsx)("span",{className:"truncate font-mono",children:el(s.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Button,{variant:"ghost",loading:c,onClick:d,children:[(0,t.jsx)(p.Trash2,{}),"Delete"]}),(0,t.jsxs)(g.Button,{variant:"outline",loading:o,onClick:()=>r(s.name),children:[(0,t.jsx)(l,{}),"Reconnect"]})]}),children:[s.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:s.lastError}),(0,t.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[m," ",1===m?"tool":"tools"]}),s.tools.map(e=>(0,t.jsx)(Y,{tool:e,serverName:s.name},e.name))]})}function Q({server:e}){let s=e.toolCount,r=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{N.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===r&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===r?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",el(e.config)]})]})})]}),(0,t.jsx)(a.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>E(t.config)?E(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!E(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)(k.SiteIcon,{host:s,className:"size-5",fallback:(0,t.jsx)(m,{className:"size-4"})}):(0,t.jsx)(m,{className:"size-4"})}function Y({tool:e,serverName:n}){let[r,o]=(0,h.useState)(!1),[i,c]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-sm",children:e.name}),e.description?(0,t.jsx)("p",{className:(0,j.cn)("text-xs text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[m.length>0&&(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>o(!r),children:[r?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Test"]})]}),r?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),a=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let r=t.anyOf??t.oneOf;if(Array.isArray(r))return r.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let r=t.properties;if(!r||0===Object.keys(r).length)return"{}";let o=t.required??[],i=Object.entries(r).map(([t,a])=>{let r=o.includes(t)?"":"?",i=a?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${r}: ${e(a,n+1)}${c}`});return`{
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),n=e.i(225913);e.i(271645);var s=e.i(647163);function a({className:e,...n}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}e.i(652225);let r=(0,n.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:n="vertical",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":n,className:(0,s.cn)(r({orientation:n}),e),...a})},"FieldContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,s.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...n})},"FieldLabel",0,function({className:e,...n}){return(0,t.jsx)(a,{"data-slot":"field-label",className:(0,s.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...n})}],986530)},787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),a=e.i(867927),r=e.i(21357),o=e.i(77071),i=e.i(456420);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let l=(0,i.default)(c),d={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};d.node;let m=(0,i.default)(d);var p=e.i(759659),u=e.i(263676),h=e.i(271645),f=e.i(798120),g=e.i(167881),x=e.i(986530),v=e.i(23750),j=e.i(647163);let b=(0,h.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let a=(0,h.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(y,{data:a,name:n,depth:0,initialExpandDepth:s})})});b.displayName="JsonView";let y=(0,h.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:a})=>{var r;let o=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,h.useState)("string"!==o&&s<a),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(o){case"object":case"array":let d,m,p;return m=(d=(r="array"===o)?e:Object.entries(e)).length,p={open:r?"[":"{",close:r?"]":"}",collapsed:r?"[ ... ]":"{ ... }",empty:r?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:p.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:r?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:a})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:n,name:e,depth:s+1,initialExpandDepth:a})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:p.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,j.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[o]||l.default,children:null===e?"null":String(e)})]})}});y.displayName="JsonNode";var N=e.i(917162),k=e.i(818125),S=e.i(319036),w=e.i(127341),C=e.i(184762),z=e.i(6799),O=e.i(95187);let A=(0,O.createServerReference)("7fc9bd0484b5b4b65afce61e08bb4b081b722062a7",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),T=(0,O.createServerReference)("7ffc4f8976ca439e4f44019e683bc444c71c014251",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f7d31d4bbb2f6d0be7e97608270f1907961cf468f",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),F=(0,O.createServerReference)("7f660f86909754f6a891992ea2110184e1bcfb482a",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var P=e.i(681307),$=e.i(245629);let M=P.z.object({url:P.z.url(),headers:P.z.record(P.z.string(),P.z.string()).optional(),oauthClient:P.z.object({clientId:P.z.string().min(1),clientSecret:P.z.string().optional()}).optional()}),D=P.z.object({command:P.z.string().min(1),args:P.z.array(P.z.string()).optional(),env:P.z.record(P.z.string(),P.z.string()).optional()}),R=P.z.union([M,D]),L=P.z.object({name:P.z.string(),description:P.z.string().optional(),inputSchema:P.z.looseObject({}).optional(),outputSchema:P.z.looseObject({}).optional()});function E(e){return"url"in e}P.z.object({clientInformation:P.z.looseObject({}).optional(),tokens:P.z.looseObject({}).optional(),authorizationServer:P.z.looseObject({}).optional(),codeVerifier:P.z.string().optional(),state:P.z.string().optional()});let q=P.z.object({name:P.z.string().min(1).max(40),config:R,toolCount:P.z.number().int(),lastError:P.z.string().nullish()}),B=L.extend({id:P.z.number().int(),description:P.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=P.z.object({name:P.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:R}),U=P.z.union([P.z.object({mcpServers:P.z.record(P.z.string(),R)}),P.z.record(P.z.string(),R)]),K=[{name:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var H=e.i(895836),V=e.i(333999),W=e.i(609856),_=e.i(283653);function G({name:e,onDone:n}){let{data:s,isLoading:a}=(0,_.useServerRoute)(f.queryKey.mcpServer(e)),[r,o]=(0,W.useServerAction)(I,{...ei,onOk:t=>{ei.onOk(t),(0,_.revalidate)(f.queryKey.mcpServer(e))}}),[i,c]=(0,W.useServerAction)(T,{okMessage:"Server deleted",onOk:()=>{n(),(0,_.revalidate)(f.queryKey.mcp)}}),d=async()=>{await N.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&i(e)};if(a)return(0,t.jsx)(H.SettingSkeleton,{rows:4});if(!s)return null;let m=s.tools.length,u=E(s.config)?"HTTP":"STDIO";return(0,t.jsxs)(H.SettingDialogContent,{title:s.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:u}),(0,t.jsx)("span",{className:"truncate font-mono",children:el(s.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Button,{variant:"ghost",loading:c,onClick:d,children:[(0,t.jsx)(p.Trash2,{}),"Delete"]}),(0,t.jsxs)(g.Button,{variant:"outline",loading:o,onClick:()=>r(s.name),children:[(0,t.jsx)(l,{}),"Reconnect"]})]}),children:[s.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:s.lastError}),(0,t.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[m," ",1===m?"tool":"tools"]}),s.tools.map(e=>(0,t.jsx)(Y,{tool:e,serverName:s.name},e.name))]})}function Q({server:e}){let s=e.toolCount,r=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{N.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===r&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===r?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",el(e.config)]})]})})]}),(0,t.jsx)(a.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>E(t.config)?E(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!E(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)(k.SiteIcon,{host:s,className:"size-5",fallback:(0,t.jsx)(m,{className:"size-4"})}):(0,t.jsx)(m,{className:"size-4"})}function Y({tool:e,serverName:n}){let[r,o]=(0,h.useState)(!1),[i,c]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-sm",children:e.name}),e.description?(0,t.jsx)("p",{className:(0,j.cn)("text-xs text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[m.length>0&&(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>o(!r),children:[r?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Test"]})]}),r?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),a=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let r=t.anyOf??t.oneOf;if(Array.isArray(r))return r.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let r=t.properties;if(!r||0===Object.keys(r).length)return"{}";let o=t.required??[],i=Object.entries(r).map(([t,a])=>{let r=o.includes(t)?"":"?",i=a?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${r}: ${e(a,n+1)}${c}`});return`{
|
|
2
2
|
${i.join("\n")}
|
|
3
3
|
${a}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t.type:"unknown"}(n)})]},e))}):null,i?(0,t.jsx)(Z,{tool:e,serverName:n}):null]})}function Z({tool:e,serverName:n}){let[s,a]=(0,h.useState)(()=>(function(e){let t=e.inputSchema?.properties;if(!t||"object"!=typeof t)return"{}";let n={};for(let[e,s]of Object.entries(t))n[e]=s?.type==="number"||s?.type==="integer"?0:s?.type!=="boolean"&&(s?.type==="array"?[]:s?.type==="object"?{}:"");return JSON.stringify(n,null,2)})(e)),[o,i]=(0,h.useState)(""),[c,l,d,m,p]=(0,W.useServerAction)(A,{errorMessage:!1});return(0,t.jsxs)("div",{className:"mt-2 space-y-2 rounded-lg border border-input p-3",children:[(0,t.jsx)(C.Textarea,{value:s,onChange:e=>a(e.target.value),spellCheck:!1,className:"min-h-24 resize-none font-mono text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-destructive",children:o||m}),(0,t.jsxs)(g.Button,{size:"sm",loading:l,onClick:()=>{let t;try{t=s.trim()?JSON.parse(s):void 0}catch{i("Not valid JSON");return}i(""),p(),c(n,e.name,t)},children:[!l&&(0,t.jsx)(r.Play,{}),"Run"]})]}),void 0!==d&&(0,t.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,t.jsx)(b,{data:d,initialExpandDepth:3})})]})}function ee(e){return N.notify.component({className:"sm:max-w-lg",renderer:({close:n})=>(0,t.jsx)(et,{initial:e,onDone:n})})}function et({initial:e,onDone:n}){let s=e&&E(e.config)?e.config:void 0,a=e&&!E(e.config)?e.config:void 0,[r,o]=(0,V.useObjectState)({mode:a?"stdio":"http",name:e?.name??"",url:s?.url??"",headers:ea(s?.headers),clientId:s?.oauthClient?.clientId??"",clientSecret:s?.oauthClient?.clientSecret??"",command:a?.command??"",args:(a?.args??[]).join(" "),env:ea(a?.env),raw:""}),{mode:i,name:c,url:l,headers:d,clientId:m,clientSecret:p,command:u,args:f,env:j,raw:b}=r,[y,N]=(0,W.useServerAction)(F,{...ei,onOk:e=>{ei.onOk(e),"error"!==e.status&&n()}}),k=(0,h.useMemo)(()=>{var e,t,n,s,a,r,o;let c,h;return"json"===i?function(e){let t,n=e.trim();if(!n)return{value:null,error:""};try{t=JSON.parse(n)}catch{return{value:null,error:"Not valid JSON"}}let s=R.safeParse(t);if(s.success)return{value:{name:null,config:s.data},error:""};let a=U.safeParse(t);if(!a.success)return{value:null,error:"Needs a url or a command"};let r=Object.entries("mcpServers"in a.data?a.data.mcpServers:a.data)[0];return r?{value:{name:r[0],config:r[1]},error:""}:{value:null,error:"No server in there"}}(b):"http"===i?(e=l,t=d,n=m,s=p,(c=M.safeParse({url:e.trim(),headers:er(t),oauthClient:n.trim()?{clientId:n.trim(),clientSecret:s.trim()}:void 0})).success?{value:{name:null,config:c.data},error:""}:{value:null,error:e.trim()?"Needs a valid url":""}):(a=u,r=f,o=j,(h=D.safeParse({command:a.trim(),args:r.split(/\s+/).filter(Boolean),env:er(o)})).success?{value:{name:null,config:h.data},error:""}:{value:null,error:a.trim()?"Needs a command":""})},[i,b,l,d,m,p,u,f,j]),z="json"===i?b:JSON.stringify([i,l,d,m,p,u,f,j]),[O,A]=(0,h.useState)(z);(0,h.useEffect)(()=>{let e=setTimeout(()=>A(z),700);return()=>clearTimeout(e)},[z]);let T=O===z?k.error:"",I=c||k.value?.name||"",P=J.safeParse({name:I,config:k.value?.config});function $(e){let t=k.value?.config;return t?"json"===e?o({mode:e,raw:JSON.stringify(t,null,2)}):"http"===e&&E(t)?o({mode:e,url:t.url,headers:ea(t.headers),clientId:t.oauthClient?.clientId??"",clientSecret:t.oauthClient?.clientSecret??""}):"stdio"!==e||E(t)?void o({mode:e}):o({mode:e,command:t.command,args:(t.args??[]).join(" "),env:ea(t.env)}):o({mode:e})}let L=(0,t.jsxs)("span",{className:"flex items-center gap-2 font-mono text-xs text-muted-foreground",children:["JSON",(0,t.jsx)(S.Switch,{size:"sm",checked:"json"===i,onCheckedChange:e=>{let t;return e?$("json"):void $((t=k.value?.config)&&!E(t)?"stdio":"http")}})]});return(0,t.jsx)(H.SettingDialogContent,{title:"Add MCP server",description:"Its tools become available to Thursday and every sub-agent.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Button,{variant:"ghost",onClick:n,children:"Cancel"}),(0,t.jsx)(g.Button,{disabled:!P.success,loading:N,onClick:()=>{P.success&&!N&&y(P.data)},children:"Connect"})]}),children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Name"}),(0,t.jsx)(v.Input,{value:I,onChange:e=>o({name:e.target.value}),placeholder:"notion",spellCheck:!1})]}),"json"===i?(0,t.jsxs)(x.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(x.FieldLabel,{children:"JSON"}),L]}),(0,t.jsx)(C.Textarea,{value:b,onChange:e=>o({raw:e.target.value}),spellCheck:!1,placeholder:eo,className:"min-h-64 resize-none font-mono text-xs"})]}):(0,t.jsxs)(w.Tabs,{value:i,onValueChange:e=>$(e),className:"gap-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(x.FieldLabel,{children:"Transport"}),L]}),(0,t.jsxs)(w.TabsList,{className:"w-full",children:[(0,t.jsx)(w.TabsTrigger,{value:"http",children:"HTTP"}),(0,t.jsx)(w.TabsTrigger,{value:"stdio",children:"STDIO"})]})]}),(0,t.jsxs)(w.TabsContent,{value:"http",className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"URL"}),(0,t.jsx)(v.Input,{value:l,onChange:e=>o({url:e.target.value}),placeholder:"https://mcp.notion.com/mcp",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Headers",pairs:d,onChange:e=>o({headers:e}),keyPlaceholder:"Authorization",valuePlaceholder:"Bearer sk-..."}),(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"OAuth client"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(v.Input,{value:m,onChange:e=>o({clientId:e.target.value}),placeholder:"Client ID",spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(v.Input,{value:p,onChange:e=>o({clientSecret:e.target.value}),placeholder:"Client secret",spellCheck:!1,type:"password",className:"font-mono text-xs"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Only for servers that refuse to register clients on their own, like Figma. Leave empty and one is created during sign-in."})]})]}),(0,t.jsxs)(w.TabsContent,{value:"stdio",className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Command"}),(0,t.jsx)(v.Input,{value:u,onChange:e=>o({command:e.target.value}),placeholder:"npx",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Args"}),(0,t.jsx)(v.Input,{value:f,onChange:e=>o({args:e.target.value}),placeholder:"-y @notionhq/notion-mcp-server",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Env",pairs:j,onChange:e=>o({env:e}),keyPlaceholder:"NOTION_TOKEN",valuePlaceholder:"ntn_..."})]})]}),T&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:T})]})})}function en({label:e,pairs:n,onChange:s,keyPlaceholder:a,valuePlaceholder:r}){let i=(e,t)=>s(n.map(n=>n.id===e?{...n,...t}:n));return(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:e}),(0,t.jsxs)("div",{className:"space-y-2",children:[n.map(e=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(v.Input,{value:e.key,onChange:t=>i(e.id,{key:t.target.value}),placeholder:a,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(v.Input,{value:e.value,onChange:t=>i(e.id,{value:t.target.value}),placeholder:r,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon",onClick:()=>s(n.filter(t=>t.id!==e.id)),children:(0,t.jsx)(u.X,{})})]},e.id)),(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>s([...n,es()]),children:[(0,t.jsx)(o.Plus,{}),"Add"]})]})]})}let es=(e="",t="")=>({id:crypto.randomUUID(),key:e,value:t}),ea=e=>Object.entries(e??{}).map(([e,t])=>es(e,t)),er=e=>{let t=e.filter(e=>e.key.trim());if(t.length)return Object.fromEntries(t.map(e=>[e.key.trim(),e.value]))},eo=`/** STDIO Example */
|
|
4
4
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(941051),j=e.i(95187);let b=(0,j.createServerReference)("7f230b0357a8d6818091fb8981f424afd921f99b72",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7fe4d932b1d57cd266de86cc2481632eafe6603389",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(248473),j=e.i(95187);let b=(0,j.createServerReference)("7f205d1240f42627a1e6de9116d0ac943d0b4270de",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7faad9c5d7887872a59722a8a48780695b761500d4",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,421429,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Segmented",0,function({options:e,value:r,onChange:a,className:i,...l}){return(0,t.jsx)("div",{role:"radiogroup",className:(0,n.cn)("flex w-fit gap-0.5 rounded-full bg-muted p-0.75",i),...l,children:e.map(e=>{let i=e.value===r;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":i,title:e.title,onClick:()=>a(e.value),className:(0,n.cn)("flex h-7 items-center justify-center gap-1.5 rounded-full px-3 text-[12.5px] whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-brand font-medium text-brand-foreground":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})}])},968978,7227,e=>{"use strict";var t=e.i(843476);function n({className:e}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:e,width:"24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function r({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})}function a({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 35 33",children:[(0,t.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,t.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})}function i({className:e}){return(0,t.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,t.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,t.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,t.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,t.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,t.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,t.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,t.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,t.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,t.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,t.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,t.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,t.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})}function l({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:e,"data-slot":"geist-logo-svg",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}e.s(["ClaudeIcon",0,i,"GoogleIcon",0,n,"GrokIcon",0,a,"OpenAIIcon",0,r,"VercelIcon",0,l],7227);let s={mistral:[{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"},{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"},{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"},{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"},{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"}],groq:[{d:"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"}],cerebras:[{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z",fill:"#F15A29"},{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"}],togetherai:[{d:"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z",fill:"#EF2CC1"},{d:"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z",fill:"#CAAEF5"},{d:"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z",fill:"#FC4C02"}],fireworks:[{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z",fill:"#5019C5"}],deepinfra:[{d:"M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z",fill:"#2A3275"},{d:"M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z",fill:"#5699DB"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",fill:"#39594D"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",fill:"#D18EE2"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",fill:"#FF7759"}]};e.s(["ProviderIcon",0,function({className:e,provider:o}){if(o in s)return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,"aria-hidden":"true",children:s[o].map(e=>(0,t.jsx)("path",{d:e.d,fill:e.fill},e.d))});let c=(e=>{switch(e){case"anthropic":return i;case"google":return n;case"openai":case"chatgpt":return r;case"vercel-ai-gateway":return l;case"xai":return a}})(o);return(0,t.jsx)(c,{className:e})}],968978)},635963,864723,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(218080),a=e.i(647163);let i="currentColor",l=[{id:"system",label:"System",value:i},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],s=Object.fromEntries(l.map(e=>[e.id,e.value])),o=l.filter(e=>e.value!==i).map(e=>e.value),c=[s.amber,s.red],d={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},u=Object.keys(d);e.s(["MARK_PAINTS",0,d,"MARK_PAINT_IDS",0,u,"MARK_PALETTE",0,o,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,i,"paintSwatch",0,function(e){let{look:t,colors:n}=d[e];return"aurora"===t?`radial-gradient(circle at 35% 30%, ${n[2]}, transparent 70%), linear-gradient(180deg, ${n[0]}, ${n[1]})`:`linear-gradient(135deg, ${n.join(", ")})`},"randomMarkFills",0,function(e){let t=[...o.filter(e=>!c.includes(e)).map(e=>({color:e})),...u.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t.slice(0,e)}],864723);let h=2*Math.PI,f="origin-center animate-in duration-300 zoom-in-0 [transform-box:fill-box]",m="-18 -18 276 276",p=e=>Math.round(100*e)/100,g=(e,t,n)=>Math.min(n,Math.max(t,e));function x(e){let t=e>>>0;return()=>{let e=Math.imul((t=t+0x6d2b79f5>>>0)^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/0x100000000}}function y(e,t){return[e[0]-t[0],e[1]-t[1]]}function b(e){let t=Math.hypot(e[0],e[1])||1;return[e[0]/t,e[1]/t]}function k(e){let t=e.map((e,t)=>{let n=t/128*h;return[120+Math.cos(n)*e,120+Math.sin(n)*e]}),n=`M${p(t[0][0])} ${p(t[0][1])}`;for(let e=0;e<128;e++){let r=t[(e-1+128)%128],a=t[e],i=t[(e+1)%128],l=t[(e+2)%128],s=a[0]+(i[0]-r[0])/6,o=a[1]+(i[1]-r[1])/6,c=i[0]-(l[0]-a[0])/6,d=i[1]-(l[1]-a[1])/6;n+=`C${p(s)} ${p(o)} ${p(c)} ${p(d)} ${p(i[0])} ${p(i[1])}`}return`${n}Z`}function v(e){let t=e.tilt*Math.PI/180,n=Math.cos(t),r=Math.sin(t),a=(t,a)=>[e.cx+t*n-a*r,e.cy+t*r+a*n],i=-e.len/2,l=e.len/2,s=[],o=[];for(let t=0;t<=30;t++){let n=t/30,r=1-n,c=r*r*i+n*n*l,d=-(2*r*n*e.bend),u=-(2*r*i)+2*n*l,h=-(2*r*e.bend)+2*n*e.bend,f=Math.hypot(u,h)||1,m=-h/f,p=u/f,g=e.width/2*Math.sin(Math.PI*n)**e.taper;s.push(a(c+m*g,d+p*g)),o.push(a(c-m*g,d-p*g))}let c=`M${p(s[0][0])} ${p(s[0][1])}`;for(let e=1;e<=30;e++)c+=`L${p(s[e][0])} ${p(s[e][1])}`;for(let e=29;e>=0;e--)c+=`L${p(o[e][0])} ${p(o[e][1])}`;return`${c}Z`}let M={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function w(e,t,n=.035){let r=x(12139^t),a=[2,3,5].map(e=>({k:e,a:(2*r()-1)/e,p:r()*h})),i=e.map((e,t)=>{let n=t/128*h,r=0;for(let e of a)r+=e.a*Math.sin(e.k*n+e.p);return r}),l=Math.max(...i.map(Math.abs))||1;return e.map((e,t)=>e*(1+n*i[t]/l))}let j=new Map;function L(e,t,n){var r,a,i;let l=`${"poly"===t?`poly|${e.sides}|${e.corner}|${e.rotation}|${n}`:"squircle"===t?`squircle|${e.squircle}|${n}`:"heart"===t?`heart|${n}`:`blob|${e.wobble}|${n}`}|${e.autofit}`,s=j.get(l);if(s)return s;let o=function(e){let t=Array(128);for(let n=0;n<128;n++){let r=n/128*h,a=Math.cos(r),i=Math.sin(r),l=0;for(let t=0;t<e.length;t++){let n=e[t],r=e[(t+1)%e.length],s=r[0]-n[0],o=r[1]-n[1],c=a*o-i*s;if(1e-9>Math.abs(c))continue;let d=n[0]-120,u=n[1]-120,h=(d*o-u*s)/c,f=(d*i-u*a)/c;h>l&&f>=-1e-9&&f<=1+1e-9&&(l=h)}t[n]=l||112}return t}((r=e,a=t,i=n,"squircle"===a?function(e){let t=[],n=2/e;for(let e=0;e<360;e++){let r=e/360*h,a=Math.cos(r),i=Math.sin(r);t.push([120+Math.sign(a)*Math.abs(a)**n*112,120+Math.sign(i)*Math.abs(i)**n*112])}return t}(r.squircle):"poly"===a?function(e,t,n){let r=n*Math.PI/180-Math.PI/2,a=[];for(let t=0;t<e;t++){let n=r+t/e*h;a.push([120+112*Math.cos(n),120+112*Math.sin(n)])}let i=(Math.PI-h/e)/2,l=224*Math.sin(Math.PI/e)/2*Math.tan(i)*g(t,.001,1),s=l/Math.tan(i),o=[];for(let t=0;t<e;t++){let n=a[t],r=a[(t-1+e)%e],c=a[(t+1)%e],d=b(y(r,n)),u=b(y(c,n)),f=[n[0]+d[0]*s,n[1]+d[1]*s],m=b([d[0]+u[0],d[1]+u[1]]),p=[n[0]+m[0]*l/Math.sin(i),n[1]+m[1]*l/Math.sin(i)],g=Math.atan2(f[1]-p[1],f[0]-p[0]),x=[n[0]+u[0]*s,n[1]+u[1]*s],k=Math.atan2(x[1]-p[1],x[0]-p[0])-g;for(;k>Math.PI;)k-=h;for(;k<-Math.PI;)k+=h;for(let e=0;e<=20;e++){let t=g+e/20*k;o.push([p[0]+Math.cos(t)*l,p[1]+Math.sin(t)*l])}}return o}(r.sides,r.corner,r.rotation):"heart"===a?function(){let e=[];for(let t=0;t<400;t++){let n=t/400*h,r=16*Math.sin(n)**3,a=13*Math.cos(n)-5*Math.cos(2*n)-2*Math.cos(3*n)-Math.cos(4*n);e.push([120+6.6*r,120-(a+2.2)*7.26])}return e}():function(e,t){let n=x(e),r=[1,2,3,4,5].map(e=>({k:e,a:(2*n()-1)/e,p:n()*h})),a=[],i=0;for(let e=0;e<360;e++){let t=e/360*h,n=0;for(let e of r)n+=e.a*Math.sin(e.k*t+e.p);a.push(n),i=Math.max(i,Math.abs(n))}let l=i>0?t/i:0;return a.map((e,t)=>{let n=t/360*h,r=112*(1+e*l);return[120+Math.cos(n)*r,120+Math.sin(n)*r]})}(i,r.wobble))),c="blob"===t?o:"heart"===t?function(e,t){let n=e;for(let e=0;e<2;e++){let e=n;n=e.map((t,n)=>{let r=0;for(let t=-3;t<=3;t++)r+=e[(n+t+128)%128];return r/7})}let r=n.reduce((e,t)=>e+t,0)/128,a=w(n.map(e=>.95*e+.05*r),t,.05),i=Math.round((2*x(20977^t)()-1)*3);return i?a.map((e,t)=>a[(t-i+256)%128]):a}(o,n):w(o,n),d=e.autofit?function(e){let t=h/128,n=0,r=0;for(let a of e)n+=.5*a*a*t,a>r&&(r=a);if(n<=0)return e;let a=Math.min(Math.sqrt(112*Math.PI*112/n),130/r);return e.map(e=>e*a)}(c):c;return j.size>400&&j.clear(),j.set(l,d),d}let A=e=>345*(.7+.3*e),S=[{cx:42,sway:40,period:5},{cx:134,sway:-35,period:6.5},{cx:209,sway:29,period:4.5}],N={eyeLen:1,eyeWid:1,eyeX:0,eyeY:0,bodyX:0,bodyY:0,rot:0,scale:1,blinkIn:0},C=e=>e*e*(3-2*e),z=e=>Math.sin(Math.PI*e);function E(e,t,n){return e<=0||e>=1?0:e<t?C(e/t):e>1-n?C((1-e)/n):1}let I={glance:{weight:26,dur:[900,1400],play:(e,t,n)=>{let r=E(e,.12,.34);return{eyeX:22*t*r,eyeY:22*n*r,rot:.9*t*r,blinkIn:40*!!(e<.02&&.4>Math.random())}}},lookAway:{weight:12,dur:[1800,2600],play:(e,t,n)=>{let r=E(e,.1,.46);return{eyeX:30*t*r,eyeY:(.5*n+.35)*22*r,rot:1.6*t*r}}},widen:{weight:8,dur:[700,950],play:(e,t)=>{let n=E(e,.22,.5);return{eyeLen:1+.16*n,eyeWid:1+.2*n,rot:-(.5*t)*n}}},squint:{weight:8,dur:[800,1050],play:e=>{let t=E(e,.25,.45);return{eyeLen:1-.3*t,eyeWid:1-.12*t}}},double:{weight:7,dur:[420,420],play:e=>({blinkIn:+(e<.02)})},nod:{weight:11,dur:[1150,1400],play:e=>({bodyY:10*Math.sin(2*h*e)*z(e),rot:2.2*Math.sin(2*h*e+.5)*z(e),eyeY:3.2*Math.sin(2*h*e-.7)*z(e)})},sink:{weight:7,dur:[1800,2300],play:e=>{let t=z(e)**.7;return{eyeLen:1-.26*t,eyeY:4*t,bodyY:8*t,scale:1-.03*t,rot:1.8*t}}},wave:{weight:7,dur:[1300,1700],play:(e,t)=>{let n=E(e,.24,.34);return{bodyX:t*Math.sin(1.5*h*e)*9*n,rot:t*Math.sin(1.5*h*e+.5)*4.5*n,eyeX:t*Math.sin(1.5*h*e)*5*n,eyeLen:1-.2*n}}},reach:{weight:7,dur:[1800,2300],play:e=>{let t=E(e,.28,.34);return{scale:1+.045*t,bodyY:-4*t,eyeLen:1-.28*t,eyeY:3*t,rot:1.8*t}}},tilt:{weight:11,dur:[1500,1900],play:(e,t)=>{let n=E(e,.22,.4);return{rot:9*t*n,bodyX:-3*t*n,eyeY:-1.5*n}}},sweep:{weight:9,dur:[1600,2200],play:(e,t,n)=>{let r=E(e,.12,.18),a=Math.cos(Math.PI*g((e-.15)/.7,0,1));return{eyeX:24*t*r*a,eyeY:24*n*r*a,rot:1.2*t*r*a}}},roll:{weight:5,dur:[900,1200],play:(e,t)=>{let n=z(e)**.5,r=h*e*(t>=0?1:-1);return{eyeX:20*Math.cos(r)*n,eyeY:14*Math.sin(r)*n,rot:1.5*Math.sin(r)*n,blinkIn:+(e>.9&&e<.93)}}},shake:{weight:8,dur:[650,900],play:(e,t)=>{let n=z(e),r=Math.sin(2*h*e);return{rot:t*r*5*n,bodyX:t*r*4*n,eyeX:-t*r*4*n}}},bounce:{weight:6,dur:[850,1100],play:e=>{let t=1-.45*e,n=Math.abs(Math.sin(h*e))*t;return{bodyY:-14*n,eyeY:2.5*n,scale:1-Math.max(0,-Math.cos(h*e))*t*.04}}},slowBlink:{weight:6,dur:[900,1200],play:e=>({eyeWid:1-.88*z(e)**.6,eyeY:1.5*z(e)})},perk:{weight:5,dur:[700,950],play:(e,t)=>{let n=E(e,.09,.62);return{bodyY:-7*n,scale:1+.035*n,eyeLen:1+.14*n,eyeWid:1+.1*n,rot:.8*t*n}}}},$=Object.keys(I),T={idle:{},connecting:{nod:0,wave:0,bounce:0,sweep:1.6,roll:1.4},listening:{glance:.3,lookAway:.15,sweep:.2,roll:0,wave:0,shake:0,bounce:0,sink:.3,widen:2.2,perk:1.8,nod:1.6,slowBlink:1.4},thinking:{lookAway:2.2,squint:2,tilt:1.8,roll:2,sweep:1.4,sink:1.6,glance:.8,slowBlink:1.2,nod:.3,wave:0,bounce:.2,perk:.5},delegating:{wave:2.6,nod:1.8,perk:1.6,glance:1.4,tilt:1.2,lookAway:.4,squint:.4,sink:0,roll:0},speaking:{nod:2,glance:1.2,widen:1.2,sink:0,roll:.3,wave:.4,slowBlink:.4,bounce:.6}},R={idle:{eyes:1,body:1,churn:0,churnSpeed:0,dwell:1,breathe:1,float:1,blink:1,lean:0,aspect:1,gazeX:0,gazeY:0},connecting:{eyes:.75,body:.91,churn:2.5,churnSpeed:3,dwell:.8,breathe:2.2,float:.6,blink:.6,lean:0,aspect:1.03,gazeX:0,gazeY:4},listening:{eyes:1.3,body:1.04,churn:0,churnSpeed:0,dwell:2.6,breathe:.45,float:.35,blink:1.8,lean:0,aspect:.97,gazeX:0,gazeY:-3},thinking:{eyes:.66,body:.96,churn:5,churnSpeed:.6,dwell:.5,breathe:1.3,float:1.4,blink:.8,lean:7,aspect:1.04,gazeX:-9,gazeY:-8},delegating:{eyes:.9,body:.98,churn:0,churnSpeed:0,dwell:2.2,breathe:.6,float:.5,blink:1.3,lean:-6,aspect:1,gazeX:15,gazeY:2},speaking:{eyes:.95,body:1,churn:2.5,churnSpeed:3,dwell:4,breathe:.4,float:.5,blink:1.2,lean:0,aspect:1,gazeX:0,gazeY:0}},_=Array(r.SPECTRUM_BANDS).fill(0);function D(){let e=Math.random();return e<.15?180+320*Math.random():e<.8?1200+2300*Math.random():3500+2800*Math.random()}let O={x:0,y:0,live:!1},B=!1;function F(e){if("number"==typeof e)return e;let t=0x811c9dc5;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),0x1000193);return(t>>>0)%1e4}function K({size:e=32,seed:i,color:l,shape:s,outline:o,paint:c,notify:u,crossed:x,state:y="idle",getSpectrum:b,options:w,className:j}){var C;let z=(0,n.useId)(),E=(0,n.useMemo)(()=>({...M,...w,...void 0===o?{}:{fill:!o}}),[w,o]),Y=`${z}-mask`,P=`${z}-paint`,q=`${z}-curtain`,G=(0,n.useRef)(null),U=(0,n.useRef)(null),H=(0,n.useRef)(null),W=(0,n.useRef)(null),X=(0,n.useRef)(null),V=(0,n.useRef)(null),Z=(0,n.useRef)(null),J=(0,n.useRef)(null),Q=(0,n.useRef)([]),ee=(0,n.useRef)(null),et=(0,n.useRef)(null),en=(0,n.useRef)(null),er=(0,n.useRef)(null),ea=void 0===i?E.seed:F(i),ei=s??E.shape,el=l??E.color,es=u??E.notify,eo=c?d[c]:null,ec=g((e-14)/98,0,1),ed=eo?"edge"in eo?eo.edge:null:(function(e){let t=/^#([0-9a-f]{6})$/i.exec(e);if(!t)return null;let n=e=>{let n=Number.parseInt(t[1].slice(e,e+2),16)/255;return n<=.04045?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(2)+.0722*n(4)}(el)??1)<.06?"dark":null,eu=(0,n.useMemo)(()=>L(E,ei,ea),[E,ei,ea]),eh=(0,n.useMemo)(()=>k(eu),[eu]),ef=(0,n.useMemo)(()=>v({len:E.eyeLen,width:E.eyeWidth,bend:E.eyeBend,taper:E.eyeTaper,tilt:E.eyeTilt,cx:120-E.eyeGap/2,cy:E.eyeY}),[E]),em=(0,n.useMemo)(()=>v({len:E.eyeLen,width:E.eyeWidth,bend:E.eyeBend,taper:E.eyeTaper,tilt:E.eyeTilt+E.eyeSkew,cx:120+E.eyeGap/2,cy:E.eyeY}),[E]),ep=eo?.look??null,eg=!!x,ex=(0,n.useRef)({cfg:E,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec});ex.current={cfg:E,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec},(0,n.useEffect)(()=>{B||(B=!0,window.addEventListener("pointermove",e=>{O.x=e.clientX,O.y=e.clientY,O.live=!0},{passive:!0}));let e=0,t=ex.current.shapeSeed%17*.91,n=0,a=0,i=performance.now()+600+D(),l=0,s=130,o=0,c=(0,r.createVoiceFollower)(),d={...R.idle},u=Object.keys(d),f=0,m=0,x=.5,y=0,b=0,v=0,M=Array(r.SPECTRUM_BANDS).fill(0),w=Array.from({length:r.SPECTRUM_BANDS},(e,t)=>1.7*t),j=0,L=performance.now(),C=null,z=performance.now()+1500+3e3*Math.random(),E=B=>{e=requestAnimationFrame(E);let{cfg:F,state:K}=ex.current,Y=B/1e3*F.speed,P=Math.min(.05,(B-L)/1e3);L=B;let q=R[K];for(let e of u)d[e]+=(q[e]-d[e])*.06;j+=P*d.churnSpeed*F.speed;let ea="speaking"===K?ex.current.getSpectrum?.():void 0,ei=c.read(ea??_,P),el=0;for(let e=0;e<r.SPECTRUM_BANDS;e++){let t=ei.bands[e];M[e]+=(t-M[e])*F.bandEase,w[e]+=P*(.05+.018*e)*(e%2?-1:1),el+=t}let es="speaking"===K?g(ei.level,0,1):0;f+=(es-f)*.3,m+=(es-m)*.016,ei.onset>0&&B-v>340&&(v=B,b-=F.punch*Math.min(1,1.6*f)*F.bobRate);let eo=.01*F.bobRate*F.bobRate;if(b+=-y*eo-.085*b*F.bobRate,y+=b,el>.04){let e=0;for(let t=0;t<r.SPECTRUM_BANDS;t++)e+=M[t]*t;x+=(e/el/(r.SPECTRUM_BANDS-1)-x)*.04}else x+=(.5-x)*.03;let ec=d.dwell;if(F.idle&&!C&&B>=z){let e=function(e){let t=T[e],n=e=>I[e].weight*(t[e]??1),r=0;for(let e of $)r+=n(e);let a=Math.random()*r;for(let e of $)if((a-=n(e))<=0)return e;return $[0]}(K),t=I[e],n=Math.PI/4*Math.floor(8*Math.random());C={key:e,start:B,dur:t.dur[0]+Math.random()*(t.dur[1]-t.dur[0]),dx:Math.cos(n),dy:.7*Math.sin(n)-.5*("thinking"===K)}}let ed=N;if(C){let e=(B-C.start)/C.dur;e>=1?(C=null,z=B+(9e3-74*F.liveliness)*ec*(.6+.8*Math.random())):(ed={...N,...I[C.key].play(e,C.dx,C.dy)}).blinkIn>0&&0===o&&(o=B+ed.blinkIn)}if(G.current){let e=F.breathe*d.breathe/100,n=m*F.pulse/300-.05*y,r=(.45-x)/.45*m*(F.stretch/100),a=(1+e*Math.sin(1.6*Y+t)-.75*n+r)*d.body*ed.scale/d.aspect,i=(1+n-.8*r)*d.body*ed.scale*d.aspect,l=25*e*Math.sin(1.1*Y+1.7*t)+ed.rot+d.lean,s=120+90*e*Math.sin(.7*Y+.6*t)+ed.bodyX,o=120+120*e*Math.sin(1.3*Y+2.3*t)+ed.bodyY+y*F.pulse*2;G.current.setAttribute("transform",`translate(${p(s)} ${p(o)}) rotate(${p(l)}) scale(${i.toFixed(4)} ${a.toFixed(4)}) translate(${-120} ${-120})`)}let eu=ex.current.look;if(eu){let e=B/1e3,t=ex.current.grow;if("flow"===eu)J.current?.setAttribute("gradientTransform",`rotate(-35 120 120) translate(${p(-(e/3.6%1)*A(t))} 0)`);else if("aurora"===eu)for(let[t,n]of S.entries()){let r=.5-.5*Math.cos(e/n.period*h);Q.current[t]?.setAttribute("transform",`translate(${p(n.sway*r)} 0) translate(${n.cx} 91) skewX(${p(20*r-10)}) scale(1 ${p(1+.18*r)}) translate(${-n.cx} -91)`)}}let eh=(M[0]+M[1]+M[2])/3,ef=(M[3]+M[4])/2,em=(M[5]+M[6]+M[7])/3,ep=eh+ef+em>.03&&F.ripple>0,eg=d.churn>0;if(H.current&&(ep||eg)){let e=j,n=k(ex.current.radii.map((n,r)=>{let a=r/128*h,i=n;return ep&&(i+=F.ripple*(eh*Math.sin(2*a+w[0])+.7*ef*Math.sin(3*a+w[1])+.5*em*Math.sin(4*a+w[2]))),eg&&(i+=d.churn*(.65*Math.sin(2*a+e)+.35*Math.sin(3*a-1.4*e+t))),i}));H.current.setAttribute("d",n),W.current?.setAttribute("d",n),Z.current?.setAttribute("d",n)}if(U.current){let e=0,r=0;if(F.follow&&O.live&&er.current){let t=er.current.getBoundingClientRect();t.width>0&&(e=g((O.x-(t.left+t.width/2))/(1.5*t.width),-1,1)*F.gazeRange,r=g((O.y-(t.top+t.height/2))/(1.5*t.height),-1,1)*F.gazeRange)}n+=(e-n)*.12,a+=(r-a)*.12;let c=F.float*d.float*(.62*Math.sin(1.15*Y+t)+.38*Math.sin(.47*Y+2.1*t)),u=1;if(0===l&&!ex.current.crossed&&(o>0&&B>=o?(l=B,o=0):F.blink&&B>=i&&(l=B),l>0&&(s=110+60*Math.random())),l>0){let e=(B-l)/s;e>=1?(l=0,i=B+D()*d.blink):u=1-.94*Math.sin(Math.PI*e)}let h=`translate(${p(n+ed.eyeX+d.gazeX)} ${p(a+c+ed.eyeY+d.gazeY)}) translate(120 ${F.eyeY}) scale(1 ${u.toFixed(3)}) translate(${-120} ${-F.eyeY})`;U.current.setAttribute("transform",h),ee.current?.setAttribute("transform",h);let f=ed.eyeWid*(1-.13*m)*d.eyes,x=ed.eyeLen*(1+.04*m)*d.eyes,y=F.eyeGap/2;for(let[e,t]of[X,V].entries()){if(!t.current)continue;let n=120+(0===e?-y:y),r=0===e?F.eyeTilt:F.eyeTilt+F.eyeSkew,a=x.toFixed(3),i=f.toFixed(3),l=`translate(${p(n)} ${F.eyeY}) rotate(${p(r)}) scale(${a} ${i}) rotate(${p(-r)}) translate(${p(-n)} ${-F.eyeY})`;t.current.setAttribute("transform",l),(0===e?et:en).current?.setAttribute("transform",l)}}};return e=requestAnimationFrame(E),()=>cancelAnimationFrame(e)},[]);let ey=E.notifyAngle*Math.PI/180,eb=eo?`url(#${P})`:"var(--fg)",ek=p(18-3*ec),ev=p(22-9*ec),eM=(e,n,r)=>eg?(0,t.jsx)("path",{d:`M${n-ek} ${E.eyeY-ek}L${n+ek} ${E.eyeY+ek}M${n+ek} ${E.eyeY-ek}L${n-ek} ${E.eyeY+ek}`,fill:"none",stroke:r,strokeWidth:ev,strokeLinecap:"round"}):(0,t.jsx)("path",{d:e,fill:r});return(0,t.jsxs)("svg",{ref:er,"data-slot":"bot-mark","aria-hidden":"true",className:j,viewBox:m,width:e,height:e,style:{overflow:"visible","--fg":el},children:[(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:z,children:(0,t.jsx)("path",{ref:W,d:eh})}),E.fill&&(0,t.jsxs)("mask",{id:Y,maskUnits:"userSpaceOnUse",children:[(0,t.jsx)("path",{ref:Z,d:eh,fill:"#fff"}),(0,t.jsx)("g",{clipPath:`url(#${z})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:X,children:eM(ef,120-E.eyeGap/2,"#000")}),(0,t.jsx)("g",{ref:V,children:eM(em,120+E.eyeGap/2,"#000")})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*E.notifyDist),cy:p(120+Math.sin(ey)*E.notifyDist),r:E.notifyR+E.notifyRing,fill:"#000",className:f})]}),eo&&(0,t.jsx)("linearGradient",{ref:J,id:P,...(C=eo.look,"flow"===C?{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:A(ec),y2:0,spreadMethod:"repeat"}:{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:240*("duo"===C),y2:240}),children:(function({look:e,colors:t}){let n="aurora"===e?t.slice(0,2):t;return n.map((e,t)=>({offset:t/(n.length-1),color:e}))})(eo).map(e=>(0,t.jsx)("stop",{offset:e.offset,stopColor:e.color},`${e.offset}-${e.color}`))}),eo?.look==="aurora"&&(0,t.jsx)("filter",{id:q,filterUnits:"userSpaceOnUse",x:-72,y:-72,width:384,height:384,colorInterpolationFilters:"sRGB",children:(0,t.jsx)("feGaussianBlur",{stdDeviation:p(34-12*ec)})})]}),(0,t.jsxs)("g",{ref:G,children:[E.fill?(0,t.jsxs)("g",{mask:`url(#${Y})`,children:[(0,t.jsx)("path",{ref:H,d:eh,fill:eb}),eo?.look==="aurora"&&(0,t.jsxs)("g",{filter:`url(#${q})`,children:[(0,t.jsx)("rect",{x:-72,y:-72,width:384,height:384,fill:eb}),S.map((e,n)=>(0,t.jsx)("ellipse",{ref:e=>{Q.current[n]=e},cx:e.cx,cy:91,rx:p(60-29*ec),ry:138,fill:eo.colors[2+n],style:{mixBlendMode:"screen"}},e.cx))]})]}):(0,t.jsx)("path",{ref:H,d:eh,fill:"none",stroke:eb,strokeWidth:E.strokeWidth,strokeLinejoin:"round"}),E.fill&&"dark"===ed&&(0,t.jsx)("g",{clipPath:`url(#${z})`,opacity:.92,children:(0,t.jsxs)("g",{ref:ee,children:[(0,t.jsx)("g",{ref:et,children:eM(ef,120-E.eyeGap/2,"#fff")}),(0,t.jsx)("g",{ref:en,children:eM(em,120+E.eyeGap/2,"#fff")})]})}),!E.fill&&(0,t.jsx)("g",{clipPath:`url(#${z})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:X,children:eM(ef,120-E.eyeGap/2,eb)}),(0,t.jsx)("g",{ref:V,children:eM(em,120+E.eyeGap/2,eb)})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*E.notifyDist),cy:p(120+Math.sin(ey)*E.notifyDist),r:E.notifyR,className:(0,a.cn)("fill-amber-600 dark:fill-amber-400",f)})]})]})}e.s(["BotMark",0,K,"BotsMark",0,function({size:e=16,className:n}){return(0,t.jsx)(K,{size:e,seed:"bots",className:n})},"markAtRest",0,function(e){let t=(e,t)=>v({len:M.eyeLen,width:M.eyeWidth,bend:M.eyeBend,taper:M.eyeTaper,tilt:t,cx:e,cy:M.eyeY});return{head:k(L(M,M.shape,F(e))),eyes:[t(120-M.eyeGap/2,M.eyeTilt),t(120+M.eyeGap/2,M.eyeTilt+M.eyeSkew)]}}],635963)},805995,906232,e=>{"use strict";var t=e.i(843476),n=e.i(493801),r=e.i(456420);let a={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};a.node;let i=(0,r.default)(a),l={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};l.node;let s=(0,r.default)(l);var o=e.i(689664),c=e.i(867927);let d={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};d.node;let u=(0,r.default)(d);var h=e.i(560972),h=h,f=e.i(815170),m=e.i(758925),p=e.i(566595),g=e.i(986206),x=e.i(466787),y=e.i(271645),b=e.i(798120),k=e.i(167881),v=e.i(23750),M=e.i(917162),w=e.i(59377),j=e.i(818125),L=e.i(671428),A=e.i(412294),S=e.i(146538),N=e.i(968978),C=e.i(265402),z=e.i(635963),E=e.i(95187);let I=(0,E.createServerReference)("7f35fd2496a448d9a9078b3acd8ae8690a8bae0571",E.callServer,void 0,E.findSourceMapURL,"removeConfigAction");e.s(["removeConfigAction",0,I],906232);var $=e.i(690191),T=e.i(992112),R=e.i(508734),_=e.i(421429),D=e.i(36174);let O={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},B=`display_information:
|
|
2
|
+
name: Thursday
|
|
3
|
+
features:
|
|
4
|
+
app_home:
|
|
5
|
+
messages_tab_enabled: true
|
|
6
|
+
messages_tab_read_only_enabled: false
|
|
7
|
+
bot_user:
|
|
8
|
+
display_name: Thursday
|
|
9
|
+
oauth_config:
|
|
10
|
+
scopes:
|
|
11
|
+
bot: [chat:write, im:history, im:read, users:read, files:read, files:write]
|
|
12
|
+
settings:
|
|
13
|
+
event_subscriptions:
|
|
14
|
+
bot_events: [message.im]
|
|
15
|
+
interactivity:
|
|
16
|
+
is_enabled: true
|
|
17
|
+
socket_mode_enabled: true
|
|
18
|
+
`,F=({href:e,children:n})=>(0,t.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:n}),K=({children:e})=>(0,t.jsx)("span",{className:"font-medium text-foreground",children:e}),Y={telegram:[(0,t.jsxs)(t.Fragment,{children:["In Telegram, write to"," ",(0,t.jsx)(F,{href:"https://t.me/BotFather",children:"@BotFather"}),", send ",(0,t.jsx)(K,{children:"/newbot"})," ","and pick a name. It answers with a ",(0,t.jsx)(K,{children:"token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Telegram"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["From your phone, ",(0,t.jsx)(K,{children:"write anything to your new bot"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["A question appears on this computer. Press ",(0,t.jsx)(K,{children:"Allow"}),". Done — write to the bot and Thursday answers."]})],discord:[(0,t.jsxs)(t.Fragment,{children:["At"," ",(0,t.jsx)(F,{href:"https://discord.com/developers/applications",children:"discord.com/developers"}),", make a ",(0,t.jsx)(K,{children:"New Application"}),". On its ",(0,t.jsx)(K,{children:"Bot"})," page press"," ",(0,t.jsx)(K,{children:"Reset Token"})," and copy it."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Discord"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["On the application's ",(0,t.jsx)(K,{children:"OAuth2"})," page, make an invite link with the"," ",(0,t.jsx)(K,{children:"bot"})," scope and add the bot to a server of your own. Discord only lets you write to a bot you share a server with."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Send the bot a direct message"})," (not in the server), then press"," ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})],slack:[(0,t.jsxs)(t.Fragment,{children:["At ",(0,t.jsx)(F,{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,t.jsx)(K,{children:"Create New App › From a manifest"}),", and paste the manifest (the button under these steps copies it)."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,t.jsx)(K,{children:"connections:write"}),". It starts with xapp- — paste it below as the"," ",(0,t.jsx)(K,{children:"app token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb- — paste it below as the ",(0,t.jsx)(K,{children:"bot token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["In Slack, open the app under ",(0,t.jsx)(K,{children:"Apps"}),", write in its ",(0,t.jsx)(K,{children:"Messages"})," ","tab, then press ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})]};function P(){let[e,n]=(0,y.useState)("telegram"),[r,a]=(0,y.useState)(!1);return(0,t.jsxs)("section",{className:"space-y-4 rounded-xl bg-muted/40 p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium",children:"Connect a chat app in four steps"}),(0,t.jsx)(_.Segmented,{"aria-label":"Which chat app",value:e,onChange:n,options:D.REACH_CHANNELS.map(e=>({value:e,label:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(j.SiteIcon,{host:O[e],className:"size-3.5 rounded-[3px]"}),D.REACH_LABEL[e]]})}))})]}),(0,t.jsx)("ol",{className:"space-y-2.5",children:Y[e].map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] text-muted-foreground ring-1 ring-border/60",children:n+1}),(0,t.jsx)("span",{className:"min-w-0 text-muted-foreground",children:e})]},n))}),"slack"===e&&(0,t.jsxs)(k.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(B).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}),children:[r?(0,t.jsx)(o.Check,{}):(0,t.jsx)(R.Copy,{}),r?"Copied":"Copy the manifest"]}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Only the one person you allow can write, and only direct messages are read. This computer has to be on with Thursday running; for bots to work while no tab is open, switch on ",(0,t.jsx)(K,{children:"Work while the app is closed"})," in Settings › Bots."]})]})}var q=e.i(511769),G=e.i(609856),U=e.i(283653),H=e.i(647163);let W=(0,E.createServerReference)("7fa609aaba119f440bacd729953ca9f7df8aede8ed",E.callServer,void 0,E.findSourceMapURL,"forgetReachAction");function X(){let{data:e}=(0,U.useServerRoute)(b.queryKey.reach);return((0,q.useAppEvent)({reach:()=>void(0,U.revalidate)(b.queryKey.reach)}),e?.channels.length)?(0,t.jsx)("div",{className:"pt-2",children:e.channels.map(e=>(0,t.jsx)(V,{channel:e},e.name))}):null}function V({channel:e}){let[n,r]=(0,G.useServerAction)(W,{onOk:()=>(0,U.revalidate)(b.queryKey.reach)}),a="px-1 text-xs leading-6",i=D.REACH_LABEL[e.name];return e.problem&&!e.bot?(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-destructive"),children:[i,": ",e.problem]}):e.bot?e.allowed?(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-muted-foreground"),children:[i,": listening as ",e.bot,". ",e.allowed.name," is let in."," ",(0,t.jsx)("button",{type:"button",disabled:r,onClick:()=>void n(e.name).catch(()=>{}),className:"rounded-sm text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:"Let them go"})]}):(0,t.jsxs)("p",{className:(0,H.cn)(a,H.WAITING_INK),children:[i,": listening as ",e.bot,". Write to it from your phone, then press Allow here."]}):(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-muted-foreground"),children:[i,": connecting…"]})}var Z=e.i(895836);let J={[T.EXA_API_KEY]:p.Search,...Object.fromEntries(Object.values(D.REACH_KEYS).flat().map(e=>[e,g.Smartphone]))},Q={image:f.Image,video:u,speech:i,transcription:s},ee={keys:["voice","easy","text","search"],models:["bots","studio"],phone:["phone"]};function et({screen:e}){let{data:n,isLoading:r,error:a}=(0,U.useServerRoute)(b.queryKey.config);if(r)return(0,t.jsx)(Z.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(Z.SettingError,{message:a.message});let i=e=>(0,T.isConfigSet)(n,e),l=ee[e].flatMap(e=>T.CONFIG_GROUPS.find(t=>t.id===e)??[]),s=l.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,t.jsxs)(Z.SettingScreen,{footer:(0,t.jsx)(Z.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":"phone"===e?"Nothing on this computer is opened to the internet: the app asks the chat service what was written.":`${s.filter(e=>i(e.key)).length} of ${s.length} set${l.some(e=>!(0,T.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:["phone"===e&&(0,t.jsx)(P,{}),l.map(e=>(0,t.jsxs)(Z.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(er,{group:e,isSet:i}),children:["easy"===e.id?(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,t.jsx)(ea,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,t.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,t.jsx)(en,{entry:e,set:i(e.key)},e.key))}):(0,t.jsx)(Z.SettingItems,{children:e.entries.map(r=>{let a;return r.choices?(0,t.jsx)(ef,{entry:r,choices:r.choices,value:(a=r.key,n?.find(e=>e.key===a)?.value),isSet:i},r.key):(0,t.jsx)(ea,{entry:r,set:i(r.key),needed:!(0,T.groupSatisfied)(e,i)},r.key)})}),"phone"===e.id&&(0,t.jsx)(X,{})]},e.id))]})}function en({entry:e,set:n}){return(0,t.jsxs)("button",{type:"button",onClick:()=>ex(e,n),"aria-label":`${e.label}: ${n?"set":"not set"}`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,t.jsx)(eh,{entry:e}),n&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 grid size-4 place-items-center rounded-full bg-primary text-primary-foreground ring-2 ring-background",children:(0,t.jsx)(o.Check,{className:"size-2.5"})})]}),(0,t.jsx)("span",{className:(0,H.cn)("max-w-full truncate text-[11px]",n?"text-foreground":"text-muted-foreground"),children:e.label})]})}function er({group:e,isSet:n}){return"none"===e.require?null:(0,T.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(o.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,H.cn)("flex items-center gap-1 font-mono text-[11px]",H.WAITING_INK),children:[(0,t.jsx)(x.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function ea({entry:e,set:n,needed:r,card:a=!1,narrow:i=!1}){let l=es(e,n),s=ec(e,n),d=eo(e,n),u=s.data?ed(s.data):el(n,r,l.data,e.signIn),h=l.isLoading||s.isLoading,f=(0,t.jsxs)("span",{className:(0,H.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",u.ink),children:[u.warn?(0,t.jsx)(x.TriangleAlert,{className:"size-3"}):n&&(0,t.jsx)(o.Check,{className:"size-3"}),u.text]});return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r;return e.signIn?(r=e,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(eg,{entry:r,onDone:e})})):ex(e,n)},className:(0,H.cn)("group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",a&&"rounded-xl border border-border/60"),children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(eh,{entry:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,t.jsx)("span",{className:"rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:"recommended"})]}),i?h?(0,t.jsx)(L.Skeleton,{className:"h-3 w-20"}):f:(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?n?eu(s.data,d):"sign in with your account":e.key})]}),i?null:h?(0,t.jsx)(L.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let ei=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function el(e,t,n,r){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${ei.format(n.balance)} left`,ink:n.low?H.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:r?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:H.WAITING_INK,warn:!0}:{text:r?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function es(e,t){return(0,U.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?b.queryKey.gatewayCredits:null)}function eo(e,t){let{data:n}=(0,U.useServerRoute)(t&&e.signIn?b.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function ec(e,t){return(0,U.useServerRoute)(t&&e.signIn?b.queryKey.subscriptionUsage:null)}function ed(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?H.WAITING_INK:"text-muted-foreground",warn:e.high}}function eu(e,t){let r=!e||"refused"in e?null:e,a=`${r?.plan??t??"unknown"} plan`;return r?.resetsAt?`${a} \xb7 resets in ${(0,n.formatDistanceToNowStrict)(new Date(r.resetsAt))}`:a}function eh({entry:e}){if(e.provider)return(0,t.jsx)(N.ProviderIcon,{provider:e.provider,className:"size-4"});let n=J[e.key]??m.KeyRound,r=(0,t.jsx)(n,{className:"size-4 text-muted-foreground"});return e.site?(0,t.jsx)(j.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:r}):r}function ef({entry:e,choices:n,value:r,isSet:a}){let i=n.find(e=>e.value===r),l=n.filter(e=>a(e.needs)),s=r&&!i?r:null,o=e.kind?Q[e.kind]:z.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r,a,i;return e.kind||e.text?(r=e,M.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(em,{entry:r,onDone:e})})):(a=e,i=n,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(ep,{entry:a,choices:i,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(o,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!i&&!s&&(0,t.jsx)("span",{className:(0,H.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?H.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:i?.label??s??(e.kind?"Not offered to bots until you pick one":l[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function em({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=r?.find(t=>t.key===e.key)?.value,[i,l]=(0,y.useState)(()=>{let t=e.text?(0,C.parseTextModel)(a):(0,C.parseMediaModel)(a);return{provider:t?.provider??null,model:t?.model??""}}),s=()=>{(0,U.revalidate)(b.queryKey.config),n()},[o]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} saved`,onOk:s}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:s});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(S.ModelPicker,{kind:e.kind,provider:i.provider,model:i.model,onChange:t=>{l(t),t.model.trim()&&o(e.key,`${t.provider}/${t.model.trim()}`)}})})}function ep({entry:e,choices:n,onDone:r}){let{data:a}=(0,U.useServerRoute)(b.queryKey.config),i=a?.find(t=>t.key===e.key)?.value,l=()=>{(0,U.revalidate)(b.queryKey.config),r()},[s,o]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} saved`,onOk:l}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:l});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Close"})]}),children:(0,t.jsx)(Z.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,T.isConfigSet)(a,e.needs)&&`needs ${e.needs}`})),value:i,onChange:t=>s(e.key,t),disabled:o})})}function eg({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=(0,T.isConfigSet)(r,e.key),i=eo(e,a),l=ec(e,a),s=l.data?ed(l.data):null,[o,c]=(0,G.useServerAction)(I,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel),n()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:a?(0,t.jsxs)(t.Fragment,{children:["Signed in ·"," ",(0,t.jsx)("span",{className:"font-mono",children:eu(l.data,i)}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,H.cn)("font-mono",s.ink),children:s.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:c,onClick:()=>o(e.key),children:"Sign out"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:a?"Close":"Cancel"}),!a&&(0,t.jsx)(A.ChatGptSignIn,{})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(Z.SettingNote,{children:a?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),l.data&&"refused"in l.data&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.data.refused})]})})}function ex(e,n){return M.notify.component({className:"sm:max-w-md",renderer:({close:r})=>(0,t.jsx)(ey,{entry:e,set:n,onDone:r})})}function ey({entry:e,set:n,onDone:r}){let[a,i]=(0,y.useState)(""),{data:l}=es(e,n),s=l?el(n,!1,l):null,o=()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel)},[c,d]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{o(),r()}}),[u,h]=(0,G.useServerAction)(I,{okMessage:`${e.label} key removed`,onOk:()=>{o(),r()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,H.cn)("font-mono",s.ink),children:s.text})]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(k.Button,{variant:"ghost",loading:h,onClick:()=>u(e.key),children:"Remove"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Cancel"}),(0,t.jsx)(k.Button,{loading:d,disabled:a.trim().length<8,onClick:()=>c(e.key,a),children:n?"Replace":"Save"})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Input,{value:a,onChange:e=>i(e.target.value),onKeyDown:t=>{"Enter"===t.key&&a.trim().length>=8&&c(e.key,a)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0}),l&&"refused"in l&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:n}=(0,U.useServerRoute)(b.queryKey.config),r=e=>(0,T.isConfigSet)(n,e),a=e=>T.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,l]=(0,y.useState)(!1),s=a("voice"),o=[...s,...a("text")],c=o.filter((t,n)=>(n<4||r(t.key))&&!(e&&s.includes(t))),d=o.filter(t=>!c.includes(t)&&!(e&&s.includes(t)));return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"flex flex-col gap-2",children:a("easy").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[c.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key)),d.length>0&&(0,t.jsxs)(w.Popover,{open:i,onOpenChange:l,children:[(0,t.jsxs)(w.PopoverTrigger,{"aria-label":`${d.length} more providers`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-10.5 place-items-center rounded-[13px] bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,t.jsx)(h.default,{className:"size-4"})}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,t.jsx)(w.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>l(!1),children:d.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key))})]})]}),a("search").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,t.jsx)(et,{screen:"keys"}),"ModelsSetting",0,()=>(0,t.jsx)(et,{screen:"models"}),"PhoneSetting",0,()=>(0,t.jsx)(et,{screen:"phone"})],805995)},992112,e=>{"use strict";var t=e.i(149666),n=e.i(265402),r=e.i(36174);let a=[t.LIVE_PROVIDER.apiKeyName],i={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},l={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s="EXA_API_KEY",o="DEFAULT_MODEL",c={key:o,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:n.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},d=e=>a.includes(e.apiKeyName),u=e=>!!e.signIn||"vercel-ai-gateway"===e.id,h=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn}),f=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(d).map(h)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(u).map(e=>({...h(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(e=>!d(e)&&!u(e)).map(h)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:s,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai"}]},{id:"phone",title:"phone",hint:"write to Thursday from a chat app — nothing is opened to the outside",section:"keys",require:"none",entries:[{key:r.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:r.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:r.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:r.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[c]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(i).map(e=>({key:i[e],...l[e],kind:e,choices:n.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(f.flatMap(e=>e.entries).map(e=>[e.key,e])),f.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(f.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,f,"DEFAULT_MODEL_KEY",0,o,"EXA_API_KEY",0,s,"MEDIA_MODEL_KEYS",0,i,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1},"mediaModelWords",0,e=>`${"image"===e?"an":"a"} ${e} model`])},690191,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f56d212c51cd2b159b8be5a96edb384a5b4ebc17b",t.callServer,void 0,t.findSourceMapURL,"setConfigAction");e.s(["setConfigAction",0,n])},36174,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",n="DISCORD_BOT_TOKEN",r="SLACK_APP_TOKEN",a="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,n,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[n],slack:[r,a]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,r,"SLACK_BOT_TOKEN_KEY",0,a,"TELEGRAM_TOKEN_KEY",0,t])},218080,e=>{"use strict";let t=[1,3,5,8,13,21,34,55,90],n=[1,1.1,1.25,1.45,1.7,2,2.4,2.9],r=n.length,a=Array(r).fill(0);function i(e,a,i){e.getByteFrequencyData(a);for(let e=0;e<r;e++){let r=0,l=t[e],s=Math.min(t[e+1],a.length);for(let e=l;e<s;e++)r+=a[e];let o=s>l?r/(s-l)/255:0;i[e]=Math.min(1,o*n[e])}return i}e.s(["SPECTRUM_BANDS",0,r,"createAudioTap",0,function(){let e=new Audio;e.autoplay=!0;let t=null,n=null,l=new Uint8Array(0),s=null,o=Array(r).fill(0),c=null,d=new Uint8Array(0),u=null,h=Array(r).fill(0),f=new Uint8Array(512);function m(){if(t&&n)return{context:t,analyser:n};let e=new AudioContext,r=e.createAnalyser();return r.fftSize=512,r.smoothingTimeConstant=.55,l=new Uint8Array(r.frequencyBinCount),e.resume().catch(()=>{}),t=e,n=r,{context:e,analyser:r}}return{element:e,open:m,levels:()=>{var e;return{output:(e=n)?(e.getByteTimeDomainData(f),Math.sqrt(f.reduce((e,t)=>e+((t-128)/128)**2,0)/f.length)):0}},listen(e){if(s?.mediaStream===e)return;s?.disconnect();let t=m();(s=t.context.createMediaStreamSource(e)).connect(t.analyser),t.context.resume()},hear(e){if(u?.mediaStream===e)return;u?.disconnect();let t=m();c||((c=t.context.createAnalyser()).fftSize=512,c.smoothingTimeConstant=.6,d=new Uint8Array(c.frequencyBinCount)),(u=t.context.createMediaStreamSource(e)).connect(c),t.context.resume()},read:()=>n?i(n,l,o):a,readMic:()=>c?i(c,d,h):a}},"createClipTap",0,function(e){let t=new AudioContext,n=t.createAnalyser();n.fftSize=512,n.smoothingTimeConstant=.55;let a=new Uint8Array(n.frequencyBinCount),l=Array(r).fill(0);return t.createMediaElementSource(e).connect(n),n.connect(t.destination),{resume:()=>t.resume().catch(()=>{}),read:()=>i(n,a,l),close:()=>t.close().catch(()=>{})}},"createVoiceFollower",0,function(){let e=Array(r).fill(0),t=Array(r).fill(0),n={level:0,phrase:0,onset:0,bands:Array(r).fill(0)},a=0,i=0,l=1/0,s=(e,t,n,r)=>e+(t-e)*Math.min(1,r/n);return{read(o,c){let d=0,u=0,h=0;for(let a=0;a<r;a++){let r=o[a]??0;d+=r,e[a]=s(e[a],r,r>e[a]?.03:2.5,c),t[a]=s(t[a],r,r<t[a]?.12:3,c);let i=e[a]-t[a],l=i>.12?Math.min(1,Math.max(0,(r-t[a])/i)):0;n.bands[a]=l,i>.12&&(u+=l,h++)}let f=Math.min(1,Math.max(0,(d/r-.06)/.14)),m=f*f*(3-2*f);for(let e=0;e<r;e++)n.bands[e]*=m;return n.level=(h?u/h:0)*m,a=s(a,n.level,.05,c),i=s(i,n.level,.22,c),n.phrase=s(n.phrase,n.level,.45,c),l+=c,n.onset=0,a>i+.1&&a>.3&&l>.12&&(l=0,n.onset=Math.min(1,a)),n}}}])},33383,e=>{"use strict";var t=e.i(271645),n=e.i(108868),r=e.i(145484),a=e.i(146376);e.s(["useAnchoredPopupScrollLock",0,function(e,i,l,s){let[o,c]=t.useState(!1);(0,a.useIsoLayoutEffect)(()=>{if(!e||!i||null==l)return void c(!1);let t=(0,n.ownerDocument)(l).documentElement.clientWidth,r=l.offsetWidth;c(t>0&&r>0&&r>=t-20)},[e,i,l]),(0,r.useScrollLock)(e&&(!i||o),s)}])},493801,e=>{"use strict";var t=e.i(24708),n=e.i(55545),r=e.i(455024),a=e.i(99151),i=e.i(845110),l=e.i(281092),s=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,o){return function(e,t,o){var c;let d,u,h=(0,r.getDefaultOptions)(),f=o?.locale??h.locale??n.defaultLocale,m=(u=(0,l.toDate)(e)-(0,l.toDate)(t))<0?-1:u>0?1:u;if(isNaN(m))throw RangeError("Invalid time value");let p=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:m}),[g,x]=(0,i.normalizeDates)(o?.in,...m>0?[t,e]:[e,t]),y=(c=o?.roundingMethod??"round",e=>{let t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t}),b=x.getTime()-g.getTime(),k=b/s.millisecondsInMinute,v=(b-((0,a.getTimezoneOffsetInMilliseconds)(x)-(0,a.getTimezoneOffsetInMilliseconds)(g)))/s.millisecondsInMinute,M=o?.unit;if("second"===(d=M||(k<1?"second":k<60?"minute":k<s.minutesInDay?"hour":v<s.minutesInMonth?"day":v<s.minutesInYear?"month":"year"))){let e=y(b/1e3);return f.formatDistance("xSeconds",e,p)}if("minute"===d){let e=y(k);return f.formatDistance("xMinutes",e,p)}if("hour"===d){let e=y(k/60);return f.formatDistance("xHours",e,p)}if("day"===d){let e=y(v/s.minutesInDay);return f.formatDistance("xDays",e,p)}if("month"===d){let e=y(v/s.minutesInMonth);return 12===e&&"month"!==M?f.formatDistance("xYears",1,p):f.formatDistance("xMonths",e,p)}else{let e=y(v/s.minutesInYear);return f.formatDistance("xYears",e,p)}}(e,(0,t.constructNow)(e),o)}],493801)},508734,e=>{"use strict";var t=e.i(456420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let r=(0,t.default)(n);e.s(["Copy",0,r],508734)},560972,e=>{"use strict";var t=e.i(456420);let n={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};n.node;let r=(0,t.default)(n);e.s(["default",0,r])},815170,e=>{"use strict";var t=e.i(456420);let n={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};n.node;let r=(0,t.default)(n);e.s(["Image",0,r],815170)},611568,e=>{"use strict";var t=e.i(758379);e.s(["LoaderCircle",()=>t.default])},986206,e=>{"use strict";var t=e.i(456420);let n={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};n.node;let r=(0,t.default)(n);e.s(["Smartphone",0,r],986206)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
|