1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6979],{2289:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},5894:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(37876),o=n(59742);function r(e){let{checked:t,onChange:n,size:r="md",disabled:l,startDecorator:s,endDecorator:a,children:d,sx:c,color:u="neutral"}=e;return(0,i.jsx)(o.A,{color:u,variant:t?"solid":"outlined",onClick:()=>n(!t),size:r,disabled:l,startDecorator:s,endDecorator:a,sx:{whiteSpace:"nowrap",...c},children:d})}},13832:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(31011);let o={Character:"Characters",Location:"Locations",Prop:"Props"};function r(e){let{requestNavigation:t,queryParams:n,projectId:r,projectName:l,assetsHubForKind:s}=e,a={...n,[i.B.project]:r};delete a[i.B.episode],delete a[i.B.scene];let d=[{kindLabel:"Projects",valueLabel:"",labelOnly:!0,onNavigate:()=>t({pathname:"/projects",query:n})},{kindLabel:"Project",valueLabel:l,onNavigate:()=>t({pathname:"/episodes",query:a})}];if(!s)return d;let c="Character"===s?"/project-characters":"Location"===s?"/project-locations":"/project-props";return[...d,{kindLabel:o[s],valueLabel:"",labelOnly:!0,onNavigate:()=>t({pathname:c,query:{[i.B.project]:r}})}]}},18045:(e,t,n)=>{"use strict";n.d(t,{h:()=>y});var i=n(37876),o=n(26091),r=n(83388),l=n(93813),s=n(65941),a=n(82295),d=n(28742),c=n(83859),u=n(11314),p=n(73616),h=n(49384),v=n(13306),f=n(24086),x=n(77744),m=n(87165);function y(e){return"Project"===e?(0,i.jsx)(s.A,{}):"Asset"===e?(0,i.jsx)(l.A,{}):"Episode"===e?(0,i.jsx)(a.A,{}):"Scene"===e?(0,i.jsx)(d.A,{}):"Panel"===e||"Shot"===e?(0,i.jsx)(x.A,{}):"Character"===e?(0,i.jsx)(c.A,{}):"Expression"===e?(0,i.jsx)(u.A,{}):"Animation"===e?(0,i.jsx)(p.A,{}):"Set"===e?(0,i.jsx)(r.A,{}):"Location"===e?(0,i.jsx)(h.A,{}):"Prop"===e||"Model"===e?(0,i.jsx)(v.A,{}):"Audio"===e?(0,i.jsx)(f.A,{}):"Gallery"===e?(0,i.jsx)(o.A,{}):"Template"===e?(0,i.jsx)(m.az,{sx:{width:"24px",height:"24px",borderRadius:"4px",border:"1.5px solid",borderColor:"primary.500",backgroundColor:"primary.50",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.75rem",fontWeight:"bold",color:"primary.600",fontFamily:"monospace"},children:"T"}):null}},19634:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/episode-properties",function(){return n(91101)}])},24086:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9v7c0 1.1.9 2 2 2h4v-8H5v-1c0-3.87 3.13-7 7-7s7 3.13 7 7v1h-4v8h4c1.1 0 2-.9 2-2v-7c0-4.97-4.03-9-9-9"}),"Headphones")},26091:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo")},31920:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},39844:(e,t,n)=>{"use strict";function i(e){let{saveField:t,approveField:n,clearField:i}=e;return async(e,o)=>{!1!==await t(e,o)&&(o?null==n||n(e):null==i||i(e))}}n.d(t,{W:()=>i})},47897:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(44501),o=n(40670),r=n(14232),l=n(69241),s=n(4697),a=n(88067),d=n(1498),c=n(84239);function u(e){return(0,c.SX)("MuiListItemContent",e)}(0,c.WN)("MuiListItemContent",["root"]);var p=n(52418),h=n(37876);let v=["component","className","children","slots","slotProps"],f=()=>(0,s.A)({root:["root"]},u,{}),x=(0,a.A)("div",{name:"JoyListItemContent",slot:"Root",overridesResolver:(e,t)=>t.root})({flex:"1 1 auto",minWidth:0}),m=r.forwardRef(function(e,t){let n=(0,d.A)({props:e,name:"JoyListItemContent"}),{component:r,className:s,children:a,slots:c={},slotProps:u={}}=n,m=(0,o.A)(n,v),y=(0,i.A)({},n),j=f(),A=(0,i.A)({},m,{component:r,slots:c,slotProps:u}),[k,g]=(0,p.A)("root",{ref:t,className:(0,l.A)(j.root,s),elementType:x,externalForwardedProps:A,ownerState:y});return(0,h.jsx)(k,(0,i.A)({},g,{children:a}))})}
1,57983:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist")},59161:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var i=n(37876),o=n(14232),r=n(55529),l=n(71610),s=n(99876),a=n(25889),d=n(47692),c=n(55564),u=n(34418),p=n(47812),h=n(87165),v=n(8213),f=n(60579),x=n(81339),m=n(18045);function y(e){return null==e?"(none)":String(e).trim().length>0?String(e):"(none)"}function j(e){return null==e?"(none)":"string"==typeof e?y(e):"number"!=typeof e||Number.isNaN(e)?e:String(e)}let A={display:"flex",alignItems:"center",color:"text.secondary",flexShrink:0,"& svg":{fontSize:"1.35rem"}};function k(e){let{entityType:t}=e;if(!t)return null;let n=(0,m.h)(t);return n?(0,i.jsx)(h.az,{component:"span",sx:A,"aria-hidden":!0,children:n}):null}function g(e){let{readOnly:t=!1,linearOrder:n=!1,onPrev:m,onNext:A,prevDisabled:g,nextDisabled:b,titleMenuLabel:w,titleMenuEntityType:z,menuOpen:L,onMenuOpenChange:S,ancestryItems:C=[],siblingItems:R,menuFooter:W}=e,[I,M]=(0,o.useState)(!1),E=void 0!==L&&void 0!==S,P=E?S:M;return t?(0,i.jsxs)(h.BJ,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0,flexGrow:1,flexShrink:1,px:1,py:.25,maxWidth:"100%"},children:[(0,i.jsx)(k,{entityType:z}),(0,i.jsx)(h.az,{sx:{minWidth:0,flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--joy-fontSize-title-md)",fontWeight:"var(--joy-fontWeight-md)"},children:j(w)})]}):(0,i.jsxs)(h.BJ,{direction:"row",alignItems:"center",spacing:0,sx:{minWidth:0,flexGrow:1,flexShrink:1},children:[n?(0,i.jsx)(f.EO,{size:"sm",tooltip:"Previous",disabled:g,onClick:()=>null==m?void 0:m(),sx:{ml:.5},children:(0,i.jsx)(r.A,{})}):null,(0,i.jsxs)(d.m,{open:E?L:I,onOpenChange:(e,t)=>
1P(t),children:[(0,i.jsx)(c.A,{variant:"plain",sx:{px:1,py:.25,minHeight:"auto",maxWidth:"100%",color:"inherit",cursor:"pointer",overflow:"hidden","&:hover":{backgroundColor:"transparent"}},children:(0,i.jsxs)(h.BJ,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0,maxWidth:"100%"},children:[(0,i.jsx)(k,{entityType:z}),(0,i.jsx)(h.az,{sx:{minWidth:0,flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--joy-fontSize-title-md)",fontWeight:"var(--joy-fontWeight-md)"},children:j(w)}),n?null:(0,i.jsx)(a.A,{"aria-hidden":!0,sx:{fontSize:"1.35rem",flexShrink:0,opacity:.75,color:"text.secondary"}})]})}),(0,i.jsxs)(h.W1,{style:x.kD,sx:{...x.ct,maxHeight:"60vh",overflowY:"auto"},onKeyDown:e=>e.stopPropagation(),children:[C.map((e,t)=>(0,i.jsx)(h.Dr,{onClick:()=>{P(!1),e.onNavigate()},children:(0,i.jsx)(u.Ay,{level:"title-sm",sx:{minWidth:0,maxWidth:"min(90vw, 360px)"},noWrap:!0,children:e.labelOnly?e.kindLabel:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(h.az,{component:"span",sx:{color:"text.secondary"},children:[e.kindLabel,":"]})," ",y(e.valueLabel)]})})},"".concat(e.kindLabel,"-").concat(t))),C.length>0&&R.length>0?(0,i.jsx)(p.A,{}):null,R.map(e=>{var t,n;return(0,i.jsxs)(o.Fragment,{children:[e.dividerBefore?(0,i.jsx)(p.A,{}):null,(0,i.jsxs)(h.Dr,{selected:e.selected,color:e.menuItemColor,onClick:()=>{P(!1),e.onSelect()},sx:e.indent?{pl:6,pr:e.onDelete?.5:void 0}:e.onDelete?{pr:.5}:void 0,children:[(0,i.jsx)(v.A,{children:e.selected?(0,i.jsx)(l.A,{sx:{fontSize:"16px"}}):null!==(t=e.startDecorator)&&void 0!==t?t:null}),(0,i.jsx)(h.az,{sx:{flexGrow:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:"string"==typeof(n=e.label)?y(n):n}),e.onDelete?(0,i.jsx)(f.EO,{size:"sm",tooltip:"",onClick:t=>{t.stopPropagation(),P(!1),e.onDelete()},sx:{color:"danger.400","&:hover":{color:"danger.600",bgcolor:"danger.softBg"},flexShrink:0},children:(0,i.jsx)(s.A,{sx:{fontSize:16}})}):null]})]},e.key)}),W]})]}),n?(0,i.jsx)(f.EO,{size:"sm",tooltip:"Next",disabled:b,onClick:()=>null==A?void 0:A(),sx:{mr:.5},children:(0,i.jsx)(l.A,{})}):null]})}},60579:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>r.A,dF:()=>d,jn:()=>i.A,tA:()=>o.A,EO:()=>c,k7:()=>u});var i=n(66044),o=n(83528),r=n(76991);n(5894);var l=n(37876),s=n(78590),a=n(10524);function d(e){let{onClick:t,tooltip:n,stale:i=!1,staleTooltip:o,size:r="md",disabled:d,loading:c,children:u,sx:p}=e;return(0,l.jsx)(s.A,{title:i&&o?o:n,children:(0,l.jsx)(a.Ay,{color:i?"warning":"neutral",variant:i?"solid":"soft",onClick:t,size:r,disabled:d,loading:c,sx:p,children:u})})}function c(e){let{onClick:t,tooltip:n,size:i="md",disabled:o,loading:r,children:d,sx:c}=e;return(0,l.jsx)(s.A,{title:n,children:(0,l.jsx)(a.Ay,{color:"neutral",variant:"plain",onClick:t,size:i,disabled:o,loading:r,sx:c,children:d})})}function u(e){let{checked:t,onChange:n,tooltip:i,tooltipChecked:o,tooltipUnchecked:r,size:d="md",disabled:c,color:u="neutral",alwaysSoft:p=!1,alwaysSolid:h=!1,children:v,sx:f,tooltipSx:x}=e,m=i;return t&&o?m=o:!t&&r&&(m=r),(0,l.jsx)(s.A,{title:m,sx:x,children:(0,l.jsx)(a.Ay,{color:u,variant:p?"soft":h?"solid":t?"solid":"soft",onClick:()=>n(!t),size:d,disabled:c,sx:f,children:v})})}},61275:(e,t,n)=>{"use strict";n.d(t,{G:()=>d,y:()=>a});var i=n(12599),o=n(34059),r=n(32014);let l={character:"characterList",location:"locationList",prop:"propList"},s=new Set(["character","location","prop"]);function a(e,t,n,i,o){var r;let s="user/".concat(e,"/project/").concat(t);if("project"===n)return"".concat(s,"/project-details");if("episode"===n)return"".concat(s,"/episode-details/").concat(i);if("scene"===n)return"".concat(s,"/episode-details/").concat(o,"/sceneList/").concat(i);if("shot"===n){let[e,t]=i.split("/");return"".concat(s,"/episode-details/").concat(o,"/sceneList/").concat(e,"/shotList/").concat(t)}return"".concat(s,"/project-details/").concat(null!==(r=l[n])&&void 0!==r?r:"".concat(n,"List"),"/").concat(i)}function d(e,t,n,l,d,c,u){let p=(0,r.Zu)(n,d),h=a(e,t,n,l,u);return p&&s.has(n)&&(0,i.vI)(l)?(0,o.yZ)(h,d,"override",c):{[p?"".concat(h,"/metadata/").concat(d):"".concat(h,"/").concat(d)]:c}}},66178:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(37876),o=n(14232),r=n(89099),l=n(59161),s=n(42154),a=n(1426),d=n(13832),c=n(31011);function u(e){let{projectId:t,episodeId:n,episodeTitle:u,projectName:p,episodeList:h,queryParams:v={},menuOpen:f,onMenuOpenChange:x,scheduleEntry:m=!1}=e,{requestNavigation:y}=(0,a.z)(),j=(0,r.useRouter)().pathname.replace(/^\//,"")||"screenplay",A=(0,o.useMemo)(()=>(0,s.QM)(h),[h]),k=(0,o.useMemo)(()=>A.map(e=>e.id),[A]),{prevId:g,nextId:b}=(0,o.useMemo)(()=>(0,s.z3)(k,n),[k,n]),w=e=>{y({pathname:"/".concat(j),query:{...v,[c.B.project]:t,[c.B.episode]:e}})},z=m?[{key:"__schedule__",label:"Schedule",onSelect:()=>y({pathname:"/project-schedule",query:{...v,[c.B.project]:t}}),dividerBefore:!1}]:[],L=A.map((e,t)=>({key:e.id,selected:e.id===n,label:"".concat(e.name),onSelect:()=>w(e.id),dividerBefore:m&&0===t}));return(0,i.jsx)(l.A,{readOnly:!0,linearOrder:!0,prevDisabled:!g,nextDisabled:!b,onPrev:()=>g&&w(g),onNext:()=>b&&w(b),titleMenuLabel:u,titleMenuEntityType:"Episode",menuOpen:f,onMenuOpenChange:x,ancestryItems:m?[]:(0,d.A)({requestNavigation:y,queryParams:v,projectId:t,projectName:p}),siblingItems:[...z,...L]})}},73616:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m-3.6 13.9 1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2z"}),"DirectionsRun")},76991:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(37876),o=n(59742);function r(e){let{onClick:t,size:n="md",disabled:r,loading:l,sx:s,startDecorator:a,endDecorator:d,children:c}=e;return(0,i.jsx)(o.A,{color:"danger",variant:"solid",onClick:t,size:n,disabled:r,loading:l,startDecorator:a,endDecorator:d,sx:s,children:c})}}
1,80214:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75M19 19H5V5h14z"}),"AssignmentOutlined")},83388:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M19 12h3L12 3 2 12h3v3H3v2h2v3h2v-3h4v3h2v-3h4v3h2v-3h2v-2h-2zM7 15v-4.81l4-3.6V15zm6 0V6.59l4 3.6V15z"}),"Foundation")},90332:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},90554:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveRounded")}
1,90974:(e,t,n)=>{"use strict";n.d(t,{n:()=>z});var i=n(37876),o=n(14232),r=n(89099),l=n(10524),s=n(47692),a=n(55564),d=n(47897),c=n(87165),u=n(34418),p=n(54765),h=n(64995),v=n(72145),f=n(58071),x=n(3670),m=n(31011),y=n(56945),j=n(46092),A=n(79572),k=n(86982),g=n(39204),b=n(90644);let w=(0,v.OA)(v.Lg);function z(e){let{entity:t,property:n,projectId:v,episodeId:z=null,queryParams:L={},size:S="sm",disabled:C=!1,chatOnly:R=!1,fieldHasValue:W=!1,draftUnsaved:I=!1}=e,M=(0,r.useRouter)(),E=(0,y.YL)(),P=(0,j.HR)(),B="".concat(t,":").concat(n),H=(0,o.useMemo)(()=>{var e;return null!==(e=w.get(B))&&void 0!==e?e:[]},[B]);if(R){if(!P)return null;let e="Explain this field in chat",o=C||I;return(0,i.jsx)(g.A,{reason:I?b.G:void 0,disabled:o,enabledTooltip:e,children:(0,i.jsx)(l.Ay,{size:S,variant:"plain",color:"neutral",disabled:o,"aria-label":e,onClick:()=>(0,A.$X)((0,A.CM)({label:(0,k.ei)(t,n),hasValue:W}),{assistantAsk:P,layoutShell:E}),sx:{"--IconButton-size":"28px"},children:(0,i.jsx)(p.A,{sx:{fontSize:18}})})})}if(0===H.length||"project"===t&&!z)return null;let O=e=>{let i=null!=v?v:"",o=null!=z?z:"",r={[m.B.project]:i};o&&(r[m.B.episode]=o);let l=(0,x.D)(r,e.idPath),s={[m.B.project]:i};o&&(s[m.B.episode]=o),s.focus=n,(0,f.FY)(i,o,"project"===t?"/project-properties":"/episode-properties",s,t),M.push({pathname:"/episode-guide",query:l})},D="Pipeline acceptance criteria that validate this field";return(0,i.jsxs)(s.m,{children:[(0,i.jsx)(a.A,{slots:{root:l.Ay},slotProps:{root:{size:S,variant:"plain",color:"neutral",disabled:C,"aria-label":D,title:D,sx:{"--IconButton-size":"28px"}}},children:(0,i.jsx)(p.A,{sx:{fontSize:18}})}),(0,i.jsx)(c.W1,{size:"sm",sx:{minWidth:280},children:H.map(e=>(0,i.jsxs)(c.Dr,{onClick:()=>O(e),children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.Ay,{level:"body-sm",sx:{fontWeight:600},children:e.phaseLabel}),(0,i.jsxs)(u.Ay,{level:"body-xs",sx:{color:"text.secondary"},children:[e.stepLabel," ","â"," ",e.acLabel]})]}),(0,i.jsx)(l.Ay,{size:"sm",variant:"solid",color:"primary",onClick:t=>{t.stopPropagation(),O(e)},sx:{ml:"auto",flexShrink:0},"aria-label":"Go to this criterion",children:(0,i.jsx)(h.A,{sx:{fontSize:18}})})]},e.idPath))})]})}},91101:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var i=n(37876),o=n(14232),r=n(29122),l=n(21132),s=n(56595),a=n(65782),d=n(66178),c=n(25589),u=n(23787),p=n(3663),h=n(39844),v=n(71890),f=n(6415),x=n(89099),m=n(31011),y=n(86982),j=n(87117),A=n(8982),k=n(54505),g=n(74468),b=n(94610),w=n(90974),z=n(46092),L=n(56945),S=n(79572),C=n(79317),R=n(18806),W=n(66228);let I=(0,y.bb)("episode").map(e=>{var t,n,i,o;return{key:e.name,label:null!==(t=e.label)&&void 0!==t?t:e.name,placeholder:null!==(n=e.placeholder)&&void 0!==n?n:"",minRows:null!==(i=e.minRows)&&void 0!==i?i:2,maxRows:null!==(o=e.maxRows)&&void 0!==o?o:10,options:e.options}}),M=I.map(e=>e.key),E=I.filter(e=>"core"===(0,y.LE)("episode",e.key)),P=(()=>{let e=[],t=new Map;for(let n of I){if("metadata"!==(0,y.LE)("episode",n.key))continue;let i=(0,y.as)("episode",n.key);t.has(i)||(t.set(i,[]),e.push(i)),t.get(i).push(n)}return e.map(e=>({card:e,label:(0,y.H$)(e),fields:t.get(e)}))})(),B=[E.map(e=>e.key),...P.map(e=>e.fields.map(e=>e.key))],H={story:"The creative drivers that shape the episode -- objective, conflict, relationship dynamics, beats, premise. Not the story itself; the inputs the outline and screenplay build on.",storyLock:"Before writing, note anything you still want to address, then Approve to lock the story structure.",scriptReview:"Your own review notes on the first draft -- beat coverage, clarity, motivation, dialogue, pacing, and your revision plan. Record what you find here, then Approve the card once the draft is revised. The AI review comes after, so it builds on what you noticed.",musicSound:"Your musical vision, key sound effects, and intended mix for the episode.",finalReview:"Your review notes from the final pass -- colour grade, cleanup, narrative, sync, and QC. Approve the card once you have watched the assembled cut and recorded any findings."},O=e=>{var t;return null!==(t=H[e])&&void 0!==t?t:"Review notes stored as episode metadata, used by the episode plan and the AI Assistant."};function D(e,t){let n=e&&"object"==typeof e?e:null,i=t&&"object"==typeof t?t:null,o=(0,y.tW)(n),r={};for(let e of I){var l,s,a,d;"name"===e.key?r[e.key]=null!==(l=null==i?void 0:i.name)&&void 0!==l?l:"":"description"===e.key?r[e.key]=null!==(s=null==n?void 0:n.description)&&void 0!==s?s:"":"notes"===e.key?r[e.key]=null!==(a=null==n?void 0:n.notes)&&void 0!==a?a:"":"metadata"===(0,y.LE)("episode",e.key)?r[e.key]=null!==(d=o[e.key])&&void 0!==d?d:"":r[e.key]=""}return r}function N(e){return I.some(t=>t.key===e)?e:null}function T(){var e,t;let{user:n}=(0,v.A)(),{db:H,projectId:T,episodeId:V,projectDetails:q,projectMetadata:F,episodeDetails:_,queryParams:G}=(0,f.t)(),Y=(0,o.useMemo)(()=>q?(0,y.br)(q):null,[q]),K=(0,x.useRouter)(),[J,X]=(0,o.useState)({}),[Q,Z]=(0,o.useState)(!1),$=(0,g.Z)(V),{editingField:U,editDraft:ee,setEditDraft:et,isDirty:en,startEdit:ei,openEdit:eo,cancelEdit:er,finishEdit:el}=$;(0,g.S)($,null!=U&&U in J?J[U]:null);let es=(0,b.RU)("episode-properties"),ea=o.useRef(null),ed=o.useRef(null),ec=o.useRef({}),eu=T&&V&&(null==q?void 0:q.episodeList)?q.episodeList[V]:null,ep=(0,o.useCallback)(()=>{let e=D(_,eu);ec.current=e;let t={};for(let i of I){var n;
1t[i.key]=null!==(n=e[i.key])&&void 0!==n?n:""}X(t)},[_,eu]);(0,o.useEffect)(()=>{ep()},[ep]),(0,o.useEffect)(()=>{var e,t,n;let i="string"==typeof K.query.focus?K.query.focus:null;if(!i){ed.current=null;return}let o=N(i);if(!o||!V||i===ed.current||("name"===o?null==_&&null==eu:null==_))return;if(ed.current=i,null===(t=I.find(e=>e.key===o))||void 0===t?void 0:null===(e=t.options)||void 0===e?void 0:e.length){(0,k.bW)(o);return}ei(o,null!==(n=D(_,eu)[o])&&void 0!==n?n:"");let r=setTimeout(()=>{var e;null===(e=document.getElementById("field-".concat(o)))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"nearest"})},150);return()=>clearTimeout(r)},[K.query.focus,V,_,eu]),(0,k.o7)(K,M,!!V),(0,o.useEffect)(()=>{let e="string"==typeof K.query.focus?K.query.focus:null,t=e?N(e):null;if(null===U||t!==U)return;let n=setTimeout(()=>{var e;null===(e=ea.current)||void 0===e||e.focus()},100);return()=>clearTimeout(n)},[U,K.query.focus]),(0,o.useEffect)(()=>{if(K.isReady){if(null==T){K.replace({pathname:"/projects",query:G});return}if(null==V){let e={...G,[m.B.project]:T};delete e[m.B.episode],delete e[m.B.scene],K.replace({pathname:"/episodes",query:e})}}},[K.isReady,T,V,K,G]);let eh=(0,C.T)("episode",V,V),ev=(0,R.g)("episode",V,V,E.map(e=>e.key)),ef=(0,R.v)("episode",V,V,P.map(e=>({key:e.card,propertyKeys:e.fields.filter(e=>!(0,y.KR)("episode",e.key,Y)).map(e=>e.key)}))),ex=(0,z.HR)(),em=(0,L.YL)();if(!n)return null;if(null==T||null==V)return(0,i.jsx)(s.A,{children:(0,i.jsx)(r.uh,{size:"xl",children:(0,i.jsx)(r.VP,{align:"center",children:(0,i.jsxs)(l.a3,{children:["Loading","â¦"]})})})});let ey=async(e,t)=>{if(!(null==n?void 0:n.uid)||!H||!T||!V)return!1;let i=t.trim();Z(!0);try{let t=(0,j.tQ)("episode",e,{userId:(0,A.fC)(H,n.uid),projectId:T,episodeId:V});if(!t)return console.error("No Firebase path for episode field:",e),!1;return await H.updatePaths({[t]:null!=i?i:""}),X(t=>({...t,[e]:i})),ec.current={...ec.current,[e]:i},el(),!0}catch(e){return console.error("Failed to save field:",e),es("Failed to save. Please try again."),!1}finally{Z(!1)}},ej=(0,p.v)({nextField:e=>(0,p.R)(B,e),saveField:ey,approveField:e=>{var t;return null===(t=eh(e))||void 0===t?void 0:t.onApprove()},openEdit:eo,getValue:e=>{var t;return null!==(t=J[e])&&void 0!==t?t:""}}),eA=(0,h.W)({saveField:ey,approveField:e=>{var t;return null===(t=eh(e))||void 0===t?void 0:t.onApprove()},clearField:e=>{var t;return null===(t=eh(e))||void 0===t?void 0:t.onClear()}}),ek=null!==(e=null==eu?void 0:eu.name)&&void 0!==e?e:V,eg=e=>(0,S.$X)((0,S.Pk)(e,'the episode "'.concat(ek,'"')),{assistantAsk:ex,layoutShell:em}),eb=e=>{var t;return(0,i.jsx)(w.n,{entity:"episode",property:e,projectId:null!=T?T:null,episodeId:null!=V?V:null,queryParams:G,size:"sm",disabled:Q,chatOnly:!0,fieldHasValue:!!(null!==(t=J[e])&&void 0!==t?t:"").trim(),draftUnsaved:U===e&&en})},ew={editingField:U,editDraft:ee,onEditDraftChange:et,onStartEdit:e=>{var t;ei(e,null!==(t=J[e])&&void 0!==t?t:"")||(U&&(0,k.bW)(U),es("Finish your current edit first â save or cancel it."))},onCancelEdit:()=>{er()},onSave:ey,onCommitAndAdvance:ej,onChoose:eA,saving:Q,textareaRef:ea},ez=e=>{var t;return(0,i.jsx)(u.A,{kind:"core",fieldKey:e.key,label:e.label,value:null!==(t=J[e.key])&&void 0!==t?t:"",placeholder:e.placeholder,minRows:e.minRows,maxRows:e.maxRows,...ew,leadingSlot:(0,u.W)(eh(e.key)),actionsSlot:eb(e.key)},e.key)},eL=e=>{var t;return(0,i.jsx)(u.A,{kind:"metadata",fieldKey:e.key,label:e.label,value:null!==(t=J[e.key])&&void 0!==t?t:"",placeholder:e.placeholder,minRows:e.minRows,maxRows:e.maxRows,choiceOptions:e.options,...ew,leadingSlot:(0,u.W)(eh(e.key)),actionsSlot:eb(e.key)},e.key)};return(0,i.jsx)(s.A,{children:(0,i.jsxs)(r.VP,{fullHeight:!0,children:[(0,i.jsx)(a.A,{fill:(0,i.jsx)(d.A,{projectId:T,episodeId:V,episodeTitle:ek,projectName:null!==(t=null==F?void 0:F.name)&&void 0!==t?t:"Project",episodeList:null==q?void 0:q.episodeList,queryParams:G})}),(0,i.jsxs)(c.ay,{children:[(0,i.jsx)(c.uD,{title:"Episode properties",description:"Title, description, your own notes, and episode metadata feed the pipeline and AI. Scene and shot details are edited on the storyboard and panel pages. Click the pen icon to edit each field."}),E.length>0&&(0,i.jsx)(c.WO,{title:"Core properties",helperText:"Episode title, description and notes. The description identifies this episode in lists; notes are yours alone and are never read by the AI.",headerRight:ev?(0,i.jsx)(W.A,{review:ev,onReviewAI:()=>eg("Core properties")}):void 0,children:E.map(e=>ez(e))}),P.map(e=>(0,i.jsx)(c.WO,{title:"story"===e.card?"Story drivers":e.label,helperText:O(e.card),headerRight:ef[e.card]?(0,i.jsx)(W.A,{review:ef[e.card],onReviewAI:()=>eg("story"===e.card?"Story drivers":e.label)}):void 0,children:e.fields.filter(e=>!(0,y.KR)("episode",e.key,Y)).map(e=>eL(e))},e.card))]})]})})}},93813:(e,t,n)=>{"use strict";var i=n(29563);t.A=void 0;var o=i(n(67838)),r=n(37876);t.A=(0,o.default)((0,r.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description")}},e=>{var t=t=>e(e.s=t);e.O(0,[3007,6699,7391,3791,9963,3623,2519,4492,7129,7504,992,1331,2343,9552,9338,3493,1404,1890,3494,9107,4526,6595,2226,2986,7172,9517,5782,4036,636,6593,8792],()=>t(19634)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.