diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/index-62IGzuql.js b/assets/index-Co_DyeTX.js similarity index 99% rename from assets/index-62IGzuql.js rename to assets/index-Co_DyeTX.js index bf7c81c..bc44c16 100644 --- a/assets/index-62IGzuql.js +++ b/assets/index-Co_DyeTX.js @@ -746,7 +746,7 @@ attempted value: ${t} * * Copyright (c) 2014-2018, Jon Schlinkert. * Released under the MIT License. - */var Ait=function(e,n){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var r=e.length;if(r<=1)return e;var o="";if(r>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),o="//")}var t=e.split(/[/\\]+/);return n!==!1&&t[t.length-1]===""&&t.pop(),o+t.join("/")};const ofe=Pr(Ait),U1=e=>{const n=[],r=e.split("/");return r.forEach((o,i)=>{const t=ofe("/"+r.slice(0,i+1).join("/")+"/",!1);r[i].length&&n.push({to:t,text:r[i]})}),n},Fit=(e,n,r)=>{const o=Lt(CC,CC.SystemsApi,n,r);return kt(()=>o.getSystems(e))},Jit=(e,n,r)=>{const o=Lt(CC,CC.SystemsApi,n,r);return kt(()=>o.getSystem(e))},sfe={list:"systems/list",details:"systems/details",listSchedulerProfiles:"systems/listScehdulerProfiles"},Iit={},B1=(e=Iit,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([sfe.list,e,r],()=>Fit(e,o,(r==null?void 0:r.access_token)||""),{...n,enabled:!!r})},kit=(e,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([sfe.details,e,r],()=>Jit(e,o,(r==null?void 0:r.access_token)??""),{enabled:!!r})},qit=({systemId:e})=>{const{data:n,isLoading:r,error:o}=kit({systemId:e,select:"allAttributes"}),i=n==null?void 0:n.result;return y.jsxs(kn,{isLoading:r,error:o,children:[y.jsx("h3",{children:i==null?void 0:i.id}),i&&y.jsx(bA,{tabs:{Details:y.jsx(ci,{data:i}),JSON:y.jsx(not,{json:i})}})]})},Mit="_selected_1ol4h_14",$it="_link_1ol4h_18",eD={"system-list":"_system-list_1ol4h_1",selected:Mit,link:$it},Dit=({system:e,onNavigate:n})=>n?y.jsx(St,{color:"link",className:eD.link,onClick:r=>{r.preventDefault(),n(e)},"data-testid":`href-${e.id}`,children:e.id}):y.jsx("span",{children:e.id}),Lit=({onSelect:e,onNavigate:n,className:r})=>{const{data:o,isLoading:i,error:t}=B1(),[s,a]=A.useState(null),l=A.useCallback(v=>{e&&(a(v),e(v))},[a,e]),u=(o==null?void 0:o.result)??[],c=[{Header:"",id:"icon",Cell:v=>y.jsx(Gt,{name:"data-files"})},{Header:"System",id:"name",Cell:v=>y.jsx(Dit,{system:v.row.original,onNavigate:n})}],m=v=>{const S=v.original;return{className:(s==null?void 0:s.id)===S.id?eD.selected:"",onClick:()=>l(S),"data-testid":S.id}};return y.jsx(kn,{isLoading:i,error:t,className:r,children:y.jsx(US,{className:eD["system-list"],tableColumns:c,tableData:u,isLoading:i,noDataText:"No systems found",getRowProps:m})})},uY={"file-list":"_file-list_189mq_1","nav-list":"_nav-list_189mq_16"},y3=({systemId:e,path:n,className:r,allowSystemChange:o,onNavigate:i,onSelect:t,onUnselect:s,fields:a=["size"],selectedFiles:l,selectMode:u})=>{const[c,m]=A.useState(e),[v,S]=A.useState(n),[_,T]=A.useState([]),x=A.useCallback(O=>{const w=ofe(`${v}/${O.name}`);S(w),i&&i(c??null,w)},[S,v,i,c]),h=A.useCallback(O=>{O||i&&i(null,null),m(O==null?void 0:O.id),S("/"),i&&i((O==null?void 0:O.id)??null,"/")},[S,m,i]),f=A.useCallback(O=>{S(O),i&&i(c??null,O)},[S,c,i]);A.useEffect(()=>{const w=U1(v??"").map(b=>({...b,onClick:f}));w.unshift({text:c??"",to:"/",onClick:f}),T(w)},[T,v,S,c,f]);const p=[];return o&&p.push({text:"Files",to:"/",onClick:()=>h(null)}),c&&p.push(..._),y.jsxs("div",{className:r,children:[y.jsx(v_,{breadcrumbs:p}),y.jsx("div",{children:c?y.jsx(Qce,{className:`${uY["nav-list"]}`,systemId:c,path:v??"/",onNavigate:x,onSelect:t,onUnselect:s,selectedFiles:l,fields:a,selectMode:u}):y.jsx(Lit,{className:`${uY["nav-list"]}`,onNavigate:h})})]})},Uit=({systemId:e,path:n,allowSystemChange:r,onSelect:o,toggle:i,selectMode:t={mode:"single",types:["file","dir"]},initialSelection:s})=>{var b;const[a,l]=A.useState(s??[]),[u,c]=A.useState(e??null),[m,v]=A.useState(n??"/"),S=A.useMemo(()=>{var E,I;return(t==null?void 0:t.mode)==="single"&&((E=t==null?void 0:t.types)==null?void 0:E.length)===1&&((I=t==null?void 0:t.types)==null?void 0:I.some(M=>M==="dir"))},[t]),_=A.useCallback(E=>{(t==null?void 0:t.mode)==="multi"?l([...a,...E]):l(E)},[l,a,t]),T=A.useCallback(E=>{(t==null?void 0:t.mode)==="multi"?l(a.filter(I=>!E.some(M=>M.path===I.path))):l([])},[l,a,t]),x=A.useCallback((E,I)=>{c(E),l([]),v(I??"/")},[c,l,v]),h=A.useCallback(()=>{i&&i(),o&&(a.length?o(u,a):S&&o(u,[{name:m.split("/").slice(-1)[0],path:m}]))},[i,o,u,a,m,S]),f=y.jsx(y3,{allowSystemChange:r,systemId:e,path:m,selectMode:t,onSelect:_,onUnselect:T,onNavigate:x,fields:["size","lastModified"],selectedFiles:a}),p=y.jsxs(St,{disabled:a.length===0&&!S,color:"primary",onClick:h,"data-testid":"modalSelect",children:["Select"," ",`${(t==null?void 0:t.mode)==="multi"?`(${a.length})`:S?`${a.length?a[0].name:m}`:`${a.length?a[0].name:""}`}`]});let O="Select files";const w=((b=t==null?void 0:t.types)==null?void 0:b.map(E=>t.mode==="single"?E==="dir"?"directory":"file":t.mode==="multi"&&E==="dir"?"directories":"files"))??[];return w.length&&(O=`Select ${(t==null?void 0:t.mode)==="multi"?"one or more":"a"} ${w[0]} ${w.length>1?` or ${w[1]}`:""}`),y.jsx(xi,{toggle:i,title:O,size:"lg",body:f,footer:p})},tD=e=>{if(e)return{name:e.split("/").slice(-1)[0],path:e}},nD=e=>{const n=e==null?void 0:e.split("/").slice(0,-1).join("/");return n&&n.length?n:"/"},Bit=e=>{const n=/tapis:\/\/([\w.\-_]+)\/(.+)/,r=e==null?void 0:e.match(n);if(r){const o=r[1],i=`/${r[2]}`;return{systemId:o,file:tD(i),parent:nD(i)}}},zit=({append:e,allowSystemChange:n=!0,disabled:r,systemId:o,path:i,mode:t="single",files:s=!0,dirs:a=!0,...l})=>{const{name:u}=l,[c,,m]=hie(u),{setValue:v}=m,{value:S}=c,{modal:_,open:T,close:x}=rCe(),h=A.useCallback((b,E)=>{v(n?`tapis://${b??""}${E[0].path}`:`${E[0].path}`)},[v,n]),{systemId:f,file:p,parent:O}=A.useMemo(()=>Bit(S)??{systemId:o,file:tD(S||i),parent:nD(S||i)},[S,o,i]),w=A.useMemo(()=>{const b=[];return s&&b.push("file"),a&&b.push("dir"),{mode:t,types:b}},[t,s,a]);return y.jsxs(y.Fragment,{children:[y.jsxs(S4,{children:[y.jsx(wC,{addonType:"prepend",children:y.jsx(St,{size:"sm",onClick:T,disabled:r,children:"Browse"})}),y.jsx(so,{disabled:r,...l,bsSize:"sm"}),!!e&&y.jsx(wC,{addonType:"append",children:e})]}),_&&y.jsx(Uit,{toggle:x,onSelect:h,systemId:f??o,selectMode:w,path:O,initialSelection:p?[p]:void 0,allowSystemChange:!0})]})},Git=({name:e,label:n,required:r,description:o,systemId:i,path:t,mode:s,files:a,dirs:l,...u})=>y.jsx(q4,{name:e,label:n,required:r,description:o,as:c=>y.jsx(zit,{...u,...c,bsSize:"sm",systemId:i,path:t,mode:s,files:a,dirs:l})});oe.memo(Git);const z1=({label:e,required:n,description:r,children:o,error:i})=>y.jsxs(rd,{children:[y.jsxs(DS,{className:"form-field__label",size:"sm",style:{display:"flex",alignItems:"center"},children:[e," ",n?y.jsx(y_,{color:"danger",style:{marginLeft:"10px"},children:"Required"}):null]}),o,i?y.jsx("div",{className:"form-field__validation-error",children:i}):r&&y.jsx(dS,{className:"form-field__help",color:"muted",children:r})]}),Vit="_constrain_qnd0r_15",qN={"layout-root":"_layout-root_qnd0r_1","layout-row":"_layout-row_qnd0r_8",constrain:Vit},bs=({left:e,right:n,top:r,bottom:o,constrain:i})=>y.jsxs("div",{className:`${qN["layout-root"]} ${i?qN.constrain:""}`,children:[r,y.jsxs("div",{className:`${qN["layout-row"]} ${i?qN.constrain:""}`,children:[e,n]}),o]}),Hit="_body_1f99a_1",Kit="_constrain_1f99a_8",Wit="_nav_1f99a_13",Xit="_detail_1f99a_21",mw={body:Hit,constrain:Kit,nav:Wit,detail:Xit,"sub-header":"_sub-header_1f99a_28"},Cl=({children:e,type:n})=>y.jsx("div",{className:n&&mw[n],children:y.jsx(id,{children:e})}),G1=({children:e})=>y.jsx("div",{className:mw.nav,children:e}),Bf=({children:e,constrain:n})=>y.jsx("div",{className:`${mw.body} ${n?mw.constrain:""}`,children:y.jsx("div",{className:mw.detail,children:e})}),Qit="_header_v3wvd_1",Yit="_controls_v3wvd_9",Zit="_expand_v3wvd_15",MN={header:Qit,controls:Yit,expand:Zit},jit=({title:e,note:n,open:r,requiredText:o,className:i,children:t,isCollapsable:s=!0})=>{const[a,l]=A.useState(r??!1),u=A.useCallback(()=>{l(!a)},[a,l]);return y.jsxs("div",{className:i,children:[y.jsxs("div",{className:MN.header,children:[y.jsxs("div",{className:MN.title,children:[e,o&&y.jsx(y_,{color:"danger",style:{marginLeft:"10px",marginBottom:"10px"},children:o})]}),y.jsxs("div",{className:MN.controls,children:[y.jsx("div",{children:n??""}),s&&y.jsx(St,{color:"link",className:MN.expand,size:"sm",onClick:u,children:y.jsx(Gt,{name:a?"collapse":"expand"})})]})]}),y.jsx(ZP,{isOpen:a||!s,children:t})]})},eot="_json_2no5w_1",tot="_controls_2no5w_5",aY={json:eot,controls:tot},ufe=e=>{const n=JSON.parse(JSON.stringify(e));return Object.entries(n).forEach(([r,o])=>{if(Array.isArray(o)){o.length===0&&delete n[r];return}if(typeof o=="object"){const i=ufe(o);Object.entries(i).length===0?delete n[r]:n[r]=i;return}o===void 0&&delete n[r]}),n},yw=e=>{if(e!==void 0){if(Array.isArray(e))return e.map(n=>yw(n));if(e instanceof Set)return Array.from(e).map(n=>yw(n));if(typeof e=="object"){const n={};return Object.entries(e).forEach(([r,o])=>{n[r]=yw(o)}),n}return JSON.parse(JSON.stringify(e))}},not=({json:e,className:n})=>{const[r,o]=A.useState(!1),i=A.useCallback(()=>{o(!r)},[o,r]),t=A.useMemo(()=>JSON.stringify(r?ufe(yw(e)):yw(e),null,2),[e,r]);return y.jsxs("div",{className:n,children:[y.jsxs("div",{className:aY.controls,children:[y.jsx(rd,{check:!0,children:y.jsxs(DS,{check:!0,size:"sm",className:"form-field__label",children:[y.jsx(so,{type:"checkbox",onChange:i}),"Simplified"]})}),y.jsx(k4,{value:t})]}),y.jsx(so,{type:"textarea",value:t,className:aY.json,rows:"20",disabled:!0})]})},rot="_tab_1p7p4_1",iot="_active_1p7p4_19",oot="_pane_1p7p4_23",pq={tab:rot,active:iot,pane:oot},bA=({tabs:e,className:n=""})=>{const r=Object.keys(e),[o,i]=A.useState(r[0]??""),t=s=>`${pq.tab} ${o===s?pq.active:""}`;return y.jsxs("div",{className:n,children:[y.jsx(GP,{tabs:!0,children:r.map(s=>y.jsx(Tc,{className:t(s),children:y.jsx(jL,{onClick:()=>i(s),"data-testid":`tab-${s}`,children:s})},`tab-${s}`))}),y.jsx(O4,{activeTab:o,children:r.map(s=>y.jsx(w4,{tabId:s,className:pq.pane,children:e[s]},`tabcontent-${s}`))})]})},sot="_active_13rpe_24",KO={"nav-list":"_nav-list_13rpe_1","nav-link":"_nav-link_13rpe_9",active:sot,"nav-text":"_nav-text_13rpe_28","nav-content":"_nav-content_13rpe_34"},yS=({to:e,icon:n,children:r})=>y.jsx(WL,{to:e,className:KO["nav-link"],activeClassName:KO.active,exact:e==="/",children:y.jsxs("div",{className:KO["nav-content"],children:[n&&y.jsx(Gt,{name:n}),y.jsx("span",{className:KO["nav-text"],children:r})]})}),V1=({children:e})=>y.jsx("div",{className:`${KO["nav-list"]}`,children:e}),uot=()=>{const{accessToken:e}=ct();return y.jsx("div",{className:wRe.root,children:y.jsxs(V1,{children:[!e&&y.jsx(yS,{to:"/login",icon:"user",children:"Login"}),e&&y.jsx(y.Fragment,{children:y.jsx(yS,{to:"/apps",icon:"applications",children:"Apps"})})]})})},aot=(e,n,r)=>{const i={reqCreateToken:{username:e,password:n,grant_type:"password"}},t=Lt(WX,WX.TokensApi,r,null);return kt(()=>t.createToken(i))},lot={login:"authenticator/login"},g3=()=>{const{setAccessToken:e,basePath:n}=ct(),r=l=>{var u;e((u=l==null?void 0:l.result)==null?void 0:u.access_token)},{mutate:o,isLoading:i,isError:t,isSuccess:s,error:a}=wr([lot.login,n],({username:l,password:u})=>aot(l,u,n),{onSuccess:r});return{isLoading:i,isError:t,isSuccess:s,error:a,login:(l,u)=>o({username:l,password:u}),logout:()=>e(null)}},cot="_container_ebfq4_1",dot="_name_ebfq4_15",fot="_content_ebfq4_19",pot="_edit_ebfq4_23",hot="_step_ebfq4_13",mot="_controls_ebfq4_32",yot="_submit_ebfq4_41",lY={container:cot,"step-summary":"_step-summary_ebfq4_13",name:dot,content:fot,edit:pot,step:hot,controls:mot,submit:yot},got=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.getApps(e))},vot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.getApp(e))},Sot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.deleteApp({appId:e}))},ud={list:"apps/list",delete:"apps/delete",sharePublic:"apps/sharePublic"},bot={select:"jobAttributes,version,updated,isPublic,owner,sharedWithUsers",listType:ki.ListTypeEnum.All,orderBy:"updated(desc)"},afe=(e=bot,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([ud.list,e,r],()=>got(e,o,(r==null?void 0:r.access_token)??""),{...n,enabled:!!r})},lfe=(e,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([ud.list,e,r],()=>vot({...e},o,(r==null?void 0:r.access_token)??""),{...n,enabled:!!r})},Oot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>(console.log("Creating app version v2",e),o.createAppVersion({reqPostApp:e})))},cfe=()=>{const{basePath:e,accessToken:n}=ct(),r=(n==null?void 0:n.access_token)||"",{mutate:o,mutateAsync:i,isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c}=wr([ud,e,r],m=>Oot(m,e,r));return A.useEffect(()=>c(),[c]),{isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c,createAsync:(m,v)=>i(m,v),submit:m=>o(m)}},wot=()=>{const{basePath:e,accessToken:n}=ct(),r=(n==null?void 0:n.access_token)||"",{mutate:o,mutateAsync:i,isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c}=wr([ud.delete,e,r],m=>Sot(m.id,e,r));return{isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c,deleteApp:(m,v)=>o(m,v),deleteAppAsync:(m,v)=>i(m,v)}},_ot=()=>{const{isLoading:e,error:n,isSuccess:r,submit:o,data:i}=cfe(),[t,s]=A.useState(null),[a,l]=A.useState(null);A.useEffect(()=>{(async()=>{if(t){const _=await t.text(),T=JSON.parse(_);l(T)}})()},[t]);const u=S=>{console.log("file changed"),S.target.files&&s(S.target.files[0])},c=S=>{const _=S.target;_.value=""},m=S=>{S.preventDefault(),a!==null&&o(a)},v=A.useRef(null);return y.jsx("div",{className:lY.container,children:y.jsxs("div",{children:[y.jsx("h2",{children:" Create new application "}),y.jsx("h3",{children:" Upload a JSON file with the application specification "}),y.jsxs(YP,{onSubmit:m,children:[y.jsx(rd,{children:y.jsx(so,{type:"file",name:"file",id:"file",ref:v,onChange:S=>u(S),onClick:S=>c(S)})}),y.jsx(Xr,{isLoading:e,error:n,success:r?"Application created":"",children:y.jsx(St,{className:lY.submit,color:"primary",disabled:e||r||!t,children:"Submit"})})]})]})})},Rot=oe.memo(_ot),Tot="_body_1vf17_1",xot="_container_1vf17_6",cY={body:Tot,container:xot},Not={selectedApps:[],setSelectedApps:()=>{}},dfe=oe.createContext(Not),Eot=({children:e})=>{const[n,r]=A.useState([]),o={selectedApps:n,setSelectedApps:r};return y.jsx(dfe.Provider,{value:o,children:e})},OA=()=>{const{selectedApps:e,setSelectedApps:n}=A.useContext(dfe),r=A.useCallback((t,s)=>{if(s==="single"&&t.length===1&&n(t),s==="multi"){const a=new Set(e.map(u=>u.id)),l=[...e,...t.filter(u=>!a.has(u.id))];n(l)}},[e,n]),o=A.useCallback(t=>{const s=new Set(e.map(l=>l.id));t.forEach(l=>s.delete(l.id??""));const a=e.filter(l=>s.has(l.id));n(a)},[e,n]),i=A.useCallback(()=>{n([])},[n]);return{selectedApps:e,select:r,unselect:o,clear:i}},Cot="_link_1le8i_229",Pot="_selected_1le8i_236",v3={"app-list":"_app-list_1le8i_1","app-list-select":"_app-list-select_1le8i_2",link:Cot,selected:Pot,"select-all":"_select-all_1le8i_240"},ffe=oe.memo(({selected:e})=>y.jsxs("span",{className:"fa-layers fa-fw",children:[y.jsx(Pa,{icon:Wce,color:"white"}),y.jsx(Pa,{icon:e?Kce:qC,color:"#9D85EF"}),y.jsx(Pa,{icon:qC,color:"#707070"})]})),Aot=({app:e,onNavigate:n=void 0,location:r=void 0})=>y.jsx(wi,{to:`/apps/${e.id}/${e.version}`,children:e.id}),S3=oe.memo(({apps:e,prependColumns:n=[],appendColumns:r=[],getRowProps:o,onInfiniteScroll:i,isLoading:t,onNavigate:s,location:a,className:l,selectMode:u,fields:c})=>{const m=(u==null?void 0:u.mode)!=="none"?"app-list-select":"app-list",v=[...n,{Header:"",accessor:"type",Cell:S=>y.jsx(Gt,{name:S.value==="app"?"app":"folder"})},{Header:"Id",Cell:S=>y.jsx(Aot,{app:S.row.original,onNavigate:s,location:a})}];return c!=null&&c.some(S=>S==="owner")&&v.push({Header:"Owner",accessor:"owner"}),c!=null&&c.some(S=>S==="isPublic")&&v.push({Header:"Visibility",accessor:"isPublic",Cell:S=>y.jsx("span",{children:S.value==="true"?"Public":"Private"})}),c!=null&&c.some(S=>S==="updated")&&v.push({Header:"Last Modified",accessor:"updated",Cell:S=>y.jsx("span",{children:wce(new Date(S.value))})}),v.push(...r),y.jsx(US,{className:`${l} ${v3[m]}`,tableColumns:v,tableData:e,onInfiniteScroll:i,isLoading:t,noDataText:"No apps found",getRowProps:o})}),Fot=({onSelectAll:e,onUnselectAll:n,selectedAppDict:r})=>{const[o,i]=A.useState(!1),t=Object.values(r).some(a=>a===!1),s=A.useCallback(()=>{o&&!t?(i(!1),n()):(i(!0),e())},[o,i,e,n,t]);return y.jsx("span",{className:v3["select-all"],onClick:s,"data-testid":"select-all",children:y.jsx(ffe,{selected:o&&!t})})},Jot=({onSelect:e=void 0,onUnselect:n=void 0,onNavigate:r=void 0,className:o,fields:i=["updated","isPublic","owner"],selectedApps:t=[],selectMode:s})=>{var h;const{isLoading:a,error:l,data:u}=afe(),{claims:c}=ct(),m=c["tapis/username"],v=u!=null&&u.result?u==null?void 0:u.result.sort((f,p)=>f.owner===m?-1:p.owner===m?1:0):[],S=oe.useMemo(()=>{const f={},p={};return t.forEach(O=>{p[O.id??""]=!0}),v==null||v.forEach(O=>{f[O.id??""]=p[O.id??""]??!1}),f},[t,v]),_=(h=s==null?void 0:s.types)!=null&&h.length?[{Header:y.jsx(Fot,{onSelectAll:()=>e&&e(v??[]),onUnselectAll:()=>n&&n(v??[]),selectedAppDict:S}),id:"multiselect",Cell:f=>y.jsx(ffe,{selected:S[f.row.original.id??""]})}]:[],T=A.useCallback(f=>{console.log("appSelectCallback"+f.id),S[f.id??""]&&n?n([f]):(console.log("onSelect"+f.id),e&&e([f]))},[s,n,S,e]),x=f=>{const p=f.original;return{onClick:()=>T(p),"data-testid":p.id,className:S[p.id??""]?v3.selected:""}};return y.jsx(kn,{isLoading:a,error:l,className:o,children:y.jsx(S3,{apps:v,prependColumns:_,getRowProps:x,onNavigate:r,fields:i,selectMode:s})})},Iot=()=>{const{selectedApps:e,select:n,unselect:r,clear:o}=OA(),i=y.jsx("div",{className:cY.body,children:y.jsx(Jot,{className:cY.container,selectMode:{mode:"multi",types:["dir","app"]},selectedApps:e,onSelect:t=>n(t,"multi"),onUnselect:r})});return y.jsx(bs,{right:i,constrain:!0})},dY=["http","https","mailto","tel"];function kot(e){const n=(e||"").trim(),r=n.charAt(0);if(r==="#"||r==="/")return n;const o=n.indexOf(":");if(o===-1)return n;let i=-1;for(;++ii||(i=n.indexOf("#"),i!==-1&&o>i)?n:"javascript:void(0)"}/*! + */var Ait=function(e,n){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var r=e.length;if(r<=1)return e;var o="";if(r>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),o="//")}var t=e.split(/[/\\]+/);return n!==!1&&t[t.length-1]===""&&t.pop(),o+t.join("/")};const ofe=Pr(Ait),U1=e=>{const n=[],r=e.split("/");return r.forEach((o,i)=>{const t=ofe("/"+r.slice(0,i+1).join("/")+"/",!1);r[i].length&&n.push({to:t,text:r[i]})}),n},Fit=(e,n,r)=>{const o=Lt(CC,CC.SystemsApi,n,r);return kt(()=>o.getSystems(e))},Jit=(e,n,r)=>{const o=Lt(CC,CC.SystemsApi,n,r);return kt(()=>o.getSystem(e))},sfe={list:"systems/list",details:"systems/details",listSchedulerProfiles:"systems/listScehdulerProfiles"},Iit={},B1=(e=Iit,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([sfe.list,e,r],()=>Fit(e,o,(r==null?void 0:r.access_token)||""),{...n,enabled:!!r})},kit=(e,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([sfe.details,e,r],()=>Jit(e,o,(r==null?void 0:r.access_token)??""),{enabled:!!r})},qit=({systemId:e})=>{const{data:n,isLoading:r,error:o}=kit({systemId:e,select:"allAttributes"}),i=n==null?void 0:n.result;return y.jsxs(kn,{isLoading:r,error:o,children:[y.jsx("h3",{children:i==null?void 0:i.id}),i&&y.jsx(bA,{tabs:{Details:y.jsx(ci,{data:i}),JSON:y.jsx(not,{json:i})}})]})},Mit="_selected_1ol4h_14",$it="_link_1ol4h_18",eD={"system-list":"_system-list_1ol4h_1",selected:Mit,link:$it},Dit=({system:e,onNavigate:n})=>n?y.jsx(St,{color:"link",className:eD.link,onClick:r=>{r.preventDefault(),n(e)},"data-testid":`href-${e.id}`,children:e.id}):y.jsx("span",{children:e.id}),Lit=({onSelect:e,onNavigate:n,className:r})=>{const{data:o,isLoading:i,error:t}=B1(),[s,a]=A.useState(null),l=A.useCallback(v=>{e&&(a(v),e(v))},[a,e]),u=(o==null?void 0:o.result)??[],c=[{Header:"",id:"icon",Cell:v=>y.jsx(Gt,{name:"data-files"})},{Header:"System",id:"name",Cell:v=>y.jsx(Dit,{system:v.row.original,onNavigate:n})}],m=v=>{const S=v.original;return{className:(s==null?void 0:s.id)===S.id?eD.selected:"",onClick:()=>l(S),"data-testid":S.id}};return y.jsx(kn,{isLoading:i,error:t,className:r,children:y.jsx(US,{className:eD["system-list"],tableColumns:c,tableData:u,isLoading:i,noDataText:"No systems found",getRowProps:m})})},uY={"file-list":"_file-list_189mq_1","nav-list":"_nav-list_189mq_16"},y3=({systemId:e,path:n,className:r,allowSystemChange:o,onNavigate:i,onSelect:t,onUnselect:s,fields:a=["size"],selectedFiles:l,selectMode:u})=>{const[c,m]=A.useState(e),[v,S]=A.useState(n),[_,T]=A.useState([]),x=A.useCallback(O=>{const w=ofe(`${v}/${O.name}`);S(w),i&&i(c??null,w)},[S,v,i,c]),h=A.useCallback(O=>{O||i&&i(null,null),m(O==null?void 0:O.id),S("/"),i&&i((O==null?void 0:O.id)??null,"/")},[S,m,i]),f=A.useCallback(O=>{S(O),i&&i(c??null,O)},[S,c,i]);A.useEffect(()=>{const w=U1(v??"").map(b=>({...b,onClick:f}));w.unshift({text:c??"",to:"/",onClick:f}),T(w)},[T,v,S,c,f]);const p=[];return o&&p.push({text:"Files",to:"/",onClick:()=>h(null)}),c&&p.push(..._),y.jsxs("div",{className:r,children:[y.jsx(v_,{breadcrumbs:p}),y.jsx("div",{children:c?y.jsx(Qce,{className:`${uY["nav-list"]}`,systemId:c,path:v??"/",onNavigate:x,onSelect:t,onUnselect:s,selectedFiles:l,fields:a,selectMode:u}):y.jsx(Lit,{className:`${uY["nav-list"]}`,onNavigate:h})})]})},Uit=({systemId:e,path:n,allowSystemChange:r,onSelect:o,toggle:i,selectMode:t={mode:"single",types:["file","dir"]},initialSelection:s})=>{var b;const[a,l]=A.useState(s??[]),[u,c]=A.useState(e??null),[m,v]=A.useState(n??"/"),S=A.useMemo(()=>{var E,I;return(t==null?void 0:t.mode)==="single"&&((E=t==null?void 0:t.types)==null?void 0:E.length)===1&&((I=t==null?void 0:t.types)==null?void 0:I.some(M=>M==="dir"))},[t]),_=A.useCallback(E=>{(t==null?void 0:t.mode)==="multi"?l([...a,...E]):l(E)},[l,a,t]),T=A.useCallback(E=>{(t==null?void 0:t.mode)==="multi"?l(a.filter(I=>!E.some(M=>M.path===I.path))):l([])},[l,a,t]),x=A.useCallback((E,I)=>{c(E),l([]),v(I??"/")},[c,l,v]),h=A.useCallback(()=>{i&&i(),o&&(a.length?o(u,a):S&&o(u,[{name:m.split("/").slice(-1)[0],path:m}]))},[i,o,u,a,m,S]),f=y.jsx(y3,{allowSystemChange:r,systemId:e,path:m,selectMode:t,onSelect:_,onUnselect:T,onNavigate:x,fields:["size","lastModified"],selectedFiles:a}),p=y.jsxs(St,{disabled:a.length===0&&!S,color:"primary",onClick:h,"data-testid":"modalSelect",children:["Select"," ",`${(t==null?void 0:t.mode)==="multi"?`(${a.length})`:S?`${a.length?a[0].name:m}`:`${a.length?a[0].name:""}`}`]});let O="Select files";const w=((b=t==null?void 0:t.types)==null?void 0:b.map(E=>t.mode==="single"?E==="dir"?"directory":"file":t.mode==="multi"&&E==="dir"?"directories":"files"))??[];return w.length&&(O=`Select ${(t==null?void 0:t.mode)==="multi"?"one or more":"a"} ${w[0]} ${w.length>1?` or ${w[1]}`:""}`),y.jsx(xi,{toggle:i,title:O,size:"lg",body:f,footer:p})},tD=e=>{if(e)return{name:e.split("/").slice(-1)[0],path:e}},nD=e=>{const n=e==null?void 0:e.split("/").slice(0,-1).join("/");return n&&n.length?n:"/"},Bit=e=>{const n=/tapis:\/\/([\w.\-_]+)\/(.+)/,r=e==null?void 0:e.match(n);if(r){const o=r[1],i=`/${r[2]}`;return{systemId:o,file:tD(i),parent:nD(i)}}},zit=({append:e,allowSystemChange:n=!0,disabled:r,systemId:o,path:i,mode:t="single",files:s=!0,dirs:a=!0,...l})=>{const{name:u}=l,[c,,m]=hie(u),{setValue:v}=m,{value:S}=c,{modal:_,open:T,close:x}=rCe(),h=A.useCallback((b,E)=>{v(n?`tapis://${b??""}${E[0].path}`:`${E[0].path}`)},[v,n]),{systemId:f,file:p,parent:O}=A.useMemo(()=>Bit(S)??{systemId:o,file:tD(S||i),parent:nD(S||i)},[S,o,i]),w=A.useMemo(()=>{const b=[];return s&&b.push("file"),a&&b.push("dir"),{mode:t,types:b}},[t,s,a]);return y.jsxs(y.Fragment,{children:[y.jsxs(S4,{children:[y.jsx(wC,{addonType:"prepend",children:y.jsx(St,{size:"sm",onClick:T,disabled:r,children:"Browse"})}),y.jsx(so,{disabled:r,...l,bsSize:"sm"}),!!e&&y.jsx(wC,{addonType:"append",children:e})]}),_&&y.jsx(Uit,{toggle:x,onSelect:h,systemId:f??o,selectMode:w,path:O,initialSelection:p?[p]:void 0,allowSystemChange:!0})]})},Git=({name:e,label:n,required:r,description:o,systemId:i,path:t,mode:s,files:a,dirs:l,...u})=>y.jsx(q4,{name:e,label:n,required:r,description:o,as:c=>y.jsx(zit,{...u,...c,bsSize:"sm",systemId:i,path:t,mode:s,files:a,dirs:l})});oe.memo(Git);const z1=({label:e,required:n,description:r,children:o,error:i})=>y.jsxs(rd,{children:[y.jsxs(DS,{className:"form-field__label",size:"sm",style:{display:"flex",alignItems:"center"},children:[e," ",n?y.jsx(y_,{color:"danger",style:{marginLeft:"10px"},children:"Required"}):null]}),o,i?y.jsx("div",{className:"form-field__validation-error",children:i}):r&&y.jsx(dS,{className:"form-field__help",color:"muted",children:r})]}),Vit="_constrain_qnd0r_15",qN={"layout-root":"_layout-root_qnd0r_1","layout-row":"_layout-row_qnd0r_8",constrain:Vit},bs=({left:e,right:n,top:r,bottom:o,constrain:i})=>y.jsxs("div",{className:`${qN["layout-root"]} ${i?qN.constrain:""}`,children:[r,y.jsxs("div",{className:`${qN["layout-row"]} ${i?qN.constrain:""}`,children:[e,n]}),o]}),Hit="_body_1f99a_1",Kit="_constrain_1f99a_8",Wit="_nav_1f99a_13",Xit="_detail_1f99a_21",mw={body:Hit,constrain:Kit,nav:Wit,detail:Xit,"sub-header":"_sub-header_1f99a_28"},Cl=({children:e,type:n})=>y.jsx("div",{className:n&&mw[n],children:y.jsx(id,{children:e})}),G1=({children:e})=>y.jsx("div",{className:mw.nav,children:e}),Bf=({children:e,constrain:n})=>y.jsx("div",{className:`${mw.body} ${n?mw.constrain:""}`,children:y.jsx("div",{className:mw.detail,children:e})}),Qit="_header_v3wvd_1",Yit="_controls_v3wvd_9",Zit="_expand_v3wvd_15",MN={header:Qit,controls:Yit,expand:Zit},jit=({title:e,note:n,open:r,requiredText:o,className:i,children:t,isCollapsable:s=!0})=>{const[a,l]=A.useState(r??!1),u=A.useCallback(()=>{l(!a)},[a,l]);return y.jsxs("div",{className:i,children:[y.jsxs("div",{className:MN.header,children:[y.jsxs("div",{className:MN.title,children:[e,o&&y.jsx(y_,{color:"danger",style:{marginLeft:"10px",marginBottom:"10px"},children:o})]}),y.jsxs("div",{className:MN.controls,children:[y.jsx("div",{children:n??""}),s&&y.jsx(St,{color:"link",className:MN.expand,size:"sm",onClick:u,children:y.jsx(Gt,{name:a?"collapse":"expand"})})]})]}),y.jsx(ZP,{isOpen:a||!s,children:t})]})},eot="_json_2no5w_1",tot="_controls_2no5w_5",aY={json:eot,controls:tot},ufe=e=>{const n=JSON.parse(JSON.stringify(e));return Object.entries(n).forEach(([r,o])=>{if(Array.isArray(o)){o.length===0&&delete n[r];return}if(typeof o=="object"){const i=ufe(o);Object.entries(i).length===0?delete n[r]:n[r]=i;return}o===void 0&&delete n[r]}),n},yw=e=>{if(e!==void 0){if(Array.isArray(e))return e.map(n=>yw(n));if(e instanceof Set)return Array.from(e).map(n=>yw(n));if(typeof e=="object"){const n={};return Object.entries(e).forEach(([r,o])=>{n[r]=yw(o)}),n}return JSON.parse(JSON.stringify(e))}},not=({json:e,className:n})=>{const[r,o]=A.useState(!1),i=A.useCallback(()=>{o(!r)},[o,r]),t=A.useMemo(()=>JSON.stringify(r?ufe(yw(e)):yw(e),null,2),[e,r]);return y.jsxs("div",{className:n,children:[y.jsxs("div",{className:aY.controls,children:[y.jsx(rd,{check:!0,children:y.jsxs(DS,{check:!0,size:"sm",className:"form-field__label",children:[y.jsx(so,{type:"checkbox",onChange:i}),"Simplified"]})}),y.jsx(k4,{value:t})]}),y.jsx(so,{type:"textarea",value:t,className:aY.json,rows:"20",disabled:!0})]})},rot="_tab_1p7p4_1",iot="_active_1p7p4_19",oot="_pane_1p7p4_23",pq={tab:rot,active:iot,pane:oot},bA=({tabs:e,className:n=""})=>{const r=Object.keys(e),[o,i]=A.useState(r[0]??""),t=s=>`${pq.tab} ${o===s?pq.active:""}`;return y.jsxs("div",{className:n,children:[y.jsx(GP,{tabs:!0,children:r.map(s=>y.jsx(Tc,{className:t(s),children:y.jsx(jL,{onClick:()=>i(s),"data-testid":`tab-${s}`,children:s})},`tab-${s}`))}),y.jsx(O4,{activeTab:o,children:r.map(s=>y.jsx(w4,{tabId:s,className:pq.pane,children:e[s]},`tabcontent-${s}`))})]})},sot="_active_13rpe_24",KO={"nav-list":"_nav-list_13rpe_1","nav-link":"_nav-link_13rpe_9",active:sot,"nav-text":"_nav-text_13rpe_28","nav-content":"_nav-content_13rpe_34"},yS=({to:e,icon:n,children:r})=>y.jsx(WL,{to:e,className:KO["nav-link"],activeClassName:KO.active,exact:e==="/",children:y.jsxs("div",{className:KO["nav-content"],children:[n&&y.jsx(Gt,{name:n}),y.jsx("span",{className:KO["nav-text"],children:r})]})}),V1=({children:e})=>y.jsx("div",{className:`${KO["nav-list"]}`,children:e}),uot=()=>{const{accessToken:e}=ct();return y.jsx("div",{className:wRe.root,children:y.jsxs(V1,{children:[!e&&y.jsx(yS,{to:"/login",icon:"user",children:"Login"}),e&&y.jsx(y.Fragment,{children:y.jsx(yS,{to:"/apps",icon:"applications",children:"Apps"})})]})})},aot=(e,n,r)=>{const i={reqCreateToken:{username:e,password:n,grant_type:"password"}},t=Lt(WX,WX.TokensApi,r,null);return kt(()=>t.createToken(i))},lot={login:"authenticator/login"},g3=()=>{const{setAccessToken:e,basePath:n}=ct(),r=l=>{var u;e((u=l==null?void 0:l.result)==null?void 0:u.access_token)},{mutate:o,isLoading:i,isError:t,isSuccess:s,error:a}=wr([lot.login,n],({username:l,password:u})=>aot(l,u,n),{onSuccess:r});return{isLoading:i,isError:t,isSuccess:s,error:a,login:(l,u)=>o({username:l,password:u}),logout:()=>e(null)}},cot="_container_ebfq4_1",dot="_name_ebfq4_15",fot="_content_ebfq4_19",pot="_edit_ebfq4_23",hot="_step_ebfq4_13",mot="_controls_ebfq4_32",yot="_submit_ebfq4_41",lY={container:cot,"step-summary":"_step-summary_ebfq4_13",name:dot,content:fot,edit:pot,step:hot,controls:mot,submit:yot},got=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.getApps(e))},vot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.getApp(e))},Sot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>o.deleteApp({appId:e}))},ud={list:"apps/list",delete:"apps/delete",sharePublic:"apps/sharePublic"},bot={select:"jobAttributes,version,updated,isPublic,owner,sharedWithUsers",listType:ki.ListTypeEnum.Mine,orderBy:"updated(desc)"},afe=(e=bot,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([ud.list,e,r],()=>got(e,o,(r==null?void 0:r.access_token)??""),{...n,enabled:!!r})},lfe=(e,n={})=>{const{accessToken:r,basePath:o}=ct();return zr([ud.list,e,r],()=>vot({...e},o,(r==null?void 0:r.access_token)??""),{...n,enabled:!!r})},Oot=(e,n,r)=>{const o=Lt(ki,ki.ApplicationsApi,n,r);return kt(()=>(console.log("Creating app version v2",e),o.createAppVersion({reqPostApp:e})))},cfe=()=>{const{basePath:e,accessToken:n}=ct(),r=(n==null?void 0:n.access_token)||"",{mutate:o,mutateAsync:i,isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c}=wr([ud,e,r],m=>Oot(m,e,r));return A.useEffect(()=>c(),[c]),{isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c,createAsync:(m,v)=>i(m,v),submit:m=>o(m)}},wot=()=>{const{basePath:e,accessToken:n}=ct(),r=(n==null?void 0:n.access_token)||"",{mutate:o,mutateAsync:i,isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c}=wr([ud.delete,e,r],m=>Sot(m.id,e,r));return{isLoading:t,isError:s,isSuccess:a,data:l,error:u,reset:c,deleteApp:(m,v)=>o(m,v),deleteAppAsync:(m,v)=>i(m,v)}},_ot=()=>{const{isLoading:e,error:n,isSuccess:r,submit:o,data:i}=cfe(),[t,s]=A.useState(null),[a,l]=A.useState(null);A.useEffect(()=>{(async()=>{if(t){const _=await t.text(),T=JSON.parse(_);l(T)}})()},[t]);const u=S=>{console.log("file changed"),S.target.files&&s(S.target.files[0])},c=S=>{const _=S.target;_.value=""},m=S=>{S.preventDefault(),a!==null&&o(a)},v=A.useRef(null);return y.jsx("div",{className:lY.container,children:y.jsxs("div",{children:[y.jsx("h2",{children:" Create new application "}),y.jsx("h3",{children:" Upload a JSON file with the application specification "}),y.jsxs(YP,{onSubmit:m,children:[y.jsx(rd,{children:y.jsx(so,{type:"file",name:"file",id:"file",ref:v,onChange:S=>u(S),onClick:S=>c(S)})}),y.jsx(Xr,{isLoading:e,error:n,success:r?"Application created":"",children:y.jsx(St,{className:lY.submit,color:"primary",disabled:e||r||!t,children:"Submit"})})]})]})})},Rot=oe.memo(_ot),Tot="_body_1vf17_1",xot="_container_1vf17_6",cY={body:Tot,container:xot},Not={selectedApps:[],setSelectedApps:()=>{}},dfe=oe.createContext(Not),Eot=({children:e})=>{const[n,r]=A.useState([]),o={selectedApps:n,setSelectedApps:r};return y.jsx(dfe.Provider,{value:o,children:e})},OA=()=>{const{selectedApps:e,setSelectedApps:n}=A.useContext(dfe),r=A.useCallback((t,s)=>{if(s==="single"&&t.length===1&&n(t),s==="multi"){const a=new Set(e.map(u=>u.id)),l=[...e,...t.filter(u=>!a.has(u.id))];n(l)}},[e,n]),o=A.useCallback(t=>{const s=new Set(e.map(l=>l.id));t.forEach(l=>s.delete(l.id??""));const a=e.filter(l=>s.has(l.id));n(a)},[e,n]),i=A.useCallback(()=>{n([])},[n]);return{selectedApps:e,select:r,unselect:o,clear:i}},Cot="_link_1le8i_229",Pot="_selected_1le8i_236",v3={"app-list":"_app-list_1le8i_1","app-list-select":"_app-list-select_1le8i_2",link:Cot,selected:Pot,"select-all":"_select-all_1le8i_240"},ffe=oe.memo(({selected:e})=>y.jsxs("span",{className:"fa-layers fa-fw",children:[y.jsx(Pa,{icon:Wce,color:"white"}),y.jsx(Pa,{icon:e?Kce:qC,color:"#9D85EF"}),y.jsx(Pa,{icon:qC,color:"#707070"})]})),Aot=({app:e,onNavigate:n=void 0,location:r=void 0})=>y.jsx(wi,{to:`/apps/${e.id}/${e.version}`,children:e.id}),S3=oe.memo(({apps:e,prependColumns:n=[],appendColumns:r=[],getRowProps:o,onInfiniteScroll:i,isLoading:t,onNavigate:s,location:a,className:l,selectMode:u,fields:c})=>{const m=(u==null?void 0:u.mode)!=="none"?"app-list-select":"app-list",v=[...n,{Header:"",accessor:"type",Cell:S=>y.jsx(Gt,{name:S.value==="app"?"app":"folder"})},{Header:"Id",Cell:S=>y.jsx(Aot,{app:S.row.original,onNavigate:s,location:a})}];return c!=null&&c.some(S=>S==="owner")&&v.push({Header:"Owner",accessor:"owner"}),c!=null&&c.some(S=>S==="isPublic")&&v.push({Header:"Visibility",accessor:"isPublic",Cell:S=>y.jsx("span",{children:S.value==="true"?"Public":"Private"})}),c!=null&&c.some(S=>S==="updated")&&v.push({Header:"Last Modified",accessor:"updated",Cell:S=>y.jsx("span",{children:wce(new Date(S.value))})}),v.push(...r),y.jsx(US,{className:`${l} ${v3[m]}`,tableColumns:v,tableData:e,onInfiniteScroll:i,isLoading:t,noDataText:"No apps found",getRowProps:o})}),Fot=({onSelectAll:e,onUnselectAll:n,selectedAppDict:r})=>{const[o,i]=A.useState(!1),t=Object.values(r).some(a=>a===!1),s=A.useCallback(()=>{o&&!t?(i(!1),n()):(i(!0),e())},[o,i,e,n,t]);return y.jsx("span",{className:v3["select-all"],onClick:s,"data-testid":"select-all",children:y.jsx(ffe,{selected:o&&!t})})},Jot=({onSelect:e=void 0,onUnselect:n=void 0,onNavigate:r=void 0,className:o,fields:i=["updated","isPublic","owner"],selectedApps:t=[],selectMode:s})=>{var h;const{isLoading:a,error:l,data:u}=afe(),{claims:c}=ct(),m=c["tapis/username"],v=u!=null&&u.result?u==null?void 0:u.result.sort((f,p)=>f.owner===m?-1:p.owner===m?1:0):[],S=oe.useMemo(()=>{const f={},p={};return t.forEach(O=>{p[O.id??""]=!0}),v==null||v.forEach(O=>{f[O.id??""]=p[O.id??""]??!1}),f},[t,v]),_=(h=s==null?void 0:s.types)!=null&&h.length?[{Header:y.jsx(Fot,{onSelectAll:()=>e&&e(v??[]),onUnselectAll:()=>n&&n(v??[]),selectedAppDict:S}),id:"multiselect",Cell:f=>y.jsx(ffe,{selected:S[f.row.original.id??""]})}]:[],T=A.useCallback(f=>{console.log("appSelectCallback"+f.id),S[f.id??""]&&n?n([f]):(console.log("onSelect"+f.id),e&&e([f]))},[s,n,S,e]),x=f=>{const p=f.original;return{onClick:()=>T(p),"data-testid":p.id,className:S[p.id??""]?v3.selected:""}};return y.jsx(kn,{isLoading:a,error:l,className:o,children:y.jsx(S3,{apps:v,prependColumns:_,getRowProps:x,onNavigate:r,fields:i,selectMode:s})})},Iot=()=>{const{selectedApps:e,select:n,unselect:r,clear:o}=OA(),i=y.jsx("div",{className:cY.body,children:y.jsx(Jot,{className:cY.container,selectMode:{mode:"multi",types:["dir","app"]},selectedApps:e,onSelect:t=>n(t,"multi"),onUnselect:r})});return y.jsx(bs,{right:i,constrain:!0})},dY=["http","https","mailto","tel"];function kot(e){const n=(e||"").trim(),r=n.charAt(0);if(r==="#"||r==="/")return n;const o=n.indexOf(":");if(o===-1)return n;let i=-1;for(;++ii||(i=n.indexOf("#"),i!==-1&&o>i)?n:"javascript:void(0)"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh @@ -912,7 +912,7 @@ PERFORMANCE OF THIS SOFTWARE. color: ${e.palette.action.disabled}; cursor: default; } - `),XZ={ChipStyled:_gt,TextFieldStyled:wgt,EndAdornmentClose:Ogt},Rgt=oe.forwardRef(({chips:e,onAddChip:n,onEditChip:r,onDeleteChip:o,InputProps:i,onInputChange:t,disabled:s,clearInputOnBlur:a,addOnBlur:l,validate:u,error:c,helperText:m,hideClearAll:v,inputProps:S,size:_,disableDeleteOnBackspace:T,disableEdition:x,className:h,renderChip:f,addOnWhichKey:p,onFocus:O,onDeleteAllChips:w,inputRef:b,inputValue:E,...I},M)=>{const[N,$]=oe.useState(""),[B,H]=oe.useState(""),te=oe.useRef(null),Q=oe.useRef(!1),ce=oe.useRef(typeof E=="string"),[me,ie]=oe.useState(null),{onKeyDown:fe,...k}=S||{},{inputRef:re,...de}=i||{},q=()=>{H("")},xe=ce.current,Pe=xe?E:N,Ie=ge=>{t==null||t(ge),xe||$(ge)},ot=ge=>{Ie(e[ge]),ie(ge),q()},We=()=>{ie(null)},Ze=()=>{q(),Ie("")},Vt=ge=>{Ie(ge.target.value)},mt=(ge,ae)=>Z=>{if(typeof u=="function"){const he=u(ge);if(he===!1){ae==null||ae.preventDefault();return}if(!Nht(he)&&he.isError){ae==null||ae.preventDefault(),H(he.textError);return}}Z()},Ut=(ge,ae,Z)=>{mt(ge,Z)(()=>{r==null||r(ge,ae),We(),Ze()})},dt=(ge,ae)=>{mt(ge,ae)(()=>{n==null||n(Pe.trim()),Ze()})},at=()=>{if(Q.current){if(me!==null)We(),Ze();else if(l){if(Pe.length>0){const ge=Pe.trim();ge.length===0?Ze():me!==null?Ut(ge,me):dt(ge)}}else a&&Ze();Q.current=!1}},qt=ge=>{te.current=ge,b&&IZ(ge,b),M&&IZ(ge,M)},Hn=(ge,ae)=>ae===mct.ime?!1:p?Array.isArray(p)?p.some(Z=>Z===ge):p===ge:ge===WC.enter,nn=ge=>{const ae=Hn(ge.key,ge.keyCode),Z=ge.key===WC.backspace,he=Pe.trim();if(!ae&&ge.code==="Tab"){at();return}if(ae&&ge.preventDefault(),Pe.length>0&&ae)he.length===0?Ze():me!==null?Ut(he,me,ge):dt(he,ge);else if(Z&&Pe.length===0&&e.length>0&&!T){const j=e.length-1;o==null||o(j),me===j&&We()}fe==null||fe(ge)},qn=ge=>{ge.preventDefault(),O==null||O(ge),Q.current=!0},zn=ge=>{ge.preventDefault(),!v&&!s&&(w==null||w(),Ze(),We())},_n=ge=>{var ae;ge===me?(Ze(),We()):ot(ge),(ae=te.current)==null||ae.focus()},Nt=ge=>{s||(o==null||o(ge),me!==null&&(We(),Ze()))},pe=e.length>0;return y.jsx(Ype,{onClickAway:at,children:y.jsx(XZ.TextFieldStyled,{value:Pe,onChange:Vt,ref:M,className:`MuiChipsInput-TextField ${h||""}`,size:_,placeholder:"Type and press enter",onFocus:qn,inputProps:{onKeyDown:nn,enterKeyHint:"done",...k},disabled:s,error:!!B||c,helperText:B||m,InputProps:{inputRef:qt,startAdornment:pe?e.map((ge,ae)=>{const Z=`chip-${ae}`,he={index:ae,onEdit:_n,label:ge,title:ge,isEditing:ae===me,size:_,disabled:s,disableEdition:x,onDelete:Nt};return f?f(JZ,Z,he):A.createElement(JZ,{...he,key:Z})}):null,endAdornment:v?null:y.jsx(XZ.EndAdornmentClose,{style:{visibility:pe?"visible":"hidden"},children:y.jsx(kht,{"aria-label":"Clear",title:"Clear",disabled:s,size:"small",onClick:zn})}),...de},...I})})});function Tgt(e,n){return[...e,n]}function xgt(e,n){return e.filter((r,o)=>n!==o)}function Ngt(e,n,r){return e.map((o,i)=>n===i?r:o)}const Egt=[],Cgt=oe.forwardRef(({value:e=Egt,onChange:n,onAddChip:r,onInputChange:o,onDeleteChip:i,disabled:t,validate:s,clearInputOnBlur:a,addOnBlur:l,hideClearAll:u,disableDeleteOnBackspace:c,onEditChip:m,renderChip:v,disableEdition:S,addOnWhichKey:_=WC.enter,inputValue:T,...x},h)=>{const f=b=>{if(t)return;const E=Tgt(e,b),I=E.length-1;r==null||r(b,I),n==null||n(E)},p=b=>{if(t)return;const E=e[b];n==null||n(xgt(e,b)),i==null||i(E,b)},O=(b,E)=>{t||S||(n==null||n(Ngt(e,E,b)),m==null||m(b,E))},w=()=>{n==null||n([])};return y.jsx(Rgt,{chips:e,onAddChip:f,onInputChange:o,disableDeleteOnBackspace:c,onDeleteChip:p,onEditChip:O,renderChip:v,onDeleteAllChips:w,clearInputOnBlur:a,addOnBlur:l,disabled:t,disableEdition:S,validate:s,inputValue:T,hideClearAll:u,addOnWhichKey:_,...x,ref:h})}),Pgt=({toggle:e})=>{const{selectedApps:n,unselect:r}=OA(),{shareAppPublicAsync:o,reset:i}=cct(),{unShareAppPublicAsync:t,reset:s}=fct(),{shareAppAsync:a,reset:l}=hct(),[u,c]=A.useState(!1),m=n.map(ie=>ie.sharedWithUsers),[v,S]=A.useState(m.filter(String).flat());A.useEffect(()=>{i()},[i]),A.useEffect(()=>{s()},[s]),A.useEffect(()=>{l()},[l]);const _=A.useCallback(()=>{ro.setFocused(!0)},[]),{run:T,state:x,isLoading:h,isSuccess:f,error:p}=_E({fn:o,onComplete:_}),{run:O,state:w,isLoading:b,isSuccess:E,error:I}=_E({fn:t,onComplete:_}),{run:M,state:N,isLoading:$,isSuccess:B,error:H}=_E({fn:a,onComplete:_}),te=A.useCallback(()=>{const ie=n.map(k=>({id:k.id}));u&&T(ie),u||O(ie);const fe=n.map(k=>({id:k.id,reqShareUpdate:{users:v}}));M(fe)},[n,T,O]),Q=A.useCallback(ie=>{r([ie]),n.length===1&&e()},[n,e,r]),ce=[{Header:"",id:"deleteStatus",Cell:ie=>{const fe=n[ie.row.index];return x[fe.id]?y.jsx(dpe,{status:x[fe.id].status}):y.jsx("span",{className:Tq["remove-file"],onClick:()=>{Q(n[ie.row.index])},children:"✕"})}}],me={visibility:"private"};return y.jsx(xi,{toggle:()=>{e(),r(n)},title:"Share apps",body:y.jsxs("div",{children:[y.jsx("div",{className:Tq["files-list-container"],children:y.jsx(S3,{apps:n,fields:["updated"],appendColumns:ce,className:Tq["file-list-table"]})}),y.jsx(wo,{initialValues:me,onSubmit:te,children:y.jsxs(uo,{id:"share-form",children:[y.jsx("h3",{children:" General access "}),y.jsxs(Gw,{type:void 0,onChange:ie=>{const fe=ie.target.value;fe==="public"&&c(!0),fe==="private"&&c(!1)},children:[y.jsx("option",{value:"private",children:"Private"}),y.jsx("option",{value:"public",children:"Public"})]}),y.jsx("h3",{children:" Add users "}),y.jsx(Cgt,{value:v,onChange:S})]})})]}),footer:y.jsxs(Xr,{isLoading:!1,error:p||H||I,success:f||E?"Visibility changed":"",reverse:!0,children:[y.jsxs(St,{color:"primary",disabled:h||f||$||B||b||E||n.length===0,"aria-label":"Submit",onClick:te,children:["Confirm (",n.length,")"]}),!f&&y.jsx(St,{color:"danger",disabled:h||f||n.length===0,"aria-label":"Cancel",onClick:()=>{e()},children:"Cancel"})]})})},Yv=({text:e,icon:n,onClick:r,disabled:o=!0,...i})=>y.jsx("div",{children:y.jsxs(St,{disabled:o,onClick:r,className:npe["toolbar-btn"],...i,children:[y.jsx(Gt,{name:n}),y.jsxs("span",{children:[" ",e]})]})}),Agt=()=>{const[e,n]=A.useState(void 0),{selectedApps:r}=OA(),{pathname:o}=_l();console.log("pathname",o),o.split("/");const{claims:i}=ct(),t=l=>l===i["tapis/username"],s=r.every(l=>l.owner===void 0?!1:t(l.owner)),a=()=>{n(void 0)};return y.jsx("div",{id:"file-operation-toolbar",children:y.jsxs("div",{className:npe["toolbar-wrapper"],children:[y.jsx(Yv,{text:"Create",icon:"add",disabled:!1,onClick:()=>{n("upload")},"aria-label":"Add"}),y.jsx(Yv,{text:"Delete",icon:"trash",disabled:r.length===0||s===!0,onClick:()=>n("delete"),"aria-label":"Delete"}),y.jsx(Yv,{text:"Share",icon:"globe",disabled:r.length===0||!s,onClick:()=>n("share")}),e==="delete"&&y.jsx(sct,{toggle:a}),e==="upload"&&y.jsx(act,{toggle:a}),e==="share"&&y.jsx(Pgt,{toggle:a})]})})},Fgt=({text:e})=>y.jsx(A3,{children:e}),Jgt=({appId:e,appVersion:n})=>{const{data:r,isLoading:o,error:i}=lfe({appId:e,appVersion:n},{refetchOnWindowFocus:!0}),t=r==null?void 0:r.result,s=t==null?void 0:t.notes;return y.jsxs(kn,{isLoading:o,error:i,children:[y.jsxs(Cl,{type:"sub-header",children:[s&&s.label?s.label:e," - ",n,y.jsxs("div",{className:klt["toolbar-wrapper"],children:[y.jsx(wi,{to:`/apps/${e}/${n}/edit`,style:{textDecoration:"none",color:"black"},children:y.jsx(Yv,{text:"Edit",icon:"edit-document",disabled:!1,onClick:async()=>{},"aria-label":"Save"})}),y.jsx("a",{href:`https://ptdatax.tacc.utexas.edu/workbench/applications/${e}?appVersion=${n}`,style:{textDecoration:"none",color:"black"},children:y.jsx(Yv,{text:"Run",icon:"jobs",disabled:!1,onClick:async()=>{},"aria-label":"Save"})})]})]}),y.jsxs("p",{children:[" Docker Image: ",t==null?void 0:t.containerImage]}),s&&s.helpTextMarkdown?y.jsx(Fgt,{text:s.helpTextMarkdown}):s&&s.helpText||s&&s.helpTextHtml||"No notes found"]})},Igt=({appId:e,appVersion:n})=>{const r=y.jsx("div",{style:{flex:1},children:y.jsx(Jgt,{appId:e,appVersion:n})});return y.jsx(bs,{right:r})},kgt=oe.memo(Igt);function qgt(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function QZ(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function YZ(e){for(var n=1;n=0)&&(r[i]=e[i]);return r}function $gt(e,n){if(e==null)return{};var r=Mgt(e,n),o,i;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function Dgt(e,n){return Lgt(e)||Ugt(e,n)||Bgt(e,n)||zgt()}function Lgt(e){if(Array.isArray(e))return e}function Ugt(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],o=!0,i=!1,t=void 0;try{for(var s=e[Symbol.iterator](),a;!(o=(a=s.next()).done)&&(r.push(a.value),!(n&&r.length===n));o=!0);}catch(l){i=!0,t=l}finally{try{!o&&s.return!=null&&s.return()}finally{if(i)throw t}}return r}}function Bgt(e,n){if(e){if(typeof e=="string")return ZZ(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZZ(e,n)}}function ZZ(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r{const[N,$]=oe.useState(""),[B,H]=oe.useState(""),te=oe.useRef(null),Q=oe.useRef(!1),ce=oe.useRef(typeof E=="string"),[me,ie]=oe.useState(null),{onKeyDown:fe,...k}=S||{},{inputRef:re,...de}=i||{},q=()=>{H("")},xe=ce.current,Pe=xe?E:N,Ie=ge=>{t==null||t(ge),xe||$(ge)},ot=ge=>{Ie(e[ge]),ie(ge),q()},We=()=>{ie(null)},Ze=()=>{q(),Ie("")},Vt=ge=>{Ie(ge.target.value)},mt=(ge,ae)=>Z=>{if(typeof u=="function"){const he=u(ge);if(he===!1){ae==null||ae.preventDefault();return}if(!Nht(he)&&he.isError){ae==null||ae.preventDefault(),H(he.textError);return}}Z()},Ut=(ge,ae,Z)=>{mt(ge,Z)(()=>{r==null||r(ge,ae),We(),Ze()})},dt=(ge,ae)=>{mt(ge,ae)(()=>{n==null||n(Pe.trim()),Ze()})},at=()=>{if(Q.current){if(me!==null)We(),Ze();else if(l){if(Pe.length>0){const ge=Pe.trim();ge.length===0?Ze():me!==null?Ut(ge,me):dt(ge)}}else a&&Ze();Q.current=!1}},qt=ge=>{te.current=ge,b&&IZ(ge,b),M&&IZ(ge,M)},Hn=(ge,ae)=>ae===mct.ime?!1:p?Array.isArray(p)?p.some(Z=>Z===ge):p===ge:ge===WC.enter,nn=ge=>{const ae=Hn(ge.key,ge.keyCode),Z=ge.key===WC.backspace,he=Pe.trim();if(!ae&&ge.code==="Tab"){at();return}if(ae&&ge.preventDefault(),Pe.length>0&&ae)he.length===0?Ze():me!==null?Ut(he,me,ge):dt(he,ge);else if(Z&&Pe.length===0&&e.length>0&&!T){const j=e.length-1;o==null||o(j),me===j&&We()}fe==null||fe(ge)},qn=ge=>{ge.preventDefault(),O==null||O(ge),Q.current=!0},zn=ge=>{ge.preventDefault(),!v&&!s&&(w==null||w(),Ze(),We())},_n=ge=>{var ae;ge===me?(Ze(),We()):ot(ge),(ae=te.current)==null||ae.focus()},Nt=ge=>{s||(o==null||o(ge),me!==null&&(We(),Ze()))},pe=e.length>0;return y.jsx(Ype,{onClickAway:at,children:y.jsx(XZ.TextFieldStyled,{value:Pe,onChange:Vt,ref:M,className:`MuiChipsInput-TextField ${h||""}`,size:_,placeholder:"Type and press enter",onFocus:qn,inputProps:{onKeyDown:nn,enterKeyHint:"done",...k},disabled:s,error:!!B||c,helperText:B||m,InputProps:{inputRef:qt,startAdornment:pe?e.map((ge,ae)=>{const Z=`chip-${ae}`,he={index:ae,onEdit:_n,label:ge,title:ge,isEditing:ae===me,size:_,disabled:s,disableEdition:x,onDelete:Nt};return f?f(JZ,Z,he):A.createElement(JZ,{...he,key:Z})}):null,endAdornment:v?null:y.jsx(XZ.EndAdornmentClose,{style:{visibility:pe?"visible":"hidden"},children:y.jsx(kht,{"aria-label":"Clear",title:"Clear",disabled:s,size:"small",onClick:zn})}),...de},...I})})});function Tgt(e,n){return[...e,n]}function xgt(e,n){return e.filter((r,o)=>n!==o)}function Ngt(e,n,r){return e.map((o,i)=>n===i?r:o)}const Egt=[],Cgt=oe.forwardRef(({value:e=Egt,onChange:n,onAddChip:r,onInputChange:o,onDeleteChip:i,disabled:t,validate:s,clearInputOnBlur:a,addOnBlur:l,hideClearAll:u,disableDeleteOnBackspace:c,onEditChip:m,renderChip:v,disableEdition:S,addOnWhichKey:_=WC.enter,inputValue:T,...x},h)=>{const f=b=>{if(t)return;const E=Tgt(e,b),I=E.length-1;r==null||r(b,I),n==null||n(E)},p=b=>{if(t)return;const E=e[b];n==null||n(xgt(e,b)),i==null||i(E,b)},O=(b,E)=>{t||S||(n==null||n(Ngt(e,E,b)),m==null||m(b,E))},w=()=>{n==null||n([])};return y.jsx(Rgt,{chips:e,onAddChip:f,onInputChange:o,disableDeleteOnBackspace:c,onDeleteChip:p,onEditChip:O,renderChip:v,onDeleteAllChips:w,clearInputOnBlur:a,addOnBlur:l,disabled:t,disableEdition:S,validate:s,inputValue:T,hideClearAll:u,addOnWhichKey:_,...x,ref:h})}),Pgt=({toggle:e})=>{const{selectedApps:n,unselect:r}=OA(),{shareAppPublicAsync:o,reset:i}=cct(),{unShareAppPublicAsync:t,reset:s}=fct(),{shareAppAsync:a,reset:l}=hct(),[u,c]=A.useState(!1),m=n.map(ie=>ie.sharedWithUsers),[v,S]=A.useState(m.filter(String).flat());A.useEffect(()=>{i()},[i]),A.useEffect(()=>{s()},[s]),A.useEffect(()=>{l()},[l]);const _=A.useCallback(()=>{ro.setFocused(!0)},[]),{run:T,state:x,isLoading:h,isSuccess:f,error:p}=_E({fn:o,onComplete:_}),{run:O,state:w,isLoading:b,isSuccess:E,error:I}=_E({fn:t,onComplete:_}),{run:M,state:N,isLoading:$,isSuccess:B,error:H}=_E({fn:a,onComplete:_}),te=A.useCallback(()=>{const ie=n.map(fe=>({id:fe.id}));if(u&&T(ie),u||O(ie),v.length>0){const fe=n.map(k=>({id:k.id,reqShareUpdate:{users:v}}));M(fe)}},[n,T,O]),Q=A.useCallback(ie=>{r([ie]),n.length===1&&e()},[n,e,r]),ce=[{Header:"",id:"deleteStatus",Cell:ie=>{const fe=n[ie.row.index];return x[fe.id]?y.jsx(dpe,{status:x[fe.id].status}):y.jsx("span",{className:Tq["remove-file"],onClick:()=>{Q(n[ie.row.index])},children:"✕"})}}],me={visibility:"private"};return y.jsx(xi,{toggle:()=>{e(),r(n)},title:"Share apps",body:y.jsxs("div",{children:[y.jsx("div",{className:Tq["files-list-container"],children:y.jsx(S3,{apps:n,fields:["updated"],appendColumns:ce,className:Tq["file-list-table"]})}),y.jsx(wo,{initialValues:me,onSubmit:te,children:y.jsxs(uo,{id:"share-form",children:[y.jsx("h3",{children:" General access "}),y.jsxs(Gw,{type:void 0,onChange:ie=>{const fe=ie.target.value;fe==="public"&&c(!0),fe==="private"&&c(!1)},children:[y.jsx("option",{value:"private",children:"Private"}),y.jsx("option",{value:"public",children:"Public"})]}),y.jsx("h3",{children:" Add users "}),y.jsx(Cgt,{value:v,onChange:S})]})})]}),footer:y.jsxs(Xr,{isLoading:!1,error:p||H||I,success:f||E?"Visibility changed":"",reverse:!0,children:[y.jsxs(St,{color:"primary",disabled:h||f||$||B||b||E||n.length===0,"aria-label":"Submit",onClick:te,children:["Confirm (",n.length,")"]}),!f&&y.jsx(St,{color:"danger",disabled:h||f||n.length===0,"aria-label":"Cancel",onClick:()=>{e()},children:"Cancel"})]})})},Yv=({text:e,icon:n,onClick:r,disabled:o=!0,...i})=>y.jsx("div",{children:y.jsxs(St,{disabled:o,onClick:r,className:npe["toolbar-btn"],...i,children:[y.jsx(Gt,{name:n}),y.jsxs("span",{children:[" ",e]})]})}),Agt=()=>{const[e,n]=A.useState(void 0),{selectedApps:r}=OA(),{pathname:o}=_l();console.log("pathname",o),o.split("/");const{claims:i}=ct(),t=l=>l===i["tapis/username"],s=r.every(l=>l.owner===void 0?!1:t(l.owner)),a=()=>{n(void 0)};return y.jsx("div",{id:"file-operation-toolbar",children:y.jsxs("div",{className:npe["toolbar-wrapper"],children:[y.jsx(Yv,{text:"Create",icon:"add",disabled:!1,onClick:()=>{n("upload")},"aria-label":"Add"}),y.jsx(Yv,{text:"Delete",icon:"trash",disabled:r.length===0||s===!0,onClick:()=>n("delete"),"aria-label":"Delete"}),y.jsx(Yv,{text:"Share",icon:"globe",disabled:r.length===0||!s,onClick:()=>n("share")}),e==="delete"&&y.jsx(sct,{toggle:a}),e==="upload"&&y.jsx(act,{toggle:a}),e==="share"&&y.jsx(Pgt,{toggle:a})]})})},Fgt=({text:e})=>y.jsx(A3,{children:e}),Jgt=({appId:e,appVersion:n})=>{const{data:r,isLoading:o,error:i}=lfe({appId:e,appVersion:n},{refetchOnWindowFocus:!0}),t=r==null?void 0:r.result,s=t==null?void 0:t.notes;return y.jsxs(kn,{isLoading:o,error:i,children:[y.jsxs(Cl,{type:"sub-header",children:[s&&s.label?s.label:e," - ",n,y.jsxs("div",{className:klt["toolbar-wrapper"],children:[y.jsx(wi,{to:`/apps/${e}/${n}/edit`,style:{textDecoration:"none",color:"black"},children:y.jsx(Yv,{text:"Edit",icon:"edit-document",disabled:!1,onClick:async()=>{},"aria-label":"Save"})}),y.jsx("a",{href:`https://ptdatax.tacc.utexas.edu/workbench/applications/${e}?appVersion=${n}`,style:{textDecoration:"none",color:"black"},children:y.jsx(Yv,{text:"Run",icon:"jobs",disabled:!1,onClick:async()=>{},"aria-label":"Save"})})]})]}),y.jsxs("p",{children:[" Docker Image: ",t==null?void 0:t.containerImage]}),s&&s.helpTextMarkdown?y.jsx(Fgt,{text:s.helpTextMarkdown}):s&&s.helpText||s&&s.helpTextHtml||"No notes found"]})},Igt=({appId:e,appVersion:n})=>{const r=y.jsx("div",{style:{flex:1},children:y.jsx(Jgt,{appId:e,appVersion:n})});return y.jsx(bs,{right:r})},kgt=oe.memo(Igt);function qgt(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function QZ(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function YZ(e){for(var n=1;n=0)&&(r[i]=e[i]);return r}function $gt(e,n){if(e==null)return{};var r=Mgt(e,n),o,i;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function Dgt(e,n){return Lgt(e)||Ugt(e,n)||Bgt(e,n)||zgt()}function Lgt(e){if(Array.isArray(e))return e}function Ugt(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],o=!0,i=!1,t=void 0;try{for(var s=e[Symbol.iterator](),a;!(o=(a=s.next()).done)&&(r.push(a.value),!(n&&r.length===n));o=!0);}catch(l){i=!0,t=l}finally{try{!o&&s.return!=null&&s.return()}finally{if(i)throw t}}return r}}function Bgt(e,n){if(e){if(typeof e=="string")return ZZ(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZZ(e,n)}}function ZZ(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l1&&arguments[1]!==void 0?arguments[1]:{};zN.initial(e),zN.handler(n);var r={current:e},o=XO(rvt)(r,n),i=XO(nvt)(r),t=XO(zN.changes)(e),s=XO(tvt)(r);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return zN.selector(u),u(r.current)}function l(u){Vgt(o,i,t,s)(u)}return[a,l]}function tvt(e,n){return jw(n)?n(e.current):n}function nvt(e,n){return e.current=ej(ej({},e.current),n),n}function rvt(e,n,r){return jw(n)?n(e.current):Object.keys(r).forEach(function(o){var i;return(i=n[o])===null||i===void 0?void 0:i.call(n,e.current[o])}),r}var ivt={create:evt},ovt={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function svt(e){return function n(){for(var r=this,o=arguments.length,i=new Array(o),t=0;t=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),l=0;l Tapis UI - +