@marimo-team/frontend 0.19.10-dev45 → 0.19.10-dev47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{edit-page-CoD4FUPp.js → edit-page-ab-pH9y6.js} +1 -1
- package/dist/assets/index-CeUwN_0i.css +2 -0
- package/dist/assets/{index-WA45mCZ3.js → index-DvbyIyj6.js} +2 -2
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +1 -1
- package/dist/assets/index-DG3GipFF.css +0 -2
|
@@ -10,4 +10,4 @@ var lf=Object.defineProperty;var sf=(Je,Qe,Ct)=>Qe in Je?lf(Je,Qe,{enumerable:!0
|
|
|
10
10
|
hover/column:bg-[var(--slate-3)] dark:hover/column:bg-[var(--slate-5)]
|
|
11
11
|
hover/column:hover:bg-primary/60 dark:hover/column:hover:bg-primary/60`})}var Kl=U();const jg=t=>{let e=(0,Kl.c)(10),{width:r}=t,{banners:n}=t0(),{removeBanner:a}=Yf();if(n.length===0)return null;let i=r==="columns"&&"w-full max-w-[80vw]",l;e[0]===i?l=e[1]:(l=Z("flex flex-col gap-4 mb-5 print:hidden",i),e[0]=i,e[1]=l);let s;if(e[2]!==n||e[3]!==a){let u;e[5]===a?u=e[6]:(u=m=>(0,o.jsxs)(Et,{kind:m.variant||"info",className:"flex flex-col rounded p-3",children:[(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsxs)("span",{className:"font-bold text-lg flex items-center mb-2",children:[(0,o.jsx)(er,{className:"w-5 h-5 inline-block mr-2"}),m.title]}),(0,o.jsx)(oe,{"data-testid":"remove-banner-button",variant:"text",size:"icon",onClick:()=>a(m.id),children:(0,o.jsx)(Ge,{className:"w-5 h-5"})})]}),(0,o.jsxs)("div",{className:"flex justify-between items-end",children:[(0,o.jsx)("span",{children:gb({html:m.description})}),m.action==="restart"&&(0,o.jsx)(wg,{})]})]},m.id),e[5]=a,e[6]=u),s=n.map(u),e[2]=n,e[3]=a,e[4]=s}else s=e[4];let c;return e[7]!==l||e[8]!==s?(c=(0,o.jsx)("div",{className:l,children:s}),e[7]=l,e[8]=s,e[9]=c):c=e[9],c};var wg=()=>{let t=(0,Kl.c)(3),e=Fx(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,o.jsx)(_1,{className:"w-3 h-3 mr-2"}),t[0]=r):r=t[0];let n;return t[1]===e?n=t[2]:(n=(0,o.jsxs)(oe,{"data-testid":"restart-session-button",variant:"link",size:"xs",onClick:e,children:[r,"Restart"]}),t[1]=e,t[2]=n),n},Eg=U(),Cg=dn(t=>{let e=t(Oa);for(let r of e.cellIds.inOrderIds){let n=e.cellRuntime[r];if(n.status==="idle"&&n.consoleOutputs.some(a=>a.channel==="stdin"&&a.response===void 0))return!0}return!1});const Sg=()=>{let t=(0,Eg.c)(3),e=Y(Cg),r=Tg;if(!e)return null;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)("div",{className:"flex justify-between",children:(0,o.jsx)("span",{className:"font-bold text-lg flex items-center mb-1",children:"Program waiting for input"})}),t[0]=n):n=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(xb,{className:"inline",children:"stdin"}),t[1]=a):a=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)(Tn,{milliseconds:2e3,children:(0,o.jsx)("div",{className:"flex flex-col gap-4 mb-5 fixed top-5 left-1/2 transform -translate-x-1/2 z-200 opacity-95",children:(0,o.jsxs)(Et,{kind:"info",className:"flex flex-col rounded py-2 px-4 animate-in slide-in-from-top w-fit",children:[n,(0,o.jsx)("div",{className:"flex flex-col gap-4 justify-between items-start text-muted-foreground text-base",children:(0,o.jsx)("div",{children:(0,o.jsxs)("p",{children:["The program is still running, but blocked on"," ",a,".",(0,o.jsx)(oe,{variant:"link",className:"h-auto font-normal",onClick:r,children:"Jump to the cell"})]})})})]})})}),t[2]=i):i=t[2],i};function Tg(){let t=document.querySelector("[data-stdin-blocking]");t?(t.scrollIntoView({behavior:"smooth",block:"center"}),requestAnimationFrame(()=>{t.focus()})):Fe.error("No element with data-stdin-blocking found")}function _g(){hs(Ig)}function Ig(){let t=setTimeout(Ng,100);return()=>clearTimeout(t)}function Ng(){requestAnimationFrame($g)}function $g(){if(!document.hasFocus())return;let t=window.location.hash,e=$x(t);if(e)zg(e);else try{Ol()}catch(r){let n=r;Fe.warn("Error focusing first editor",n)}}function Ol(){var n,a;let{cellIds:t,cellData:e,cellHandles:r}=xn();for(let i of t.iterateTopLevelIds){let l=r[i];if(!((n=e[i])!=null&&n.config.hide_code)&&((a=l==null?void 0:l.current)!=null&&a.editorView)){l.current.editorView.focus();return}}}var Rl=!1;function zg(t){var r,n;if(Rl)return;let e=document.querySelector(`[data-cell-name="${t}"]`);if(e){if(e.scrollIntoView({behavior:"smooth",block:"start"}),Rl=!0,e instanceof HTMLElement){e.focus();let{cellHandles:a}=xn(),i=e.dataset.cellId;if(!i){Fe.error(`Missing cellId for cell with name ${t}`);return}let l=(n=(r=a[i])==null?void 0:r.current)==null?void 0:n.editorView;l&&l.focus()}}else Fe.warn(`Cannot focus cell with name ${t} because it was not found`),Ol()}var qr=U();const Ag=t=>{let e=(0,qr.c)(8),r=Y(Of),n=t.appConfig.width==="columns",a;e[0]===t?a=e[1]:(a=(0,o.jsx)(Bg,{...t}),e[0]=t,e[1]=a);let i;e[2]!==r||e[3]!==a?(i=(0,o.jsx)(il,{"data-testid":"column-container",items:r,strategy:Hp,children:a}),e[2]=r,e[3]=a,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=(0,o.jsx)(gg,{multiColumn:n,children:i}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l};var Bg=t=>{let e=(0,qr.c)(31),{mode:r,userConfig:n,appConfig:a}=t,i=qe(),{theme:l}=G1(),{toggleSidebarPanel:s}=hn();_g(),Se("global.focusTop",i.focusTopCell),Se("global.focusBottom",i.focusBottomCell),Se("global.toggleSidebar",s),Se("global.foldCode",i.foldAll),Se("global.unfoldCode",i.unfoldAll),Se("global.formatAll",Og),Se("cell.hideCode",kr.NOOP),Se("cell.format",kr.NOOP);let c=ls(),u=bf(),m=c.getColumnIds(),d=i.scrollToTarget,p;e[0]!==u||e[1]!==d?(p=()=>{u!==null&&d()},e[0]=u,e[1]=d,e[2]=p):p=e[2];let g;e[3]!==c||e[4]!==u||e[5]!==d?(g=[c,u,d],e[3]=c,e[4]=u,e[5]=d,e[6]=g):g=e[6],(0,v.useEffect)(p,g);let x=dx,b,f,y,k;e[7]===Symbol.for("react.memo_cache_sentinel")?(b=(0,o.jsx)(Gm,{}),f=(0,o.jsx)(om,{}),y=(0,o.jsx)(Sg,{}),k=(0,o.jsx)(Oc,{}),e[7]=b,e[8]=f,e[9]=y,e[10]=k):(b=e[7],f=e[8],y=e[9],k=e[10]);let h;e[11]===a.width?h=e[12]:(h=(0,o.jsx)(jg,{width:a.width}),e[11]=a.width,e[12]=h);let D;e[13]===c.idLength?D=e[14]:(D=c.idLength===0&&(0,o.jsx)(Ei,{}),e[13]=c.idLength,e[14]=D);let j=a.width==="columns"&&"grid grid-flow-col auto-cols-min gap-6",w;e[15]===j?w=e[16]:(w=Z(j),e[15]=j,e[16]=w);let C=m.map((T,N)=>(0,o.jsx)(Pg,{columnId:T,index:N,columnsLength:m.length,appConfig:a,mode:r,userConfig:n,theme:l},T)),S;e[17]!==w||e[18]!==C?(S=(0,o.jsx)("div",{className:w,children:C}),e[17]=w,e[18]=C,e[19]=S):S=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=(0,o.jsx)(_b,{}),e[20]=_):_=e[20];let E;return e[21]!==x||e[22]!==a||e[23]!==h||e[24]!==D||e[25]!==S||e[26]!==b||e[27]!==f||e[28]!==y||e[29]!==k?(E=(0,o.jsxs)(x,{className:"pb-[40vh]",invisible:!1,appConfig:a,innerClassName:"pr-4",children:[b,f,y,k,h,D,S,_]}),e[21]=x,e[22]=a,e[23]=h,e[24]=D,e[25]=S,e[26]=b,e[27]=f,e[28]=y,e[29]=k,e[30]=E):E=e[30],E},Pg=t=>{let e=(0,qr.c)(54),{columnId:r,index:n,columnsLength:a,appConfig:i,mode:l,userConfig:s,theme:c}=t,u=ls(),m,d,p,g,x,b,f,y,k,h,D,j,w,C;if(e[0]!==i.width||e[1]!==u||e[2]!==r||e[3]!==a||e[4]!==n||e[5]!==l||e[6]!==c||e[7]!==s){let E=u.get(r);En(E,`Expected column for: ${r}`);let T;e[22]===u?T=e[23]:(T=u.hasOnlyOneId(),e[22]=u,e[23]=T);let N=T,$;e[24]===u.inOrderIds?$=e[25]:($=u.inOrderIds.includes(Bf),e[24]=u.inOrderIds,e[25]=$);let z=$;d=Pl,D=r,j=n,w=n>0,C=n<a-1,g=i.width,x=a>1;let P=i.width==="columns"&&"opacity-0 group-hover/column:opacity-100",I;e[26]===P?I=e[27]:(I=Z(P),e[26]=P,e[27]=I),e[28]!==r||e[29]!==I?(b=(0,o.jsx)(Kg,{columnId:r,className:I}),e[28]=r,e[29]=I,e[30]=b):b=e[30],m=il,p=`column-${n+1}`,f=E.topLevelIds,y=Up,e[31]!==z||e[32]!==n||e[33]!==l||e[34]!==c||e[35]!==s?(k=n===0&&z&&(0,o.jsx)(Il,{cellId:"setup",theme:c,showPlaceholder:!1,canDelete:!0,mode:l,userConfig:s,isCollapsed:!1,collapseCount:0,canMoveX:!1},"setup"),e[31]=z,e[32]=n,e[33]=l,e[34]=c,e[35]=s,e[36]=k):k=e[36],h=E.topLevelIds.map(A=>A==="setup"?null:(0,o.jsx)(Il,{cellId:A,theme:c,showPlaceholder:N,canDelete:!N,mode:l,userConfig:s,isCollapsed:E.isCollapsed(A),collapseCount:E.getCount(A),canMoveX:i.width==="columns"},A)),e[0]=i.width,e[1]=u,e[2]=r,e[3]=a,e[4]=n,e[5]=l,e[6]=c,e[7]=s,e[8]=m,e[9]=d,e[10]=p,e[11]=g,e[12]=x,e[13]=b,e[14]=f,e[15]=y,e[16]=k,e[17]=h,e[18]=D,e[19]=j,e[20]=w,e[21]=C}else m=e[8],d=e[9],p=e[10],g=e[11],x=e[12],b=e[13],f=e[14],y=e[15],k=e[16],h=e[17],D=e[18],j=e[19],w=e[20],C=e[21];let S;e[37]!==m||e[38]!==p||e[39]!==f||e[40]!==y||e[41]!==k||e[42]!==h?(S=(0,o.jsxs)(m,{id:p,items:f,strategy:y,children:[k,h]}),e[37]=m,e[38]=p,e[39]=f,e[40]=y,e[41]=k,e[42]=h,e[43]=S):S=e[43];let _;return e[44]!==d||e[45]!==g||e[46]!==x||e[47]!==b||e[48]!==S||e[49]!==D||e[50]!==j||e[51]!==w||e[52]!==C?(_=(0,o.jsx)(d,{columnId:D,index:j,canMoveLeft:w,canMoveRight:C,width:g,canDelete:x,footer:b,children:S}),e[44]=d,e[45]=g,e[46]=x,e[47]=b,e[48]=S,e[49]=D,e[50]=j,e[51]=w,e[52]=C,e[53]=_):_=e[53],_},Kg=t=>{let e=(0,qr.c)(19),{columnId:r,className:n}=t,{createNewCell:a}=qe(),[i,l]=Sx(!1),s=Y(js),c=Y(Cs),{handleClick:u}=Ha(),m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=Z("mb-0 rounded-none sm:px-4 md:px-5 lg:px-8 tracking-wide no-wrap whitespace-nowrap","font-semibold opacity-70 hover:opacity-90 uppercase text-xs"),e[0]=m):m=e[0];let d=m,p;e[1]!==s||e[2]!==c||e[3]!==r||e[4]!==a||e[5]!==u||e[6]!==i||e[7]!==l?(p=()=>i?(0,o.jsx)(Dx,{onClose:l.toggle}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(oe,{className:d,variant:"text",size:"sm",disabled:!c,onClick:()=>a({cellId:{type:"__end__",columnId:r},before:!1}),children:[(0,o.jsx)(Du,{className:"mr-2 size-4 shrink-0"}),"Python"]}),(0,o.jsxs)(oe,{className:d,variant:"text",size:"sm",disabled:!c,onClick:()=>{Fn({autoInstantiate:!0,createNewCell:a}),a({cellId:{type:"__end__",columnId:r},before:!1,code:pn.markdown.defaultCode,hideCode:!0})},children:[(0,o.jsx)(ku,{className:"mr-2 size-4 shrink-0"}),"Markdown"]}),(0,o.jsxs)(oe,{className:d,variant:"text",size:"sm",disabled:!c,onClick:()=>{Fn({autoInstantiate:!0,createNewCell:a}),a({cellId:{type:"__end__",columnId:r},before:!1,code:pn.sql.defaultCode})},children:[(0,o.jsx)(ts,{className:"mr-2 size-4 shrink-0"}),"SQL"]}),(0,o.jsx)(Q,{content:s?null:(0,o.jsx)("span",{children:"AI provider not found or Edit model not selected"}),delayDuration:100,asChild:!1,children:(0,o.jsxs)(oe,{className:d,variant:"text",size:"sm",disabled:!c,onClick:s?l.toggle:()=>u("ai","ai-providers"),children:[(0,o.jsx)(zn,{className:"mr-2 size-4 shrink-0"}),"Generate with AI"]})})]}),e[1]=s,e[2]=c,e[3]=r,e[4]=a,e[5]=u,e[6]=i,e[7]=l,e[8]=p):p=e[8];let g=p,x=!i&&"w-fit shadow-sm-solid-shade",b=i&&"w-full max-w-4xl shadow-md-solid-shade shadow-(color:--blue-3)",f=i&&"opacity-100",y;e[9]!==n||e[10]!==x||e[11]!==b||e[12]!==f?(y=Z("border border-border rounded transition-all duration-200 overflow-hidden divide-x divide-border flex",x,b,n,f),e[9]=n,e[10]=x,e[11]=b,e[12]=f,e[13]=y):y=e[13];let k;e[14]===g?k=e[15]:(k=g(),e[14]=g,e[15]=k);let h;return e[16]!==y||e[17]!==k?(h=(0,o.jsx)("div",{className:"flex justify-center mt-4 pt-6 pb-32 group gap-4 w-full print:hidden",children:(0,o.jsx)("div",{className:y,children:k})}),e[16]=y,e[17]=k,e[18]=h):h=e[18],h};function Og(){Vf()}var Rg=qf(t=>cx().syncCellIds(t),400);const Mg={onCellIdsChange:(t,e)=>{bt.get(J1)||t.isEmpty()||e.isEmpty()||cf(t.inOrderIds,e.inOrderIds)||Rg({cellIds:t.inOrderIds})}};var Fg=U();const Ml=t=>{let e=(0,Fg.c)(73),{userConfig:r,appConfig:n,hideControls:a}=t,i=a===void 0?!1:a;uf(Tf,Mg.onCellIdsChange);let{setCells:l,mergeAllColumns:s,collapseAllCells:c,expandAllCells:u}=qe(),m=Y(Z1),d=Y(gf),p=Y(Af),g=bb(),x=lt(m1),{sendComponentValues:b,sendInterrupt:f}=rt(),y=m.mode==="edit",k=m.mode==="present",h=Y(If),D;e[0]===b?D=e[1]:(D=()=>(Hs.INSTANCE.start(b),Vg),e[0]=b,e[1]=D);let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=[],e[2]=j):j=e[2],(0,v.useEffect)(D,j);let w=r.runtime.auto_instantiate,C;e[3]!==l||e[4]!==x?(C=(ye,he)=>{l(ye),x({names:ye.map(Lg),codes:ye.map(Hg),configs:ye.map(Wg),layout:he})},e[3]=l,e[4]=x,e[5]=C):C=e[5];let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=X1(),e[6]=S):S=e[6];let _;e[7]!==C||e[8]!==r.runtime.auto_instantiate?(_={autoInstantiate:w,setCells:C,sessionId:S},e[7]=C,e[8]=r.runtime.auto_instantiate,e[9]=_):_=e[9];let{connection:E}=v1(_),T,N;e[10]!==n.app_title||e[11]!==g?(T=()=>{document.title=n.app_title||Js.basename(g??"")||"Untitled Notebook"},N=[n.app_title,g],e[10]=n.app_title,e[11]=g,e[12]=T,e[13]=N):(T=e[12],N=e[13]),(0,v.useEffect)(T,N);let $=yn(n.width),z;e[14]!==n.width||e[15]!==s||e[16]!==$?(z=()=>{$==="columns"&&n.width!=="columns"&&s()},e[14]=n.width,e[15]=s,e[16]=$,e[17]=z):z=e[17];let P;e[18]!==n.width||e[19]!==s||e[20]!==d||e[21]!==$?(P=[n.width,$,s,d],e[18]=n.width,e[19]=s,e[20]=d,e[21]=$,e[22]=P):P=e[22],(0,v.useEffect)(z,P);let I=hb(),A=fb(),B=Kx(),R;e[23]===I?R=e[24]:(R=()=>{I()},e[23]=I,e[24]=R),Se("global.runStale",R);let K;e[25]===f?K=e[26]:(K=()=>{f()},e[25]=f,e[26]=K),Se("global.interrupt",K);let M;e[27]===B?M=e[28]:(M=()=>{B()},e[27]=B,e[28]=M),Se("global.hideCode",M);let H;e[29]===A?H=e[30]:(H=()=>{A()},e[29]=A,e[30]=H),Se("global.runAll",H);let O;e[31]===c?O=e[32]:(O=()=>{c()},e[31]=c,e[32]=O),Se("global.collapseAllSections",O);let F;e[33]===u?F=e[34]:(F=()=>{u()},e[33]=u,e[34]=F),Se("global.expandAllSections",F);let L;e[35]!==n||e[36]!==r||e[37]!==m.mode?(L=(0,o.jsx)(Ag,{mode:m.mode,userConfig:r,appConfig:n}),e[35]=n,e[36]=r,e[37]=m.mode,e[38]=L):L=e[38];let V=L,G=n.width,W;e[39]===Symbol.for("react.memo_cache_sentinel")?(W=Z("pt-4 sm:pt-12 pb-2 mb-4 print:hidden z-50","sticky left-0"),e[39]=W):W=e[39];let q;e[40]!==g||e[41]!==y?(q=y&&(0,o.jsx)("div",{className:"flex items-center justify-center container",children:(0,o.jsx)(sd,{filename:g})}),e[40]=g,e[41]=y,e[42]=q):q=e[42];let ee;e[43]!==E||e[44]!==q?(ee=(0,o.jsx)(j1,{connection:E,className:W,children:q}),e[43]=E,e[44]=q,e[45]=ee):ee=e[45];let te;e[46]!==n||e[47]!==V||e[48]!==p||e[49]!==m.mode?(te=p&&(0,o.jsx)(b1,{appConfig:n,mode:m.mode,children:V}),e[46]=n,e[47]=V,e[48]=p,e[49]=m.mode,e[50]=te):te=e[50];let re;e[51]===p?re=e[52]:(re=!p&&(0,o.jsx)(Ei,{}),e[51]=p,e[52]=re);let ae;e[53]!==n.width||e[54]!==E||e[55]!==h||e[56]!==ee||e[57]!==te||e[58]!==re?(ae=(0,o.jsxs)(y1,{connection:E,isRunning:h,width:G,children:[ee,te,re]}),e[53]=n.width,e[54]=E,e[55]=h,e[56]=ee,e[57]=te,e[58]=re,e[59]=ae):ae=e[59];let J;e[60]===Symbol.for("react.memo_cache_sentinel")?(J=(0,o.jsx)(bd,{}),e[60]=J):J=e[60];let se;e[61]!==n||e[62]!==E||e[63]!==i||e[64]!==k||e[65]!==h||e[66]!==I||e[67]!==f||e[68]!==B?(se=!i&&(0,o.jsx)(Bn,{children:(0,o.jsx)(rd,{presenting:k,onTogglePresenting:B,onInterrupt:f,onRun:I,connectionState:E.state,running:h,appConfig:n})}),e[61]=n,e[62]=E,e[63]=i,e[64]=k,e[65]=h,e[66]=I,e[67]=f,e[68]=B,e[69]=se):se=e[69];let ge;return e[70]!==ae||e[71]!==se?(ge=(0,o.jsxs)(o.Fragment,{children:[ae,J,se]}),e[70]=ae,e[71]=se,e[72]=ge):ge=e[72],ge};function Vg(){Hs.INSTANCE.stop()}function Lg(t){return t.name}function Hg(t){return t.code}function Wg(t){return t.config}var Ug=U();const ht=(0,v.forwardRef)((t,e)=>{let r=(0,Ug.c)(18),n,a,i,l,s;r[0]===t?(n=r[1],a=r[2],i=r[3],l=r[4],s=r[5]):({children:n,tooltip:s,selected:l,className:a,...i}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i,r[4]=l,r[5]=s);let c=!l&&"hover:bg-(--sage-3)",u=l&&"bg-(--sage-4)",m;r[6]!==a||r[7]!==c||r[8]!==u?(m=Z("h-full flex items-center p-2 text-sm shadow-inset font-mono cursor-pointer rounded",c,u,a),r[6]=a,r[7]=c,r[8]=u,r[9]=m):m=r[9];let d;r[10]!==n||r[11]!==e||r[12]!==i||r[13]!==m?(d=(0,o.jsx)("div",{ref:e,className:m,...i,children:n}),r[10]=n,r[11]=e,r[12]=i,r[13]=m,r[14]=d):d=r[14];let p=d;if(s){let g;return r[15]!==p||r[16]!==s?(g=(0,o.jsx)(Q,{content:s,side:"top",delayDuration:200,children:p}),r[15]=p,r[16]=s,r[17]=g):g=r[17],g}return p});ht.displayName="FooterItem";var qg=U();const Xg=()=>{var g,x;let t=(0,qg.c)(17),e=Y(P0),r=Y(js),n=((g=e==null?void 0:e.models)==null?void 0:g.chat_model)||"openai/gpt-4o",a=((x=e==null?void 0:e.models)==null?void 0:x.edit_model)||n,{handleClick:i}=Ha();if(!r){let b;t[0]===i?b=t[1]:(b=()=>i("ai"),t[0]=i,t[1]=b);let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)(zn,{className:"h-4 w-4 opacity-60"}),t[2]=f):f=t[2];let y;return t[3]===b?y=t[4]:(y=(0,o.jsx)(ht,{tooltip:"Assist is disabled",selected:!1,onClick:b,"data-testid":"footer-ai-disabled",children:f}),t[3]=b,t[4]=y),y}let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)("b",{children:"Chat model:"}),t[5]=l):l=t[5];let s,c;t[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)("br",{}),c=(0,o.jsx)("b",{children:"Edit model:"}),t[6]=s,t[7]=c):(s=t[6],c=t[7]);let u;t[8]!==n||t[9]!==a?(u=(0,o.jsxs)(o.Fragment,{children:[l," ",n,s,c," ",a]}),t[8]=n,t[9]=a,t[10]=u):u=t[10];let m;t[11]===i?m=t[12]:(m=()=>i("ai"),t[11]=i,t[12]=m);let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(zn,{className:"h-4 w-4"}),t[13]=d):d=t[13];let p;return t[14]!==u||t[15]!==m?(p=(0,o.jsx)(ht,{tooltip:u,onClick:m,selected:!1,"data-testid":"footer-ai-enabled",children:d}),t[14]=u,t[15]=m,t[16]=p):p=t[16],p};var Gg=3e4;const Fl=dn("connecting"),Vl=()=>{let t=Y(yt).state,e=L0(),r=Es(),n=lt(Fl),{isFetching:a,error:i,data:l,refetch:s}=Mn(async()=>{if(!nr(t)){n("disconnected");return}if(jr())return n("healthy"),{isHealthy:!0,lastChecked:new Date,error:void 0};try{let d=await e.isHealthy();return n(d?"healthy":"unhealthy"),{isHealthy:d,lastChecked:new Date,error:void 0}}catch(d){return n("unhealthy"),{isHealthy:!1,lastChecked:new Date,error:d instanceof Error?d.message:"Unknown error"}}},[e,t]);yo(s,{delayMs:nr(t)?Gg:null,whenVisible:!0});let c=()=>Ya(t)?"Not connected to a runtime":[Uf(t.toLowerCase()),l!=null&&l.lastChecked?l.isHealthy?"\u2713 Healthy":"\u2717 Unhealthy":"Health: Unknown",i?`Error: ${i}`:""].filter(Boolean).join(`
|
|
12
12
|
`),u=()=>a||M0(t)?(0,o.jsx)(Cr,{size:"small"}):V0(t)?(0,o.jsx)(Cr,{className:"text-destructive",size:"small"}):nr(t)?l!=null&&l.isHealthy?(0,o.jsx)(oo,{className:"w-4 h-4 text-(--green-9)"}):l!=null&&l.lastChecked?(0,o.jsx)(er,{className:"w-4 h-4 text-(--yellow-9)"}):(0,o.jsx)(oo,{className:"w-4 h-4"}):Ya(t)?(0,o.jsx)(_n,{className:"w-4 h-4"}):(0,o.jsx)(_n,{className:"w-4 h-4 text-red-500"}),m=()=>{Ya(t)?r():s()};return(0,o.jsx)(Q,{content:(0,o.jsxs)("div",{className:"text-sm whitespace-pre-line",children:[c(),nr(t)&&(0,o.jsx)("div",{className:"mt-2 text-xs text-muted-foreground",children:"Click to refresh health status"})]}),"data-testid":"footer-backend-status",children:(0,o.jsxs)("button",{type:"button",onClick:m,className:"p-1 hover:bg-accent rounded flex items-center gap-1.5 text-xs text-muted-foreground","data-testid":"backend-status",children:[u(),(0,o.jsx)("span",{children:"Kernel"})]})})};var Yg=U();const Zg=t=>{let e=(0,Yg.c)(3),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,o.jsx)("path",{d:"M205.28 31.36c14.096 14.88 20.016 35.2 22.512 63.68c6.626 0 12.805 1.47 16.976 7.152l7.792 10.56A17.55 17.55 0 0 1 256 123.2v28.688c-.008 3.704-1.843 7.315-4.832 9.504C215.885 187.222 172.35 208 128 208c-49.066 0-98.19-28.273-123.168-46.608c-2.989-2.189-4.825-5.8-4.832-9.504V123.2c0-3.776 1.2-7.424 3.424-10.464l7.792-10.544c4.173-5.657 10.38-7.152 16.992-7.152c2.496-28.48 8.4-48.8 22.512-63.68C77.331 3.165 112.567.06 127.552 0H128c14.72 0 50.4 2.88 77.28 31.36m-77.264 47.376c-3.04 0-6.544.176-10.272.544c-1.312 4.896-3.248 9.312-6.08 12.128c-11.2 11.2-24.704 12.928-31.936 12.928c-6.802 0-13.927-1.42-19.744-5.088c-5.502 1.808-10.786 4.415-11.136 10.912c-.586 12.28-.637 24.55-.688 36.824c-.026 6.16-.05 12.322-.144 18.488c.024 3.579 2.182 6.903 5.44 8.384C79.936 185.92 104.976 192 128.016 192c23.008 0 48.048-6.08 74.512-18.144c3.258-1.48 5.415-4.805 5.44-8.384c.317-18.418.062-36.912-.816-55.312h.016c-.342-6.534-5.648-9.098-11.168-10.912c-5.82 3.652-12.927 5.088-19.728 5.088c-7.232 0-20.72-1.728-31.936-12.928c-2.832-2.816-4.768-7.232-6.08-12.128a106 106 0 0 0-10.24-.544m-26.941 43.93c5.748 0 10.408 4.66 10.408 10.409v19.183c0 5.749-4.66 10.409-10.408 10.409s-10.408-4.66-10.408-10.409v-19.183c0-5.748 4.66-10.408 10.408-10.408m53.333 0c5.749 0 10.409 4.66 10.409 10.409v19.183c0 5.749-4.66 10.409-10.409 10.409c-5.748 0-10.408-4.66-10.408-10.409v-19.183c0-5.748 4.66-10.408 10.408-10.408M81.44 28.32c-11.2 1.12-20.64 4.8-25.44 9.92c-10.4 11.36-8.16 40.16-2.24 46.24c4.32 4.32 12.48 7.2 21.28 7.2c6.72 0 19.52-1.44 30.08-12.16c4.64-4.48 7.52-15.68 7.2-27.04c-.32-9.12-2.88-16.64-6.72-19.84c-4.16-3.68-13.6-5.28-24.16-4.32m68.96 4.32c-3.84 3.2-6.4 10.72-6.72 19.84c-.32 11.36 2.56 22.56 7.2 27.04c10.56 10.72 23.36 12.16 30.08 12.16c8.8 0 16.96-2.88 21.28-7.2c5.92-6.08 8.16-34.88-2.24-46.24c-4.8-5.12-14.24-8.8-25.44-9.92c-10.56-.96-20 .64-24.16 4.32M128 56c-2.56 0-5.6.16-8.96.48c.32 1.76.48 3.68.64 5.76c0 1.44 0 2.88-.16 4.48c3.2-.32 5.92-.32 8.48-.32s5.28 0 8.48.32c-.16-1.6-.16-3.04-.16-4.48c.16-2.08.32-4 .64-5.76c-3.36-.32-6.4-.48-8.96-.48"}),e[0]=r):r=e[0];let n;return e[1]===t?n=e[2]:(n=(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.24em",height:"1em",viewBox:"0 0 256 208",fill:"currentColor",...t,children:r}),e[1]=t,e[2]=n),n};var Jg=U(),Qg=dn(t=>t(B0).completion.copilot);const eh=()=>{let t=(0,Jg.c)(1);if(Y(Qg)==="github"){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(th,{}),t[0]=e):e=t[0],e}return null};var Ll=Fe.get("[copilot-status-bar]"),th=()=>{let t=Y(ks),e=Y(y0)!==null,r=Y(k0),{handleClick:n}=Ha(),a=()=>n("ai"),i=t?"Ready":"Not connected";r.message?i=r.message:r.busy&&(i="Processing...");let l=lt(ks),s=lt(j0);hs(()=>{let u=T0(),m=!0;return(async()=>{try{if(await u.initializePromise.catch(p=>{throw Ll.error("Failed to initialize",p),u.close(),p}),!m)return;let d=await u.signedIn();if(!m)return;l(d),s(d?"signedIn":"signedOut")}catch(d){if(!m)return;Ll.warn("Connection failed",d),l(!1),s("connectionError"),ct({title:"GitHub Copilot Connection Error",description:(0,o.jsxs)(o.Fragment,{children:[" ",(0,o.jsx)("div",{children:"Failed to connect to GitHub Copilot. Check settings and try again."}),(0,o.jsx)("br",{}),(0,o.jsx)("div",{className:"text-sm font-mono whitespace-pre-wrap",children:pb(d)})]}),variant:"danger",action:(0,o.jsx)(oe,{variant:"link",onClick:a,children:"Settings"})})}})(),()=>{m=!1}});let c=r.kind==="Warning"||r.kind==="Error"?"text-(--yellow-11)":t?"":"opacity-60";return(0,o.jsx)(ht,{tooltip:(0,o.jsxs)("div",{className:"max-w-[200px]",children:[(0,o.jsx)("b",{children:"GitHub Copilot:"})," ",i,r.kind&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsxs)("span",{className:"pt-1 text-xs",children:["Status: ",r.kind]})]})]}),selected:!1,onClick:a,"data-testid":"footer-copilot-status",children:(0,o.jsx)("span",{children:e||r.busy?(0,o.jsx)(Cr,{className:"h-4 w-4"}):(0,o.jsx)(Zg,{className:Z("h-4 w-4",c)})})})},fr=U();const rh=()=>{let t=(0,fr.c)(18),[e,r]=(0,v.useState)(0),n=Y(yt),{getUsageStats:a}=rt(),i,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>r(ih),l={delayMs:1e4,whenVisible:!0},t[0]=i,t[1]=l):(i=t[0],l=t[1]),yo(i,l);let s;t[2]!==n.state||t[3]!==a?(s=async()=>jr()||n.state!==Ss.OPEN?null:a(),t[2]=n.state,t[3]=a,t[4]=s):s=t[4];let c;t[5]!==n.state||t[6]!==e?(c=[e,n.state],t[5]=n.state,t[6]=e,t[7]=c):c=t[7];let{data:u}=Mn(s,c),m;t[8]===u?m=t[9]:(m=(u==null?void 0:u.gpu)&&u.gpu.length>0&&(0,o.jsx)(oh,{gpus:u.gpu}),t[8]=u,t[9]=m);let d;t[10]===u?d=t[11]:(d=u&&(0,o.jsx)(nh,{memory:u.memory,kernel:u.kernel,server:u.server}),t[10]=u,t[11]=d);let p;t[12]===u?p=t[13]:(p=u&&(0,o.jsx)(ah,{cpu:u.cpu}),t[12]=u,t[13]=p);let g;return t[14]!==m||t[15]!==d||t[16]!==p?(g=(0,o.jsxs)("div",{className:"flex gap-2 items-center px-1",children:[m,d,p]}),t[14]=m,t[15]=d,t[16]=p,t[17]=g):g=t[17],g};var nh=t=>{let e=(0,fr.c)(38),{memory:r,kernel:n,server:a}=t,{percent:i,total:l,available:s,has_cgroup_mem_limit:c}=r,u;e[0]===i?u=e[1]:(u=Math.round(i),e[0]=i,e[1]=u);let m=u,d=c?"container memory":"computer memory",p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p={maximumFractionDigits:2},e[2]=p):p=e[2];let g=On(p),x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x={maximumFractionDigits:0},e[3]=x):x=e[3];let b=On(x),f;e[4]!==g||e[5]!==b?(f=P=>P>1073741824?`${g.format(P/1073741824)} GB`:`${b.format(P/1048576)} MB`,e[4]=g,e[5]=b,e[6]=f):f=e[6];let y=f,k;e[7]===g?k=e[8]:(k=P=>g.format(P/1073741824),e[7]=g,e[8]=k);let h=k,D;e[9]===d?D=e[10]:(D=(0,o.jsxs)("b",{children:[d,":"]}),e[9]=d,e[10]=D);let j=l-s,w;e[11]!==h||e[12]!==j?(w=h(j),e[11]=h,e[12]=j,e[13]=w):w=e[13];let C;e[14]!==h||e[15]!==l?(C=h(l),e[14]=h,e[15]=l,e[16]=C):C=e[16];let S;e[17]!==m||e[18]!==D||e[19]!==w||e[20]!==C?(S=(0,o.jsxs)("span",{children:[D," ",w," /"," ",C," GB (",m,"%)"]}),e[17]=m,e[18]=D,e[19]=w,e[20]=C,e[21]=S):S=e[21];let _;e[22]!==y||e[23]!==a?(_=(a==null?void 0:a.memory)&&(0,o.jsxs)("span",{children:[(0,o.jsx)("b",{children:"marimo server:"})," ",y(a.memory)]}),e[22]=y,e[23]=a,e[24]=_):_=e[24];let E;e[25]!==y||e[26]!==n?(E=(n==null?void 0:n.memory)&&(0,o.jsxs)("span",{children:[(0,o.jsx)("b",{children:"kernel:"})," ",y(n.memory)]}),e[25]=y,e[26]=n,e[27]=E):E=e[27];let T;e[28]!==S||e[29]!==_||e[30]!==E?(T=(0,o.jsxs)("div",{className:"flex flex-col gap-1",children:[S,_,E]}),e[28]=S,e[29]=_,e[30]=E,e[31]=T):T=e[31];let N;e[32]===Symbol.for("react.memo_cache_sentinel")?(N=(0,o.jsx)(hu,{className:"w-4 h-4"}),e[32]=N):N=e[32];let $;e[33]===m?$=e[34]:($=(0,o.jsxs)("div",{className:"flex items-center gap-1","data-testid":"memory-usage-bar",children:[N,(0,o.jsx)(ja,{percent:m,colorClassName:"bg-primary"})]}),e[33]=m,e[34]=$);let z;return e[35]!==T||e[36]!==$?(z=(0,o.jsx)(Q,{delayDuration:200,content:T,children:$}),e[35]=T,e[36]=$,e[37]=z):z=e[37],z},ah=t=>{let e=(0,fr.c)(11),{cpu:r}=t,{percent:n}=r,a;e[0]===n?a=e[1]:(a=Math.round(n),e[0]=n,e[1]=a);let i=a,l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)("b",{children:"CPU:"}),e[2]=l):l=e[2];let s;e[3]===i?s=e[4]:(s=(0,o.jsxs)("span",{children:[l," ",i,"%"]}),e[3]=i,e[4]=s);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(S0,{className:"w-4 h-4"}),e[5]=c):c=e[5];let u;e[6]===i?u=e[7]:(u=(0,o.jsxs)("div",{className:"flex items-center gap-1","data-testid":"cpu-bar",children:[c,(0,o.jsx)(ja,{percent:i,colorClassName:"bg-primary"})]}),e[6]=i,e[7]=u);let m;return e[8]!==s||e[9]!==u?(m=(0,o.jsx)(Q,{delayDuration:200,content:s,children:u}),e[8]=s,e[9]=u,e[10]=m):m=e[10],m},oh=t=>{let e=(0,fr.c)(20),{gpus:r}=t,n;e[0]===r?n=e[1]:(n=Math.round(r.reduce(lh,0)/r.length),e[0]=r,e[1]=n);let a=n,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={maximumFractionDigits:2},e[2]=i):i=e[2];let l=On(i),s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={maximumFractionDigits:0},e[3]=s):s=e[3];let c=On(s),u;e[4]!==l||e[5]!==c?(u=f=>f>1073741824?`${l.format(f/1073741824)} GB`:`${c.format(f/1048576)} MB`,e[4]=l,e[5]=c,e[6]=u):u=e[6];let m=u,d;if(e[7]!==m||e[8]!==r){let f;e[10]===m?f=e[11]:(f=y=>(0,o.jsxs)("span",{children:[(0,o.jsxs)("b",{children:["GPU ",y.index," (",y.name,"):"]})," ",m(y.memory.used)," / ",m(y.memory.total)," (",Math.round(y.memory.percent),"%)"]},y.index),e[10]=m,e[11]=f),d=r.map(f),e[7]=m,e[8]=r,e[9]=d}else d=e[9];let p;e[12]===d?p=e[13]:(p=(0,o.jsx)("div",{className:"flex flex-col gap-1",children:d}),e[12]=d,e[13]=p);let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=(0,o.jsx)(xu,{className:"w-4 h-4"}),e[14]=g):g=e[14];let x;e[15]===a?x=e[16]:(x=(0,o.jsxs)("div",{className:"flex items-center gap-1","data-testid":"gpu-bar",children:[g,(0,o.jsx)(ja,{percent:a,colorClassName:"bg-(--grass-9)"})]}),e[15]=a,e[16]=x);let b;return e[17]!==p||e[18]!==x?(b=(0,o.jsx)(Q,{delayDuration:200,content:p,children:x}),e[17]=p,e[18]=x,e[19]=b):b=e[19],b},ja=t=>{let e=(0,fr.c)(7),{percent:r,colorClassName:n}=t,a;e[0]===n?a=e[1]:(a=Z("h-full bg-primary",n),e[0]=n,e[1]=a);let i=`${r}%`,l;e[2]===i?l=e[3]:(l={width:i},e[2]=i,e[3]=l);let s;return e[4]!==a||e[5]!==l?(s=(0,o.jsx)("div",{className:"h-3 w-20 bg-(--slate-4) rounded-lg overflow-hidden border",children:(0,o.jsx)("div",{className:a,style:l})}),e[4]=a,e[5]=l,e[6]=s):s=e[6],s};function ih(t){return t+1}function lh(t,e){return t+e.memory.percent}var sh=U();const uh=()=>{let t=(0,sh.c)(13),e=Y(i1),[r,n]=xr(mf),[a,i]=(0,v.useState)(!1);if(!yf()||e==="disabled")return null;let l=e?"Real-time collaboration active":"Connecting to real-time collaboration",s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(ju,{className:"w-4 h-4"}),t[0]=s):s=t[0];let c;t[1]===l?c=t[2]:(c=(0,o.jsx)(sb,{asChild:!0,children:(0,o.jsx)(ht,{tooltip:l,selected:!1,"data-testid":"footer-rtc-status",children:s})}),t[1]=l,t[2]=c);let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsx)("h4",{className:"font-medium leading-none",children:"Username"}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:"Set your username for real-time collaboration"})]}),t[3]=u):u=t[3];let m;t[4]===n?m=t[5]:(m=g=>n(g.target.value),t[4]=n,t[5]=m);let d;t[6]!==m||t[7]!==r?(d=(0,o.jsx)(ub,{className:"w-80",children:(0,o.jsxs)("div",{className:"space-y-4",children:[u,(0,o.jsx)(po,{value:r,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onChange:m,placeholder:"Enter your username"})]})}),t[6]=m,t[7]=r,t[8]=d):d=t[8];let p;return t[9]!==a||t[10]!==c||t[11]!==d?(p=(0,o.jsxs)(cb,{open:a,onOpenChange:i,children:[c,d]}),t[9]=a,t[10]=c,t[11]=d,t[12]=p):p=t[12],p};var ch=U();const dh=t=>{let e=(0,ch.c)(60),{saveUserConfig:r}=rt(),[n,a]=qa(),i;e[0]!==r||e[1]!==a?(i=async M=>{await r({config:{runtime:{auto_instantiate:M}}}).then(()=>{a(H=>({...H,runtime:{...H.runtime,auto_instantiate:M}}))})},e[0]=r,e[1]=a,e[2]=i):i=e[2];let l=i,s;e[3]!==r||e[4]!==a?(s=async M=>{let H=M?"autorun":"lazy";await r({config:{runtime:{on_cell_change:H}}}).then(()=>{a(O=>({...O,runtime:{...O.runtime,on_cell_change:H}}))})},e[3]=r,e[4]=a,e[5]=s):s=e[5];let c=s,u;e[6]!==r||e[7]!==a?(u=async M=>{await r({config:{runtime:{auto_reload:M}}}).then(()=>{a(H=>({...H,runtime:{...H.runtime,auto_reload:M}}))})},e[6]=r,e[7]=a,e[8]=u):u=e[8];let m=u,d;e[9]!==n.runtime.auto_instantiate||e[10]!==n.runtime.auto_reload||e[11]!==n.runtime.on_cell_change?(d=!n.runtime.auto_instantiate&&n.runtime.on_cell_change==="lazy"&&(jr()||n.runtime.auto_reload!=="autorun"),e[9]=n.runtime.auto_instantiate,e[10]=n.runtime.auto_reload,e[11]=n.runtime.on_cell_change,e[12]=d):d=e[12];let p=d,g;e[13]===p?g=e[14]:(g=p?(0,o.jsx)(or,{size:16,className:"text-muted-foreground"}):(0,o.jsx)(ir,{size:16,className:"text-amber-500"}),e[13]=p,e[14]=g);let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=(0,o.jsx)(ar,{size:14}),e[15]=x):x=e[15];let b;e[16]===g?b=e[17]:(b=(0,o.jsx)(kt,{asChild:!0,children:(0,o.jsx)(ht,{tooltip:"Runtime reactivity",selected:!1,"data-testid":"footer-runtime-settings",children:(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[g,x]})})}),e[16]=g,e[17]=b);let f;e[18]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)("span",{children:"Runtime reactivity"}),e[18]=f):f=e[18];let y,k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=(0,o.jsx)(Yx,{children:(0,o.jsxs)("div",{className:"flex items-center justify-between w-full",children:[f,(0,o.jsx)(lu,{href:"https://links.marimo.app/runtime-configuration",children:(0,o.jsxs)("span",{className:"text-xs font-normal flex items-center gap-1",children:["Docs",(0,o.jsx)(Ix,{className:"w-3 h-3"})]})})]})}),y=(0,o.jsx)(Dt,{}),e[19]=y,e[20]=k):(y=e[19],k=e[20]);let h;e[21]===n.runtime.auto_instantiate?h=e[22]:(h=n.runtime.auto_instantiate?(0,o.jsx)(ir,{size:14,className:"text-amber-500"}):(0,o.jsx)(or,{size:14,className:"text-muted-foreground"}),e[21]=n.runtime.auto_instantiate,e[22]=h);let D;e[23]===Symbol.for("react.memo_cache_sentinel")?(D=(0,o.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1",children:["On startup",(0,o.jsx)(Q,{content:(0,o.jsx)("div",{className:"max-w-[200px]",children:"Whether to automatically run the notebook on startup"}),children:(0,o.jsx)($a,{className:"w-3 h-3"})})]}),e[23]=D):D=e[23];let j=n.runtime.auto_instantiate?"autorun":"lazy",w;e[24]===j?w=e[25]:(w=(0,o.jsxs)("div",{children:[D,(0,o.jsx)("div",{className:"text-xs text-muted-foreground",children:j})]}),e[24]=j,e[25]=w);let C;e[26]!==h||e[27]!==w?(C=(0,o.jsxs)("div",{className:"flex items-center space-x-2",children:[h,w]}),e[26]=h,e[27]=w,e[28]=C):C=e[28];let S;e[29]!==n.runtime.auto_instantiate||e[30]!==l?(S=(0,o.jsx)(_s,{checked:n.runtime.auto_instantiate,onCheckedChange:l,size:"sm"}),e[29]=n.runtime.auto_instantiate,e[30]=l,e[31]=S):S=e[31];let _;e[32]!==C||e[33]!==S?(_=(0,o.jsx)(Wa,{name:"runtime.auto_instantiate",children:(0,o.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[C,S]})}),e[32]=C,e[33]=S,e[34]=_):_=e[34];let E;e[35]===Symbol.for("react.memo_cache_sentinel")?(E=(0,o.jsx)(Dt,{}),e[35]=E):E=e[35];let T;e[36]===n.runtime.on_cell_change?T=e[37]:(T=n.runtime.on_cell_change==="autorun"?(0,o.jsx)(ir,{size:14,className:"text-amber-500"}):(0,o.jsx)(or,{size:14,className:"text-muted-foreground"}),e[36]=n.runtime.on_cell_change,e[37]=T);let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=(0,o.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1",children:["On cell change",(0,o.jsx)(Q,{content:(0,o.jsx)("div",{className:"max-w-[300px]",children:"Whether to automatically run dependent cells after running a cell"}),children:(0,o.jsx)($a,{className:"w-3 h-3"})})]}),e[38]=N):N=e[38];let $;e[39]===n.runtime.on_cell_change?$=e[40]:($=(0,o.jsxs)("div",{children:[N,(0,o.jsx)("div",{className:"text-xs text-muted-foreground",children:n.runtime.on_cell_change})]}),e[39]=n.runtime.on_cell_change,e[40]=$);let z;e[41]!==T||e[42]!==$?(z=(0,o.jsxs)("div",{className:"flex items-center space-x-2",children:[T,$]}),e[41]=T,e[42]=$,e[43]=z):z=e[43];let P=n.runtime.on_cell_change==="autorun",I;e[44]!==c||e[45]!==P?(I=(0,o.jsx)(_s,{checked:P,onCheckedChange:c,size:"sm"}),e[44]=c,e[45]=P,e[46]=I):I=e[46];let A;e[47]!==z||e[48]!==I?(A=(0,o.jsx)(Wa,{name:"runtime.on_cell_change",children:(0,o.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[z,I]})}),e[47]=z,e[48]=I,e[49]=A):A=e[49];let B;e[50]!==n.runtime.auto_reload||e[51]!==m?(B=!jr()&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dt,{}),(0,o.jsx)(Wa,{name:"runtime.auto_reload",children:(0,o.jsxs)("div",{className:"px-2 py-1",children:[(0,o.jsxs)("div",{className:"flex items-center space-x-2 mb-2",children:[n.runtime.auto_reload==="off"&&(0,o.jsx)(_n,{size:14,className:"text-muted-foreground"}),n.runtime.auto_reload==="lazy"&&(0,o.jsx)(or,{size:14,className:"text-muted-foreground"}),n.runtime.auto_reload==="autorun"&&(0,o.jsx)(ir,{size:14,className:"text-amber-500"}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1",children:["On module change",(0,o.jsx)(Q,{content:(0,o.jsx)("div",{className:"max-w-[300px]",children:"Whether to run affected cells, mark them as stale, or do nothing when an external module is updated"}),children:(0,o.jsx)($a,{className:"w-3 h-3"})})]}),(0,o.jsx)("div",{className:"text-xs text-muted-foreground",children:n.runtime.auto_reload})]})]}),(0,o.jsx)("div",{className:"space-y-1",children:["off","lazy","autorun"].map(M=>(0,o.jsxs)("button",{onClick:()=>m(M),className:Z("w-full flex items-center px-2 py-1 text-sm rounded hover:bg-accent",M===n.runtime.auto_reload&&"bg-accent"),children:[M==="off"&&(0,o.jsx)(_n,{size:12,className:"mr-2"}),M==="lazy"&&(0,o.jsx)(or,{size:12,className:"mr-2"}),M==="autorun"&&(0,o.jsx)(ir,{size:12,className:"mr-2"}),(0,o.jsx)("span",{className:"capitalize",children:M}),M===n.runtime.auto_reload&&(0,o.jsx)("span",{className:"ml-auto",children:"\u2713"})]},M))})]})})]}),e[50]=n.runtime.auto_reload,e[51]=m,e[52]=B):B=e[52];let R;e[53]!==_||e[54]!==A||e[55]!==B?(R=(0,o.jsxs)(jt,{align:"start",className:"w-64",children:[k,y,(0,o.jsxs)(go,{children:[_,E,A,B]})]}),e[53]=_,e[54]=A,e[55]=B,e[56]=R):R=e[56];let K;return e[57]!==R||e[58]!==b?(K=(0,o.jsxs)(wt,{children:[b,R]}),e[57]=R,e[58]=b,e[59]=K):K=e[59],K};var Hl=U();const ph=()=>{let t=(0,Hl.c)(30),{isDeveloperPanelOpen:e}=Ba(),{toggleDeveloperPanel:r,toggleApplication:n}=hn(),a=hx(),i=Y(Pa),l=Y(Fl),s=(Y(Ka).sidebar.includes("errors")?0:i)+(l==="unhealthy"||l==="disconnected"?1:0),c;t[0]===n?c=t[1]:(c=()=>{n("terminal")},t[0]=n,t[1]=c),Se("global.toggleTerminal",c);let u;t[2]===r?u=t[3]:(u=()=>{r()},t[2]=r,t[3]=u),Se("global.togglePanel",u);let m;t[4]!==a||t[5]!==n?(m=()=>{n("dependencies"),a("minimap")},t[4]=a,t[5]=n,t[6]=m):m=t[6],Se("global.toggleMinimap",m);let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsxs)("span",{className:"flex items-center gap-2",children:["Toggle developer panel ",Ze("global.togglePanel",!1)]}),t[7]=d):d=t[7];let p;t[8]===r?p=t[9]:(p=()=>r(),t[8]=r,t[9]=p);let g=`w-4 h-4 ${s>0?"text-destructive":""}`,x;t[10]===g?x=t[11]:(x=(0,o.jsx)(ss,{className:g}),t[10]=g,t[11]=x);let b;t[12]===s?b=t[13]:(b=(0,o.jsx)("span",{children:s}),t[12]=s,t[13]=b);let f,y;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)(An,{className:"w-4 h-4 ml-1 "}),y=(0,o.jsx)("span",{children:0}),t[14]=f,t[15]=y):(f=t[14],y=t[15]);let k;t[16]!==x||t[17]!==b?(k=(0,o.jsxs)("div",{className:"flex items-center gap-1 h-full",children:[x,b,f,y]}),t[16]=x,t[17]=b,t[18]=k):k=t[18];let h;t[19]!==e||t[20]!==k||t[21]!==p?(h=(0,o.jsx)(ht,{className:"h-full",tooltip:d,selected:e,onClick:p,"data-testid":"footer-panel",children:k}),t[19]=e,t[20]=k,t[21]=p,t[22]=h):h=t[22];let D,j,w;t[23]===Symbol.for("react.memo_cache_sentinel")?(D=(0,o.jsx)(dh,{}),j=(0,o.jsx)("div",{className:"mx-auto"}),w=(0,o.jsx)(mh,{}),t[23]=D,t[24]=j,t[25]=w):(D=t[23],j=t[24],w=t[25]);let C;t[26]===Symbol.for("react.memo_cache_sentinel")?(C=(0,o.jsx)(Nb,{children:(0,o.jsx)(Q,{content:(0,o.jsx)("div",{className:"w-[200px]",children:"Kiosk mode is enabled. This allows you to view the outputs of the cells without the ability to edit them."}),children:(0,o.jsx)("span",{className:"text-muted-foreground text-sm mr-4",children:"kiosk mode"})})}),t[26]=C):C=t[26];let S;t[27]===Symbol.for("react.memo_cache_sentinel")?(S=(0,o.jsxs)("div",{className:"flex items-center shrink-0 min-w-0",children:[(0,o.jsx)(rh,{}),(0,o.jsx)(Xg,{}),(0,o.jsx)(eh,{}),(0,o.jsx)(uh,{})]}),t[27]=S):S=t[27];let _;return t[28]===h?_=t[29]:(_=(0,o.jsxs)("footer",{className:"h-10 py-1 gap-1 bg-background flex items-center text-muted-foreground text-md pl-2 pr-1 border-t border-border select-none print:hidden text-sm z-50 hide-on-fullscreen overflow-x-auto overflow-y-hidden scrollbar-thin",children:[h,D,j,w,C,S]}),t[28]=h,t[29]=_),_};var mh=()=>{let t=(0,Hl.c)(1);if(!Y(ws))return null;let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(Vl,{}),t[0]=e):e=t[0],e},gh=U();function hh(t){return`application/x-reorderable-${t}`}function fh(t){try{return JSON.parse(t)}catch{return null}}const Wl=t=>{let e=(0,gh.c)(75),{value:r,setValue:n,getKey:a,renderItem:i,onAction:l,availableItems:s,getItemLabel:c,minItems:u,ariaLabel:m,className:d,crossListDrag:p}=t,g=u===void 0?1:u,x=m===void 0?"Reorderable list":m,b;e[0]===p?b=e[1]:(b=p?hh(p.dragType):null,e[0]=p,e[1]=b);let f=b,y=p==null?void 0:p.onReceive,k;e[2]!==p||e[3]!==a||e[4]!==f||e[5]!==y||e[6]!==n||e[7]!==r?(k=async(O,F)=>{if(!(!f||!(p!=null&&p.listId)||!y))for(let L of O){if(L.kind!=="text"||!L.types.has(f))continue;let V=fh(await L.getText(f));V&&V.sourceListId!==p.listId&&(r.some(G=>a(G)===a(V.item))||(n([...r.slice(0,F),V.item,...r.slice(F)]),y(V.item,V.sourceListId,F)))}},e[2]=p,e[3]=a,e[4]=f,e[5]=y,e[6]=n,e[7]=r,e[8]=k):k=e[8];let h=k,D;e[9]!==p||e[10]!==a||e[11]!==f||e[12]!==r?(D=O=>[...O].map(F=>{let L=r.find(G=>a(G)===F),V={"text/plain":String(F)};if(f&&(p!=null&&p.listId)&&L){let G={itemId:String(F),sourceListId:p.listId,item:L};V[f]=JSON.stringify(G)}return V}),e[9]=p,e[10]=a,e[11]=f,e[12]=r,e[13]=D):D=e[13];let j;e[14]===f?j=e[15]:(j=f?[f,"text/plain"]:["text/plain"],e[14]=f,e[15]=j);let w;e[16]!==a||e[17]!==h||e[18]!==n||e[19]!==D||e[20]!==j||e[21]!==r?(w={getItems:D,acceptedDragTypes:j,onReorder(O){let F=new Set(O.keys),L=r.filter(q=>F.has(a(q))),V=r.filter(q=>!F.has(a(q))),G=V.findIndex(q=>a(q)===O.target.key),W=O.target.dropPosition==="before"?G:G+1;n([...V.slice(0,W),...L,...V.slice(W)])},async onInsert(O){let F=r.findIndex(V=>a(V)===O.target.key),L=O.target.dropPosition==="before"?F:F+1;await h(O.items,L)},async onRootDrop(O){await h(O.items,r.length)}},e[16]=a,e[17]=h,e[18]=n,e[19]=D,e[20]=j,e[21]=r,e[22]=w):w=e[22];let{dragAndDropHooks:C}=$c(w),S;if(e[23]!==a||e[24]!==r){let O;e[26]===a?O=e[27]:(O=F=>a(F),e[26]=a,e[27]=O),S=new Set(r.map(O)),e[23]=a,e[24]=r,e[25]=S}else S=e[25];let _=S,E;e[28]!==a||e[29]!==g||e[30]!==n||e[31]!==r?(E=(O,F)=>{F?n([...r,O]):r.length>g&&n(r.filter(L=>a(L)!==a(O)))},e[28]=a,e[29]=g,e[30]=n,e[31]=r,e[32]=E):E=e[32];let T=E,N;e[33]!==a||e[34]!==l||e[35]!==r?(N=O=>{if(!l)return;let F=r.find(L=>a(L)===O);if(!F){Fe.warn("handleAction: item not found for key",{key:O,availableKeys:r.map(L=>a(L))});return}l(F)},e[33]=a,e[34]=l,e[35]=r,e[36]=N):N=e[36];let $=N,z=r.length===0,P;if(e[37]!==a||e[38]!==i||e[39]!==r){let O;e[41]!==a||e[42]!==i?(O=F=>(0,o.jsx)(ki,{id:a(F),className:"active:cursor-grabbing data-[dragging]:opacity-60 outline-none",children:i(F)},a(F)),e[41]=a,e[42]=i,e[43]=O):O=e[43],P=r.map(O),e[37]=a,e[38]=i,e[39]=r,e[40]=P}else P=e[40];let I;e[44]===z?I=e[45]:(I=z&&(0,o.jsx)(ki,{id:"__empty__",className:"min-h-[40px] min-w-[40px]",children:(0,o.jsx)("span",{})}),e[44]=z,e[45]=I);let A;e[46]!==x||e[47]!==d||e[48]!==C||e[49]!==$||e[50]!==P||e[51]!==I?(A=(0,o.jsxs)(wc,{"aria-label":x,selectionMode:"none",dragAndDropHooks:C,className:d,onAction:$,children:[P,I]}),e[46]=x,e[47]=d,e[48]=C,e[49]=$,e[50]=P,e[51]=I,e[52]=A):A=e[52];let B=A;if(!s)return B;let R;e[53]===B?R=e[54]:(R=(0,o.jsx)(Ns,{asChild:!0,children:B}),e[53]=B,e[54]=R);let K;if(e[55]!==s||e[56]!==_||e[57]!==c||e[58]!==a||e[59]!==T||e[60]!==g||e[61]!==r.length){let O;e[63]!==_||e[64]!==c||e[65]!==a||e[66]!==T||e[67]!==g||e[68]!==r.length?(O=F=>{let L=a(F),V=_.has(L);return(0,o.jsx)(nx,{checked:V,disabled:V&&r.length<=g,onCheckedChange:G=>{T(F,G)},children:c?c(F):L},L)},e[63]=_,e[64]=c,e[65]=a,e[66]=T,e[67]=g,e[68]=r.length,e[69]=O):O=e[69],K=s.map(O),e[55]=s,e[56]=_,e[57]=c,e[58]=a,e[59]=T,e[60]=g,e[61]=r.length,e[62]=K}else K=e[62];let M;e[70]===K?M=e[71]:(M=(0,o.jsx)(zs,{children:K}),e[70]=K,e[71]=M);let H;return e[72]!==R||e[73]!==M?(H=(0,o.jsxs)($s,{children:[R,M]}),e[72]=R,e[73]=M,e[74]=H):H=e[74],H};var Ul=U();const xh=t=>{let e=(0,Ul.c)(6),{children:r}=t,{openModal:n,closeModal:a}=db(),i;e[0]!==a||e[1]!==n?(i=()=>n((0,o.jsx)(bh,{onClose:a})),e[0]=a,e[1]=n,e[2]=i):i=e[2];let l;return e[3]!==r||e[4]!==i?(l=(0,o.jsx)(Y0,{onClick:i,children:r}),e[3]=r,e[4]=i,e[5]=l):l=e[5],l};var bh=t=>{let e=(0,Ul.c)(9),{onClose:r}=t,n;e[0]===r?n=e[1]:(n=async m=>{m.preventDefault();let d=new FormData(m.target),p=d.get("rating"),g=d.get("message");fetch("https://marimo.io/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rating:p,message:g})}),r(),ct({title:"Feedback sent!",description:"Thank you for your feedback!"})},e[0]=r,e[1]=n);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(eb,{children:"Send Feedback"}),e[2]=a):a=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)("p",{className:"my-2 prose dark:prose-invert",children:"We want to hear from you \u2014 from minor bug reports to wishlist features and everything in between. Here are some ways you can get in touch:"}),e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsxs)("li",{className:"my-0",children:["Take our"," ",(0,o.jsx)("a",{href:Xa.feedbackForm,target:"_blank",className:"underline",children:"two-minute survey."})]}),e[4]=l):l=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsxs)("li",{className:"my-0",children:["File a"," ",(0,o.jsx)("a",{href:Xa.issuesPage,target:"_blank",className:"underline",children:"GitHub issue."})]}),e[5]=s):s=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsxs)(Q1,{children:[a,(0,o.jsxs)(rb,{children:[i,(0,o.jsxs)("ul",{className:"list-disc ml-8 my-2 prose dark:prose-invert",children:[l,s,(0,o.jsxs)("li",{className:"my-0",children:["Chat with us on"," ",(0,o.jsx)("a",{href:Xa.discordLink,target:"_blank",className:"underline",children:"Discord."})]})]}),(0,o.jsx)("p",{className:"my-2 prose dark:prose-invert",children:"We're excited you're here as we build the future of Python data tooling. Thanks for being part of our community!"})]})]}),e[6]=c):c=e[6];let u;return e[7]===n?u=e[8]:(u=(0,o.jsx)(tb,{className:"w-fit",children:(0,o.jsx)("form",{onSubmit:n,children:c})}),e[7]=n,e[8]=u),u},Xr=U();const yh=()=>{let t=(0,Xr.c)(44),{selectedPanel:e,selectedDeveloperPanelTab:r,isSidebarOpen:n}=Ba(),{toggleApplication:a,openApplication:i,setIsSidebarOpen:l}=hn(),[s,c]=xr(Ka),u=Y(ns),m=kh,d;t[0]===s.developerPanel?d=t[1]:(d=new Set(s.developerPanel),t[0]=s.developerPanel,t[1]=d);let p=d,g;t[2]!==u||t[3]!==p?(g=us.filter(I=>!(fn(I,u)||p.has(I.type))),t[2]=u,t[3]=p,t[4]=g):g=t[4];let x=g,b;if(t[5]!==u||t[6]!==s.sidebar){let I;t[8]===u?I=t[9]:(I=A=>{let B=as.get(A);return!B||fn(B,u)?[]:[B]},t[8]=u,t[9]=I),b=s.sidebar.flatMap(I),t[5]=u,t[6]=s.sidebar,t[7]=b}else b=t[7];let f=b,y;t[10]===c?y=t[11]:(y=I=>{c(A=>({...A,sidebar:I.map(jh)}))},t[10]=c,t[11]=y);let k=y,h;t[12]!==i||t[13]!==s.developerPanel||t[14]!==r||t[15]!==c||t[16]!==a?(h=(I,A)=>{if(A==="developer-panel"&&(c(B=>({...B,developerPanel:B.developerPanel.filter(R=>R!==I.type)})),r===I.type)){let B=s.developerPanel.filter(R=>R!==I.type);B.length>0&&i(B[0])}a(I.type)},t[12]=i,t[13]=s.developerPanel,t[14]=r,t[15]=c,t[16]=a,t[17]=h):h=t[17];let D=h,j,w;t[18]!==n||t[19]!==i||t[20]!==e||t[21]!==l||t[22]!==f?(j=()=>{n&&(f.some(I=>I.type===e)||(f.length>0?i(f[0].type):l(!1)))},w=[n,f,e,i,l],t[18]=n,t[19]=i,t[20]=e,t[21]=l,t[22]=f,t[23]=j,t[24]=w):(j=t[23],w=t[24]),(0,v.useEffect)(j,w);let C;t[25]===D?C=t[26]:(C={dragType:"panels",listId:"sidebar",onReceive:D},t[25]=D,t[26]=C);let S;t[27]===Symbol.for("react.memo_cache_sentinel")?(S=I=>(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[m(I,"h-4 w-4 text-muted-foreground"),I.label]}),t[27]=S):S=t[27];let _;t[28]===a?_=t[29]:(_=I=>a(I.type),t[28]=a,t[29]=_);let E;t[30]===e?E=t[31]:(E=I=>(0,o.jsx)(ql,{tooltip:I.tooltip,selected:e===I.type,children:I.type==="errors"?(0,o.jsx)(vh,{Icon:I.Icon}):m(I)}),t[30]=e,t[31]=E);let T;t[32]!==x||t[33]!==k||t[34]!==f||t[35]!==E||t[36]!==C||t[37]!==_?(T=(0,o.jsx)(Wl,{value:f,setValue:k,getKey:wh,availableItems:x,crossListDrag:C,getItemLabel:S,ariaLabel:"Sidebar panels",className:"flex flex-col gap-0",minItems:0,onAction:_,renderItem:E}),t[32]=x,t[33]=k,t[34]=f,t[35]=E,t[36]=C,t[37]=_,t[38]=T):T=t[38];let N,$,z;t[39]===Symbol.for("react.memo_cache_sentinel")?(N=(0,o.jsx)(xh,{children:(0,o.jsx)(ql,{tooltip:"Send feedback!",selected:!1,children:(0,o.jsx)(fu,{className:"h-5 w-5"})})}),$=(0,o.jsx)("div",{className:"flex-1"}),z=(0,o.jsx)(Dh,{}),t[39]=N,t[40]=$,t[41]=z):(N=t[39],$=t[40],z=t[41]);let P;return t[42]===T?P=t[43]:(P=(0,o.jsxs)("div",{className:"h-full pt-4 pb-1 px-1 flex flex-col items-start text-muted-foreground text-md select-none text-sm z-50 dark:bg-background print:hidden hide-on-fullscreen",children:[T,N,$,z]}),t[42]=T,t[43]=P),P};var vh=t=>{let e=(0,Xr.c)(5),{Icon:r}=t,n=Y(Pa)>0&&"text-destructive",a;e[0]===n?a=e[1]:(a=Z("h-5 w-5",n),e[0]=n,e[1]=a);let i;return e[2]!==r||e[3]!==a?(i=(0,o.jsx)(r,{className:a}),e[2]=r,e[3]=a,e[4]=i):i=e[4],i},Dh=()=>{let t=(0,Xr.c)(7),e=Y(vf),r;t[0]===e?r=t[1]:(r=e>0?(0,o.jsxs)("span",{children:[e," cell",e>1?"s":""," queued or running"]}):"No cells queued or running",t[0]=e,t[1]=r);let n;t[2]===e?n=t[3]:(n=(0,o.jsx)("div",{className:"flex flex-col-reverse gap-px overflow-hidden",children:Array.from({length:e}).map(Eh)}),t[2]=e,t[3]=n);let a;return t[4]!==r||t[5]!==n?(a=(0,o.jsx)(Q,{content:r,side:"right",delayDuration:200,children:n}),t[4]=r,t[5]=n,t[6]=a):a=t[6],a},ql=t=>{let e=(0,Xr.c)(11),{children:r,tooltip:n,selected:a,className:i,onClick:l}=t,s=!a&&"hover:bg-(--sage-3)",c=a&&"bg-(--sage-4)",u;e[0]!==i||e[1]!==s||e[2]!==c?(u=Z("flex items-center p-2 text-sm mx-px shadow-inset font-mono rounded",s,c,i),e[0]=i,e[1]=s,e[2]=c,e[3]=u):u=e[3];let m=u,d;e[4]!==r||e[5]!==m||e[6]!==l?(d=l?(0,o.jsx)("button",{className:m,onClick:l,children:r}):(0,o.jsx)("div",{className:m,children:r}),e[4]=r,e[5]=m,e[6]=l,e[7]=d):d=e[7];let p=d,g;return e[8]!==p||e[9]!==n?(g=(0,o.jsx)(Q,{content:n,side:"right",delayDuration:200,children:p}),e[8]=p,e[9]=n,e[10]=g):g=e[10],g};function kh(t,e){let{Icon:r}=t;return(0,o.jsx)(r,{className:Z("h-5 w-5",e)})}function jh(t){return t.type}function wh(t){return t.type}function Eh(t,e){return(0,o.jsx)("div",{className:"shrink-0 h-1 w-2 bg-(--grass-6) border border-(--grass-7)"},e.toString())}var Ch=U();const Xl=t=>{let e=(0,Ch.c)(2),[r,n]=v.useState(!1);if(t.mode==="visible"&&!r&&n(!0),r){let a;return e[0]===t?a=e[1]:(a=(0,o.jsx)(v.Activity,{...t}),e[0]=t,e[1]=a),a}return null};var Sh=6e4;const Th=dn(null),_h=()=>{let t=Y(yt).state,e=lt(Th),{isFetching:r,data:n,refetch:a}=Mn(async()=>{if(!nr(t))return null;try{let d=await Ts.get("/lsp/health");return e(d),d}catch{return null}},[t]);yo(a,{delayMs:nr(t)?Sh:null,whenVisible:!0});let i=async()=>{try{let d=await Ts.post("/lsp/restart",{});d.success?ct({title:"LSP Servers Restarted",description:d.restarted.length>0?`Restarted: ${d.restarted.join(", ")}`:"No servers needed restart"}):ct({variant:"danger",title:"LSP Restart Failed",description:Object.entries(d.errors??{}).map(([p,g])=>`${p}: ${g}`).join(`
|
|
13
|
-
`)}),a()}catch(d){ct({variant:"danger",title:"LSP Restart Failed",description:d instanceof Error?d.message:"Unknown error"})}};if(!n||n.servers.length===0)return null;let l=()=>{if(r)return(0,o.jsx)(Cr,{size:"small"});if(!n)return(0,o.jsx)(er,{className:"w-4 h-4"});switch(n.status){case"healthy":return(0,o.jsx)(oo,{className:"w-4 h-4 text-(--green-9)"});case"degraded":return(0,o.jsx)(er,{className:"w-4 h-4 text-(--yellow-11)"});case"unhealthy":return(0,o.jsx)(er,{className:"w-4 h-4 text-(--yellow-11)"})}},s=(d,p)=>{switch(d){case"running":return`\u2713 OK${p==null?"":` (${p.toFixed(0)}ms)`}`;case"starting":return"\u22EF Starting";case"stopped":return"\u2717 Stopped";case"crashed":return"\u2717 Crashed";case"unresponsive":return"\u2717 Not responding"}},c=d=>{switch(d){case"running":return"text-(--green-9)";case"starting":return"text-(--yellow-11)";default:return"text-(--red-9)"}},u=(0,o.jsxs)("div",{className:"text-sm",children:[(0,o.jsx)("b",{children:"LSP Status"}),(0,o.jsx)("div",{className:"mt-1 text-xs space-y-1",children:n==null?void 0:n.servers.map(d=>(0,o.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,o.jsx)("span",{children:d.serverId}),(0,o.jsx)("span",{className:c(d.status),children:s(d.status,d.lastPingMs)})]},d.serverId))}),(n==null?void 0:n.status)==="healthy"?null:(0,o.jsx)("div",{className:"mt-2 text-xs text-muted-foreground",children:"Click to restart failed servers"})]}),m=()=>{(n==null?void 0:n.status)!=="healthy"&&i()};return(0,o.jsx)(Q,{content:u,"data-testid":"footer-lsp-status",children:(0,o.jsxs)("button",{type:"button",onClick:m,className:"p-1 hover:bg-accent rounded flex items-center gap-1.5 text-xs text-muted-foreground","data-testid":"lsp-status",children:[l(),(0,o.jsx)("span",{children:"LSP"})]})})};var Ih=U();const Nh=()=>{let t=(0,Ih.c)(46),[e,r]=(0,v.useState)(null),n=Y(to),a;t[0]===n?a=t[1]:(a=[...n.keys()],t[0]=n,t[1]=a);let i=a,{deleteStagedCell:l,removeStagedCell:s}=Bs(es()),c=iu();if(n.size===0)return null;let u=$h,m;t[2]!==e||t[3]!==i?(m=B=>{let R=ix(e,i.length,B);r(R),u(i[R])},t[2]=e,t[3]=i,t[4]=m):m=t[4];let d=m,p;t[5]!==l||t[6]!==s||t[7]!==n?(p=()=>{for(let[B,R]of n)yl(B,R,s,l)},t[5]=l,t[6]=s,t[7]=n,t[8]=p):p=t[8];let g=p,x;t[9]!==l||t[10]!==s||t[11]!==n?(x=()=>{for(let[B,R]of n)vl(B,R,s,l)},t[9]=l,t[10]=s,t[11]=n,t[12]=x):x=t[12];let b=x,f;t[13]!==i||t[14]!==c?(f=()=>{c(i)},t[13]=i,t[14]=c,t[15]=f):f=t[15];let y=f,k,h;t[16]===Symbol.for("react.memo_cache_sentinel")?(k=Z("fixed bottom-16 left-1/2 transform -translate-x-1/2 z-50 bg-background/95 backdrop-blur-sm supports-backdrop-filter:bg-background/80 border border-border rounded-lg px-3 py-2 flex items-center justify-between gap-2.5 w-100","shadow-[0_0_6px_0_#00A2C733]"),h=(0,o.jsx)(zn,{className:"h-4 w-4 text-primary"}),t[16]=k,t[17]=h):(k=t[16],h=t[17]);let D;t[18]===d?D=t[19]:(D=()=>d("up"),t[18]=d,t[19]=D);let j;t[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,o.jsx)(ro,{className:"h-3.5 w-3.5"}),t[20]=j):j=t[20];let w;t[21]===D?w=t[22]:(w=(0,o.jsx)(oe,{variant:"ghost",size:"icon",onClick:D,children:j}),t[21]=D,t[22]=w);let C=e===null?`${i.length} pending`:`${e+1} / ${i.length}`,S;t[23]===C?S=t[24]:(S=(0,o.jsx)("span",{className:"text-xs font-mono min-w-[3.5rem] text-center",children:C}),t[23]=C,t[24]=S);let _;t[25]===d?_=t[26]:(_=()=>d("down"),t[25]=d,t[26]=_);let E;t[27]===Symbol.for("react.memo_cache_sentinel")?(E=(0,o.jsx)(ar,{className:"h-3.5 w-3.5"}),t[27]=E):E=t[27];let T;t[28]===_?T=t[29]:(T=(0,o.jsx)(oe,{variant:"ghost",size:"icon",onClick:_,children:E}),t[28]=_,t[29]=T);let N;t[30]!==S||t[31]!==T||t[32]!==w?(N=(0,o.jsxs)("div",{className:"flex items-center",children:[w,S,T]}),t[30]=S,t[31]=T,t[32]=w,t[33]=N):N=t[33];let $;t[34]===Symbol.for("react.memo_cache_sentinel")?($=(0,o.jsx)("div",{className:"h-5 w-px bg-border"}),t[34]=$):$=t[34];let z;t[35]!==g||t[36]!==y?(z=(0,o.jsx)(vx,{multipleCompletions:!0,onAccept:g,isLoading:!1,size:"xs",buttonStyles:"h-6.5",playButtonStyles:"h-6.5",runCell:y}),t[35]=g,t[36]=y,t[37]=z):z=t[37];let P;t[38]===b?P=t[39]:(P=(0,o.jsx)(bx,{multipleCompletions:!0,onDecline:b,size:"xs",className:"h-6.5"}),t[38]=b,t[39]=P);let I;t[40]!==z||t[41]!==P?(I=(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[z,P]}),t[40]=z,t[41]=P,t[42]=I):I=t[42];let A;return t[43]!==N||t[44]!==I?(A=(0,o.jsxs)("div",{className:k,children:[h,N,$,I]}),t[43]=N,t[44]=I,t[45]=A):A=t[45],A};function $h(t){yb(t,"focus")}var zh=U(),Ah=Ef("marimo:chrome:ai-panel-tab","chat",zf);function Bh(){let t=(0,zh.c)(3),[e,r]=xr(Ah),n;return t[0]!==e||t[1]!==r?(n={aiPanelTab:e,setAiPanelTab:r},t[0]=e,t[1]=r,t[2]=n):n=t[2],n}var Ph=U(),Gl=v.lazy(()=>_e(()=>import("./terminal-CjhjkmtR.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]),import.meta.url)),Kh=v.lazy(()=>_e(()=>import("./chat-panel-D4Bcz2Sv.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([44,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141]),import.meta.url)),Oh=v.lazy(()=>_e(()=>import("./agent-panel-Bh2AfKzA.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([142,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,143,144,145,146,147,148,149,150,151,115,116,125,126,137,118,119,120,121,122,123,124,152,153,154,114,155,156,157,138,139,140,158,129,159,160,161,162,163,111,112,113,117,127,128,130,131,132,136,28,164,135,165,166,167]),import.meta.url)),Rh=v.lazy(()=>_e(()=>import("./dependency-graph-panel-DED_3Q6I.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([168,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,169,91,35,92,93,94,95,96,128,129,130,170,171,172,112,1,2,16,17,113,114,173,174,175,116,87,86,89,90,153,98,119,104,126,101,39,176,177,178,132,179,42,152,120,180,181,115,182,183,184,141,185,186,187]),import.meta.url)),Mh=v.lazy(()=>_e(()=>import("./session-panel-Co_o0ALo.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([188,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,7,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,189,113,190,136,191,192,193,89,194,88,195,108,196,42,197,198,105,106,199,176,181,200,201,202,109,186]),import.meta.url)),Fh=v.lazy(()=>_e(()=>import("./documentation-panel-CG2t9UyE.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([203,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,154,114,137,39,41,101,96,95,155]),import.meta.url)),Vh=v.lazy(()=>_e(()=>import("./error-panel-CDGOPmKx.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([204,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126]),import.meta.url)),Lh=v.lazy(()=>_e(()=>import("./file-explorer-panel-OefSIlIn.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([205,206,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,7,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,207,165,131,208,209,1,127,210,211,212,213,214,215,184,178,216,196,109,217,42,110,218]),import.meta.url)),Hh=v.lazy(()=>_e(()=>import("./logs-panel-CZIVXROt.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([219,220,11,12,5,6,7,9,46,47,48,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,115,116,87,86,91,35,92,93,94,95,96]),import.meta.url)),Wh=v.lazy(()=>_e(()=>import("./outline-panel-BGroTTXd.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([221,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,222,101,223]),import.meta.url)),Uh=v.lazy(()=>_e(()=>import("./packages-panel-CQGOcCdz.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([224,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,136,151]),import.meta.url)),qh=v.lazy(()=>_e(()=>import("./scratchpad-panel-BH-ZA_0Y.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([225,226,7,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,227,169,128,130,170,222,228,190,178,108,117,89,99,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,177,327,132,328,212,329,330,45,1,85,88,105,106,109,42,110,112,111,113,127,131,173,207,165,208,209,331,332,333,164,334,217,335,336,180,337,338]),import.meta.url)),Xh=v.lazy(()=>_e(()=>import("./secrets-panel-Db_JucCn.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([339,136,5,6,7,9,192,49,20,4,11,12,86,87,3,8,51,14,193,91,35,21,22,23,36,37,38,92,62,24,93,94,95,96,50,10,13,15,89,90,97,52,54,82,116,48,100,53,34,30,197,102,103,104,27,39,41,108,338]),import.meta.url)),Gh=v.lazy(()=>_e(()=>import("./snippets-panel-Dg7V8q_w.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([340,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,180,337,101,82,116,87,86,91,35,92,93,94,95,96,152,90,154,114,137,39,41,155,120,102,121,103,104,108,338,341]),import.meta.url)),Yh=v.lazy(()=>_e(()=>import("./tracing-panel-BKDVrccB.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([342,47,82,11,12,14,6,7,5,9]),import.meta.url)),Zh=v.lazy(()=>_e(()=>import("./cache-panel-D07YsKqa.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([343,136,5,6,7,9,82,11,12,14,87,49,20,4,3,8,52,344,21,22,23,54,24,102,92,62,94,95,79,109,42]),import.meta.url));const Jh=t=>{let e=(0,Ph.c)(179),{children:r}=t,{isSidebarOpen:n,isDeveloperPanelOpen:a,selectedPanel:i,selectedDeveloperPanelTab:l}=Ba(),{setIsSidebarOpen:s,setIsDeveloperPanelOpen:c,openApplication:u}=hn(),m=v.useRef(null),d=v.useRef(null),{aiPanelTab:p,setAiPanelTab:g}=Bh(),{dependencyPanelTab:x,setDependencyPanelTab:b}=xx(),f=Y(Pa),[y,k]=xr(Ka),h=Y(ns),D;if(e[0]!==h||e[1]!==y.developerPanel){let X;e[3]===h?X=e[4]:(X=Ae=>{let ke=as.get(Ae);return!ke||fn(ke,h)?[]:[ke]},e[3]=h,e[4]=X),D=y.developerPanel.flatMap(X),e[0]=h,e[1]=y.developerPanel,e[2]=D}else D=e[2];let j=D,w;e[5]===k?w=e[6]:(w=X=>{k(Ae=>({...Ae,developerPanel:X.map(Qh)}))},e[5]=k,e[6]=w);let C=w,S;e[7]!==u||e[8]!==y.sidebar||e[9]!==i||e[10]!==k?(S=(X,Ae)=>{if(Ae==="sidebar"&&(k(ke=>({...ke,sidebar:ke.sidebar.filter(Na=>Na!==X.type)})),i===X.type)){let ke=y.sidebar.filter(Na=>Na!==X.type);ke.length>0&&u(ke[0])}u(X.type)},e[7]=u,e[8]=y.sidebar,e[9]=i,e[10]=k,e[11]=S):S=e[11];let _=S,E;e[12]===y.sidebar?E=e[13]:(E=new Set(y.sidebar),e[12]=y.sidebar,e[13]=E);let T=E,N;e[14]!==h||e[15]!==T?(N=us.filter(X=>!(fn(X,h)||T.has(X.type))),e[14]=h,e[15]=T,e[16]=N):N=e[16];let $=N,z,P;e[17]===n?(z=e[18],P=e[19]):(z=()=>{if(!m.current)return;let X=m.current.isCollapsed();n&&X&&m.current.expand(),!n&&!X&&m.current.collapse(),requestAnimationFrame(tf)},P=[n],e[17]=n,e[18]=z,e[19]=P),(0,v.useEffect)(z,P);let I,A;e[20]===a?(I=e[21],A=e[22]):(I=()=>{if(!d.current)return;let X=d.current.isCollapsed();a&&X&&d.current.expand(),!a&&!X&&d.current.collapse(),requestAnimationFrame(nf)},A=[a],e[20]=a,e[21]=I,e[22]=A),(0,v.useEffect)(I,A);let B,R;e[23]!==j||e[24]!==a||e[25]!==u||e[26]!==l||e[27]!==c?(B=()=>{a&&(j.some(X=>X.type===l)||(j.length>0?u(j[0].type):c(!1)))},R=[a,j,l,u,c],e[23]=j,e[24]=a,e[25]=u,e[26]=l,e[27]=c,e[28]=B,e[29]=R):(B=e[28],R=e[29]),(0,v.useEffect)(B,R);let K;e[30]===r?K=e[31]:(K=(0,o.jsx)(Vn,{id:"app",className:"relative h-full",children:(0,o.jsx)(v.Suspense,{children:r})},"app"),e[30]=r,e[31]=K);let M=K,H=!n,O;e[32]===Symbol.for("react.memo_cache_sentinel")?(O={coarse:15,fine:2},e[32]=O):O=e[32];let F=n?"resize-handle":"resize-handle-collapsed",L;e[33]===F?L=e[34]:(L=Z("border-border print:hidden z-10",F,"vertical"),e[33]=F,e[34]=L);let V;e[35]!==H||e[36]!==L?(V=(0,o.jsx)(du,{disabled:H,onDragging:fs,hitAreaMargins:O,className:L}),e[35]=H,e[36]=L,e[37]=V):V=e[37];let G=V,W=!a,q=a?"resize-handle":"resize-handle-collapsed",ee;e[38]===q?ee=e[39]:(ee=Z("border-border print:hidden z-20",q,"horizontal"),e[38]=q,e[39]=ee);let te;e[40]!==W||e[41]!==ee?(te=(0,o.jsx)(du,{disabled:W,onDragging:fs,className:ee}),e[40]=W,e[41]=ee,e[42]=te):te=e[42];let re=te,ae;e[43]===Symbol.for("react.memo_cache_sentinel")?(ae=Pf("external_agents"),e[43]=ae):ae=e[43];let J=ae,se;e[44]===p?se=e[45]:(se=()=>J&&p==="agents"?(0,o.jsx)(Oh,{}):(0,o.jsx)(Kh,{}),e[44]=p,e[45]=se);let ge=se,ye,he,Ie,Ne,le,ce,Ee;e[46]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,o.jsx)(Lh,{}),he=(0,o.jsx)(Mh,{}),Ie=(0,o.jsx)(Rh,{}),Ne=(0,o.jsx)(Uh,{}),le=(0,o.jsx)(Wh,{}),ce=(0,o.jsx)(Fh,{}),Ee=(0,o.jsx)(Gh,{}),e[46]=ye,e[47]=he,e[48]=Ie,e[49]=Ne,e[50]=le,e[51]=ce,e[52]=Ee):(ye=e[46],he=e[47],Ie=e[48],Ne=e[49],le=e[50],ce=e[51],Ee=e[52]);let Re;e[53]===ge?Re=e[54]:(Re=ge(),e[53]=ge,e[54]=Re);let ie,et,nt,at,ft;e[55]===Symbol.for("react.memo_cache_sentinel")?(ie=(0,o.jsx)(Vh,{}),et=(0,o.jsx)(qh,{}),nt=(0,o.jsx)(Yh,{}),at=(0,o.jsx)(Xh,{}),ft=(0,o.jsx)(Hh,{}),e[55]=ie,e[56]=et,e[57]=nt,e[58]=at,e[59]=ft):(ie=e[55],et=e[56],nt=e[57],at=e[58],ft=e[59]);let $t=n&&i==="terminal",ot;e[60]===s?ot=e[61]:(ot=()=>s(!1),e[60]=s,e[61]=ot);let it;e[62]!==$t||e[63]!==ot?(it=(0,o.jsx)(Gl,{visible:$t,onClose:ot}),e[62]=$t,e[63]=ot,e[64]=it):it=e[64];let zt;e[65]===Symbol.for("react.memo_cache_sentinel")?(zt=(0,o.jsx)(Zh,{}),e[65]=zt):zt=e[65];let xt;e[66]!==Re||e[67]!==it?(xt={files:ye,variables:he,dependencies:Ie,packages:Ne,outline:le,documentation:ce,snippets:Ee,ai:Re,errors:ie,scratchpad:et,tracing:nt,secrets:at,logs:ft,terminal:it,cache:zt},e[66]=Re,e[67]=it,e[68]=xt):xt=e[68];let ve=xt,fe;e[69]!==p||e[70]!==x||e[71]!==i||e[72]!==g||e[73]!==b?(fe=i==="dependencies"?(0,o.jsxs)("div",{className:"flex items-center justify-between flex-1",children:[(0,o.jsx)("span",{className:"text-sm text-(--slate-11) uppercase tracking-wide font-semibold",children:"Dependencies"}),(0,o.jsx)(ou,{value:x,onValueChange:X=>{(X==="minimap"||X==="graph")&&b(X)},children:(0,o.jsxs)(au,{children:[(0,o.jsx)(Rn,{value:"minimap",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Minimap"}),(0,o.jsx)(Rn,{value:"graph",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Graph"})]})})]}):i==="ai"&&J?(0,o.jsx)(ou,{value:p,onValueChange:X=>{(X==="chat"||X==="agents")&&g(X)},children:(0,o.jsxs)(au,{children:[(0,o.jsx)(Rn,{value:"chat",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Chat"}),(0,o.jsx)(Rn,{value:"agents",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Agents"})]})}):(0,o.jsx)("span",{className:"text-sm text-(--slate-11) uppercase tracking-wide font-semibold flex-1",children:i}),e[69]=p,e[70]=x,e[71]=i,e[72]=g,e[73]=b,e[74]=fe):fe=e[74];let xe;e[75]===s?xe=e[76]:(xe=()=>s(!1),e[75]=s,e[76]=xe);let Pe;e[77]===Symbol.for("react.memo_cache_sentinel")?(Pe=(0,o.jsx)(Ge,{className:"w-4 h-4"}),e[77]=Pe):Pe=e[77];let De;e[78]===xe?De=e[79]:(De=(0,o.jsx)(oe,{"data-testid":"close-helper-pane",className:"m-0",size:"xs",variant:"text",onClick:xe,children:Pe}),e[78]=xe,e[79]=De);let de;e[80]!==fe||e[81]!==De?(de=(0,o.jsxs)("div",{className:"p-3 border-b flex justify-between items-center",children:[fe,De]}),e[80]=fe,e[81]=De,e[82]=de):de=e[82];let Ce;e[83]===ve?Ce=e[84]:(Ce=Object.entries(ve),e[83]=ve,e[84]=Ce);let ue;e[85]!==n||e[86]!==i||e[87]!==Ce?(ue=(0,o.jsx)(v.Suspense,{children:(0,o.jsx)(Bn,{children:Ce.map(X=>{let[Ae,ke]=X;return(0,o.jsx)(Xl,{mode:n&&i===Ae?"visible":"hidden",children:ke},Ae)})})}),e[85]=n,e[86]=i,e[87]=Ce,e[88]=ue):ue=e[88];let pe;e[89]!==de||e[90]!==ue?(pe=(0,o.jsx)(Is,{children:(0,o.jsx)(pu,{value:"sidebar",children:(0,o.jsxs)("div",{className:"flex flex-col h-full flex-1 overflow-hidden",children:[de,ue]})})}),e[89]=de,e[90]=ue,e[91]=pe):pe=e[91];let Ke=pe,He=n&&"border-r border-l border-(--slate-7)",$e;e[92]===He?$e=e[93]:($e=Z("dark:bg-(--slate-1) print:hidden hide-on-fullscreen",He),e[92]=He,e[93]=$e);let Oe;e[94]===Symbol.for("react.memo_cache_sentinel")?(Oe=(X,Ae)=>{var ke;Ae===0&&X===10&&((ke=m.current)==null||ke.resize(30))},e[94]=Oe):Oe=e[94];let Me,Ue;e[95]===s?(Me=e[96],Ue=e[97]):(Me=()=>s(!1),Ue=()=>s(!0),e[95]=s,e[96]=Me,e[97]=Ue);let At;e[98]!==Ke||e[99]!==G?(At=(0,o.jsxs)("span",{className:"flex flex-row h-full",children:[Ke," ",G]}),e[98]=Ke,e[99]=G,e[100]=At):At=e[100];let Gr;e[101]!==$e||e[102]!==Me||e[103]!==Ue||e[104]!==At?(Gr=(0,o.jsx)(Vn,{ref:m,id:"app-chrome-sidebar","data-testid":"helper",collapsedSize:0,collapsible:!0,className:$e,minSize:10,defaultSize:0,maxSize:75,onResize:Oe,onCollapse:Me,onExpand:Ue,children:At},"helper"),e[101]=$e,e[102]=Me,e[103]=Ue,e[104]=At,e[105]=Gr):Gr=e[105];let Ea=Gr,Ca=a&&l==="terminal",Bt;e[106]===c?Bt=e[107]:(Bt=()=>c(!1),e[106]=c,e[107]=Bt);let Pt;e[108]!==Ca||e[109]!==Bt?(Pt=(0,o.jsx)(Gl,{visible:Ca,onClose:Bt}),e[108]=Ca,e[109]=Bt,e[110]=Pt):Pt=e[110];let Yr;e[111]!==ve||e[112]!==Pt?(Yr={...ve,terminal:Pt},e[111]=ve,e[112]=Pt,e[113]=Yr):Yr=e[113];let Sa=Yr,Ta=a&&"border-t",Kt;e[114]===Ta?Kt=e[115]:(Kt=Z("dark:bg-(--slate-1) print:hidden hide-on-fullscreen",Ta),e[114]=Ta,e[115]=Kt);let Zr;e[116]===Symbol.for("react.memo_cache_sentinel")?(Zr=(X,Ae)=>{var ke;Ae===0&&X===10&&((ke=d.current)==null||ke.resize(30))},e[116]=Zr):Zr=e[116];let Ot,Rt;e[117]===c?(Ot=e[118],Rt=e[119]):(Ot=()=>c(!1),Rt=()=>c(!0),e[117]=c,e[118]=Ot,e[119]=Rt);let Mt;e[120]===_?Mt=e[121]:(Mt={dragType:"panels",listId:"developer-panel",onReceive:_},e[120]=_,e[121]=Mt);let Ft;e[122]===u?Ft=e[123]:(Ft=X=>u(X.type),e[122]=u,e[123]=Ft);let Vt;e[124]!==f||e[125]!==l?(Vt=X=>(0,o.jsxs)("div",{className:Z("text-sm flex gap-2 px-2 pt-1 pb-0.5 items-center leading-none rounded-sm cursor-pointer",l===X.type?"bg-muted":"hover:bg-muted/50"),children:[(0,o.jsx)(X.Icon,{className:Z("w-4 h-4",X.type==="errors"&&f>0&&"text-destructive")}),X.label]}),e[124]=f,e[125]=l,e[126]=Vt):Vt=e[126];let Lt;e[127]!==$||e[128]!==j||e[129]!==C||e[130]!==Mt||e[131]!==Ft||e[132]!==Vt?(Lt=(0,o.jsx)(Wl,{value:j,setValue:C,getKey:af,availableItems:$,crossListDrag:Mt,getItemLabel:of,ariaLabel:"Developer panel tabs",className:"flex flex-row gap-1",minItems:0,onAction:Ft,renderItem:Vt}),e[127]=$,e[128]=j,e[129]=C,e[130]=Mt,e[131]=Ft,e[132]=Vt,e[133]=Lt):Lt=e[133];let Jr,Qr,en,tn;e[134]===Symbol.for("react.memo_cache_sentinel")?(Jr=(0,o.jsx)("div",{className:"border-l border-border h-4 mx-1"}),Qr=(0,o.jsx)(Vl,{}),en=(0,o.jsx)(_h,{}),tn=(0,o.jsx)("div",{className:"flex-1"}),e[134]=Jr,e[135]=Qr,e[136]=en,e[137]=tn):(Jr=e[134],Qr=e[135],en=e[136],tn=e[137]);let Ht;e[138]===c?Ht=e[139]:(Ht=()=>c(!1),e[138]=c,e[139]=Ht);let rn;e[140]===Symbol.for("react.memo_cache_sentinel")?(rn=(0,o.jsx)(Ge,{className:"w-4 h-4"}),e[140]=rn):rn=e[140];let Wt;e[141]===Ht?Wt=e[142]:(Wt=(0,o.jsx)(oe,{size:"xs",variant:"text",onClick:Ht,children:rn}),e[141]=Ht,e[142]=Wt);let Ut;e[143]!==Lt||e[144]!==Wt?(Ut=(0,o.jsxs)("div",{className:"flex items-center justify-between border-b px-2 h-8 bg-background shrink-0",children:[Lt,Jr,Qr,en,tn,Wt]}),e[143]=Lt,e[144]=Wt,e[145]=Ut):Ut=e[145];let nn;e[146]===Symbol.for("react.memo_cache_sentinel")?(nn=(0,o.jsx)("div",{}),e[146]=nn):nn=e[146];let qt;e[147]===Sa?qt=e[148]:(qt=Object.entries(Sa),e[147]=Sa,e[148]=qt);let Xt;e[149]!==a||e[150]!==l||e[151]!==qt?(Xt=(0,o.jsx)(v.Suspense,{fallback:nn,children:(0,o.jsx)(pu,{value:"developer-panel",children:(0,o.jsx)("div",{className:"flex-1 overflow-hidden",children:qt.map(X=>{let[Ae,ke]=X;return(0,o.jsx)(Xl,{mode:a&&l===Ae?"visible":"hidden",children:ke},Ae)})})})}),e[149]=a,e[150]=l,e[151]=qt,e[152]=Xt):Xt=e[152];let Gt;e[153]!==Ut||e[154]!==Xt?(Gt=(0,o.jsxs)("div",{className:"flex flex-col h-full",children:[Ut,Xt]}),e[153]=Ut,e[154]=Xt,e[155]=Gt):Gt=e[155];let an;e[156]!==re||e[157]!==Kt||e[158]!==Ot||e[159]!==Rt||e[160]!==Gt?(an=(0,o.jsxs)(Vn,{ref:d,id:"app-chrome-panel","data-testid":"panel",collapsedSize:0,collapsible:!0,className:Kt,minSize:10,defaultSize:0,maxSize:75,onResize:Zr,onCollapse:Ot,onExpand:Rt,children:[re,Gt]},"panel"),e[156]=re,e[157]=Kt,e[158]=Ot,e[159]=Rt,e[160]=Gt,e[161]=an):an=e[161];let _a=an,on;e[162]===Symbol.for("react.memo_cache_sentinel")?(on=(0,o.jsx)(Bn,{children:(0,o.jsx)(yh,{})}),e[162]=on):on=e[162];let Ia=a&&!n&&"border-l",Yt;e[163]===Ia?Yt=e[164]:(Yt=Z(Ia),e[163]=Ia,e[164]=Yt);let Zt;e[165]!==M||e[166]!==_a?(Zt=(0,o.jsxs)(cu,{autoSaveId:"marimo:chrome:v1:l1",direction:"vertical",children:[M,_a]}),e[165]=M,e[166]=_a,e[167]=Zt):Zt=e[167];let Jt;e[168]!==Yt||e[169]!==Zt?(Jt=(0,o.jsx)(Vn,{id:"app-chrome-body",className:Yt,children:Zt}),e[168]=Yt,e[169]=Zt,e[170]=Jt):Jt=e[170];let ln;e[171]===Symbol.for("react.memo_cache_sentinel")?(ln=(0,o.jsx)(r0,{}),e[171]=ln):ln=e[171];let Qt;e[172]!==Ea||e[173]!==Jt?(Qt=(0,o.jsxs)(cu,{autoSaveId:"marimo:chrome:v1:l2",direction:"horizontal",children:[on,Ea,Jt,ln]}),e[172]=Ea,e[173]=Jt,e[174]=Qt):Qt=e[174];let sn;e[175]===Symbol.for("react.memo_cache_sentinel")?(sn=(0,o.jsx)(Nh,{}),e[175]=sn):sn=e[175];let un;e[176]===Symbol.for("react.memo_cache_sentinel")?(un=(0,o.jsx)(Is,{children:(0,o.jsx)(Bn,{children:(0,o.jsx)(ph,{})})}),e[176]=un):un=e[176];let cn;return e[177]===Qt?cn=e[178]:(cn=(0,o.jsxs)(k1,{children:[Qt,sn,un]}),e[177]=Qt,e[178]=cn),cn};function Qh(t){return t.type}function ef(){window.dispatchEvent(new Event("resize"))}function tf(){requestAnimationFrame(ef)}function rf(){window.dispatchEvent(new Event("resize"))}function nf(){requestAnimationFrame(rf)}function af(t){return t.type}function of(t){return(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[(0,o.jsx)(t.Icon,{className:"w-4 h-4 text-muted-foreground"}),t.label]})}let Yl,wa,Zl;Yl=U(),wa=(0,v.lazy)(()=>_e(()=>import("./command-palette-CXYdoElD.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([345,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,143,144,145,146,147,148,149,150,151,115,116,125,126,137,118,119,120,121,122,123,124,152,153,154,114,155,156,157,138,139,140,158,129,159,160,161,162,163,227,169,128,130,170,222,228,190,178,117,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,177,327,132,328,212,329,172,112,113,173,174,175,176,179,346,191,192,193,194,195,196,197,198,199,347,331,332,348,210,215,216,131,349,350,141]),import.meta.url)),Zl=new URL(window.location.href).searchParams.get(R0.showChrome)==="false",gu=t=>{let e=(0,Yl.c)(10);if(Zl){let i;e[0]===t?i=e[1]:(i=(0,o.jsx)(Ml,{hideControls:!0,...t}),e[0]=t,e[1]=i);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)(wa,{}),e[2]=l):l=e[2];let s;return e[3]===i?s=e[4]:(s=(0,o.jsxs)(o.Fragment,{children:[i,l]}),e[3]=i,e[4]=s),s}let r;e[5]===t?r=e[6]:(r=(0,o.jsx)(Ml,{...t}),e[5]=t,e[6]=r);let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(wa,{}),e[7]=n):n=e[7];let a;return e[8]===r?a=e[9]:(a=(0,o.jsxs)(Jh,{children:[r,n]}),e[8]=r,e[9]=a),a}});export{$b as __tla,gu as default};
|
|
13
|
+
`)}),a()}catch(d){ct({variant:"danger",title:"LSP Restart Failed",description:d instanceof Error?d.message:"Unknown error"})}};if(!n||n.servers.length===0)return null;let l=()=>{if(r)return(0,o.jsx)(Cr,{size:"small"});if(!n)return(0,o.jsx)(er,{className:"w-4 h-4"});switch(n.status){case"healthy":return(0,o.jsx)(oo,{className:"w-4 h-4 text-(--green-9)"});case"degraded":return(0,o.jsx)(er,{className:"w-4 h-4 text-(--yellow-11)"});case"unhealthy":return(0,o.jsx)(er,{className:"w-4 h-4 text-(--yellow-11)"})}},s=(d,p)=>{switch(d){case"running":return`\u2713 OK${p==null?"":` (${p.toFixed(0)}ms)`}`;case"starting":return"\u22EF Starting";case"stopped":return"\u2717 Stopped";case"crashed":return"\u2717 Crashed";case"unresponsive":return"\u2717 Not responding"}},c=d=>{switch(d){case"running":return"text-(--green-9)";case"starting":return"text-(--yellow-11)";default:return"text-(--red-9)"}},u=(0,o.jsxs)("div",{className:"text-sm",children:[(0,o.jsx)("b",{children:"LSP Status"}),(0,o.jsx)("div",{className:"mt-1 text-xs space-y-1",children:n==null?void 0:n.servers.map(d=>(0,o.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,o.jsx)("span",{children:d.serverId}),(0,o.jsx)("span",{className:c(d.status),children:s(d.status,d.lastPingMs)})]},d.serverId))}),(n==null?void 0:n.status)==="healthy"?null:(0,o.jsx)("div",{className:"mt-2 text-xs text-muted-foreground",children:"Click to restart failed servers"})]}),m=()=>{(n==null?void 0:n.status)!=="healthy"&&i()};return(0,o.jsx)(Q,{content:u,"data-testid":"footer-lsp-status",children:(0,o.jsxs)("button",{type:"button",onClick:m,className:"p-1 hover:bg-accent rounded flex items-center gap-1.5 text-xs text-muted-foreground","data-testid":"lsp-status",children:[l(),(0,o.jsx)("span",{children:"LSP"})]})})};var Ih=U();const Nh=()=>{let t=(0,Ih.c)(46),[e,r]=(0,v.useState)(null),n=Y(to),a;t[0]===n?a=t[1]:(a=[...n.keys()],t[0]=n,t[1]=a);let i=a,{deleteStagedCell:l,removeStagedCell:s}=Bs(es()),c=iu();if(n.size===0)return null;let u=$h,m;t[2]!==e||t[3]!==i?(m=B=>{let R=ix(e,i.length,B);r(R),u(i[R])},t[2]=e,t[3]=i,t[4]=m):m=t[4];let d=m,p;t[5]!==l||t[6]!==s||t[7]!==n?(p=()=>{for(let[B,R]of n)yl(B,R,s,l)},t[5]=l,t[6]=s,t[7]=n,t[8]=p):p=t[8];let g=p,x;t[9]!==l||t[10]!==s||t[11]!==n?(x=()=>{for(let[B,R]of n)vl(B,R,s,l)},t[9]=l,t[10]=s,t[11]=n,t[12]=x):x=t[12];let b=x,f;t[13]!==i||t[14]!==c?(f=()=>{c(i)},t[13]=i,t[14]=c,t[15]=f):f=t[15];let y=f,k,h;t[16]===Symbol.for("react.memo_cache_sentinel")?(k=Z("fixed bottom-16 left-1/2 transform -translate-x-1/2 z-50 bg-background/95 backdrop-blur-sm supports-backdrop-filter:bg-background/80 border border-border rounded-lg px-3 py-2 flex items-center justify-between gap-2.5 w-100","shadow-[0_0_6px_0_#00A2C733]"),h=(0,o.jsx)(zn,{className:"h-4 w-4 text-primary"}),t[16]=k,t[17]=h):(k=t[16],h=t[17]);let D;t[18]===d?D=t[19]:(D=()=>d("up"),t[18]=d,t[19]=D);let j;t[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,o.jsx)(ro,{className:"h-3.5 w-3.5"}),t[20]=j):j=t[20];let w;t[21]===D?w=t[22]:(w=(0,o.jsx)(oe,{variant:"ghost",size:"icon",onClick:D,children:j}),t[21]=D,t[22]=w);let C=e===null?`${i.length} pending`:`${e+1} / ${i.length}`,S;t[23]===C?S=t[24]:(S=(0,o.jsx)("span",{className:"text-xs font-mono min-w-[3.5rem] text-center",children:C}),t[23]=C,t[24]=S);let _;t[25]===d?_=t[26]:(_=()=>d("down"),t[25]=d,t[26]=_);let E;t[27]===Symbol.for("react.memo_cache_sentinel")?(E=(0,o.jsx)(ar,{className:"h-3.5 w-3.5"}),t[27]=E):E=t[27];let T;t[28]===_?T=t[29]:(T=(0,o.jsx)(oe,{variant:"ghost",size:"icon",onClick:_,children:E}),t[28]=_,t[29]=T);let N;t[30]!==S||t[31]!==T||t[32]!==w?(N=(0,o.jsxs)("div",{className:"flex items-center",children:[w,S,T]}),t[30]=S,t[31]=T,t[32]=w,t[33]=N):N=t[33];let $;t[34]===Symbol.for("react.memo_cache_sentinel")?($=(0,o.jsx)("div",{className:"h-5 w-px bg-border"}),t[34]=$):$=t[34];let z;t[35]!==g||t[36]!==y?(z=(0,o.jsx)(vx,{multipleCompletions:!0,onAccept:g,isLoading:!1,size:"xs",buttonStyles:"h-6.5",playButtonStyles:"h-6.5",runCell:y}),t[35]=g,t[36]=y,t[37]=z):z=t[37];let P;t[38]===b?P=t[39]:(P=(0,o.jsx)(bx,{multipleCompletions:!0,onDecline:b,size:"xs",className:"h-6.5"}),t[38]=b,t[39]=P);let I;t[40]!==z||t[41]!==P?(I=(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[z,P]}),t[40]=z,t[41]=P,t[42]=I):I=t[42];let A;return t[43]!==N||t[44]!==I?(A=(0,o.jsxs)("div",{className:k,children:[h,N,$,I]}),t[43]=N,t[44]=I,t[45]=A):A=t[45],A};function $h(t){yb(t,"focus")}var zh=U(),Ah=Ef("marimo:chrome:ai-panel-tab","chat",zf);function Bh(){let t=(0,zh.c)(3),[e,r]=xr(Ah),n;return t[0]!==e||t[1]!==r?(n={aiPanelTab:e,setAiPanelTab:r},t[0]=e,t[1]=r,t[2]=n):n=t[2],n}var Ph=U(),Gl=v.lazy(()=>_e(()=>import("./terminal-CjhjkmtR.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]),import.meta.url)),Kh=v.lazy(()=>_e(()=>import("./chat-panel-D4Bcz2Sv.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([44,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141]),import.meta.url)),Oh=v.lazy(()=>_e(()=>import("./agent-panel-Bh2AfKzA.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([142,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,143,144,145,146,147,148,149,150,151,115,116,125,126,137,118,119,120,121,122,123,124,152,153,154,114,155,156,157,138,139,140,158,129,159,160,161,162,163,111,112,113,117,127,128,130,131,132,136,28,164,135,165,166,167]),import.meta.url)),Rh=v.lazy(()=>_e(()=>import("./dependency-graph-panel-DED_3Q6I.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([168,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,169,91,35,92,93,94,95,96,128,129,130,170,171,172,112,1,2,16,17,113,114,173,174,175,116,87,86,89,90,153,98,119,104,126,101,39,176,177,178,132,179,42,152,120,180,181,115,182,183,184,141,185,186,187]),import.meta.url)),Mh=v.lazy(()=>_e(()=>import("./session-panel-Co_o0ALo.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([188,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,7,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,189,113,190,136,191,192,193,89,194,88,195,108,196,42,197,198,105,106,199,176,181,200,201,202,109,186]),import.meta.url)),Fh=v.lazy(()=>_e(()=>import("./documentation-panel-CG2t9UyE.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([203,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,154,114,137,39,41,101,96,95,155]),import.meta.url)),Vh=v.lazy(()=>_e(()=>import("./error-panel-CDGOPmKx.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([204,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126]),import.meta.url)),Lh=v.lazy(()=>_e(()=>import("./file-explorer-panel-OefSIlIn.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([205,206,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,7,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,207,165,131,208,209,1,127,210,211,212,213,214,215,184,178,216,196,109,217,42,110,218]),import.meta.url)),Hh=v.lazy(()=>_e(()=>import("./logs-panel-CZIVXROt.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([219,220,11,12,5,6,7,9,46,47,48,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,115,116,87,86,91,35,92,93,94,95,96]),import.meta.url)),Wh=v.lazy(()=>_e(()=>import("./outline-panel-BGroTTXd.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([221,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,222,101,223]),import.meta.url)),Uh=v.lazy(()=>_e(()=>import("./packages-panel-CQGOcCdz.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([224,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,136,151]),import.meta.url)),qh=v.lazy(()=>_e(()=>import("./scratchpad-panel-BH-ZA_0Y.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([225,226,7,143,47,144,20,145,146,147,148,23,46,48,11,12,5,6,9,49,4,3,8,50,10,13,15,14,51,18,52,19,21,22,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,149,150,151,17,115,116,87,86,91,35,92,93,94,95,96,83,84,2,16,97,125,126,137,39,41,82,118,119,120,121,122,123,124,152,90,98,153,104,154,114,101,155,100,102,156,103,157,138,139,140,158,129,159,160,161,107,162,163,227,169,128,130,170,222,228,190,178,108,117,89,99,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,177,327,132,328,212,329,330,45,1,85,88,105,106,109,42,110,112,111,113,127,131,173,207,165,208,209,331,332,333,164,334,217,335,336,180,337,338]),import.meta.url)),Xh=v.lazy(()=>_e(()=>import("./secrets-panel-Db_JucCn.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([339,136,5,6,7,9,192,49,20,4,11,12,86,87,3,8,51,14,193,91,35,21,22,23,36,37,38,92,62,24,93,94,95,96,50,10,13,15,89,90,97,52,54,82,116,48,100,53,34,30,197,102,103,104,27,39,41,108,338]),import.meta.url)),Gh=v.lazy(()=>_e(()=>import("./snippets-panel-Dg7V8q_w.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([340,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,136,180,337,101,82,116,87,86,91,35,92,93,94,95,96,152,90,154,114,137,39,41,155,120,102,121,103,104,108,338,341]),import.meta.url)),Yh=v.lazy(()=>_e(()=>import("./tracing-panel-BKDVrccB.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([342,47,82,11,12,14,6,7,5,9]),import.meta.url)),Zh=v.lazy(()=>_e(()=>import("./cache-panel-D07YsKqa.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([343,136,5,6,7,9,82,11,12,14,87,49,20,4,3,8,52,344,21,22,23,54,24,102,92,62,94,95,79,109,42]),import.meta.url));const Jh=t=>{let e=(0,Ph.c)(179),{children:r}=t,{isSidebarOpen:n,isDeveloperPanelOpen:a,selectedPanel:i,selectedDeveloperPanelTab:l}=Ba(),{setIsSidebarOpen:s,setIsDeveloperPanelOpen:c,openApplication:u}=hn(),m=v.useRef(null),d=v.useRef(null),{aiPanelTab:p,setAiPanelTab:g}=Bh(),{dependencyPanelTab:x,setDependencyPanelTab:b}=xx(),f=Y(Pa),[y,k]=xr(Ka),h=Y(ns),D;if(e[0]!==h||e[1]!==y.developerPanel){let X;e[3]===h?X=e[4]:(X=Ae=>{let ke=as.get(Ae);return!ke||fn(ke,h)?[]:[ke]},e[3]=h,e[4]=X),D=y.developerPanel.flatMap(X),e[0]=h,e[1]=y.developerPanel,e[2]=D}else D=e[2];let j=D,w;e[5]===k?w=e[6]:(w=X=>{k(Ae=>({...Ae,developerPanel:X.map(Qh)}))},e[5]=k,e[6]=w);let C=w,S;e[7]!==u||e[8]!==y.sidebar||e[9]!==i||e[10]!==k?(S=(X,Ae)=>{if(Ae==="sidebar"&&(k(ke=>({...ke,sidebar:ke.sidebar.filter(Na=>Na!==X.type)})),i===X.type)){let ke=y.sidebar.filter(Na=>Na!==X.type);ke.length>0&&u(ke[0])}u(X.type)},e[7]=u,e[8]=y.sidebar,e[9]=i,e[10]=k,e[11]=S):S=e[11];let _=S,E;e[12]===y.sidebar?E=e[13]:(E=new Set(y.sidebar),e[12]=y.sidebar,e[13]=E);let T=E,N;e[14]!==h||e[15]!==T?(N=us.filter(X=>!(fn(X,h)||T.has(X.type))),e[14]=h,e[15]=T,e[16]=N):N=e[16];let $=N,z,P;e[17]===n?(z=e[18],P=e[19]):(z=()=>{if(!m.current)return;let X=m.current.isCollapsed();n&&X&&m.current.expand(),!n&&!X&&m.current.collapse(),requestAnimationFrame(tf)},P=[n],e[17]=n,e[18]=z,e[19]=P),(0,v.useEffect)(z,P);let I,A;e[20]===a?(I=e[21],A=e[22]):(I=()=>{if(!d.current)return;let X=d.current.isCollapsed();a&&X&&d.current.expand(),!a&&!X&&d.current.collapse(),requestAnimationFrame(nf)},A=[a],e[20]=a,e[21]=I,e[22]=A),(0,v.useEffect)(I,A);let B,R;e[23]!==j||e[24]!==a||e[25]!==u||e[26]!==l||e[27]!==c?(B=()=>{a&&(j.some(X=>X.type===l)||(j.length>0?u(j[0].type):c(!1)))},R=[a,j,l,u,c],e[23]=j,e[24]=a,e[25]=u,e[26]=l,e[27]=c,e[28]=B,e[29]=R):(B=e[28],R=e[29]),(0,v.useEffect)(B,R);let K;e[30]===r?K=e[31]:(K=(0,o.jsx)(Vn,{id:"app",className:"relative h-full",children:(0,o.jsx)(v.Suspense,{children:r})},"app"),e[30]=r,e[31]=K);let M=K,H=!n,O;e[32]===Symbol.for("react.memo_cache_sentinel")?(O={coarse:15,fine:2},e[32]=O):O=e[32];let F=n?"resize-handle":"resize-handle-collapsed",L;e[33]===F?L=e[34]:(L=Z("border-border print:hidden z-10",F,"vertical"),e[33]=F,e[34]=L);let V;e[35]!==H||e[36]!==L?(V=(0,o.jsx)(du,{disabled:H,onDragging:fs,hitAreaMargins:O,className:L}),e[35]=H,e[36]=L,e[37]=V):V=e[37];let G=V,W=!a,q=a?"resize-handle":"resize-handle-collapsed",ee;e[38]===q?ee=e[39]:(ee=Z("border-border print:hidden z-20",q,"horizontal"),e[38]=q,e[39]=ee);let te;e[40]!==W||e[41]!==ee?(te=(0,o.jsx)(du,{disabled:W,onDragging:fs,className:ee}),e[40]=W,e[41]=ee,e[42]=te):te=e[42];let re=te,ae;e[43]===Symbol.for("react.memo_cache_sentinel")?(ae=Pf("external_agents"),e[43]=ae):ae=e[43];let J=ae,se;e[44]===p?se=e[45]:(se=()=>J&&p==="agents"?(0,o.jsx)(Oh,{}):(0,o.jsx)(Kh,{}),e[44]=p,e[45]=se);let ge=se,ye,he,Ie,Ne,le,ce,Ee;e[46]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,o.jsx)(Lh,{}),he=(0,o.jsx)(Mh,{}),Ie=(0,o.jsx)(Rh,{}),Ne=(0,o.jsx)(Uh,{}),le=(0,o.jsx)(Wh,{}),ce=(0,o.jsx)(Fh,{}),Ee=(0,o.jsx)(Gh,{}),e[46]=ye,e[47]=he,e[48]=Ie,e[49]=Ne,e[50]=le,e[51]=ce,e[52]=Ee):(ye=e[46],he=e[47],Ie=e[48],Ne=e[49],le=e[50],ce=e[51],Ee=e[52]);let Re;e[53]===ge?Re=e[54]:(Re=ge(),e[53]=ge,e[54]=Re);let ie,et,nt,at,ft;e[55]===Symbol.for("react.memo_cache_sentinel")?(ie=(0,o.jsx)(Vh,{}),et=(0,o.jsx)(qh,{}),nt=(0,o.jsx)(Yh,{}),at=(0,o.jsx)(Xh,{}),ft=(0,o.jsx)(Hh,{}),e[55]=ie,e[56]=et,e[57]=nt,e[58]=at,e[59]=ft):(ie=e[55],et=e[56],nt=e[57],at=e[58],ft=e[59]);let $t=n&&i==="terminal",ot;e[60]===s?ot=e[61]:(ot=()=>s(!1),e[60]=s,e[61]=ot);let it;e[62]!==$t||e[63]!==ot?(it=(0,o.jsx)(Gl,{visible:$t,onClose:ot}),e[62]=$t,e[63]=ot,e[64]=it):it=e[64];let zt;e[65]===Symbol.for("react.memo_cache_sentinel")?(zt=(0,o.jsx)(Zh,{}),e[65]=zt):zt=e[65];let xt;e[66]!==Re||e[67]!==it?(xt={files:ye,variables:he,dependencies:Ie,packages:Ne,outline:le,documentation:ce,snippets:Ee,ai:Re,errors:ie,scratchpad:et,tracing:nt,secrets:at,logs:ft,terminal:it,cache:zt},e[66]=Re,e[67]=it,e[68]=xt):xt=e[68];let ve=xt,fe;e[69]!==p||e[70]!==x||e[71]!==i||e[72]!==g||e[73]!==b?(fe=i==="dependencies"?(0,o.jsxs)("div",{className:"flex items-center justify-between flex-1",children:[(0,o.jsx)("span",{className:"text-sm text-(--slate-11) uppercase tracking-wide font-semibold",children:"Dependencies"}),(0,o.jsx)(ou,{value:x,onValueChange:X=>{(X==="minimap"||X==="graph")&&b(X)},children:(0,o.jsxs)(au,{children:[(0,o.jsx)(Rn,{value:"minimap",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Minimap"}),(0,o.jsx)(Rn,{value:"graph",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Graph"})]})})]}):i==="ai"&&J?(0,o.jsx)(ou,{value:p,onValueChange:X=>{(X==="chat"||X==="agents")&&g(X)},children:(0,o.jsxs)(au,{children:[(0,o.jsx)(Rn,{value:"chat",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Chat"}),(0,o.jsx)(Rn,{value:"agents",className:"py-0.5 text-xs uppercase tracking-wide font-bold",children:"Agents"})]})}):(0,o.jsx)("span",{className:"text-sm text-(--slate-11) uppercase tracking-wide font-semibold flex-1",children:i}),e[69]=p,e[70]=x,e[71]=i,e[72]=g,e[73]=b,e[74]=fe):fe=e[74];let xe;e[75]===s?xe=e[76]:(xe=()=>s(!1),e[75]=s,e[76]=xe);let Pe;e[77]===Symbol.for("react.memo_cache_sentinel")?(Pe=(0,o.jsx)(Ge,{className:"w-4 h-4"}),e[77]=Pe):Pe=e[77];let De;e[78]===xe?De=e[79]:(De=(0,o.jsx)(oe,{"data-testid":"close-helper-pane",className:"m-0",size:"xs",variant:"text",onClick:xe,children:Pe}),e[78]=xe,e[79]=De);let de;e[80]!==fe||e[81]!==De?(de=(0,o.jsxs)("div",{className:"p-3 border-b flex justify-between items-center",children:[fe,De]}),e[80]=fe,e[81]=De,e[82]=de):de=e[82];let Ce;e[83]===ve?Ce=e[84]:(Ce=Object.entries(ve),e[83]=ve,e[84]=Ce);let ue;e[85]!==n||e[86]!==i||e[87]!==Ce?(ue=(0,o.jsx)(v.Suspense,{children:(0,o.jsx)(Bn,{children:Ce.map(X=>{let[Ae,ke]=X;return(0,o.jsx)(Xl,{mode:n&&i===Ae?"visible":"hidden",children:ke},Ae)})})}),e[85]=n,e[86]=i,e[87]=Ce,e[88]=ue):ue=e[88];let pe;e[89]!==de||e[90]!==ue?(pe=(0,o.jsx)(Is,{children:(0,o.jsx)(pu,{value:"sidebar",children:(0,o.jsxs)("div",{className:"flex flex-col h-full flex-1 overflow-hidden mr-[-4px]",children:[de,ue]})})}),e[89]=de,e[90]=ue,e[91]=pe):pe=e[91];let Ke=pe,He=n&&"border-r border-l border-(--slate-7)",$e;e[92]===He?$e=e[93]:($e=Z("dark:bg-(--slate-1) print:hidden hide-on-fullscreen",He),e[92]=He,e[93]=$e);let Oe;e[94]===Symbol.for("react.memo_cache_sentinel")?(Oe=(X,Ae)=>{var ke;Ae===0&&X===10&&((ke=m.current)==null||ke.resize(30))},e[94]=Oe):Oe=e[94];let Me,Ue;e[95]===s?(Me=e[96],Ue=e[97]):(Me=()=>s(!1),Ue=()=>s(!0),e[95]=s,e[96]=Me,e[97]=Ue);let At;e[98]!==Ke||e[99]!==G?(At=(0,o.jsxs)("span",{className:"flex flex-row h-full",children:[Ke," ",G]}),e[98]=Ke,e[99]=G,e[100]=At):At=e[100];let Gr;e[101]!==$e||e[102]!==Me||e[103]!==Ue||e[104]!==At?(Gr=(0,o.jsx)(Vn,{ref:m,id:"app-chrome-sidebar","data-testid":"helper",collapsedSize:0,collapsible:!0,className:$e,minSize:10,defaultSize:0,maxSize:75,onResize:Oe,onCollapse:Me,onExpand:Ue,children:At},"helper"),e[101]=$e,e[102]=Me,e[103]=Ue,e[104]=At,e[105]=Gr):Gr=e[105];let Ea=Gr,Ca=a&&l==="terminal",Bt;e[106]===c?Bt=e[107]:(Bt=()=>c(!1),e[106]=c,e[107]=Bt);let Pt;e[108]!==Ca||e[109]!==Bt?(Pt=(0,o.jsx)(Gl,{visible:Ca,onClose:Bt}),e[108]=Ca,e[109]=Bt,e[110]=Pt):Pt=e[110];let Yr;e[111]!==ve||e[112]!==Pt?(Yr={...ve,terminal:Pt},e[111]=ve,e[112]=Pt,e[113]=Yr):Yr=e[113];let Sa=Yr,Ta=a&&"border-t",Kt;e[114]===Ta?Kt=e[115]:(Kt=Z("dark:bg-(--slate-1) print:hidden hide-on-fullscreen",Ta),e[114]=Ta,e[115]=Kt);let Zr;e[116]===Symbol.for("react.memo_cache_sentinel")?(Zr=(X,Ae)=>{var ke;Ae===0&&X===10&&((ke=d.current)==null||ke.resize(30))},e[116]=Zr):Zr=e[116];let Ot,Rt;e[117]===c?(Ot=e[118],Rt=e[119]):(Ot=()=>c(!1),Rt=()=>c(!0),e[117]=c,e[118]=Ot,e[119]=Rt);let Mt;e[120]===_?Mt=e[121]:(Mt={dragType:"panels",listId:"developer-panel",onReceive:_},e[120]=_,e[121]=Mt);let Ft;e[122]===u?Ft=e[123]:(Ft=X=>u(X.type),e[122]=u,e[123]=Ft);let Vt;e[124]!==f||e[125]!==l?(Vt=X=>(0,o.jsxs)("div",{className:Z("text-sm flex gap-2 px-2 pt-1 pb-0.5 items-center leading-none rounded-sm cursor-pointer",l===X.type?"bg-muted":"hover:bg-muted/50"),children:[(0,o.jsx)(X.Icon,{className:Z("w-4 h-4",X.type==="errors"&&f>0&&"text-destructive")}),X.label]}),e[124]=f,e[125]=l,e[126]=Vt):Vt=e[126];let Lt;e[127]!==$||e[128]!==j||e[129]!==C||e[130]!==Mt||e[131]!==Ft||e[132]!==Vt?(Lt=(0,o.jsx)(Wl,{value:j,setValue:C,getKey:af,availableItems:$,crossListDrag:Mt,getItemLabel:of,ariaLabel:"Developer panel tabs",className:"flex flex-row gap-1",minItems:0,onAction:Ft,renderItem:Vt}),e[127]=$,e[128]=j,e[129]=C,e[130]=Mt,e[131]=Ft,e[132]=Vt,e[133]=Lt):Lt=e[133];let Jr,Qr,en,tn;e[134]===Symbol.for("react.memo_cache_sentinel")?(Jr=(0,o.jsx)("div",{className:"border-l border-border h-4 mx-1"}),Qr=(0,o.jsx)(Vl,{}),en=(0,o.jsx)(_h,{}),tn=(0,o.jsx)("div",{className:"flex-1"}),e[134]=Jr,e[135]=Qr,e[136]=en,e[137]=tn):(Jr=e[134],Qr=e[135],en=e[136],tn=e[137]);let Ht;e[138]===c?Ht=e[139]:(Ht=()=>c(!1),e[138]=c,e[139]=Ht);let rn;e[140]===Symbol.for("react.memo_cache_sentinel")?(rn=(0,o.jsx)(Ge,{className:"w-4 h-4"}),e[140]=rn):rn=e[140];let Wt;e[141]===Ht?Wt=e[142]:(Wt=(0,o.jsx)(oe,{size:"xs",variant:"text",onClick:Ht,children:rn}),e[141]=Ht,e[142]=Wt);let Ut;e[143]!==Lt||e[144]!==Wt?(Ut=(0,o.jsxs)("div",{className:"flex items-center justify-between border-b px-2 h-8 bg-background shrink-0",children:[Lt,Jr,Qr,en,tn,Wt]}),e[143]=Lt,e[144]=Wt,e[145]=Ut):Ut=e[145];let nn;e[146]===Symbol.for("react.memo_cache_sentinel")?(nn=(0,o.jsx)("div",{}),e[146]=nn):nn=e[146];let qt;e[147]===Sa?qt=e[148]:(qt=Object.entries(Sa),e[147]=Sa,e[148]=qt);let Xt;e[149]!==a||e[150]!==l||e[151]!==qt?(Xt=(0,o.jsx)(v.Suspense,{fallback:nn,children:(0,o.jsx)(pu,{value:"developer-panel",children:(0,o.jsx)("div",{className:"flex-1 overflow-hidden",children:qt.map(X=>{let[Ae,ke]=X;return(0,o.jsx)(Xl,{mode:a&&l===Ae?"visible":"hidden",children:ke},Ae)})})})}),e[149]=a,e[150]=l,e[151]=qt,e[152]=Xt):Xt=e[152];let Gt;e[153]!==Ut||e[154]!==Xt?(Gt=(0,o.jsxs)("div",{className:"flex flex-col h-full",children:[Ut,Xt]}),e[153]=Ut,e[154]=Xt,e[155]=Gt):Gt=e[155];let an;e[156]!==re||e[157]!==Kt||e[158]!==Ot||e[159]!==Rt||e[160]!==Gt?(an=(0,o.jsxs)(Vn,{ref:d,id:"app-chrome-panel","data-testid":"panel",collapsedSize:0,collapsible:!0,className:Kt,minSize:10,defaultSize:0,maxSize:75,onResize:Zr,onCollapse:Ot,onExpand:Rt,children:[re,Gt]},"panel"),e[156]=re,e[157]=Kt,e[158]=Ot,e[159]=Rt,e[160]=Gt,e[161]=an):an=e[161];let _a=an,on;e[162]===Symbol.for("react.memo_cache_sentinel")?(on=(0,o.jsx)(Bn,{children:(0,o.jsx)(yh,{})}),e[162]=on):on=e[162];let Ia=a&&!n&&"border-l",Yt;e[163]===Ia?Yt=e[164]:(Yt=Z(Ia),e[163]=Ia,e[164]=Yt);let Zt;e[165]!==M||e[166]!==_a?(Zt=(0,o.jsxs)(cu,{autoSaveId:"marimo:chrome:v1:l1",direction:"vertical",children:[M,_a]}),e[165]=M,e[166]=_a,e[167]=Zt):Zt=e[167];let Jt;e[168]!==Yt||e[169]!==Zt?(Jt=(0,o.jsx)(Vn,{id:"app-chrome-body",className:Yt,children:Zt}),e[168]=Yt,e[169]=Zt,e[170]=Jt):Jt=e[170];let ln;e[171]===Symbol.for("react.memo_cache_sentinel")?(ln=(0,o.jsx)(r0,{}),e[171]=ln):ln=e[171];let Qt;e[172]!==Ea||e[173]!==Jt?(Qt=(0,o.jsxs)(cu,{autoSaveId:"marimo:chrome:v1:l2",direction:"horizontal",children:[on,Ea,Jt,ln]}),e[172]=Ea,e[173]=Jt,e[174]=Qt):Qt=e[174];let sn;e[175]===Symbol.for("react.memo_cache_sentinel")?(sn=(0,o.jsx)(Nh,{}),e[175]=sn):sn=e[175];let un;e[176]===Symbol.for("react.memo_cache_sentinel")?(un=(0,o.jsx)(Is,{children:(0,o.jsx)(Bn,{children:(0,o.jsx)(ph,{})})}),e[176]=un):un=e[176];let cn;return e[177]===Qt?cn=e[178]:(cn=(0,o.jsxs)(k1,{children:[Qt,sn,un]}),e[177]=Qt,e[178]=cn),cn};function Qh(t){return t.type}function ef(){window.dispatchEvent(new Event("resize"))}function tf(){requestAnimationFrame(ef)}function rf(){window.dispatchEvent(new Event("resize"))}function nf(){requestAnimationFrame(rf)}function af(t){return t.type}function of(t){return(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[(0,o.jsx)(t.Icon,{className:"w-4 h-4 text-muted-foreground"}),t.label]})}let Yl,wa,Zl;Yl=U(),wa=(0,v.lazy)(()=>_e(()=>import("./command-palette-CXYdoElD.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([345,45,46,47,48,11,12,5,6,7,9,49,20,4,3,8,50,10,13,15,14,51,18,52,19,21,22,23,24,25,26,27,53,34,30,33,32,31,54,55,56,57,38,58,59,60,61,62,63,29,64,65,66,67,68,69,70,71,72,73,74,75,76,77,36,37,78,79,80,81,82,1,2,16,17,83,84,85,86,87,88,89,90,35,91,92,93,94,95,96,97,98,99,100,101,102,103,104,39,105,106,107,41,108,109,42,110,143,144,145,146,147,148,149,150,151,115,116,125,126,137,118,119,120,121,122,123,124,152,153,154,114,155,156,157,138,139,140,158,129,159,160,161,162,163,227,169,128,130,170,222,228,190,178,117,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,177,327,132,328,212,329,172,112,113,173,174,175,176,179,346,191,192,193,194,195,196,197,198,199,347,331,332,348,210,215,216,131,349,350,141]),import.meta.url)),Zl=new URL(window.location.href).searchParams.get(R0.showChrome)==="false",gu=t=>{let e=(0,Yl.c)(10);if(Zl){let i;e[0]===t?i=e[1]:(i=(0,o.jsx)(Ml,{hideControls:!0,...t}),e[0]=t,e[1]=i);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)(wa,{}),e[2]=l):l=e[2];let s;return e[3]===i?s=e[4]:(s=(0,o.jsxs)(o.Fragment,{children:[i,l]}),e[3]=i,e[4]=s),s}let r;e[5]===t?r=e[6]:(r=(0,o.jsx)(Ml,{...t}),e[5]=t,e[6]=r);let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(wa,{}),e[7]=n):n=e[7];let a;return e[8]===r?a=e[9]:(a=(0,o.jsxs)(Jh,{children:[r,n]}),e[8]=r,e[9]=a),a}});export{$b as __tla,gu as default};
|