videobook 0.2.2 → 0.2.3

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.
@@ -1,2 +1,2 @@
1
- import{c as Xe,a as Ie,j as t}from"./vendor-react-Dj7D1fD4.js";import{dM as It,dN as Dt,aj as Rt,dO as Gt,dP as Ot,dQ as Lt,dR as Kt,dS as Bt,dT as Ht,dU as Wt,dV as At,dW as Ft,dX as dt,dY as Ut,dZ as $t,d_ as ft,d$ as qt,e0 as Mt,e1 as xt,e2 as zt,e3 as Yt,e4 as Xt,e5 as Et,c0 as Jt,e6 as Qt,e7 as ht,e8 as Zt,e9 as _t,ea as es}from"./videobook-DZ58pKW5.js";import{b as ts}from"./vendor-yctIZ9Dz.js";import{l as ss,m as ls,n as as,o as ns,p as os,q as Tt}from"./ui-OHFUngrc.js";import{af as jt,Y as is,m as rs,X as cs}from"./vendor-icons-CGqhCIXV.js";import{C as ds}from"./confirm-bodies-aq6Az8Md.js";function ms(n){const e=Xe.c(15),{row:s}=n,l=Rt(s.startedAt);let a;e[0]!==l||e[1]!==s.detail||e[2]!==s.state?(a=s.state==="generating"?l===null?"Generating":Gt(l):s.detail,e[0]=l,e[1]=s.detail,e[2]=s.state,e[3]=a):a=e[3];const v=a;let h;e[4]!==s.number?(h=t.jsx("span",{className:"goal-tile-row-number",children:s.number}),e[4]=s.number,e[5]=h):h=e[5];let j;e[6]!==s.title?(j=t.jsx("span",{className:"goal-tile-row-title",children:s.title}),e[6]=s.title,e[7]=j):j=e[7];let f;e[8]!==v?(f=t.jsx("span",{className:"goal-tile-row-state",children:v}),e[8]=v,e[9]=f):f=e[9];let C;return e[10]!==s.state||e[11]!==h||e[12]!==j||e[13]!==f?(C=t.jsxs("li",{className:"goal-tile-row","data-state":s.state,children:[h,j,f]}),e[10]=s.state,e[11]=h,e[12]=j,e[13]=f,e[14]=C):C=e[14],C}function wt(){return document.activeElement instanceof HTMLElement?document.activeElement:null}function Ds(n){const e=Xe.c(91),{id:s,data:l,selected:a}=n,v=Ie.useContext(ss),h=Ie.useContext(ls),j=Ie.useContext(as),f=Ie.useContext(ns);let C,c,G,x,i,o,w,r,V,u,m,k,E,M,O,D,b;if(e[0]!==f||e[1]!==l.deleting||e[2]!==l.highlighted||e[3]!==l.inputs||e[4]!==l.label||e[5]!==l.revealing||e[6]!==l.slot||e[7]!==v||e[8]!==s||e[9]!==h||e[10]!==j||e[11]!==a){const N=v.get(s)??null;b=It(N,Dt(l.inputs),l.label);let S;e[29]!==l.slot?(S=ts(l.slot),e[29]=l.slot,e[30]=S):S=e[30],C=S;const me=a&&j===s;let pe;e[31]!==f||e[32]!==s?(pe=K=>{K.preventDefault(),K.stopPropagation(),f.open(s,{x:K.clientX,y:K.clientY},wt())},e[31]=f,e[32]=s,e[33]=pe):pe=e[33];const le=pe;let _;e[34]!==f||e[35]!==s?(_=K=>{if(K.key!=="ContextMenu"&&!(K.shiftKey&&K.key==="F10"))return;K.preventDefault(),K.stopPropagation();const Z=K.currentTarget.getBoundingClientRect();f.open(s,{x:Z.left+Math.min(Z.width-12,40),y:Z.top+40},wt())},e[34]=f,e[35]=s,e[36]=_):_=e[36];const Q=_,ce=a?"cell-node-selected":"",ge=me?"cell-node-primary":"",re=b.chip.tone==="attention"?"cell-node-error":"",ae=l.deleting?"cell-node-deleting":"",ne=l.revealing?"cell-node-created":"",oe=l.highlighted?"cell-node-highlight":"";let ye;e[37]!==ce||e[38]!==ge||e[39]!==re||e[40]!==ae||e[41]!==ne||e[42]!==oe?(ye=["cell-node","cell-kind-goal","cell-family-goal",ce,ge,re,ae,ne,oe].filter(Boolean),e[37]=ce,e[38]=ge,e[39]=re,e[40]=ae,e[41]=ne,e[42]=oe,e[43]=ye):ye=e[43],D=ye.join(" "),G=`${C} goal: ${b.title}`,x=me?"primary":a?"selected":void 0,i=b.chip.tone,o=f.openCellId===s?"true":void 0,w=le,r=Q,M="cell-node-shell";let te;e[44]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsxs("span",{className:"cell-node-type","aria-label":"GOAL",children:[t.jsx(jt,{size:14}),t.jsx("span",{className:"cell-node-type-label","aria-hidden":"true",children:"GOAL"})]}),e[44]=te):te=e[44],O=t.jsxs("header",{className:"cell-node-header",children:[te,(b.shotsLabel||b.aspectRatio)&&t.jsxs("span",{className:"cell-generation-chips",children:[b.shotsLabel&&t.jsx("span",{className:"cell-aspect-ratio",title:"Shots",children:b.shotsLabel}),b.aspectRatio&&t.jsx("span",{className:"cell-aspect-ratio",title:"Aspect ratio",children:b.aspectRatio})]})]}),c="goal-tile-body",V=t.jsx("strong",{className:"goal-tile-title",title:b.title,children:b.title}),u=b.styleLabel&&t.jsx("span",{className:"cell-aspect-ratio goal-style-chip",title:"Goal style",children:b.styleLabel}),m=N&&N.characters.length>0&&t.jsxs("span",{className:"goal-tile-characters",children:[N.characters.length," reference",N.characters.length===1?"":"s"]}),k=b.thumbnails.length>0&&t.jsx("span",{className:"goal-tile-thumbnails",children:b.thumbnails.map(K=>{const Z=h.get(K.artifactId),ue=Z?.thumbnailUrl??Z?.mediaUrl;return ue?t.jsx("img",{src:ue,alt:K.label},K.artifactId):null})}),E=b.planning?t.jsxs(t.Fragment,{children:[b.note&&t.jsx("p",{className:"goal-tile-brief",children:b.note}),t.jsxs("span",{className:"goal-tile-placeholder","aria-hidden":"true",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("ol",{className:"goal-tile-rows",children:[b.rows.map(ps),b.hiddenRows>0&&t.jsxs("li",{className:"goal-tile-more",children:["+",b.hiddenRows," more"]})]}),b.note&&t.jsx("p",{className:"goal-tile-note","data-tone":b.noteTone,children:b.note})]}),e[0]=f,e[1]=l.deleting,e[2]=l.highlighted,e[3]=l.inputs,e[4]=l.label,e[5]=l.revealing,e[6]=l.slot,e[7]=v,e[8]=s,e[9]=h,e[10]=j,e[11]=a,e[12]=C,e[13]=c,e[14]=G,e[15]=x,e[16]=i,e[17]=o,e[18]=w,e[19]=r,e[20]=V,e[21]=u,e[22]=m,e[23]=k,e[24]=E,e[25]=M,e[26]=O,e[27]=D,e[28]=b}else C=e[12],c=e[13],G=e[14],x=e[15],i=e[16],o=e[17],w=e[18],r=e[19],V=e[20],u=e[21],m=e[22],k=e[23],E=e[24],M=e[25],O=e[26],D=e[27],b=e[28];const Y=`${b.progressPercent}%`;let U;e[45]!==Y?(U=t.jsx("span",{className:"goal-tile-progress","aria-hidden":"true",children:t.jsx("span",{style:{width:Y}})}),e[45]=Y,e[46]=U):U=e[46];let L;e[47]!==c||e[48]!==U||e[49]!==V||e[50]!==u||e[51]!==m||e[52]!==k||e[53]!==E?(L=t.jsxs("div",{className:c,children:[V,u,m,k,E,U]}),e[47]=c,e[48]=U,e[49]=V,e[50]=u,e[51]=m,e[52]=k,e[53]=E,e[54]=L):L=e[54];let d;e[55]!==C?(d=t.jsx("strong",{children:C}),e[55]=C,e[56]=d):d=e[56];let p;e[57]!==b.chip.label||e[58]!==b.chip.tone?(p=t.jsx("span",{className:"goal-tile-chip","data-tone":b.chip.tone,children:b.chip.label}),e[57]=b.chip.label,e[58]=b.chip.tone,e[59]=p):p=e[59];const A=`Open ${C} cell menu`,R=f.openCellId===s;let P;e[60]!==s?(P=os(s),e[60]=s,e[61]=P):P=e[61];let B;e[62]!==f||e[63]!==s?(B=N=>{N.preventDefault(),N.stopPropagation();const S=N.currentTarget.getBoundingClientRect();f.open(s,{x:S.right-4,y:S.bottom+4},N.currentTarget)},e[62]=f,e[63]=s,e[64]=B):B=e[64];let H;e[65]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(is,{size:16,"aria-hidden":"true"}),e[65]=H):H=e[65];let z;e[66]!==A||e[67]!==R||e[68]!==P||e[69]!==B?(z=t.jsx("button",{type:"button",className:"cell-context-menu-trigger nodrag","aria-label":A,"aria-haspopup":"menu","aria-expanded":R,"aria-controls":P,title:"Cell actions",onClick:B,children:H}),e[66]=A,e[67]=R,e[68]=P,e[69]=B,e[70]=z):z=e[70];let $;e[71]!==p||e[72]!==z?($=t.jsxs("span",{className:"cell-node-footer-actions",children:[p,z]}),e[71]=p,e[72]=z,e[73]=$):$=e[73];let W;e[74]!==d||e[75]!==$?(W=t.jsxs("footer",{className:"cell-node-footer",children:[d,$]}),e[74]=d,e[75]=$,e[76]=W):W=e[76];let I;e[77]!==L||e[78]!==W||e[79]!==M||e[80]!==O?(I=t.jsxs("section",{className:M,children:[O,L,W]}),e[77]=L,e[78]=W,e[79]=M,e[80]=O,e[81]=I):I=e[81];let X;return e[82]!==G||e[83]!==x||e[84]!==i||e[85]!==o||e[86]!==w||e[87]!==r||e[88]!==I||e[89]!==D?(X=t.jsx("article",{className:D,"aria-label":G,"data-selection":x,"data-goal-tone":i,"data-context-menu-open":o,onContextMenu:w,onKeyDown:r,children:I}),e[82]=G,e[83]=x,e[84]=i,e[85]=o,e[86]=w,e[87]=r,e[88]=I,e[89]=D,e[90]=X):X=e[90],X}function ps(n){return t.jsx(ms,{row:n},n.key)}function Pt(n){const e=Xe.c(7),{text:s,short:l}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"goal-status-long",children:s}),e[0]=s,e[1]=a):a=e[1];let v;e[2]!==l?(v=t.jsx("span",{className:"goal-status-short",children:l}),e[2]=l,e[3]=v):v=e[3];let h;return e[4]!==a||e[5]!==v?(h=t.jsxs(t.Fragment,{children:[a,v]}),e[4]=a,e[5]=v,e[6]=h):h=e[6],h}function Ks(n){const e=Xe.c(47),{goal:s,disabled:l,onOpen:a}=n,v=l===void 0?!1:l,h=Ot(s),j=h.active?.state==="generating"?h.active.startedAt:null,f=Rt(j);let C;e[0]!==f||e[1]!==s?(C=Lt(s,f),e[0]=f,e[1]=s,e[2]=C):C=e[2];const c=C;let G;e[3]!==s?(G=It(s,s.plan,void 0),e[3]=s,e[4]=G):G=e[4];const{styleLabel:x}=G;let i;e[5]!==s?(i=Kt(s),e[5]=s,e[6]=i):i=e[6];const o=i;let w;e[7]!==s||e[8]!==o?(w={key:o,goal:s},e[7]=s,e[8]=o,e[9]=w):w=e[9];const[r,V]=Ie.useState(w),[u,m]=Ie.useState(null);r.key!==o&&(V({key:o,goal:s}),m(Bt(r.goal,s)));let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.animationName==="goal-status-roll-in"&&m(null)},e[10]=k):k=e[10];const E=k,M=h.total>0&&h.phase!=="planning"&&h.phase!=="review",O="goal-status",D=u?.tone,b="button",Y="goal-status-button",U=`Goal ${s.address??""}${x?` · ${x}`:""}: ${c.text}. Open the goal panel`,L=s.plan?.title??s.brief;let d,p;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(jt,{size:13,"aria-hidden":"true",className:"goal-status-flag"}),p=t.jsx("span",{className:"goal-status-kind","aria-hidden":"true",children:"Goal"}),e[11]=d,e[12]=p):(d=e[11],p=e[12]);let A;e[13]!==x?(A=x&&t.jsx("span",{className:"goal-status-style","aria-hidden":"true",children:x}),e[13]=x,e[14]=A):A=e[14];let R;e[15]!==c.short||e[16]!==c.text||e[17]!==u?(R=t.jsx("span",{className:"goal-status-text","aria-hidden":"true",children:u?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"goal-status-roll goal-status-roll-in",onAnimationEnd:E,children:t.jsx(Pt,{text:c.text,short:c.short})},`in:${u.id}`),t.jsx("span",{className:"goal-status-roll goal-status-roll-out",children:u.from},`out:${u.id}`)]}):t.jsx("span",{className:"goal-status-roll",children:t.jsx(Pt,{text:c.text,short:c.short})})}),e[15]=c.short,e[16]=c.text,e[17]=u,e[18]=R):R=e[18];let P;e[19]!==c.busy?(P=c.busy&&t.jsx("span",{className:"goal-status-spinner","aria-hidden":"true"}),e[19]=c.busy,e[20]=P):P=e[20];const B=M&&t.jsx("span",{className:"goal-status-ticks","aria-hidden":"true",children:h.shots.map(us)});let H;e[21]!==c.action?(H=c.action&&t.jsx("span",{className:"goal-status-action","aria-hidden":"true",children:c.action}),e[21]=c.action,e[22]=H):H=e[22];let z;e[23]!==v||e[24]!==a||e[25]!==U||e[26]!==L||e[27]!==d||e[28]!==p||e[29]!==A||e[30]!==R||e[31]!==P||e[32]!==B||e[33]!==H?(z=t.jsxs("button",{type:b,className:Y,disabled:v,"aria-label":U,title:L,onClick:a,children:[d,p,A,R,P,B,H]}),e[23]=v,e[24]=a,e[25]=U,e[26]=L,e[27]=d,e[28]=p,e[29]=A,e[30]=R,e[31]=P,e[32]=B,e[33]=H,e[34]=z):z=e[34];let $;e[35]!==c.announce?($=t.jsx("span",{className:"sr-only",role:"status",children:c.announce}),e[35]=c.announce,e[36]=$):$=e[36];let W;e[37]!==c.tone||e[38]!==z||e[39]!==$||e[40]!==D?(W=t.jsxs("div",{className:O,"data-tone":c.tone,"data-wake":D,children:[z,$]}),e[37]=c.tone,e[38]=z,e[39]=$,e[40]=D,e[41]=W):W=e[41];let I;e[42]!==u?(I=u&&t.jsx("span",{className:"command-transmit-scan goal-status-scan","aria-hidden":"true"},`scan:${u.id}`),e[42]=u,e[43]=I):I=e[43];let X;return e[44]!==W||e[45]!==I?(X=t.jsxs(t.Fragment,{children:[W,I]}),e[44]=W,e[45]=I,e[46]=X):X=e[46],X}function us(n){return t.jsx("i",{"data-state":n.state},n.index)}function Ye(n){const e=Xe.c(22),{label:s,name:l,value:a,budget:v,wordLimit:h,maxLength:j,disabled:f,placeholder:C,onChange:c}=n,G=l===void 0?s:l,x=j===void 0?6e3:j,i=Ht(a),o=h??Wt[v];let w;e[0]!==s?(w=t.jsx("span",{children:s}),e[0]=s,e[1]=w):w=e[1];let r;e[2]!==a?(r=a.split(`
1
+ import{c as Xe,a as Ie,j as t}from"./vendor-react-Dj7D1fD4.js";import{dN as It,dO as Dt,aj as Rt,dP as Gt,dQ as Ot,dR as Lt,dS as Kt,dT as Bt,dU as Ht,dV as Wt,dW as At,dX as Ft,dY as dt,dZ as Ut,d_ as $t,d$ as ft,e0 as qt,e1 as Mt,e2 as xt,e3 as zt,e4 as Yt,e5 as Xt,e6 as Et,c0 as Jt,e7 as Qt,e8 as ht,e9 as Zt,ea as _t,eb as es}from"./videobook-B5G0jMoi.js";import{b as ts}from"./vendor-yctIZ9Dz.js";import{l as ss,m as ls,n as as,o as ns,p as os,q as Tt}from"./ui-Cpr6zMTA.js";import{af as jt,Y as is,m as rs,X as cs}from"./vendor-icons-CGqhCIXV.js";import{C as ds}from"./confirm-bodies-Bw818V9J.js";function ms(n){const e=Xe.c(15),{row:s}=n,l=Rt(s.startedAt);let a;e[0]!==l||e[1]!==s.detail||e[2]!==s.state?(a=s.state==="generating"?l===null?"Generating":Gt(l):s.detail,e[0]=l,e[1]=s.detail,e[2]=s.state,e[3]=a):a=e[3];const v=a;let h;e[4]!==s.number?(h=t.jsx("span",{className:"goal-tile-row-number",children:s.number}),e[4]=s.number,e[5]=h):h=e[5];let j;e[6]!==s.title?(j=t.jsx("span",{className:"goal-tile-row-title",children:s.title}),e[6]=s.title,e[7]=j):j=e[7];let f;e[8]!==v?(f=t.jsx("span",{className:"goal-tile-row-state",children:v}),e[8]=v,e[9]=f):f=e[9];let C;return e[10]!==s.state||e[11]!==h||e[12]!==j||e[13]!==f?(C=t.jsxs("li",{className:"goal-tile-row","data-state":s.state,children:[h,j,f]}),e[10]=s.state,e[11]=h,e[12]=j,e[13]=f,e[14]=C):C=e[14],C}function wt(){return document.activeElement instanceof HTMLElement?document.activeElement:null}function Ds(n){const e=Xe.c(91),{id:s,data:l,selected:a}=n,v=Ie.useContext(ss),h=Ie.useContext(ls),j=Ie.useContext(as),f=Ie.useContext(ns);let C,c,G,x,i,o,w,r,V,u,m,k,E,M,O,D,b;if(e[0]!==f||e[1]!==l.deleting||e[2]!==l.highlighted||e[3]!==l.inputs||e[4]!==l.label||e[5]!==l.revealing||e[6]!==l.slot||e[7]!==v||e[8]!==s||e[9]!==h||e[10]!==j||e[11]!==a){const N=v.get(s)??null;b=It(N,Dt(l.inputs),l.label);let S;e[29]!==l.slot?(S=ts(l.slot),e[29]=l.slot,e[30]=S):S=e[30],C=S;const me=a&&j===s;let pe;e[31]!==f||e[32]!==s?(pe=K=>{K.preventDefault(),K.stopPropagation(),f.open(s,{x:K.clientX,y:K.clientY},wt())},e[31]=f,e[32]=s,e[33]=pe):pe=e[33];const le=pe;let _;e[34]!==f||e[35]!==s?(_=K=>{if(K.key!=="ContextMenu"&&!(K.shiftKey&&K.key==="F10"))return;K.preventDefault(),K.stopPropagation();const Z=K.currentTarget.getBoundingClientRect();f.open(s,{x:Z.left+Math.min(Z.width-12,40),y:Z.top+40},wt())},e[34]=f,e[35]=s,e[36]=_):_=e[36];const Q=_,ce=a?"cell-node-selected":"",ge=me?"cell-node-primary":"",re=b.chip.tone==="attention"?"cell-node-error":"",ae=l.deleting?"cell-node-deleting":"",ne=l.revealing?"cell-node-created":"",oe=l.highlighted?"cell-node-highlight":"";let ye;e[37]!==ce||e[38]!==ge||e[39]!==re||e[40]!==ae||e[41]!==ne||e[42]!==oe?(ye=["cell-node","cell-kind-goal","cell-family-goal",ce,ge,re,ae,ne,oe].filter(Boolean),e[37]=ce,e[38]=ge,e[39]=re,e[40]=ae,e[41]=ne,e[42]=oe,e[43]=ye):ye=e[43],D=ye.join(" "),G=`${C} goal: ${b.title}`,x=me?"primary":a?"selected":void 0,i=b.chip.tone,o=f.openCellId===s?"true":void 0,w=le,r=Q,M="cell-node-shell";let te;e[44]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsxs("span",{className:"cell-node-type","aria-label":"GOAL",children:[t.jsx(jt,{size:14}),t.jsx("span",{className:"cell-node-type-label","aria-hidden":"true",children:"GOAL"})]}),e[44]=te):te=e[44],O=t.jsxs("header",{className:"cell-node-header",children:[te,(b.shotsLabel||b.aspectRatio)&&t.jsxs("span",{className:"cell-generation-chips",children:[b.shotsLabel&&t.jsx("span",{className:"cell-aspect-ratio",title:"Shots",children:b.shotsLabel}),b.aspectRatio&&t.jsx("span",{className:"cell-aspect-ratio",title:"Aspect ratio",children:b.aspectRatio})]})]}),c="goal-tile-body",V=t.jsx("strong",{className:"goal-tile-title",title:b.title,children:b.title}),u=b.styleLabel&&t.jsx("span",{className:"cell-aspect-ratio goal-style-chip",title:"Goal style",children:b.styleLabel}),m=N&&N.characters.length>0&&t.jsxs("span",{className:"goal-tile-characters",children:[N.characters.length," reference",N.characters.length===1?"":"s"]}),k=b.thumbnails.length>0&&t.jsx("span",{className:"goal-tile-thumbnails",children:b.thumbnails.map(K=>{const Z=h.get(K.artifactId),ue=Z?.thumbnailUrl??Z?.mediaUrl;return ue?t.jsx("img",{src:ue,alt:K.label},K.artifactId):null})}),E=b.planning?t.jsxs(t.Fragment,{children:[b.note&&t.jsx("p",{className:"goal-tile-brief",children:b.note}),t.jsxs("span",{className:"goal-tile-placeholder","aria-hidden":"true",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("ol",{className:"goal-tile-rows",children:[b.rows.map(ps),b.hiddenRows>0&&t.jsxs("li",{className:"goal-tile-more",children:["+",b.hiddenRows," more"]})]}),b.note&&t.jsx("p",{className:"goal-tile-note","data-tone":b.noteTone,children:b.note})]}),e[0]=f,e[1]=l.deleting,e[2]=l.highlighted,e[3]=l.inputs,e[4]=l.label,e[5]=l.revealing,e[6]=l.slot,e[7]=v,e[8]=s,e[9]=h,e[10]=j,e[11]=a,e[12]=C,e[13]=c,e[14]=G,e[15]=x,e[16]=i,e[17]=o,e[18]=w,e[19]=r,e[20]=V,e[21]=u,e[22]=m,e[23]=k,e[24]=E,e[25]=M,e[26]=O,e[27]=D,e[28]=b}else C=e[12],c=e[13],G=e[14],x=e[15],i=e[16],o=e[17],w=e[18],r=e[19],V=e[20],u=e[21],m=e[22],k=e[23],E=e[24],M=e[25],O=e[26],D=e[27],b=e[28];const Y=`${b.progressPercent}%`;let U;e[45]!==Y?(U=t.jsx("span",{className:"goal-tile-progress","aria-hidden":"true",children:t.jsx("span",{style:{width:Y}})}),e[45]=Y,e[46]=U):U=e[46];let L;e[47]!==c||e[48]!==U||e[49]!==V||e[50]!==u||e[51]!==m||e[52]!==k||e[53]!==E?(L=t.jsxs("div",{className:c,children:[V,u,m,k,E,U]}),e[47]=c,e[48]=U,e[49]=V,e[50]=u,e[51]=m,e[52]=k,e[53]=E,e[54]=L):L=e[54];let d;e[55]!==C?(d=t.jsx("strong",{children:C}),e[55]=C,e[56]=d):d=e[56];let p;e[57]!==b.chip.label||e[58]!==b.chip.tone?(p=t.jsx("span",{className:"goal-tile-chip","data-tone":b.chip.tone,children:b.chip.label}),e[57]=b.chip.label,e[58]=b.chip.tone,e[59]=p):p=e[59];const A=`Open ${C} cell menu`,R=f.openCellId===s;let P;e[60]!==s?(P=os(s),e[60]=s,e[61]=P):P=e[61];let B;e[62]!==f||e[63]!==s?(B=N=>{N.preventDefault(),N.stopPropagation();const S=N.currentTarget.getBoundingClientRect();f.open(s,{x:S.right-4,y:S.bottom+4},N.currentTarget)},e[62]=f,e[63]=s,e[64]=B):B=e[64];let H;e[65]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(is,{size:16,"aria-hidden":"true"}),e[65]=H):H=e[65];let z;e[66]!==A||e[67]!==R||e[68]!==P||e[69]!==B?(z=t.jsx("button",{type:"button",className:"cell-context-menu-trigger nodrag","aria-label":A,"aria-haspopup":"menu","aria-expanded":R,"aria-controls":P,title:"Cell actions",onClick:B,children:H}),e[66]=A,e[67]=R,e[68]=P,e[69]=B,e[70]=z):z=e[70];let $;e[71]!==p||e[72]!==z?($=t.jsxs("span",{className:"cell-node-footer-actions",children:[p,z]}),e[71]=p,e[72]=z,e[73]=$):$=e[73];let W;e[74]!==d||e[75]!==$?(W=t.jsxs("footer",{className:"cell-node-footer",children:[d,$]}),e[74]=d,e[75]=$,e[76]=W):W=e[76];let I;e[77]!==L||e[78]!==W||e[79]!==M||e[80]!==O?(I=t.jsxs("section",{className:M,children:[O,L,W]}),e[77]=L,e[78]=W,e[79]=M,e[80]=O,e[81]=I):I=e[81];let X;return e[82]!==G||e[83]!==x||e[84]!==i||e[85]!==o||e[86]!==w||e[87]!==r||e[88]!==I||e[89]!==D?(X=t.jsx("article",{className:D,"aria-label":G,"data-selection":x,"data-goal-tone":i,"data-context-menu-open":o,onContextMenu:w,onKeyDown:r,children:I}),e[82]=G,e[83]=x,e[84]=i,e[85]=o,e[86]=w,e[87]=r,e[88]=I,e[89]=D,e[90]=X):X=e[90],X}function ps(n){return t.jsx(ms,{row:n},n.key)}function Pt(n){const e=Xe.c(7),{text:s,short:l}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"goal-status-long",children:s}),e[0]=s,e[1]=a):a=e[1];let v;e[2]!==l?(v=t.jsx("span",{className:"goal-status-short",children:l}),e[2]=l,e[3]=v):v=e[3];let h;return e[4]!==a||e[5]!==v?(h=t.jsxs(t.Fragment,{children:[a,v]}),e[4]=a,e[5]=v,e[6]=h):h=e[6],h}function Ks(n){const e=Xe.c(47),{goal:s,disabled:l,onOpen:a}=n,v=l===void 0?!1:l,h=Ot(s),j=h.active?.state==="generating"?h.active.startedAt:null,f=Rt(j);let C;e[0]!==f||e[1]!==s?(C=Lt(s,f),e[0]=f,e[1]=s,e[2]=C):C=e[2];const c=C;let G;e[3]!==s?(G=It(s,s.plan,void 0),e[3]=s,e[4]=G):G=e[4];const{styleLabel:x}=G;let i;e[5]!==s?(i=Kt(s),e[5]=s,e[6]=i):i=e[6];const o=i;let w;e[7]!==s||e[8]!==o?(w={key:o,goal:s},e[7]=s,e[8]=o,e[9]=w):w=e[9];const[r,V]=Ie.useState(w),[u,m]=Ie.useState(null);r.key!==o&&(V({key:o,goal:s}),m(Bt(r.goal,s)));let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.animationName==="goal-status-roll-in"&&m(null)},e[10]=k):k=e[10];const E=k,M=h.total>0&&h.phase!=="planning"&&h.phase!=="review",O="goal-status",D=u?.tone,b="button",Y="goal-status-button",U=`Goal ${s.address??""}${x?` · ${x}`:""}: ${c.text}. Open the goal panel`,L=s.plan?.title??s.brief;let d,p;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(jt,{size:13,"aria-hidden":"true",className:"goal-status-flag"}),p=t.jsx("span",{className:"goal-status-kind","aria-hidden":"true",children:"Goal"}),e[11]=d,e[12]=p):(d=e[11],p=e[12]);let A;e[13]!==x?(A=x&&t.jsx("span",{className:"goal-status-style","aria-hidden":"true",children:x}),e[13]=x,e[14]=A):A=e[14];let R;e[15]!==c.short||e[16]!==c.text||e[17]!==u?(R=t.jsx("span",{className:"goal-status-text","aria-hidden":"true",children:u?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"goal-status-roll goal-status-roll-in",onAnimationEnd:E,children:t.jsx(Pt,{text:c.text,short:c.short})},`in:${u.id}`),t.jsx("span",{className:"goal-status-roll goal-status-roll-out",children:u.from},`out:${u.id}`)]}):t.jsx("span",{className:"goal-status-roll",children:t.jsx(Pt,{text:c.text,short:c.short})})}),e[15]=c.short,e[16]=c.text,e[17]=u,e[18]=R):R=e[18];let P;e[19]!==c.busy?(P=c.busy&&t.jsx("span",{className:"goal-status-spinner","aria-hidden":"true"}),e[19]=c.busy,e[20]=P):P=e[20];const B=M&&t.jsx("span",{className:"goal-status-ticks","aria-hidden":"true",children:h.shots.map(us)});let H;e[21]!==c.action?(H=c.action&&t.jsx("span",{className:"goal-status-action","aria-hidden":"true",children:c.action}),e[21]=c.action,e[22]=H):H=e[22];let z;e[23]!==v||e[24]!==a||e[25]!==U||e[26]!==L||e[27]!==d||e[28]!==p||e[29]!==A||e[30]!==R||e[31]!==P||e[32]!==B||e[33]!==H?(z=t.jsxs("button",{type:b,className:Y,disabled:v,"aria-label":U,title:L,onClick:a,children:[d,p,A,R,P,B,H]}),e[23]=v,e[24]=a,e[25]=U,e[26]=L,e[27]=d,e[28]=p,e[29]=A,e[30]=R,e[31]=P,e[32]=B,e[33]=H,e[34]=z):z=e[34];let $;e[35]!==c.announce?($=t.jsx("span",{className:"sr-only",role:"status",children:c.announce}),e[35]=c.announce,e[36]=$):$=e[36];let W;e[37]!==c.tone||e[38]!==z||e[39]!==$||e[40]!==D?(W=t.jsxs("div",{className:O,"data-tone":c.tone,"data-wake":D,children:[z,$]}),e[37]=c.tone,e[38]=z,e[39]=$,e[40]=D,e[41]=W):W=e[41];let I;e[42]!==u?(I=u&&t.jsx("span",{className:"command-transmit-scan goal-status-scan","aria-hidden":"true"},`scan:${u.id}`),e[42]=u,e[43]=I):I=e[43];let X;return e[44]!==W||e[45]!==I?(X=t.jsxs(t.Fragment,{children:[W,I]}),e[44]=W,e[45]=I,e[46]=X):X=e[46],X}function us(n){return t.jsx("i",{"data-state":n.state},n.index)}function Ye(n){const e=Xe.c(22),{label:s,name:l,value:a,budget:v,wordLimit:h,maxLength:j,disabled:f,placeholder:C,onChange:c}=n,G=l===void 0?s:l,x=j===void 0?6e3:j,i=Ht(a),o=h??Wt[v];let w;e[0]!==s?(w=t.jsx("span",{children:s}),e[0]=s,e[1]=w):w=e[1];let r;e[2]!==a?(r=a.split(`
2
2
  `),e[2]=a,e[3]=r):r=e[3];const V=Math.max(2,r.length);let u;e[4]!==c?(u=O=>c(O.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==f||e[7]!==x||e[8]!==G||e[9]!==C||e[10]!==V||e[11]!==u||e[12]!==a?(m=t.jsx("textarea",{"aria-label":G,value:a,maxLength:x,rows:V,disabled:f,placeholder:C,onChange:u}),e[6]=f,e[7]=x,e[8]=G,e[9]=C,e[10]=V,e[11]=u,e[12]=a,e[13]=m):m=e[13];const k=i>o?" · Shorter prompts are easier to review":"";let E;e[14]!==o||e[15]!==k||e[16]!==i?(E=t.jsxs("small",{className:"goal-panel-muted",children:[i," / ",o," words",k]}),e[14]=o,e[15]=k,e[16]=i,e[17]=E):E=e[17];let M;return e[18]!==w||e[19]!==m||e[20]!==E?(M=t.jsxs("label",{className:"goal-prompt-input",children:[w,m,E]}),e[18]=w,e[19]=m,e[20]=E,e[21]=M):M=e[21],M}function ct(n){const e=Xe.c(17),{artifactId:s,cellId:l,label:a,resolveAsset:v,onOpen:h,fullResolution:j}=n,f=j===void 0?!1:j;let C;e[0]!==s||e[1]!==v?(C=v(s),e[0]=s,e[1]=v,e[2]=C):C=e[2];const c=C,G=f?c?.mediaUrl??c?.thumbnailUrl:c?.thumbnailUrl??c?.mediaUrl,x=!l;let i;e[3]!==l||e[4]!==h?(i=()=>{l&&h(l)},e[3]=l,e[4]=h,e[5]=i):i=e[5];const o=`Open ${a}`;let w;e[6]!==a||e[7]!==G?(w=G?t.jsx("img",{src:G,alt:a}):t.jsx("span",{className:"goal-media-pending",children:"Preview pending"}),e[6]=a,e[7]=G,e[8]=w):w=e[8];let r;e[9]!==a?(r=t.jsx("span",{children:a}),e[9]=a,e[10]=r):r=e[10];let V;return e[11]!==x||e[12]!==i||e[13]!==o||e[14]!==w||e[15]!==r?(V=t.jsxs("button",{type:"button",className:"goal-media",disabled:x,onClick:i,"aria-label":o,children:[w,r]}),e[11]=x,e[12]=i,e[13]=o,e[14]=w,e[15]=r,e[16]=V):V=e[16],V}function Vt(n){const e=Xe.c(118),{goal:s,stage:l,index:a,prompt:v,disabled:h,canGenerate:j,resolveAsset:f,onOpen:C,onPromptChange:c,onRegenerate:G,onRevise:x,onSelect:i}=n,[o,w]=Ie.useState("");let r,V,u,m,k,E,M,O,D,b,Y,U,L,d,p,A,R,P,B,H;if(e[0]!==j||e[1]!==h||e[2]!==o||e[3]!==s||e[4]!==a||e[5]!==C||e[6]!==x||e[7]!==i||e[8]!==f||e[9]!==l){Y=Symbol.for("react.early_return_sentinel");e:{const ee=s.stages[l]?.outputs.find(q=>q.index===a);if(!ee){Y=null;break e}let Se;e[30]!==s.plan?(Se=At(s.plan),e[30]=s.plan,e[31]=Se):Se=e[31],V=Math.max(1,Se.length),u=l==="storyboards"&&a>=V,O=l==="storyboards"&&!u,E=s.plan&&"storyboardLayout"in s.plan&&s.plan.storyboardLayout==="six-panel",m=l==="videos"?`Video ${a+1}`:l==="frame"?E?"Scene":"Full frame":`${u?"Ending frame":"Storyboard"} ${a%V+1}`;const ke=Ft(s,l,a);let xe;e[32]!==s||e[33]!==a||e[34]!==l?(xe=dt(s,l,a),e[32]=s,e[33]=a,e[34]=l,e[35]=xe):xe=e[35],M=xe;let be;if(e[36]!==s||e[37]!==a||e[38]!==l){const q=Ut(s,l,a);be=q===null?" · estimate unavailable":` · $${q.toFixed(2)}`,e[36]=s,e[37]=a,e[38]=l,e[39]=be}else be=e[39];r=be;const ve=f(ee.artifactId);let ie;e[40]!==o?(ie=!!o.trim()&&!o.includes("@"),e[40]=o,e[41]=ie):ie=e[41],H=ie;let de;e[42]!==j||e[43]!==h||e[44]!==o||e[45]!==x||e[46]!==H?(de=()=>{!h&&j&&H&&x(o.trim())},e[42]=j,e[43]=h,e[44]=o,e[45]=x,e[46]=H,e[47]=de):de=e[47],k=de,A="goal-still-card",R=m,P=l,B=O,e[48]!==ve||e[49]!==m||e[50]!==C||e[51]!==ee||e[52]!==f||e[53]!==l||e[54]!==O?(b=l==="videos"&&ve?.mediaUrl?t.jsx("video",{className:"goal-video-preview","aria-label":m,src:ve.mediaUrl,poster:ve.thumbnailUrl??void 0,controls:!0,preload:"metadata"}):t.jsx(ct,{artifactId:ee.artifactId,cellId:ee.cellId,label:m,resolveAsset:f,onOpen:C,fullResolution:O}),e[48]=ve,e[49]=m,e[50]=C,e[51]=ee,e[52]=f,e[53]=l,e[54]=O,e[55]=b):b=e[55],d="goal-still-tools",e[56]!==M||e[57]!==O?(p=O&&!M&&t.jsx("p",{className:"goal-panel-muted",children:"Read left to right, then top to bottom."}),e[56]=M,e[57]=O,e[58]=p):p=e[58],D="goal-versions",U=`${m} versions`,L=ke.map((q,Re)=>{const Ce=q.artifactId?f(q.artifactId):null,Ge=Ce?.thumbnailUrl??Ce?.mediaUrl,$e=`v${ke.length-Re}`;return t.jsxs("button",{type:"button",className:"goal-version","aria-label":`${m} ${$e}`,"aria-pressed":q.current,title:q.feedback??"Fresh generation",disabled:h||!q.artifactId||q.status!=="completed",onClick:()=>{q.artifactId&&i(q.artifactId)},children:[Ge&&t.jsx("img",{src:Ge,alt:""}),t.jsx("span",{children:$e})]},`${q.chainId}:${q.stepId}`)})}e[0]=j,e[1]=h,e[2]=o,e[3]=s,e[4]=a,e[5]=C,e[6]=x,e[7]=i,e[8]=f,e[9]=l,e[10]=r,e[11]=V,e[12]=u,e[13]=m,e[14]=k,e[15]=E,e[16]=M,e[17]=O,e[18]=D,e[19]=b,e[20]=Y,e[21]=U,e[22]=L,e[23]=d,e[24]=p,e[25]=A,e[26]=R,e[27]=P,e[28]=B,e[29]=H}else r=e[10],V=e[11],u=e[12],m=e[13],k=e[14],E=e[15],M=e[16],O=e[17],D=e[18],b=e[19],Y=e[20],U=e[21],L=e[22],d=e[23],p=e[24],A=e[25],R=e[26],P=e[27],B=e[28],H=e[29];if(Y!==Symbol.for("react.early_return_sentinel"))return Y;let z;e[59]!==D||e[60]!==U||e[61]!==L?(z=t.jsx("div",{className:D,"aria-label":U,children:L}),e[59]=D,e[60]=U,e[61]=L,e[62]=z):z=e[62];let $;e[63]!==M?($=M&&t.jsx("p",{className:"goal-panel-warning",role:"status",children:M}),e[63]=M,e[64]=$):$=e[64];const W=`What should change in ${m}?`;let I;e[65]===Symbol.for("react.memo_cache_sentinel")?(I=ee=>w(ee.target.value),e[65]=I):I=e[65];let X;e[66]!==k?(X=ee=>{ee.key!=="Enter"||ee.metaKey||ee.ctrlKey||ee.nativeEvent.isComposing||(ee.preventDefault(),ee.stopPropagation(),k())},e[66]=k,e[67]=X):X=e[67];let N;e[68]!==h||e[69]!==o||e[70]!==W||e[71]!==X?(N=t.jsx("input",{"aria-label":W,placeholder:"What should change?",value:o,maxLength:300,disabled:h,onChange:I,onKeyDown:X}),e[68]=h,e[69]=o,e[70]=W,e[71]=X,e[72]=N):N=e[72];const S=h||!j||!H;let me;e[73]!==r||e[74]!==k||e[75]!==S?(me=t.jsxs("button",{type:"button",className:"goal-panel-button",disabled:S,onClick:k,children:["Revise",r]}),e[73]=r,e[74]=k,e[75]=S,e[76]=me):me=e[76];const pe=h||!j;let le;e[77]!==r||e[78]!==G||e[79]!==pe?(le=t.jsxs("button",{type:"button",className:"goal-panel-button",disabled:pe,onClick:G,children:["Regenerate",r]}),e[77]=r,e[78]=G,e[79]=pe,e[80]=le):le=e[80];let _;e[81]!==N||e[82]!==me||e[83]!==le?(_=t.jsxs("div",{className:"goal-revise-row",children:[N,me,le]}),e[81]=N,e[82]=me,e[83]=le,e[84]=_):_=e[84];let Q;e[85]!==o?(Q=o.includes("@")&&t.jsx("p",{className:"goal-panel-muted",children:"Describe the change without @ references."}),e[85]=o,e[86]=Q):Q=e[86];let ce;e[87]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("summary",{children:"Prompt"}),e[87]=ce):ce=e[87];const ge=l==="videos"?"Video directions":l==="frame"?E?"Scene prompt":"Full frame prompt":u?"Ending frame prompt":"Storyboard prompt",re=l==="videos"?`Shot ${a+1} video prompt`:l==="frame"?E?"Scene prompt":"Full frame prompt":`Shot ${a%V+1} ${u?"ending frame":"storyboard"} prompt`,ae=O&&E?48:void 0,ne=l==="videos"?"video":l==="frame"?"frame":u?"ending":"storyboard";let oe;e[88]!==h||e[89]!==c||e[90]!==v||e[91]!==ge||e[92]!==re||e[93]!==ae||e[94]!==ne?(oe=t.jsx(Ye,{label:ge,name:re,wordLimit:ae,budget:ne,value:v,disabled:h,onChange:c}),e[88]=h,e[89]=c,e[90]=v,e[91]=ge,e[92]=re,e[93]=ae,e[94]=ne,e[95]=oe):oe=e[95];const ye=h||!j;let te;e[96]!==r||e[97]!==G||e[98]!==ye?(te=t.jsxs("button",{type:"button",className:"goal-panel-button",disabled:ye,onClick:G,children:["Save and regenerate",r]}),e[96]=r,e[97]=G,e[98]=ye,e[99]=te):te=e[99];let K;e[100]!==oe||e[101]!==te?(K=t.jsxs("details",{className:"goal-disclosure",children:[ce,oe,te]}),e[100]=oe,e[101]=te,e[102]=K):K=e[102];let Z;e[103]!==z||e[104]!==$||e[105]!==_||e[106]!==Q||e[107]!==K||e[108]!==d||e[109]!==p?(Z=t.jsxs("div",{className:d,children:[p,z,$,_,Q,K]}),e[103]=z,e[104]=$,e[105]=_,e[106]=Q,e[107]=K,e[108]=d,e[109]=p,e[110]=Z):Z=e[110];let ue;return e[111]!==b||e[112]!==Z||e[113]!==A||e[114]!==R||e[115]!==P||e[116]!==B?(ue=t.jsxs("section",{className:A,"aria-label":R,"data-stage":P,"data-storyboard":B,children:[b,Z]}),e[111]=b,e[112]=Z,e[113]=A,e[114]=R,e[115]=P,e[116]=B,e[117]=ue):ue=e[117],ue}const hs=[{value:"9:16",label:"Portrait · 9:16"},{value:"16:9",label:"Landscape · 16:9"},{value:"1:1",label:"Square · 1:1"}];function fs(n){const e=Xe.c(187),{goal:s,plan:l,disabled:a,onSave:v,onApprove:h,onRegenerate:j,onRevise:f,onSelect:C,resolveAsset:c,onSelectCell:G,onPreviewCell:x}=n;let i;e[0]!==l?(i=()=>({...l,shots:l.shots.map(xs)}),e[0]=l,e[1]=i):i=e[1];const[o,w]=Ie.useState(i);let r,V,u,m,k,E,M,O,D,b,Y,U,L;if(e[2]!==a||e[3]!==o||e[4]!==s||e[5]!==h||e[6]!==x||e[7]!==j||e[8]!==f||e[9]!==C||e[10]!==G||e[11]!==c||e[12]!==l){m={...o,shots:o.shots.map(ys)},V=!$t(m,l),L=!!(m.title.trim()&&m.continuity.trim()&&m.frame.prompt.trim())&&m.shots.every(vs);const N=s.stage==="assembly"?"videos":s.stage,S=N==="frame",me=ft(o.style.id);let pe;e[26]!==o.style?(pe=qt(o.style,"frame"),e[26]=o.style,e[27]=pe):pe=e[27];const le=pe;let _;e[28]!==o.frame||e[29]!==s||e[30]!==S||e[31]!==l.frame?(_=!S&&(!!dt(s,"frame",0)||o.frame.prompt!==l.frame.prompt),e[28]=o.frame,e[29]=s,e[30]=S,e[31]=l.frame,e[32]=_):_=e[32],O=_;let Q;e[33]!==o.frameContinuity||e[34]!==o.shots||e[35]!==s||e[36]!==l.shots||e[37]!==N?(Q=N==="videos"&&o.shots.some((g,F)=>dt(s,"storyboards",F)||g.storyboardPrompt!==l.shots[F]?.storyboardPrompt||g.videoPrompt!==l.shots[F]?.videoPrompt||g.durationSeconds!==l.shots[F]?.durationSeconds||g.title!==l.shots[F]?.title||o.frameContinuity&&(dt(s,"storyboards",F+o.shots.length)||(g.endingPrompt??g.videoPrompt)!==(l.shots[F]?.endingPrompt??l.shots[F]?.videoPrompt))),e[33]=o.frameContinuity,e[34]=o.shots,e[35]=s,e[36]=l.shots,e[37]=N,e[38]=Q):Q=e[38],M=Q,r=!a&&L&&!O&&!M,u=s.estimate[N];let ce;e[39]!==u.usd?(ce=u.usd===null?"":` · $${u.usd.toFixed(2)}`,e[39]=u.usd,e[40]=ce):ce=e[40],E=`${S?"Generate frame":N==="storyboards"?"Use this frame · Generate storyboards":"Use these storyboards · Generate videos"}${ce}`,k=()=>{r&&h(m)};let ge;e[41]===Symbol.for("react.memo_cache_sentinel")?(ge=(g,F)=>w(fe=>({...fe,shots:fe.shots.map((Ke,rt)=>rt===g?{...Ke,...F}:Ke)})),e[41]=ge):ge=e[41];const re=ge,ae=(g,F)=>{const fe=g==="storyboards"&&F>=m.shots.length,Ke=F%m.shots.length,rt=g==="frame"?o.frame.prompt:fe?o.shots[Ke].endingPrompt??"":o.shots[Ke].storyboardPrompt;return t.jsx(Vt,{goal:s,stage:g,index:F,prompt:rt,disabled:a,canGenerate:L,resolveAsset:c,onOpen:x,onPromptChange:ze=>g==="frame"?w({...o,frame:{prompt:ze}}):re(Ke,fe?{endingPrompt:ze.trim()?ze:null}:{storyboardPrompt:ze}),onRegenerate:()=>j(m,g,F),onRevise:ze=>f(m,g,F,ze),onSelect:ze=>C(g,F,ze)},`${g}:${F}`)};let ne;e[42]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx("span",{className:"sr-only",children:"Video title"}),e[42]=ne):ne=e[42];let oe;e[43]!==o?(oe=g=>w({...o,title:g.target.value}),e[43]=o,e[44]=oe):oe=e[44];let ye;e[45]!==a||e[46]!==o.title||e[47]!==oe?(ye=t.jsxs("label",{children:[ne,t.jsx("input",{value:o.title,maxLength:120,disabled:a,onChange:oe})]}),e[45]=a,e[46]=o.title,e[47]=oe,e[48]=ye):ye=e[48];let te;e[49]!==a||e[50]!==o||e[51]!==S?(te=hs.map(g=>t.jsx("button",{type:"button",role:"radio","aria-checked":o.aspectRatio===g.value,className:"goal-panel-button",disabled:a||!S,onClick:()=>w({...o,aspectRatio:g.value}),children:g.label},g.value)),e[49]=a,e[50]=o,e[51]=S,e[52]=te):te=e[52];let K;e[53]!==te?(K=t.jsx("div",{className:"goal-formats",role:"radiogroup","aria-label":"Format",children:te}),e[53]=te,e[54]=K):K=e[54];let Z;e[55]!==a||e[56]!==o||e[57]!==S?(Z=Mt.map(g=>t.jsx("button",{type:"button",role:"radio","aria-checked":o.style.id===g,className:"goal-panel-button",disabled:a||!S,title:ft(g).summary,onClick:()=>w({...o,style:{id:g,options:xt(g)}}),children:ft(g).label},g)),e[55]=a,e[56]=o,e[57]=S,e[58]=Z):Z=e[58];let ue;e[59]!==Z?(ue=t.jsx("div",{className:"goal-formats goal-styles",role:"radiogroup","aria-label":"Style",children:Z}),e[59]=Z,e[60]=ue):ue=e[60];const ee=me.options.length>0&&t.jsx("div",{className:"goal-style-options",children:me.options.map(g=>t.jsxs("label",{children:[t.jsx("span",{children:g.label}),t.jsx("select",{"aria-label":g.label,value:o.style.options[g.key],disabled:a||!S,onChange:F=>{const fe={...o.style.options,[g.key]:F.target.value};g.key==="delivery"&&delete fe.camera,w({...o,style:{id:me.id,options:xt(me.id,fe)}})},children:g.choices.map(bs)})]},g.key))});let Se;e[61]!==ye||e[62]!==K||e[63]!==ue||e[64]!==ee?(Se=t.jsxs("div",{className:"goal-plan-heading",children:[ye,K,ue,ee]}),e[61]=ye,e[62]=K,e[63]=ue,e[64]=ee,e[65]=Se):Se=e[65];const ke=Se;let xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx("summary",{children:"Advanced"}),e[66]=xe):xe=e[66];const be=N==="videos"&&ke;let ve;if(e[67]!==s.characters||e[68]!==G||e[69]!==c){let g;e[71]!==G||e[72]!==c?(g=F=>t.jsx(ct,{artifactId:F.artifactId,cellId:F.cellId,label:`${F.address} · ${F.label}`,resolveAsset:c,onOpen:G},F.cellId),e[71]=G,e[72]=c,e[73]=g):g=e[73],ve=s.characters.map(g),e[67]=s.characters,e[68]=G,e[69]=c,e[70]=ve}else ve=e[70];let ie;e[74]!==ve?(ie=t.jsx("div",{className:"goal-characters","aria-label":"Character images",children:ve}),e[74]=ve,e[75]=ie):ie=e[75];let de;e[76]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx("span",{children:"Image model"}),e[76]=de):de=e[76];const q=a||!S;let Re;e[77]!==o?(Re=g=>w({...o,imageModel:g.target.value}),e[77]=o,e[78]=Re):Re=e[78];let Ce,Ge,$e;e[79]===Symbol.for("react.memo_cache_sentinel")?(Ce=t.jsx("option",{value:"nano-banana-2-1",children:"Nano Banana 2.1"}),Ge=t.jsx("option",{value:"sunburst",children:"GPT Image 2.5 Sunburst"}),$e=t.jsx("option",{value:"flare",children:"GPT Image 2.5 Flare"}),e[79]=Ce,e[80]=Ge,e[81]=$e):(Ce=e[79],Ge=e[80],$e=e[81]);let Oe;e[82]!==o.imageModel||e[83]!==q||e[84]!==Re?(Oe=t.jsxs("label",{children:[de,t.jsxs("select",{"aria-label":"Image model",value:o.imageModel,disabled:q,onChange:Re,children:[Ce,Ge,$e]})]}),e[82]=o.imageModel,e[83]=q,e[84]=Re,e[85]=Oe):Oe=e[85];let Fe;e[86]===Symbol.for("react.memo_cache_sentinel")?(Fe=t.jsx("span",{children:"Image resolution"}),e[86]=Fe):Fe=e[86];const Te=a||!S;let we;e[87]!==o?(we=g=>w({...o,imageResolution:g.target.value}),e[87]=o,e[88]=we):we=e[88];let Be,We;e[89]===Symbol.for("react.memo_cache_sentinel")?(Be=t.jsx("option",{value:"1K",children:"1K"}),We=t.jsx("option",{value:"2K",children:"2K"}),e[89]=Be,e[90]=We):(Be=e[89],We=e[90]);let Le;e[91]!==o.imageResolution||e[92]!==Te||e[93]!==we?(Le=t.jsxs("label",{children:[Fe,t.jsxs("select",{"aria-label":"Image resolution",value:o.imageResolution,disabled:Te,onChange:we,children:[Be,We]})]}),e[91]=o.imageResolution,e[92]=Te,e[93]=we,e[94]=Le):Le=e[94];let Ve;e[95]===Symbol.for("react.memo_cache_sentinel")?(Ve=t.jsx("span",{children:"Video resolution"}),e[95]=Ve):Ve=e[95];let Ae;e[96]!==o?(Ae=g=>w({...o,videoResolution:g.target.value}),e[96]=o,e[97]=Ae):Ae=e[97];let Pe,Ue;e[98]===Symbol.for("react.memo_cache_sentinel")?(Pe=t.jsx("option",{value:"480p",children:"480p"}),Ue=t.jsx("option",{value:"720p",children:"720p"}),e[98]=Pe,e[99]=Ue):(Pe=e[98],Ue=e[99]);let Ne;e[100]!==a||e[101]!==o.videoResolution||e[102]!==Ae?(Ne=t.jsxs("label",{children:[Ve,t.jsxs("select",{"aria-label":"Video resolution",value:o.videoResolution,disabled:a,onChange:Ae,children:[Pe,Ue]})]}),e[100]=a,e[101]=o.videoResolution,e[102]=Ae,e[103]=Ne):Ne=e[103];let Me;e[104]===Symbol.for("react.memo_cache_sentinel")?(Me=t.jsx("span",{children:"Ending frames"}),e[104]=Me):Me=e[104];const st=o.frameContinuity?"on":"off",J=a||!S;let je;e[105]!==o?(je=g=>w({...o,frameContinuity:g.target.value==="on"}),e[105]=o,e[106]=je):je=e[106];let he,Je;e[107]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx("option",{value:"off",children:"Off · Storyboards only"}),Je=t.jsx("option",{value:"on",children:"On · Add ending references"}),e[107]=he,e[108]=Je):(he=e[107],Je=e[108]);let De;e[109]!==st||e[110]!==J||e[111]!==je?(De=t.jsxs("label",{children:[Me,t.jsxs("select",{"aria-label":"Ending frames",value:st,disabled:J,onChange:je,children:[he,Je]})]}),e[109]=st,e[110]=J,e[111]=je,e[112]=De):De=e[112];let Ee;e[113]!==Oe||e[114]!==Le||e[115]!==Ne||e[116]!==De?(Ee=t.jsxs("div",{className:"goal-advanced-options",children:[Oe,Le,Ne,De]}),e[113]=Oe,e[114]=Le,e[115]=Ne,e[116]=De,e[117]=Ee):Ee=e[117];let He;e[118]!==o.frameContinuity||e[119]!==o.shots.length?(He=o.frameContinuity&&t.jsxs("p",{className:"goal-panel-muted",children:["Adds ",o.shots.length," ending images to guide the final poses alongside each storyboard."]}),e[118]=o.frameContinuity,e[119]=o.shots.length,e[120]=He):He=e[120];let Qe;e[121]!==le?(Qe=le&&t.jsxs("p",{className:"goal-panel-muted goal-style-anchors",children:[t.jsx("strong",{children:"Style anchors"})," ",le]}),e[121]=le,e[122]=Qe):Qe=e[122];const lt=a||!S;let Ze;e[123]!==o?(Ze=g=>w({...o,continuity:g}),e[123]=o,e[124]=Ze):Ze=e[124];let qe;e[125]!==o.continuity||e[126]!==lt||e[127]!==Ze?(qe=t.jsx(Ye,{label:"Characters and visual style",value:o.continuity,budget:"continuity",maxLength:3e3,disabled:lt,onChange:Ze}),e[125]=o.continuity,e[126]=lt,e[127]=Ze,e[128]=qe):qe=e[128];let _e;e[129]!==a||e[130]!==o||e[131]!==S?(_e=S&&t.jsx(Ye,{label:"Full frame prompt",value:o.frame.prompt,budget:"frame",disabled:a,onChange:g=>w({...o,frame:{prompt:g}})}),e[129]=a,e[130]=o,e[131]=S,e[132]=_e):_e=e[132];let et;e[133]!==a||e[134]!==o.frameContinuity||e[135]!==o.shots||e[136]!==S?(et=S&&o.frameContinuity&&o.shots.map((g,F)=>t.jsx(Ye,{label:`Shot ${F+1} ending frame prompt`,value:g.endingPrompt??"",placeholder:"Final moment from the video prompt",budget:"ending",disabled:a,onChange:fe=>re(F,{endingPrompt:fe.trim()?fe:null})},g.editorId)),e[133]=a,e[134]=o.frameContinuity,e[135]=o.shots,e[136]=S,e[137]=et):et=e[137];let nt;e[138]!==be||e[139]!==ie||e[140]!==Ee||e[141]!==He||e[142]!==Qe||e[143]!==qe||e[144]!==_e||e[145]!==et?(nt=t.jsxs("details",{className:"goal-disclosure goal-advanced",children:[xe,t.jsxs("div",{className:"goal-editor-settings",children:[be,ie,Ee,He,Qe,qe,_e,et]})]}),e[138]=be,e[139]=ie,e[140]=Ee,e[141]=He,e[142]=Qe,e[143]=qe,e[144]=_e,e[145]=et,e[146]=nt):nt=e[146];const at=nt;let ot;e[147]===Symbol.for("react.memo_cache_sentinel")?(ot=t.jsx("span",{children:"Shots"}),e[147]=ot):ot=e[147];let tt;e[148]!==a||e[149]!==o||e[150]!==S?(tt=S&&t.jsxs("button",{type:"button",className:"goal-panel-button",disabled:a||o.shots.length>=8,onClick:()=>w({...o,shots:[...o.shots,{editorId:crypto.randomUUID(),title:`Shot ${o.shots.length+1}`,storyboardPrompt:"",endingPrompt:null,videoPrompt:"",durationSeconds:10}]}),children:[t.jsx(rs,{size:12,"aria-hidden":"true"}),"Add shot"]}),e[148]=a,e[149]=o,e[150]=S,e[151]=tt):tt=e[151];const it=t.jsxs("div",{className:"goal-editor-shots",children:[t.jsxs("div",{className:"goal-editor-shots-head",children:[ot,t.jsxs("small",{children:[o.shots.length," clips · ",zt(m),"s planned"]}),tt]}),t.jsx("ol",{className:"goal-editor-shot-list",children:o.shots.map((g,F)=>t.jsxs("li",{className:"goal-editor-shot",children:[t.jsxs("div",{className:"goal-editor-shot-head",children:[t.jsx("span",{className:"goal-editor-shot-number",children:String(F+1).padStart(2,"0")}),t.jsx("input",{"aria-label":`Shot ${F+1} title`,value:g.title,maxLength:120,disabled:a,onChange:fe=>re(F,{title:fe.target.value})}),t.jsxs("span",{className:"goal-editor-seconds",children:[t.jsx("input",{type:"number",min:4,max:30,step:1,"aria-label":`Shot ${F+1} seconds`,value:g.durationSeconds,disabled:a,onChange:fe=>re(F,{durationSeconds:Number(fe.target.value)})}),t.jsx("span",{"aria-hidden":"true",children:"s"})]}),S&&t.jsx("button",{type:"button",className:"goal-editor-remove","aria-label":`Remove shot ${F+1}`,disabled:a||o.shots.length===1,onClick:()=>w({...o,shots:o.shots.filter((fe,Ke)=>Ke!==F)}),children:t.jsx(cs,{size:14,"aria-hidden":"true"})})]}),N==="videos"?ae("storyboards",F):t.jsx(Ye,{label:"Storyboard prompt",name:`Shot ${F+1} storyboard prompt`,value:g.storyboardPrompt,budget:"storyboard",disabled:a,onChange:fe=>re(F,{storyboardPrompt:fe})}),N==="videos"&&m.frameContinuity&&ae("storyboards",F+m.shots.length),t.jsx(Ye,{label:"Video prompt",name:`Shot ${F+1} video prompt`,value:g.videoPrompt,budget:"video",disabled:a,onChange:fe=>re(F,{videoPrompt:fe})})]},g.editorId))})]});D="goal-editor",b=N,Y=g=>{g.key!=="Enter"||!(g.metaKey||g.ctrlKey)||g.nativeEvent.isComposing||(g.preventDefault(),k())},U=S?t.jsxs(t.Fragment,{children:[ke,it,t.jsxs("div",{className:"goal-plan-extras",children:[at,t.jsx("p",{className:"goal-panel-muted goal-brief-line",children:s.brief})]})]}):N==="storyboards"?t.jsxs(t.Fragment,{children:[ae("frame",0),t.jsxs("details",{className:"goal-disclosure",children:[t.jsx("summary",{children:"Plan"}),ke,it,at]})]}):t.jsxs(t.Fragment,{children:[it,t.jsxs("details",{className:"goal-disclosure",children:[t.jsx("summary",{children:"Back to frame"}),ae("frame",0)]}),at]}),e[2]=a,e[3]=o,e[4]=s,e[5]=h,e[6]=x,e[7]=j,e[8]=f,e[9]=C,e[10]=G,e[11]=c,e[12]=l,e[13]=r,e[14]=V,e[15]=u,e[16]=m,e[17]=k,e[18]=E,e[19]=M,e[20]=O,e[21]=D,e[22]=b,e[23]=Y,e[24]=U,e[25]=L}else r=e[13],V=e[14],u=e[15],m=e[16],k=e[17],E=e[18],M=e[19],O=e[20],D=e[21],b=e[22],Y=e[23],U=e[24],L=e[25];const d=V?"Changes will be saved before generation.":"Approves this stage only.";let p;e[152]!==d?(p=t.jsx("span",{children:d}),e[152]=d,e[153]=p):p=e[153];let A;e[154]!==u.warnings?(A=u.warnings.map(gs),e[154]=u.warnings,e[155]=A):A=e[155];let R;e[156]!==L?(R=!L&&t.jsx("span",{role:"status",className:"goal-panel-warning",children:"Complete all prompts and give each shot a whole duration from 4 to 30 seconds."}),e[156]=L,e[157]=R):R=e[157];let P;e[158]!==M||e[159]!==O?(P=(O||M)&&t.jsx("span",{role:"status",className:"goal-panel-warning",children:"Regenerate or revise the changed stills before continuing."}),e[158]=M,e[159]=O,e[160]=P):P=e[160];let B;e[161]!==P||e[162]!==p||e[163]!==A||e[164]!==R?(B=t.jsxs("div",{className:"goal-panel-bar-copy",children:[p,A,R,P]}),e[161]=P,e[162]=p,e[163]=A,e[164]=R,e[165]=B):B=e[165];let H;e[166]!==V||e[167]!==a||e[168]!==v||e[169]!==m||e[170]!==L?(H=V&&t.jsx("button",{type:"button",className:"goal-panel-button",disabled:a||!L,onClick:()=>v(m),children:"Save plan"}),e[166]=V,e[167]=a,e[168]=v,e[169]=m,e[170]=L,e[171]=H):H=e[171];const z=!r;let $;e[172]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("span",{"aria-hidden":"true",children:"↵"}),e[172]=$):$=e[172];let W;e[173]!==k||e[174]!==E||e[175]!==z?(W=t.jsxs("button",{type:"button",className:"goal-panel-primary",disabled:z,title:"⌘↵ approves this stage",onClick:k,children:[E,$]}),e[173]=k,e[174]=E,e[175]=z,e[176]=W):W=e[176];let I;e[177]!==B||e[178]!==H||e[179]!==W?(I=t.jsxs("div",{className:"goal-panel-bar",children:[B,H,W]}),e[177]=B,e[178]=H,e[179]=W,e[180]=I):I=e[180];let X;return e[181]!==I||e[182]!==D||e[183]!==b||e[184]!==Y||e[185]!==U?(X=t.jsxs("div",{className:D,"data-review":b,onKeyDown:Y,children:[U,I]}),e[181]=I,e[182]=D,e[183]=b,e[184]=Y,e[185]=U,e[186]=X):X=e[186],X}function gs(n){return t.jsx("span",{children:n},n)}function bs(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function vs(n){return n.title.trim()&&n.storyboardPrompt.trim()&&n.videoPrompt.trim()&&Number.isInteger(n.durationSeconds)&&n.durationSeconds>=4&&n.durationSeconds<=30}function ys(n){const{editorId:e,...s}=n;return s}function xs(n){return{...n,editorId:crypto.randomUUID()}}function kt(n){return n==null?" · estimate unavailable":` · $${n.toFixed(2)}`}function js(n,e){const s=n.stages[e]?.outputs[0];return s?s.versions.find(l=>l.current)?.basePrompt??n.stages[e]?.attempts?.find(l=>l.artifactId===s.artifactId)?.basePrompt??null:null}function Ss(n){const e=Xe.c(175),{goal:s,plan:l,disabled:a,resolveAsset:v,onPreviewCell:h,onRun:j,onAction:f}=n;let C;e[0]!==s.finish||e[1]!==s.stage?(C=()=>s.finish?"finish":s.stage==="videos"?"video":"scene",e[0]=s.finish,e[1]=s.stage,e[2]=C):C=e[2];const[c,G]=Ie.useState(C),[x,i]=Ie.useState(l.title),[o,w]=Ie.useState(l.scene.prompt),[r,V]=Ie.useState(l.video.prompt),u=s.coldOpen;let m;e[3]!==u?.endSeconds||e[4]!==u?.sourceObjectHash||e[5]!==u?.startSeconds?(m=()=>({start:u?.startSeconds??0,end:u?.endSeconds??0,hash:u?.sourceObjectHash??""}),e[3]=u?.endSeconds,e[4]=u?.sourceObjectHash,e[5]=u?.startSeconds,e[6]=m):m=e[6];const[k,E]=Ie.useState(m);u&&u.sourceObjectHash!==k.hash&&E({start:u.startSeconds,end:u.endSeconds,hash:u.sourceObjectHash});let M;e[7]!==x?(M=x.trim(),e[7]=x,e[8]=M):M=e[8];const O=M;let D;e[9]!==o?(D=o.trim(),e[9]=o,e[10]=D):D=e[10];const b=D;let Y;e[11]!==r?(Y=r.trim(),e[11]=r,e[12]=Y):Y=e[12];const U=Y,L=O!==l.title||b!==l.scene.prompt||U!==l.video.prompt,d=!!(O&&b&&U);let p;e[13]!==s?(p=js(s,"frame"),e[13]=s,e[14]=p):p=e[14];const A=p,R=s.stages.frame?.outputs[0],P=s.stages.videos?.outputs[0],B=!!R&&(b!==l.scene.prompt||A!==null&&A!==l.scene.prompt),H=U!==l.video.prompt,z=s.status==="running",$=s.finish?.status==="running",W=s.finish?.status==="failed",I=s.finish?.sourceArtifactId??P?.artifactId??null;let X;e[15]!==v||e[16]!==I?(X=I?v(I):null,e[15]=v,e[16]=I,e[17]=X):X=e[17];const N=X,S=u?.durationSeconds??N?.duration??null,me=u?.analysisUsd??0;let pe;e[18]!==s.finalArtifactId||e[19]!==v?(pe=s.finalArtifactId?v(s.finalArtifactId):null,e[18]=s.finalArtifactId,e[19]=v,e[20]=pe):pe=e[20];const le=pe,_=!!(s.finalArtifactId&&le?.mediaUrl);let Q;e[21]!==b||e[22]!==l.scene?(Q={...l.scene,prompt:b},e[21]=b,e[22]=l.scene,e[23]=Q):Q=e[23];let ce;e[24]!==U||e[25]!==l.video?(ce={...l.video,prompt:U},e[24]=U,e[25]=l.video,e[26]=ce):ce=e[26];let ge;e[27]!==O||e[28]!==l||e[29]!==ce||e[30]!==Q?(ge={...l,title:O,scene:Q,video:ce},e[27]=O,e[28]=l,e[29]=ce,e[30]=Q,e[31]=ge):ge=e[31];const re=ge,ae=k.hash?k.start:u?.startSeconds??0,ne=k.hash?k.end:u?.endSeconds??(S==null?0:Math.min(S,2.3));let oe;e[32]!==S||e[33]!==ne||e[34]!==ae?(oe=S==null?null:Jt(ae,ne,S),e[32]=S,e[33]=ne,e[34]=ae,e[35]=oe):oe=e[35];const ye=oe;let te;e[36]!==s.estimate.frame.usd?(te=kt(s.estimate.frame.usd),e[36]=s.estimate.frame.usd,e[37]=te):te=e[37];const K=te;let Z;e[38]!==s.estimate.videos.usd?(Z=kt(s.estimate.videos.usd),e[38]=s.estimate.videos.usd,e[39]=Z):Z=e[39];const ue=Z,ee=s.status==="review"&&d&&!a&&!z&&!$,Se=ee&&!B&&!!R,ke=!!I&&S!=null&&!ye&&!L&&!B&&!a&&!z&&!$&&(s.status==="review"||s.status==="completed"||W);let xe;e[40]!==L||e[41]!==re||e[42]!==s||e[43]!==f||e[44]!==j?(xe=(J,je)=>{j(async()=>{const he=L?await f({action:"update",revision:s.revision,plan:re}):s;await f({action:J,revision:he.revision,stage:je,index:0})})},e[40]=L,e[41]=re,e[42]=s,e[43]=f,e[44]=j,e[45]=xe):xe=e[45];const be=xe;let ve;e[46]!==u?.sourceObjectHash||e[47]!==S||e[48]!==ne||e[49]!==ae||e[50]!==N||e[51]!==I?(ve=I&&S!=null&&N?.mediaUrl?{sourceArtifactId:I,sourceObjectHash:u?.sourceObjectHash??N.objectHash??I,durationSeconds:S,fps:N.fps&&N.fps>0?N.fps:24,startSeconds:ae,endSeconds:ne,reason:"A 2.3 second highlight from the start of this video. Review the range before finishing. Analysis is free.",model:"lightning"}:null,e[46]=u?.sourceObjectHash,e[47]=S,e[48]=ne,e[49]=ae,e[50]=N,e[51]=I,e[52]=ve):ve=e[52];const ie=ve;let de;e[53]!==s.bookId||e[54]!==s.goalId||e[55]!==s.notebookId||e[56]!==l.title||e[57]!==N||e[58]!==I||e[59]!==ie?(de=ie&&I&&N?.mediaUrl?{bookId:s.bookId,notebookId:s.notebookId,assetId:I,label:l.title,mediaUrl:N.mediaUrl,requestId:s.goalId,suggestion:ie}:null,e[53]=s.bookId,e[54]=s.goalId,e[55]=s.notebookId,e[56]=l.title,e[57]=N,e[58]=I,e[59]=ie,e[60]=de):de=e[60];const q=de;let Re;e[61]!==a||e[62]!==s||e[63]!==f||e[64]!==j||e[65]!==v?(Re=(J,je)=>Ft(s,J,0).map((he,Je,De)=>{const Ee=he.artifactId?v(he.artifactId):null,He=`v${De.length-Je}`;return t.jsxs("button",{type:"button",className:"goal-version","aria-label":`${je} ${He}`,"aria-pressed":he.current,disabled:a||!he.artifactId||he.status!=="completed",onClick:()=>{he.artifactId&&j(()=>f({action:"select",revision:s.revision,stage:J,index:0,artifact_id:he.artifactId}))},children:[(Ee?.thumbnailUrl??Ee?.mediaUrl)&&t.jsx("img",{src:Ee.thumbnailUrl??Ee.mediaUrl??"",alt:""}),t.jsx("span",{children:He})]},`${he.chainId}:${he.stepId}`)}),e[61]=a,e[62]=s,e[63]=f,e[64]=j,e[65]=v,e[66]=Re):Re=e[66];const Ce=Re;let Ge;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ge=[["scene","Scene"],["video","Video"],["finish","Finish"]],e[67]=Ge):Ge=e[67];let $e;e[68]!==c?($e=t.jsx("nav",{className:"goal-stage-tabs","aria-label":"Goal stages",children:Ge.map(J=>{const[je,he]=J;return t.jsx("button",{type:"button",className:"goal-panel-button","aria-pressed":c===je,onClick:()=>G(je),children:he},je)})}),e[68]=c,e[69]=$e):$e=e[69];let Oe;e[70]!==l.aspectRatio||e[71]!==l.video.durationSeconds?(Oe=t.jsxs("p",{className:"goal-panel-muted",children:[l.video.durationSeconds,"s video · ",l.aspectRatio," · Seedance 2.5"]}),e[70]=l.aspectRatio,e[71]=l.video.durationSeconds,e[72]=Oe):Oe=e[72];let Fe;e[73]!==s.stage||e[74]!==z?(Fe=z&&t.jsx("p",{role:"status",children:s.stage==="videos"?"Generating the video.":"Generating the scene."}),e[73]=s.stage,e[74]=z,e[75]=Fe):Fe=e[75];let Te;e[76]!==a||e[77]!==$||e[78]!==h||e[79]!==l.scene.imageRefs||e[80]!==v||e[81]!==R||e[82]!==o||e[83]!==x||e[84]!==Ce||e[85]!==c?(Te=c==="scene"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"goal-reference-grid","aria-label":"Scene references",children:l.scene.imageRefs.map(J=>t.jsx(ct,{artifactId:J.artifactId,cellId:J.cellId,label:`${J.slot} · ${J.address}`,resolveAsset:v,onOpen:h},J.slot))}),R&&t.jsx(ct,{artifactId:R.artifactId,cellId:R.cellId,label:"Approved scene",resolveAsset:v,onOpen:h}),R&&t.jsx("div",{className:"goal-versions","aria-label":"Scene versions",children:Ce("frame","Scene")}),t.jsxs("label",{children:[t.jsx("span",{children:"Title"}),t.jsx("input",{"aria-label":"Video title",value:x,maxLength:120,disabled:a||$,onChange:J=>i(J.target.value)})]}),t.jsx(Ye,{label:"Scene prompt",value:o,budget:"frame",wordLimit:Yt,disabled:a||$,onChange:w})]}),e[76]=a,e[77]=$,e[78]=h,e[79]=l.scene.imageRefs,e[80]=v,e[81]=R,e[82]=o,e[83]=x,e[84]=Ce,e[85]=c,e[86]=Te):Te=e[86];let we;e[87]!==a||e[88]!==$||e[89]!==h||e[90]!==l.video.imageRefs||e[91]!==l.video.videoRefs||e[92]!==v||e[93]!==B||e[94]!==R||e[95]!==N||e[96]!==I||e[97]!==Ce||e[98]!==P||e[99]!==r||e[100]!==c?(we=c==="video"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"goal-reference-grid","aria-label":"Video references",children:[...l.video.imageRefs,...l.video.videoRefs].map(J=>t.jsx(ct,{artifactId:J.artifactId,cellId:J.cellId,label:`${J.slot} · ${J.address}`,resolveAsset:v,onOpen:h},J.slot))}),R&&t.jsx(ct,{artifactId:R.artifactId,cellId:R.cellId,label:"Approved scene",resolveAsset:v,onOpen:h}),P&&N?.mediaUrl&&P.artifactId===I?t.jsx("video",{className:"goal-video-preview","aria-label":"Approved video",src:N.mediaUrl,poster:N.thumbnailUrl??void 0,controls:!0,preload:"metadata"}):P&&t.jsx(ct,{artifactId:P.artifactId,cellId:P.cellId,label:"Approved video",resolveAsset:v,onOpen:h}),P&&t.jsx("div",{className:"goal-versions","aria-label":"Video versions",children:Ce("videos","Video")}),t.jsx(Ye,{label:"Video prompt",value:r,budget:"video",wordLimit:Xt,disabled:a||$,onChange:V}),!R&&t.jsx("p",{className:"goal-panel-muted",children:"Generate the scene before the video."}),B&&t.jsx("p",{role:"status",className:"goal-panel-warning",children:"Refresh the scene before continuing."})]}),e[87]=a,e[88]=$,e[89]=h,e[90]=l.video.imageRefs,e[91]=l.video.videoRefs,e[92]=v,e[93]=B,e[94]=R,e[95]=N,e[96]=I,e[97]=Ce,e[98]=P,e[99]=r,e[100]=c,e[101]=we):we=e[101];let Be;e[102]!==me||e[103]!==u?.sourceObjectHash||e[104]!==L||e[105]!==a||e[106]!==le||e[107]!==W||e[108]!==$||e[109]!==s.finalArtifactId||e[110]!==s.finish||e[111]!==_||e[112]!==k.hash||e[113]!==q||e[114]!==I||e[115]!==H||e[116]!==P||e[117]!==c?(Be=c==="finish"&&t.jsxs(t.Fragment,{children:[t.jsxs("p",{children:["Finishing analysis · $",me.toFixed(2)]}),!I&&t.jsx("p",{className:"goal-panel-muted",children:"Approve the video before finishing it."}),$&&t.jsx("p",{role:"status",children:"Rendering the cold open, then burning the saved watermark."}),W&&t.jsx("p",{role:"alert",children:s.finish?.error??"Finishing failed"}),_&&le?.mediaUrl&&t.jsx("video",{className:"goal-video-preview","aria-label":"Finished video",src:le.mediaUrl,poster:le.thumbnailUrl??void 0,controls:!0,preload:"metadata"}),s.finalArtifactId&&!_&&!$&&t.jsx("p",{role:"status",children:"The finished video is not playable yet."}),!$&&q&&t.jsx(ds,{review:q,disabled:a||$,onChange:(J,je)=>E({start:J,end:je,hash:k.hash||u?.sourceObjectHash||I||""})}),!$&&I&&!q&&t.jsx("p",{role:"status",children:"The video is not playable yet."}),L&&(s.finish||P)&&t.jsx("p",{className:"goal-panel-warning",children:"Saving a prompt clears the cold open."}),H&&t.jsx("p",{className:"goal-panel-muted",children:"Save the video prompt before finishing."})]}),e[102]=me,e[103]=u?.sourceObjectHash,e[104]=L,e[105]=a,e[106]=le,e[107]=W,e[108]=$,e[109]=s.finalArtifactId,e[110]=s.finish,e[111]=_,e[112]=k.hash,e[113]=q,e[114]=I,e[115]=H,e[116]=P,e[117]=c,e[118]=Be):Be=e[118];const We=L?"Saving a prompt clears the cold open. Settings stay with this goal.":$?"The cold open renders first, then the saved watermark is burned onto a copy.":"Approves this step only.";let Le;e[119]!==We?(Le=t.jsx("div",{className:"goal-panel-bar-copy",children:t.jsx("span",{children:We})}),e[119]=We,e[120]=Le):Le=e[120];let Ve;e[121]!==L||e[122]!==a||e[123]!==re||e[124]!==$||e[125]!==s.revision||e[126]!==f||e[127]!==j||e[128]!==d?(Ve=L&&t.jsx("button",{type:"button",className:"goal-panel-button",disabled:a||!d||$,onClick:()=>j(()=>f({action:"update",revision:s.revision,plan:re})),children:"Save"}),e[121]=L,e[122]=a,e[123]=re,e[124]=$,e[125]=s.revision,e[126]=f,e[127]=j,e[128]=d,e[129]=Ve):Ve=e[129];let Ae;e[130]!==ee||e[131]!==s.status||e[132]!==be||e[133]!==K||e[134]!==R||e[135]!==c?(Ae=c==="scene"&&s.status==="review"&&t.jsxs("button",{type:"button",className:"goal-panel-primary",disabled:!ee,onClick:()=>be(R?"regenerate":"approve","frame"),children:[R?"Regenerate scene":"Generate scene",K]}),e[130]=ee,e[131]=s.status,e[132]=be,e[133]=K,e[134]=R,e[135]=c,e[136]=Ae):Ae=e[136];let Pe;e[137]!==Se||e[138]!==s.status||e[139]!==be||e[140]!==ue||e[141]!==P||e[142]!==c?(Pe=c==="video"&&s.status==="review"&&t.jsxs("button",{type:"button",className:"goal-panel-primary",disabled:!Se,onClick:()=>be(P?"regenerate":"approve","videos"),children:[P?"Regenerate video":"Generate video",ue]}),e[137]=Se,e[138]=s.status,e[139]=be,e[140]=ue,e[141]=P,e[142]=c,e[143]=Pe):Pe=e[143];let Ue;e[144]!==ke||e[145]!==W||e[146]!==$||e[147]!==s.status||e[148]!==f||e[149]!==j||e[150]!==ne||e[151]!==ae||e[152]!==c?(Ue=c==="finish"&&!$&&(s.status==="review"||s.status==="completed"||W)&&t.jsx("button",{type:"button",className:"goal-panel-primary",disabled:!ke,onClick:()=>j(()=>f({action:"finish",start_seconds:ae,end_seconds:ne})),children:"Finish"}),e[144]=ke,e[145]=W,e[146]=$,e[147]=s.status,e[148]=f,e[149]=j,e[150]=ne,e[151]=ae,e[152]=c,e[153]=Ue):Ue=e[153];let Ne;e[154]!==a||e[155]!==s||e[156]!==f||e[157]!==j?(Ne=Et(s)&&t.jsx("button",{type:"button",className:"goal-panel-primary",disabled:a,onClick:()=>j(()=>f({action:"retry"})),children:"Retry"}),e[154]=a,e[155]=s,e[156]=f,e[157]=j,e[158]=Ne):Ne=e[158];let Me;e[159]!==Le||e[160]!==Ve||e[161]!==Ae||e[162]!==Pe||e[163]!==Ue||e[164]!==Ne?(Me=t.jsxs("div",{className:"goal-panel-bar",children:[Le,Ve,Ae,Pe,Ue,Ne]}),e[159]=Le,e[160]=Ve,e[161]=Ae,e[162]=Pe,e[163]=Ue,e[164]=Ne,e[165]=Me):Me=e[165];let st;return e[166]!==$e||e[167]!==Oe||e[168]!==Fe||e[169]!==Te||e[170]!==we||e[171]!==Be||e[172]!==Me||e[173]!==c?(st=t.jsxs("div",{className:"goal-editor goal-simple","data-review":c,children:[$e,Oe,Fe,Te,we,Be,Me]}),e[166]=$e,e[167]=Oe,e[168]=Fe,e[169]=Te,e[170]=we,e[171]=Be,e[172]=Me,e[173]=c,e[174]=st):st=e[174],st}const Ns=[{id:"frame",label:"Scene"},{id:"storyboards",label:"Storyboard"},{id:"videos",label:"Video"}];function Cs(n){const e=Xe.c(254),{goal:s,plan:l,disabled:a,onSave:v,onApprove:h,onRegenerate:j,onRevise:f,onSelect:C,resolveAsset:c,onPreviewCell:G}=n;let x;e[0]!==l?(x=()=>l,e[0]=l,e[1]=x):x=e[1];const[i,o]=Ie.useState(x);let w;e[2]!==l.shots?(w=()=>l.shots.map(Gs),e[2]=l.shots,e[3]=w):w=e[3];const[r,V]=Ie.useState(w);let u;e[4]!==s.stage||e[5]!==s.stages.videos?.outputs||e[6]!==s.status?(u=()=>s.status==="completed"||s.stages.videos?.outputs.length?"videos":s.stage==="videos"?"storyboards":"frame",e[4]=s.stage,e[5]=s.stages.videos?.outputs,e[6]=s.status,e[7]=u):u=e[7];const[m,k]=Ie.useState(u);let E,M,O,D,b,Y,U,L,d,p,A,R,P,B,H,z,$,W,I,X,N,S,me,pe,le,_,Q;if(e[8]!==a||e[9]!==i||e[10]!==s||e[11]!==h||e[12]!==G||e[13]!==j||e[14]!==f||e[15]!==C||e[16]!==c||e[17]!==l||e[18]!==r||e[19]!==m){p={...i,shots:r.map(ks)},D=!$t(p,l),U=!s.stages.frame?.outputs.length,Q=!!(p.title.trim()&&p.continuity.trim()&&p.frame.prompt.trim())&&r.every(Ps);let ie;e[47]!==i.aspectRatio||e[48]!==i.imageModel||e[49]!==i.imageResolution||e[50]!==i.style||e[51]!==l.aspectRatio||e[52]!==l.imageModel||e[53]!==l.imageResolution||e[54]!==l.style?(ie=i.aspectRatio!==l.aspectRatio||i.imageModel!==l.imageModel||i.imageResolution!==l.imageResolution||!Qt(i.style,l.style),e[47]=i.aspectRatio,e[48]=i.imageModel,e[49]=i.imageResolution,e[50]=i.style,e[51]=l.aspectRatio,e[52]=l.imageModel,e[53]=l.imageResolution,e[54]=l.style,e[55]=ie):ie=e[55];const de=ie;let q;e[56]!==i.frameContinuity||e[57]!==i.imageModel||e[58]!==i.imageResolution||e[59]!==i.videoResolution||e[60]!==l.frameContinuity||e[61]!==l.imageModel||e[62]!==l.imageResolution||e[63]!==l.shots||e[64]!==l.videoResolution||e[65]!==r?(q=i.imageModel!==l.imageModel||i.imageResolution!==l.imageResolution||i.videoResolution!==l.videoResolution||i.frameContinuity!==l.frameContinuity||r.length!==l.shots.length||r.some((y,T)=>y.durationSeconds!==l.shots[T]?.durationSeconds),e[56]=i.frameContinuity,e[57]=i.imageModel,e[58]=i.imageResolution,e[59]=i.videoResolution,e[60]=l.frameContinuity,e[61]=l.imageModel,e[62]=l.imageResolution,e[63]=l.shots,e[64]=l.videoResolution,e[65]=r,e[66]=q):q=e[66],A=q;let Re;e[67]!==i.continuity||e[68]!==i.frame||e[69]!==i.referenceRoles||e[70]!==s||e[71]!==U||e[72]!==l.continuity||e[73]!==l.frame||e[74]!==l.referenceRoles||e[75]!==de?(Re=!U&&(!!dt(s,"frame",0)||de||i.frame.prompt!==l.frame.prompt||i.continuity!==l.continuity||JSON.stringify(i.referenceRoles)!==JSON.stringify(l.referenceRoles)),e[67]=i.continuity,e[68]=i.frame,e[69]=i.referenceRoles,e[70]=s,e[71]=U,e[72]=l.continuity,e[73]=l.frame,e[74]=l.referenceRoles,e[75]=de,e[76]=Re):Re=e[76],Y=Re;let Ce;if(e[77]!==i.frameContinuity||e[78]!==s||e[79]!==l.shots||e[80]!==l.storyboardLayout||e[81]!==r){let y;e[83]!==i.frameContinuity||e[84]!==s||e[85]!==l.shots||e[86]!==l.storyboardLayout||e[87]!==r.length?(y=(T,se)=>dt(s,"storyboards",se)||T.storyboardPrompt!==l.shots[se]?.storyboardPrompt||T.durationSeconds!==l.shots[se]?.durationSeconds||T.title!==l.shots[se]?.title||l.storyboardLayout!=="six-panel"&&T.videoPrompt!==l.shots[se]?.videoPrompt||i.frameContinuity&&(dt(s,"storyboards",se+r.length)||(T.endingPrompt??T.videoPrompt)!==(l.shots[se]?.endingPrompt??l.shots[se]?.videoPrompt)),e[83]=i.frameContinuity,e[84]=s,e[85]=l.shots,e[86]=l.storyboardLayout,e[87]=r.length,e[88]=y):y=e[88],Ce=r.some(y),e[77]=i.frameContinuity,e[78]=s,e[79]=l.shots,e[80]=l.storyboardLayout,e[81]=r,e[82]=Ce}else Ce=e[82];E=Ce,d=s.stage==="assembly"?"videos":s.stage,M=s.status==="review"&&Q&&!a&&!A&&(d==="frame"||!Y)&&(d!=="videos"||!E),b=s.estimate[d];let Ge;e[89]!==b.usd?(Ge=b.usd===null?" · estimate unavailable":` · $${b.usd.toFixed(2)}`,e[89]=b.usd,e[90]=Ge):Ge=e[90],O=Ge;const $e=`Use scene · Generate storyboard${r.length>1?"s":""}`,Oe=`Use storyboard${r.length>1?"s":""} · Generate video${r.length>1?"s":""}`;let Fe;e[91]!==$e||e[92]!==Oe?(Fe={frame:"Generate scene",storyboards:$e,videos:Oe},e[91]=$e,e[92]=Oe,e[93]=Fe):Fe=e[93],L=Fe;let Te;e[94]===Symbol.for("react.memo_cache_sentinel")?(Te=(y,T)=>V(se=>se.map((Ct,yt)=>yt===y?{...Ct,...T}:Ct)),e[94]=Te):Te=e[94],_=Te;let we;e[95]!==i.frame||e[96]!==r?(we=(y,T)=>y==="frame"?i.frame.prompt:y==="storyboards"&&T>=r.length?r[T%r.length].endingPrompt??"":y==="storyboards"?r[T].storyboardPrompt:r[T].videoPrompt,e[95]=i.frame,e[96]=r,e[97]=we):we=e[97];const Be=we;let We;e[98]!==i||e[99]!==r.length?(We=(y,T,se)=>y==="frame"?o({...i,frame:{prompt:se}}):_(T%r.length,y==="videos"?{videoPrompt:se}:T>=r.length?{endingPrompt:se||null}:{storyboardPrompt:se}),e[98]=i,e[99]=r.length,e[100]=We):We=e[100];const Le=We,Ve=(y,T)=>t.jsx(Vt,{goal:s,stage:y,index:T,prompt:Be(y,T),disabled:a,canGenerate:Q&&!A&&(y==="frame"||!Y)&&(y!=="videos"||!E),resolveAsset:c,onOpen:G,onPromptChange:se=>Le(y,T,se),onRegenerate:()=>j(p,y,T),onRevise:se=>f(p,y,T,se),onSelect:se=>C(y,T,se)},`${y}:${r[T%r.length]?.editorId??"scene"}:${T>=r.length}`),Ae=ft(i.style.id);R="goal-editor goal-simple",P=m,B=y=>{y.key!=="Enter"||!(y.metaKey||y.ctrlKey)||y.nativeEvent.isComposing||(y.preventDefault(),M&&h(p))};let Pe;e[101]!==s.stages||e[102]!==m?(Pe=Ns.map(y=>t.jsxs("button",{type:"button",className:"goal-panel-button","aria-pressed":m===y.id,onClick:()=>k(y.id),children:[y.label,s.stages[y.id]?.outputs.length?s.stages[y.id]?.outputs.some(ws)?" · Needs refresh":" ✓":""]},y.id)),e[101]=s.stages,e[102]=m,e[103]=Pe):Pe=e[103],e[104]!==Pe?(H=t.jsx("nav",{className:"goal-stage-tabs","aria-label":"Goal stages",children:Pe}),e[104]=Pe,e[105]=H):H=e[105],z=t.jsxs("p",{className:"goal-panel-muted",children:[r.length===1?`${r[0].durationSeconds}s video`:`${r.length} clips`," · ",p.aspectRatio," · Seedance 2.5"]}),$=m==="frame"&&(U?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"goal-reference-grid","aria-label":"Reference images",children:s.characters.map((y,T)=>t.jsxs("div",{children:[t.jsx(ct,{artifactId:y.artifactId,cellId:y.cellId,label:`Reference ${T+1} · ${y.address}`,resolveAsset:c,onOpen:G}),t.jsxs("label",{children:[t.jsx("span",{children:"Role"}),t.jsxs("select",{"aria-label":`Reference ${T+1} role`,value:i.referenceRoles?.[T]??"reference",disabled:a,onChange:se=>o({...i,referenceRoles:s.characters.map((Ct,yt)=>yt===T?se.target.value:i.referenceRoles?.[yt]??"reference")}),children:[t.jsx("option",{value:"scene",children:"Scene screenshot"}),t.jsx("option",{value:"character",children:"Character"}),t.jsx("option",{value:"prop",children:"Prop"}),t.jsx("option",{value:"reference",children:"Reference"})]})]})]},y.cellId))}),t.jsx(Ye,{label:"Scene prompt",value:i.frame.prompt,budget:"frame",disabled:a,onChange:y=>Le("frame",0,y)})]}):Ve("frame",0)),W=m!=="frame"&&t.jsx("div",{className:"goal-simple-outputs",children:r.map((y,T)=>t.jsxs("div",{children:[r.length>1&&t.jsx("p",{className:"goal-panel-muted",children:y.title}),s.stages[m]?.outputs.some(se=>se.index===T)?Ve(m,T):t.jsx(Ye,{label:m==="storyboards"?"Storyboard prompt":"Video directions",name:`Shot ${T+1} ${m==="storyboards"?"storyboard":"video"} prompt`,value:Be(m,T),budget:m==="storyboards"?"storyboard":"video",wordLimit:m==="storyboards"&&p.storyboardLayout==="six-panel"?48:void 0,disabled:a,onChange:se=>Le(m,T,se)}),m==="storyboards"&&p.frameContinuity&&Ve(m,T+r.length)]},y.editorId))}),e[106]!==p||e[107]!==m?(I=m==="storyboards"&&t.jsxs("p",{className:"goal-panel-muted",children:[p.storyboardLayout==="six-panel"?"Six beats · 2 columns × 3 rows":"Four beats · 2 × 2"," · timestamps and camera notes below each picture."]}),e[106]=p,e[107]=m,e[108]=I):I=e[108],pe="goal-disclosure goal-advanced",e[109]===Symbol.for("react.memo_cache_sentinel")?(le=t.jsx("summary",{children:"Advanced"}),e[109]=le):le=e[109],X="goal-editor-settings";let Ue;e[110]===Symbol.for("react.memo_cache_sentinel")?(Ue=t.jsx("span",{children:"Title"}),e[110]=Ue):Ue=e[110];let Ne;e[111]!==i?(Ne=y=>o({...i,title:y.target.value}),e[111]=i,e[112]=Ne):Ne=e[112],e[113]!==a||e[114]!==i.title||e[115]!==Ne?(N=t.jsxs("label",{children:[Ue,t.jsx("input",{"aria-label":"Video title",value:i.title,disabled:a,maxLength:120,onChange:Ne})]}),e[113]=a,e[114]=i.title,e[115]=Ne,e[116]=N):N=e[116];let Me;e[117]===Symbol.for("react.memo_cache_sentinel")?(Me=t.jsx("span",{children:"Style"}),e[117]=Me):Me=e[117];const st=i.style.id;let J;e[118]!==i?(J=y=>{const T=y.target.value;o({...i,style:{id:T,options:xt(T)}})},e[118]=i,e[119]=J):J=e[119];let je;e[120]===Symbol.for("react.memo_cache_sentinel")?(je=Mt.map($s),e[120]=je):je=e[120];let he;e[121]!==a||e[122]!==i.style.id||e[123]!==J?(he=t.jsxs("label",{children:[Me,t.jsx("select",{"aria-label":"Style",value:st,disabled:a,onChange:J,children:je})]}),e[121]=a,e[122]=i.style.id,e[123]=J,e[124]=he):he=e[124];let Je;e[125]===Symbol.for("react.memo_cache_sentinel")?(Je=t.jsx("span",{children:"Format"}),e[125]=Je):Je=e[125];let De;e[126]!==i?(De=y=>o({...i,aspectRatio:y.target.value}),e[126]=i,e[127]=De):De=e[127];let Ee,He,Qe;e[128]===Symbol.for("react.memo_cache_sentinel")?(Ee=t.jsx("option",{value:"9:16",children:"Portrait · 9:16"}),He=t.jsx("option",{value:"16:9",children:"Landscape · 16:9"}),Qe=t.jsx("option",{value:"1:1",children:"Square · 1:1"}),e[128]=Ee,e[129]=He,e[130]=Qe):(Ee=e[128],He=e[129],Qe=e[130]);let lt;e[131]!==a||e[132]!==i.aspectRatio||e[133]!==De?(lt=t.jsxs("label",{children:[Je,t.jsxs("select",{"aria-label":"Format",value:i.aspectRatio,disabled:a,onChange:De,children:[Ee,He,Qe]})]}),e[131]=a,e[132]=i.aspectRatio,e[133]=De,e[134]=lt):lt=e[134];let Ze;e[135]===Symbol.for("react.memo_cache_sentinel")?(Ze=t.jsx("span",{children:"Image model"}),e[135]=Ze):Ze=e[135];let qe;e[136]!==i?(qe=y=>o({...i,imageModel:y.target.value}),e[136]=i,e[137]=qe):qe=e[137];let _e,et,nt;e[138]===Symbol.for("react.memo_cache_sentinel")?(_e=t.jsx("option",{value:"nano-banana-2-1",children:"Nano Banana 2.1"}),et=t.jsx("option",{value:"sunburst",children:"GPT Image 2.5 Sunburst"}),nt=t.jsx("option",{value:"flare",children:"GPT Image 2.5 Flare"}),e[138]=_e,e[139]=et,e[140]=nt):(_e=e[138],et=e[139],nt=e[140]);let at;e[141]!==a||e[142]!==i.imageModel||e[143]!==qe?(at=t.jsxs("label",{children:[Ze,t.jsxs("select",{"aria-label":"Image model",value:i.imageModel,disabled:a,onChange:qe,children:[_e,et,nt]})]}),e[141]=a,e[142]=i.imageModel,e[143]=qe,e[144]=at):at=e[144];let ot;e[145]===Symbol.for("react.memo_cache_sentinel")?(ot=t.jsx("span",{children:"Image resolution"}),e[145]=ot):ot=e[145];let tt;e[146]!==i?(tt=y=>o({...i,imageResolution:y.target.value}),e[146]=i,e[147]=tt):tt=e[147];let it,g;e[148]===Symbol.for("react.memo_cache_sentinel")?(it=t.jsx("option",{value:"1K",children:"1K"}),g=t.jsx("option",{value:"2K",children:"2K"}),e[148]=it,e[149]=g):(it=e[148],g=e[149]);let F;e[150]!==a||e[151]!==i.imageResolution||e[152]!==tt?(F=t.jsxs("label",{children:[ot,t.jsxs("select",{"aria-label":"Image resolution",value:i.imageResolution,disabled:a,onChange:tt,children:[it,g]})]}),e[150]=a,e[151]=i.imageResolution,e[152]=tt,e[153]=F):F=e[153];let fe;e[154]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("span",{children:"Video resolution"}),e[154]=fe):fe=e[154];let Ke;e[155]!==i?(Ke=y=>o({...i,videoResolution:y.target.value}),e[155]=i,e[156]=Ke):Ke=e[156];let rt,ze;e[157]===Symbol.for("react.memo_cache_sentinel")?(rt=t.jsx("option",{value:"480p",children:"480p"}),ze=t.jsx("option",{value:"720p",children:"720p"}),e[157]=rt,e[158]=ze):(rt=e[157],ze=e[158]);let mt;e[159]!==a||e[160]!==i.videoResolution||e[161]!==Ke?(mt=t.jsxs("label",{children:[fe,t.jsxs("select",{"aria-label":"Video resolution",value:i.videoResolution,disabled:a,onChange:Ke,children:[rt,ze]})]}),e[159]=a,e[160]=i.videoResolution,e[161]=Ke,e[162]=mt):mt=e[162];let gt;e[163]===Symbol.for("react.memo_cache_sentinel")?(gt=t.jsx("span",{children:"Ending frames"}),e[163]=gt):gt=e[163];const St=i.frameContinuity?"on":"off",Nt=a||!U;let pt;e[164]!==i?(pt=y=>o({...i,frameContinuity:y.target.value==="on"}),e[164]=i,e[165]=pt):pt=e[165];let bt,vt;e[166]===Symbol.for("react.memo_cache_sentinel")?(bt=t.jsx("option",{value:"off",children:"Off"}),vt=t.jsx("option",{value:"on",children:"Add ending references"}),e[166]=bt,e[167]=vt):(bt=e[166],vt=e[167]);let ut;e[168]!==St||e[169]!==Nt||e[170]!==pt?(ut=t.jsxs("label",{children:[gt,t.jsxs("select",{"aria-label":"Ending frames",value:St,disabled:Nt,onChange:pt,children:[bt,vt]})]}),e[168]=St,e[169]=Nt,e[170]=pt,e[171]=ut):ut=e[171],e[172]!==he||e[173]!==lt||e[174]!==at||e[175]!==F||e[176]!==mt||e[177]!==ut?(S=t.jsxs("div",{className:"goal-advanced-options",children:[he,lt,at,F,mt,ut]}),e[172]=he,e[173]=lt,e[174]=at,e[175]=F,e[176]=mt,e[177]=ut,e[178]=S):S=e[178],me=Ae.options.map(y=>t.jsxs("label",{children:[t.jsx("span",{children:y.label}),t.jsx("select",{"aria-label":y.label,value:i.style.options[y.key],disabled:a,onChange:T=>{const se={...i.style.options,[y.key]:T.target.value};y.key==="delivery"&&delete se.camera,o({...i,style:{id:Ae.id,options:xt(Ae.id,se)}})},children:y.choices.map(Rs)})]},y.key)),e[8]=a,e[9]=i,e[10]=s,e[11]=h,e[12]=G,e[13]=j,e[14]=f,e[15]=C,e[16]=c,e[17]=l,e[18]=r,e[19]=m,e[20]=E,e[21]=M,e[22]=O,e[23]=D,e[24]=b,e[25]=Y,e[26]=U,e[27]=L,e[28]=d,e[29]=p,e[30]=A,e[31]=R,e[32]=P,e[33]=B,e[34]=H,e[35]=z,e[36]=$,e[37]=W,e[38]=I,e[39]=X,e[40]=N,e[41]=S,e[42]=me,e[43]=pe,e[44]=le,e[45]=_,e[46]=Q}else E=e[20],M=e[21],O=e[22],D=e[23],b=e[24],Y=e[25],U=e[26],L=e[27],d=e[28],p=e[29],A=e[30],R=e[31],P=e[32],B=e[33],H=e[34],z=e[35],$=e[36],W=e[37],I=e[38],X=e[39],N=e[40],S=e[41],me=e[42],pe=e[43],le=e[44],_=e[45],Q=e[46];let ce;e[179]!==i?(ce=ie=>o({...i,continuity:ie}),e[179]=i,e[180]=ce):ce=e[180];let ge;e[181]!==a||e[182]!==i.continuity||e[183]!==ce?(ge=t.jsx(Ye,{label:"Continuity",value:i.continuity,budget:"continuity",disabled:a,onChange:ce}),e[181]=a,e[182]=i.continuity,e[183]=ce,e[184]=ge):ge=e[184];let re;e[185]!==a||e[186]!==U||e[187]!==p||e[188]!==r||e[189]!==_?(re=r.map((ie,de)=>t.jsxs("div",{className:"goal-editor-settings",children:[t.jsxs("label",{children:[t.jsxs("span",{children:["Clip ",de+1," duration"]}),t.jsx("input",{type:"number","aria-label":`Shot ${de+1} seconds`,min:4,max:30,value:ie.durationSeconds,disabled:a,onChange:q=>_(de,{durationSeconds:Number(q.target.value)})})]}),t.jsx(Ye,{label:`Clip ${de+1} storyboard`,value:ie.storyboardPrompt,budget:"storyboard",wordLimit:p.storyboardLayout==="six-panel"?48:void 0,disabled:a,onChange:q=>_(de,{storyboardPrompt:q})}),t.jsx(Ye,{label:`Clip ${de+1} motion and sound`,value:ie.videoPrompt,budget:"video",disabled:a,onChange:q=>_(de,{videoPrompt:q})}),U&&r.length>1&&t.jsxs("button",{type:"button",className:"goal-panel-button",disabled:a,onClick:()=>V(r.filter(q=>q.editorId!==ie.editorId)),children:["Remove clip ",de+1]})]},ie.editorId)),e[185]=a,e[186]=U,e[187]=p,e[188]=r,e[189]=_,e[190]=re):re=e[190];let ae;e[191]!==a||e[192]!==U||e[193]!==r?(ae=U&&t.jsx("button",{type:"button",className:"goal-panel-button",disabled:a||r.length>=8,onClick:()=>V([...r,{...r.at(-1),title:`Clip ${r.length+1}`,editorId:crypto.randomUUID()}]),children:"Add clip"}),e[191]=a,e[192]=U,e[193]=r,e[194]=ae):ae=e[194];let ne;e[195]!==ge||e[196]!==re||e[197]!==ae||e[198]!==X||e[199]!==N||e[200]!==S||e[201]!==me?(ne=t.jsxs("div",{className:X,children:[N,S,me,ge,re,ae]}),e[195]=ge,e[196]=re,e[197]=ae,e[198]=X,e[199]=N,e[200]=S,e[201]=me,e[202]=ne):ne=e[202];let oe;e[203]!==ne||e[204]!==pe||e[205]!==le?(oe=t.jsxs("details",{className:pe,children:[le,ne]}),e[203]=ne,e[204]=pe,e[205]=le,e[206]=oe):oe=e[206];const ye=D?"Changes will be saved before generation.":s.status==="completed"?"Choose any stage to revise it. Earlier versions stay available.":"Approves this stage only.";let te;e[207]!==ye?(te=t.jsx("span",{children:ye}),e[207]=ye,e[208]=te):te=e[208];let K;e[209]!==Q?(K=!Q&&t.jsx("span",{className:"goal-panel-warning",children:"Complete the prompts and choose a whole duration from 4 to 30 seconds."}),e[209]=Q,e[210]=K):K=e[210];let Z;e[211]!==A?(Z=A&&t.jsx("span",{className:"goal-panel-warning",children:"Save the plan to refresh cost estimates before generating."}),e[211]=A,e[212]=Z):Z=e[212];let ue;e[213]!==E||e[214]!==Y?(ue=Y?t.jsx("span",{role:"status",className:"goal-panel-warning",children:"Refresh the scene before continuing."}):E&&t.jsx("span",{role:"status",className:"goal-panel-warning",children:"Refresh the changed storyboard before generating video."}),e[213]=E,e[214]=Y,e[215]=ue):ue=e[215];let ee;e[216]!==b.warnings||e[217]!==s.status?(ee=s.status==="review"&&b.warnings.map(Is),e[216]=b.warnings,e[217]=s.status,e[218]=ee):ee=e[218];let Se;e[219]!==te||e[220]!==K||e[221]!==Z||e[222]!==ue||e[223]!==ee?(Se=t.jsxs("div",{className:"goal-panel-bar-copy",children:[te,K,Z,ue,ee]}),e[219]=te,e[220]=K,e[221]=Z,e[222]=ue,e[223]=ee,e[224]=Se):Se=e[224];let ke;e[225]!==D||e[226]!==a||e[227]!==v||e[228]!==p||e[229]!==Q?(ke=D&&t.jsx("button",{type:"button",className:"goal-panel-button",disabled:a||!Q,onClick:()=>v(p),children:"Save plan"}),e[225]=D,e[226]=a,e[227]=v,e[228]=p,e[229]=Q,e[230]=ke):ke=e[230];let xe;e[231]!==M||e[232]!==O||e[233]!==s.status||e[234]!==L||e[235]!==d||e[236]!==h||e[237]!==p?(xe=s.status==="review"&&t.jsxs("button",{type:"button",className:"goal-panel-primary",disabled:!M,onClick:()=>h(p),children:[L[d],O]}),e[231]=M,e[232]=O,e[233]=s.status,e[234]=L,e[235]=d,e[236]=h,e[237]=p,e[238]=xe):xe=e[238];let be;e[239]!==Se||e[240]!==ke||e[241]!==xe?(be=t.jsxs("div",{className:"goal-panel-bar",children:[Se,ke,xe]}),e[239]=Se,e[240]=ke,e[241]=xe,e[242]=be):be=e[242];let ve;return e[243]!==R||e[244]!==P||e[245]!==B||e[246]!==H||e[247]!==z||e[248]!==$||e[249]!==W||e[250]!==I||e[251]!==oe||e[252]!==be?(ve=t.jsxs("div",{className:R,"data-review":P,onKeyDown:B,children:[H,z,$,W,I,oe,be]}),e[243]=R,e[244]=P,e[245]=B,e[246]=H,e[247]=z,e[248]=$,e[249]=W,e[250]=I,e[251]=oe,e[252]=be,e[253]=ve):ve=e[253],ve}function Is(n){return t.jsx("span",{children:n},n)}function Rs(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function $s(n){return t.jsx("option",{value:n,children:ft(n).label},n)}function ws(n){return n.stale}function Ps(n){return n.title.trim()&&n.storyboardPrompt.trim()&&n.videoPrompt.trim()&&Number.isInteger(n.durationSeconds)&&n.durationSeconds>=4&&n.durationSeconds<=30}function ks(n){const{editorId:e,...s}=n;return s}function Gs(n){return{...n,editorId:crypto.randomUUID()}}function Os(n,e){n.key!=="Enter"||!(n.metaKey||n.ctrlKey)||n.nativeEvent.isComposing||(n.preventDefault(),e())}function Ls(n){const e=Xe.c(26),{shot:s,onSelectCell:l}=n,a=Rt(s.state==="generating"?s.startedAt:null);let v;e[0]!==a||e[1]!==s.state?(v=s.state==="generating"&&a!==null?`Generating ${Gt(a)}`:es(s.state),e[0]=a,e[1]=s.state,e[2]=v):v=e[2];const h=v;let j;e[3]!==s.number?(j=t.jsx("span",{className:"goal-progress-number",children:s.number}),e[3]=s.number,e[4]=j):j=e[4];let f;e[5]!==s.prompt||e[6]!==s.title?(f=t.jsx("span",{className:"goal-progress-title",title:s.prompt,children:s.title}),e[5]=s.prompt,e[6]=s.title,e[7]=f):f=e[7];const C=s.seconds>0?`${s.seconds}s`:"Image";let c;e[8]!==C?(c=t.jsx("span",{className:"goal-progress-seconds",children:C}),e[8]=C,e[9]=c):c=e[9];let G;e[10]!==l||e[11]!==s.address||e[12]!==s.cellId?(G=s.cellId&&s.address?t.jsx("button",{type:"button",className:"goal-progress-address",onClick:()=>l(s.cellId),children:s.address}):t.jsx("span",{"aria-hidden":"true",children:"—"}),e[10]=l,e[11]=s.address,e[12]=s.cellId,e[13]=G):G=e[13];let x;e[14]!==h?(x=t.jsx("span",{className:"goal-progress-state",children:h}),e[14]=h,e[15]=x):x=e[15];let i;e[16]!==s.error?(i=s.error&&t.jsx("span",{className:"goal-progress-error",children:s.error}),e[16]=s.error,e[17]=i):i=e[17];let o;return e[18]!==s.state||e[19]!==j||e[20]!==f||e[21]!==c||e[22]!==G||e[23]!==x||e[24]!==i?(o=t.jsxs("li",{className:"goal-progress-shot","data-state":s.state,children:[j,f,c,G,x,i]}),e[18]=s.state,e[19]=j,e[20]=f,e[21]=c,e[22]=G,e[23]=x,e[24]=i,e[25]=o):o=e[25],o}function As(n){const e=Xe.c(9),{goal:s}=n;let l;e[0]!==s.plan?(l=ht(s.plan)&&s.plan.storyboardLayout==="six-panel",e[0]=s.plan,e[1]=l):l=e[1];const a=l,v=a?s.stage==="frame"?0:s.stage==="storyboards"?1:2:s.status==="planning"?0:s.stage==="frame"?1:s.stage==="storyboards"?2:s.stage==="videos"?3:4;let h;e[2]!==s.plan||e[3]!==a?(h=a?["Scene","Storyboard","Video"]:["Plan","Full frame","Storyboards","Videos",...At(s.plan).length===1?[]:["Combine"]],e[2]=s.plan,e[3]=a,e[4]=h):h=e[4];const j=h;let f;return e[5]!==v||e[6]!==s.status||e[7]!==j?(f=t.jsx("ol",{className:"goal-stepper","aria-label":"Goal stages",children:j.map((C,c)=>t.jsx("li",{"data-state":s.status==="completed"||c<v?"done":c===v?"current":"pending","aria-current":c===v?"step":void 0,children:C},C))}),e[5]=v,e[6]=s.status,e[7]=j,e[8]=f):f=e[8],f}function Bs({goal:n,connected:e,onAction:s,onPreview:l,onSelectCell:a,onPreviewCell:v,resolveAsset:h}){const[j,f]=Ie.useState(!1),C=Ie.useRef(!1),[c,G]=Ie.useState(null),x=Ot(n),i=Lt(n),o=It(n,n.plan,void 0),w=n.plan&&"version"in n.plan&&n.plan.version===3?n.plan:null,r=j||!e,V=ht(n.plan)&&(n.plan.storyboardLayout==="six-panel"||n.status==="completed")&&["review","completed","failed","interrupted"].includes(n.status),u=async d=>{if(!(!e||C.current)){C.current=!0,f(!0),G(null);try{await d()}catch(p){G(p instanceof Error?p.message:String(p))}finally{C.current=!1,f(!1)}}},m=d=>{u(()=>s({...d,goal_id:n.goalId}))},k=(d,p,A,R,P)=>{u(async()=>{const B=ht(n.plan)&&!$t(p,n.plan)?await s({action:"update",goal_id:n.goalId,revision:n.revision,plan:p}):n;d!=="update"&&await s({action:d,goal_id:n.goalId,revision:B.revision,...A?{stage:A,index:R}:{},...P?{feedback:P}:{}})})},E=n.status==="planning"||n.status==="running",M=["completed","failed","interrupted","cancelled"].includes(n.status),O=n.status==="completed",D=Et(n),b=n.steps.filter(d=>d.id!=="assemble"&&d.status!=="completed").map(d=>Ut(n,x.stage,x.stage==="frame"?0:Number(/\d+$/u.exec(d.id)?.[0])-1)),Y=n.chainId===null||b.some(d=>d===null)?" · estimate unavailable":` · $${b.reduce((d,p)=>d+(p??0),0).toFixed(2)}`,U=O?n.assembly?"Preview sequence":"Open clip":D?`Retry ${n.chainId===null?"planning":x.stage==="frame"?"frame":x.stage}${Y}`:null,L=()=>{if(!r){if(O&&n.assembly){u(()=>l(n.assembly.startFrame));return}if(O){const d=n.stages.videos?.outputs[0]?.cellId??n.steps.find(p=>p.outputCellId)?.outputCellId;d&&v(d);return}m({action:"retry"})}};return t.jsxs("div",{className:"composer-notebook-dock inspector goal-panel","data-tone":i.tone,children:[t.jsxs("header",{children:[t.jsxs("span",{className:"inspector-cell-title goal-panel-title",children:[t.jsx(jt,{size:14,className:"goal-panel-flag"}),t.jsx("strong",{children:"GOAL"}),n.address&&t.jsx("code",{className:"inspector-cell-address",children:n.address}),t.jsx("span",{className:"goal-panel-name",title:o.title,children:o.title}),t.jsx("span",{className:"goal-tile-chip","data-tone":o.chip.tone,children:o.chip.label})]}),t.jsxs("div",{className:"inspector-header-actions",children:[t.jsxs("div",{className:"inspector-generation-header-actions",children:[x.phase==="review"&&t.jsx("button",{type:"button",disabled:r,onClick:()=>m({action:"cancel"}),children:w&&n.finish?.status==="running"?"Stop finishing":"Discard goal"}),E&&t.jsx("button",{type:"button",disabled:r,onClick:()=>m({action:"cancel"}),children:Zt(n)}),M&&t.jsx("button",{type:"button",disabled:r||!!n.dismissedAt,onClick:()=>m({action:"dismiss"}),children:"Dismiss"})]}),t.jsx(Tt,{})]})]}),t.jsxs("div",{className:"goal-panel-body",children:[n.planVersion===2&&!V&&t.jsx(As,{goal:n}),w&&n.status!=="planning"&&t.jsx(Ss,{goal:n,plan:w,disabled:r,resolveAsset:h,onPreviewCell:v,onRun:d=>{u(d)},onAction:d=>s({...d,goal_id:n.goalId})},`${n.goalId}:${n.revision}`),!e&&t.jsx("p",{role:"status",className:"goal-panel-muted",children:"Reconnecting. Your goal is saved; generation continues on the server."}),c&&t.jsx("p",{role:"alert",className:"goal-panel-error",children:c}),n.error&&(x.phase==="failed"||x.phase==="interrupted")&&t.jsx("p",{role:"alert",className:"goal-panel-error",children:n.error}),n.combined?.error&&t.jsx("p",{role:"alert",className:"goal-panel-error",children:n.combined.error}),x.phase==="planning"&&t.jsxs("div",{className:"goal-panel-planning",children:[t.jsx("p",{className:"goal-panel-brief",children:n.brief}),t.jsx("p",{className:"goal-panel-muted",children:o.styleLabel==="Match source"?"Planning the scene, storyboard and video from your references…":o.styleLabel?`Planning ${o.styleLabel==="IG Influencer"?"an":"a"} ${o.styleLabel} sequence…`:"Planning the scene, storyboard and video from your reference images…"}),t.jsxs("span",{className:"goal-tile-placeholder","aria-hidden":"true",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})]}),V&&ht(n.plan)&&t.jsx(Cs,{goal:n,plan:n.plan,disabled:r,resolveAsset:h,onPreviewCell:v,onSave:d=>k("update",d),onApprove:d=>k("approve",d),onRegenerate:(d,p,A)=>k("regenerate",d,p,A),onRevise:(d,p,A,R)=>k("revise",d,p,A,R),onSelect:(d,p,A)=>m({action:"select",revision:n.revision,stage:d,index:p,artifact_id:A})},`${n.goalId}:${n.revision}:${n.stage}`),!V&&x.phase==="review"&&ht(n.plan)&&t.jsx(fs,{goal:n,plan:n.plan,disabled:r,resolveAsset:h,onSelectCell:a,onPreviewCell:v,onSave:d=>k("update",d),onApprove:d=>k("approve",d),onRegenerate:(d,p,A)=>k("regenerate",d,p,A),onRevise:(d,p,A,R)=>k("revise",d,p,A,R),onSelect:(d,p,A)=>m({action:"select",stage:d,index:p,artifact_id:A})},`${n.goalId}:${n.revision}:${n.stage}`),!w&&x.phase!=="planning"&&x.phase!=="review"&&(!V||D)&&t.jsxs("div",{onKeyDown:d=>Os(d,L),children:[t.jsxs("div",{className:"goal-progress-summary",children:[t.jsx("progress",{max:Math.max(1,x.total),value:O?x.total:x.done,"aria-label":"Completed stage outputs"}),t.jsxs("span",{children:[x.done," of ",x.total," ready · ",_t(x.stage)]})]}),t.jsx("ol",{className:"goal-progress-list",children:x.shots.map(d=>t.jsx(Ls,{shot:d,onSelectCell:a},d.index))}),t.jsxs("div",{className:"goal-panel-bar",children:[t.jsx("div",{className:"goal-panel-bar-copy",children:t.jsx("span",{children:O?n.assembly?"Clips were appended in order to the timeline.":"Your clip is ready in the notebook.":n.status==="cancelled"?"Remaining work is stopped. Requests already submitted may still finish.":"Outputs appear in the notebook as they finish. You can collapse this panel."})}),U&&t.jsx("button",{type:"button",className:"goal-panel-primary",disabled:r,onClick:L,children:U})]})]}),O&&n.assemblyStale&&t.jsxs("div",{className:"goal-panel-bar",children:[t.jsx("span",{className:"goal-panel-bar-copy",children:"The timeline uses earlier video versions."}),t.jsx("button",{type:"button",className:"goal-panel-button",disabled:r,onClick:()=>m({action:"assemble"}),children:"Assemble selected versions"})]}),O&&n.assembly&&!n.assemblyStale&&n.planVersion===2&&t.jsxs("div",{className:"goal-panel-bar",children:[t.jsx("span",{className:"goal-panel-bar-copy",children:"Create one video with all clips and their sound. Rendered locally."}),n.combined?.status==="completed"?t.jsx("button",{type:"button",className:"goal-panel-button",onClick:()=>v(n.combined.cellId),children:"Open combined video"}):t.jsx("button",{type:"button",className:"goal-panel-button",disabled:r||n.combined?.status==="running",onClick:()=>m({action:"combine"}),children:n.combined?.status==="running"?"Combining clips…":n.combined?.status==="failed"?"Retry combining clips":"Combine into one video"})]})]})]})}function Hs(){const n=Xe.c(3);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("span",{className:"inspector-cell-title goal-panel-title",children:[t.jsx(jt,{size:14,className:"goal-panel-flag"}),t.jsx("strong",{children:"GOAL"})]}),n[0]=e):e=n[0];let s;n[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("header",{children:[e,t.jsx("div",{className:"inspector-header-actions",children:t.jsx(Tt,{})})]}),n[1]=s):s=n[1];let l;return n[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"composer-notebook-dock inspector goal-panel",children:[s,t.jsx("div",{className:"goal-panel-body",children:t.jsx("p",{role:"status",className:"goal-panel-muted",children:"Loading the goal…"})})]}),n[2]=l):l=n[2],l}export{Bs as G,Hs as a,Ds as b,Ks as c};