1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32092],{8435:(e,t,n)=>{n.d(t,{Gd:()=>s,rS:()=>l,u5:()=>r,wu:()=>o});let a={guest_limit_reached:"messages",guest_research_limit_reached:"research"};function r(e){let t=null!=e?e:{},n="string"==typeof t.code?a[t.code]:void 0;if(!n)return null;let r=Number(t.limit);return{allowance:n,reason:"ip"===t.reason||"room"===t.reason?t.reason:"guest",limit:Number.isFinite(r)&&r>0?r:null}}function o(e){var t;return e&&"string"==typeof e.code?r({...null!=(t=e.body)?t:{},code:e.code}):null}let i=new Set;function s(e){for(let t of[...i])t(e)}function l(e){return i.add(e),()=>{i.delete(e)}}},12542:(e,t,n)=>{n.d(t,{Im:()=>c,NZ:()=>g,VR:()=>f});var a=n(76044),r=n(85352),o=n(57867);let i=/```csv\s*\n([\s\S]*?)```/i,s=/^\|?[\s:|-]+\|[\s:|-]*$/;function l(e){return e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim())}function c(e){var t,n,a,o;let c=i.exec(e);if(null==c||null==(t=c[1])?void 0:t.trim())return c[1].trim();let u=e.replace(/\r\n?/g,"\n").split("\n");for(let e=0;e<u.length-1;e++){let t=null!=(n=u[e])?n:"",i=null!=(a=u[e+1])?a:"";if(!t.includes("|")||!i.includes("|")||!s.test(i))continue;let c=l(t),d=[];for(let t=e+2;t<u.length;t++){let e=null!=(o=u[t])?o:"";if(!e.includes("|")||!e.trim())break;d.push(l(e))}return(0,r.gD)(c,d)}return null}let u=/^\s*\|.*\|\s*$[\r\n]+^\s*\|?[\s:|-]+\|/m,d=/```[\w./+-]*\s*\n[\s\S]*?\n?```/,h=/```mermaid\s*\n[\s\S]*?```/,p=/^##\s+\S/m,m=/^#{1,3}\s+\S/m;function g(e,t){var n;let a=null==(n=(0,o.R)(e))?void 0:n.expects;if(!a)return!0;let r=t.trim();if(!r)return!1;switch(a){case"chart":return h.test(r)||u.test(r)||null!=c(r);case"table":return u.test(r)||null!=c(r);case"slides":return p.test(r);case"code":return d.test(r);case"document":return m.test(r)?r.length>200:r.length>400;default:return!0}}function f(e,t){return(0,a.Yvn)(e,{maxLength:60,fallback:t})}},12775:(e,t,n)=>{n.d(t,{D:()=>i});var a=n(47014),r=n(75438),o=n(74575);let i={transport:{baseUrl:a.cG,getToken:a.pI,onUnauthorized:(e,t)=>(0,a.oG)(e,t),mapError:r.TI},persistence:r.tj,resolveSystemPrompt:e=>(0,o.wn)(e).brainSystemPrompt}},25617:(e,t,n)=>{n.d(t,{DS:()=>k,MG:()=>x,MK:()=>u,OA:()=>f,OJ:()=>d,Qq:()=>b,SX:()=>_,U4:()=>y,Um:()=>C,YW:()=>m,Yu:()=>I,a0:()=>c,aw:()=>S,jw:()=>P,mc:()=>A,px:()=>R,qp:()=>j,w7:()=>w});var a=n(65644),r=n(62753),o=n(94306),i=n(43634);let s="bf_guest_room",l="bf_guest_room_name";function c(){try{return window.localStorage.getItem(s)}catch(e){return null}}function u(){try{var e;return null!=(e=window.localStorage.getItem(l))?e:""}catch(e){return""}}function d(e){try{window.localStorage.setItem(l,e.slice(0,40))}catch(e){}}function h(e){try{e?window.localStorage.setItem(s,e):window.localStorage.removeItem(s)}catch(e){}}function p(){h(null),(0,i.$2)()}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"chat";return"".concat(window.location.origin).concat("canvas"===t?"/create/new":"/brainstorm","?room=").concat(encodeURIComponent(e))}function g(e){return(0,i.rI)(e.token,e.expiresInSeconds),h(e.state.code),e.state}async function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"chat",r=(0,o.YA)();if(!r)return"network";try{let i=await (0,a.Kg)("/api/guest/rooms",{method:"POST",auth:"none",body:JSON.stringify({visitorId:r,name:e,title:t,surface:n,touch:(0,o.c6)()}),expectedErrors:[400,401,403,404,410,429,503]});if(!i.ok)return 503===i.status?"unavailable":"gone";return g(await i.json())}catch(e){return"network"}}async function w(e,t){let n=(0,o.YA)();if(!n)return"network";try{let r=await (0,a.Kg)("/api/guest/rooms/".concat(encodeURIComponent(e),"/join"),{method:"POST",auth:"none",body:JSON.stringify({visitorId:n,name:t,touch:(0,o.c6)()}),expectedErrors:[400,401,403,404,410,429,503]});if(!r.ok)return 503===r.status?"unavailable":"gone";return g(await r.json())}catch(e){return"network"}}async function b(){let e=(0,i.fn)();return e||(await y(),(0,i.fn)())}async function y(){let e=c();if(!e)return await (0,i.RG)(),null;let t=await w(e,u());return"string"==typeof t?(p(),await (0,i.RG)(),null):t}async function v(e,t){let n=(0,i.fn)();if(!n)return null;try{return await (0,a.Kg)(e,{auth:"none",method:null==t?void 0:t.method,body:null==t?void 0:t.body,headers:{Authorization:"Bearer ".concat(n)},expectedErrors:[400,401,403,404,410,429,503]})}catch(e){return null}}async function k(e){let t=await v("/api/guest/rooms/".concat(encodeURIComponent(e)));return(null==t?void 0:t.ok)?(await t.json()).state:null}async function I(e){let t=await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/messages"));return(null==t?void 0:t.ok)?(await t.json()).messages:null}async function S(e,t){let n=await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/messages"),{method:"POST",body:JSON.stringify({messages:t})});return(null==n?void 0:n.ok)?(await n.json()).created:null}async function _(e){let t=await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/canvas"));return(null==t?void 0:t.ok)?(await t.json()).snapshot:null}async function A(e,t){let n=await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/canvas"),{method:"POST",body:JSON.stringify({snapshot:t})});return!!(null==n?void 0:n.ok)&&!!(await n.json()).stored}async function C(e,t){await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/title"),{method:"POST",body:JSON.stringify({title:t})})}async function R(e){await v("/api/guest/rooms/".concat(encodeURIComponent(e),"/leave"),{method:"POST"}),p()}async function P(){let e=c(),t=(0,o.z1)();if(!e||!t)return null;try{var n;let r=await (0,a.Kg)("/api/brain/chats/claim-guest-room",{method:"POST",body:JSON.stringify({code:e,visitorId:t}),expectedErrors:[400,401,403,404,410,429,503]});if(p(),!r.ok)return null;let o=await r.json();return o.claimed&&"number"==typeof(null==(n=o.chat)?void 0:n.id)?o.chat.id:null}catch(e){return null}}function j(e,t,n){return(0,r.j)("/api/guest/rooms/".concat(encodeURIComponent(e),"/ws"),{channel:t,token:n})}let x={getToken:i.fn,signalingUrl:(e,t)=>
1j(e,"media",t),ice:async e=>{let t=c();if(!t)return{};let n=await v("/api/guest/rooms/".concat(encodeURIComponent(t),"/ice?mode=").concat(e));return(null==n?void 0:n.ok)?await n.json():{}}}},32092:(e,t,n)=>{n.d(t,{FN:()=>k,be:()=>a.beT,Rx:()=>a.Rxg,US:()=>a.USG,wz:()=>a.wzv,hA:()=>a.hAJ,si:()=>s.si,k4:()=>a.k4u,k:()=>v,Dr:()=>i.D,ZX:()=>a.ZXZ,z6:()=>y,rF:()=>I.r,ed:()=>a.edn,VR:()=>A.VR,Im:()=>A.Im,gJ:()=>c,s$:()=>d,RB:()=>I.R,vA:()=>s.vA,Lt:()=>s.Lt,EI:()=>a.EIm,zV:()=>a.zVc,Kh:()=>P,NZ:()=>A.NZ,Kz:()=>u,CJ:()=>h,pz:()=>a.pzT,bO:()=>a.bOA,dF:()=>a.dFE,dj:()=>a.djS,ZR:()=>a.ZRj,As:()=>a.Ast,dl:()=>o,TC:()=>a.TCc,b0:()=>j,_X:()=>a._X7,yR:()=>_});var a=n(41966),r=n(3625);function o(){let e=(0,a.TCc)();return(0,r.useCallback)((t,n)=>{if(e){e.setActiveChatId(null),e.setContext({viewingProjectId:t,initialPrompt:null==n?void 0:n.prompt}),e.setOpen(!0);return}{let e=new URLSearchParams({project:String(t)});(null==n?void 0:n.prompt)&&e.set("prompt",n.prompt),window.location.href="/brainstorm?".concat(e.toString())}},[e])}var i=n(12775),s=n(90033),l=n(75438);async function c(e){let{assistantContent:t,conversationMessages:n}=e,a=n&&n.length>0?n.map(e=>"".concat("user"===e.role?"User":"Assistant",": ").concat(e.content)).join("\n\n"):t,{content:r}=await (0,l.gw)([{role:"user",content:'Generate a Product Requirements Document (PRD) based on the following conversation. Output only the PRD in markdown: clear sections (Overview, Goals, Requirements, etc.). No preamble or "here is the PRD".\n\n---\n\n'.concat(a.slice(0,12e3))}]);return r.trim()}async function u(e,t){await l.$l.create({projectId:e,goal:"From chat",prd:t,status:"draft"})}async function d(e){let{content:t}=await (0,l.gw)([{role:"user",content:'Based on this response, extract or generate a list of actionable tasks. Output one task per line. Each line: "title" or "title | description". No numbering, no bullets, no preamble. Plain lines only.\n\n---\n\n'.concat(e.slice(0,8e3))}]),n=t.split(/\n/).map(e=>e.trim()).filter(e=>e.length>0),a=[],r=[];for(let e of n){let t=e.indexOf("|");t>=0?(a.push(e.slice(0,t).trim()),r.push(e.slice(t+1).trim())):(a.push(e),r.push(""))}return{titles:a,descriptions:r}}async function h(e,t){for(let n=0;n<t.titles.length;n++)await l.bI.create({projectId:e,title:t.titles[n],description:t.descriptions[n]||null})}let p={type:"string"},m={type:"number"},g=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:"object",properties:e,required:t}},f={dashboard:"/dashboard",projects:"/projects",ide:"/create?filter=build",ide_dashboard:"/create?filter=build",brainstorm:"/create/new",tasks:"/projects?tab=tasks",workflows:"/workflows",workflow_builder:"/create?filter=workflow",workforce:"/workforce",agents:"/agents",agent_skills:"/agents/skills",agent_integrations:"/agents/integrations",agent_workflow_builder:"/agents/workflow-builder",marketplace:"/marketplace",skills:"/skills",personas:"/personas",prompts:"/prompts",models:"/marketplace?category=models",approvals:"/workforce?tab=approvals",security:"/security",observability:"/settings?sub=logs",timeline:"/settings?sub=logs",logs:"/settings?sub=logs",chats:"/workforce?tab=chats",contributors:"/workforce?tab=performance",content_manager:"/content-manager",agent_worker:"/agent-worker",training:"/training",tenants:"/tenants",settings:"/settings",settings_members:"/workforce",settings_api_keys:"/settings/integrations",compare:"/compare",pricing:"/pricing",product:"/product",admin:"/admin"},w={project:e=>"/projects/".concat(e),project_tasks:e=>"/projects?tab=tasks&project=".concat(e),ide_project:e=>"/create/build/".concat(e),content_item:e=>"/content-manager/".concat(e),persona:e=>"/personas/".concat(e),skill:e=>"/skills/".concat(e)},b=[...Object.keys(f),...Object.keys(w)];function y(e){let t={name:"navigate_to",description:'Navigate the browser to a page in the app. For pages about one project (page="project" or "ide_project") pass the numeric project id as `id`. To show a project\'s tasks (e.g. after creating one) use page="project_tasks" with the project id.',parameters:g({page:{type:"string",enum:b,description:"Page key to open."},id:{type:["string","number"],description:"Id for dynamic pages (e.g. project id)."},query:{...p,description:'Optional querystring without the leading "?".'}},["page"]),mutates:!1,run:t=>{let n=function(e,t,n){let a;if(f[e])a=f[e];else if(w[e]){if(null==t||""===t)return{error:'Page "'.concat(e,'" needs an id (e.g. the numeric project id).')};a=w[e](t)}return a?n?"".concat(a,"?").concat(String(n).replace(/^\?/,"")):a:{error:'Unknown page "'.concat(e,'". Use a known page key (').concat(b.slice(0,6).join(", "),", â¦).")}}(t.page,t.id,t.query);return"string"!=typeof n?n:(e.navigate(n),{navigated:n})}};return[t,{name:"open_project",description:'Open a project Builder on the Creation Canvas (use this to "launch" a project after creating it).',parameters:g({id:{...m,description:"Project id"},chatId:{...m,description:"Optional Brain chat id to carry into the Builder workspace."}},["id"]),mutates:!1,run:t=>{let n=t.id;if(null==n)return{error:"A project id is required."};let a=t.chatId,r="/create/build/".concat(n).concat(null!=a?"?chat=".concat(a):"");return e.navigate(r),{opened:"/create/build/".concat(n)}}},{name:"open_migration_panel",description:"Open the migration / reconciliation panel on the left so the user can map projects (combine), item types and users, review staged items, and import. Use after connecting + testing a provider credential. Pass runId to resume a run, or provider to start a new one.",parameters:g({runId:{...p,description:"Existing migration run id to resume/review."},provider:{...p,description:'Provider id to start a new migration for (e.g. "bitbucket", "jira", "github").'}}),mutates:!1,run:e=>{let t=e.runId,n=e.provider;return window.dispatchEvent(new CustomEvent("builderforce:open-migration-panel",{detail:{runId:null!=t?t:null,provider:null!=n?n:null}})),{opened:"migration-panel",runId:null!=t?t:null,provider:null!=n?n:null}}}]}let v='You are Brain â the AI co-pilot and command center for Builderforce, the agent-building platform. You are the epicenter for every action in the product: from this conversation the user can reach and operate every page and capability.\n\nYou have the full platform catalog as direct tools, named `builtin_<domain>_<method>` â for example builtin_projects_create, builtin_tasks_list, builtin_workflows_run. Read your own tool list to see exactly which exist, and assume a capability exists before declining. Browser navigation is separate and client-side: navigate_to, open_project, open_migration_panel.\n\nOperating rules:\n1. Resolve before you act. The user refers to things by name ("the onboarding workflow", "the Acme project"); the tools need ids. Use the builtin_*_list / builtin_*_get tools to look up the id first, and disambiguate with the user if more than one matches. Humans and agents are one team: a task assignee can be a person, a cloud agent, or a self-hosted host. When the user names an assignee (e.g. "assign this to Bob"), resolve it with builtin_tasks_assignees, which lists the WHOLE team â do not assume an unfamiliar name is a missing human until you have checked it against the agents in that roster too.\n2. Gather and summarize before you mutate. Before calling ANY tool that creates, updates, deletes, runs, hires, decides, or otherwise changes state, collect the needed details and tell the user in one line what you are about to do. The platform shows the user an Approve/Cancel control for every such action, so you do not need to separately ask "shall I proceed?" â just call the tool; if the user cancels you will get a `{ cancelled: true }` result, so adjust rather than retrying. Read-only lookups run without a gate.\n3. Navigate freely. Use `navigate_to` to open any page when it helps the user see the result of an action â e.g. after creating a task, navigate to its board with page="project_tasks" and the project id. NEVER write out an absolute URL (e.g. https://app.builderforce.ai/...) in your reply: you do not know the deployment host, so fabricated links break. Use `navigate_to` to take the user there, and refer to pages by name in prose.\n4. Launch projects. When the user wants a new project, ask for the name, a one-line description, and the modality (designer = app builder, evermind = a living self-teaching model, or finetune = a classic LoRA model), confirm, call builtin_projects_create, then offer to launch it with open_project (opens it on Canvas). AI video/3D generation is not a project modality â it is a `scene` canvas object: create one and it opens straight into the 3D surface with a prompt and a model picker.\n5. Read external links. You CAN read external URLs, files, and websites â when the user pastes a link (a GitHub file such as a ROADMAP.md, a docs page, an article) and asks you to read, summarize, or work from it, call `builtin_web_fetch` with that URL. To research a subject you do not already hold sources for, start with `builtin_web_search` and then read the promising results with `builtin_web_fetch`. Never tell the user you cannot access external URLs or ask them to paste the contents; fetch it yourself, then use it.\n6. Editing attached files, and never faking a save. When the user attaches a file (a Brain upload â e.g. a ROADMAP.md) and asks you to change it or write something back into it (traceability IDs, edits, annotations), you CAN: call `builtin_attachments_read` (paginate a large file with offset/limit) to get the current text, apply your edits to the FULL document, then call `builtin_attachments_write` with the complete new content to save it in place. That over
1write is the ONLY way to persist a change to an attachment â there is no other "save the file" path for an upload. NEVER tell the user you saved, updated, wrote, edited, or added anything to a file unless a write/save tool (builtin_attachments_write, builtin_project_files_save, â¦) has actually RETURNED SUCCESS on this turn. If no such tool exists for the target or the write failed, say so plainly and offer the content instead â do not claim a write you did not perform.\n7. Offer next-step buttons. Whenever your reply sets up concrete next actions the user could take (e.g. "create these OKRs", "turn this into Epics", "generate a PRD", "open the board"), END the message with a fenced ```suggested-actions code block holding a JSON array of UP TO 4 objects `{ "label": "<short button text>", "prompt": "<the message to send back to you to carry it out>" }`. The user sees these as one-click buttons; clicking sends that prompt to you, so phrase each prompt as a direct instruction you can act on. Only include actions you can actually perform with your tools, and make the labels reflect THIS reply (not a generic PRD/Tasks). Omit the block entirely when there is no clear next step or you are only asking the user a question.\n8. Onboard new users, and always aim at THEIR goal. Your first job with a new or unsure user is to help them accomplish what they came to do. When someone is getting started, asks how this works, what it costs, or which plan they need, act as their onboarding guide:\n a. Scope of use â ask a couple of short questions: what do they want to build or automate, their timeframe, team size, and how much they expect to run. Do not interrogate; two or three questions, then help.\n b. Costing & usage â explain plainly that agent runs and tokens are metered, and that connecting their OWN AI account (BYO) makes model usage free to them. Keep it honest and non-pushy.\n c. Plan recommendation â based on their answers, recommend Free (light/occasional use, self-learning models, no rush) or Pro (frontier models, higher limits, or a tight timeframe). If Free is enough, say so; do not upsell what they will not use. You can open pricing with navigate_to page="pricing".\n d. Existing AI account â ask whether they already have one (Anthropic / Claude Pro or Max, OpenAI, or Google). If they do, guide them to link it under Settings ⸠Model Providers so their own subscription powers the work at no extra cost (take them there with navigate_to page="settings"). If not, reassure them the platform works without one.\n End the onboarding turn with suggested-actions buttons for the concrete next steps (e.g. link my AI account, create my first project, see pricing).\n\nBe concise. Use markdown when it helps. Report what you did, and to show the user the result navigate them there with `navigate_to` rather than pasting a URL.',k='AUTO-APPROVE IS ON. The user has pre-approved your actions for this conversation.\nDo NOT ask for permission or confirmation before mutating actions â no "should Iâ¦?", "shall I proceed?", "do you want me toâ¦", "let me know ifâ¦". When you have enough detail, CALL THE TOOL and do it, then report what you did and (when useful) navigate the user to the result. Only pause to ask the user if a genuinely required detail is missing and cannot be reasonably inferred from context.';var I=n(57867);let S=[{id:"audit_spreadsheet",icon:"\uD83E\uDDEE"},{id:"review_draft",icon:"\uD83D\uDCDD"},{id:"chase_blockers",icon:"\uD83D\uDEA7"},{id:"triage_backlog",icon:"\uD83D\uDDC2"},{id:"research_and_brief",icon:"\uD83D\uDD0E"},{id:"ship_fix",icon:"\uD83D\uDD27"}];function _(){return S}var A=n(12542);let C=/```(?:suggested-actions|actions)[ \t]*\r?\n?([\s\S]*?)```/i,R=/```(?:suggested-actions|actions)\b/i;function P(e){var t;if(!e)return{content:null!=e?e:"",actions:[]};let n=e.match(C);if(!n){let t=e.match(R);return t&&null!=t.index?{content:e.slice(0,t.index).trimEnd(),actions:[]}:{content:e,actions:[]}}let a=[];try{let e=JSON.parse(n[1].trim());Array.isArray(e)&&(a=e.map(e=>{var t,n;return{label:String(null!=(t=null==e?void 0:e.label)?t:"").trim(),prompt:String(null!=(n=null==e?void 0:e.prompt)?n:"").trim()}}).filter(e=>e.label&&e.prompt).slice(0,4))}catch(e){}
1let r=null!=(t=n.index)?t:0;return{content:(e.slice(0,r)+e.slice(r+n[0].length)).trim(),actions:a}}function j(e){let{running:t,send:n,resetKey:a}=e,[o,i]=(0,r.useState)([]),s=(0,r.useRef)(n);s.current=n;let l=(0,r.useRef)(t),c=(0,r.useCallback)(e=>{let t=e.trim();return!!t&&!!l.current&&(i(e=>[...e,t]),!0)},[]);l.current=t;let u=(0,r.useCallback)(()=>i(e=>e.length?[]:e),[]),d=(0,r.useRef)(t);return(0,r.useEffect)(()=>{let e=d.current;if(d.current=t,!e||t||0===o.length)return;let[n,...a]=o;i(a),n&&s.current(n)},[t,o]),(0,r.useEffect)(()=>{i([])},[a]),{count:o.length,submit:c,clear:u}}},43634:(e,t,n)=>{n.d(t,{$2:()=>c,RG:()=>d,fn:()=>l,or:()=>h,rI:()=>u});var a=n(65644),r=n(14057),o=n(94306);let i="bf_guest_token",s="bf_guest_token_exp";function l(){try{var e;let t=window.localStorage.getItem(i),n=Number(null!=(e=window.localStorage.getItem(s))?e:"0");if(!t||n&&Date.now()>n-6e4)return null;return t}catch(e){return null}}function c(){try{window.localStorage.removeItem(i),window.localStorage.removeItem(s)}catch(e){}}function u(e,t){try{window.localStorage.setItem(i,e),window.localStorage.setItem(s,String(Date.now()+1e3*t))}catch(e){}}async function d(){let e=(0,o.YA)();if(!e)return null;let t=(0,o.c6)();try{let n=await (0,a.Kg)("/api/guest/session",{method:"POST",auth:"none",body:JSON.stringify({visitorId:e,touch:t}),expectedErrors:[400,401,403,404,429]});if(!n.ok)return null;let r=await n.json();return u(r.token,r.expiresInSeconds),{remaining:r.remaining,limit:r.limit,enabled:!0,roomsEnabled:!!r.roomsEnabled}}catch(e){return null}}async function h(){let e=(0,o.YA)();if(!e)return null;try{let t=await (0,a.Kg)("/api/guest/usage/".concat(encodeURIComponent(e)),{auth:"none",expectedErrors:r.P$});if(!t.ok)return null;let n=await t.json();return{remaining:n.remaining,limit:n.limit,enabled:n.enabled,roomsEnabled:!!n.roomsEnabled}}catch(e){return null}}},57867:(e,t,n)=>{n.d(t,{R:()=>o,r:()=>r});let a=[{id:"document",surface:"brainstorm",icon:"\uD83D\uDCC4",exportFormat:"docx",expects:"document",systemPrompt:'CAPABILITY: DOCUMENT. The user is authoring a written document in this chat.\nProduce the document itself â not a description of one. Use markdown structure: a title heading, ordered sections with headings, short paragraphs, lists and tables where they carry meaning.\nWrite the full document in one reply rather than an outline followed by "shall I expand?". Revise the whole document on follow-ups so the latest reply is always the current draft.'},{id:"slides",surface:"brainstorm",icon:"\uD83D\uDDBC",exportFormat:"pptx",expects:"slides",systemPrompt:'CAPABILITY: SLIDES. The user is building a presentation in this chat.\nReply as a deck: one markdown `##` heading per slide, in order, each followed by at most 5 short bullets plus an optional one-line speaker note prefixed "Note:".\nKeep slides scannable â no paragraphs. Open with a title slide and close with a summary or call-to-action slide. Where a slide is inherently visual, express it as a mermaid diagram in a ```mermaid block.'},{id:"dataviz",surface:"brainstorm",icon:"\uD83D\uDCCA",exportFormat:"csv",expects:"chart",systemPrompt:"CAPABILITY: DATA VISUALIZATION. The user wants data made visible in this chat.\nRender charts as ```mermaid blocks (xychart-beta, pie, quadrantChart, gantt) so they draw inline, and put the underlying figures in a markdown table beneath each chart.\nPick the chart form from the question â trend over time, share of a whole, comparison across categories, distribution. State the insight in one sentence above the chart; never ship a chart without saying what it shows. When the data is unavailable, use the platform tools to fetch it rather than inventing figures."},{id:"spreadsheet",surface:"brainstorm",icon:"\uD83E\uDDEE",exportFormat:"csv",expects:"table",systemPrompt:"CAPABILITY: SPREADSHEET. The user is building a tabular model in this chat.\nReply with a markdown table as the primary output: a header row, one row per record, consistent units, and a totals/summary row where it applies.\nWhen the model has calculated columns, state each formula once beneath the table in spreadsheet notation (e.g. `Margin = (Revenue - Cost) / Revenue`). Also emit the same table as a ```csv block so it can be pasted straight into a sheet."},{id:"website",surface:"build",icon:"\uD83C\uDF10",expects:"code",systemPrompt:"CAPABILITY: WEBSITE. The user is building a web app or site in this workspace.\nProduce real files, not snippets: use a code block whose language tag is the file path (```src/App.tsx, ```package.json) so each one can be created in a click.\nCover routing, responsive layout, and both light and dark themes. Prefer the stack already present in the workspace over introducing a new one."},{id:"design",surface:"build",icon:"\uD83C\uDFA8",expects:"code",systemPrompt:"CAPABILITY: DESIGN. The user is designing the interface before/while building it.\nWork at the design-system level: layout structure, spacing scale, type scale, and a token palette expressed as CSS custom properties with light and dark values.\
1nDeliver the design as real CSS/markup files (path-tagged code blocks) plus a short rationale. Check contrast in both themes and keep tap targets at least 44px."},{id:"mobile",surface:"build",icon:"\uD83D\uDCF1",expects:"code",systemPrompt:"CAPABILITY: MOBILE. The user is building a mobile app in this workspace.\nDesign for a phone first: single-column layouts, thumb-reachable actions, native-feeling navigation, offline and slow-network states.\nProduce real files with path-tagged code blocks, and call out any platform permission or store requirement the feature implies."},{id:"animation",surface:"build",icon:"â¨",expects:"code",systemPrompt:"CAPABILITY: ANIMATION. The user is building motion into this workspace.\nSpecify motion concretely â trigger, duration, easing curve, and the property being animated â and implement it in real files (CSS keyframes, the Web Animations API, or the workspace's existing motion library).\nKeep motion purposeful and under 400ms for UI feedback, and always honour `prefers-reduced-motion`."},{id:"game3d",surface:"build",icon:"\uD83C\uDFAE",expects:"code",systemPrompt:"CAPABILITY: 3D GAME. The user is building a 3D game in this workspace.\nThink in scene, camera, lighting, meshes, materials, input, and a game loop. Implement with WebGL/WebGPU via the library already in the workspace (Three.js unless told otherwise), in real path-tagged files.\nKeep the render loop allocation-free, dispose GPU resources on teardown, and state the target frame budget for any effect you add."}].map(e=>({...e,systemPrompt:"".concat(e.systemPrompt,"\n").concat('NEVER reply with only a title, a preamble, or a "here is the â¦" line. Either produce the artifact IN FULL in this same reply, or â if you genuinely cannot tell what it should cover â ask exactly ONE short clarifying question and nothing else.\nNever describe data as fetched, loaded, or looked up unless you actually called a tool for it in this turn.\nNEVER announce a tool call you have not made â no "calling the tool now", "let me fetch that", or "one moment". Issue the tool call in THIS turn instead; the loop will hand you the result and let you continue. If the tool you need is not available to you, say exactly which data you are missing and answer with what you do have.')}));function r(e){return a.filter(t=>t.surface===e)}function o(e){var t;return e&&null!=(t=a.find(t=>t.id===e))?t:null}},74575:(e,t,n)=>{n.d(t,{gA:()=>i,oB:()=>o,us:()=>s,wn:()=>l});var a=n(41966);let r={llm:"evermind"},o={voice:"\uD83C\uDF99",files:"\uD83D\uDCC1",agent:"\uD83E\uDD16",train:"\uD83E\uDDE0",publish:"\uD83D\uDE80",state:"\uD83D\uDD2C"},i=[{id:"designer",label:"Website",tagline:"Generate and build a website or web app with Preview, Code, and a live dev server.",rightTabs:["files","agent","train","publish","state"],showRunButton:!0,runLabel:"Run",showChecks:!0,center:"code-preview",dockBrain:!0,publishPanel:"site"},{id:"mobile",label:"Mobile",tagline:"Build a phone app and preview it in a device simulator, then scan to open it on your own handset.",rightTabs:["files","agent","publish","state"],showRunButton:!0,runLabel:"Run",showChecks:!0,center:"device",dockBrain:!0,publishPanel:"site"},{id:"webmobile",label:"Web + Mobile",tagline:"Build a web application and a mobile app together from one codebase â preview both side by side.",rightTabs:["files","agent","publish","state"],showRunButton:!0,runLabel:"Run",showChecks:!0,center:"code-preview",dockBrain:!0,publishPanel:"site",enableMobilePreview:!0},{id:"evermind",label:"Evermind",tagline:"Grow a living Evermind model that learns from every project â teach it and watch its Knowledge Map fill in.",rightTabs:["files","publish","state"],showRunButton:!1,runLabel:"Run",showChecks:!1,center:"evermind",dockBrain:!1,publishPanel:"agent"},{id:"finetune",label:"Fine-tune",tagline:"Design datasets and train a custom LoRA model, then benchmark, publish, and export it.",rightTabs:["files","train","publish","state"],showRunButton:!1,runLabel:"Run",showChecks:!1,center:"finetune",dockBrain:!1,publishPanel:"agent"},{id:"voice",label:"Voice",tagline:"Clone and design a custom voice, then synthesize speech from it.",rightTabs:["voice","files","state"],showRunButton:!0,runLabel:"Generate",showChecks:!1,center:"voice",dockBrain:!0,publishPanel:"agent"}].map(e=>({...e,icon:a.W9u[e.id].icon,brainSystemPrompt:a.W9u[e.id].prompt})),s="designer";function l(e){var t;let n="string"==typeof e&&r[e]||e;return null!=(t=i.find(e=>e.id===n))?t:i[0]}}
1,90033:(e,t,n)=>{n.d(t,{Lt:()=>y,si:()=>w,vA:()=>_});var a=n(47014),r=n(75438),o=n(8435),i=n(74575),s=n(43634),l=n(25617);let c="bf_guest_chats",u=e=>"bf_guest_msgs:".concat(e),d="bf_guest_seq";function h(e,t){try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return t}}function p(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(e){}}function m(){let e=Number(h(d,1)),t=Number.isFinite(e)?e+1:Date.now();return p(d,t),t}function g(){return new Date().toISOString()}let f={listChats:async()=>h(c,[]),async getChat(e){let t=h(c,[]).find(t=>t.id===e);if(!t)throw Error("Chat not found");return t},async createChat(e){var t,n;let a=h(c,[]),r={id:m(),title:null!=(t=e.title)?t:"New chat",projectId:null!=(n=e.projectId)?n:null,origin:"guest",createdAt:g(),updatedAt:g()};return p(c,[r,...a]),r},async updateChat(e,t){let n=h(c,[]).map(n=>n.id===e?{...n,..."title"in t?{title:t.title}:{},updatedAt:g()}:n);return p(c,n),n.find(t=>t.id===e)},async deleteChat(e){let t=h(c,[]).filter(t=>t.id!==e);p(c,t);try{window.localStorage.removeItem(u(e))}catch(e){}return{}},async summarizeChat(e){var t;let n=h(u(e),[]).find(e=>"user"===e.role);return{summary:(null!=(t=null==n?void 0:n.content)?t:"Chat").slice(0,60)}},getMessages:async e=>h(u(e),[]),async sendMessages(e,t){let n=h(u(e),[]),a=n.length,r=t.map(e=>{var t;return{id:m(),role:e.role,content:e.content,metadata:null!=(t=e.metadata)?t:null,seq:a++,createdAt:g()}});return p(u(e),[...n,...r]),r},setMessageFeedback:async()=>({}),async upload(){throw Error("Sign up to attach files.")},uploadUrl:()=>""},w=1,b="guestAuthor";function y(e){if(!e)return null;try{let t=JSON.parse(e)[b];return"string"==typeof t&&t?t:null}catch(e){return null}}function v(e){return{id:e.id,role:e.role,content:e.content,metadata:e.metadata,seq:e.seq,createdAt:e.createdAt}}function k(e,t){return{id:w,title:e,projectId:null,origin:"guest",createdAt:t,updatedAt:new Date().toISOString()}}let I={async listChats(){let e=(0,l.a0)();if(!e)return[];let t=await (0,l.DS)(e);return t?[k(t.title,t.createdAt)]:[]},async getChat(){let e=(0,l.a0)(),t=e?await (0,l.DS)(e):null;if(!t)throw Error("This shared session has ended.");return k(t.title,t.createdAt)},async createChat(){var e,t;let n=(0,l.a0)(),a=n?await (0,l.DS)(n):null;return k(null!=(e=null==a?void 0:a.title)?e:"Guest session",null!=(t=null==a?void 0:a.createdAt)?t:new Date().toISOString())},async updateChat(e,t){var n,a,r;let o=(0,l.a0)();o&&t.title&&await (0,l.Um)(o,t.title);let i=o?await (0,l.DS)(o):null;return k(null!=(a=null!=(n=null==i?void 0:i.title)?n:t.title)?a:"Guest session",null!=(r=null==i?void 0:i.createdAt)?r:new Date().toISOString())},deleteChat:async()=>({}),async summarizeChat(){var e;let t=(0,l.a0)(),n=t?await (0,l.Yu)(t):null,a=null==n?void 0:n.find(e=>"user"===e.role);return{summary:(null!=(e=null==a?void 0:a.content)?e:"Shared session").slice(0,60)}},async getMessages(){let e=(0,l.a0)();if(!e)return[];let t=await (0,l.Yu)(e);return(null!=t?t:[]).map(v)},async sendMessages(e,t){let n=(0,l.a0)();if(!n)throw Error("This shared session has ended.");let a=(0,l.MK)(),r=await (0,l.aw)(n,t.map(e=>{var t;return{role:e.role,content:e.content,metadata:"user"===e.role?function(e,t){if(!t)return null!=e?e:null;let n={};if(e)try{n=JSON.parse(e)}catch(e){n={}}return JSON.stringify({...n,[b]:t})}(e.metadata,a):null!=(t=e.metadata)?t:null}}));if(!r)throw Error("This shared session has ended.");return r.map(v)},setMessageFeedback:async()=>({}),async upload(){throw Error("Sign up to attach files.")},uploadUrl:()=>""};function S(){return(0,l.a0)()?I:f}let _={transport:{baseUrl:a.cG,getToken:s.fn,onUnauthorized:()=>{(0,s.$2)()},mapError:async e=>{let t=await (0,r.TI)(e),n=(0,o.wu)(t);return n&&(0,o.Gd)(n),t}},persistence:{listChats:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().listChats(...t)},getChat:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().getChat(...t)},createChat:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().createChat(...t)},updateChat:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().updateChat(...t)},deleteChat:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().deleteChat(...t)},summarizeChat:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().summarizeChat(...t)},getMessages:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().getMessages(...t)},sendMessages:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().sendMessages(...t)},setMessageFeedback:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().setMessageFeedback(...t)},upload:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().upload(...t)},uploadUrl:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return S().uploadUrl(...t)}},resolveSystemPrompt:e=>(0,i.wn)(e).brainSystemPrompt}},94306:(e,t,n)=>{n.d(t,{YA:()=>o,c6:()=>s,z1:()=>i});let a="bf_visitor_id",r="bf_visitor_touch";function o(){let e=null;try{e=window.localStorage.getItem(a)}catch(e){}if(e||(e=l(a)),!e){e=function(){let e=new Uint8Array(18);return crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}();try{window.localStorage.setItem(a,e)}catch(e){}}return function(e,t){let n="https:"===window.location.protocol?"; Secure":"";document.cookie="".concat(e,"=").concat(encodeURIComponent(t),"; Max-Age=").concat(31536e3,"; Path=/; SameSite=Lax").concat(n)}(a,e),e}function i(){try{var e;return null!=(e=window.localStorage.getItem(a))?e:l(a)}catch(e){return l(a)}}function s(){try{let e=window.localStorage.getItem(r);if(e)return JSON.parse(e)}catch(e){}let e=new URLSearchParams(window.location.search),t={};for(let[n,a]of e)n.startsWith("utm_")&&a&&(t[n]=a.slice(0,128));let n={landingPath:window.location.pathname.slice(0,512),referrer:(document.referrer||"").slice(0,512),utm:t};try{window.localStorage.setItem(r,JSON.stringify(n))}catch(e){}return n}function l(e){let t=document.cookie.match(new RegExp("(?:^|; )".concat(e,"=([^;]*)")));return t?decodeURIComponent(t[1]):null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.