UNPKG

decocms

Version:

Deco CMS โ€” Self-hostable MCP Gateway for managing AI connections and tools

2 lines (1 loc) โ€ข 33.7 kB
import{cG as Se,r as xe,hL as Fe,hM as Ae,c as E,b as z,m as K,j as n,u as Ke,d as Ge,B as ie,L as le,n as V,F as de,$ as ke,e3 as W,gK as me,av as we,a6 as Ue}from"./index-DoEtSiIe.js";import{m as Y}from"./agent-icon-DoabtHNW.js";import{B as Ee}from"./badge-DONoxQO7.js";import{E as pe}from"./empty-state-UX_DOq42.js";import{u as Xe}from"./chat-context-vJ6R-Clt.js";import{n as qe,p as Je,a as Qe,N as _e,u as We,b as Ye,c as Ze,d as et,e as tt,f as st,g as it,h as nt}from"./named-rule-view-B12Mihtd.js";import{S as re,a as he}from"./view-header-CRFbPvFT.js";import{S as Re,a as Te}from"./site-draft-view-UnsYH70N.js";import{S as Ce,o as De,s as ve,p as lt}from"./named-rule-step-BAentWbs.js";import{s as je}from"./Plus-BoPsX_T8.js";import{c as rt,u as at}from"./hosted-reconcile-CTronLZo.js";import{ae as ot,al as ct,aj as dt}from"./blocks-tab-states-CTy1iAF5.js";import{a as ft}from"./use-panel-navigate-DHff9CS9.js";function mt(l){const e=Se(),t=xe.useRef(void 0);return Fe(e.stores.location,s=>{const d=s;if(e.options.defaultStructuralSharing){const r=Ae(t.current,d);return t.current=r,r}return d})}const be={running:0,everyone:1,off:2};function ae(l,e){const t=ot(l,"experiments");return t.kind==="conflict"?[]:Object.entries(t.values).map(([d,r],a)=>{const i=qe(e,"experiments",d,r),f=i==="changed"?Je(e,"experiments",d):void 0;return{order:a,row:{name:d,share:r,status:ct(r),entryState:i,...f!==void 0?{publishedShare:f}:{}}}}).sort((d,r)=>be[d.row.status]-be[r.row.status]||d.order-r.order).map(d=>d.row)}function Le(l,e){return Qe(l,e,"experiments")}function ut(l){return ae(l,l)}function xt(l,e){return e?ae(l,e).some(t=>t.entryState!=="published")||Le(l,e).length>0:!1}const $e={running:"bg-success",everyone:"bg-primary",off:"bg-muted-foreground/50"};function ze(l,e){return l(e==="running"?"experiments.v8.status.running":e==="everyone"?"experiments.v8.status.everyone":"experiments.v8.status.off")}function Oe(l){const e=E.c(11),{status:t}=l,s=z(),d=$e[t];let r;e[0]!==d?(r=K("size-1.5 rounded-full",d),e[0]=d,e[1]=r):r=e[1];let a;e[2]!==r?(a=n.jsx("span",{className:r}),e[2]=r,e[3]=a):a=e[3];let i;e[4]!==t||e[5]!==s?(i=ze(s,t),e[4]=t,e[5]=s,e[6]=i):i=e[6];let f;return e[7]!==t||e[8]!==a||e[9]!==i?(f=n.jsxs(Ee,{variant:"secondary","data-status":t,children:[a,i]}),e[7]=t,e[8]=a,e[9]=i,e[10]=f):f=e[10],f}const Ne="openedTest";function pt(){const l=E.c(13);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const t=Ke(e),s=Ge(),d=Se(),a=mt().state?.[Ne],i="test"in t&&typeof t.test=="string"&&t.test?t.test:null;let f;l[1]!==s?(f=()=>{s({to:".",search:ht,replace:!0})},l[1]=s,l[2]=f):f=l[2];const o=f;let m;l[3]!==o||l[4]!==i||l[5]!==s||l[6]!==a||l[7]!==d?(m=c=>{if(c===null){i!==null&&a===i?d.history.back():o();return}s({to:".",search:x=>({...x,test:c}),state:(x=>({...x,[Ne]:c}))})},l[3]=o,l[4]=i,l[5]=s,l[6]=a,l[7]=d,l[8]=m):m=l[8];let u;return l[9]!==o||l[10]!==i||l[11]!==m?(u={name:i,clear:o,set:m},l[9]=o,l[10]=i,l[11]=m,l[12]=u):u=l[12],u}function ht(l){return{...l,test:void 0}}function ne(l,e,t){return{to:ke.experiments,params:{org:l,agentId:e},search:s=>({thread:s.thread,sidepanel:s.sidepanel,test:t})}}function vt(l,e){return{to:ke.monitoring,params:{org:l,agentId:e},search:t=>({thread:t.thread,sidepanel:t.sidepanel,view:"experiments"})}}function gt(l,e){const t=e?new Map(ae(e,l).map(s=>[s.name,s])):null;return ut(l).map(s=>({...s,draft:t?t.get(s.name)?.entryState??"removed":null}))}function Ie(l,e){return!l||ae(l,null).some(t=>t.name===e)}function jt(l){const e=E.c(22),{published:t,mode:s,openName:d}=l;if(t.state!=="ready"){let c;return e[0]!==l||e[1]!==t?(c=n.jsx(bt,{...l,read:t}),e[0]=l,e[1]=t,e[2]=c):c=e[2],c}let r,a,i,f;if(e[3]!==s||e[4]!==d||e[5]!==l||e[6]!==t.content){i=Symbol.for("react.early_return_sentinel");e:{if(r=gt(t.content,l.draft),s==="compact"){i=n.jsx(Et,{...l,rows:r});break e}let c;e[11]!==l.draft||e[12]!==t.content?(c=l.draft?xt(l.draft,t.content):!1,e[11]=l.draft,e[12]=t.content,e[13]=c):c=e[13],f=c,a=r.find(x=>x.name===d)??null}e[3]=s,e[4]=d,e[5]=l,e[6]=t.content,e[7]=r,e[8]=a,e[9]=i,e[10]=f}else r=e[7],a=e[8],i=e[9],f=e[10];if(i!==Symbol.for("react.early_return_sentinel"))return i;const o=a;if(o){let c;return e[14]!==o||e[15]!==l?(c=n.jsx(wt,{...l,row:o}),e[14]=o,e[15]=l,e[16]=c):c=e[16],c}const m=d??null;let u;return e[17]!==l||e[18]!==r||e[19]!==m||e[20]!==f?(u=n.jsx(kt,{...l,rows:r,unpublished:f,notLive:m}),e[17]=l,e[18]=r,e[19]=m,e[20]=f,e[21]=u):u=e[21],u}function bt(l){const e=E.c(26),{mode:t,read:s}=l,d=z();if(s.state==="loading"){let p;return e[0]!==t?(p=t==="full"?n.jsx(Pe,{}):n.jsx(W,{className:"h-16 w-full","data-testid":"experiments-live-loading"}),e[0]=t,e[1]=p):p=e[1],p}let r;e[2]!==s.state||e[3]!==d?(r=s.state==="failed"?d("experiments.v8.loadFailed"):d("experiments.live.unknown.title"),e[2]=s.state,e[3]=d,e[4]=r):r=e[4];const a=r;let i;e[5]!==s.state||e[6]!==d?(i=s.state==="failed"?d("sectionsEditor.namedRules.unavailableHint"):d("experiments.live.unknown.desc"),e[5]=s.state,e[6]=d,e[7]=i):i=e[7];const f=i,o=s.state==="failed"?s.retry:null;if(t==="full"){let p;e[8]!==o||e[9]!==d?(p=o?{label:d("sectionsEditor.namedRules.tryAgain"),onClick:o}:void 0,e[8]=o,e[9]=d,e[10]=p):p=e[10];let h;return e[11]!==f||e[12]!==p||e[13]!==a?(h=n.jsx(Ve,{title:a,description:f,action:p}),e[11]=f,e[12]=p,e[13]=a,e[14]=h):h=e[14],h}let m;e[15]!==a?(m=n.jsx("span",{className:"font-medium text-foreground",children:a}),e[15]=a,e[16]=m):m=e[16];let u;e[17]!==f?(u=n.jsx("span",{children:f}),e[17]=f,e[18]=u):u=e[18];let c;e[19]!==o||e[20]!==d?(c=o&&n.jsx(ie,{size:"sm",variant:"ghost",onClick:o,children:d("sectionsEditor.namedRules.tryAgain")}),e[19]=o,e[20]=d,e[21]=c):c=e[21];let x;return e[22]!==m||e[23]!==u||e[24]!==c?(x=n.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 pt-2 text-xs text-muted-foreground","data-testid":"experiments-live-unavailable",role:"status",children:[m,u,c]}),e[22]=m,e[23]=u,e[24]=c,e[25]=x):x=e[25],x}function Pe(){const l=E.c(2);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=K("flex flex-col gap-3",re),l[0]=e):e=l[0];let t;return l[1]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(V,{children:n.jsx(V.Content,{children:n.jsxs("div",{className:e,"data-testid":"experiments-live-loading","aria-busy":"true",children:[n.jsx(W,{className:"h-6 w-40"}),n.jsx(W,{className:"h-16 w-full"}),n.jsx(W,{className:"h-16 w-full"})]})})}),l[1]=t):t=l[1],t}function Be(l){const e=E.c(10),{orgSlug:t,virtualMcpId:s,test:d}=l,r=z();let a;e[0]!==t||e[1]!==d||e[2]!==s?(a=ne(t,s,d),e[0]=t,e[1]=d,e[2]=s,e[3]=a):a=e[3];let i;e[4]!==r?(i=r("experiments.live.edit"),e[4]=r,e[5]=i):i=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(de,{size:14}),e[6]=f):f=e[6];let o;return e[7]!==a||e[8]!==i?(o=n.jsx(ie,{asChild:!0,size:"sm",variant:"outline",children:n.jsxs(le,{...a,"data-testid":"experiments-live-edit",children:[i,f]})}),e[7]=a,e[8]=i,e[9]=o):o=e[9],o}const ge="inline-flex w-fit items-center gap-1 font-medium text-foreground underline-offset-2 hover:underline";function ue(l){const e=E.c(7),{text:t,link:s,testId:d}=l,r=z();let a;e[0]!==s||e[1]!==r?(a=s&&n.jsxs(le,{...s,className:ge,children:[r("experiments.live.edit"),n.jsx(de,{size:12})]}),e[0]=s,e[1]=r,e[2]=a):a=e[2];let i;return e[3]!==a||e[4]!==d||e[5]!==t?(i=n.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground","data-testid":d,children:[t,a]}),e[3]=a,e[4]=d,e[5]=t,e[6]=i):i=e[6],i}function Nt(l){const e=E.c(5),{share:t}=l,s=z(),d=String(t);let r;e[0]!==s||e[1]!==d?(r=s("sectionsEditor.namedRulePicker.shareOfVisitors",{share:d}),e[0]=s,e[1]=d,e[2]=r):r=e[2];let a;return e[3]!==r?(a=n.jsx("span",{className:"w-32 shrink-0 text-xs tabular-nums text-muted-foreground",children:r}),e[3]=r,e[4]=a):a=e[4],a}function yt(l){const e=E.c(6),{draft:t}=l,s=z();if(t==="removed"){let r;e[0]!==s?(r=s("experiments.v8.removedTitle"),e[0]=s,e[1]=r):r=e[1];let a;return e[2]!==r?(a=n.jsx(Ee,{variant:"muted",children:r}),e[2]=r,e[3]=a):a=e[3],a}let d;return e[4]!==t?(d=n.jsx(_e,{kind:"experiments",state:t}),e[4]=t,e[5]=d):d=e[5],d}function St(l){const e=E.c(29),{row:t,onOpen:s,edit:d}=l,r=z(),a=d!==void 0;let i;e[0]!==a||e[1]!==t.share?(i=a&&n.jsx("div",{"aria-hidden":"true",className:"shrink-0",children:n.jsx(De,{arms:ve(t.share),size:28,thickness:5})}),e[0]=a,e[1]=t.share,e[2]=i):i=e[2];let f;e[3]!==a||e[4]!==s||e[5]!==t.name||e[6]!==r?(f=s?n.jsx("button",{type:"button",onClick:s,"aria-label":a?void 0:r("experiments.live.editRow",{name:t.name}),className:K("min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground","after:absolute after:inset-0 focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-ring focus-visible:after:ring-inset"),children:t.name}):n.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground",children:t.name}),e[3]=a,e[4]=s,e[5]=t.name,e[6]=r,e[7]=f):f=e[7];let o;e[8]!==t.share?(o=n.jsx(Nt,{share:t.share}),e[8]=t.share,e[9]=o):o=e[9];let m;e[10]!==t.draft?(m=n.jsx("div",{className:"hidden w-40 shrink-0 md:flex",children:n.jsx(yt,{draft:t.draft})}),e[10]=t.draft,e[11]=m):m=e[11];let u;e[12]!==t.status?(u=n.jsx("div",{className:"flex w-24 shrink-0",children:n.jsx(Oe,{status:t.status})}),e[12]=t.status,e[13]=u):u=e[13];let c;e[14]!==d||e[15]!==t.name||e[16]!==r?(c=d&&n.jsxs(le,{...d,"aria-label":r("experiments.live.editNamed",{name:t.name}),className:K(ge,"relative z-10 shrink-0 text-xs"),"data-testid":"experiment-live-row-edit",children:[r("experiments.live.editTest"),n.jsx(de,{size:12})]}),e[14]=d,e[15]=t.name,e[16]=r,e[17]=c):c=e[17];let x;e[18]!==a||e[19]!==s?(x=!a&&n.jsx(we,{size:16,"aria-hidden":"true",className:K("shrink-0 text-muted-foreground",!s&&"invisible")}),e[18]=a,e[19]=s,e[20]=x):x=e[20];let p;return e[21]!==i||e[22]!==f||e[23]!==o||e[24]!==m||e[25]!==u||e[26]!==c||e[27]!==x?(p=n.jsxs("div",{className:"group relative flex items-center gap-4 px-5 py-4 transition-colors hover:bg-muted/50","data-testid":"experiment-live-row",children:[i,f,o,m,u,c,x]}),e[21]=i,e[22]=f,e[23]=o,e[24]=m,e[25]=u,e[26]=c,e[27]=x,e[28]=p):p=e[28],p}function Me(l){const e=E.c(9),{rows:t,onOpen:s,edit:d}=l;let r;if(e[0]!==d||e[1]!==s||e[2]!==t){let i;e[4]!==d||e[5]!==s?(i=f=>n.jsx(St,{row:f,onOpen:s(f),edit:d?.(f)},f.name),e[4]=d,e[5]=s,e[6]=i):i=e[6],r=t.map(i),e[0]=d,e[1]=s,e[2]=t,e[3]=r}else r=e[3];let a;return e[7]!==r?(a=n.jsx(me,{size:"flush",className:"gap-0 divide-y divide-border overflow-hidden","data-testid":"experiments-live-list",children:r}),e[7]=r,e[8]=a):a=e[8],a}function He(l){return l.draft==="removed"?void 0:l.name}function kt(l){const e=E.c(33),{orgSlug:t,virtualMcpId:s,draft:d,onOpen:r,rows:a,unpublished:i,notLive:f}=l,o=z();let m;e[0]!==o?(m=o("experiments.live.intro"),e[0]=o,e[1]=m):m=e[1];let u;e[2]!==t||e[3]!==s?(u=n.jsx(Be,{orgSlug:t,virtualMcpId:s}),e[2]=t,e[3]=s,e[4]=u):u=e[4];let c;e[5]!==m||e[6]!==u?(c=n.jsx(he,{intro:m,actions:u}),e[5]=m,e[6]=u,e[7]=c):c=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=K("flex flex-col gap-4",re),e[8]=x):x=e[8];let p;e[9]!==d||e[10]!==f||e[11]!==t||e[12]!==o||e[13]!==s?(p=f!==null&&n.jsx(ue,{testId:"experiments-live-not-live",text:o("experiments.live.notLive",{name:f}),link:ne(t,s,Ie(d,f)?f:void 0)}),e[9]=d,e[10]=f,e[11]=t,e[12]=o,e[13]=s,e[14]=p):p=e[14];let h;e[15]!==t||e[16]!==o||e[17]!==i||e[18]!==s?(h=i&&n.jsx(ue,{testId:"experiments-live-unpublished",text:o("experiments.live.unpublished"),link:ne(t,s)}),e[15]=t,e[16]=o,e[17]=i,e[18]=s,e[19]=h):h=e[19];let b;e[20]!==r||e[21]!==t||e[22]!==a||e[23]!==o||e[24]!==s?(b=a.length===0?n.jsx(pe,{icon:n.jsx(Y,{size:28,className:"text-muted-foreground"}),title:o("experiments.live.empty.title"),description:o("experiments.live.empty.desc")}):n.jsx(Me,{rows:a,onOpen:g=>()=>r(g.name),edit:g=>ne(t,s,He(g))}),e[20]=r,e[21]=t,e[22]=a,e[23]=o,e[24]=s,e[25]=b):b=e[25];let v;e[26]!==p||e[27]!==h||e[28]!==b?(v=n.jsx(V.Content,{children:n.jsxs("div",{className:x,"data-testid":"experiments-live",children:[p,h,b]})}),e[26]=p,e[27]=h,e[28]=b,e[29]=v):v=e[29];let j;return e[30]!==c||e[31]!==v?(j=n.jsxs(V,{children:[c,v]}),e[30]=c,e[31]=v,e[32]=j):j=e[32],j}function wt(l){const e=E.c(65),{orgSlug:t,virtualMcpId:s,onOpen:d,row:r}=l,a=z();let i;e[0]!==d?(i=()=>d(null),e[0]=d,e[1]=i):i=e[1];const f=i;let o;e[2]!==r.draft||e[3]!==a?(o=r.draft==="removed"?a("experiments.live.removedTest"):r.draft==="changed"||r.draft==="new"?a("experiments.live.unpublishedTest"):null,e[2]=r.draft,e[3]=a,e[4]=o):o=e[4];const m=o;let u;e[5]!==a?(u=a("experiments.title"),e[5]=a,e[6]=u):u=e[6];let c;e[7]!==f||e[8]!==u?(c={label:u,onSelect:f},e[7]=f,e[8]=u,e[9]=c):c=e[9];let x;e[10]!==r.name?(x=[{key:"experiment",label:r.name}],e[10]=r.name,e[11]=x):x=e[11];let p;e[12]!==c||e[13]!==x?(p=n.jsx(V.Breadcrumbs,{after:"page",parent:c,items:x}),e[12]=c,e[13]=x,e[14]=p):p=e[14];let h;e[15]!==a?(h=a("experiments.v8.allTests"),e[15]=a,e[16]=h):h=e[16];let b;e[17]!==f||e[18]!==h?(b={label:h,onClick:f},e[17]=f,e[18]=h,e[19]=b):b=e[19];let v;e[20]!==r?(v=He(r),e[20]=r,e[21]=v):v=e[21];let j;e[22]!==t||e[23]!==v||e[24]!==s?(j=n.jsx(Be,{orgSlug:t,virtualMcpId:s,test:v}),e[22]=t,e[23]=v,e[24]=s,e[25]=j):j=e[25];let g;e[26]!==j||e[27]!==b?(g=n.jsx(he,{back:b,actions:j}),e[26]=j,e[27]=b,e[28]=g):g=e[28];let S;e[29]===Symbol.for("react.memo_cache_sentinel")?(S=K("flex max-w-2xl flex-col gap-6",re),e[29]=S):S=e[29];let y;e[30]!==r.name?(y=n.jsx("h2",{className:"truncate text-lg font-medium",children:r.name}),e[30]=r.name,e[31]=y):y=e[31];let k;e[32]!==r.status?(k=n.jsx(Oe,{status:r.status}),e[32]=r.status,e[33]=k):k=e[33];let w;e[34]!==y||e[35]!==k?(w=n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[y,k]}),e[34]=y,e[35]=k,e[36]=w):w=e[36];let R;e[37]!==a?(R=a("experiments.v8.shareTitle"),e[37]=a,e[38]=R):R=e[38];let H;e[39]!==R?(H=n.jsx("h3",{className:"text-sm font-medium",children:R}),e[39]=R,e[40]=H):H=e[40];const O=r.share;let I;e[41]!==a?(I=a("experiments.v8.split.inTest"),e[41]=a,e[42]=I):I=e[42];let P;e[43]!==a?(P=a("experiments.v8.split.rest"),e[43]=a,e[44]=P):P=e[44];let T;e[45]!==a?(T=a("experiments.v8.split.center"),e[45]=a,e[46]=T):T=e[46];let C;e[47]!==r.share||e[48]!==I||e[49]!==P||e[50]!==T?(C=n.jsx(Ce,{value:O,readOnly:!0,inTestLabel:I,restLabel:P,centerLabel:T}),e[47]=r.share,e[48]=I,e[49]=P,e[50]=T,e[51]=C):C=e[51];let D;e[52]!==H||e[53]!==C?(D=n.jsxs("section",{className:"flex flex-col gap-2",children:[H,C]}),e[52]=H,e[53]=C,e[54]=D):D=e[54];let L;e[55]!==m?(L=m&&n.jsx(ue,{testId:"experiments-live-unpublished",text:m}),e[55]=m,e[56]=L):L=e[56];let B;e[57]!==w||e[58]!==D||e[59]!==L?(B=n.jsx(V.Content,{children:n.jsxs("div",{className:S,"data-testid":"experiment-live-detail",children:[w,D,L]})}),e[57]=w,e[58]=D,e[59]=L,e[60]=B):B=e[60];let $;return e[61]!==g||e[62]!==B||e[63]!==p?($=n.jsxs(V,{children:[p,g,B]}),e[61]=g,e[62]=B,e[63]=p,e[64]=$):$=e[64],$}function Et(l){const e=E.c(32),{orgSlug:t,virtualMcpId:s,draft:d,onOpen:r,rows:a}=l,i=z();let f;e[0]!==i?(f=i("experiments.live.title"),e[0]=i,e[1]=f):f=e[1];let o;e[2]!==f?(o=n.jsx("h2",{id:"experiments-live-title",className:"text-sm font-medium",children:f}),e[2]=f,e[3]=o):o=e[3];let m;e[4]!==i?(m=i("experiments.live.intro"),e[4]=i,e[5]=m):m=e[5];let u;e[6]!==m?(u=n.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[6]=m,e[7]=u):u=e[7];let c;e[8]!==o||e[9]!==u?(c=n.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[o,u]}),e[8]=o,e[9]=u,e[10]=c):c=e[10];let x;e[11]!==t||e[12]!==s?(x=vt(t,s),e[11]=t,e[12]=s,e[13]=x):x=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=K(ge,"text-xs"),e[14]=p):p=e[14];let h;e[15]!==i?(h=i("experiments.live.viewInMonitor"),e[15]=i,e[16]=h):h=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(de,{size:12}),e[17]=b):b=e[17];let v;e[18]!==x||e[19]!==h?(v=n.jsxs(le,{...x,className:p,"data-testid":"experiments-live-monitor",children:[h,b]}),e[18]=x,e[19]=h,e[20]=v):v=e[20];let j;e[21]!==v||e[22]!==c?(j=n.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-x-4 gap-y-1",children:[c,v]}),e[21]=v,e[22]=c,e[23]=j):j=e[23];let g;e[24]!==d||e[25]!==r||e[26]!==a||e[27]!==i?(g=a.length===0?n.jsx("p",{className:"text-xs text-muted-foreground",children:i("experiments.live.empty.title")}):n.jsx(Me,{rows:a,onOpen:y=>Ie(d,y.name)?()=>r(y.name):null}),e[24]=d,e[25]=r,e[26]=a,e[27]=i,e[28]=g):g=e[28];let S;return e[29]!==j||e[30]!==g?(S=n.jsxs("section",{className:"flex flex-col gap-2 pt-2","aria-labelledby":"experiments-live-title","data-testid":"experiments-live-compact",children:[j,g]}),e[29]=j,e[30]=g,e[31]=S):S=e[31],S}function Ve(l){const e=E.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Y,{size:28,className:"text-muted-foreground"}),e[0]=t):t=e[0];let s;return e[1]!==l?(s=n.jsx(Re,{icon:t,...l}),e[1]=l,e[2]=s):s=e[2],s}function Qt(l){const e=E.c(20),{virtualMcpId:t}=l,s=z();if(!Xe()?.currentBranch){let x;return e[0]!==t?(x=n.jsx(Rt,{virtualMcpId:t}),e[0]=t,e[1]=x):x=e[1],x}let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Y,{size:28,className:"text-muted-foreground"}),e[2]=r):r=e[2];let a;e[3]!==s?(a=s("experiments.live.noDraft.title"),e[3]=s,e[4]=a):a=e[4];let i;e[5]!==s?(i=s("experiments.live.noDraft.desc"),e[5]=s,e[6]=i):i=e[6];let f;e[7]!==s?(f=s("experiments.v8.loadFailed"),e[7]=s,e[8]=f):f=e[8];let o;e[9]!==s?(o=s("sectionsEditor.namedRules.unavailableHint"),e[9]=s,e[10]=o):o=e[10];let m;e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==o?(m={noDraftTitle:a,noDraftDesc:i,loadFailed:f,loadFailedHint:o},e[11]=a,e[12]=i,e[13]=f,e[14]=o,e[15]=m):m=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Pe,{}),e[16]=u):u=e[16];let c;return e[17]!==m||e[18]!==t?(c=n.jsx(Te,{virtualMcpId:t,icon:r,copy:m,skeleton:u,children:_t}),e[17]=m,e[18]=t,e[19]=c):c=e[19],c}function _t(l){return n.jsx(Tt,{...l})}function Rt(l){const e=E.c(17),{virtualMcpId:t}=l,s=z(),{org:d}=Ue();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Y,{size:28,className:"text-muted-foreground"}),e[0]=r):r=e[0];let a;e[1]!==s?(a=s("experiments.live.noDraft.title"),e[1]=s,e[2]=a):a=e[2];let i;e[3]!==s?(i=s("experiments.live.noDraft.desc"),e[3]=s,e[4]=i):i=e[4];let f;e[5]!==d.slug||e[6]!==t?(f=ne(d.slug,t),e[5]=d.slug,e[6]=t,e[7]=f):f=e[7];let o;e[8]!==s?(o=s("experiments.live.noDraft.action"),e[8]=s,e[9]=o):o=e[9];let m;e[10]!==f||e[11]!==o?(m=n.jsx(ie,{asChild:!0,size:"sm",children:n.jsx(le,{...f,"data-testid":"experiments-live-pick-draft",children:o})}),e[10]=f,e[11]=o,e[12]=m):m=e[12];let u;return e[13]!==a||e[14]!==i||e[15]!==m?(u=n.jsx(V,{children:n.jsx(V.Content,{children:n.jsx(V.Container,{children:n.jsx(pe,{icon:r,title:a,description:i,buttonComponent:m})})})}),e[13]=a,e[14]=i,e[15]=m,e[16]=u):u=e[16],u}function Tt(l){const e=E.c(27),{orgSlug:t,virtualMcpId:s,branch:d,decofile:r,meta:a}=l,i=z(),f=pt();let o;e[0]!==d||e[1]!==r||e[2]!==t||e[3]!==s?(o={orgSlug:t,virtualMcpId:s,branch:d,decofile:r,blockKey:"experiments"},e[0]=d,e[1]=r,e[2]=t,e[3]=s,e[4]=o):o=e[4];const m=We(o);let u;e[5]!==m.content||e[6]!==m.state?(u=m.state==="ready"?m.content:{},e[5]=m.content,e[6]=m.state,e[7]=u):u=e[7];let c;e[8]!==a||e[9]!==u?(c=Ye(u,a,"experiments"),e[8]=a,e[9]=u,e[10]=c):c=e[10];const x=c;if(x){const h=`experiments.v8.${x}.title`;let b;e[11]!==i||e[12]!==h?(b=i(h),e[11]=i,e[12]=h,e[13]=b):b=e[13];const v=`experiments.v8.${x}.desc`;let j;e[14]!==i||e[15]!==v?(j=i(v),e[14]=i,e[15]=v,e[16]=j):j=e[16];let g;return e[17]!==b||e[18]!==j?(g=n.jsx(Ve,{title:b,description:j}),e[17]=b,e[18]=j,e[19]=g):g=e[19],g}let p;return e[20]!==r||e[21]!==f.name||e[22]!==f.set||e[23]!==t||e[24]!==m||e[25]!==s?(p=n.jsx(jt,{orgSlug:t,virtualMcpId:s,published:m,draft:r,mode:"full",openName:f.name,onOpen:f.set}),e[20]=r,e[21]=f.name,e[22]=f.set,e[23]=t,e[24]=m,e[25]=s,e[26]=p):p=e[26],p}function Ct(){const l=E.c(2);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=K("flex flex-col gap-3",re),l[0]=e):e=l[0];let t;return l[1]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(V,{children:n.jsx(V.Content,{children:n.jsxs("div",{className:e,"data-testid":"experiments-skeleton","aria-busy":"true",children:[n.jsx(W,{className:"h-6 w-40"}),n.jsx(W,{className:"h-16 w-full"}),n.jsx(W,{className:"h-16 w-full"})]})})}),l[1]=t):t=l[1],t}function fe(l){const e=E.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(Y,{size:28,className:"text-muted-foreground"}),e[0]=t):t=e[0];let s;return e[1]!==l?(s=n.jsx(Re,{icon:t,...l}),e[1]=l,e[2]=s):s=e[2],s}function Wt(l){const e=E.c(22),{virtualMcpId:t,open:s,live:d}=l,r=z();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Y,{size:28,className:"text-muted-foreground"}),e[0]=a):a=e[0];let i;e[1]!==r?(i=r("experiments.v8.noDraft.title"),e[1]=r,e[2]=i):i=e[2];let f;e[3]!==r?(f=r("experiments.v8.noDraft.desc"),e[3]=r,e[4]=f):f=e[4];let o;e[5]!==r?(o=r("experiments.v8.loadFailed"),e[5]=r,e[6]=o):o=e[6];let m;e[7]!==r?(m=r("sectionsEditor.namedRules.unavailableHint"),e[7]=r,e[8]=m):m=e[8];let u;e[9]!==i||e[10]!==f||e[11]!==o||e[12]!==m?(u={noDraftTitle:i,noDraftDesc:f,loadFailed:o,loadFailedHint:m},e[9]=i,e[10]=f,e[11]=o,e[12]=m,e[13]=u):u=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ct,{}),e[14]=c):c=e[14];let x;e[15]!==d||e[16]!==s?(x=h=>n.jsx(Dt,{...h,open:s,live:d}),e[15]=d,e[16]=s,e[17]=x):x=e[17];let p;return e[18]!==u||e[19]!==x||e[20]!==t?(p=n.jsx(Te,{virtualMcpId:t,icon:a,copy:u,skeleton:c,children:x}),e[18]=u,e[19]=x,e[20]=t,e[21]=p):p=e[21],p}function Dt(l){const e=E.c(88),{orgSlug:t,virtualMcpId:s,branch:d,decofile:r,meta:a,open:i,live:f}=l,o=z(),{openPanel:m}=ft();let u;e[0]!==d||e[1]!==r||e[2]!==a||e[3]!==i||e[4]!==t||e[5]!==s?(u={orgSlug:t,virtualMcpId:s,branch:d,decofile:r,meta:a,open:i},e[0]=d,e[1]=r,e[2]=a,e[3]=i,e[4]=t,e[5]=s,e[6]=u):u=e[6];const c=Ze("experiments",u);let x;e[7]!==d||e[8]!==t||e[9]!==s?(x=rt({orgSlug:t,virtualMcpId:s,branch:d}),e[7]=d,e[8]=t,e[9]=s,e[10]=x):x=e[10];const p=at(x);let h;e[11]!==p?(h=p(ce),e[11]=p,e[12]=h):h=e[12];const b=h,v=ae(r,c.published),j=v.find(N=>N.name===c.openName)??null,g=!c.blocked&&c.openName!==null&&!j,S=i?.clear;let y,k;if(e[13]!==S||e[14]!==g?(y=()=>{g&&S?.()},k=[g,S],e[13]=S,e[14]=g,e[15]=y,e[16]=k):(y=e[15],k=e[16]),xe.useEffect(y,k),c.blocked==="missing"){let N;e[17]!==o?(N=o("experiments.v8.missing.title"),e[17]=o,e[18]=N):N=e[18];let _;e[19]!==o?(_=o("experiments.v8.missing.desc"),e[19]=o,e[20]=_):_=e[20];let M;return e[21]!==N||e[22]!==_?(M=n.jsx(fe,{title:N,description:_}),e[21]=N,e[22]=_,e[23]=M):M=e[23],M}if(c.blocked==="replaced"){let N;e[24]!==o?(N=o("experiments.v8.replaced.title"),e[24]=o,e[25]=N):N=e[25];let _;e[26]!==o?(_=o("experiments.v8.replaced.desc"),e[26]=o,e[27]=_):_=e[27];let M;return e[28]!==N||e[29]!==_?(M=n.jsx(fe,{title:N,description:_}),e[28]=N,e[29]=_,e[30]=M):M=e[30],M}if(c.blocked==="conflict"){let N;e[31]!==o?(N=o("experiments.v8.conflict.title"),e[31]=o,e[32]=N):N=e[32];let _;e[33]!==o?(_=o("experiments.v8.conflict.desc"),e[33]=o,e[34]=_):_=e[34];let M;e[35]!==o?(M=o("sectionsEditor.namedRules.openEditor"),e[35]=o,e[36]=M):M=e[36];let te;e[37]!==m?(te=()=>m("content"),e[37]=m,e[38]=te):te=e[38];let se;e[39]!==te||e[40]!==M?(se={label:M,onClick:te},e[39]=te,e[40]=M,e[41]=se):se=e[41];let oe;return e[42]!==se||e[43]!==N||e[44]!==_?(oe=n.jsx(fe,{title:N,description:_,action:se}),e[42]=se,e[43]=N,e[44]=_,e[45]=oe):oe=e[45],oe}let w;e[46]!==r||e[47]!==c.published?(w=Le(r,c.published),e[46]=r,e[47]=c.published,e[48]=w):w=e[48];const R=w,H=$t(o,v),O=v.length===0,I=!O||R.length>0,P=V;let T;e[49]!==o?(T=o("experiments.v8.intro"),e[49]=o,e[50]=T):T=e[50];let C;e[51]!==O||e[52]!==o||e[53]!==c?(C=O?void 0:n.jsxs(ie,{size:"sm",onClick:()=>c.setCreating(!0),children:[n.jsx(je,{size:16}),o("experiments.v8.new")]}),e[51]=O,e[52]=o,e[53]=c,e[54]=C):C=e[54];let D;e[55]!==T||e[56]!==C?(D=n.jsx(he,{intro:T,actions:C}),e[55]=T,e[56]=C,e[57]=D):D=e[57];let L;e[58]===Symbol.for("react.memo_cache_sentinel")?(L=K("flex flex-col gap-4",re),e[58]=L):L=e[58];const B=O?n.jsx(me,{size:"flush",children:n.jsx(pe,{icon:n.jsx(Y,{size:20}),title:o("experiments.v8.empty.title"),description:o("experiments.v8.empty.desc"),buttonProps:{variant:"outline",children:n.jsxs(n.Fragment,{children:[n.jsx(je,{size:16}),o("experiments.v8.new")]}),onClick:()=>c.setCreating(!0)}})}):n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("p",{className:"text-xs text-muted-foreground",children:H}),n.jsx(me,{size:"flush",className:"gap-0 divide-y divide-border overflow-hidden","data-testid":"experiments-v8-list",children:v.map(N=>{const _=N.name===j?.name;return n.jsx(zt,{row:N,expanded:_,onToggle:()=>c.setOpenName(_?null:N.name),children:_&&n.jsx(Ot,{...et(c,N,{decofile:r,meta:a})},`${N.name}:${b}`)},N.name)})})]});let $;e[59]!==R?($=n.jsx(st,{kind:"experiments",removed:R}),e[59]=R,e[60]=$):$=e[60];let F;e[61]!==O||e[62]!==o?(F=!O&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o("experiments.v8.previewHint")}),e[61]=O,e[62]=o,e[63]=F):F=e[63];let A;e[64]!==r||e[65]!==f||e[66]!==t||e[67]!==I||e[68]!==c||e[69]!==s?(A=I&&f?.({orgSlug:t,virtualMcpId:s,draft:r,published:c.live,openTest:N=>c.setOpenName(N)}),e[64]=r,e[65]=f,e[66]=t,e[67]=I,e[68]=c,e[69]=s,e[70]=A):A=e[70];let U;e[71]!==B||e[72]!==$||e[73]!==F||e[74]!==A?(U=n.jsx(V.Content,{children:n.jsxs("div",{className:L,children:[B,$,F,A]})}),e[71]=B,e[72]=$,e[73]=F,e[74]=A,e[75]=U):U=e[75];const X=tt,J="experiments",Q=c.creating,Z=c.setCreating,q=v.map(Lt);let G;e[76]!==X||e[77]!==q||e[78]!==c.create||e[79]!==c.creating||e[80]!==c.isPending||e[81]!==c.setCreating?(G=n.jsx(X,{kind:J,open:Q,onOpenChange:Z,existingNames:q,pending:c.isPending,onCreate:c.create}),e[76]=X,e[77]=q,e[78]=c.create,e[79]=c.creating,e[80]=c.isPending,e[81]=c.setCreating,e[82]=G):G=e[82];let ee;return e[83]!==P||e[84]!==D||e[85]!==U||e[86]!==G?(ee=n.jsxs(P,{children:[D,U,G]}),e[83]=P,e[84]=D,e[85]=U,e[86]=G,e[87]=ee):ee=e[87],ee}function Lt(l){return l.name}function $t(l,e){const t=a=>e.filter(i=>i.status===a).length,s=t("running"),d=t("everyone"),r=t("off");return[s>0&&l("experiments.v8.count.running",{count:String(s)}),d>0&&l("experiments.v8.count.everyone",{count:String(d)}),r===1&&l("experiments.v8.count.offOne"),r>1&&l("experiments.v8.count.offMany",{count:String(r)})].filter(Boolean).join(" ยท ")}function zt(l){const e=E.c(41),{row:t,expanded:s,onToggle:d,children:r}=l,a=z(),i=$e[t.status];let f;e[0]!==i?(f=K("size-2 shrink-0 rounded-full",i),e[0]=i,e[1]=f):f=e[1];let o;e[2]!==f?(o=n.jsx("span",{"aria-hidden":!0,className:f}),e[2]=f,e[3]=o):o=e[3];let m;e[4]!==s||e[5]!==d||e[6]!==t.name?(m=n.jsx("button",{type:"button",onClick:d,"aria-expanded":s,className:"truncate text-left text-sm font-medium text-foreground after:absolute after:inset-0 focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-ring focus-visible:after:ring-inset",children:t.name}),e[4]=s,e[5]=d,e[6]=t.name,e[7]=m):m=e[7];let u;e[8]!==t.entryState?(u=n.jsx(_e,{kind:"experiments",state:t.entryState}),e[8]=t.entryState,e[9]=u):u=e[9];let c;e[10]!==m||e[11]!==u?(c=n.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[m,u]}),e[10]=m,e[11]=u,e[12]=c):c=e[12];let x;e[13]!==t.share?(x=ve(t.share),e[13]=t.share,e[14]=x):x=e[14];let p;e[15]!==x?(p=n.jsx(De,{arms:x,size:18,thickness:3}),e[15]=x,e[16]=p):p=e[16];const h=String(t.share);let b;e[17]!==a||e[18]!==h?(b=a("sectionsEditor.namedRulePicker.shareOfVisitors",{share:h}),e[17]=a,e[18]=h,e[19]=b):b=e[19];let v;e[20]!==b||e[21]!==p?(v=n.jsxs("span",{className:"hidden w-36 shrink-0 items-center gap-2 text-xs text-muted-foreground sm:flex",children:[p,b]}),e[20]=b,e[21]=p,e[22]=v):v=e[22];let j;e[23]!==t.status||e[24]!==a?(j=ze(a,t.status),e[23]=t.status,e[24]=a,e[25]=j):j=e[25];let g;e[26]!==j?(g=n.jsx("span",{className:"w-24 shrink-0 text-xs text-muted-foreground",children:j}),e[26]=j,e[27]=g):g=e[27];const S=s&&"rotate-90";let y;e[28]!==S?(y=K("shrink-0 text-muted-foreground transition-transform",S),e[28]=S,e[29]=y):y=e[29];let k;e[30]!==y?(k=n.jsx(we,{size:16,"aria-hidden":!0,className:y}),e[30]=y,e[31]=k):k=e[31];let w;e[32]!==v||e[33]!==g||e[34]!==k||e[35]!==o||e[36]!==c?(w=n.jsxs("div",{className:"group relative flex items-center gap-4 px-5 py-4 transition-colors hover:bg-muted/50",children:[o,c,v,g,k]}),e[32]=v,e[33]=g,e[34]=k,e[35]=o,e[36]=c,e[37]=w):w=e[37];let R;return e[38]!==r||e[39]!==w?(R=n.jsxs("div",{"data-testid":"experiment-v8-row",children:[w,r]}),e[38]=r,e[39]=w,e[40]=R):R=e[40],R}const ce=dt("experiments").blockKey;function ye(l){const e=E.c(22),{color:t,label:s,title:d,share:r}=l,a=z();let i;e[0]!==t?(i=n.jsx("span",{"aria-hidden":!0,className:"size-2 shrink-0 rounded-full",style:{backgroundColor:t}}),e[0]=t,e[1]=i):i=e[1];let f;e[2]!==s?(f=n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let o;e[4]!==d?(o=n.jsx("p",{className:"truncate text-sm font-medium",children:d}),e[4]=d,e[5]=o):o=e[5];let m;e[6]!==f||e[7]!==o?(m=n.jsxs("div",{className:"min-w-0 flex-1",children:[f,o]}),e[6]=f,e[7]=o,e[8]=m):m=e[8];let u;e[9]!==r?(u=n.jsxs("p",{className:"text-sm font-semibold tabular-nums",children:[r,"%"]}),e[9]=r,e[10]=u):u=e[10];let c;e[11]!==a?(c=a("experiments.v8.versions.ofTraffic"),e[11]=a,e[12]=c):c=e[12];let x;e[13]!==c?(x=n.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[13]=c,e[14]=x):x=e[14];let p;e[15]!==u||e[16]!==x?(p=n.jsxs("div",{className:"shrink-0 text-right",children:[u,x]}),e[15]=u,e[16]=x,e[17]=p):p=e[17];let h;return e[18]!==i||e[19]!==m||e[20]!==p?(h=n.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-background px-3 py-2.5",children:[i,m,p]}),e[18]=i,e[19]=m,e[20]=p,e[21]=h):h=e[21],h}function Ot(l){const e=E.c(80),{row:t,decofile:s,pending:d,holdsCopy:r,onSave:a}=l,i=z(),[f,o]=xe.useState(null);let m;e[0]!==s?(m=q=>o(G=>({share:q,basis:G?G.basis:s[ce]})),e[0]=s,e[1]=m):m=e[1];const u=m,c=f?.share??t.share,x=c!==t.share;let p;e[2]!==c?(p=lt(ve(c)),e[2]=c,e[3]=p):p=e[3];const[h,b]=p;let v;e[4]!==s||e[5]!==f||e[6]!==r||e[7]!==a||e[8]!==t.name||e[9]!==c?(v=()=>{const q=it(s,"experiments",t.name,c),G=f?f.basis:s[ce];a(q&&r?{...q,basis:{[ce]:G}}:q).then(ee=>ee&&o(null))},e[4]=s,e[5]=f,e[6]=r,e[7]=a,e[8]=t.name,e[9]=c,e[10]=v):v=e[10];const j=v;let g;e[11]!==i?(g=i("experiments.v8.shareTitle"),e[11]=i,e[12]=g):g=e[12];let S;e[13]!==g?(S=n.jsx("h3",{className:"text-sm font-medium",children:g}),e[13]=g,e[14]=S):S=e[14];let y;e[15]!==i?(y=i("experiments.v8.shareLabel"),e[15]=i,e[16]=y):y=e[16];let k;e[17]!==i?(k=i("experiments.v8.split.inTest"),e[17]=i,e[18]=k):k=e[18];let w;e[19]!==i?(w=i("experiments.v8.split.rest"),e[19]=i,e[20]=w):w=e[20];let R;e[21]!==i?(R=i("experiments.v8.split.center"),e[21]=i,e[22]=R):R=e[22];let H;e[23]!==d||e[24]!==u||e[25]!==c||e[26]!==y||e[27]!==k||e[28]!==w||e[29]!==R?(H=n.jsx(Ce,{value:c,onChange:u,sliderLabel:y,inTestLabel:k,restLabel:w,centerLabel:R,disabled:d,compact:!0}),e[23]=d,e[24]=u,e[25]=c,e[26]=y,e[27]=k,e[28]=w,e[29]=R,e[30]=H):H=e[30];let O;e[31]!==i?(O=i("experiments.v8.shareHint"),e[31]=i,e[32]=O):O=e[32];let I;e[33]!==O?(I=n.jsx("p",{className:"text-xs text-muted-foreground",children:O}),e[33]=O,e[34]=I):I=e[34];let P;e[35]!==t.publishedShare||e[36]!==i?(P=t.publishedShare!==void 0&&n.jsx("p",{className:"text-xs text-muted-foreground",children:i("experiments.v8.publishedShare",{share:String(t.publishedShare)})}),e[35]=t.publishedShare,e[36]=i,e[37]=P):P=e[37];let T;e[38]!==d||e[39]!==t.share||e[40]!==j||e[41]!==x||e[42]!==i?(T=x&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ie,{size:"sm",disabled:d,onClick:j,children:i("experiments.v8.save")}),n.jsx(ie,{size:"sm",variant:"ghost",disabled:d,onClick:()=>o(null),children:i("experiments.v8.split.reset",{share:String(t.share)})})]}),e[38]=d,e[39]=t.share,e[40]=j,e[41]=x,e[42]=i,e[43]=T):T=e[43];let C;e[44]!==I||e[45]!==P||e[46]!==T||e[47]!==S||e[48]!==H?(C=n.jsxs("section",{className:"flex flex-col gap-3",children:[S,H,I,P,T]}),e[44]=I,e[45]=P,e[46]=T,e[47]=S,e[48]=H,e[49]=C):C=e[49];let D;e[50]!==i?(D=i("experiments.v8.versions.title"),e[50]=i,e[51]=D):D=e[51];let L;e[52]!==D?(L=n.jsx("h3",{className:"text-sm font-medium",children:D}),e[52]=D,e[53]=L):L=e[53];let B;e[54]!==i?(B=i("experiments.v8.versions.test"),e[54]=i,e[55]=B):B=e[55];let $;e[56]!==h||e[57]!==t.name||e[58]!==c||e[59]!==B?($=n.jsx(ye,{color:h,label:B,title:t.name,share:c}),e[56]=h,e[57]=t.name,e[58]=c,e[59]=B,e[60]=$):$=e[60];let F;e[61]!==i?(F=i("experiments.v8.versions.control"),e[61]=i,e[62]=F):F=e[62];let A;e[63]!==i?(A=i("experiments.v8.versions.published"),e[63]=i,e[64]=A):A=e[64];const U=100-c;let X;e[65]!==b||e[66]!==F||e[67]!==A||e[68]!==U?(X=n.jsx(ye,{color:b,label:F,title:A,share:U}),e[65]=b,e[66]=F,e[67]=A,e[68]=U,e[69]=X):X=e[69];let J;e[70]!==l?(J=n.jsx("div",{className:"mt-auto flex justify-end pt-1",children:n.jsx(nt,{kind:"experiments",detail:l})}),e[70]=l,e[71]=J):J=e[71];let Q;e[72]!==L||e[73]!==$||e[74]!==X||e[75]!==J?(Q=n.jsxs("section",{className:"flex flex-col gap-3",children:[L,$,X,J]}),e[72]=L,e[73]=$,e[74]=X,e[75]=J,e[76]=Q):Q=e[76];let Z;return e[77]!==C||e[78]!==Q?(Z=n.jsxs("div",{className:"grid gap-6 border-t border-border bg-muted/30 px-5 py-5 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)]","data-testid":"experiment-v8-detail",children:[C,Q]}),e[77]=C,e[78]=Q,e[79]=Z):Z=e[79],Z}function It(l,e){return l&&e!=="legacy"?"v2":"legacy"}function Yt(l){return l.v8?"v8":It(l.flagEnabled,l.ui)}function Zt(l,e){return l||e}function es(l){return l?"app":"monitor"}export{Wt as E,Qt as P,jt as a,Zt as b,es as e,Yt as p,pt as u};