1"use strict";(globalThis.webpackChunklexis=globalThis.webpackChunklexis||[]).push([[3518],{52324(e,t,a){a.d(t,{A:()=>o});var l=a(68903),r=a(74600),i=a(81e3);const s=a.p+"static/media/NoData.755f6e3ee19cc881f902.png";var n=a(70579);const o=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(l.Ay,{container:!0,spacing:10,direction:"column",alignItems:"center",justifyContent:"center",sx:{minHeight:"50vh",pt:1.5,pb:1,overflow:"hidden"},children:(0,n.jsx)(l.Ay,{item:!0,xs:12,children:(0,n.jsx)(r.A,{direction:"row",children:(0,n.jsx)(l.Ay,{item:!0,children:(0,n.jsx)(i.A,{sx:{width:{xs:250,sm:400},height:{xs:130,sm:300}},children:(0,n.jsx)("img",{src:s,alt:"mantis",style:{width:"100%",height:"100%"}})})})})})})})},65786(e,t,a){a.d(t,{$:()=>o});var l=a(83462),r=a(81e3),i=a(81637),s=a(85865),n=a(70579);const o=e=>{let{open:t}=e;return(0,n.jsx)(l.A,{open:t,disableEscapeKeyDown:!0,"aria-labelledby":"loading-dialog-title",sx:{zIndex:99999},children:(0,n.jsxs)(r.A,{sx:{padding:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2.5,minWidth:320,textAlign:"center"},children:[(0,n.jsx)(i.A,{size:50,thickness:4.5}),(0,n.jsx)(s.A,{id:"loading-dialog-title",variant:"h5",fontWeight:"bold",children:"Creating Workflow"}),(0,n.jsx)(s.A,{variant:"caption",color:"text.secondary",children:"This usually takes less than 10 seconds, but can take up to a minute under heavy load."})]})})}},52310(e,t,a){a.d(t,{l:()=>d});var l=a(65043),r=a(82357),i=a(42788),s=a(24858),n=a(70579);const o=e=>!e||"object"===typeof e&&0===Object.keys(e).length?"":"object"===typeof e?`${e.label||""}`:String(e),d=e=>{let{name:t,label:a,options:d,required:u,fullWidth:c,disabled:m,helperText:p="Field is required",sx:x,loading:v,size:h="medium"}=e;const{control:j,setValue:A,trigger:y,watch:b}=(0,s.xW)();return(0,l.useEffect)(()=>{const e=b(t);1===d.length?(A(t,d[0]),y(t)):0===d.length&&e&&(A(t,{}),y(t))},[d]),(0,n.jsx)(s.xI,{name:t,control:j,rules:{validate:e=>{return!(u&&(t=e,!t||""===t.value||void 0===t.value||null===t.value))||p;var t}},render:e=>{let{field:{onChange:t,value:l},fieldState:{error:s}}=e;return(0,n.jsx)(r.A,{options:d,loading:v,fullWidth:c,disabled:m,sx:x,getOptionLabel:o,renderInput:e=>(0,n.jsx)(i.A,{...e,label:a,margin:"normal",required:u,variant:"outlined",fullWidth:!0,helperText:s?s.message?s.message:p:null,error:!!s,size:h}),onChange:(e,a)=>t(a),value:l||null,isOptionEqualToValue:(e,t)=>e.value===(null===t||void 0===t?void 0:t.value)})}})}},91360(e,t,a){a.d(t,{A:()=>f});var l=a(63336),r=a(81e3),i=a(68903),s=a(53193),n=a(18356),o=a(72221),d=a(32143),u=a(85865),c=a(17392),m=a(42518),p=a(69392),x=a(24858),v=a(6720),h=a(65043),j=a(32399),A=a(70579);const y=(e,t)=>"object"!==typeof e||null===e?[t]:Array.isArray(e)?e.flatMap((e,a)=>y(e,`${t}.${a}`)):Object.keys(e).flatMap(a=>y(e[a],`${t}.${a}`)),b=e=>{let{name:t,disabled:a,level:p=0,label:h}=e;const{control:y,watch:f,setValue:g}=(0,x.xW)(),{fields:w,append:C,remove:S}=(0,x.jz)({control:y,name:t}),k=0===p,P=k?{width:"100%",mb:2,p:2,bgcolor:"background.default"}:{width:"100%",mt:1,pl:1.5,borderLeft:"2px solid",borderColor:"divider",py:.5},I=k?l.A:r.A,W=k?{variant:"outlined"}:{},$=h?h.length>20?`Add to "${h.substring(0,17)}..."`:`Add to "${h}"`:"Add Item";return(0,A.jsxs)(I,{...W,sx:P,children:[w.map((e,l)=>{const r=f(`${t}.${l}.type`)||"string";return"array"===r?(0,A.jsxs)(i.Ay,{container:!0,spacing:1,alignItems:"flex-start",sx:{mb:1},children:[(0,A.jsxs)(i.Ay,{item:!0,xs:12,container:!0,spacing:1,alignItems:"center",children:[(0,A.jsx)(i.Ay,{item:!0,xs:3,children:(0,A.jsxs)(s.A,{fullWidth:!0,size:"small",disabled:a,children:[(0,A.jsx)(n.A,{sx:{fontSize:"0.85rem"},children:"Type"}),(0,A.jsxs)(o.A,{value:r,label:"Type",size:"small",sx:{"& .MuiSelect-select":{py:.5}},onChange:e=>{const a=e.target.value;g(`${t}.${l}.type`,a),g(`${t}.${l}.val`,"array"===a?[{val:"",type:"string"}]:"")},children:[(0,A.jsx)(d.A,{value:"string",children:"String"}),(0,A.jsx)(d.A,{value:"number",children:"Number"}),(0,A.jsx)(d.A,{value:"array",children:"List"})]})]})}),(0,A.jsxs)(i.Ay,{item:!0,xs:9,container:!0,justifyContent:"flex-start",alignItems:"center",children:[(0,A.jsxs)(u.A,{variant:"caption",color:"text.secondary",sx:{mr:1},children:["\u2014 Item ",l+1]}),!a&&(0,A.jsx)(c.A,{size:"small",color:"error",onClick:()=>S(l),type:"button",children:(0,A.jsx)(v.b6i,{})})]})]}),(0,A.jsx)(i.Ay,{item:!0,xs:12,children:(0,A.jsx)(b,{name:`${t}.${l}.val`,disabled:a,level:p+1})})]},e.id):(0,A.jsxs)(i.Ay,{container:!0,spacing:1,alignItems:"center",sx:{mb:1},children:[(0,A.jsx)(i.Ay,{item:!0,xs:3,children:(0,A.jsxs)(s.A,{fullWidth:!0,size:"small",disabled:a,children:[(0,A.jsx)(n.A,{sx:{fontSize:"0.85rem"},children:"Type"}),(0,A.jsxs)(o.A,{value:r,label:"Type",size:"small",sx:{"& .MuiSelect-select":{py:.5}},onChange:e=>{const a=e.target.value;g(`${t}.${l}.type`,a),g(`${t}.${l}.val`,"array"===a?[{val:"",type:"string"}]:"")},children:[(0,A.jsx)(d.A,{value:"string",children:"String"}),(0,A.jsx)(d.A,{value:"number",children:"Number"}),(0,A.jsx)(d.A,{value:"array",children:"List"})]})]})}),(0,A.jsx)(i.Ay,{item:!0,xs:7,children:(0,A.jsx)(j.Q,{name:`${t}.${l}.val`,label:`Item ${l+1}`,fullWidth:!0,size:"small",disabled:a,required:"number"!==r,type:"number"===r?"number":"text"})}),(0,A.jsx)(i.Ay,{item:!0,xs:2,children:!a&&(0,A.jsx)(c.A,{size:"small",color:"error",onClick:()=>S(l),type:"button",children:(0,A.jsx)(v.b6i,{})})})]},e.id)}),!a&&(0,A.jsx)(m.A,{startIcon:(0,A.jsx)(v.jgn,{size:20}),size:"small",variant:k?"outlined":"text",type:"button",sx:{mt:.5,textTransform:"none",justifyContent:"flex-start"},onClick:e=>{e.preventDefault(),C({val:"",type:"string"})},children:$})]})},f=e=>{let{title:t,defaultValues:a=[],onParametersChange:l,isTyped:r=!0}=e;const[f,g]=(0,h.useState)(!1),[w,C]=(0,h.useState)(void 0),[S,k]=(0,h.useState)({}),P=(0,x.mN)({defaultValues:{parameters:a,newParameter:{key:"",value:"",type:"string"}}}),{control:I,handleSubmit:W,setValue:$,watch:_,trigger:T}=P,{fields:N,append:q,remove:O}=(0,x.jz)({control:I,name:"parameters"}),L=(0,x.FH)({control:I,name:"parameters"});(0,h.useEffect)(()=>{null===l||void 0===l||l(L)},[L,l]);const z=W(e=>{const{newParameter:t}=e;if(t.key){let e=t.value;"array"!==t.type||Array.isArray(e)||(e=[{val:"",type:"string"}]),q({...t,value:e}),$("newParameter",{key:"",value:"",type:"string"}),g(!1)}}),V=e=>{k(t=>({...t,[e]:L[e]})),C(t=>[...t||[],{index:e,show:!0}])},D=async e=>{const t=y(L[e],`parameters.${e}`);await T(t)&&C(t=>t?t.filter(t=>t.index!==e):void 0)},M=e=>{$(`parameters.${e}`,S[e]),C(t=>t?t.filter(t=>t.index!==e):void 0),k(t=>{const{[e]:a,...l}=t;return l})},E=e=>{O(e)},R=_("newParameter.type");return(0,A.jsxs)(i.Ay,{container:!0,spacing:1,children:[(0,A.jsx)(i.Ay,{item:!0,xs:12,children:(0,A.jsx)(u.A,{variant:"h6",gutterBottom:!0,children:(0,A.jsx)("strong",{children:t})})}),(0,A.jsxs)(x.Op,{...P,children:[N.map((e,t)=>{var a,l;const u=null===w||void 0===w||null===(a=w.find(e=>e.index===t))||void 0===a?void 0:a.show,m=(null===(l=L[t])||void 0===l?void 0:l.type)||"string";return r&&"array"===m?(0,A.jsxs)(i.Ay,{item:!0,xs:12,container:!0,spacing:1,alignItems:"flex-start",sx:{mb:2,p:1,border:"1px solid #eee",borderRadius:1},children:[(0,A.jsxs)(i.Ay,{item:!0,xs:12,container:!0,spacing:1,alignItems:"center",children:[(0,A.jsx)(i.Ay,{item:!0,xs:4,children:(0,A.jsx)(j.Q,{name:`parameters.${t}.key`,label:"Key",fullWidth:!0,required:!0,multiline:!0,size:"small",disabled:!u})}),(0,A.jsx)(i.Ay,{item:!0,xs:3,children:(0,A.jsxs)(s.A,{fullWidth:!0,size:"small",disabled:!u,children:[(0,A.jsx)(n.A,{children:"Type"}),(0,A.jsxs)(o.A,{value:m,label:"Type",onChange:e=>{const a=e.target.value;$(`parameters.${t}.type`,a),$(`parameters.${t}.value`,"array"===a?[{val:"",type:"string"}]:"")},children:[(0,A.jsx)(d.A,{value:"string",children:"String"}),(0,A.jsx)(d.A,{value:"number",children:"Number"}),(0,A.jsx)(d.A,{value:"array",children:"List"})]})]})}),(0,A.jsx)(i.Ay,{item:!0,xs:5,sx:{display:"flex",gap:.5,justifyContent:"flex-end"},children:u?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p.A,{title:"Save",children:(0,A.jsx)(c.A,{size:"medium",color:"success",type:"button",onClick:()=>D(t),children:(0,A.jsx)(v.rZB,{})})}),(0,A.jsx)(p.A,{title:"Cancel",children:(0,A.jsx)(c.A,{size:"medium",color:"error",type:"button",onClick:()=>M(t),children:(0,A.jsx)(v.uDv,{})})})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p.A,{title:"Edit",children:(0,A.jsx)(c.A,{size:"medium",color:"primary",type:"button",onClick:()=>V(t),children:(0,A.jsx)(v.Yvo,{size:20})})}),(0,A.jsx)(p.A,{title:"Delete",children:(0,A.jsx)(c.A,{size:"medium",color:"error",onClick:()=>E(t),type:"button",children:(0,A.jsx)(v.b6i,{size:20})})})]})})]}),(0,A.jsx)(i.Ay,{item:!0,xs:12,children:(0,A.jsx)(b,{name:`parameters.${t}.value`,disabled:!u,label:L[t].key})})]},e.id):(0,A.jsxs)(i.Ay,{item:!0,xs:12,container:!0,spacing:1,alignItems:"flex-start",sx:{mb:2,p:1,border:"1px solid #eee",borderRadius:1},children:[(0,A.jsx)(i.Ay,{item:!0,xs:r?3:4,children:(0,A.jsx)(j.Q,{name:`parameters.${t}.key`,label:"Key",fullWidth:!0,required:!0,multiline:!0,size:"small",disabled:!u})}),r&&(0,A.jsx)(i.Ay,{item:!0,xs:2,children:(0,A.jsxs)(s.A,{fullWidth:!0,size:"small",disabled:!u,children:[(0,A.jsx)(n.A,{children:"Type"}),(0,A.jsxs)(o.A,{value:m,label:"Type",onChange:e=>{const a=e.target.value;$(`parameters.${t}.type`,a),$(`parameters.${t}.value`,"array"===a?[{val:"",type:"string"}]:"")},children:[(0,A.jsx)(d.A,{value:"string",children:"String"}),(0,A.jsx)(d.A,{value:"number",children:"Number"}),(0,A.jsx)(d.A,{value:"array",children:"List"})]})]})}),(0,A.jsx)(i.Ay,{item:!0,xs:r?5:6,children:(0,A.jsx)(j.Q,{name:`parameters.${t}.value`,label:"Value",fullWidth:!0,size:"small",required:r&&"number"!==m,disabled:!u,maxLength:1e3,multiline:!r||"string"===m,maxRows:4,type:r&&"number"===m?"number":"text"})}
1),(0,A.jsx)(i.Ay,{item:!0,xs:2,sx:{display:"flex",gap:.5,mt:.5},children:u?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p.A,{title:"Save",children:(0,A.jsx)(c.A,{size:"medium",color:"success",type:"button",onClick:()=>D(t),children:(0,A.jsx)(v.rZB,{})})}),(0,A.jsx)(p.A,{title:"Cancel",children:(0,A.jsx)(c.A,{size:"medium",color:"error",type:"button",onClick:()=>M(t),children:(0,A.jsx)(v.uDv,{})})})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p.A,{title:"Edit",children:(0,A.jsx)(c.A,{size:"medium",color:"primary",type:"button",onClick:()=>V(t),children:(0,A.jsx)(v.Yvo,{size:20})})}),(0,A.jsx)(p.A,{title:"Delete",children:(0,A.jsx)(c.A,{size:"medium",color:"error",onClick:()=>E(t),type:"button",children:(0,A.jsx)(v.b6i,{size:20})})})]})})]},e.id)}),f&&(0,A.jsxs)(i.Ay,{item:!0,xs:12,container:!0,spacing:1,alignItems:"flex-start",sx:{p:1,border:"1px dashed #ccc",mt:2,borderRadius:1},children:[(0,A.jsx)(i.Ay,{item:!0,xs:r?3:4,children:(0,A.jsx)(j.Q,{name:"newParameter.key",multiline:!0,label:"New Key",fullWidth:!0,required:!0,size:"small"})}),r&&(0,A.jsx)(i.Ay,{item:!0,xs:2,children:(0,A.jsxs)(s.A,{fullWidth:!0,children:[(0,A.jsx)(n.A,{children:"Type"}),(0,A.jsxs)(o.A,{value:R,label:"Type",onChange:e=>{const t=e.target.value;$("newParameter.type",t),$("newParameter.value","array"===t?[{val:"",type:"string"}]:"")},children:[(0,A.jsx)(d.A,{value:"string",children:"String"}),(0,A.jsx)(d.A,{value:"number",children:"Number"}),(0,A.jsx)(d.A,{value:"array",children:"List"})]})]})}),(0,A.jsx)(i.Ay,{item:!0,xs:r?5:6,children:r&&"array"===R?(0,A.jsx)(b,{name:"newParameter.value",disabled:!1,label:_("newParameter.key")||"New List"}):(0,A.jsx)(j.Q,{name:"newParameter.value",label:"New Value",fullWidth:!0,size:"small",required:r&&"number"!==R,maxLength:1e3,multiline:!r||"string"===R,type:r&&"number"===R?"number":"text"})}),(0,A.jsx)(i.Ay,{item:!0,xs:2,container:!0,justifyContent:"flex-start",alignItems:"center",children:(0,A.jsx)(m.A,{color:"success",variant:"contained",type:"button",onClick:z,sx:{minWidth:"auto"},children:(0,A.jsx)(v.jgn,{size:20})})})]}),f?(0,A.jsx)(i.Ay,{item:!0,xs:12,container:!0,justifyContent:"flex-end",sx:{m:2},children:(0,A.jsx)(m.A,{variant:"contained",color:"error",onClick:()=>g(!1),type:"button",children:"Cancel"})}):(0,A.jsx)(i.Ay,{item:!0,xs:12,container:!0,justifyContent:"center",sx:{m:2,mb:2},children:(0,A.jsx)(m.A,{color:"primary",variant:"contained",type:"button",onClick:()=>g(!0),startIcon:(0,A.jsx)(v.jgn,{size:20}),children:"Add New Variable"})})]})]})}},94883(e,t,a){a.d(t,{DE:()=>i,Zz:()=>l,j4:()=>s,vs:()=>r,xl:()=>n});const l=["Audiovisual","Book","BookChapter","Collection","ComputationalNotebook","ConferencePaper","ConferenceProceeding","DataPaper","Dataset","Dissertation","Event","Image","InteractiveResource","Instrument","Journal","JournalArticle","Model","OutputManagementPlan","PeerReview","PhysicalObject","Preprint","Report","Service","Software","Sound","Standard","StudyRegistration","Text","Workflow","Other"];var r=function(e){return e.Public="public",e.Project="project",e.User="user",e}(r||{}),i=function(e){return e.Upload="upload",e.Workflow="workflow",e}(i||{});const s=Object.values(r),n=Object.values(i)},69591(e,t,a){a.d(t,{N:()=>d});var l=a(65043),r=a(59504),i=a(49474),s=a(53190),n=a(73216),o=a(20279);function d(){const[e,t]=(0,l.useState)(!1),[a]=(0,r.h6)(),d=(0,n.Zp)(),u=(0,l.useRef)(null),c=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null),c.current&&(clearTimeout(c.current),c.current=null),t(!1)},[]);(0,l.useEffect)(()=>()=>m(),[m]);return{isPolling:e,startPolling:(0,l.useCallback)(e=>{if(!e)return(0,i.JI)({message:s.GM.created}),void d((0,o.rE)(!0));t(!0);const l=async()=>{try{var t;const l=await a({dagIdPattern:e}).unwrap();(null===l||void 0===l||null===(t=l.dags)||void 0===t?void 0:t.some(t=>t.dag_id===e))&&(m(),(0,i.JI)({message:s.GM.created}),d((0,o.rE)(!0)))}catch(l){console.error("Error polling DAG listing:",l)}};l(),u.current=setInterval(l,3e3),c.current=setTimeout(()=>{m(),(0,i.gr)({message:`Workflow created, but DAG '${e}' was not found in Airflow after 1 minute.`}),d((0,o.rE)(!0))},6e4)},[a,d,m]),cleanup:m}}},46374(e,t,a){a.r(t),a.d(t,{default:()=>re});var l=a(57449),r=a(46848),i=a(81e3),s=a(76839),n=a(25078),o=a(12299),d=a(64125),u=a(42518),c=a(85865),m=a(65043),p=a(24858),x=a(73216),v=a(6
15786),h=a(52324),j=a(52310),A=a(93623),y=a(68903),b=a(39336);const f=(0,a(46060).A)("div")({borderRadius:"50%",width:"20px",height:"20px",display:"inline-block",verticalAlign:"middle",marginLeft:20});var g=a(86178),w=a.n(g),C=a(70579);const S=e=>{let{commandTemplateName:t,projectShortName:a}=e;const{data:l,isLoading:r}=(0,A.Zy)({projectShortName:a||"",noCache:!0}),s=(0,p.xW)(),{watch:n,setValue:o}=s,{data:d,isLoading:u}=(0,A.lf)({projectShortName:null!==a&&void 0!==a?a:""}),x=w()(),v=(0,m.useMemo)(()=>null===d||void 0===d?void 0:d.filter(e=>!w()(e.EndDate).isBefore(x)),[d]),h=(0,m.useMemo)(()=>null===l||void 0===l?void 0:l.filter(e=>{var a;return null===e||void 0===e||null===(a=e.Nodes)||void 0===a?void 0:a.some(e=>{var a;return null===e||void 0===e||null===(a=e.Allocations)||void 0===a?void 0:a.some(e=>{var a;return null===e||void 0===e||null===(a=e.CommandTemplates)||void 0===a?void 0:a.some(e=>e.Name===t)})})}),[l,t]),g=(0,m.useMemo)(()=>null===h||void 0===h?void 0:h.map(e=>({label:null===e||void 0===e?void 0:e.ClusterName,value:null===e||void 0===e?void 0:e.ClusterId,active:null===e||void 0===e?void 0:e.IsAvailable})),[h]),[S,k]=(0,m.useState)([]),[P,I]=(0,m.useState)([]),W=n("cluster"),$=n("resource"),_=n("node");return(0,m.useEffect)(()=>{var e,a,l,r;const i=null!==(e=null===h||void 0===h||null===(a=h.find(e=>{var t,a;return(null===e||void 0===e||null===(t=e.ClusterId)||void 0===t?void 0:t.toString())===(null===W||void 0===W||null===(a=W.value)||void 0===a?void 0:a.toString())&&(null===e||void 0===e?void 0:e.ClusterName)===(null===W||void 0===W?void 0:W.label)}))||void 0===a||null===(l=a.Nodes)||void 0===l||null===(r=l.filter(e=>{var a;return null===e||void 0===e||null===(a=e.Allocations)||void 0===a?void 0:a.some(e=>{var a;return null===e||void 0===e||null===(a=e.CommandTemplates)||void 0===a?void 0:a.some(a=>a.Name===t&&e.LexisResourceName===e.LexisResourceName)})}))||void 0===r?void 0:r.map(e=>({value:null===e||void 0===e?void 0:e.NodeId,label:null===e||void 0===e?void 0:e.NodeType,allocations:null===e||void 0===e?void 0:e.Allocations})))&&void 0!==e?e:[];I(i)},[W,h,t]),(0,m.useEffect)(()=>{var e,t,a,l;const r=null!==(e=null===_||void 0===_||null===(t=_.allocations)||void 0===t?void 0:t.map(e=>({label:e.LexisResourceName,value:e.LexisResourceName})))&&void 0!==e?e:[],i=null===h||void 0===h||null===(a=h.find(e=>{var t,a;return(null===e||void 0===e||null===(t=e.ClusterId)||void 0===t?void 0:t.toString())===(null===W||void 0===W||null===(a=W.value)||void 0===a?void 0:a.toString())&&(null===e||void 0===e?void 0:e.ClusterName)===(null===W||void 0===W?void 0:W.label)}))||void 0===a?void 0:a.LocationId;k(r);const s=null===v||void 0===v||null===(l=v.find(e=>{var t;return null===e||void 0===e||null===(t=e.Assignments)||void 0===t?void 0:t.some(e=>(null===e||void 0===e?void 0:e.LocationId)===i)}))||void 0===l?void 0:l.Id;o("assignmentId",s)},[_,W,v,h,o]),(0,m.useEffect)(()=>{var e,a,l,r,i,s;const n=null===h||void 0===h||null===(e=h.find(e=>{var t,a;return(null===e||void 0===e||null===(t=e.ClusterId)||void 0===t?void 0:t.toString())===(null===W||void 0===W||null===(a=W.value)||void 0===a?void 0:a.toString())&&(null===e||void 0===e?void 0:e.ClusterName)===(null===W||void 0===W?void 0:W.label)}))||void 0===e||null===(a=e.Nodes)||void 0===a||null===(l=a.find(e=>e.NodeId===(null===_||void 0===_?void 0:_.value)&&(null===e||void 0===e?void 0:e.NodeType)===(null===_||void 0===_?void 0:_.label)))||void 0===l||null===(r=l.Allocations)||void 0===r||null===(i=r.find(e=>(null===e||void 0===e?void 0:e.LexisResourceName)===(null===$||void 0===$?void 0:$.label)))||void 0===i||null===(s=i.CommandTemplates)||void 0===s?void 0:s.find(e=>(null===e||void 0===e?void 0:e.Name)===t);null!==$&&void 0!==$&&$.value&&o("commandTemplate",n)},[$,_,W,h,t,o]),(0,m.useEffect)(()=>{o("policy",{label:"Preferred",value:"preferred"})},[o]),(0,C.jsxs)(p.Op,{...s,children:[(0,C.jsx)(y.Ay,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:null===g||void 0===g?void 0:g.map((e,t)=>(0,C.jsx)(m.Fragment,{children:(0,C.jsx)(y.Ay,{item:!0,children:(0,C.jsxs)(i.A,{sx:{display:"flex",alignItems:"center"},children:[(0,C.jsx)(c.A,{variant:"body2",children:null===e||void 0===e?void 0:e.label}
1),(0,C.jsx)(f,{sx:{backgroundColor:e.active?"success.main":"error.main",ml:1}}),t!==(null===g||void 0===g?void 0:g.length)-1&&(0,C.jsx)(b.A,{orientation:"vertical",flexItem:!0,sx:{mx:1}})]})})},null===e||void 0===e?void 0:e.value))}),(0,C.jsx)(j.l,{label:"Cluster",loading:u||r,name:"cluster",options:null!==g&&void 0!==g?g:[],fullWidth:!0,required:!0,helperText:"Cluster is required"}),(0,C.jsx)(j.l,{label:"Partition",loading:u||r,name:"node",options:null!==P&&void 0!==P?P:[],fullWidth:!0,required:!0,helperText:"Partition is required"}),(0,C.jsx)(j.l,{label:"Resource",loading:u||r,name:"resource",options:null!==S&&void 0!==S?S:[],fullWidth:!0,required:!0,helperText:"Resource is required"})]})};var k=a(74605),P=a(51962),I=a(42788),W=a(12604),$=a(32399),_=a(72528),T=a(53536),N=a.n(T),q=a(94883),O=a(60312),L=a(6720),z=a(47809);const V=e=>{var t,a;let{projectShortName:l}=e;const i=(0,p.xW)(),{control:s,setValue:n}=i,o=null===q.Zz||void 0===q.Zz?void 0:q.Zz.map(e=>({value:e,label:e})),{data:d}=(0,A.lf)({}),{data:x}=(0,_.ZE)({}),{data:v}=(0,z.j)({projectShortName:null!==l&&void 0!==l?l:""}),h={label:null===v||void 0===v||null===(t=v[0])||void 0===t?void 0:t.ShortName,value:null===v||void 0===v||null===(a=v[0])||void 0===a?void 0:a.ShortName,entire:null===v||void 0===v?void 0:v[0]},j=w()(),f=(0,m.useMemo)(()=>null===d||void 0===d?void 0:d.filter(e=>{var t,a;return!w()(e.EndDate).isBefore(j)&&(null===h||void 0===h||null===(t=h.entire)||void 0===t||null===(a=t.AssignedProjectResourceIds)||void 0===a?void 0:a.includes(e.Id))}),[d,v]),g=(0,m.useMemo)(()=>N()((0,r.uf)(f,x)).map(e=>({label:e.location.Name,value:e.location.Name,assignment:e.assignment})).uniqBy("value").value(),[f,x]),S=(0,p.FH)({control:s,name:"dataInput"}),T=(0,p.FH)({control:s,name:"dataOutput"}),[V,M]=(0,m.useState)(""),[E,R]=(0,m.useState)(""),{fields:G,append:U,remove:H}=(0,p.jz)({control:s,name:"additionalParams"}),{fields:Q,append:B,remove:F}=(0,p.jz)({control:s,name:"datasetInputs"}),{fields:J,append:K,remove:Z}=(0,p.jz)({control:s,name:"datasetOutputs"}),Y=()=>{K({id:`output-${Date.now()}`,title:"",location:void 0,resource:"",source_path:"",target_path:"",access:{label:"Project",value:"project"},creator:"",publicationYear:(new Date).getFullYear(),publisher:"",types:{resourceType:"",resourceTypeGeneral:{value:"",label:""}}})};return(0,m.useEffect)(()=>{T?0===J.length&&Y():n("datasetOutputs",[])},[T]),(0,C.jsx)(p.Op,{...i,children:(0,C.jsxs)(y.Ay,{container:!0,spacing:3,children:[(0,C.jsxs)(y.Ay,{item:!0,xs:12,children:[(0,C.jsx)(k.A,{control:(0,C.jsx)(P.A,{checked:S,onChange:e=>n("dataInput",e.target.checked)}),label:"Enable input dataset staging"}),(0,C.jsx)(W.A,{children:S&&l&&(0,C.jsxs)(C.Fragment,{children:[Q.map((e,t)=>(0,C.jsxs)(W.A,{sx:{mb:2,p:2,border:1,borderRadius:1,borderColor:"divider",position:"relative"},children:[(0,C.jsxs)(W.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,C.jsxs)(c.A,{variant:"h6",children:["Dataset Input ",t+1]}),Q.length>1&&(0,C.jsx)(u.A,{color:"error",variant:"outlined",size:"small",onClick:()=>F(t),startIcon:(0,C.jsx)(L.b6i,{size:16}),children:"Remove"})]}),(0,C.jsx)(O.S,{datasetEntryKeyName:`datasetInputs.${t}`,name:`datasetInputs.${t}`,projectShortName:l,required:!0}),(0,C.jsx)($.Q,{name:`datasetInputs.${t}.target_path`,label:"Target Path on Cluster (relative path from root)",fullWidth:!0,sx:{mt:2},helperText:'Path will be prefixed with /. E.g., "scratch/project/input" becomes "/scratch/project/input"',regex:/^[^\s]*$/,regexErrorMessage:"Cannot contain spaces"})]},e.id)),(0,C.jsx)(u.A,{variant:"outlined",onClick:()=>{B({dataset_id:"",path:"/",target_path:"",id:`input-${Date.now()}`})},color:"primary",sx:{mb:2},children:"Add Another Dataset Input"}),(0,C.jsx)(b.A,{})]})})]}),(0,C.jsxs)(y.Ay,{item:!0,xs:12,children:[(0,C.jsx)(k.A,{control:(0,C.jsx)(P.A,{checked:T,onChange:e=>n("dataOutput",e.target.checked)}),label:"Enable output dataset staging"}),T&&(0,C.jsxs)(W.A,{children:[J.map((e,t)=>(0,C.jsx)(D,{index:t,remove:()=>Z(t),locationsData:g,availableResources:f,locations:x,resourceTypesGeneral:o,canRemove:J.length>1},e.id)),(0,C.jsx)(u.A,{variant:"outlined",onClick:Y,size:"small",sx:{mt:1},children:"Add Another Output"}),(0,C.jsx)(c.A,{marginBottom:2,marginTop:3,children:"Additional metadata (Global)"}),(0,C.jsxs)(W.A,{border:1,borderRadius:1,padding:2,borderColor:"divider",children:[(0,C.jsxs)(W.A,{sx:{display:"flex",gap:2,mb:2},children:[(0,C.jsx)(I.A,{value:V,onChange:e=>M(e.target.value),label:"Key",size:"small"}),(0,C.jsx)(I.A,{value:E,onChange:e=>R(e.target.value),label:"Value",size:"small"}),(0,C.jsx)(u.A,{variant:"contained",onClick:()=>{V&&E&&(U({Key:V,Value:E}),M(""),R(""))},color:"success",size:"small",children:"Add"})]}),G.map((e,t)=>(0,C.jsxs)(y.Ay,{container:!0,sx:{mb:1,alignItems:"center"},children:[(0,C.jsx)(y.Ay,{item:!0,xs:10,children:(0,C.jsxs)(c.A,{variant:"body2",children:[(0,C.jsx)("b",{children:e.Key}),": ",e.Value]})}),(0,C.jsx)(y.Ay,{item:!0,xs:2,children:(0,C.jsx)(u.A,{color:"error",onClick:()=>H(t),children:(0,C.jsx)(L.b6i,{size:16})})})]},e.id))]})]})]})]})})},D=e=>{let{index:t,remove:a,locationsData:l,availableResources:i,locations:s,resourceTypesGeneral:n,canRemove:o}=e;const{setValue:d,control:x}=(0,p.xW)(),v=(0,p.FH)({control:x,name:`datasetOutputs.${t}.location`}),h=(0,p.FH)({control:x,name:`datasetOutputs.${t}.access`}),A=(0,p.FH)({control:x,name:`datasetOutputs.${t}.title`}),b=(0,p.FH)({control:x,name:`datasetOutputs.${t}.creator`}),f=(0,p.FH)({control:x,name:`datasetOutputs.${t}.publicationYear`}),g=(0,p.FH)({control:x,name:`datasetOutputs.${t}.publisher`}),w=(0,p.FH)({control:x,name:`datasetOutputs.${t}.types.resourceType`}),S=(0,p.FH)({control:x,name:`datasetOutputs.${t}.types.resourceTypeGeneral`});(0,m.useEffect)(()=>
1{if(null!==v&&void 0!==v&&v.value){var e,a;const l=null===(e=(0,r.uf)(i,s))||void 0===e?void 0:e.find(e=>{var t;return(null===e||void 0===e||null===(t=e.location)||void 0===t?void 0:t.Name)===v.value});d(`datasetOutputs.${t}.resource`,null===l||void 0===l||null===(a=l.resource)||void 0===a?void 0:a.Name)}else d(`datasetOutputs.${t}.resource`,"")},[v,i,s,d,t]),(0,m.useEffect)(()=>{if("public"===(null===h||void 0===h?void 0:h.value)){var e;const a={titles:[{title:null!==A&&void 0!==A?A:""}],creators:[{name:null!==b&&void 0!==b?b:""}],publicationYear:f,publisher:{name:null!==g&&void 0!==g?g:""},types:{resourceType:null!==w&&void 0!==w?w:"",resourceTypeGeneral:null!==(e=null===S||void 0===S?void 0:S.value)&&void 0!==e?e:""}};d(`datasetOutputs.${t}.datacite`,a)}else d(`datasetOutputs.${t}.datacite`,null)},[A,b,f,g,w,S,h,d,t]);return(0,C.jsxs)(W.A,{sx:{mb:2,p:2,border:1,borderRadius:1,borderColor:"primary.main",position:"relative"},children:[(0,C.jsxs)(W.A,{sx:{display:"flex",justifyContent:"space-between",mb:1},children:[(0,C.jsxs)(c.A,{variant:"subtitle2",color:"primary",children:["Output Dataset #",t+1]}),o&&(0,C.jsx)(u.A,{size:"small",color:"error",onClick:a,children:(0,C.jsx)(L.b6i,{size:18})})]}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.title`,label:"Output dataset title",required:!0,fullWidth:!0,sx:{mb:2}}),(0,C.jsxs)(y.Ay,{container:!0,spacing:2,children:[(0,C.jsx)(y.Ay,{item:!0,xs:6,children:(0,C.jsx)(j.l,{label:"Location Output",name:`datasetOutputs.${t}.location`,options:null!==l&&void 0!==l?l:[],fullWidth:!0,required:!0})}),(0,C.jsx)(y.Ay,{item:!0,xs:6,children:(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.resource`,label:"Resource",required:!0,disabled:!0,fullWidth:!0})})]}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.source_path`,label:"Source Path from Cluster (relative path from root)",fullWidth:!0,sx:{my:2},helperText:'Path will be prefixed with /. E.g., "scratch/project/results" becomes "/scratch/project/results"',regex:/^\S*$/,regexErrorMessage:"Cannot contain spaces"}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.target_path`,label:"Target Path in Created Dataset",fullWidth:!0,sx:{mb:2},helperText:"Relative path within the dataset where files will be stored",regex:/^\S*$/}),(0,C.jsx)(j.l,{label:"Output dataset access level",name:`datasetOutputs.${t}.access`,options:[{label:"Public",value:"public"},{label:"User",value:"user"},{label:"Project",value:"project"}],fullWidth:!0,required:!0}),"public"===(null===h||void 0===h?void 0:h.value)&&(0,C.jsxs)(W.A,{sx:{mt:2,p:2,bgcolor:"grey.50",borderRadius:1},children:[(0,C.jsx)(c.A,{variant:"caption",sx:{mb:1,display:"block"},children:"Metadata:"}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.creator`,label:"Creator",required:!0,fullWidth:!0,sx:{mb:1}}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.publicationYear`,label:"Year",required:!0,fullWidth:!0,sx:{mb:1}}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.publisher`,label:"Publisher",required:!0,fullWidth:!0,sx:{mb:1}}),(0,C.jsx)($.Q,{name:`datasetOutputs.${t}.types.resourceType`,label:"Resource Type",required:!0,fullWidth:!0,sx:{mb:1}}),(0,C.jsx)(j.l,{name:`datasetOutputs.${t}.types.resourceTypeGeneral`,label:"Resource Type General",options:null!==n&&void 0!==n?n:[],fullWidth:!0,required:!0})]})]})},M=()=>{const e=(0,p.xW)(),{watch:t}=e,a=t("parametersList");return(0,C.jsx)(C.Fragment,{children:null===a||void 0===a?void 0:a.map((e,t)=>(0,C.jsxs)(W.A,{marginBottom:3,children:[(0,C.jsx)(c.A,{variant:"h5",sx:{textTransform:"uppercase"},children:e.identifier||`Parameter ${t+1}`}),(0,C.jsx)($.Q,{name:`parametersList[${t}].value`,label:`Value for ${e.identifier}`,margin:"normal",maxLength:1e3,multiline:!0,maxRows:4,fullWidth:!0,required:!0})]},t))})};var E=a(91360);const R=e=>{let{setSpecifications:t,specifications:a}=e;const l=(0,p.xW)();return(0,C.jsxs)(p.Op,{...l,children:[(0,C.jsx)(E.A,{title:"Application Environment Variables",defaultValues:null!==a&&void 0!==a?a:[],onParametersChange:t}),(0,C.jsx)(b.A,{}),(0,C.jsx)($.Q,{name:"max_walltime",required:!0,label:"Walltime Limit(seconds)",margin:"normal",fullWidth:!0,helperText:"Walltime Limit is required",type:"number"}),(0,C.jsx)($.Q,{name:"max_cores",required:!0,label:"Max cores",margin:"normal",fullWidth:!0,helperText:"Max Cores field is required",type:"number"}),!1]})},G=()=>{const e=(0,p.xW)();return(0,C.jsxs)(p.Op,{...e,children:[(0,C.jsx)($.Q,{name:"wf_id",required:!0,label:"Name",margin:"normal",fullWidth:!0,minLength:4,maxLength:50,helperText:"Name is required"}),(0,C.jsx)(c.A,{variant:"caption",color:"text.secondary",sx:{mt:-.5,mb:1,display:"block"},children:"Spaces and special characters will be automatically replaced with underscores."}),(0,C.jsx)($.Q,{name:"wf_description",label:"Description",margin:"normal",fullWidth:!0,helperText:"Description is required"}),(0,C.jsx)($.Q,{label:"Project Short Name",name:"project_short_name",fullWidth:!0,disabled:!0,margin:"normal",required:!0,helperText:"Project Short Name is required"})]})};var U=a(79650),H=a(63336),Q=a(71806),B=a(84882),F=a(28076),J=a(10039),K=a(73460),Z=a(96992),Y=a(53193);const X=e=>{let{firstStepValues:t,secondStepValues:a,thirdStepValues:r,fourthStepValues:i,fifthStepValues:s,specifications:n}=e;return(0,C.jsxs)(y.Ay,{container:!0,spacing:2.5,children:[(0,C.jsxs)(y.Ay,{item:!0,xs:12,sm:6,children:[(0,C.jsx)(l.A,{children:(0,C.jsxs)(y.Ay,{container:!0,spacing:2.5,children:[(0,C.jsx)(y.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsx)(Z.A,{spacing:1,children:(0,C.jsxs)(Y.A,{sx:{width:"100%"},children:[t.wf_id&&(0,C.jsx)(c.A,{color:"secondary",children:"Workflow Name:"}),t.wf_description&&(0,C.jsx)(c.A,{color:"secondary",children:"Description:"}),t.project_short_name&&(0,C.jsx)(c.A,{color:"secondary",children:"Project short name:"}),a.resource.value&&(0,C.jsx)(c.A,{color:"secondary",children:"Resource assignment:"})," ",r.access.value&&(0,C.jsx)(c.A,{color:"secondary",children:"Access"}),r.title&&(0,C.jsx)(c.A,{color:"secondary",children:"Title:"})]})})}),(0,C.jsx)(y.Ay,{item:!0,xs:12,sm:6,children:(0,C.jsx)(Z.A,{spacing:1,children:(0,C.jsxs)(Y.A,{sx:{width:"100%"},children:[t.wf_id&&(0,C.jsx)(c.A,{children:t.wf_id}),t.wf_description&&(0,C.jsx)(c.A,{children:t.wf_description}),t.project_short_name&&(0,C.jsx)(c.A,{children:t.project_short_name}),a.resource.value&&(0,C.jsx)(c.A,{children:a.resource.label})," ",r.access.value&&(0,C.jsx)(c.A,{children:r.access.label}),r.title&&(0,C.jsx)(c.A,{children:r.title})]})})})]})}),(null===i||void 0===i?void 0:i.parametersList)&&(0,C.jsxs)(U.A,{component:H.A,sx:{marginTop:2},children:[(0,C.jsx)(c.A,{variant:"h4",textAlign:"center",children:"Command Template Parameters"}),(0,C.jsxs)(Q.A,{children:[(0,C.jsx)(B.A,{children:(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:"Identifier"}),(0,C.jsx)(J.A,{children:"Description"}),(0,C.jsx)(J.A,{children:"Value"})]})}),(0,C.jsx)(K.A,{children:(null===i||void 0===i?void 0:i.parametersList)&&Object.values(i.parametersList).map(e=>(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:e.identifier}),(0,C.jsx)(J.A,{children:e.description}),(0,C.jsx)(J.A,{children:e.value})]},e.identifier))})]})]})]}),(0,C.jsxs)(y.Ay,{item:!0,xs:12,sm:6,children:[(null===r||void 0===r?void 0:r.additionalParams.length)>0&&(0,C.jsxs)(U.A,{component:H.A,children:[(0,C.jsx)(c.A,{variant:"h4",textAlign:"center",children:"Data Output Metadata"}),(0,C.jsxs)(Q.A,{children:[(0,C.jsx)(B.A,{children:(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:"Key"}),(0,C.jsx)(J.A,{children:"Value"})]})}
1),(null===r||void 0===r?void 0:r.additionalParams)&&(0,C.jsx)(K.A,{children:r.additionalParams.map(e=>(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:e.Key}),(0,C.jsx)(J.A,{children:e.Value})]},e.Key))})]})]}),(null===n||void 0===n?void 0:n.length)>0&&(0,C.jsxs)(U.A,{component:H.A,sx:{marginTop:2},children:[(0,C.jsx)(c.A,{variant:"h4",textAlign:"center",children:"Application Env Vars"}),(0,C.jsxs)(Q.A,{children:[(0,C.jsx)(B.A,{children:(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:"Key"}),(0,C.jsx)(J.A,{children:"Value"})]})}),(0,C.jsx)(K.A,{children:n.map(e=>(0,C.jsxs)(F.A,{children:[(0,C.jsx)(J.A,{children:e.key}),(0,C.jsx)(J.A,{children:"object"===typeof e.value?JSON.stringify(e.value):String(e.value)})]},`${e.key}`))})]})]})]})]})};var ee=a(69591),te=a(3951),ae=a(4787);const le=[{label:"Worfklow name and project"},{label:"Cluster selection"},{label:"Dataset handling"},{label:"Parameters default values"},{label:"Advanced settings"},{label:"Summary"}],re=()=>{const{commandTemplateName:e,shortName:t}=(0,x.g)(),{isPolling:a,startPolling:j}=(0,ee.N)(),[A]=(0,te.IZ)(),[y,{isLoading:b}]=(0,ae.iL)(),[f,g]=(0,m.useState)([]),w=(0,p.mN)({defaultValues:{wf_id:void 0,wf_description:void 0,project_short_name:t}}),k=(0,p.mN)({defaultValues:{resource:void 0}}),P=(0,p.mN)({defaultValues:{datasetInputs:[{dataset_id:"",path:"/",target_path:"",id:"in-0"}],datasetOutputs:[{id:"out-0",title:"",location:void 0,resource:"",source_path:"",target_path:"",access:{label:"Project",value:"project"}}],access:{label:"",value:""},title:"",data_output_path:"",additionalParams:[],dataInput:!1,dataOutput:!1,file:void 0,resource:void 0}}),I=(0,p.mN)({defaultValues:{parametersList:[]}}),W=(0,p.mN)({defaultValues:{max_walltime:3600,max_cores:128,mpi_rank_count:1}}),{handleSubmit:$,getValues:_}=w,{handleSubmit:T,getValues:N,watch:q}=k,{handleSubmit:O,getValues:L}=P,{handleSubmit:z,getValues:D,reset:E}=I,{handleSubmit:U,getValues:H}=W,Q=q("commandTemplate");function B(a){switch(a){case 0:return(0,C.jsx)(p.Op,{...w,children:(0,C.jsx)(G,{})});case 1:return(0,C.jsx)(p.Op,{...k,children:(0,C.jsx)(S,{commandTemplateName:e,projectShortName:t||""})});case 2:return(0,C.jsx)(p.Op,{...P,children:(0,C.jsx)(V,{projectShortName:t||""})});case 3:return(0,C.jsx)(p.Op,{...I,children:(0,C.jsx)(M,{})});case 4:return(0,C.jsx)(p.Op,{...W,children:(0,C.jsx)(R,{setSpecifications:g,specifications:f})});case 5:return(0,C.jsx)(X,{firstStepValues:_(),fourthStepValues:D(),secondStepValues:N(),thirdStepValues:L(),fifthStepValues:H(),specifications:f});default:return(0,C.jsx)("div",{children:"Not Found"})}}(0,m.useEffect)(()=>{if(Q){const t=(e=Q)&&e.Parameters?e.Parameters.map(e=>({identifier:e.Identifier||"",description:e.Description||"",value:""})):[];E({parametersList:t})}var e},[Q,E]);const[F,J]=(0,m.useState)(0),K=()=>J(e=>e+1),Z=()=>J(e=>e-1),Y=()=>{let e={};return null===f||void 0===f||f.forEach(t=>{var a;t.key&&(e[t.key]="object"===typeof t.value?JSON.stringify(t.value):String(null!==(a=t.value)&&void 0!==a?a:""))}),e},re=()=>{let e={};return L("additionalParams").forEach(t=>{e={...e,[t.Key]:t.Value}}),e},ie=a=>{var l,r;return{environment_variables:{...Y()},project_shortname:t||"",subproject_identifier:t||"",policy:N("policy.value"),locations:[{location_name:null!==(l=N("cluster.label"))&&void 0!==l?l:"",location_resource:N("resource.label")}],tasks:[{command_template_name:null!==e&&void 0!==e?e:"",node_type_name:N("node.label"),walltime_limit:Number(H("max_walltime")),max_cores:Number(H("max_cores")),template_parameter_values:null===(r=D("parametersList"))||void 0===r?void 0:r.reduce((e,t)=>{const a=t.identifier,l=t.value||"";return a?{...e,[a]:l}:e},{})}],job_name:a}},se=async()=>{var e;const a=L("dataInput")?await(async()=>{var e;const t=null!==(e=L("datasetInputs"))&&void 0!==e?e:[];return(await Promise.all(t.map(async e=>{var t,a,l,i;if(!e.dataset_id)return null;const s=await A({datasetId:e.dataset_id}).unwrap(),n=(0,r.vn)(e.target_path),o=n?`/${n}`:"/";return{source:{location:null!==(t=null===s||void 0===s||null===(a=s.lexis)||void 0===a?void 0:a.location_name)&&void 0!==t?t:"",resource:null!==(l=null===s||void 0===s||null===(i=s.lexis)||void 0===i?void 0:i.resource_name)&&void 0!==l?l:"",info:{dataset_id:e.dataset_id,path:e.path||"/"}},target_path:o}}))).filter(e=>null!==e)})():null,l=L("dataOutput")?(()=>{var e;return(null!==(e=L("datasetOutputs"))&&void 0!==e?e:[]).map(e=>{var t,a,l,i;const s=(0,r.vn)(e.source_path),n=s?`/${s}`:"/";return{target:{location:null!==(t=null===(a=e.location)||void 0===a?void 0:a.value)&&void 0!==t?t:"",resource:null!==(l=e.resource)&&void 0!==l?l:"",info:{access:e.access.value,path:null!==(i=e.target_path)&&void 0!==i?i:"",title:e.title,additionalMetadata:re(),datacite:"public"===e.access.value?e.datacite:null}},source_path:n}})})():null,i=(0,r.K5)(_("wf_id"));await y({hpcCommandAppBody:{wf_id:i,wf_description:null!==(e=_("wf_description"))&&void 0!==e?e:"",job_requirements:ie(i),default_data_inputs:a,default_data_outputs:l}}).unwrap();j(t?`${t}_${i}`:i)};return(0,C.jsxs)(l.A,{children:[e?(0,C.jsx)(i.A,{children:(0,C.jsx)(s.A,{activeStep:F,orientation:"vertical",children:le.map((e,t)=>(0,C.jsxs)(n.A,{children:[(0,C.jsx)(o.A,{optional:5===t?(0,C.jsx)(c.A,{variant:"caption",children:"Last step"}):null,children:e.label}),(0,C.jsxs)(d.A,{children:[B(t),(0,C.jsx)(i.A,{sx:{mb:2},children:(0,C.jsxs)(i.A,{children:[t===le.length-1?(0,C.jsx)(u.A,{color:"success",disabled:b,variant:"contained",onClick:se,sx:{mt:1,mr:1},children:"Create"}):(0,C.jsx)(u.A,{variant:"contained",sx:{mt:1,mr:1},onClick:e=>{0===t?$(K)(e):1===t?T(K)(e):2===t?O(K)(e):3===t?z(K)(e):4===t&&U(K)(e)},children:"Continue"}),(0,C.jsx)(u.A,{variant:"outlined",disabled:0===t,onClick:Z,sx:{mt:1,mr:1},children:"Back"})]})})]})]},e.label))})}):(0,C.jsx)(h.A,{}),(0,C.jsx)(v.$,{open:a})]})}},4787(e,t,a){a.d(t,{Cq:()=>l,KJ:()=>y,Mo:()=>c,N6:()=>i,Up:()=>o,iL:()=>h});const l=a(2157).U.injectEndpoints({endpoints:e=>({bulkCopyIndexGet:e.query({query:()=>({url:"/api/lexis/bulk-copy/v1/"})}),bulkCopyCreateBulkCopyCreatePost:e.mutation({query:e=>({url:"/api/lexis/bulk-copy/v1/create",method:"POST",body:e.bulkCopyBody})}),bulkCopyUpdateCommandAppParamsUpdatePut:e.mutation({query:e=>({url:"/api/lexis/bulk-copy/v1/update",method:"PUT",body:e.bulkCopyBody})}
1),containersIndexGet:e.query({query:()=>({url:"/api/lexis/containers/v1/"})}),containersCreateContainerAppCreateContainerApplicationPost:e.mutation({query:e=>({url:"/api/lexis/containers/v1/create-container-application",method:"POST",body:e.containerBody})}),containersUpdateCommandAppParamsUpdateContainerApplicationParamsPut:e.mutation({query:e=>({url:"/api/lexis/containers/v1/update-container-application-params",method:"PUT",body:e.updateContainerParamsBody})}),customJobScriptsIndexGet:e.query({query:()=>({url:"/api/lexis/custom-job-scripts/v1/"})}),customJobScriptsCreateCustomJobScriptWfCreateCustomJobScriptApplicationPost:e.mutation({query:e=>({url:"/api/lexis/custom-job-scripts/v1/create-custom-job-script-application",method:"POST",body:e.customJobScriptBody})}),customJobScriptsUpdateCommandAppParamsUpdateCustomJobScriptParamsPut:e.mutation({query:e=>({url:"/api/lexis/custom-job-scripts/v1/update-custom-job-script-params",method:"PUT",body:e.updateCustomJobScriptParamsBody})}),dagsIndexGet:e.query({query:()=>({url:"/api/lexis/dags/v1/"})}),dagsDeleteDagStringProjectShortnameStringDagIdDelete:e.mutation({query:e=>({url:`/api/lexis/dags/v1/${e.projectShortname}/${e.dagId}`,method:"DELETE"})}),hpcCommandAppIndexGet:e.query({query:()=>({url:"/api/lexis/hpc-command-apps/v1/"})}),hpcCommandAppCreateCommandAppCreateHpcCommandApplicationPost:e.mutation({query:e=>({url:"/api/lexis/hpc-command-apps/v1/create-hpc-command-application",method:"POST",body:e.hpcCommandAppBody})}),hpcCommandAppUpdateCommandAppParamsUpdateHpcCommandApplicationParamsPut:e.mutation({query:e=>({url:"/api/lexis/hpc-command-apps/v1/update-hpc-command-application-params",method:"PUT",body:e.updateHpcCommandAppParamsBody})}),lwdWorkflowsIndexGet:e.query({query:()=>({url:"/api/lexis/lwd-workflows/v1/"})}),lwdWorkflowsCreateLwdWorkflowCreateLwdWorkflowPost:e.mutation({query:e=>({url:"/api/lexis/lwd-workflows/v1/create-lwd-workflow",method:"POST",body:e.lwdBody})}),lwdWorkflowsGetLwdWfGetLwdWorkflowStringProjectShortnameStringWfIdGet:e.query({query:e=>({url:`/api/lexis/lwd-workflows/v1/get-lwd-workflow/${e.projectShortname}/${e.wfId}`})}),lwdWorkflowsUpdateLwdUpdateLwdWorkflowPut:e.mutation({query:e=>({url:"/api/lexis/lwd-workflows/v1/update-lwd-workflow",method:"PUT",body:e.lwdBody})}),lwdWorkflowsGetLwdNamespaceUserGuideGet:e.query({query:()=>({url:"/api/lexis/lwd-workflows/v1/user_guide"})})}),overrideExisting:!1}),{useBulkCopyIndexGetQuery:r,useBulkCopyCreateBulkCopyCreatePostMutation:i,useBulkCopyUpdateCommandAppParamsUpdatePutMutation:s,useContainersIndexGetQuery:n,useContainersCreateContainerAppCreateContainerApplicationPostMutation:o,useContainersUpdateCommandAppParamsUpdateContainerApplicationParamsPutMutation:d,useCustomJobScriptsIndexGetQuery:u,useCustomJobScriptsCreateCustomJobScriptWfCreateCustomJobScriptApplicationPostMutation:c,useCustomJobScriptsUpdateCommandAppParamsUpdateCustomJobScriptParamsPutMutation:m,useDagsIndexGetQuery:p,useDagsDeleteDagStringProjectShortnameStringDagIdDeleteMutation:x,useHpcCommandAppIndexGetQuery:v,useHpcCommandAppCreateCommandAppCreateHpcCommandApplicationPostMutation:h,useHpcCommandAppUpdateCommandAppParamsUpdateHpcCommandApplicationParamsPutMutation:j,useLwdWorkflowsIndexGetQuery:A,useLwdWorkflowsCreateLwdWorkflowCreateLwdWorkflowPostMutation:y,useLwdWorkflowsGetLwdWfGetLwdWorkflowStringProjectShortnameStringWfIdGetQuery:b,useLwdWorkflowsUpdateLwdUpdateLwdWorkflowPutMutation:f,useLwdWorkflowsGetLwdNamespaceUserGuideGetQuery:g}=l},69120(e,t,a){var l=a(24994);t.A=void 0;var r=l(a(40039)),i=a(70579);t.A=(0,r.default)((0,i.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},42902(e,t,a){var l=a(24994);t.A=void 0;var r=l(a(40039)),i=a(70579);t.A=(0,r.default)((0,i.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined")},99641(e,t,a){var l=a(24994);t.A=void 0;var r=l(a(40039)),i=a(70579);t.A=(0,r.default)((0,i.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-2V8zM6 20V4h7v5h5v11z"}),"InsertDriveFileOutlined")},80638(e,t,a){a.d(t,{A:()=>i});var l=a(66734),r=a(70579);const i=(0,l.A)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},84882(e,t,a){a.d(t,{A:()=>y});var l=a(58168),r=a(98587),i=a(65043),s=a(58387),n=a(98610),o=a(21573),d=a(98206),u=a(34535),c=a(92532),m=a(72372);function p(e){return(0,m.Ay)("MuiTableHead",e)}(0,c.A)("MuiTableHead",["root"]);var x=a(70579);const v=["className","component"],h=(0,u.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),j={variant:"head"},A="thead",y=i.forwardRef(function(e,t){const a=(0,d.b)({props:e,name:"MuiTableHead"}),{className:i,component:u=A}=a,c=(0,r.A)(a,v),m=(0,l.A)({},a,{component:u}),y=(e=>{const{classes:t}=e;return(0,n.A)({root:["root"]},p,t)})(m);return(0,x.jsx)(o.A.Provider,{value:j,children:(0,x.jsx)(h,(0,l.A)({as:u,className:(0,s.A)(y.root,i),ref:t,role:u===A?null:"rowgroup",ownerState:m},c))})})},96992(e,t,a){a.d(t,{A:()=>l});const l=(0,a(78296).A)()}}]); 2//# sourceMappingURL=3518.30e995be.chunk.js.map
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.