1import{u as P,a as O,r as u,j as e}from"./index-L9AYrVUw.js";import{S as W}from"./SectionLabel-CESXB5lC.js";import{a6 as V,n as B}from"./PlanAccessModal-P_W2GThH.js";import{C as w}from"./coworkers.config-CbJ9bqM1.js";import{c as G}from"./coworkers-CXtW-JQU.js";import{C as J}from"./CoworkerAvatar-LLNKhRHM.js";import{g as $}from"./agentAvatars-SvcJfCoY.js";import{g as D}from"./agentSummaries-CQG-ipAU.js";import{g as K}from"./agentHoverText-U3X5yOGm.js";import"./productFunnel-DiJFcMU2.js";import"./locale-Cctu0V3Y.js";import"./App-DyVHSnY3.js";import"./FloatingTopMenu-CIhwk2RR.js";import"./SnewLogo-Cg53XTnQ.js";import"./index-p7aFGi8o.js";import"./Trash.es-D2Zs5Rpt.js";import"./dissolve-CQo8GAUH.js";const A={"customer-service":["vender-mais","reter-clientes"],marketing:["vender-mais","reter-clientes","reduzir-custos"],competitors:["vender-mais","entender-dados"],analytics:["entender-dados"],audit:["vender-mais","proteger-loja"],productivity:["reduzir-custos","escalar-operacao"],campaigns:["vender-mais"],ads:["vender-mais","reduzir-custos"],social:["vender-mais","ganhar-visibilidade"],"email-crm":["reter-clientes","vender-mais"],whatsapp:["vender-mais","reter-clientes"],operations:["escalar-operacao","reduzir-custos"],product:["vender-mais","ganhar-visibilidade"],suppliers:["escalar-operacao","proteger-loja"],financial:["proteger-loja","reduzir-custos"],international:["escalar-operacao","ganhar-visibilidade"],"ai-friendly":["ganhar-visibilidade","vender-mais"]},H={"vender-mais":"Vender mais","reter-clientes":"Reter clientes","reduzir-custos":"Reduzir custos","entender-dados":"Entender dados","escalar-operacao":"Escalar operação","proteger-loja":"Proteger a loja","ganhar-visibilidade":"Ganhar visibilidade"},q={segment:"b2c",niche:"moda",platform:"Shopify",revenueMonthly:85e3,ordersMonth:420,hasWhatsapp:!0,hasAds:!0,teamSize:"pequeno",revenueRange:"R$50kâ200k/mês"};function U(r){const t=[];return t.push("customer-service"),(r.hasWhatsapp||r.ordersMonth>200)&&t.push("whatsapp"),r.hasAds&&t.push("ads"),r.ordersMonth>300&&t.push("campaigns"),r.revenueMonthly>5e4&&t.push("analytics"),["moda","beleza","cosmeticos","decoracao","lifestyle"].includes(r.niche)&&t.push("social"),r.platform.toLowerCase()==="shopify"&&r.revenueMonthly>2e5&&t.push("international"),r.revenueMonthly>3e4&&t.push("ai-friendly"),t.push("audit"),r.revenueMonthly>1e5&&t.push("financial"),t.slice(0,5)}const Y={"customer-service":"Customer Service",marketing:"Marketing",competitors:"Competitors",analytics:"Analytics",audit:"Audit",productivity:"Productivity",campaigns:"Marketing & Campanhas",ads:"Ads & Performance",social:"Redes Sociais","email-crm":"Email/CRM",whatsapp:"WhatsappLogo",operations:"Operações",product:"Produto",suppliers:"Fornecedores",financial:"Financeiro",international:"Internacional","ai-friendly":"AI-Friendly Storefront"};function E(r){const t=G.find(a=>a.id===r);return(t==null?void 0:t.name)??r}const Q=new Set(["customer-service","analytics"]),X=[{key:"vender-mais",label:"Vender mais"},{key:"reter-clientes",label:"Reter clientes"},{key:"reduzir-custos",label:"Reduzir custos"},{key:"entender-dados",label:"Entender dados"},{key:"escalar-operacao",label:"Escalar operação"},{key:"proteger-loja",label:"Proteger a loja"},{key:"ganhar-visibilidade",label:"Ganhar visibilidade"}],z={};X.forEach(({key:r})=>{z[r]=Object.values(A).filter(t=>t.includes(r)).length});function R({isActive:r,label:t,count:a,onClick:i}){return e.jsxs("button",{onClick:i,className:`w-full flex items-center justify-between text-left transition-colors rounded-xl px-4 py-3 ${r?"bg-muted":"hover:bg-muted/60"}`,children:[e.jsx("span",{style:{fontSize:13,fontWeight:r?500:400,color:r?"hsl(var(--color-text-primary))":"hsl(var(--color-text-secondary))",lineHeight:1},children:t}),e.jsx("span",{style:{fontSize:11,color:"hsl(var(--color-text-tertiary))",lineHeight:1},children:a})]})}function Z({coWorker:r,isActive:t,skillMatch:a,onClick:i}){const{t:m,lang:n}=O(),p=Y[r.id]??"Customer Service",o=$(p),x=D(r.id,r.tagline),l=K(r.id,n);return e.jsxs("div",{onClick:i,className:`group flex flex-col rounded-2xl bg-background cursor-pointer transition-colors min-h-[220px] ${t?"border-[1.5px] border-border hover:border-foreground
1/40":"border border-border hover:border-foreground/30"}`,children:[e.jsxs("div",{className:"p-7 pb-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(J,{coworkerId:r.id,fallbackSrc:o,fallbackAlt:r.name,size:"xs"}),e.jsx("p",{className:"text-sm font-medium text-foreground leading-tight flex-1",children:r.name})]}),e.jsx("p",{style:{fontSize:13,fontWeight:400,color:"hsl(var(--color-text-secondary))"},className:"leading-relaxed",children:x}),a&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-foreground/25 shrink-0"}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["1 ",m.cwSkillFound," ",e.jsx("strong",{className:"text-foreground/60",children:a})]})]})]}),e.jsx("div",{className:"px-7 pb-7 pt-4 mt-auto",children:e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:[e.jsx(W,{marginBottom:4,children:m.cwResultExpected}),e.jsx("p",{style:{fontSize:13,fontWeight:400,color:"hsl(var(--color-text-secondary))"},className:"leading-[1.5]",children:l||"â"})]})})]})}const fe=()=>{const r=P(),{t,lang:a}=O(),[i,m]=u.useState(""),[n,p]=u.useState("todos"),[o,x]=u.useState(null),[l]=u.useState(Q),f=q,v=u.useMemo(()=>new Set(f?U(f):[]),[f]),{filtered:h,skillMatches:M}=u.useMemo(()=>{const s=i.toLowerCase().trim(),d={};return{filtered:w.filter(c=>{var C;const S=l.has(c.id),L=v.has(c.id)&&!S;if(n==="ativos"&&!S||n==="recomendados"&&!L||o&&!((C=A[c.id])!=null&&C.includes(o)))return!1;if(!s||c.name.toLowerCase().includes(s)||c.description.toLowerCase().includes(s)||c.tagline.toLowerCase().includes(s))return!0;const N=c.skillIds.find(_=>E(_).toLowerCase().includes(s));return N?(d[c.id]=E(N),!0):!1}),skillMatches:d}},[i,n,o,l,v]),g=l.size,b=v.size,I=u.useMemo(()=>{if(o){const s=H[o],d=h.filter(k=>l.has(k.id)).length;return e.jsxs(e.Fragment,{children:[h.length," ",t.cwSubtitleObj1," ",e.jsxs("span",{className:"font-medium text-foreground",children:['"',s,'"']}),"."," ",d>0?e.jsxs("span",{className:"font-medium text-foreground",children:[d," ",t.cwSubtitleDefaultActive]}):t.cwSubtitleObj2,"."]})}return n==="ativos"?e.jsxs(e.Fragment,{children:[g," ",t.cwSubtitleActive]}):n==="recomendados"?e.jsxs(e.Fragment,{children:[b," ",t.cwSubtitleRecommended]}):e.jsxs(e.Fragment,{children:[t.cwSubtitleDefault," ",e.jsxs("span",{className:"font-medium text-foreground",children:[g," ",t.cwSubtitleDefaultActive]}),"."]})},[o,n,h,g,b,l,t]),y=s=>{p(s),x(null)},F=s=>{x(d=>d===s?null:s),p("todos")},j=[{key:"todos",label:t.cwStatusAll,count:w.length},{key:"ativos",label:t.cwStatusActive,count:g},{key:"recomendados",label:t.cwStatusRecommended,count:b}],T=[{key:"vender-mais",label:a==="en"?"Sell more":"Vender mais"},{key:"reter-clientes",label:a==="en"?"Retain customers":"Reter clientes"},{key:"reduzir-custos",label:a==="en"?"Reduce costs":"Reduzir custos"},{key:"entender-dados",label:a==="en"?"Understand data":"Entender dados"},{key:"escalar-operacao",label:a==="en"?"Scale operations":"Escalar operação"},{key:"proteger-loja",label:a==="en"?"Protect the store":"Proteger a loja"},{key:"ganhar-visibilidade",label:a==="en"?"Gain visibility":"Ganhar visibilidade"}];return e.jsxs("div",{className:"bg-background min-h-full flex",children:[e.jsxs("aside",{className:"hidden md:flex flex-col w-52 shrink-0 pt-4 pb-6 sticky top-0 h-screen overflow-y-auto border-r border-border",children:[e.jsx("div",{className:"flex flex-col gap-0.5 mb-1 px-2",children:j.map(s=>e.jsx(R,{isActive:!o&&n===s.key,label:s.label,count:s.count,onClick:()=>y(s.key)},s.key))}),e.jsx("div",{className:"border-t border-border/40 my-3 mx-3"}),e.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[e.jsx("p",{className:"px-1 mb-1",style:{fontSize:11,fontWeight:500,color:"hsl(var(--color-text-tertiary))",letterSpacing:"0.02em"},children:t.cwObjectiveLabel}),T.map(s=>e.jsx(R,{isActive:o===s.key,label:s.label,count:z[s.key],onClick:()=>F(s.key)},s.key))]})]}),e.jsx("div",{className:"flex-1 min-w-0 px-6 py-10 pb-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between gap-6 mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-foreground font-medium text-2xl",children:t.cwPageTitle}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:I})]}),e.jsxs("div",{className:"flex items-center gap-2 rounded-full px-4 py-2.5 bg-muted w-64 shrink-0",children:[e.jsx(V,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}),e.jsx("input",{type:"text",placeholder:t.cwSearchPlaceholder,value:i,onChange:s=>m(s.target.value),className:"bg-transparent text-sm outline-none flex-1 placeholder:text-muted-foreground"}),i&&e.jsx("button",{onClick:()=>m(""),className:"text-muted-foreground hover:text-foreground",children:e.jsx(B,{className:"w-3.5 h-3.5"})})]})]}),e.jsx("div",{className:"flex md:hidden items-center gap-1 mb-4 overflow-x-auto pb-1",children:j.map(s=>e.jsx("button",{onClick:()=>y(s.key),className:`shrink-0 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${n===s.key&&!o?"bg-muted text-foreground":"text-muted-foreground"}`,children:s.label},s.key))}),h.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-3",children:h.map(s=>e.jsx(Z,{coWorker:s,isActive:l.has(s.id),skillMatch:M[s.id]??null,onClick:()=>r(`/co-workers/${s.id}`)},s.id))}):e.jsx("p",{className:"text-sm text-muted-foreground text-center py-12",children:t.cwNotFound})]})})]})};export{fe as default};
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.