PageSourceSearch

https://trybrain.io/assets/_authenticated.test-lab-IVDI17SY.js

js trybrain.io collected 2026-10-02 02:00:40 UTC 20,419 bytes, 1 lines download raw bytes

1import{ad as v,ae as _,af as p,y as q,c as j,z as se,d as P,D as y,t as d,r as S,j as e,c8 as te,a as f,E as K,F as H,e as V,i as A,aO as I,cf as ae,S as Q,aP as W,aQ as G,aR as J,k as T,ar as U,as as X,at as Y,au as Z,av as F,I as M,b5 as ne,B as $,al as re,aU as ee,C as ie}from"./index-DQ05VIVn.js";import{u as le}from"./auth-context-BDbMEkbx.js";import{l as ce}from"./workspace-client-DW7SIejI.js";import{T as de}from"./trending-up-CenUiaS0.js";import{H as oe}from"./history-Clq1b0e6.js";import{P as ue}from"./play-HvSauGnb.js";import{S as me}from"./square-97x-ccZC.js";const he=v({method:"GET"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--listTests_createServerFn_handler")),xe=v({method:"GET"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--getTestDetail_createServerFn_handler")),ge=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--proposeVariants_createServerFn_handler")),fe=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--createTest_createServerFn_handler")),je=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--launchTest_createServerFn_handler")),ve=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--concludeTest_createServerFn_handler")),_e=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--setVariantMeta_createServerFn_handler")),pe=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--recomputeNow_createServerFn_handler")),be=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--runBacktest_createServerFn_handler")),ye=v({method:"GET"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--listAdSetOptions_createServerFn_handler")),Ne=v({method:"GET"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--getBackfillStatus_createServerFn_handler")),Se=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--runCreativeBackfill_createServerFn_handler")),we=v({method:"GET"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--getInsightsCoverage_createServerFn_handler")),Ce=v({method:"POST"}).middleware([_]).handler(p("src_lib_test-lab_functions_ts--runInsightsBackfill_createServerFn_handler")),ke=v({method:"POST"}).middleware([_]).handler(p("src_lib_scale-rules_functions_ts--scanScaleWinnersNow_createServerFn_handler"));function Ke(){const s=q(),{session:l}=le(),u=j(se),x=j(he),a=j(pe),g=j(ke),{data:n}=P({queryKey:["workspaces"],queryFn:async()=>{try{return await u({})}catch(h){if(!(h instanceof Error?h.message:String(h)).includes("No authorization header provided"))throw h;return ce()}},enabled:!!l}),t=n?.[0]?.id??null,{data:m,isLoading:i}=P({queryKey:["tests",t],queryFn:()=>x({data:{workspaceId:t}}),enabled:!!t,refetchInterval:6e4}),N=y({mutationFn:()=>a({data:{workspaceId:t}}),onSuccess:h=>{s.invalidateQueries({queryKey:["tests",t]}),d.success(`Recomputed ${h.variants} variant(s)`)},onError:h=>d.error(h.message)}),c=y({mutationFn:()=>g({data:{workspaceId:t}}),onSuccess:h=>d.success(`${h.proposed} scale action(s) proposed, ${h.executed} executed`),onError:h=>d.error(h.message)}),[w,B]=S.useState(null);return e.jsxs("div",{className:"mx-auto max-w-6xl space-y-6 p-4 md:p-6",children:[e.jsxs("header",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold",children:[e.jsx(te,{className:"h-6 w-6"})," Test Lab"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"One-variable-at-a-time creative tests. Winners feed the Scale engine and the Pattern bank automatically."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(f,{variant:"outline",size:"sm",disabled:!t||N.isPending,onClick:()=>N.mutate(),children:[e.jsx(K,{className:`mr-2 h-4 w-4 ${N.isPending?"animate-spin":""}`}),"Recompute verdicts"]}),e.jsxs(f,{variant:"outline",size:"sm",disabled:!t||c.isPending,onClick:()=>c.mutate(),children:[e.jsx(de,{className:"mr-2 h-4 w-4"})," Scan winners"]}),e.jsx(De,{workspaceId:t})]})]}),t&&e.jsx($e,{workspaceId:t}),t&&e.jsx(Pe,{workspaceId:t}),i?e.jsx(H,{className:"h-40 w-full"}):m?.tests.length?e.jsx("div",{className:"grid gap-3",children:m.tests.map(h=>e.jsx(Fe,{test:h,onOpen:()=>B(h.id),workspaceId:t},h.id))}):e.jsx(V,{children:e.jsxs(A,{className:"py-12 text-center text-sm text-muted-foreground",children:["No tests yet. Click ",e.jsx("strong",{children:"New test"})," to launch your first one-variable test."]})}),w&&e.jsx(Te,{workspaceId:t,testId:w,onClose:()=>B(null)})]})}function Fe({test:s,onOpen:l,workspaceId:u}){const x=q(),a=j(je),g=j(ve),n=j(be),r=y({mutationFn:()=>a({data:{workspaceId:u,testId:s.id}}),onSuccess:()=>{x.invalidateQueries({queryKey:["tests",u]}),d.success("Test launched")},onError:c=>d.error(c.message)}),t=y({mutationFn:()=>g({data:{workspaceId:u,testId:s.id}}),onSuccess:()=>{x.invalidateQueries({queryKey:["tests",u]}),d.success("Test concluded")},onError:c=>d.error(c.message)}),m=y({mutationFn:()=>n({data:{workspaceId:u,testId:s.id}}),onSuccess:c=>{x.invalidateQueries({queryKey:["tests",u]}),x.invalidateQueries({queryKey:["test-detail",s.id]});const w={confirmed:"Hypothesis CONFIRMED",rejected:"Hypothesis REJECTED",inconclusive:"Inconclusive",insufficient_data:"Not enough historical data"};d.success(w[c.verdict]??"Backtest complete")},onError:c=>d.error(c.message)}),i=String(s.status??"draft"),N={draft:"bg-muted text-muted-foreground",running:"bg-blue-500/15 text-blue-600",concluded:"bg-emerald-500/15 text-emerald-600"};return e.jsx(V,{children:e.jsxs(A,{className:"flex flex-col gap-3 p-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("button",{onClick:l,className:"flex-1 text-left",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx($,{variant:"outline",className:"capitalize",children:String(s.variable)}),e.jsx($,{className:N[i]??"",children:i}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Budget $",String(s.test_budget_daily)," / day ·"," ",String(s.test_window_days),"d window"]})]}),e.jsx("div",{className:"mt-1 text-sm",children:String(s.hypothesis)})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(f,{size:"sm",variant:"secondary",onClick:()=>m.mutate(),disabled:m.isPending,title:"Test the hypothesis against the last 12 months of ad data — no spend required",children:[e.jsx(oe,{className:`mr-1 h-3.5 w-3.5 ${m.isPending?"animate-spin":""}`}),m.isPending?"Running…":"Run backtest"]}),i==="draft"&&e.jsxs(f,{size:"sm",onClick:()=>r.mutate(),disabled:r.isPending,children:[e.jsx(ue,{className:"mr-1 h-3.5 w-3.5"})," Launch"]}
1),i==="running"&&e.jsxs(f,{size:"sm",variant:"outline",onClick:()=>t.mutate(),disabled:t.isPending,children:[e.jsx(me,{className:"mr-1 h-3.5 w-3.5"})," Conclude"]}),e.jsx(f,{size:"sm",variant:"ghost",onClick:l,children:"Details"})]})]})})}function Te({workspaceId:s,testId:l,onClose:u}){const x=q(),a=j(xe),g=j(_e),n=j(ye),{data:r,isLoading:t}=P({queryKey:["test-detail",l],queryFn:()=>a({data:{workspaceId:s,testId:l}})}),{data:m}=P({queryKey:["adset-options",s],queryFn:()=>n({data:{workspaceId:s}})}),i=m?.adsets??[],N=y({mutationFn:c=>g({data:{workspaceId:s,variantId:c.variantId,meta_adset_id:c.adsetId||null}}),onSuccess:()=>{x.invalidateQueries({queryKey:["test-detail",l]}),d.success("Linked Meta adset")},onError:c=>d.error(c.message)});return e.jsx(I,{open:!0,onOpenChange:c=>!c&&u(),children:e.jsxs(W,{className:"max-w-3xl",children:[e.jsx(G,{children:e.jsx(J,{children:"Test detail"})}),t||!r?e.jsx(H,{className:"h-60 w-full"}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[e.jsx("div",{className:"font-medium",children:String(r.test.hypothesis)}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["Variable: ",String(r.test.variable)," · target CPA:"," ",String(r.test.target_cpa??"—")]})]}),e.jsx(Be,{test:r.test}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"text-xs text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"py-1 text-left",children:"Variant"}),e.jsx("th",{children:"Impr"}),e.jsx("th",{children:"Conv"}),e.jsx("th",{children:"CPA"}),e.jsx("th",{children:"Conf"}),e.jsx("th",{children:"Verdict"}),e.jsx("th",{children:"Meta adset"})]})}),e.jsx("tbody",{children:r.variants.map(c=>e.jsx(Ee,{variant:c,adsets:i,onLink:w=>N.mutate({variantId:c.id,adsetId:w})},c.id))})]})})]}),e.jsx(ee,{children:e.jsx(f,{variant:"outline",onClick:u,children:"Close"})})]})})}function Pe({workspaceId:s}){return e.jsx(qe,{workspaceId:s})}function $e({workspaceId:s}){const l=q(),u=j(we),x=j(Ce),{data:a,isLoading:g}=P({queryKey:["insights-coverage",s],queryFn:()=>u({data:{workspaceId:s}})}),n=y({mutationFn:()=>x({data:{workspaceId:s,daysBack:365}}),onSuccess:i=>{l.invalidateQueries({queryKey:["insights-coverage",s]}),l.invalidateQueries({queryKey:["creative-backfill-status",s]}),i.ok?d.success(`Pulled ${i.insightsWritten.toLocaleString()} insight rows across ${i.chunks} chunks (${(i.duration_ms/1e3).toFixed(0)}s)`):d.error(`Insights backfill finished with errors: ${i.errors.join("; ").slice(0,200)}`)},onError:i=>d.error(i.message)});if(g||!a)return null;const r=a.earliest_date&&a.latest_date?`${a.earliest_date} → ${a.latest_date}`:"no data yet",t=a.earliest_date&&a.latest_date?Math.round((new Date(a.latest_date).getTime()-new Date(a.earliest_date).getTime())/864e5)+1:0,m=t<60;return e.jsx(V,{className:m?"border-amber-500/40":"",children:e.jsxs(A,{className:"flex flex-col gap-2 p-3 text-xs md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs($,{variant:m?"destructive":"secondary",children:["Insights coverage: ",t," day",t===1?"":"s"]}),e.jsxs("span",{className:"text-muted-foreground",children:["(",r,")"]}),m&&e.jsx("span",{className:"text-amber-700",children:"Warehouse missing historical Meta insights — backfill 365 days to unlock backtest filters."})]}),e.jsxs(f,{size:"sm",variant:m?"default":"outline",onClick:()=>n.mutate(),disabled:n.isPending,children:[e.jsx(K,{className:`mr-1 h-3.5 w-3.5 ${n.isPending?"animate-spin":""}`}),n.isPending?"Pulling 365d from Meta…":"Backfill 365d insights"]})]})})}function qe({workspaceId:s}){const l=q(),u=j(Ne),x=j(Se),{data:a,isLoading:g}=P({queryKey:["creative-backfill-status",s],queryFn:()=>u({data:{workspaceId:s}})}),n=y({mutationFn:()=>x({data:{workspaceId:s}}),onSuccess:i=>{l.invalidateQueries({queryKey:["creative-backfill-status",s]}),i.error?d.error(`Backfill finished with errors: ${i.error}`):d.success(`Backfilled ${i.succeeded} ad${i.succeeded===1?"":"s"} (${i.failed} failed, ${i.skipped_no_impressions} skipped)`)},onError:i=>d.error(i.message)});if(g||!a)return null;const r=a.total_ads>0?a.with_creative/a.total_ads:0,t=a.with_creative<100&&a.total_ads>
10,m=a.last_backfill_at?new Date(a.last_backfill_at).toLocaleString():"never";return e.jsx(V,{className:t?"border-amber-500/40":"",children:e.jsxs(A,{className:"flex flex-col gap-2 p-3 text-xs md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs($,{variant:t?"destructive":"secondary",children:[a.with_creative," / ",a.total_ads," ads ready for backtest"]}),e.jsxs("span",{className:"text-muted-foreground",children:["(",(r*100).toFixed(0),"% coverage) · last sync: ",m]}),t&&e.jsx("span",{className:"text-amber-700",children:"Backtest needs ad copy from Meta — run a backfill to unlock historical analysis."})]}),e.jsxs(f,{size:"sm",variant:t?"default":"outline",onClick:()=>n.mutate(),disabled:n.isPending,children:[e.jsx(K,{className:`mr-1 h-3.5 w-3.5 ${n.isPending?"animate-spin":""}`}),n.isPending?"Fetching from Meta…":"Backfill ad creative"]})]})})}function Be({test:s}){const l=s.backtest_result;if(!l)return e.jsxs("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:["No backtest run yet. Click ",e.jsx("strong",{children:"Run backtest"})," on the test row to check this hypothesis against the last 12 months of historical ad data — no spend, no waiting."]});const u={confirmed:"bg-emerald-500/15 text-emerald-600 border-emerald-500/30",rejected:"bg-rose-500/15 text-rose-600 border-rose-500/30",inconclusive:"bg-amber-500/15 text-amber-600 border-amber-500/30",insufficient_data:"bg-muted text-muted-foreground border-border"},x={confirmed:"Hypothesis CONFIRMED",rejected:"Hypothesis REJECTED",inconclusive:"Inconclusive",insufficient_data:"Not enough historical data"},a=n=>n==null?"—":`${(n*100).toFixed(2)}%`,g=n=>n==null?"—":`$${n.toFixed(2)}`;return e.jsxs("div",{className:`rounded-md border p-3 text-sm ${u[l.verdict]}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-semibold",children:x[l.verdict]}),e.jsxs("div",{className:"text-xs opacity-80",children:[l.window_days,"d window · ",l.total_ads_considered," ads · ran"," ",new Date(l.ran_at).toLocaleString()]})]}),e.jsx("div",{className:"mt-1 text-xs opacity-90",children:l.reason}),e.jsx("div",{className:"mt-3 grid grid-cols-2 gap-2",children:["A","B"].map(n=>{const r=l.buckets[n];return e.jsxs("div",{className:"rounded border bg-background/40 p-2",children:[e.jsxs("div",{className:"text-xs font-medium",children:[n,". ",r.label," ",e.jsxs("span",{className:"text-muted-foreground",children:["(",r.ad_count," ads)"]})]}),e.jsxs("div",{className:"mt-1 grid grid-cols-3 gap-1 text-[11px] text-muted-foreground",children:[e.jsxs("div",{children:["CTR",e.jsx("br",{}),e.jsx("span",{className:"text-foreground",children:a(r.ctr)})]}),e.jsxs("div",{children:["CVR",e.jsx("br",{}),e.jsx("span",{className:"text-foreground",children:a(r.cvr)})]}),e.jsxs("div",{children:["CPA",e.jsx("br",{}),e.jsx("span",{className:"text-foreground",children:g(r.cpa)})]})]}),e.jsxs("div",{className:"mt-1 text-[10px] text-muted-foreground",children:[r.stats.impressions.toLocaleString()," impr ·"," ",r.stats.conversions.toLocaleString()," conv ·"," ","$",r.stats.spend.toFixed(0)," spend"]}),r.examples.length>0?e.jsxs("details",{className:"mt-1 text-[10px]",children:[e.jsxs("summary",{className:"cursor-pointer text-muted-foreground",children:[r.examples.length," example ad",r.examples.length===1?"":"s"]}),e.jsx("ul",{className:"mt-1 space-y-1",children:r.examples.map(t=>e.jsx("li",{className:"truncate",children:t.headline??t.primary_text??t.ad_id},t.ad_id))})]}):null]},n)})}),e.jsxs("div",{className:"mt-2 text-xs",children:["Confidence: ",e.jsxs("strong",{children:[(l.confidence*100).toFixed(0),"%"]})]})]})}function Ee({variant:s,adsets:l,onLink:u}){const x=String(s.meta_adset_id??""),[a,g]=S.useState(x),n=String(s.verdict??"pending"),r={winner:"text-emerald-600",loser:"text-rose-600",inconclusive:"text-amber-600",pending:"text-muted-foreground"};return e.jsxs("tr",{className:"border-t",children:[e.jsx("td",{className:"py-2",children:e.jsxs("div",{className:"font-medium",children:[String(s.label)," ",s.is_control?e.jsx($,{variant:"outline",className:"ml-1 text-xs",children:"control"}):null]})}),e.jsx("td",{className:"text-center",children:String(s.impressions??0)}),e.jsx("td",{className:"text-center",children:String(s.conversions??0)}),e.jsx("td",{className:"text-center",children:s.cpa!=null?`$${Number(s.cpa).toFixed(2)}`:"—"}),e.jsx("td",{className:"text-center",children:s.confidence!=null?`${Math.round(Number(s.confidence)*100)}%`:"—"}),e.jsx("td",{className:`text-center capitalize ${r[n]??""}`,children:n}),e.jsx("td",{children:e.jsxs("div",{className:"flex gap-1",children:[e.jsxs(U,{value:a||"__none__",onValueChange:t=>g(t==="__none__"?"":t),children:[e.jsx(X,{className:"h-7 w-48 text-xs",children:e.jsx(Y,{placeholder:"Pick adset"})}),e.jsxs(Z,{children:[e.jsx(F,{value:"__none__",children:"— none —"}),l.map(t=>e.jsxs(F,{value:t.meta_id,children:[(t.name||t.meta_id).slice(0,48),t.effective_status?` · ${t.effective_status}`:""]},t.meta_id))]})]}),e.jsx(f,{size:"icon",variant:"outline",className:"h-7 w-7",onClick:()=>u(a),children:e.jsx(ie,{className:"h-3 w-3"})})]})})]})}function De({workspaceId:s}){const l=q(),u=j(fe),x=j(ge),[a,g]=S.useState(!1),[n,r]=S.useState("hook"),[t,m]=S.useState(""),[i,N]=S.useState(""),[c,w]=S.useState("10"),[B,h]=S.useState("7"),[E,D]=S.useState([{label:"Control",is_control:!0,variant_payload:{value:""}},{label:"Variant A",is_control:!1,variant_payload:{value:""}},{label:"Variant B",is_control:!1,variant_payload:{value:""}}]),L=y({mutationFn:async()=>
1{if(!s)throw new Error("No workspace");return x({data:{workspaceId:s,variable:n,hypothesis:t,count:4}})},onSuccess:o=>{const b=o?.variants??[];if(!b.length){d.info("AI returned no variants");return}D([{label:b[0].label||"Control",is_control:!0,variant_payload:b[0].variant_payload},...b.slice(1).map(C=>({label:C.label,is_control:!1,variant_payload:C.variant_payload}))]),d.success(`AI proposed ${b.length} variants`)},onError:o=>d.error(o.message)}),R=y({mutationFn:async()=>{if(!s)throw new Error("No workspace");return u({data:{workspaceId:s,variable:n,hypothesis:t,target_cpa:i?Number(i):null,test_budget_daily:Number(c),test_window_days:Number(B),variants:E}})},onSuccess:()=>{l.invalidateQueries({queryKey:["tests",s]}),g(!1),m(""),d.success("Test created")},onError:o=>d.error(o.message)});return e.jsxs(I,{open:a,onOpenChange:g,children:[e.jsx(ae,{asChild:!0,children:e.jsxs(f,{size:"sm",disabled:!s,children:[e.jsx(Q,{className:"mr-2 h-4 w-4"})," New test"]})}),e.jsxs(W,{className:"max-w-2xl",children:[e.jsx(G,{children:e.jsx(J,{children:"Launch a one-variable test"})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(T,{children:"Variable to test"}),e.jsxs(U,{value:n,onValueChange:o=>r(o),children:[e.jsx(X,{children:e.jsx(Y,{})}),e.jsxs(Z,{children:[e.jsx(F,{value:"hook",children:"Hook"}),e.jsx(F,{value:"offer",children:"Offer"}),e.jsx(F,{value:"visual",children:"Visual"}),e.jsx(F,{value:"audience",children:"Audience"}),e.jsx(F,{value:"cta",children:"CTA"})]})]})]}),e.jsxs("div",{children:[e.jsx(T,{children:"Target CPA ($)"}),e.jsx(M,{value:i,onChange:o=>N(o.target.value),placeholder:"e.g. 25",inputMode:"decimal"})]}),e.jsxs("div",{children:[e.jsx(T,{children:"Daily budget per variant ($)"}),e.jsx(M,{value:c,onChange:o=>w(o.target.value),inputMode:"decimal"})]}),e.jsxs("div",{children:[e.jsx(T,{children:"Window (days)"}),e.jsx(M,{value:B,onChange:o=>h(o.target.value),inputMode:"numeric"})]})]}),e.jsxs("div",{children:[e.jsx(T,{children:"Hypothesis"}),e.jsx(ne,{value:t,onChange:o=>m(o.target.value),placeholder:"e.g. Hooks led with a specific pain point will outperform generic feature claims by 30% on CTR.",rows:3})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(T,{children:["Variants (",E.length,")"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(f,{size:"sm",variant:"outline",onClick:()=>L.mutate(),disabled:!t||L.isPending||!s,children:[e.jsx(Q,{className:"mr-1 h-3.5 w-3.5"}),L.isPending?"Generating…":"AI propose"]}),e.jsx(f,{size:"sm",variant:"ghost",onClick:()=>D(o=>[...o,{label:`Variant ${String.fromCharCode(65+o.length-1)}`,is_control:!1,variant_payload:{value:""}}]),children:"+ Add"})]})]}),e.jsx("div",{className:"space-y-2",children:E.map((o,b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(M,{value:o.label,onChange:C=>D(O=>O.map((k,z)=>z===b?{...k,label:C.target.value}:k)),className:"w-40"}),e.jsx(M,{value:String(o.variant_payload.value??""),placeholder:"Variant value (copy, image desc, etc.)",onChange:C=>D(O=>O.map((k,z)=>z===b?{...k,variant_payload:{...k.variant_payload,value:C.target.value}}:k))}),o.is_control?e.jsx($,{variant:"outline",className:"self-center",children:"control"}):e.jsx(f,{size:"icon",variant:"ghost",onClick:()=>D(C=>C.filter((O,k)=>k!==b)),children:e.jsx(re,{className:"h-3.5 w-3.5"})})]},b))})]}),e.jsxs(ee,{children:[e.jsx(f,{variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e.jsx(f,{onClick:()=>R.mutate(),disabled:R.isPending||!t||E.length<2,children:R.isPending?"Creating…":"Create test"})]})]})]})}export{Ke as component};

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.