diff --git a/src/main/java/kr/co/mcmp/eventListener/dto/reqDto/RequestEventListenerDto.java b/src/main/java/kr/co/mcmp/eventListener/dto/reqDto/RequestEventListenerDto.java
index dd784ad..0491bbf 100644
--- a/src/main/java/kr/co/mcmp/eventListener/dto/reqDto/RequestEventListenerDto.java
+++ b/src/main/java/kr/co/mcmp/eventListener/dto/reqDto/RequestEventListenerDto.java
@@ -46,7 +46,6 @@ public static RequestEventListenerDto of(RequestEventListenerDto eventListenerDt
// Comment translated to English.
public static EventListener toEntity(RequestEventListenerDto eventListenerDto, WorkflowDto workflowDto, OssDto ossDto, OssTypeDto ossTypeDto) {
return EventListener.builder()
- .eventListenerIdx(eventListenerDto.getEventListenerIdx())
.eventListenerName(eventListenerDto.getEventListenerName())
.eventListenerDesc(eventListenerDto.getEventListenerDesc())
.eventListenerUrl(null)
diff --git a/src/main/resources/static/assets/EventListenerList-C9FR2rd-.js b/src/main/resources/static/assets/EventListenerList-C9FR2rd-.js
deleted file mode 100644
index 2127d23..0000000
--- a/src/main/resources/static/assets/EventListenerList-C9FR2rd-.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import{_ as Q}from"./TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js";import{s as x,_ as X}from"./request-txnOTK5f.js";import{d as S,u as M,l as Z,w as ee,o as G,M as O,m as te,r as u,c as g,a as n,t as P,b as W,f as R,v as ne,F as se,e as ae,p as V,j as A,h as U,g as m,s as le,i as D}from"./index-CtQCsPEr.js";import{f as oe,P as re}from"./SearchableSelect-TBocqjLd.js";import{T as ie}from"./TumblebugParamSelector-Sfwskzms.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const de=()=>x.get("/eventlistener/list");function ce(o){return x.get("/eventlistener/"+o)}function ue(o){return x.get(`/eventlistener/duplicate?eventlistenerName=${encodeURIComponent(o)}`)}function ve(o){return x.post("/eventlistener",o)}function me(o){return x.patch(`/eventlistener/${o.eventListenerIdx}`,o)}function we(o){return x.delete(`/eventlistener/${o}`)}const fe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document",style:{"max-width":"900px"}},pe={class:"modal-content"},be={class:"modal-header"},Le={class:"modal-title"},ke={class:"modal-body py-4"},ge={class:"row mb-3"},ye={class:"grid gap-0 column-gap-3"},Ee={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},he={class:"mb-3"},Ne={class:"mb-3"},xe=["value"],_e={class:"modal-footer"},Ie=S({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(o,{emit:_}){const a=M(),w=Z(),v=u(),L=u(),r=o,c=_,C=U(()=>r.eventListenerIdx);ee(C,async()=>{await k(),await h()}),G(async()=>{v.value&&(L.value=new O(v.value),v.value.addEventListener("show.bs.modal",y)),await k(),await h()}),te(()=>{var e;(e=v.value)==null||e.removeEventListener("show.bs.modal",y)});const y=async()=>{await k(),await h()},s=u({}),f=u(!1),k=async()=>{if(r.mode==="new")s.value.eventListenerName="",s.value.eventListenerDesc="",s.value.workflowIdx=0,s.value.workflowParams=[],p.value=!1,N.value="",$.value="",f.value=!0;else{const{data:e}=await ce(r.eventListenerIdx);s.value=e,p.value=!0,N.value=I(e.eventListenerName),$.value=I(e.eventListenerName),f.value=!0}},i=u([]),d=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],E=new Map(d.map((e,t)=>[e,t])),h=async()=>{const{data:e}=await oe("N");i.value=[...e].sort((t,b)=>{const l=E.get(t.workflowInfo.workflowName)??d.length,F=E.get(b.workflowInfo.workflowName)??d.length;return l-F})},B=U(()=>i.value.find(e=>Number(e.workflowInfo.workflowIdx)===Number(s.value.workflowIdx))),T=U(()=>{var e;return((e=B.value)==null?void 0:e.workflowInfo.workflowName)||s.value.workflowName||""}),p=u(!1),N=u(""),$=u(""),I=e=>(e||"").trim(),Y=()=>{const e=I(s.value.eventListenerName);p.value=!!(e&&e===N.value)},j=async()=>{const e=I(s.value.eventListenerName);if(!e){a.error("Please enter Event Listener name.");return}if(r.mode!=="new"&&e===$.value){a.success("Name is available."),p.value=!0,N.value=e;return}const{data:t}=await ue(e);t?(a.error("Name is already in use."),p.value=!1):(a.success("Name is available."),p.value=!0,N.value=e)},H=async()=>{if(!s.value.eventListenerName){a.error("Please enter Event Listener name.");return}if(!p.value||N.value!==I(s.value.eventListenerName)){a.error("Please perform duplicate check for the name.");return}if(!s.value.eventListenerDesc){a.error("Please enter Event Listener description.");return}if(!s.value.workflowIdx||s.value.workflowIdx===0){a.error("Please select a Workflow.");return}let e=!1;r.mode==="new"?(s.value.workflowParams.forEach(t=>{t.paramIdx=0,t.eventListenerYn="Y"}),e=await q()):e=await K(),e&&(c("get-event-listener-list"),k(),L.value&&(L.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const t=document.querySelector(".modal-backdrop");t==null||t.remove()},150)))},q=async()=>{try{const{data:e}=await ve(s.value);return e?(a.success("Registered successfully."),!0):(a.error("Failed to register."),!1)}catch{return a.error("Failed to register."),!1}},K=async()=>{try{const{data:e}=await me(s.value);return e?(a.success("Updated successfully."),!0):(a.error("Failed to update."),!1)}catch{return a.error("Failed to update."),!1}},z=e=>{i.value.forEach(t=>{t.workflowInfo.workflowIdx===e&&(s.value.workflowParams=J(t.workflowParams))})},J=(e=[])=>{const t=(w.projectInfo.ns_id||w.projectInfo.name||"").trim();return e.map(b=>{var l;return{...b,paramIdx:0,paramValue:t&&((l=b.paramKey)==null?void 0:l.trim().toUpperCase())==="NAMESPACE"?t:b.paramValue,eventListenerYn:"Y"}})};return(e,t)=>{var b;return m(),g("div",{class:"modal modal-blur fade",id:"eventListenerForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:v},[n("div",fe,[n("div",pe,[n("div",be,[n("h3",Le,"Event Listener "+P(r.mode==="new"?"New":"Edit"),1),t[6]||(t[6]=n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),n("div",ke,[n("div",null,[n("div",ge,[t[7]||(t[7]=n("label",{class:"form-label required"},"Event Listener Name",-1)),n("div",ye,[W(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Name","onUpdate:modelValue":t[0]||(t[0]=l=>s.value.eventListenerName=l),onInput:Y},null,544),[[R,s.value.eventListenerName]]),p.value?(m(),g("button",Ee,"Duplicate Check")):(m(),g("button",{key:0,class:"btn btn-primary chk",onClick:j,style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),n("div",he,[t[8]||(t[8]=n("label",{class:"form-label required"},"Event Listener Description",-1)),W(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Description","onUpdate:modelValue":t[1]||(t[1]=l=>s.value.eventListenerDesc=l)},null,512),[[R,s.value.eventListenerDesc]])]),n("div",Ne,[t[10]||(t[10]=n("label",{class:"form-label required"},"Workflow",-1)),W(n("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":t[2]||(t[2]=l=>s.value.workflowIdx=l),onChange:t[3]||(t[3]=l=>z(s.value.workflowIdx))},[t[9]||(t[9]=n("option",{value:0},"Select Workflow",-1)),(m(!0),g(se,null,ae(i.value,(l,F)=>(m(),g("option",{value:l.workflowInfo.workflowIdx,key:F},P(l.workflowInfo.workflowName),9,xe))),128))],544),[[ne,s.value.workflowIdx]])]),f.value&&s.value.workflowParams?(m(),V(ie,{key:0,"workflow-name":T.value,"workflow-param-data":s.value.workflowParams,"workflow-stage-mappings":((b=B.value)==null?void 0:b.workflowStageMappings)||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):A("",!0),f.value?(m(),V(re,{key:1,popup:!1,"workflow-param-data":s.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):A("",!0)])]),n("div",_e,[n("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:t[4]||(t[4]=l=>k())}," Cancel "),n("button",{type:"button",class:"btn btn-primary ms-auto",onClick:t[5]||(t[5]=l=>H())},P(r.mode==="new"?"Create":"Edit"),1)])])])],512)}}}),Ce={class:"modal modal-blur fade",id:"deleteEventListener",tabindex:"-1","aria-hidden":"true"},De={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Pe={class:"modal-content"},$e={class:"modal-body py-4"},Fe={class:"modal-footer"},We=S({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(o,{emit:_}){const a=M(),w=o,v=_,L=async()=>{const{data:r}=await we(w.eventListenerIdx);r?a.success("Deleted successfully."):a.error("Failed to delete."),v("get-event-listener-list")};return(r,c)=>(m(),g("div",Ce,[n("div",De,[n("div",Pe,[c[2]||(c[2]=n("div",{class:"modal-status bg-danger"},null,-1)),c[3]||(c[3]=n("div",{class:"modal-header"},[n("h3",{class:"modal-title"},"Delete Event Listener"),n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),n("div",$e,[n("h4",null,"Are you sure you want to delete "+P(w.eventListenerName)+"?",1)]),n("div",Fe,[c[1]||(c[1]=n("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),n("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=C=>L())},"Delete")])])])]))}}),Ue={class:"card card-flush w-100"},Se={class:"card-body"},Me={class:"event-listener-table"},Te=S({__name:"EventListenerList",setup(o){const _=M(),a=u([]),w=u([]);G(async()=>{C(),await v()});const v=async()=>{try{const{data:i}=await de();a.value=i,a.value.forEach(d=>{d.eventListenerUrl=L(d.eventListenerCallUrl)})}catch(i){console.log(i),_.error("Failed to load data.")}},L=i=>window.location.origin+i,r=u(0),c=u(""),C=()=>{w.value=[{title:"Event Listener Name",field:"eventListenerName",minWidth:190,widthGrow:1.4,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Connect Workflow Name",field:"workflowName",minWidth:220,widthGrow:1.6,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Event Listener Desc",field:"eventListenerDesc",minWidth:220,widthGrow:1.8,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Action URL",field:"eventListenerUrl",minWidth:260,widthGrow:2.2,cssClass:"event-listener-url-cell",variableHeight:!0},{title:"Action",minWidth:180,widthGrow:1,formatter:s,cssClass:"event-listener-action-cell",headerSort:!1,variableHeight:!0,cellClick:async function(i,d){const E=i.target,h=E==null?void 0:E.getAttribute("id");r.value=d.getRow().getData().eventListenerIdx,h==="edit-btn"?(f.value="edit",await y("eventListenerForm")):h==="delete-btn"&&(c.value=d.getRow().getData().eventListenerName,await y("deleteEventListener"))}}]},y=async i=>{await le();const d=document.getElementById(i);d&&O.getOrCreateInstance(d).show()},s=()=>`
-
- Edit
- Delete
-
`,f=u("new"),k=async()=>{r.value=0,f.value="new",await y("eventListenerForm")};return(i,d)=>(m(),g("div",null,[D(Q,{"header-title":"Event Listener","new-btn-title":"New Event Listener","popup-flag":!1,"popup-target":"",class:"mb-3",onClickNewBtn:k}),n("div",Ue,[n("div",Se,[n("div",Me,[D(X,{columns:w.value,"table-data":a.value},null,8,["columns","table-data"])])])]),D(Ie,{style:{width:"100%"},mode:f.value,"event-listener-idx":r.value,onGetEventListenerList:v},null,8,["mode","event-listener-idx"]),D(We,{"event-listener-name":c.value,"event-listener-idx":r.value,onGetEventListenerList:v},null,8,["event-listener-name","event-listener-idx"])]))}});export{Te as default};
diff --git a/src/main/resources/static/assets/EventListenerList-XxjlV0iN.js b/src/main/resources/static/assets/EventListenerList-XxjlV0iN.js
new file mode 100644
index 0000000..f82792d
--- /dev/null
+++ b/src/main/resources/static/assets/EventListenerList-XxjlV0iN.js
@@ -0,0 +1,9 @@
+import{_ as Z}from"./TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js";import{s as N,_ as ee}from"./request-DPzMytGP.js";import{d as M,u as B,l as te,w as ne,o as T,M as Y,m as ae,r as d,c as y,a as n,t as $,b as W,f as A,v as se,F as le,e as oe,p as G,j as O,h as S,g as w,s as re,i as D}from"./index-Woncnlsa.js";import{f as ie,P as de}from"./SearchableSelect-DlLPIFTu.js";import{T as ue}from"./TumblebugParamSelector-DeFn1gSY.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const ce=()=>N.get("/eventlistener/list");function ve(r){return N.get("/eventlistener/"+r)}function me(r){return N.get(`/eventlistener/duplicate?eventlistenerName=${encodeURIComponent(r)}`)}function we(r){return N.post("/eventlistener",r)}function fe(r){return N.patch(`/eventlistener/${r.eventListenerIdx}`,r)}function pe(r){return N.delete(`/eventlistener/${r}`)}const be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document",style:{"max-width":"900px"}},Le={class:"modal-content"},ke={class:"modal-header"},ge={class:"modal-title"},ye={class:"modal-body py-4"},Ee={class:"row mb-3"},he={class:"grid gap-0 column-gap-3"},xe={key:1,class:"btn btn-success",style:{margin:"3px",width:"150px"}},Ne={class:"mb-3"},_e={class:"mb-3"},Ie=["value"],Ce={class:"modal-footer"},De=M({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=te(),v=d(),k=d(),i=r,c=_,C=S(()=>i.eventListenerIdx);ne(C,async()=>{await l(),await P()}),T(async()=>{v.value&&(k.value=new Y(v.value),v.value.addEventListener("show.bs.modal",E)),await l(),await P()}),ae(()=>{var e;(e=v.value)==null||e.removeEventListener("show.bs.modal",E)});const E=async()=>{await l(),await P()},a=d({}),p=d(!1),g=d(!1),u=d(0),l=async()=>{if(g.value=!1,i.mode==="new")a.value={eventListenerIdx:0,eventListenerName:"",eventListenerDesc:"",eventListenerUrl:"",eventListenerCallUrl:"",workflowIdx:0,workflowParams:[]},L.value=!1,x.value="",F.value="",p.value=!0;else{const{data:e}=await ve(i.eventListenerIdx);a.value=e,L.value=!0,x.value=I(e.eventListenerName),F.value=I(e.eventListenerName),p.value=!0,g.value=!!a.value.workflowIdx}u.value+=1},b=d([]),h=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],R=new Map(h.map((e,t)=>[e,t])),P=async()=>{const{data:e}=await ie("N");b.value=[...e].sort((t,m)=>{const o=R.get(t.workflowInfo.workflowName)??h.length,U=R.get(m.workflowInfo.workflowName)??h.length;return o-U})},V=S(()=>b.value.find(e=>Number(e.workflowInfo.workflowIdx)===Number(a.value.workflowIdx))),j=S(()=>{var e;return((e=V.value)==null?void 0:e.workflowInfo.workflowName)||a.value.workflowName||""}),L=d(!1),x=d(""),F=d(""),I=e=>(e||"").trim(),H=()=>{const e=I(a.value.eventListenerName);L.value=!!(e&&e===x.value)},q=async()=>{const e=I(a.value.eventListenerName);if(!e){s.error("Please enter Event Listener name.");return}if(i.mode!=="new"&&e===F.value){s.success("Name is available."),L.value=!0,x.value=e;return}const{data:t}=await me(e);t?(s.error("Name is already in use."),L.value=!1):(s.success("Name is available."),L.value=!0,x.value=e)},K=async()=>{if(!a.value.eventListenerName){s.error("Please enter Event Listener name.");return}if(!L.value||x.value!==I(a.value.eventListenerName)){s.error("Please perform duplicate check for the name.");return}if(!a.value.eventListenerDesc){s.error("Please enter Event Listener description.");return}if(!a.value.workflowIdx||a.value.workflowIdx===0){s.error("Please select a Workflow.");return}let e=!1;i.mode==="new"?(a.value.workflowParams.forEach(t=>{t.paramIdx=0,t.eventListenerYn="Y"}),e=await z()):e=await J(),e&&(c("get-event-listener-list"),l(),k.value&&(k.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const t=document.querySelector(".modal-backdrop");t==null||t.remove()},150)))},z=async()=>{try{const{data:e}=await we(a.value);return e?(s.success("Registered successfully."),!0):(s.error("Failed to register."),!1)}catch{return s.error("Failed to register."),!1}},J=async()=>{try{const{data:e}=await fe(a.value);return e?(s.success("Updated successfully."),!0):(s.error("Failed to update."),!1)}catch{return s.error("Failed to update."),!1}},Q=e=>{g.value=!1;const t=b.value.find(m=>Number(m.workflowInfo.workflowIdx)===Number(e));if(!t){a.value.workflowParams=[];return}a.value.workflowParams=X(t.workflowParams),u.value+=1,g.value=!0},X=(e=[])=>{const t=(f.projectInfo.ns_id||f.projectInfo.name||"").trim();return e.map(m=>{var o;return{...m,paramIdx:0,paramValue:t&&((o=m.paramKey)==null?void 0:o.trim().toUpperCase())==="NAMESPACE"?t:m.paramValue,eventListenerYn:"Y"}})};return(e,t)=>{var m;return w(),y("div",{class:"modal modal-blur fade",id:"eventListenerForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:v},[n("div",be,[n("div",Le,[n("div",ke,[n("h3",ge,"Event Listener "+$(i.mode==="new"?"New":"Edit"),1),t[6]||(t[6]=n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),n("div",ye,[n("div",null,[n("div",Ee,[t[7]||(t[7]=n("label",{class:"form-label required"},"Event Listener Name",-1)),n("div",he,[W(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Name","onUpdate:modelValue":t[0]||(t[0]=o=>a.value.eventListenerName=o),onInput:H},null,544),[[A,a.value.eventListenerName]]),L.value?(w(),y("button",xe,"Duplicate Check")):(w(),y("button",{key:0,class:"btn btn-primary chk",onClick:q,style:{margin:"3px",width:"150px"}},"Duplicate Check"))])]),n("div",Ne,[t[8]||(t[8]=n("label",{class:"form-label required"},"Event Listener Description",-1)),W(n("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter Event Listener Description","onUpdate:modelValue":t[1]||(t[1]=o=>a.value.eventListenerDesc=o)},null,512),[[A,a.value.eventListenerDesc]])]),n("div",_e,[t[10]||(t[10]=n("label",{class:"form-label required"},"Workflow",-1)),W(n("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":t[2]||(t[2]=o=>a.value.workflowIdx=o),onChange:t[3]||(t[3]=o=>Q(a.value.workflowIdx))},[t[9]||(t[9]=n("option",{value:0},"Select Workflow",-1)),(w(!0),y(le,null,oe(b.value,(o,U)=>(w(),y("option",{value:o.workflowInfo.workflowIdx,key:U},$(o.workflowInfo.workflowName),9,Ie))),128))],544),[[se,a.value.workflowIdx]])]),p.value&&g.value&&a.value.workflowIdx&&a.value.workflowParams?(w(),G(ue,{key:`${a.value.workflowIdx}-${u.value}`,"workflow-name":j.value,"workflow-param-data":a.value.workflowParams,"workflow-stage-mappings":((m=V.value)==null?void 0:m.workflowStageMappings)||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):O("",!0),p.value?(w(),G(de,{key:1,popup:!1,"workflow-param-data":a.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):O("",!0)])]),n("div",Ce,[n("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:t[4]||(t[4]=o=>l())}," Cancel "),n("button",{type:"button",class:"btn btn-primary ms-auto",onClick:t[5]||(t[5]=o=>K())},$(i.mode==="new"?"Create":"Edit"),1)])])])],512)}}}),$e={class:"modal modal-blur fade",id:"deleteEventListener",tabindex:"-1","aria-hidden":"true"},Pe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Fe={class:"modal-content"},Ue={class:"modal-body py-4"},We={class:"modal-footer"},Se=M({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(r,{emit:_}){const s=B(),f=r,v=_,k=async()=>{const{data:i}=await pe(f.eventListenerIdx);i?s.success("Deleted successfully."):s.error("Failed to delete."),v("get-event-listener-list")};return(i,c)=>(w(),y("div",$e,[n("div",Pe,[n("div",Fe,[c[2]||(c[2]=n("div",{class:"modal-status bg-danger"},null,-1)),c[3]||(c[3]=n("div",{class:"modal-header"},[n("h3",{class:"modal-title"},"Delete Event Listener"),n("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),n("div",Ue,[n("h4",null,"Are you sure you want to delete "+$(f.eventListenerName)+"?",1)]),n("div",We,[c[1]||(c[1]=n("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),n("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:c[0]||(c[0]=C=>k())},"Delete")])])])]))}}),Me={class:"card card-flush w-100"},Be={class:"card-body"},Re={class:"event-listener-table"},je=M({__name:"EventListenerList",setup(r){const _=B(),s=d([]),f=d([]);T(async()=>{C(),await v()});const v=async()=>{try{const{data:u}=await ce();s.value=u,s.value.forEach(l=>{l.eventListenerUrl=k(l.eventListenerCallUrl)})}catch(u){console.log(u),_.error("Failed to load data.")}},k=u=>window.location.origin+u,i=d(0),c=d(""),C=()=>{f.value=[{title:"Event Listener Name",field:"eventListenerName",minWidth:190,widthGrow:1.4,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Connect Workflow Name",field:"workflowName",minWidth:220,widthGrow:1.6,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Event Listener Desc",field:"eventListenerDesc",minWidth:220,widthGrow:1.8,cssClass:"event-listener-text-cell",variableHeight:!0},{title:"Action URL",field:"eventListenerUrl",minWidth:260,widthGrow:2.2,cssClass:"event-listener-url-cell",variableHeight:!0},{title:"Action",minWidth:180,widthGrow:1,formatter:a,cssClass:"event-listener-action-cell",headerSort:!1,variableHeight:!0,cellClick:async function(u,l){const b=u.target,h=b==null?void 0:b.getAttribute("id");i.value=l.getRow().getData().eventListenerIdx,h==="edit-btn"?(p.value="edit",await E("eventListenerForm")):h==="delete-btn"&&(c.value=l.getRow().getData().eventListenerName,await E("deleteEventListener"))}}]},E=async u=>{await re();const l=document.getElementById(u);l&&Y.getOrCreateInstance(l).show()},a=()=>`
+
+ Edit
+ Delete
+
`,p=d("new"),g=async()=>{i.value=0,p.value="new",await E("eventListenerForm")};return(u,l)=>(w(),y("div",null,[D(Z,{"header-title":"Event Listener","new-btn-title":"New Event Listener","popup-flag":!1,"popup-target":"",class:"mb-3",onClickNewBtn:g}),n("div",Me,[n("div",Be,[n("div",Re,[D(ee,{columns:f.value,"table-data":s.value},null,8,["columns","table-data"])])])]),D(De,{style:{width:"100%"},mode:p.value,"event-listener-idx":i.value,onGetEventListenerList:v},null,8,["mode","event-listener-idx"]),D(Se,{"event-listener-name":c.value,"event-listener-idx":i.value,onGetEventListenerList:v},null,8,["event-listener-name","event-listener-idx"])]))}});export{je as default};
diff --git a/src/main/resources/static/assets/OssList-D1_cdyaa.js b/src/main/resources/static/assets/OssList-DGiiI3mx.js
similarity index 97%
rename from src/main/resources/static/assets/OssList-D1_cdyaa.js
rename to src/main/resources/static/assets/OssList-DGiiI3mx.js
index ca7fad2..9ec72c8 100644
--- a/src/main/resources/static/assets/OssList-D1_cdyaa.js
+++ b/src/main/resources/static/assets/OssList-DGiiI3mx.js
@@ -1,4 +1,4 @@
-import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js";import{_ as q}from"./request-txnOTK5f.js";import{g as M,a as G,b as z,d as W,o as j,r as H,u as J,c as K,e as Q}from"./oss-Be13WU3l.js";import{d as D,u as I,w as T,o as N,M as X,r as i,c as v,a as e,t as C,b as g,v as Y,F as Z,e as ss,f as h,g as p,h as es,i as k}from"./index-CtQCsPEr.js";const ts={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},os={class:"modal-content"},as={class:"modal-header"},ls={class:"modal-title"},ns={class:"modal-body py-4"},rs={class:"mb-3"},is={class:"grid gap-0 column-gap-3"},ds=["value"],cs={class:"row mb-3"},us={class:"mb-3"},ms={class:"mb-3"},vs={class:"row"},ps={class:"col"},bs={class:"col"},fs={class:"col mt-4 row"},ys={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},ws={class:"modal-footer"},Ss=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=i(),u=i(),n=_,f=w,r=es(()=>n.ossIdx);T(r,async()=>{await b()}),T(()=>n.mode,async()=>{await m(n.mode)}),N(async()=>{c.value&&(u.value=new X(c.value)),await m("init"),await b()});const t=i({}),b=async()=>{if(n.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,y.value=!1;else{const{data:a}=await M(n.ossIdx);t.value=a,t.value.ossPassword=A(t.value.ossPassword),d.value=!0,y.value=!0}},S=i([]),m=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await G();S.value=s}else{const{data:s}=await z();S.value=s}}catch(s){console.log(s)}},O=()=>{t.value.ossPassword="",y.value=!1},d=i(!1),x=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await W(a);s?o.error("This name is already in use."):(o.success("This name is available."),d.value=!0)},y=i(!1),L=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:P(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await j(a);s?(o.success("This OSS connection is available."),y.value=!0):o.error("This OSS connection is not available.")},F=()=>{d.value=!1},U=()=>{y.value=!1},E=async()=>{if(!t.value.ossTypeIdx||t.value.ossTypeIdx===0){o.error("Please select OSS Type.");return}if(!t.value.ossName){o.error("Please enter OSS Name.");return}if(!t.value.ossDesc){o.error("Please enter OSS Description.");return}if(!t.value.ossUrl){o.error("Please enter URL.");return}if(!t.value.ossUsername){o.error("Please enter OSS ID.");return}if(!t.value.ossPassword){o.error("Please enter OSS Password.");return}if(!d.value){o.error("Please perform duplicate check.");return}if(!y.value){o.error("Please perform connection check.");return}t.value.ossPassword=P(t.value.ossPassword);let a=!1;n.mode==="new"?a=await $():a=await R(),a&&(f("get-oss-list"),b(),u.value&&(u.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const s=document.querySelector(".modal-backdrop");s==null||s.remove()},150)))},$=async()=>{try{const{data:a}=await H(t.value);return a?(o.success("Regist SUCCESS."),!0):(o.error("Regist FAIL."),!1)}catch{return o.error("Regist FAIL."),!1}},R=async()=>{try{const{data:a}=await J(t.value);return a?(o.success("Update SUCCESS."),!0):(o.error("Update FAIL."),!1)}catch{return o.error("Update FAIL."),!1}},P=a=>btoa(a),A=a=>atob(a);return(a,s)=>(p(),v("div",{class:"modal modal-blur fade",id:"ossForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",ts,[e("div",os,[e("div",as,[e("h3",ls,C(n.mode==="new"?"New":"Edit")+" OSS",1),s[8]||(s[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",ns,[e("div",null,[e("div",rs,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",is,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[9]||(s[9]=e("option",{value:0},"Select OSS Type",-1)),(p(!0),v(Z,null,ss(S.value,(l,B)=>(p(),v("option",{value:l.ossTypeIdx,key:B},C(l.ossTypeName),9,ds))),128))],512),[[Y,t.value.ossTypeIdx]])])]),e("div",cs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Name",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:F},null,544),[[h,t.value.ossName]])]),e("div",us,[s[12]||(s[12]=e("label",{class:"form-label"},"OSS Description",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[h,t.value.ossDesc]])]),e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"URL",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:U},null,544),[[h,t.value.ossUrl]])]),e("div",vs,[e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS ID",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:U},null,544),[[h,t.value.ossUsername]])]),e("div",bs,[s[15]||(s[15]=e("label",{class:"form-label required"},"OSS PW",-1)),g(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:O,onFocus:U},null,544),[[h,t.value.ossPassword]])]),e("div",fs,[d.value?(p(),v("button",ys,"Duplicate Check")):(p(),v("button",{key:0,class:"btn btn-primary col",onClick:x,style:{"margin-right":"3px"}},"Duplicate Check")),y.value?(p(),v("button",gs,"Connection Check")):(p(),v("button",{key:2,class:"btn btn-primary col",onClick:L},"Connection Check"))])])])]),e("div",ws,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>b())}," Cancel "),e("button",{type:"button",ref:"submitBtn",class:"btn btn-primary ms-auto",onClick:s[7]||(s[7]=l=>E())},C(n.mode==="new"?"Regist":"Edit"),513)])])])],512))}}),Os={class:"modal modal-blur fade",id:"deleteOss",tabindex:"-1","aria-hidden":"true"},hs={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},_s={class:"modal-content"},ks={class:"modal-body py-4"},Cs={class:"modal-footer"},xs=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=_,u=w,n=async()=>{const{data:f}=await K(c.ossIdx);f?o.success("Deleted successfully."):o.error("Failed to delete."),u("get-oss-list")};return(f,r)=>(p(),v("div",Os,[e("div",hs,[e("div",_s,[r[2]||(r[2]=e("div",{class:"modal-status bg-danger"},null,-1)),r[3]||(r[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete OSS"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",ks,[e("h4",null,"Are you sure you want to delete "+C(c.ossName)+"?",1)]),e("div",Cs,[r[1]||(r[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:r[0]||(r[0]=t=>n())}," Delete ")])])])]))}}),Us={class:"card card-flush w-100"},Ds={class:"card-body table-responsive"},Ls=D({__name:"OssList",setup(_){const w=I(),o=i([]),c=i([]);N(async()=>{r(),await u()});const u=async()=>{try{const{data:m}=await Q();o.value=m}catch(m){console.log(m),w.error("Failed to load data.")}},n=i(0),f=i(""),r=()=>{c.value=[{title:"OSS Name",field:"ossName",width:"25%"},{title:"OSS Desc",field:"ossDesc",width:"25%"},{title:"URL",field:"ossUrl",width:"25%"},{title:"Action",hozAlign:"center",width:"25%",formatter:t,cellClick:function(m,O){const d=m.target,x=d==null?void 0:d.getAttribute("id");n.value=O.getRow().getData().ossIdx,x==="edit-btn"?b.value="edit":f.value=O.getRow().getData().ossName}}]},t=()=>`
+import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js";import{_ as q}from"./request-DPzMytGP.js";import{g as M,a as G,b as z,d as W,o as j,r as H,u as J,c as K,e as Q}from"./oss-BcA1Ys4Q.js";import{d as D,u as I,w as T,o as N,M as X,r as i,c as v,a as e,t as C,b as g,v as Y,F as Z,e as ss,f as h,g as p,h as es,i as k}from"./index-Woncnlsa.js";const ts={class:"modal-dialog modal-xl modal-dialog-centered",role:"document"},os={class:"modal-content"},as={class:"modal-header"},ls={class:"modal-title"},ns={class:"modal-body py-4"},rs={class:"mb-3"},is={class:"grid gap-0 column-gap-3"},ds=["value"],cs={class:"row mb-3"},us={class:"mb-3"},ms={class:"mb-3"},vs={class:"row"},ps={class:"col"},bs={class:"col"},fs={class:"col mt-4 row"},ys={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},ws={class:"modal-footer"},Ss=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=i(),u=i(),n=_,f=w,r=es(()=>n.ossIdx);T(r,async()=>{await b()}),T(()=>n.mode,async()=>{await m(n.mode)}),N(async()=>{c.value&&(u.value=new X(c.value)),await m("init"),await b()});const t=i({}),b=async()=>{if(n.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,y.value=!1;else{const{data:a}=await M(n.ossIdx);t.value=a,t.value.ossPassword=A(t.value.ossPassword),d.value=!0,y.value=!0}},S=i([]),m=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await G();S.value=s}else{const{data:s}=await z();S.value=s}}catch(s){console.log(s)}},O=()=>{t.value.ossPassword="",y.value=!1},d=i(!1),x=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await W(a);s?o.error("This name is already in use."):(o.success("This name is available."),d.value=!0)},y=i(!1),L=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:P(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await j(a);s?(o.success("This OSS connection is available."),y.value=!0):o.error("This OSS connection is not available.")},F=()=>{d.value=!1},U=()=>{y.value=!1},E=async()=>{if(!t.value.ossTypeIdx||t.value.ossTypeIdx===0){o.error("Please select OSS Type.");return}if(!t.value.ossName){o.error("Please enter OSS Name.");return}if(!t.value.ossDesc){o.error("Please enter OSS Description.");return}if(!t.value.ossUrl){o.error("Please enter URL.");return}if(!t.value.ossUsername){o.error("Please enter OSS ID.");return}if(!t.value.ossPassword){o.error("Please enter OSS Password.");return}if(!d.value){o.error("Please perform duplicate check.");return}if(!y.value){o.error("Please perform connection check.");return}t.value.ossPassword=P(t.value.ossPassword);let a=!1;n.mode==="new"?a=await $():a=await R(),a&&(f("get-oss-list"),b(),u.value&&(u.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const s=document.querySelector(".modal-backdrop");s==null||s.remove()},150)))},$=async()=>{try{const{data:a}=await H(t.value);return a?(o.success("Regist SUCCESS."),!0):(o.error("Regist FAIL."),!1)}catch{return o.error("Regist FAIL."),!1}},R=async()=>{try{const{data:a}=await J(t.value);return a?(o.success("Update SUCCESS."),!0):(o.error("Update FAIL."),!1)}catch{return o.error("Update FAIL."),!1}},P=a=>btoa(a),A=a=>atob(a);return(a,s)=>(p(),v("div",{class:"modal modal-blur fade",id:"ossForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",ts,[e("div",os,[e("div",as,[e("h3",ls,C(n.mode==="new"?"New":"Edit")+" OSS",1),s[8]||(s[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",ns,[e("div",null,[e("div",rs,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",is,[g(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[9]||(s[9]=e("option",{value:0},"Select OSS Type",-1)),(p(!0),v(Z,null,ss(S.value,(l,B)=>(p(),v("option",{value:l.ossTypeIdx,key:B},C(l.ossTypeName),9,ds))),128))],512),[[Y,t.value.ossTypeIdx]])])]),e("div",cs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Name",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:F},null,544),[[h,t.value.ossName]])]),e("div",us,[s[12]||(s[12]=e("label",{class:"form-label"},"OSS Description",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[h,t.value.ossDesc]])]),e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"URL",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:U},null,544),[[h,t.value.ossUrl]])]),e("div",vs,[e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS ID",-1)),g(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:U},null,544),[[h,t.value.ossUsername]])]),e("div",bs,[s[15]||(s[15]=e("label",{class:"form-label required"},"OSS PW",-1)),g(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:O,onFocus:U},null,544),[[h,t.value.ossPassword]])]),e("div",fs,[d.value?(p(),v("button",ys,"Duplicate Check")):(p(),v("button",{key:0,class:"btn btn-primary col",onClick:x,style:{"margin-right":"3px"}},"Duplicate Check")),y.value?(p(),v("button",gs,"Connection Check")):(p(),v("button",{key:2,class:"btn btn-primary col",onClick:L},"Connection Check"))])])])]),e("div",ws,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>b())}," Cancel "),e("button",{type:"button",ref:"submitBtn",class:"btn btn-primary ms-auto",onClick:s[7]||(s[7]=l=>E())},C(n.mode==="new"?"Regist":"Edit"),513)])])])],512))}}),Os={class:"modal modal-blur fade",id:"deleteOss",tabindex:"-1","aria-hidden":"true"},hs={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},_s={class:"modal-content"},ks={class:"modal-body py-4"},Cs={class:"modal-footer"},xs=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(_,{emit:w}){const o=I(),c=_,u=w,n=async()=>{const{data:f}=await K(c.ossIdx);f?o.success("Deleted successfully."):o.error("Failed to delete."),u("get-oss-list")};return(f,r)=>(p(),v("div",Os,[e("div",hs,[e("div",_s,[r[2]||(r[2]=e("div",{class:"modal-status bg-danger"},null,-1)),r[3]||(r[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete OSS"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",ks,[e("h4",null,"Are you sure you want to delete "+C(c.ossName)+"?",1)]),e("div",Cs,[r[1]||(r[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:r[0]||(r[0]=t=>n())}," Delete ")])])])]))}}),Us={class:"card card-flush w-100"},Ds={class:"card-body table-responsive"},Ls=D({__name:"OssList",setup(_){const w=I(),o=i([]),c=i([]);N(async()=>{r(),await u()});const u=async()=>{try{const{data:m}=await Q();o.value=m}catch(m){console.log(m),w.error("Failed to load data.")}},n=i(0),f=i(""),r=()=>{c.value=[{title:"OSS Name",field:"ossName",width:"25%"},{title:"OSS Desc",field:"ossDesc",width:"25%"},{title:"URL",field:"ossUrl",width:"25%"},{title:"Action",hozAlign:"center",width:"25%",formatter:t,cellClick:function(m,O){const d=m.target,x=d==null?void 0:d.getAttribute("id");n.value=O.getRow().getData().ossIdx,x==="edit-btn"?b.value="edit":f.value=O.getRow().getData().ossName}}]},t=()=>`
p.get(`/eventlistener/workflowList/${a}`);function ut(a){return p.get(`/workflow/name/duplicate?workflowName=${encodeURIComponent(a)}`)}function it(a){return p.get(`/workflow/template/${a}`)}function ct(){return p.get("/workflow/workflowStageList")}function mt(a,E){return p.get(`/eventlistener/workflowDetail/${a}/${E}`)}function pt(a){return p.post("/workflow",a)}function dt(a){return p.patch(`/workflow/${a.workflowInfo.workflowIdx}`,a)}function _t(a){return p.delete(`/workflow/${a}`)}function Et(a){return p.post("/workflow/run",a)}function St(a){return p.get(`/workflow/existEventListener/${a}`)}function ft(a){return p.get(`/workflow/log/${a}`)}function It(a){return p.get(`/workflow/runHistory/${a}`)}function vt(a){return p.get(`/workflow/stageHistory/${a.workflowIdx}?buildIdx=${a.buildName}&nodeIdx=${a.stageIdx}`)}const Re={key:0,class:"param-form mt-5 mb-5"},ye={class:"param-toolbar"},Ce={class:"text-muted small"},Oe={class:"param-toolbar-actions"},Pe={class:"param-search"},ge={class:"form-check form-switch param-switch"},he={id:"workflow-param-key-options"},be=["value"],De={key:0,class:"param-empty"},Le={class:"param-section-header"},Me={class:"param-section-title"},ke={class:"badge bg-secondary-lt text-secondary"},Ke={class:"param-row-list"},Ue={class:"param-key-area"},we={key:0,class:"param-key-readonly"},Ve={class:"param-label"},Be={key:1},Fe=["onUpdate:modelValue","onBlur"],He={key:2,class:"param-hint"},xe={class:"param-value-area"},Ge={key:0,class:"backup-file-upload"},$e={class:"input-group input-group-sm"},Ye=["onUpdate:modelValue"],Qe={class:"btn btn-outline-primary mb-0"},Xe=["onChange"],We=["onUpdate:modelValue"],ze=["type","onUpdate:modelValue"],Ze=["onClick"],je=oe({__name:"ParamForm",props:{popup:{type:Boolean},workflowParamData:{},eventListenerYn:{}},setup(a){const E=Se(),i=fe(),S=a,d=v(()=>S.workflowParamData),f=g(""),T=g(!1),I=g(!1),b=g(!1),B=["MCI","CLUSTER","NAMESPACE"],D=["TUMBLEBUG_SELECTOR_YN"],L=["PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID"],Z=["SCHEMA_SQL_CONTENT","INSERT_SQL","VERIFY_SQL","KUBECONFIG_CONTENT","K8S_MANIFEST","HTTP_BODY","NOTIFICATION_PAYLOAD","SCRIPT_CONTENT"],K=["PASSWORD","USERPASS","SECRET","TOKEN","PRIVATE_KEY","SSH_PRIVATE_KEY"],F=["TUMBLEBUG","USER","USERPASS","ROOT_DISK_TYPE","ROOT_DISK_SIZE","INSTALL_MON_AGENT","POLICY_ON_PARTIAL_FAILURE","INFRA_ACCESS_INFO_MAX_ATTEMPTS","INFRA_ACCESS_INFO_INTERVAL_SECONDS","K8S_NODEGROUP_CREATE_IF_MISSING","K8S_STATUS_MAX_ATTEMPTS","K8S_STATUS_INTERVAL_SECONDS","K8S_READY_STATUS","K8S_KUBECONFIG_MAX_ATTEMPTS","K8S_KUBECONFIG_INTERVAL_SECONDS","K8S_API_READY_MAX_ATTEMPTS","K8S_API_READY_INTERVAL_SECONDS","K8S_NODE_READY_MIN_COUNT","ROLLOUT_TIMEOUT"],U=[{key:"infra",title:"Infra",keys:["NAMESPACE","PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID","INFRA_ID","INFRA_ID_LIST","INFRA_PREFIX","INFRA_DELETE_OPTION","INFRA_NODEGROUP_NAME","INFRA_NODEGROUP_PREFIX","INFRA_NODEGROUP_SIZE","SSH_HOST","SSH_USER","SSH_KEY_FILE"]},{key:"k8s",title:"K8s",keys:["K8S_CLUSTER_ID","CLUSTER_PREFIX","K8S_NODEGROUP_NAME","K8S_NODEGROUP_PREFIX","K8S_VERSION","K8S_DESIRED_NODE_SIZE","K8S_MIN_NODE_SIZE","K8S_MAX_NODE_SIZE","K8S_CREATE_OPTION","K8S_NODEGROUP_CREATE_IF_MISSING","KUBECONFIG_CONTENT","KUBE_NAMESPACE","DEPLOYMENT_NAME","DB_POD_SELECTOR"]},{key:"db",title:"Database",keys:["DB_EXEC_MODE","DB_HOST","DB_PORT","DB_NAME","DB_USER","DB_PASSWORD","RELEASE_NAME","HELM_REPO_NAME","HELM_REPO_URL","HELM_CHART","HELM_CHART_VERSION","HELM_RECREATE_ON_IMMUTABLE_ERROR","HELM_VALUES_ARGS"]},{key:"data",title:"Data",keys:["DB_BACKUP_FILE","SCHEMA_SQL_FILE","SCHEMA_SQL_CONTENT","INSERT_SQL","VERIFY_SQL","K8S_MANIFEST"]},{key:"multi",title:"Multi CSP",prefixes:["AWS_","AZURE_","GCP_","NCP_","NHN_","ALIBABA_","TENCENT_","IBM_","KT_"],keys:["CSP_LIST"]},{key:"advanced",title:"Advanced",keys:F},{key:"custom",title:"Custom",keys:[]}],H={TUMBLEBUG:"Tumblebug URL",USER:"Tumblebug User",USERPASS:"Tumblebug Password",NAMESPACE:"Namespace",PROVIDER:"Provider",CSP:"CSP",REGION:"Region",CONNECTION_NAME:"Connection Config",ZONE:"Zone",IMAGE:"Image",IMAGE_ID:"Image ID",SPEC:"VM/K8s Spec",SPEC_ID:"Spec ID",INFRA_ID:"Infra ID",INFRA_ID_LIST:"Infra ID List",INFRA_PREFIX:"Infra Prefix",INFRA_NODEGROUP_NAME:"Node Group",INFRA_NODEGROUP_PREFIX:"Node Group Prefix",SSH_HOST:"SSH Host",SSH_USER:"SSH User",SSH_KEY_FILE:"SSH Key File",K8S_CLUSTER_ID:"Cluster ID",K8S_NODEGROUP_NAME:"Node Group",K8S_NODEGROUP_CREATE_IF_MISSING:"Create Missing Node Group",K8S_API_READY_MAX_ATTEMPTS:"API Ready Attempts",K8S_API_READY_INTERVAL_SECONDS:"API Ready Interval",K8S_NODE_READY_MIN_COUNT:"Ready Node Count",K8S_STATUS_MAX_ATTEMPTS:"Cluster Status Attempts",K8S_STATUS_INTERVAL_SECONDS:"Cluster Status Interval",K8S_READY_STATUS:"Cluster Ready Status",K8S_KUBECONFIG_MAX_ATTEMPTS:"Kubeconfig Attempts",K8S_KUBECONFIG_INTERVAL_SECONDS:"Kubeconfig Interval",KUBECONFIG_CONTENT:"Kubeconfig",KUBE_NAMESPACE:"K8s Namespace",DB_EXEC_MODE:"DB Execute Mode",DB_HOST:"DB Host",DB_PORT:"DB Port",DB_NAME:"DB Name",DB_USER:"DB User",DB_PASSWORD:"DB Password",DB_BACKUP_FILE:"Backup File",SCHEMA_SQL_FILE:"Schema File",SCHEMA_SQL_CONTENT:"Schema SQL",INSERT_SQL:"Insert SQL",VERIFY_SQL:"Verify SQL",HELM_REPO_NAME:"Helm Repo Name",HELM_REPO_URL:"Helm Repo URL",HELM_CHART:"Helm Chart",HELM_CHART_VERSION:"Helm Chart Version",HELM_RECREATE_ON_IMMUTABLE_ERROR:"Recreate on Immutable Error",HELM_VALUES_ARGS:"Helm Values",RELEASE_NAME:"Release Name",CSP_LIST:"CSP List",INFRA_DELETE_OPTION:"Delete Option"},j={REGION:"Selected from mc-infra-manager.",IMAGE_ID:"Image resource ID used by Tumblebug.",SPEC_ID:"Spec resource ID used by Tumblebug.",INFRA_ID:"Target or new infra name.",INFRA_ID_LIST:"Optional comma separated infra IDs. Overrides CSP List and Infra Prefix.",INFRA_NODEGROUP_PREFIX:"Used to create CSP-specific node group names, such as ng-aws.",INFRA_DELETE_OPTION:"Tumblebug infra delete option.",SSH_HOST:"Used for SSH based stages.",DB_HOST:"MariaDB host or service address.",DB_EXEC_MODE:"auto, ssh, or k8s.",DB_BACKUP_FILE:"Upload a SQL backup file. The file name is used as DB_BACKUP_FILE.",SCHEMA_SQL_CONTENT:"Inline schema SQL.",INSERT_SQL:"SQL executed after import.",KUBECONFIG_CONTENT:"Inline kubeconfig.",CSP_LIST:"Comma separated CSP list.",OBJECT_STORAGE_BUCKET:"Bucket name. Existing one is reused, a new name is created by the run. Empty means no object storage.",OBJECT_STORAGE_NAMESPACE:"Tumblebug namespace that owns the bucket. Follows the Namespace selected above.",OBJECT_STORAGE_PROVIDER:"Leave empty to follow the selected CSP.",OBJECT_STORAGE_REGION:"Leave empty to follow the selected Region.",PRESIGNED_URL_EXPIRES:"Lifetime in seconds for URLs cached and automatically refreshed by the local Object Storage broker.",JUPYTER_ALLOWED_CIDR:"Public IPv4 address or IPv4 CIDR allowed to access Jupyter. single IP is converted to /32.",JUPYTER_PORT:"Host port opened in the Tumblebug security group and mapped to Jupyter."},x=v(()=>{const t=new Set;return U.forEach(e=>{var n;(n=e.keys)==null||n.forEach(s=>t.add(s))}),d.value.forEach(e=>{const n=o(e.paramKey);n&&!y(n)&&t.add(n)}),Array.from(t).filter(e=>!y(e)).sort()}),w=v(()=>d.value.map((t,e)=>{const n=o(t.paramKey);return{index:e,param:t,normalizedKey:n,sectionKey:ce(n),isAdvanced:ie(n)}}).filter(t=>!y(t.normalizedKey))),h=v(()=>{const t=f.value.trim().toUpperCase();return w.value.filter(e=>{const n=e.param.paramValue||"",s=ne(e.normalizedKey),_=!t||e.normalizedKey.includes(t)||n.toUpperCase().includes(t)||s.toUpperCase().includes(t),P=!T.value||ae(e.param),V=I.value||!e.isAdvanced||!!t||T.value;return _&&P&&V})}),O=v(()=>U.map(t=>({key:t.key,title:t.title,rows:h.value.filter(e=>e.sectionKey===t.key)})).filter(t=>t.rows.length>0)),G=v(()=>O.value.reduce((t,e)=>t+e.rows.length,0)),$=v(()=>w.value.filter(t=>t.isAdvanced).length),J=v(()=>w.value.filter(t=>te(t.normalizedKey)).length);Ie(()=>{r()});const r=()=>{d.value.length===0&&d.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:S.eventListenerYn})},u=t=>{const e=d.value[t];e.paramKey=o(e.paramKey),e.paramKey==="NAMESPACE"?e.paramValue=i.projectInfo.ns_id:e.paramKey==="MCI"?e.paramValue=i.projectInfo.mci_id:e.paramKey==="CLUSTER"&&(e.paramValue=i.projectInfo.cluster_id)},o=t=>(t||"").trim().toUpperCase(),N=v(()=>{var e;const t=(e=d.value.find(n=>o(n.paramKey)==="TUMBLEBUG_SELECTOR_YN"))==null?void 0:e.paramValue;return["N","NO","FALSE","0"].includes(String(t||"").trim().toUpperCase())}),y=t=>{const e=o(t);return D.includes(e)?!0:N.value?L.includes(e)?!0:L.some(n=>e.endsWith(`_${n}`)):!1},ee=t=>B.includes(o(t)),M=t=>Z.includes(o(t)),ue=t=>o(t)==="DB_BACKUP_FILE",te=t=>{const e=o(t);return K.some(n=>e.includes(n))},ae=t=>{var e;return!((e=t.paramKey)!=null&&e.trim())||!String(t.paramValue??"").trim()},ie=t=>{const e=o(t);return F.includes(e)||e.endsWith("_MAX_ATTEMPTS")||e.endsWith("_INTERVAL_SECONDS")||e.includes("TIMEOUT")},ce=t=>{const e=o(t);if(!e)return"custom";const n=U.find(s=>{var _,P;return s.key!=="custom"&&(((_=s.keys)==null?void 0:_.includes(e))||((P=s.prefixes)==null?void 0:P.some(V=>e.startsWith(V))))});return(n==null?void 0:n.key)||"custom"},ne=t=>{const e=o(t);return e?H[e]||e:"New Parameter"},se=t=>j[o(t)]||"",me=async(t,e)=>{var _;const n=t.target,s=(_=n.files)==null?void 0:_[0];if(s)try{const P=await pe(s),V=d.value[e];V.paramValue=s.name,de("SCHEMA_SQL_CONTENT",P),E.success(`${s.name} has been applied.`)}catch(P){console.log(P),E.error("Failed to read the file.")}finally{n.value=""}},pe=t=>new Promise((e,n)=>{const s=new FileReader;s.onload=()=>e(String(s.result||"")),s.onerror=()=>n(s.error),s.readAsText(t)}),de=(t,e)=>{const n=o(t),s=d.value.find(_=>o(_.paramKey)===n);if(s){s.paramValue=e;return}d.value.push({paramIdx:0,paramKey:n,paramValue:e,eventListenerYn:S.eventListenerYn})},_e=()=>{d.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:S.eventListenerYn}),I.value=!0},Ee=t=>{d.value.length!==1?d.value.splice(t,1):E.error("This field can be left empty.")};return(t,e)=>d.value?(m(),c("div",Re,[l("div",ye,[l("div",null,[e[4]||(e[4]=l("label",{class:"form-label mb-1"},"Parameters",-1)),l("div",Ce,A(G.value)+" / "+A(d.value.length),1)]),l("div",Oe,[l("div",Pe,[k(l("input",{class:"form-control form-control-sm",type:"search",placeholder:"Search","onUpdate:modelValue":e[0]||(e[0]=n=>f.value=n)},null,512),[[Y,f.value]])]),l("label",ge,[k(l("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=n=>T.value=n)},null,512),[[ve,T.value]]),e[5]||(e[5]=l("span",{class:"form-check-label"},"Empty",-1))]),$.value>0?(m(),c("button",{key:0,class:"btn btn-outline-secondary btn-sm",type:"button",onClick:e[2]||(e[2]=n=>I.value=!I.value)},A(I.value?"Hide Advanced":`Advanced ${$.value}`),1)):C("",!0),J.value>0?(m(),c("button",{key:1,class:"btn btn-outline-secondary btn-sm",type:"button",onClick:e[3]||(e[3]=n=>b.value=!b.value)},A(b.value?"Hide Secret":"Show Secret"),1)):C("",!0),S.popup?C("",!0):(m(),c("button",{key:2,class:"btn btn-primary btn-sm",type:"button",onClick:_e}," Add "))])]),l("datalist",he,[(m(!0),c(W,null,z(x.value,n=>(m(),c("option",{key:n,value:n},null,8,be))),128))]),O.value.length===0?(m(),c("div",De," No parameters ")):C("",!0),(m(!0),c(W,null,z(O.value,n=>(m(),c("div",{key:n.key,class:"param-section"},[l("div",Le,[l("div",Me,[l("span",{class:q(["param-section-dot",`param-section-dot-${n.key}`])},null,2),re(" "+A(n.title),1)]),l("span",ke,A(n.rows.length),1)]),l("div",Ke,[(m(!0),c(W,null,z(n.rows,s=>(m(),c("div",{key:`${s.index}-${s.param.paramKey}`,class:q(["param-row",{"param-row-empty":ae(s.param)}])},[l("div",Ue,[S.popup||ee(s.param.paramKey)?(m(),c("div",we,[l("span",Ve,A(ne(s.param.paramKey)),1),l("code",null,A(o(s.param.paramKey)||"PARAM_KEY"),1)])):(m(),c("div",Be,[e[6]||(e[6]=l("label",{class:"form-label small mb-1"},"Key",-1)),k(l("input",{class:"form-control form-control-sm param-key-input",type:"text",list:"workflow-param-key-options",placeholder:"PARAM_KEY","onUpdate:modelValue":_=>s.param.paramKey=_,onBlur:_=>u(s.index)},null,40,Fe),[[Y,s.param.paramKey]])])),se(s.param.paramKey)?(m(),c("div",He,A(se(s.param.paramKey)),1)):C("",!0)]),l("div",xe,[e[9]||(e[9]=l("label",{class:"form-label small mb-1"},"Value",-1)),ue(s.param.paramKey)?(m(),c("div",Ge,[l("div",$e,[k(l("input",{class:"form-control param-value-input",type:"text",placeholder:"schema.sql","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,Ye),[[Y,s.param.paramValue]]),l("label",Qe,[e[7]||(e[7]=re(" Upload ",-1)),l("input",{class:"d-none",type:"file",accept:".sql,.txt,.dump,.backup,.bak",onChange:_=>me(_,s.index)},null,40,Xe)])]),e[8]||(e[8]=l("div",{class:"param-hint"}," Uploaded file content is applied to SCHEMA_SQL_CONTENT. ",-1))])):M(s.param.paramKey)?k((m(),c("textarea",{key:1,class:"form-control form-control-sm param-value-input param-value-code",placeholder:"Value",rows:"4","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,We)),[[Y,s.param.paramValue]]):k((m(),c("input",{key:2,class:"form-control form-control-sm param-value-input",type:te(s.param.paramKey)&&!b.value?"password":"text",placeholder:"Value","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,ze)),[[Te,s.param.paramValue]])]),S.popup?C("",!0):(m(),c("button",{key:0,class:"btn btn-outline-danger btn-icon param-remove-btn",type:"button","aria-label":"Remove parameter",onClick:_=>Ee(s.index)},[...e[10]||(e[10]=[Ne(' ',1)])],8,Ze))],2))),128))])]))),128))])):C("",!0)}}),Tt=le(je,[["__scopeId","data-v-11b3faef"]]),R=a=>{const E=new URLSearchParams;Object.entries(a||{}).forEach(([S,d])=>{d!==void 0&&d!==""&&E.append(S,String(d))});const i=E.toString();return i?`?${i}`:""},Nt=(a,E)=>p.get(`/infra-manager/providers/${encodeURIComponent(a)}/regions${R(E)}`),At=a=>p.get(`/infra-manager/providers${R(a)}`),Rt=a=>p.get(`/infra-manager/namespaces${R(a)}`),yt=a=>p.get(`/infra-manager/conn-configs${R(a)}`),Ct=a=>p.get(`/infra-manager/available-zones${R(a)}`),Ot=a=>p.get(`/infra-manager/k8s-versions${R(a)}`),Pt=(a,E,i)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/resources/${E}${R(i)}`),gt=(a,E,i)=>p.post(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra-dynamic-review${R(i)}`,E),ht=(a,E)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra${R(E)}`),bt=(a,E,i)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra/${encodeURIComponent(E)}${R(i)}`),Je={class:"searchable-select"},qe=["placeholder","title","value","onKeydown"],et={key:0,class:"searchable-select-menu"},tt=["title","onMousedown"],at={key:0,class:"searchable-select-empty"},nt=oe({__name:"SearchableSelect",props:{modelValue:{default:""},options:{default:()=>[]},placeholder:{default:""},title:{default:""},allowCustom:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(a,{emit:E}){const i=a,S=E,d=g(),f=g(""),T=g(!1),I=g(0),b=v(()=>i.options.find(r=>r.value===i.modelValue)),B=v(()=>{var r;return((r=b.value)==null?void 0:r.label)||i.modelValue||""}),D=v(()=>{const r=h(f.value),u=i.options||[];return(r?u.filter(N=>$(N,r)):u).slice(0,80)}),L=()=>{f.value=B.value};Ae(()=>[i.modelValue,i.options],()=>{L()},{immediate:!0});const Z=r=>{f.value=r.target.value,I.value=0,K()},K=()=>{T.value=!0},F=()=>{T.value=!1,L()},U=()=>{window.setTimeout(()=>{w(),T.value=!1},120)},H=r=>{if(!T.value){K();return}const u=D.value.length;u!==0&&(I.value=(I.value+r+u)%u)},j=()=>{const r=D.value[I.value];r&&x(r)},x=r=>{var u;S("update:modelValue",r.value),f.value=r.label,T.value=!1,I.value=0,(u=d.value)==null||u.blur(),S("change")},w=()=>{const r=f.value.trim();if(!r){i.modelValue&&(S("update:modelValue",""),S("change"));return}const u=i.options.find(o=>J(o,r));if(u){u.value!==i.modelValue&&(S("update:modelValue",u.value),S("change")),f.value=u.label;return}if(i.allowCustom){r!==i.modelValue&&(S("update:modelValue",r),S("change")),f.value=r;return}L()},h=r=>(r||"").trim().toLowerCase(),O=r=>h(r).replace(/[^a-z0-9\uac00-\ud7a3]/g,""),G=r=>[r.label,r.value,r.searchText||""],$=(r,u)=>{const o=O(u);return G(r).some(N=>{const y=h(N);return y.includes(u)?!0:!!o&&O(y).includes(o)})},J=(r,u)=>{const o=h(u),N=O(u);return G(r).some(y=>h(y).split(/\n/).map(M=>M.trim()).filter(Boolean).some(M=>M===o||O(M)===N))};return(r,u)=>(m(),c("div",Je,[l("input",{ref_key:"inputRef",ref:d,class:"form-control p-2 searchable-select-input",placeholder:a.placeholder,title:a.title||B.value,value:f.value,autocomplete:"off",onBlur:U,onFocus:K,onInput:Z,onKeydown:[u[0]||(u[0]=Q(X(o=>H(1),["prevent"]),["down"])),Q(X(j,["prevent"]),["enter"]),Q(F,["esc"]),u[1]||(u[1]=Q(X(o=>H(-1),["prevent"]),["up"]))]},null,40,qe),T.value?(m(),c("div",et,[(m(!0),c(W,null,z(D.value,(o,N)=>(m(),c("button",{key:`${o.value}-${N}`,type:"button",class:q(["searchable-select-option",{active:N===I.value}]),title:o.label,onMousedown:X(y=>x(o),["prevent"])},A(o.label),43,tt))),128)),D.value.length===0?(m(),c("div",at," No matches ")):C("",!0)])):C("",!0)]))}}),Dt=le(nt,[["__scopeId","data-v-27c30426"]]);export{Tt as P,Dt as S,gt as a,Pt as b,ft as c,_t as d,St as e,lt as f,mt as g,ct as h,vt as i,It as j,At as k,Rt as l,Nt as m,yt as n,Ot as o,Ct as p,ht as q,Et as r,bt as s,ut as t,pt as u,dt as v,it as w};
+import{s as p}from"./request-DPzMytGP.js";import{d as oe,u as Se,l as fe,o as Ie,c,a as l,t as A,b as k,f as Y,J as ve,j as C,F as W,e as z,h as v,r as g,g as m,q,x as re,P as Te,Q as Ne,w as Ae,S as Q,O as X}from"./index-Woncnlsa.js";import{_ as le}from"./_plugin-vue_export-helper-DlAUqK2U.js";const lt=a=>p.get(`/eventlistener/workflowList/${a}`);function ut(a){return p.get(`/workflow/name/duplicate?workflowName=${encodeURIComponent(a)}`)}function it(a){return p.get(`/workflow/template/${a}`)}function ct(){return p.get("/workflow/workflowStageList")}function mt(a,E){return p.get(`/eventlistener/workflowDetail/${a}/${E}`)}function pt(a){return p.post("/workflow",a)}function dt(a){return p.patch(`/workflow/${a.workflowInfo.workflowIdx}`,a)}function _t(a){return p.delete(`/workflow/${a}`)}function Et(a){return p.post("/workflow/run",a)}function St(a){return p.get(`/workflow/existEventListener/${a}`)}function ft(a){return p.get(`/workflow/log/${a}`)}function It(a){return p.get(`/workflow/runHistory/${a}`)}function vt(a){return p.get(`/workflow/stageHistory/${a.workflowIdx}?buildIdx=${a.buildName}&nodeIdx=${a.stageIdx}`)}const Re={key:0,class:"param-form mt-5 mb-5"},ye={class:"param-toolbar"},Ce={class:"text-muted small"},Oe={class:"param-toolbar-actions"},Pe={class:"param-search"},ge={class:"form-check form-switch param-switch"},he={id:"workflow-param-key-options"},be=["value"],De={key:0,class:"param-empty"},Le={class:"param-section-header"},Me={class:"param-section-title"},ke={class:"badge bg-secondary-lt text-secondary"},Ke={class:"param-row-list"},Ue={class:"param-key-area"},we={key:0,class:"param-key-readonly"},Ve={class:"param-label"},Be={key:1},Fe=["onUpdate:modelValue","onBlur"],He={key:2,class:"param-hint"},xe={class:"param-value-area"},Ge={key:0,class:"backup-file-upload"},$e={class:"input-group input-group-sm"},Ye=["onUpdate:modelValue"],Qe={class:"btn btn-outline-primary mb-0"},Xe=["onChange"],We=["onUpdate:modelValue"],ze=["type","onUpdate:modelValue"],Ze=["onClick"],je=oe({__name:"ParamForm",props:{popup:{type:Boolean},workflowParamData:{},eventListenerYn:{}},setup(a){const E=Se(),i=fe(),S=a,d=v(()=>S.workflowParamData),f=g(""),T=g(!1),I=g(!1),b=g(!1),B=["MCI","CLUSTER","NAMESPACE"],D=["TUMBLEBUG_SELECTOR_YN"],L=["PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID"],Z=["SCHEMA_SQL_CONTENT","INSERT_SQL","VERIFY_SQL","KUBECONFIG_CONTENT","K8S_MANIFEST","HTTP_BODY","NOTIFICATION_PAYLOAD","SCRIPT_CONTENT"],K=["PASSWORD","USERPASS","SECRET","TOKEN","PRIVATE_KEY","SSH_PRIVATE_KEY"],F=["TUMBLEBUG","USER","USERPASS","ROOT_DISK_TYPE","ROOT_DISK_SIZE","INSTALL_MON_AGENT","POLICY_ON_PARTIAL_FAILURE","INFRA_ACCESS_INFO_MAX_ATTEMPTS","INFRA_ACCESS_INFO_INTERVAL_SECONDS","K8S_NODEGROUP_CREATE_IF_MISSING","K8S_STATUS_MAX_ATTEMPTS","K8S_STATUS_INTERVAL_SECONDS","K8S_READY_STATUS","K8S_KUBECONFIG_MAX_ATTEMPTS","K8S_KUBECONFIG_INTERVAL_SECONDS","K8S_API_READY_MAX_ATTEMPTS","K8S_API_READY_INTERVAL_SECONDS","K8S_NODE_READY_MIN_COUNT","ROLLOUT_TIMEOUT"],U=[{key:"infra",title:"Infra",keys:["NAMESPACE","PROVIDER","CSP","REGION","CONNECTION_NAME","ZONE","IMAGE","IMAGE_ID","SPEC","SPEC_ID","INFRA_ID","INFRA_ID_LIST","INFRA_PREFIX","INFRA_DELETE_OPTION","INFRA_NODEGROUP_NAME","INFRA_NODEGROUP_PREFIX","INFRA_NODEGROUP_SIZE","SSH_HOST","SSH_USER","SSH_KEY_FILE"]},{key:"k8s",title:"K8s",keys:["K8S_CLUSTER_ID","CLUSTER_PREFIX","K8S_NODEGROUP_NAME","K8S_NODEGROUP_PREFIX","K8S_VERSION","K8S_DESIRED_NODE_SIZE","K8S_MIN_NODE_SIZE","K8S_MAX_NODE_SIZE","K8S_CREATE_OPTION","K8S_NODEGROUP_CREATE_IF_MISSING","KUBECONFIG_CONTENT","KUBE_NAMESPACE","DEPLOYMENT_NAME","DB_POD_SELECTOR"]},{key:"db",title:"Database",keys:["DB_EXEC_MODE","DB_HOST","DB_PORT","DB_NAME","DB_USER","DB_PASSWORD","RELEASE_NAME","HELM_REPO_NAME","HELM_REPO_URL","HELM_CHART","HELM_CHART_VERSION","HELM_RECREATE_ON_IMMUTABLE_ERROR","HELM_VALUES_ARGS"]},{key:"data",title:"Data",keys:["DB_BACKUP_FILE","SCHEMA_SQL_FILE","SCHEMA_SQL_CONTENT","INSERT_SQL","VERIFY_SQL","K8S_MANIFEST"]},{key:"multi",title:"Multi CSP",prefixes:["AWS_","AZURE_","GCP_","NCP_","NHN_","ALIBABA_","TENCENT_","IBM_","KT_"],keys:["CSP_LIST"]},{key:"advanced",title:"Advanced",keys:F},{key:"custom",title:"Custom",keys:[]}],H={TUMBLEBUG:"Tumblebug URL",USER:"Tumblebug User",USERPASS:"Tumblebug Password",NAMESPACE:"Namespace",PROVIDER:"Provider",CSP:"CSP",REGION:"Region",CONNECTION_NAME:"Connection Config",ZONE:"Zone",IMAGE:"Image",IMAGE_ID:"Image ID",SPEC:"VM/K8s Spec",SPEC_ID:"Spec ID",INFRA_ID:"Infra ID",INFRA_ID_LIST:"Infra ID List",INFRA_PREFIX:"Infra Prefix",INFRA_NODEGROUP_NAME:"Node Group",INFRA_NODEGROUP_PREFIX:"Node Group Prefix",SSH_HOST:"SSH Host",SSH_USER:"SSH User",SSH_KEY_FILE:"SSH Key File",K8S_CLUSTER_ID:"Cluster ID",K8S_NODEGROUP_NAME:"Node Group",K8S_NODEGROUP_CREATE_IF_MISSING:"Create Missing Node Group",K8S_API_READY_MAX_ATTEMPTS:"API Ready Attempts",K8S_API_READY_INTERVAL_SECONDS:"API Ready Interval",K8S_NODE_READY_MIN_COUNT:"Ready Node Count",K8S_STATUS_MAX_ATTEMPTS:"Cluster Status Attempts",K8S_STATUS_INTERVAL_SECONDS:"Cluster Status Interval",K8S_READY_STATUS:"Cluster Ready Status",K8S_KUBECONFIG_MAX_ATTEMPTS:"Kubeconfig Attempts",K8S_KUBECONFIG_INTERVAL_SECONDS:"Kubeconfig Interval",KUBECONFIG_CONTENT:"Kubeconfig",KUBE_NAMESPACE:"K8s Namespace",DB_EXEC_MODE:"DB Execute Mode",DB_HOST:"DB Host",DB_PORT:"DB Port",DB_NAME:"DB Name",DB_USER:"DB User",DB_PASSWORD:"DB Password",DB_BACKUP_FILE:"Backup File",SCHEMA_SQL_FILE:"Schema File",SCHEMA_SQL_CONTENT:"Schema SQL",INSERT_SQL:"Insert SQL",VERIFY_SQL:"Verify SQL",HELM_REPO_NAME:"Helm Repo Name",HELM_REPO_URL:"Helm Repo URL",HELM_CHART:"Helm Chart",HELM_CHART_VERSION:"Helm Chart Version",HELM_RECREATE_ON_IMMUTABLE_ERROR:"Recreate on Immutable Error",HELM_VALUES_ARGS:"Helm Values",RELEASE_NAME:"Release Name",CSP_LIST:"CSP List",INFRA_DELETE_OPTION:"Delete Option"},j={REGION:"Selected from mc-infra-manager.",IMAGE_ID:"Image resource ID used by Tumblebug.",SPEC_ID:"Spec resource ID used by Tumblebug.",INFRA_ID:"Target or new infra name.",INFRA_ID_LIST:"Optional comma separated infra IDs. Overrides CSP List and Infra Prefix.",INFRA_NODEGROUP_PREFIX:"Used to create CSP-specific node group names, such as ng-aws.",INFRA_DELETE_OPTION:"Tumblebug infra delete option.",SSH_HOST:"Used for SSH based stages.",DB_HOST:"MariaDB host or service address.",DB_EXEC_MODE:"auto, ssh, or k8s.",DB_BACKUP_FILE:"Upload a SQL backup file. The file name is used as DB_BACKUP_FILE.",SCHEMA_SQL_CONTENT:"Inline schema SQL.",INSERT_SQL:"SQL executed after import.",KUBECONFIG_CONTENT:"Inline kubeconfig.",CSP_LIST:"Comma separated CSP list.",OBJECT_STORAGE_BUCKET:"Bucket name. Existing one is reused, a new name is created by the run. Empty means no object storage.",OBJECT_STORAGE_NAMESPACE:"Tumblebug namespace that owns the bucket. Follows the Namespace selected above.",OBJECT_STORAGE_PROVIDER:"Leave empty to follow the selected CSP.",OBJECT_STORAGE_REGION:"Leave empty to follow the selected Region.",PRESIGNED_URL_EXPIRES:"Lifetime in seconds for URLs cached and automatically refreshed by the local Object Storage broker.",JUPYTER_ALLOWED_CIDR:"Public IPv4 address or IPv4 CIDR allowed to access Jupyter. single IP is converted to /32.",JUPYTER_PORT:"Host port opened in the Tumblebug security group and mapped to Jupyter."},x=v(()=>{const t=new Set;return U.forEach(e=>{var n;(n=e.keys)==null||n.forEach(s=>t.add(s))}),d.value.forEach(e=>{const n=o(e.paramKey);n&&!y(n)&&t.add(n)}),Array.from(t).filter(e=>!y(e)).sort()}),w=v(()=>d.value.map((t,e)=>{const n=o(t.paramKey);return{index:e,param:t,normalizedKey:n,sectionKey:ce(n),isAdvanced:ie(n)}}).filter(t=>!y(t.normalizedKey))),h=v(()=>{const t=f.value.trim().toUpperCase();return w.value.filter(e=>{const n=e.param.paramValue||"",s=ne(e.normalizedKey),_=!t||e.normalizedKey.includes(t)||n.toUpperCase().includes(t)||s.toUpperCase().includes(t),P=!T.value||ae(e.param),V=I.value||!e.isAdvanced||!!t||T.value;return _&&P&&V})}),O=v(()=>U.map(t=>({key:t.key,title:t.title,rows:h.value.filter(e=>e.sectionKey===t.key)})).filter(t=>t.rows.length>0)),G=v(()=>O.value.reduce((t,e)=>t+e.rows.length,0)),$=v(()=>w.value.filter(t=>t.isAdvanced).length),J=v(()=>w.value.filter(t=>te(t.normalizedKey)).length);Ie(()=>{r()});const r=()=>{d.value.length===0&&d.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:S.eventListenerYn})},u=t=>{const e=d.value[t];e.paramKey=o(e.paramKey),e.paramKey==="NAMESPACE"?e.paramValue=i.projectInfo.ns_id:e.paramKey==="MCI"?e.paramValue=i.projectInfo.mci_id:e.paramKey==="CLUSTER"&&(e.paramValue=i.projectInfo.cluster_id)},o=t=>(t||"").trim().toUpperCase(),N=v(()=>{var e;const t=(e=d.value.find(n=>o(n.paramKey)==="TUMBLEBUG_SELECTOR_YN"))==null?void 0:e.paramValue;return["N","NO","FALSE","0"].includes(String(t||"").trim().toUpperCase())}),y=t=>{const e=o(t);return D.includes(e)?!0:N.value?L.includes(e)?!0:L.some(n=>e.endsWith(`_${n}`)):!1},ee=t=>B.includes(o(t)),M=t=>Z.includes(o(t)),ue=t=>o(t)==="DB_BACKUP_FILE",te=t=>{const e=o(t);return K.some(n=>e.includes(n))},ae=t=>{var e;return!((e=t.paramKey)!=null&&e.trim())||!String(t.paramValue??"").trim()},ie=t=>{const e=o(t);return F.includes(e)||e.endsWith("_MAX_ATTEMPTS")||e.endsWith("_INTERVAL_SECONDS")||e.includes("TIMEOUT")},ce=t=>{const e=o(t);if(!e)return"custom";const n=U.find(s=>{var _,P;return s.key!=="custom"&&(((_=s.keys)==null?void 0:_.includes(e))||((P=s.prefixes)==null?void 0:P.some(V=>e.startsWith(V))))});return(n==null?void 0:n.key)||"custom"},ne=t=>{const e=o(t);return e?H[e]||e:"New Parameter"},se=t=>j[o(t)]||"",me=async(t,e)=>{var _;const n=t.target,s=(_=n.files)==null?void 0:_[0];if(s)try{const P=await pe(s),V=d.value[e];V.paramValue=s.name,de("SCHEMA_SQL_CONTENT",P),E.success(`${s.name} has been applied.`)}catch(P){console.log(P),E.error("Failed to read the file.")}finally{n.value=""}},pe=t=>new Promise((e,n)=>{const s=new FileReader;s.onload=()=>e(String(s.result||"")),s.onerror=()=>n(s.error),s.readAsText(t)}),de=(t,e)=>{const n=o(t),s=d.value.find(_=>o(_.paramKey)===n);if(s){s.paramValue=e;return}d.value.push({paramIdx:0,paramKey:n,paramValue:e,eventListenerYn:S.eventListenerYn})},_e=()=>{d.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:S.eventListenerYn}),I.value=!0},Ee=t=>{d.value.length!==1?d.value.splice(t,1):E.error("This field can be left empty.")};return(t,e)=>d.value?(m(),c("div",Re,[l("div",ye,[l("div",null,[e[4]||(e[4]=l("label",{class:"form-label mb-1"},"Parameters",-1)),l("div",Ce,A(G.value)+" / "+A(d.value.length),1)]),l("div",Oe,[l("div",Pe,[k(l("input",{class:"form-control form-control-sm",type:"search",placeholder:"Search","onUpdate:modelValue":e[0]||(e[0]=n=>f.value=n)},null,512),[[Y,f.value]])]),l("label",ge,[k(l("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=n=>T.value=n)},null,512),[[ve,T.value]]),e[5]||(e[5]=l("span",{class:"form-check-label"},"Empty",-1))]),$.value>0?(m(),c("button",{key:0,class:"btn btn-outline-secondary btn-sm",type:"button",onClick:e[2]||(e[2]=n=>I.value=!I.value)},A(I.value?"Hide Advanced":`Advanced ${$.value}`),1)):C("",!0),J.value>0?(m(),c("button",{key:1,class:"btn btn-outline-secondary btn-sm",type:"button",onClick:e[3]||(e[3]=n=>b.value=!b.value)},A(b.value?"Hide Secret":"Show Secret"),1)):C("",!0),S.popup?C("",!0):(m(),c("button",{key:2,class:"btn btn-primary btn-sm",type:"button",onClick:_e}," Add "))])]),l("datalist",he,[(m(!0),c(W,null,z(x.value,n=>(m(),c("option",{key:n,value:n},null,8,be))),128))]),O.value.length===0?(m(),c("div",De," No parameters ")):C("",!0),(m(!0),c(W,null,z(O.value,n=>(m(),c("div",{key:n.key,class:"param-section"},[l("div",Le,[l("div",Me,[l("span",{class:q(["param-section-dot",`param-section-dot-${n.key}`])},null,2),re(" "+A(n.title),1)]),l("span",ke,A(n.rows.length),1)]),l("div",Ke,[(m(!0),c(W,null,z(n.rows,s=>(m(),c("div",{key:`${s.index}-${s.param.paramKey}`,class:q(["param-row",{"param-row-empty":ae(s.param)}])},[l("div",Ue,[S.popup||ee(s.param.paramKey)?(m(),c("div",we,[l("span",Ve,A(ne(s.param.paramKey)),1),l("code",null,A(o(s.param.paramKey)||"PARAM_KEY"),1)])):(m(),c("div",Be,[e[6]||(e[6]=l("label",{class:"form-label small mb-1"},"Key",-1)),k(l("input",{class:"form-control form-control-sm param-key-input",type:"text",list:"workflow-param-key-options",placeholder:"PARAM_KEY","onUpdate:modelValue":_=>s.param.paramKey=_,onBlur:_=>u(s.index)},null,40,Fe),[[Y,s.param.paramKey]])])),se(s.param.paramKey)?(m(),c("div",He,A(se(s.param.paramKey)),1)):C("",!0)]),l("div",xe,[e[9]||(e[9]=l("label",{class:"form-label small mb-1"},"Value",-1)),ue(s.param.paramKey)?(m(),c("div",Ge,[l("div",$e,[k(l("input",{class:"form-control param-value-input",type:"text",placeholder:"schema.sql","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,Ye),[[Y,s.param.paramValue]]),l("label",Qe,[e[7]||(e[7]=re(" Upload ",-1)),l("input",{class:"d-none",type:"file",accept:".sql,.txt,.dump,.backup,.bak",onChange:_=>me(_,s.index)},null,40,Xe)])]),e[8]||(e[8]=l("div",{class:"param-hint"}," Uploaded file content is applied to SCHEMA_SQL_CONTENT. ",-1))])):M(s.param.paramKey)?k((m(),c("textarea",{key:1,class:"form-control form-control-sm param-value-input param-value-code",placeholder:"Value",rows:"4","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,We)),[[Y,s.param.paramValue]]):k((m(),c("input",{key:2,class:"form-control form-control-sm param-value-input",type:te(s.param.paramKey)&&!b.value?"password":"text",placeholder:"Value","onUpdate:modelValue":_=>s.param.paramValue=_},null,8,ze)),[[Te,s.param.paramValue]])]),S.popup?C("",!0):(m(),c("button",{key:0,class:"btn btn-outline-danger btn-icon param-remove-btn",type:"button","aria-label":"Remove parameter",onClick:_=>Ee(s.index)},[...e[10]||(e[10]=[Ne(' ',1)])],8,Ze))],2))),128))])]))),128))])):C("",!0)}}),Tt=le(je,[["__scopeId","data-v-11b3faef"]]),R=a=>{const E=new URLSearchParams;Object.entries(a||{}).forEach(([S,d])=>{d!==void 0&&d!==""&&E.append(S,String(d))});const i=E.toString();return i?`?${i}`:""},Nt=(a,E)=>p.get(`/infra-manager/providers/${encodeURIComponent(a)}/regions${R(E)}`),At=a=>p.get(`/infra-manager/providers${R(a)}`),Rt=a=>p.get(`/infra-manager/namespaces${R(a)}`),yt=a=>p.get(`/infra-manager/conn-configs${R(a)}`),Ct=a=>p.get(`/infra-manager/available-zones${R(a)}`),Ot=a=>p.get(`/infra-manager/k8s-versions${R(a)}`),Pt=(a,E,i)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/resources/${E}${R(i)}`),gt=(a,E,i)=>p.post(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra-dynamic-review${R(i)}`,E),ht=(a,E)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra${R(E)}`),bt=(a,E,i)=>p.get(`/infra-manager/namespaces/${encodeURIComponent(a)}/infra/${encodeURIComponent(E)}${R(i)}`),Je={class:"searchable-select"},qe=["placeholder","title","value","onKeydown"],et={key:0,class:"searchable-select-menu"},tt=["title","onMousedown"],at={key:0,class:"searchable-select-empty"},nt=oe({__name:"SearchableSelect",props:{modelValue:{default:""},options:{default:()=>[]},placeholder:{default:""},title:{default:""},allowCustom:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(a,{emit:E}){const i=a,S=E,d=g(),f=g(""),T=g(!1),I=g(0),b=v(()=>i.options.find(r=>r.value===i.modelValue)),B=v(()=>{var r;return((r=b.value)==null?void 0:r.label)||i.modelValue||""}),D=v(()=>{const r=h(f.value),u=i.options||[];return(r?u.filter(N=>$(N,r)):u).slice(0,80)}),L=()=>{f.value=B.value};Ae(()=>[i.modelValue,i.options],()=>{L()},{immediate:!0});const Z=r=>{f.value=r.target.value,I.value=0,K()},K=()=>{T.value=!0},F=()=>{T.value=!1,L()},U=()=>{window.setTimeout(()=>{w(),T.value=!1},120)},H=r=>{if(!T.value){K();return}const u=D.value.length;u!==0&&(I.value=(I.value+r+u)%u)},j=()=>{const r=D.value[I.value];r&&x(r)},x=r=>{var u;S("update:modelValue",r.value),f.value=r.label,T.value=!1,I.value=0,(u=d.value)==null||u.blur(),S("change")},w=()=>{const r=f.value.trim();if(!r){i.modelValue&&(S("update:modelValue",""),S("change"));return}const u=i.options.find(o=>J(o,r));if(u){u.value!==i.modelValue&&(S("update:modelValue",u.value),S("change")),f.value=u.label;return}if(i.allowCustom){r!==i.modelValue&&(S("update:modelValue",r),S("change")),f.value=r;return}L()},h=r=>(r||"").trim().toLowerCase(),O=r=>h(r).replace(/[^a-z0-9\uac00-\ud7a3]/g,""),G=r=>[r.label,r.value,r.searchText||""],$=(r,u)=>{const o=O(u);return G(r).some(N=>{const y=h(N);return y.includes(u)?!0:!!o&&O(y).includes(o)})},J=(r,u)=>{const o=h(u),N=O(u);return G(r).some(y=>h(y).split(/\n/).map(M=>M.trim()).filter(Boolean).some(M=>M===o||O(M)===N))};return(r,u)=>(m(),c("div",Je,[l("input",{ref_key:"inputRef",ref:d,class:"form-control p-2 searchable-select-input",placeholder:a.placeholder,title:a.title||B.value,value:f.value,autocomplete:"off",onBlur:U,onFocus:K,onInput:Z,onKeydown:[u[0]||(u[0]=Q(X(o=>H(1),["prevent"]),["down"])),Q(X(j,["prevent"]),["enter"]),Q(F,["esc"]),u[1]||(u[1]=Q(X(o=>H(-1),["prevent"]),["up"]))]},null,40,qe),T.value?(m(),c("div",et,[(m(!0),c(W,null,z(D.value,(o,N)=>(m(),c("button",{key:`${o.value}-${N}`,type:"button",class:q(["searchable-select-option",{active:N===I.value}]),title:o.label,onMousedown:X(y=>x(o),["prevent"])},A(o.label),43,tt))),128)),D.value.length===0?(m(),c("div",at," No matches ")):C("",!0)])):C("",!0)]))}}),Dt=le(nt,[["__scopeId","data-v-27c30426"]]);export{Tt as P,Dt as S,gt as a,Pt as b,ft as c,_t as d,St as e,lt as f,mt as g,ct as h,vt as i,It as j,At as k,Rt as l,Nt as m,yt as n,Ot as o,Ct as p,ht as q,Et as r,bt as s,ut as t,pt as u,dt as v,it as w};
diff --git a/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js b/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js
similarity index 96%
rename from src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js
rename to src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js
index e08bfad..776741d 100644
--- a/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js
+++ b/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js
@@ -1 +1 @@
-import{d as h,g as n,c as s,a as t,t as i,O as a,x as r}from"./index-CtQCsPEr.js";const w={class:"page-header w-100"},g={class:"row align-items-center"},k={class:"col"},b={class:"page-title"},m={class:"col-auto ms-auto"},u={class:"btn-list"},_=["data-bs-target"],T=h({__name:"TableHeader",props:{headerTitle:{},newBtnTitle:{},popupFlag:{type:Boolean},popupTarget:{}},emits:["click-new-btn"],setup(c,{emit:d}){const e=c,p=d,l=()=>{p("click-new-btn")};return(v,o)=>(n(),s("div",w,[t("div",g,[t("div",k,[t("h2",b,i(e.headerTitle),1)]),t("div",m,[t("div",u,[e.popupFlag?(n(),s("a",{key:1,class:"btn btn-primary d-none d-sm-inline-block","data-bs-toggle":"modal","data-bs-target":e.popupTarget,onClick:a(l,["prevent","stop"])},[o[1]||(o[1]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)],8,_)):(n(),s("a",{key:0,class:"btn btn-primary d-none d-sm-inline-block",onClick:a(l,["prevent","stop"])},[o[0]||(o[0]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)]))])])])]))}});export{T as _};
+import{d as h,g as n,c as s,a as t,t as i,O as a,x as r}from"./index-Woncnlsa.js";const w={class:"page-header w-100"},g={class:"row align-items-center"},k={class:"col"},b={class:"page-title"},m={class:"col-auto ms-auto"},u={class:"btn-list"},_=["data-bs-target"],T=h({__name:"TableHeader",props:{headerTitle:{},newBtnTitle:{},popupFlag:{type:Boolean},popupTarget:{}},emits:["click-new-btn"],setup(c,{emit:d}){const e=c,p=d,l=()=>{p("click-new-btn")};return(v,o)=>(n(),s("div",w,[t("div",g,[t("div",k,[t("h2",b,i(e.headerTitle),1)]),t("div",m,[t("div",u,[e.popupFlag?(n(),s("a",{key:1,class:"btn btn-primary d-none d-sm-inline-block","data-bs-toggle":"modal","data-bs-target":e.popupTarget,onClick:a(l,["prevent","stop"])},[o[1]||(o[1]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)],8,_)):(n(),s("a",{key:0,class:"btn btn-primary d-none d-sm-inline-block",onClick:a(l,["prevent","stop"])},[o[0]||(o[0]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)]))])])])]))}});export{T as _};
diff --git a/src/main/resources/static/assets/TumblebugParamSelector-Sfwskzms.js b/src/main/resources/static/assets/TumblebugParamSelector-DeFn1gSY.js
similarity index 99%
rename from src/main/resources/static/assets/TumblebugParamSelector-Sfwskzms.js
rename to src/main/resources/static/assets/TumblebugParamSelector-DeFn1gSY.js
index 555a5ba..8a98c8c 100644
--- a/src/main/resources/static/assets/TumblebugParamSelector-Sfwskzms.js
+++ b/src/main/resources/static/assets/TumblebugParamSelector-DeFn1gSY.js
@@ -1,3 +1,3 @@
-import{d as Qe,l as me,r as c,o as an,w as ta,s as oe,c as Q,a as l,t as h,i as k,b as en,J as nn,q as se,j as ba,F as le,x as re,h as q,g as m}from"./index-CtQCsPEr.js";import{k as on,l as sn,m as ln,b as ja,n as ue,o as rn,p as un,q as cn,s as vn,S as R}from"./SearchableSelect-TBocqjLd.js";import{_ as tn}from"./_plugin-vue_export-helper-DlAUqK2U.js";const pn={key:0,class:"mb-3"},dn={class:"grid gap-0 column-gap-3 mb-2"},gn={class:"tumblebug-param-field g-col-4"},fn={class:"tumblebug-param-label"},Sn={class:"tumblebug-param-field g-col-4"},In={class:"tumblebug-param-label"},bn={class:"tumblebug-param-field g-col-4"},Nn={class:"tumblebug-param-label"},Cn={class:"grid gap-0 column-gap-3 mb-2"},En={class:"tumblebug-param-field g-col-6"},On={class:"tumblebug-param-label"},_n={class:"tumblebug-param-field g-col-6"},hn={class:"tumblebug-param-label"},wn={class:"tumblebug-param-label-actions"},yn={class:"form-check form-switch tumblebug-k8s-toggle",title:"Load Kubernetes node images"},Vn={class:"grid gap-0 column-gap-3 mb-2"},kn={class:"tumblebug-param-field g-col-5"},Rn={class:"tumblebug-param-label"},Pn={class:"tumblebug-param-field g-col-5"},An={class:"tumblebug-param-label"},Tn={class:"grid gap-0 column-gap-3"},Mn={class:"tumblebug-param-label"},Dn={class:"tumblebug-param-label"},zn={key:0,class:"tumblebug-param-field g-col-4"},Ln={class:"tumblebug-param-label"},Un={key:0,class:"grid gap-0 column-gap-3 mt-2"},xn={class:"tumblebug-param-field g-col-12"},Gn={class:"tumblebug-param-label"},Kn={key:0,class:"text-secondary"},$n=Qe({__name:"TumblebugParamSelector",props:{workflowName:{default:""},workflowParamData:{},workflowStageMappings:{default:()=>[]}},setup(ce){const aa=ce,ve=me(),pa=q(()=>aa.workflowParamData||[]),Na=["aws","azure","gcp","ncp","nhn","alibaba","tencent","ibm","kt"],H=c($e(Na.map(a=>({label:a,value:a})))),r=c("aws"),u=c(""),f=c(""),d=c(""),b=c(""),w=c(""),Z=c(""),p=c(""),E=c(""),I=c(""),i=c(""),z=c(!1),ea=c([]),L=c([]),U=c([]),na=c([]),oa=c([]),$=c([]),x=c([]),J=c([]),sa=c(!1),P=c([]),la=c([]),ra=c({}),da=c({});let ga=0,Ca=0,ia=0,Ea=0,Oa=0,fa=0,_a=0,ha=0,wa=0,ya=0,Va=0;const te=["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"],pe=["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"],de=["object-storage-ensure","object-storage-delete","jupyter-object-storage-analysis-install"],M=c(!1),ka=c(!1),qa={label:"No zone required",value:"",searchText:"no zone optional blank"},ge={alibaba:{region:"ap-northeast-1",connectionName:"alibaba-ap-northeast-1",zone:"ap-northeast-1a",specId:"alibaba+ap-northeast-1+ecs.u1-c1m2.large",imageId:"ubuntu_24_04_x64_20G_alibase_20260810.vhd"},aws:{region:"ap-northeast-1",connectionName:"aws-ap-northeast-1",zone:"ap-northeast-1a",specId:"aws+ap-northeast-1+t3.medium",imageId:"ami-0dc2aed7540019237"},azure:{region:"koreasouth",connectionName:"azure-koreasouth",zone:"1",specId:"azure+koreasouth+Standard_D2s_v3",imageId:"Canonical:ubuntu-24_04-lts:minimal:24.04.202608100"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+e2-medium",imageId:"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2404-noble-amd64-v20260817"},ibm:{region:"jp-osa",connectionName:"ibm-jp-osa",zone:"jp-osa-1",specId:"ibm+jp-osa+cx2-2x4",imageId:"r034-81a02369-9e59-4404-a922-30c110f1788d"},kt:{region:"kr1",connectionName:"kt-kr1",zone:"DX-M1",specId:"kt+kr1+2x4.itl",imageId:"e55c5985-b420-4a19-8c92-aa3461cda86e"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c2-g3a",imageId:"104630229"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c2m4",imageId:"5c38715f-0375-4167-af4e-56f75ba8b252"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM4",imageId:"img-mmytdhbn"}},fe={alibaba:{region:"ap-northeast-1",connectionName:"alibaba-ap-northeast-1",zone:"ap-northeast-1a",specId:"alibaba+ap-northeast-1+ecs.u1-c1m2.xlarge",imageId:"AliyunLinux3ContainerOptimized",k8sVersion:"1.35.7-aliyun.1"},aws:{region:"ap-northeast-1",connectionName:"aws-ap-northeast-1",zone:"ap-northeast-1a",specId:"aws+ap-northeast-1+t3.medium",imageId:"AL2023_x86_64_STANDARD",k8sVersion:"1.35"},azure:{region:"koreasouth",connectionName:"azure-koreasouth",zone:"1",specId:"azure+koreasouth+Standard_D2s_v3",imageId:"",k8sVersion:"1.35.7"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+e2-medium",imageId:"UBUNTU_CONTAINERD",k8sVersion:"1.34.9-gke.1655001"},ibm:{region:"jp-osa",connectionName:"ibm-jp-osa",zone:"jp-osa-1",specId:"ibm+jp-osa+cx2-2x4",imageId:"",k8sVersion:"1.35.7"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c2-g3a",imageId:"",k8sVersion:"1.34.3-nks.1"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c2m4",imageId:"0f07c795-2a46-44fc-a61b-fa0d96763ce2",k8sVersion:"v1.34.3"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM4",imageId:"ubuntu22.04x86_64",k8sVersion:"1.34.1"}},Se=q(()=>{const a=g("TUMBLEBUG_SELECTOR_YN").trim().toUpperCase();return["N","NO","FALSE","0"].includes(a)?!1:["Y","YES","TRUE","1"].includes(a)?!0:aa.workflowStageMappings.some(e=>te.includes(e.workflowStageName||""))}),_=q(()=>aa.workflowStageMappings.some(a=>pe.includes((a.workflowStageName||"").toLowerCase()))),ua=q(()=>aa.workflowStageMappings.some(a=>de.includes((a.workflowStageName||"").toLowerCase()))),Ie=q(()=>r.value.toLowerCase()==="azure"),Ra=q(()=>J.value.length>0?J.value:!sa.value&&Ie.value&&d.value&&u.value&&(p.value||G())?[qa]:[]),be=q(()=>Ra.value.length===1&&Ra.value[0].value===""?qa.label:"Zone");an(async()=>{await Ha(),Y(),await Da(),Y()}),ta(u,async(a,e)=>{z.value||(Ne(a,e),await Fa(),await za(),await Sa(),await B(),await Ia(),await ca(),N())}),ta(d,async(a,e)=>{z.value||(a!==e&&(f.value=""),await B(),await Ia(),N())}),ta(ua,async a=>{a&&(Y(),await ca())}),ta(_,async a=>{ka.value||M.value===a||(M.value=a,z.value||(f.value="",Ta(),await za(),await B(),N()))}),ta(()=>aa.workflowName,async()=>{await Ha()});const Ha=async()=>{z.value=!0;try{const a=Za(g("SPEC_ID")||g("IMAGE_ID"));a.provider&&(r.value=a.provider),b.value=W(),w.value=g("INFRA_ID")||g("K8S_CLUSTER_ID"),Z.value=g("SSH_HOST")||g("DB_HOST"),u.value=g("REGION")||a.region,f.value=g("IMAGE_ID")||g("IMAGE"),d.value=g("SPEC_ID")||g("SPEC"),I.value=g("K8S_VERSION"),p.value=g("CONNECTION_NAME"),E.value=g("ZONE"),i.value=g("OBJECT_STORAGE_BUCKET"),Ja(),ka.value||(M.value=_.value)}finally{await oe(),z.value=!1}},Za=a=>{const e=(a||"").split("+");return e.length<3?{provider:"",region:""}:{provider:e[0],region:e[1]}},Pa=a=>(a||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),G=()=>r.value&&u.value?`${r.value}-${u.value}`:"",Ne=(a,e)=>{const n=r.value&&e?`${r.value}-${e}`:"";(!a||p.value===n||p.value&&!p.value.includes(a))&&(p.value=""),ae(),E.value="",I.value=""},Ce=()=>g("CSP_LIST").split(",").map(a=>a.trim()).filter(Boolean),F=()=>Ce().length>0,ie=a=>{const e=a.trim().toUpperCase(),n=["REGION","CONNECTION_NAME","ZONE","IMAGE_ID","SPEC_ID","K8S_VERSION"];if(F()&&n.includes(e)){const s=Pa(r.value);return s?`${s}_${e}`:e}return e},O=a=>(Array.isArray(a)?a:[a]).map(n=>ie(n)).join(" / "),Ee=()=>F()?O("IMAGE_ID"):O(["IMAGE","IMAGE_ID"]),Oe=()=>F()?O("SPEC_ID"):O(["SPEC","SPEC_ID"]),y=a=>{const e=Pa(r.value);return e?g(`${e}_${a}`):""},_e=()=>{if(!(M.value||_.value))return ge[r.value.toLowerCase()]},Aa=()=>M.value||_.value?fe[r.value.toLowerCase()]:_e(),Ta=()=>{const a=Aa();a&&(u.value=u.value||a.region,p.value=p.value||a.connectionName,E.value=E.value||a.zone,d.value=d.value||a.specId,f.value=f.value||a.imageId,I.value=I.value||a.k8sVersion||"")},Ja=()=>{if(!F())return;const a=Aa(),e=Za(y("SPEC_ID")||y("IMAGE_ID"));u.value=y("REGION")||e.region||(a==null?void 0:a.region)||"",f.value=y("IMAGE_ID")||(a==null?void 0:a.imageId)||"",d.value=y("SPEC_ID")||(a==null?void 0:a.specId)||"",I.value=y("K8S_VERSION")||(a==null?void 0:a.k8sVersion)||"",p.value=y("CONNECTION_NAME")||(a==null?void 0:a.connectionName)||"",E.value=y("ZONE")||(a==null?void 0:a.zone)||"",i.value=y("OBJECT_STORAGE_BUCKET")||i.value},he=async()=>{v("NAMESPACE",b.value),Y(),Z.value="",$.value=[],await Promise.all([Sa(),Wa()]),await B(),await ca(),w.value&&await La()},we=async()=>{u.value="",f.value="",d.value="",p.value="",E.value="",I.value="",Ja(),Ta(),Y(),await Da(),N()},Ma=()=>{N()},ye=async()=>{Xe(),Z.value="",$.value=[],w.value&&await La()},Ve=()=>{var e;const a=$.value.find(n=>n.value===Z.value);a&&(v("SSH_HOST",a.value),v("DB_HOST",a.value),(e=a.meta)!=null&&e.sshUser&&v("SSH_USER",a.meta.sshUser))},ke=async()=>{ae(),I.value="",await Sa(),await B(),await Ia(),await ca(),N()},Re=()=>{N()},Pe=()=>{i.value=(i.value||"").trim(),N()},Ae=()=>{N()},Te=async()=>{ka.value=!0,f.value="",U.value=[],await B(),N()},Me=async()=>{await Da()},Da=async()=>{const a=z.value;z.value=!0;try{await De(),await ze(),Ta(),await Le(),Ue(),await Fa(),await za(),await Promise.all([Sa(),Wa()]),await B(),await Ia(),await ca(),w.value&&await La()}finally{await oe(),z.value=a,N()}},De=async()=>{var e;const a=++ga;H.value=[];try{const{data:n}=await on();if(a!==ga)return;const s=A(n);H.value=s.length>0?s:Na.map(o=>({label:o,value:o}))}catch{if(a!==ga)return;H.value=Na.map(s=>({label:s,value:s}))}a===ga&&(H.value.some(n=>n.value===r.value)||(r.value=((e=H.value[0])==null?void 0:e.value)||""))},ze=async()=>{const a=++Ca;ea.value=[];try{const{data:e}=await sn();if(a!==Ca)return;ea.value=A(e),b.value||(b.value=W())}catch{if(a!==Ca)return;ea.value=[]}},Le=async()=>{const a=++ia;L.value=[];try{const{data:e}=await ln(r.value);if(a!==ia)return;L.value=A(e)}catch{if(a!==ia)return;L.value=[]}},Ue=()=>{var e;if(L.value.length===0||u.value&&j(u.value,L.value))return;const a=y("REGION");if(a&&j(a,L.value)){u.value=a;return}u.value=((e=L.value[0])==null?void 0:e.value)||u.value},xe=(a=!1)=>{if(x.value.length===0){p.value="";return}if(!a&&p.value&&j(p.value,x.value))return;const e=G(),n=x.value.find(t=>t.value===e);if(a&&!n){p.value=e;return}const s=n||x.value[0];p.value=(s==null?void 0:s.value)||"";const o=Ge(p.value);!u.value&&o&&(u.value=o)},Ge=a=>{const e=`${r.value}-`;return a!=null&&a.startsWith(e)?a.slice(e.length):""},B=async()=>{const a=++Ea;if(U.value=[],!d.value){f.value="";return}try{const e={providerName:r.value,regionName:u.value,connectionName:p.value||G(),matchedSpecId:d.value,isKubernetesImage:M.value?"true":void 0},{data:n}=await ja(ne(),"image",e);if(a!==Ea)return;U.value=A(n,"image"),Fe()}catch{if(a!==Ea)return;U.value=[]}},Sa=async()=>{const a=++Oa;na.value=[];try{const e={providerName:r.value,regionName:u.value,connectionName:p.value||G()},{data:n}=await ja(ne(),"spec",e);if(a!==Oa)return;na.value=A(n,"spec"),ma()}catch{if(a!==Oa)return;na.value=[],ma()}},Fa=async()=>{const a=++fa;x.value=[];try{const e={providerName:r.value,regionName:u.value,filterVerified:"true"},{data:n}=await ue(e);if(a!==fa)return;let s=A(n),o=!1;if(s.length===0&&u.value){const t=await ue({providerName:r.value,filterVerified:"true"});if(a!==fa)return;s=A(t.data),o=!0}x.value=s,xe(o)}catch{if(a!==fa)return;x.value=[]}},za=async()=>{const a=++ha;if(P.value=[],!(!_.value||!r.value||!u.value))try{const{data:e}=await rn({providerName:r.value,regionName:u.value});if(a!==ha)return;P.value=A(e,"k8sVersion"),Ke()}catch{if(a!==ha)return;P.value=[]}},Ke=()=>{var n,s;if(!_.value||P.value.length===0||I.value&&j(I.value,P.value))return;const a=F()?y("K8S_VERSION"):g("K8S_VERSION");if(a&&j(a,P.value)){I.value=a,N();return}const e=(n=Aa())==null?void 0:n.k8sVersion;if(e&&j(e,P.value)){I.value=e,N();return}I.value=((s=P.value[0])==null?void 0:s.value)||I.value,N()},Ia=async()=>{const a=++_a;if(J.value=[],!d.value){sa.value=!1;return}sa.value=!0;try{const{data:e}=await un({specId:d.value,providerName:r.value,regionName:u.value,connectionName:p.value||G()});if(a!==_a)return;J.value=A(e),E.value&&!J.value.some(n=>n.value===E.value)&&(E.value=""),sa.value=!1}catch{if(a!==_a)return;J.value=[],sa.value=!1}},ca=async()=>{const a=++wa;if(la.value=[],ra.value={},da.value={},!ua.value)return;const e=g("OBJECT_STORAGE_NAMESPACE")||b.value||W(),n=r.value;if(!(!e||!n))try{const{data:s}=await ja(e,"objectStorage",{providerName:n});if(a!==wa)return;const o=(s==null?void 0:s.data)??s,t=Array.isArray(o)?o:[],C={},D={};la.value=t.map(S=>{const K=String((S==null?void 0:S.id)||(S==null?void 0:S.name)||"").trim();if(!K)return null;C[K]=String((S==null?void 0:S.cspResourceName)||"").trim();const $a=String((S==null?void 0:S.region)||"").trim();return D[K]=$a,{label:K,value:K}}).filter(S=>S!==null),ra.value=C,da.value=D}catch{if(a!==wa)return;la.value=[],ra.value={},da.value={}}},Wa=async()=>{const a=++ya;if(oa.value=[],!!b.value)try{const{data:e}=await cn(b.value,{option:"simple"});if(a!==ya)return;oa.value=A(e)}catch{if(a!==ya)return;oa.value=[]}},La=async()=>{const a=++Va;if($.value=[],!(!b.value||!w.value))try{const{data:e}=await vn(b.value,w.value,{option:"accessinfo",accessInfoOption:"showSshKey"});if(a!==Va)return;$.value=Ye(e)}catch{if(a!==Va)return;$.value=[]}},A=(a,e="default")=>{const n=(a==null?void 0:a.data)??a,s=ee(n),o=new Set;return s.map(t=>{const C=Be(t,e),D=je(t,C,e),S=qe(t,C,D,e);return{label:D,value:C,searchText:S}}).filter(t=>!t.value||o.has(t.value)?!1:(o.add(t.value),!0)).sort(Ua)};function $e(a){return[...a].sort(Ua)}function Ua(a,e){const n=(a.label||a.value||"").trim(),s=(e.label||e.value||"").trim(),o=n.localeCompare(s,void 0,{numeric:!0,sensitivity:"base"});return o!==0?o:(a.value||"").localeCompare(e.value||"",void 0,{numeric:!0,sensitivity:"base"})}const Be=(a,e)=>{if(e==="k8sVersion")return String(T([a==null?void 0:a.id,a==null?void 0:a.version,a==null?void 0:a.value,a==null?void 0:a.name,a]));if(e==="spec"){const n=T([a==null?void 0:a.specId,a==null?void 0:a.id,a==null?void 0:a.cspSpecId,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.specName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.name]);return String(Ze(a,n))}return String(T(e==="image"?[a==null?void 0:a.imageId,a==null?void 0:a.id,a==null?void 0:a.cspImageId,a==null?void 0:a.name]:[],[a==null?void 0:a.id,a==null?void 0:a.specId,a==null?void 0:a.imageId,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,a==null?void 0:a.nsId,a==null?void 0:a.name,a==null?void 0:a.infraId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,a==null?void 0:a.zoneId,a==null?void 0:a.zoneName,a==null?void 0:a.zone,a==null?void 0:a.assignedZone,a]))},je=(a,e,n)=>{if(n==="k8sVersion")return Ga(e,xa(e,[a==null?void 0:a.name,a==null?void 0:a.displayName,a==null?void 0:a.version,a==null?void 0:a.value]));if(n==="image")return Ga(e,xa(e,[a==null?void 0:a.displayName,a==null?void 0:a.imageName,a==null?void 0:a.cspImageName,a==null?void 0:a.guestOS,a==null?void 0:a.GuestOS,a==null?void 0:a.guestOs,a==null?void 0:a.osDistribution,a==null?void 0:a.OSDistribution,a==null?void 0:a.osPlatform,a==null?void 0:a.OSPlatform,a==null?void 0:a.description,a==null?void 0:a.Description,a==null?void 0:a.name]));if(n==="spec"){const o=xa(e,[a==null?void 0:a.displayName,a==null?void 0:a.specName,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.description,a==null?void 0:a.Description,a==null?void 0:a.name])||Qa(a);return Ga(e,o)}const s=T([a==null?void 0:a.name,a==null?void 0:a.id,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,a==null?void 0:a.nsId,a==null?void 0:a.infraId,a==null?void 0:a.specName,a==null?void 0:a.imageName,a==null?void 0:a.specId,a==null?void 0:a.imageId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,a==null?void 0:a.zoneId,a==null?void 0:a.zoneName,a==null?void 0:a.zone,a==null?void 0:a.assignedZone,e]);return String(s)},qe=(a,e,n,s)=>{const o=T([a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,r.value]),t=T([a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,u.value]),C=s==="image"?[a==null?void 0:a.displayName,a==null?void 0:a.imageName,a==null?void 0:a.cspImageName,a==null?void 0:a.guestOS,a==null?void 0:a.GuestOS,a==null?void 0:a.guestOs,a==null?void 0:a.osDistribution,a==null?void 0:a.OSDistribution,a==null?void 0:a.osPlatform,a==null?void 0:a.OSPlatform,a==null?void 0:a.description,a==null?void 0:a.Description]:[],D=s==="spec"?[a==null?void 0:a.displayName,a==null?void 0:a.specName,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.description,a==null?void 0:a.Description,Qa(a)]:[],S=s==="k8sVersion"?[a==null?void 0:a.name,a==null?void 0:a.displayName,a==null?void 0:a.version,a==null?void 0:a.value]:[],K=Ya([e,n,a==null?void 0:a.id,a==null?void 0:a.name,a==null?void 0:a.imageId,a==null?void 0:a.specId,a==null?void 0:a.cspImageId,a==null?void 0:a.cspSpecId,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.infraId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,...C,...D,...S]),$a=Ya(K.flatMap(Ba=>[o&&t?`${o}+${t}+${Ba}`:"",o&&t?`${o}-${t}-${Ba}`:"",o&&t?`${o} ${t} ${Ba}`:""]));return[...K,...$a].join(`
+import{d as Qe,l as me,r as c,o as an,w as ta,s as oe,c as Q,a as l,t as h,i as k,b as en,J as nn,q as se,j as ba,F as le,x as re,h as q,g as m}from"./index-Woncnlsa.js";import{k as on,l as sn,m as ln,b as ja,n as ue,o as rn,p as un,q as cn,s as vn,S as R}from"./SearchableSelect-DlLPIFTu.js";import{_ as tn}from"./_plugin-vue_export-helper-DlAUqK2U.js";const pn={key:0,class:"mb-3"},dn={class:"grid gap-0 column-gap-3 mb-2"},gn={class:"tumblebug-param-field g-col-4"},fn={class:"tumblebug-param-label"},Sn={class:"tumblebug-param-field g-col-4"},In={class:"tumblebug-param-label"},bn={class:"tumblebug-param-field g-col-4"},Nn={class:"tumblebug-param-label"},Cn={class:"grid gap-0 column-gap-3 mb-2"},En={class:"tumblebug-param-field g-col-6"},On={class:"tumblebug-param-label"},_n={class:"tumblebug-param-field g-col-6"},hn={class:"tumblebug-param-label"},wn={class:"tumblebug-param-label-actions"},yn={class:"form-check form-switch tumblebug-k8s-toggle",title:"Load Kubernetes node images"},Vn={class:"grid gap-0 column-gap-3 mb-2"},kn={class:"tumblebug-param-field g-col-5"},Rn={class:"tumblebug-param-label"},Pn={class:"tumblebug-param-field g-col-5"},An={class:"tumblebug-param-label"},Tn={class:"grid gap-0 column-gap-3"},Mn={class:"tumblebug-param-label"},Dn={class:"tumblebug-param-label"},zn={key:0,class:"tumblebug-param-field g-col-4"},Ln={class:"tumblebug-param-label"},Un={key:0,class:"grid gap-0 column-gap-3 mt-2"},xn={class:"tumblebug-param-field g-col-12"},Gn={class:"tumblebug-param-label"},Kn={key:0,class:"text-secondary"},$n=Qe({__name:"TumblebugParamSelector",props:{workflowName:{default:""},workflowParamData:{},workflowStageMappings:{default:()=>[]}},setup(ce){const aa=ce,ve=me(),pa=q(()=>aa.workflowParamData||[]),Na=["aws","azure","gcp","ncp","nhn","alibaba","tencent","ibm","kt"],H=c($e(Na.map(a=>({label:a,value:a})))),r=c("aws"),u=c(""),f=c(""),d=c(""),b=c(""),w=c(""),Z=c(""),p=c(""),E=c(""),I=c(""),i=c(""),z=c(!1),ea=c([]),L=c([]),U=c([]),na=c([]),oa=c([]),$=c([]),x=c([]),J=c([]),sa=c(!1),P=c([]),la=c([]),ra=c({}),da=c({});let ga=0,Ca=0,ia=0,Ea=0,Oa=0,fa=0,_a=0,ha=0,wa=0,ya=0,Va=0;const te=["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"],pe=["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"],de=["object-storage-ensure","object-storage-delete","jupyter-object-storage-analysis-install"],M=c(!1),ka=c(!1),qa={label:"No zone required",value:"",searchText:"no zone optional blank"},ge={alibaba:{region:"ap-northeast-1",connectionName:"alibaba-ap-northeast-1",zone:"ap-northeast-1a",specId:"alibaba+ap-northeast-1+ecs.u1-c1m2.large",imageId:"ubuntu_24_04_x64_20G_alibase_20260810.vhd"},aws:{region:"ap-northeast-1",connectionName:"aws-ap-northeast-1",zone:"ap-northeast-1a",specId:"aws+ap-northeast-1+t3.medium",imageId:"ami-0dc2aed7540019237"},azure:{region:"koreasouth",connectionName:"azure-koreasouth",zone:"1",specId:"azure+koreasouth+Standard_D2s_v3",imageId:"Canonical:ubuntu-24_04-lts:minimal:24.04.202608100"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+e2-medium",imageId:"https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2404-noble-amd64-v20260817"},ibm:{region:"jp-osa",connectionName:"ibm-jp-osa",zone:"jp-osa-1",specId:"ibm+jp-osa+cx2-2x4",imageId:"r034-81a02369-9e59-4404-a922-30c110f1788d"},kt:{region:"kr1",connectionName:"kt-kr1",zone:"DX-M1",specId:"kt+kr1+2x4.itl",imageId:"e55c5985-b420-4a19-8c92-aa3461cda86e"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c2-g3a",imageId:"104630229"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c2m4",imageId:"5c38715f-0375-4167-af4e-56f75ba8b252"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM4",imageId:"img-mmytdhbn"}},fe={alibaba:{region:"ap-northeast-1",connectionName:"alibaba-ap-northeast-1",zone:"ap-northeast-1a",specId:"alibaba+ap-northeast-1+ecs.u1-c1m2.xlarge",imageId:"AliyunLinux3ContainerOptimized",k8sVersion:"1.35.7-aliyun.1"},aws:{region:"ap-northeast-1",connectionName:"aws-ap-northeast-1",zone:"ap-northeast-1a",specId:"aws+ap-northeast-1+t3.medium",imageId:"AL2023_x86_64_STANDARD",k8sVersion:"1.35"},azure:{region:"koreasouth",connectionName:"azure-koreasouth",zone:"1",specId:"azure+koreasouth+Standard_D2s_v3",imageId:"",k8sVersion:"1.35.7"},gcp:{region:"asia-northeast3",connectionName:"gcp-asia-northeast3",zone:"asia-northeast3-a",specId:"gcp+asia-northeast3+e2-medium",imageId:"UBUNTU_CONTAINERD",k8sVersion:"1.34.9-gke.1655001"},ibm:{region:"jp-osa",connectionName:"ibm-jp-osa",zone:"jp-osa-1",specId:"ibm+jp-osa+cx2-2x4",imageId:"",k8sVersion:"1.35.7"},ncp:{region:"kr",connectionName:"ncp-kr",zone:"KR-1",specId:"ncp+kr+c2-g3a",imageId:"",k8sVersion:"1.34.3-nks.1"},nhn:{region:"kr1",connectionName:"nhn-kr1",zone:"kr-pub-a",specId:"nhn+kr1+m2.c2m4",imageId:"0f07c795-2a46-44fc-a61b-fa0d96763ce2",k8sVersion:"v1.34.3"},tencent:{region:"ap-seoul",connectionName:"tencent-ap-seoul",zone:"ap-seoul-1",specId:"tencent+ap-seoul+S5.MEDIUM4",imageId:"ubuntu22.04x86_64",k8sVersion:"1.34.1"}},Se=q(()=>{const a=g("TUMBLEBUG_SELECTOR_YN").trim().toUpperCase();return["N","NO","FALSE","0"].includes(a)?!1:["Y","YES","TRUE","1"].includes(a)?!0:aa.workflowStageMappings.some(e=>te.includes(e.workflowStageName||""))}),_=q(()=>aa.workflowStageMappings.some(a=>pe.includes((a.workflowStageName||"").toLowerCase()))),ua=q(()=>aa.workflowStageMappings.some(a=>de.includes((a.workflowStageName||"").toLowerCase()))),Ie=q(()=>r.value.toLowerCase()==="azure"),Ra=q(()=>J.value.length>0?J.value:!sa.value&&Ie.value&&d.value&&u.value&&(p.value||G())?[qa]:[]),be=q(()=>Ra.value.length===1&&Ra.value[0].value===""?qa.label:"Zone");an(async()=>{await Ha(),Y(),await Da(),Y()}),ta(u,async(a,e)=>{z.value||(Ne(a,e),await Fa(),await za(),await Sa(),await B(),await Ia(),await ca(),N())}),ta(d,async(a,e)=>{z.value||(a!==e&&(f.value=""),await B(),await Ia(),N())}),ta(ua,async a=>{a&&(Y(),await ca())}),ta(_,async a=>{ka.value||M.value===a||(M.value=a,z.value||(f.value="",Ta(),await za(),await B(),N()))}),ta(()=>aa.workflowName,async()=>{await Ha()});const Ha=async()=>{z.value=!0;try{const a=Za(g("SPEC_ID")||g("IMAGE_ID"));a.provider&&(r.value=a.provider),b.value=W(),w.value=g("INFRA_ID")||g("K8S_CLUSTER_ID"),Z.value=g("SSH_HOST")||g("DB_HOST"),u.value=g("REGION")||a.region,f.value=g("IMAGE_ID")||g("IMAGE"),d.value=g("SPEC_ID")||g("SPEC"),I.value=g("K8S_VERSION"),p.value=g("CONNECTION_NAME"),E.value=g("ZONE"),i.value=g("OBJECT_STORAGE_BUCKET"),Ja(),ka.value||(M.value=_.value)}finally{await oe(),z.value=!1}},Za=a=>{const e=(a||"").split("+");return e.length<3?{provider:"",region:""}:{provider:e[0],region:e[1]}},Pa=a=>(a||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),G=()=>r.value&&u.value?`${r.value}-${u.value}`:"",Ne=(a,e)=>{const n=r.value&&e?`${r.value}-${e}`:"";(!a||p.value===n||p.value&&!p.value.includes(a))&&(p.value=""),ae(),E.value="",I.value=""},Ce=()=>g("CSP_LIST").split(",").map(a=>a.trim()).filter(Boolean),F=()=>Ce().length>0,ie=a=>{const e=a.trim().toUpperCase(),n=["REGION","CONNECTION_NAME","ZONE","IMAGE_ID","SPEC_ID","K8S_VERSION"];if(F()&&n.includes(e)){const s=Pa(r.value);return s?`${s}_${e}`:e}return e},O=a=>(Array.isArray(a)?a:[a]).map(n=>ie(n)).join(" / "),Ee=()=>F()?O("IMAGE_ID"):O(["IMAGE","IMAGE_ID"]),Oe=()=>F()?O("SPEC_ID"):O(["SPEC","SPEC_ID"]),y=a=>{const e=Pa(r.value);return e?g(`${e}_${a}`):""},_e=()=>{if(!(M.value||_.value))return ge[r.value.toLowerCase()]},Aa=()=>M.value||_.value?fe[r.value.toLowerCase()]:_e(),Ta=()=>{const a=Aa();a&&(u.value=u.value||a.region,p.value=p.value||a.connectionName,E.value=E.value||a.zone,d.value=d.value||a.specId,f.value=f.value||a.imageId,I.value=I.value||a.k8sVersion||"")},Ja=()=>{if(!F())return;const a=Aa(),e=Za(y("SPEC_ID")||y("IMAGE_ID"));u.value=y("REGION")||e.region||(a==null?void 0:a.region)||"",f.value=y("IMAGE_ID")||(a==null?void 0:a.imageId)||"",d.value=y("SPEC_ID")||(a==null?void 0:a.specId)||"",I.value=y("K8S_VERSION")||(a==null?void 0:a.k8sVersion)||"",p.value=y("CONNECTION_NAME")||(a==null?void 0:a.connectionName)||"",E.value=y("ZONE")||(a==null?void 0:a.zone)||"",i.value=y("OBJECT_STORAGE_BUCKET")||i.value},he=async()=>{v("NAMESPACE",b.value),Y(),Z.value="",$.value=[],await Promise.all([Sa(),Wa()]),await B(),await ca(),w.value&&await La()},we=async()=>{u.value="",f.value="",d.value="",p.value="",E.value="",I.value="",Ja(),Ta(),Y(),await Da(),N()},Ma=()=>{N()},ye=async()=>{Xe(),Z.value="",$.value=[],w.value&&await La()},Ve=()=>{var e;const a=$.value.find(n=>n.value===Z.value);a&&(v("SSH_HOST",a.value),v("DB_HOST",a.value),(e=a.meta)!=null&&e.sshUser&&v("SSH_USER",a.meta.sshUser))},ke=async()=>{ae(),I.value="",await Sa(),await B(),await Ia(),await ca(),N()},Re=()=>{N()},Pe=()=>{i.value=(i.value||"").trim(),N()},Ae=()=>{N()},Te=async()=>{ka.value=!0,f.value="",U.value=[],await B(),N()},Me=async()=>{await Da()},Da=async()=>{const a=z.value;z.value=!0;try{await De(),await ze(),Ta(),await Le(),Ue(),await Fa(),await za(),await Promise.all([Sa(),Wa()]),await B(),await Ia(),await ca(),w.value&&await La()}finally{await oe(),z.value=a,N()}},De=async()=>{var e;const a=++ga;H.value=[];try{const{data:n}=await on();if(a!==ga)return;const s=A(n);H.value=s.length>0?s:Na.map(o=>({label:o,value:o}))}catch{if(a!==ga)return;H.value=Na.map(s=>({label:s,value:s}))}a===ga&&(H.value.some(n=>n.value===r.value)||(r.value=((e=H.value[0])==null?void 0:e.value)||""))},ze=async()=>{const a=++Ca;ea.value=[];try{const{data:e}=await sn();if(a!==Ca)return;ea.value=A(e),b.value||(b.value=W())}catch{if(a!==Ca)return;ea.value=[]}},Le=async()=>{const a=++ia;L.value=[];try{const{data:e}=await ln(r.value);if(a!==ia)return;L.value=A(e)}catch{if(a!==ia)return;L.value=[]}},Ue=()=>{var e;if(L.value.length===0||u.value&&j(u.value,L.value))return;const a=y("REGION");if(a&&j(a,L.value)){u.value=a;return}u.value=((e=L.value[0])==null?void 0:e.value)||u.value},xe=(a=!1)=>{if(x.value.length===0){p.value="";return}if(!a&&p.value&&j(p.value,x.value))return;const e=G(),n=x.value.find(t=>t.value===e);if(a&&!n){p.value=e;return}const s=n||x.value[0];p.value=(s==null?void 0:s.value)||"";const o=Ge(p.value);!u.value&&o&&(u.value=o)},Ge=a=>{const e=`${r.value}-`;return a!=null&&a.startsWith(e)?a.slice(e.length):""},B=async()=>{const a=++Ea;if(U.value=[],!d.value){f.value="";return}try{const e={providerName:r.value,regionName:u.value,connectionName:p.value||G(),matchedSpecId:d.value,isKubernetesImage:M.value?"true":void 0},{data:n}=await ja(ne(),"image",e);if(a!==Ea)return;U.value=A(n,"image"),Fe()}catch{if(a!==Ea)return;U.value=[]}},Sa=async()=>{const a=++Oa;na.value=[];try{const e={providerName:r.value,regionName:u.value,connectionName:p.value||G()},{data:n}=await ja(ne(),"spec",e);if(a!==Oa)return;na.value=A(n,"spec"),ma()}catch{if(a!==Oa)return;na.value=[],ma()}},Fa=async()=>{const a=++fa;x.value=[];try{const e={providerName:r.value,regionName:u.value,filterVerified:"true"},{data:n}=await ue(e);if(a!==fa)return;let s=A(n),o=!1;if(s.length===0&&u.value){const t=await ue({providerName:r.value,filterVerified:"true"});if(a!==fa)return;s=A(t.data),o=!0}x.value=s,xe(o)}catch{if(a!==fa)return;x.value=[]}},za=async()=>{const a=++ha;if(P.value=[],!(!_.value||!r.value||!u.value))try{const{data:e}=await rn({providerName:r.value,regionName:u.value});if(a!==ha)return;P.value=A(e,"k8sVersion"),Ke()}catch{if(a!==ha)return;P.value=[]}},Ke=()=>{var n,s;if(!_.value||P.value.length===0||I.value&&j(I.value,P.value))return;const a=F()?y("K8S_VERSION"):g("K8S_VERSION");if(a&&j(a,P.value)){I.value=a,N();return}const e=(n=Aa())==null?void 0:n.k8sVersion;if(e&&j(e,P.value)){I.value=e,N();return}I.value=((s=P.value[0])==null?void 0:s.value)||I.value,N()},Ia=async()=>{const a=++_a;if(J.value=[],!d.value){sa.value=!1;return}sa.value=!0;try{const{data:e}=await un({specId:d.value,providerName:r.value,regionName:u.value,connectionName:p.value||G()});if(a!==_a)return;J.value=A(e),E.value&&!J.value.some(n=>n.value===E.value)&&(E.value=""),sa.value=!1}catch{if(a!==_a)return;J.value=[],sa.value=!1}},ca=async()=>{const a=++wa;if(la.value=[],ra.value={},da.value={},!ua.value)return;const e=g("OBJECT_STORAGE_NAMESPACE")||b.value||W(),n=r.value;if(!(!e||!n))try{const{data:s}=await ja(e,"objectStorage",{providerName:n});if(a!==wa)return;const o=(s==null?void 0:s.data)??s,t=Array.isArray(o)?o:[],C={},D={};la.value=t.map(S=>{const K=String((S==null?void 0:S.id)||(S==null?void 0:S.name)||"").trim();if(!K)return null;C[K]=String((S==null?void 0:S.cspResourceName)||"").trim();const $a=String((S==null?void 0:S.region)||"").trim();return D[K]=$a,{label:K,value:K}}).filter(S=>S!==null),ra.value=C,da.value=D}catch{if(a!==wa)return;la.value=[],ra.value={},da.value={}}},Wa=async()=>{const a=++ya;if(oa.value=[],!!b.value)try{const{data:e}=await cn(b.value,{option:"simple"});if(a!==ya)return;oa.value=A(e)}catch{if(a!==ya)return;oa.value=[]}},La=async()=>{const a=++Va;if($.value=[],!(!b.value||!w.value))try{const{data:e}=await vn(b.value,w.value,{option:"accessinfo",accessInfoOption:"showSshKey"});if(a!==Va)return;$.value=Ye(e)}catch{if(a!==Va)return;$.value=[]}},A=(a,e="default")=>{const n=(a==null?void 0:a.data)??a,s=ee(n),o=new Set;return s.map(t=>{const C=Be(t,e),D=je(t,C,e),S=qe(t,C,D,e);return{label:D,value:C,searchText:S}}).filter(t=>!t.value||o.has(t.value)?!1:(o.add(t.value),!0)).sort(Ua)};function $e(a){return[...a].sort(Ua)}function Ua(a,e){const n=(a.label||a.value||"").trim(),s=(e.label||e.value||"").trim(),o=n.localeCompare(s,void 0,{numeric:!0,sensitivity:"base"});return o!==0?o:(a.value||"").localeCompare(e.value||"",void 0,{numeric:!0,sensitivity:"base"})}const Be=(a,e)=>{if(e==="k8sVersion")return String(T([a==null?void 0:a.id,a==null?void 0:a.version,a==null?void 0:a.value,a==null?void 0:a.name,a]));if(e==="spec"){const n=T([a==null?void 0:a.specId,a==null?void 0:a.id,a==null?void 0:a.cspSpecId,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.specName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.name]);return String(Ze(a,n))}return String(T(e==="image"?[a==null?void 0:a.imageId,a==null?void 0:a.id,a==null?void 0:a.cspImageId,a==null?void 0:a.name]:[],[a==null?void 0:a.id,a==null?void 0:a.specId,a==null?void 0:a.imageId,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,a==null?void 0:a.nsId,a==null?void 0:a.name,a==null?void 0:a.infraId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,a==null?void 0:a.zoneId,a==null?void 0:a.zoneName,a==null?void 0:a.zone,a==null?void 0:a.assignedZone,a]))},je=(a,e,n)=>{if(n==="k8sVersion")return Ga(e,xa(e,[a==null?void 0:a.name,a==null?void 0:a.displayName,a==null?void 0:a.version,a==null?void 0:a.value]));if(n==="image")return Ga(e,xa(e,[a==null?void 0:a.displayName,a==null?void 0:a.imageName,a==null?void 0:a.cspImageName,a==null?void 0:a.guestOS,a==null?void 0:a.GuestOS,a==null?void 0:a.guestOs,a==null?void 0:a.osDistribution,a==null?void 0:a.OSDistribution,a==null?void 0:a.osPlatform,a==null?void 0:a.OSPlatform,a==null?void 0:a.description,a==null?void 0:a.Description,a==null?void 0:a.name]));if(n==="spec"){const o=xa(e,[a==null?void 0:a.displayName,a==null?void 0:a.specName,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.description,a==null?void 0:a.Description,a==null?void 0:a.name])||Qa(a);return Ga(e,o)}const s=T([a==null?void 0:a.name,a==null?void 0:a.id,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,a==null?void 0:a.nsId,a==null?void 0:a.infraId,a==null?void 0:a.specName,a==null?void 0:a.imageName,a==null?void 0:a.specId,a==null?void 0:a.imageId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,a==null?void 0:a.zoneId,a==null?void 0:a.zoneName,a==null?void 0:a.zone,a==null?void 0:a.assignedZone,e]);return String(s)},qe=(a,e,n,s)=>{const o=T([a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,r.value]),t=T([a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,u.value]),C=s==="image"?[a==null?void 0:a.displayName,a==null?void 0:a.imageName,a==null?void 0:a.cspImageName,a==null?void 0:a.guestOS,a==null?void 0:a.GuestOS,a==null?void 0:a.guestOs,a==null?void 0:a.osDistribution,a==null?void 0:a.OSDistribution,a==null?void 0:a.osPlatform,a==null?void 0:a.OSPlatform,a==null?void 0:a.description,a==null?void 0:a.Description]:[],D=s==="spec"?[a==null?void 0:a.displayName,a==null?void 0:a.specName,a==null?void 0:a.cspSpecName,a==null?void 0:a.CspSpecName,a==null?void 0:a.Name,a==null?void 0:a.VMSpecName,a==null?void 0:a.description,a==null?void 0:a.Description,Qa(a)]:[],S=s==="k8sVersion"?[a==null?void 0:a.name,a==null?void 0:a.displayName,a==null?void 0:a.version,a==null?void 0:a.value]:[],K=Ya([e,n,a==null?void 0:a.id,a==null?void 0:a.name,a==null?void 0:a.imageId,a==null?void 0:a.specId,a==null?void 0:a.cspImageId,a==null?void 0:a.cspSpecId,a==null?void 0:a.configName,a==null?void 0:a.connectionName,a==null?void 0:a.infraId,a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.assignedRegion,...C,...D,...S]),$a=Ya(K.flatMap(Ba=>[o&&t?`${o}+${t}+${Ba}`:"",o&&t?`${o}-${t}-${Ba}`:"",o&&t?`${o} ${t} ${Ba}`:""]));return[...K,...$a].join(`
`)},Ya=a=>{const e=new Set;return a.map(n=>n==null?"":String(n).trim()).filter(n=>!n||e.has(n)?!1:(e.add(n),!0))},T=(...a)=>{for(const e of a)for(const n of e){const s=n==null?"":String(n).trim();if(s)return s}return""},xa=(a,e)=>{const n=V(a);for(const s of e){const o=He(s==null?"":String(s).trim(),a);if(o&&V(o)!==n)return o}return""},He=(a,e)=>!a||!e?a:a.replace(new RegExp(`\\s*\\(${Xa(e)}\\)\\s*$`),"").replace(new RegExp(`^${Xa(e)}\\s*/\\s*`),"").trim(),Xa=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ga=(a,e)=>e?`${a} / ${e}`:a,Qa=a=>{var o;const e=T([a==null?void 0:a.vCpu,(o=a==null?void 0:a.VCpu)==null?void 0:o.Count,a==null?void 0:a.VCpu,a==null?void 0:a.num_vCPU]),n=T([a==null?void 0:a.memoryGiB,a==null?void 0:a.mem_GiB,Je(a==null?void 0:a.MemSizeMib)]),s=[];return e&&s.push(`${e} vCPU`),n&&s.push(`${n} GiB`),s.join(" / ")},Ze=(a,e)=>{if(!e)return"";if(e.includes("+"))return e;const n=T([a==null?void 0:a.providerName,a==null?void 0:a.provider,a==null?void 0:a.csp,a==null?void 0:a.cspName,r.value]),s=T([a==null?void 0:a.regionName,a==null?void 0:a.RegionName,a==null?void 0:a.region,a==null?void 0:a.Region,a==null?void 0:a.assignedRegion,u.value]);return n&&s?`${n}+${s}+${e}`:e},Je=a=>{const e=a==null?"":String(a).trim();if(!e)return"";const n=Number(e);if(Number.isNaN(n))return"";const s=n/1024;return Number.isInteger(s)?String(s):s.toFixed(2)},ma=()=>{!d.value||!We(d.value)||(d.value="",N())},ae=()=>{f.value="",d.value=""},Fe=()=>{!f.value||U.value.length===0||j(f.value,U.value)||(f.value="",N())},j=(a,e)=>{const n=V(a);return e.some(s=>V(s.value)===n||V(s.label)===n||V(s.searchText).split(`
`).some(o=>o.trim()===n))},We=a=>{const e=V(a);if(!e)return!1;const n=V(G()),s=V(p.value),o=V(u.value),t=V(r.value);return e===n||e===s||e===o||e===t},V=a=>(a||"").trim().toLowerCase(),ee=a=>{if(Array.isArray(a))return a;if(!a||typeof a!="object")return[];const e=["ns","namespace","namespaces","namespaceList","provider","providers","providerList","connectionconfig","connConfig","connConfigs","connectionConfig","connectionConfigs","infra","infras","infraList","regions","region","regionList","availableZones","allVerifiedZones","zones","zoneList","availableK8sVersion","availableK8sVersions","k8sVersion","k8sVersions","versions","versionList","images","image","imageList","specs","spec","specList","idList","output","resources","resource","resourceList","items","list","result"];for(const n of e)if(Array.isArray(a[n]))return a[n];for(const n of Object.values(a)){const s=ee(n);if(s.length>0)return s}return[]},Ye=a=>{const e=(a==null?void 0:a.data)??a,n=[];Ka(e,n);const s=new Set;return n.map(o=>{const t=String((o==null?void 0:o.publicIP)??(o==null?void 0:o.publicIp)??(o==null?void 0:o.privateIP)??(o==null?void 0:o.privateIp)??(o==null?void 0:o.host)??""),C=String((o==null?void 0:o.nodeId)??(o==null?void 0:o.id)??(o==null?void 0:o.name)??""),D=String((o==null?void 0:o.nodeUserName)??(o==null?void 0:o.userName)??(o==null?void 0:o.sshUser)??"");return{label:`${C?`${C} / `:""}${t}`,value:t,meta:{sshUser:D,nodeId:C}}}).filter(o=>!o.value||s.has(o.value)?!1:(s.add(o.value),!0)).sort(Ua)},Ka=(a,e)=>{if(Array.isArray(a)){a.forEach(s=>Ka(s,e));return}if(!a||typeof a!="object")return;(a.publicIP||a.publicIp||a.privateIP||a.privateIp||a.host)&&e.push(a),Object.values(a).forEach(s=>Ka(s,e))},g=a=>{var e;return((e=pa.value.find(n=>{var s;return((s=n.paramKey)==null?void 0:s.toUpperCase())===a.toUpperCase()}))==null?void 0:e.paramValue)||""},va=a=>pa.value.some(e=>{var n;return((n=e.paramKey)==null?void 0:n.trim().toUpperCase())===a.toUpperCase()}),Xe=()=>{v("INFRA_ID",w.value),(_.value||va("K8S_CLUSTER_ID"))&&v("K8S_CLUSTER_ID",w.value)},W=()=>b.value||g("NAMESPACE")||ve.projectInfo.ns_id||"",ne=()=>b.value||W()||"system",Y=()=>{if(!ua.value)return;const a=b.value||W();a&&va("OBJECT_STORAGE_NAMESPACE")&&v("OBJECT_STORAGE_NAMESPACE",a),r.value&&va("OBJECT_STORAGE_PROVIDER")&&v("OBJECT_STORAGE_PROVIDER",r.value);const e=da.value[i.value]||u.value;e&&va("OBJECT_STORAGE_REGION")&&v("OBJECT_STORAGE_REGION",e)},N=()=>{const a=b.value||W();if(a&&v("NAMESPACE",a),v("PROVIDER",r.value),v("CSP",r.value),F()){const e=Pa(r.value);e&&(v(`${e}_REGION`,u.value),v(`${e}_CONNECTION_NAME`,p.value||G()),v(`${e}_ZONE`,E.value),v(`${e}_IMAGE_ID`,f.value),v(`${e}_SPEC_ID`,d.value),_.value&&v(`${e}_K8S_VERSION`,I.value));return}v("REGION",u.value),v("CONNECTION_NAME",p.value||G()),v("ZONE",E.value),v("IMAGE",f.value),v("IMAGE_ID",f.value),v("SPEC",d.value),v("SPEC_ID",d.value),_.value&&v("K8S_VERSION",I.value),Y(),ua.value&&i.value&&va("OBJECT_STORAGE_BUCKET")&&v("OBJECT_STORAGE_BUCKET",i.value)},X=(a,e)=>{var n;return e?((n=a.find(s=>s.value===e))==null?void 0:n.label)||e:""},v=(a,e,n="N")=>{if(!a)return;const s=a.trim().toUpperCase(),o=pa.value.find(t=>{var C;return((C=t.paramKey)==null?void 0:C.trim().toUpperCase())===s});if(o){o.paramValue=e,o.eventListenerYn=o.eventListenerYn||n;return}pa.value.push({paramIdx:0,paramKey:s,paramValue:e,eventListenerYn:n})};return(a,e)=>Se.value?(m(),Q("div",pn,[e[25]||(e[25]=l("label",{class:"form-label"},"Tumblebug Parameter Selection",-1)),l("div",dn,[l("div",gn,[l("label",fn,[l("code",null,h(O("NAMESPACE")),1),e[12]||(e[12]=l("span",null,"Namespace",-1))]),k(R,{modelValue:b.value,"onUpdate:modelValue":e[0]||(e[0]=n=>b.value=n),options:ea.value,placeholder:"Namespace",title:X(ea.value,b.value),"allow-custom":"",onChange:he},null,8,["modelValue","options","title"])]),l("div",Sn,[l("label",In,[l("code",null,h(O(["PROVIDER","CSP"])),1),e[13]||(e[13]=l("span",null,"CSP",-1))]),k(R,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=n=>r.value=n),options:H.value,placeholder:"CSP",onChange:we},null,8,["modelValue","options"])]),l("div",bn,[l("label",Nn,[l("code",null,h(O("REGION")),1),e[14]||(e[14]=l("span",null,"Region",-1))]),k(R,{modelValue:u.value,"onUpdate:modelValue":e[2]||(e[2]=n=>u.value=n),options:L.value,placeholder:"Region",onChange:Ma},null,8,["modelValue","options"])])]),l("div",Cn,[l("div",En,[l("label",On,[l("code",null,h(Oe()),1),e[15]||(e[15]=l("span",null,"VM/K8s Spec",-1))]),k(R,{modelValue:d.value,"onUpdate:modelValue":e[3]||(e[3]=n=>d.value=n),options:na.value,placeholder:"VM/K8s Spec",title:X(na.value,d.value),onChange:Ma},null,8,["modelValue","options","title"])]),l("div",_n,[l("label",hn,[l("code",null,h(Ee()),1),l("span",wn,[e[17]||(e[17]=l("span",null,"Image",-1)),l("span",yn,[en(l("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=n=>M.value=n),onChange:Te},null,544),[[nn,M.value]]),e[16]||(e[16]=l("span",{class:"form-check-label"},"K8s",-1))])])]),k(R,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=n=>f.value=n),options:U.value,placeholder:d.value?M.value?"K8s Image":"Image":"Select Spec first",title:X(U.value,f.value),onChange:Ma},null,8,["modelValue","options","placeholder","title"])])]),l("div",Vn,[l("div",kn,[l("label",Rn,[l("code",null,h(O("INFRA_ID")),1),e[18]||(e[18]=l("span",null,"Existing Infra",-1))]),k(R,{modelValue:w.value,"onUpdate:modelValue":e[6]||(e[6]=n=>w.value=n),options:oa.value,placeholder:"Infra ID",title:X(oa.value,w.value),"allow-custom":"",onChange:ye},null,8,["modelValue","options","title"])]),l("div",Pn,[l("label",An,[l("code",null,h(O(["SSH_HOST","DB_HOST"])),1),e[19]||(e[19]=l("span",null,"SSH/DB Host",-1))]),k(R,{modelValue:Z.value,"onUpdate:modelValue":e[7]||(e[7]=n=>Z.value=n),options:$.value,placeholder:"SSH/DB Host",onChange:Ve},null,8,["modelValue","options"])]),l("div",{class:"tumblebug-param-field g-col-2"},[e[20]||(e[20]=l("label",{class:"tumblebug-param-label tumblebug-param-action-label"},[l("span",null,"Reload")],-1)),l("button",{class:"btn btn-outline-primary w-100",onClick:Me}," Refresh ")])]),l("div",Tn,[l("div",{class:se(["tumblebug-param-field",_.value?"g-col-4":"g-col-6"])},[l("label",Mn,[l("code",null,h(O("CONNECTION_NAME")),1),e[21]||(e[21]=l("span",null,"Connection Config",-1))]),k(R,{modelValue:p.value,"onUpdate:modelValue":e[8]||(e[8]=n=>p.value=n),options:x.value,placeholder:"Connection Config",onChange:ke},null,8,["modelValue","options"])],2),l("div",{class:se(["tumblebug-param-field",_.value?"g-col-4":"g-col-6"])},[l("label",Dn,[l("code",null,h(O("ZONE")),1),e[22]||(e[22]=l("span",null,"Zone",-1))]),k(R,{modelValue:E.value,"onUpdate:modelValue":e[9]||(e[9]=n=>E.value=n),options:Ra.value,placeholder:be.value,onChange:Re},null,8,["modelValue","options","placeholder"])],2),_.value?(m(),Q("div",zn,[l("label",Ln,[l("code",null,h(O("K8S_VERSION")),1),e[23]||(e[23]=l("span",null,"K8s Version",-1))]),k(R,{modelValue:I.value,"onUpdate:modelValue":e[10]||(e[10]=n=>I.value=n),options:P.value,placeholder:"K8s Version",title:X(P.value,I.value),onChange:Ae},null,8,["modelValue","options","title"])])):ba("",!0)]),ua.value?(m(),Q("div",Un,[l("div",xn,[l("label",Gn,[l("code",null,h(O("OBJECT_STORAGE_BUCKET")),1),e[24]||(e[24]=l("span",null,"Bucket Name",-1))]),k(R,{modelValue:i.value,"onUpdate:modelValue":e[11]||(e[11]=n=>i.value=n),options:la.value,placeholder:"Bucket Name",title:X(la.value,i.value),"allow-custom":"",onChange:Pe},null,8,["modelValue","options","title"]),i.value?(m(),Q("small",Kn,[ra.value[i.value]?(m(),Q(le,{key:0},[re(" CSP bucket: "+h(ra.value[i.value]),1)],64)):(m(),Q(le,{key:1},[re(" Not registered yet. The run creates it and resolves the CSP bucket name. ")],64))])):ba("",!0)])])):ba("",!0)])):ba("",!0)}}),Hn=tn($n,[["__scopeId","data-v-cc3b4b5f"]]);export{Hn as T};
diff --git a/src/main/resources/static/assets/WorkflowForm-B-l55TnO.js b/src/main/resources/static/assets/WorkflowForm-DJg8ZeUF.js
similarity index 99%
rename from src/main/resources/static/assets/WorkflowForm-B-l55TnO.js
rename to src/main/resources/static/assets/WorkflowForm-DJg8ZeUF.js
index d875f76..503f957 100644
--- a/src/main/resources/static/assets/WorkflowForm-B-l55TnO.js
+++ b/src/main/resources/static/assets/WorkflowForm-DJg8ZeUF.js
@@ -1,4 +1,4 @@
-import{d as hi,A as Cs,o as io,r as we,h as nn,z as Rl,s as Qr,B as Ym,C as eh,D as jm,E as Xm,G as th,w as Vn,g as Te,c as Ie,q as Ms,k as pt,a as se,F as Cn,e as ci,t as qe,j as pn,i as ht,H as Yr,I as nh,u as Nl,m as ih,p as Zm,l as Qm,b as ms,f as Jm,v as qm,J as Oc,x as Fc,K as ey,L as ty,N as ny}from"./index-CtQCsPEr.js";import{f as iy}from"./oss-Be13WU3l.js";import{h as ry,i as oy,j as sy,g as ay,k as ly,l as uy,m as cy,b as pl,n as Pc,o as hy,p as fy,q as dy,s as py,S as bn,P as gy,t as vy,u as my,v as yy,w as wy}from"./SearchableSelect-TBocqjLd.js";import{_ as ro}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as by}from"./request-txnOTK5f.js";/*!
+import{d as hi,A as Cs,o as io,r as we,h as nn,z as Rl,s as Qr,B as Ym,C as eh,D as jm,E as Xm,G as th,w as Vn,g as Te,c as Ie,q as Ms,k as pt,a as se,F as Cn,e as ci,t as qe,j as pn,i as ht,H as Yr,I as nh,u as Nl,m as ih,p as Zm,l as Qm,b as ms,f as Jm,v as qm,J as Oc,x as Fc,K as ey,L as ty,N as ny}from"./index-Woncnlsa.js";import{f as iy}from"./oss-BcA1Ys4Q.js";import{h as ry,i as oy,j as sy,g as ay,k as ly,l as uy,m as cy,b as pl,n as Pc,o as hy,p as fy,q as dy,s as py,S as bn,P as gy,t as vy,u as my,v as yy,w as wy}from"./SearchableSelect-DlLPIFTu.js";import{_ as ro}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as by}from"./request-DPzMytGP.js";/*!
* vue-draggable-next v2.3.0
* (c) 2025 Anish George
* @license MIT
diff --git a/src/main/resources/static/assets/WorkflowList-C9mZIQL4.js b/src/main/resources/static/assets/WorkflowList-BTwN2T6N.js
similarity index 98%
rename from src/main/resources/static/assets/WorkflowList-C9mZIQL4.js
rename to src/main/resources/static/assets/WorkflowList-BTwN2T6N.js
index ff72b5d..6146333 100644
--- a/src/main/resources/static/assets/WorkflowList-C9mZIQL4.js
+++ b/src/main/resources/static/assets/WorkflowList-BTwN2T6N.js
@@ -1,4 +1,4 @@
-import{_ as Re}from"./TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js";import{_ as $e}from"./request-txnOTK5f.js";import{e as Oe,d as We,g as xe,P as Ae,r as De,a as Me,b as Ge,c as Fe,f as Ve}from"./SearchableSelect-TBocqjLd.js";import{d as Q,u as ee,c as $,a as s,t as K,g as E,l as Te,w as Ie,o as se,m as re,n as Be,j as z,p as be,q as Ke,h as ae,r as S,M as ye,s as Ne,x as ze,F as je,e as Ue,y as _e,i as B,z as qe}from"./index-CtQCsPEr.js";import{T as He}from"./TumblebugParamSelector-Sfwskzms.js";import{_ as Ze}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ye={class:"modal modal-blur fade",id:"deleteWorkflow",tabindex:"-1","aria-hidden":"true"},Xe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Je={class:"modal-content"},Qe={class:"modal-body py-4"},et={class:"modal-footer"},tt=Q({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=F,C=x,N=async()=>{const{data:g}=await Oe(L.workflowIdx);if(g){p.error("Workflows linked to an Event Listener cannot be deleted."),C("get-workflow-list");return}const{data:l}=await We(L.workflowIdx);l?p.success("Deleted successfully."):p.error("Failed to delete."),C("get-workflow-list")};return(g,l)=>(E(),$("div",Ye,[s("div",Xe,[s("div",Je,[l[2]||(l[2]=s("div",{class:"modal-status bg-danger"},null,-1)),l[3]||(l[3]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Delete Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),s("div",Qe,[s("h4",null,"Are you sure you want to delete "+K(L.workflowName)+"?",1)]),s("div",et,[l[1]||(l[1]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=h=>N())}," Delete ")])])])]))}}),ot={class:"modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable",role:"document"},at={class:"modal-content"},st={key:0,class:"run-progress"},rt={class:"d-flex align-items-center justify-content-between mb-2"},nt={class:"text-muted"},lt={class:"text-muted"},it={class:"progress"},ct=["aria-valuenow"],ut={class:"modal-body py-4"},dt={key:0,class:"d-flex justify-content-center py-4"},ft={class:"modal-footer"},mt=["aria-disabled"],wt=Q({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=Te(),C=F,N=x,g=ae(()=>C.workflowIdx),l=S({}),h=S(!1),_=S(!1),I=S(),w=S({active:!1,completed:0,total:0,message:""}),D=ae(()=>w.value.total?Math.min(100,Math.round(w.value.completed/w.value.total*100)):0);Ie(()=>g.value,async()=>{var e;(e=I.value)!=null&&e.classList.contains("show")&&await k()}),se(()=>{var e;(e=I.value)==null||e.addEventListener("show.bs.modal",M)}),re(()=>{var e;(e=I.value)==null||e.removeEventListener("show.bs.modal",M)});const M=async()=>{await k()},k=async()=>{if(!g.value){l.value={};return}_.value=!0;try{const{data:e}=await xe(g.value,"N");V(e),l.value=e}catch(e){console.log(e),p.error("Failed to load workflow run parameters.")}finally{_.value=!1}},V=e=>{var a;const t=(L.projectInfo.ns_id||L.projectInfo.name||"").trim();if(!t)return;const o=(a=e.workflowParams)==null?void 0:a.find(n=>{var f;return((f=n.paramKey)==null?void 0:f.trim().toUpperCase())==="NAMESPACE"});o&&(o.paramValue=t)},j=async()=>{if(!(h.value||_.value)){if(!l.value.workflowInfo){p.error("Failed to load workflow run parameters.");return}h.value=!0;try{if(await T(),!await he()||!await m())return;await d("Requesting workflow run");const{data:e}=await De(A());await b("Workflow run request completed"),e?(p.success("Workflow run request has been submitted."),O()):p.error("Failed to process workflow run request."),N("get-workflow-list")}catch(e){console.log(e),p.error("Failed to process workflow run request.")}finally{h.value=!1,u()}}},A=()=>{const e=l.value.workflowInfo;return{workflowInfo:{workflowIdx:e==null?void 0:e.workflowIdx},workflowParams:[...l.value.workflowParams||[]],workflowStageMappings:[]}},O=()=>{var e;I.value&&((e=ye.getInstance(I.value))==null||e.hide())},T=async()=>{w.value={active:!0,completed:0,total:i(),message:"Preparing pre-run validation"},await c()},u=()=>{w.value.active=!1},d=async e=>{w.value.message=e,await c()},b=async e=>{w.value.completed=Math.min(w.value.completed+1,w.value.total),w.value.message=e,await c()},c=async()=>{await Ne(),await new Promise(e=>{window.requestAnimationFrame(()=>e())})},i=()=>{const e=Y(),t=ie(e),o=ce(e),a=Math.max(1,ue().length),n=a*Number(t)+a*Number(o),f=P()&&G()?1:0;return Math.max(1,n+f+1)},m=async()=>{if(!P())return!0;const e=G();if(!e)return!0;try{await d("Running infra pre-run validation");const{data:t}=await Me(ve(),e);return await b("Infra pre-run validation completed"),q(t)?(p.error(`Infra pre-run validation failed: ${H(t)}`),!1):!0}catch(t){return console.log(t),p.error("Failed to process infra pre-run validation request."),!1}},P=()=>{const e=Y();return e.includes("infra-create")||e.includes("multi-csp-vm-deploy")},G=()=>{var a;const e=r("CSP_LIST").split(",").map(n=>n.trim()).filter(Boolean),o=(e.length>0?e.map(n=>U(`${te(n)}_`,n)):[U("",r("CSP")||r("PROVIDER"))]).filter(Boolean);return o.length===0?null:{name:r("INFRA_ID")||r("INFRA_PREFIX")||((a=l.value.workflowInfo)==null?void 0:a.workflowName)||"workflow-infra",description:r("INFRA_DESC")||"Workflow created infra",installMonAgent:r("INSTALL_MON_AGENT")||"no",policyOnPartialFailure:r("POLICY_ON_PARTIAL_FAILURE")||"continue",nodeGroups:o}},U=(e,t)=>{const o=r(`${e}REGION`)||r("REGION"),a=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,o),n=r(`${e}SPEC_ID`)||r("SPEC_ID"),f=r(`${e}IMAGE_ID`)||r("IMAGE_ID");if(!n||!f)return null;const v={name:R(e,t),nodeGroupSize:Number(r("INFRA_NODEGROUP_SIZE")||"1"),specId:n,imageId:f,rootDiskType:r("ROOT_DISK_TYPE")||"default",rootDiskSize:Number(r("ROOT_DISK_SIZE")||"50")};a&&(v.connectionName=a);const y=r(`${e}ZONE`)||r("ZONE");return y&&(v.zone=y),v},R=(e,t)=>{const o=r(`${e}NODEGROUP_NAME`);return o||(t?`${r("INFRA_NODEGROUP_PREFIX")||r("INFRA_NODEGROUP_NAME")||"ng"}-${te(t).toLowerCase().replace(/_/g,"-")}`:r("INFRA_NODEGROUP_NAME")||"g1")},q=e=>{if(!e||Z(e,["reviewStatus","status","validationStatus"]).map(a=>W(a)).some(a=>["error","failed","fail"].includes(a)))return!0;const o=JSON.stringify(e).toLowerCase();return o.includes('"reviewstatus":"error"')||o.includes('"status":"error"')||o.includes("sold out")},H=e=>Z(e,["message","details","detail","reason","errorMessage"]).map(o=>String(o||"").trim()).filter(Boolean)[0]||"The selected Image/Spec combination cannot create resources.",Z=(e,t)=>{if(Array.isArray(e))return e.flatMap(a=>Z(a,t));if(!e||typeof e!="object")return[];const o=t.map(a=>a.toLowerCase());return Object.entries(e).flatMap(([a,n])=>[...o.includes(a.toLowerCase())?[n]:[],...Z(n,t)])},he=async()=>{l.value.workflowParams;const e=Y(),t=ie(e),o=ce(e);if(!t&&!o)return!0;const a=ue(),n=[];if(a.length>0)for(const f of a){const v=`${te(f)}_`;o&&await le(v,f,n),t&&await ne(v,f,n)}else{const f=r("CSP")||r("PROVIDER");o&&await le("",f,n),t&&await ne("",f,n)}return n.length>0?(p.error(`Please reselect ${n.join(", ")} for the current Region/Connection.`),!1):!0},ne=async(e,t,o)=>{const a=`${e}SPEC_ID`,n=r(a),f=r(`${e}REGION`)||r("REGION"),v=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,f);if(!n||ke(n,v,f,t)){o.push(a);return}const y=ge(n);if(y.region&&f&&!pe(y.region,f)){o.push(a);return}await d(`Validating ${a} list`),await de("spec",n,t,f,v)||o.push(a),await b(`${a} list validation completed`)},le=async(e,t,o)=>{const a=`${e}IMAGE_ID`,n=r(a),f=r(`${e}SPEC_ID`),v=r(`${e}REGION`)||r("REGION"),y=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,v),X=Se(Y());if(X&&Ce(t))return;if(!n||ke(n,y,v,t)){o.push(a);return}const J=ge(n);if(J.region&&v&&!pe(J.region,v)){o.push(a);return}await d(`Validating ${a} list`),await de("image",n,t,v,y,f,X)||o.push(a),await b(`${a} list validation completed`)},Y=()=>(l.value.workflowStageMappings||[]).map(e=>String(e.workflowStageName||"").trim().toLowerCase()),ie=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),ce=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),Se=e=>e.some(t=>["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"].includes(t)),Ce=e=>["azure","ibm","ncp","tencent"].includes(W(e)),ue=()=>r("CSP_LIST").split(",").map(e=>e.trim()).filter(Boolean),de=async(e,t,o,a,n,f="",v=!1)=>{if(!t||!o||!a)return!1;try{const{data:y}=await Ge(ve(),e,{providerName:o,regionName:a,connectionName:n,matchedSpecId:e==="image"?f:"",isKubernetesImage:e==="image"&&v?"true":void 0}),X=fe((y==null?void 0:y.data)??y),J=W(t);return X.some(Pe=>Ee(Pe,e).some(Le=>W(Le)===J))}catch(y){return console.log(y),!1}},Ee=(e,t)=>e==null?[]:typeof e!="object"?[String(e)]:me(t==="image"?[e.id,e.name,e.imageId,e.cspImageId,e.cspImageName,e.imageName,e.displayName]:[e.id,e.name,e.specId,e.cspSpecId,e.cspSpecName,e.CspSpecName,e.specName,e.Name,e.VMSpecName]),fe=e=>{if(Array.isArray(e))return e;if(!e||typeof e!="object")return[];const t=["images","image","imageList","specs","spec","specList","resources","resource","resourceList","items","list","result","output"];for(const o of t)if(Array.isArray(e[o]))return e[o];for(const o of Object.values(e)){const a=fe(o);if(a.length>0)return a}return[]},me=e=>{const t=new Set;return e.map(o=>o==null?"":String(o).trim()).filter(o=>!o||t.has(o)?!1:(t.add(o),!0))},r=e=>{const t=we(e),o=(l.value.workflowParams||[]).find(a=>we(a.paramKey)===t);return String((o==null?void 0:o.paramValue)||"").trim()},we=e=>String(e||"").trim().toUpperCase(),te=e=>String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),W=e=>String(e||"").trim().toLowerCase(),pe=(e,t)=>{const o=W(e),a=W(t);return!o||!a?!0:o===a||o.startsWith(`${a}-`)||a.startsWith(`${o}-`)},oe=(e,t)=>e&&t?`${e}-${t}`:"",ge=e=>{const t=String(e||"").split("+");return t.length<3?{provider:"",region:""}:{provider:t[0],region:t[1]}},ve=()=>r("NAMESPACE")||"system",ke=(e,t,o,a)=>{const n=W(e);return n?n===W(t)||n===W(o)||n===W(a):!0};return(e,t)=>{var o;return E(),$("div",{class:"modal modal-blur fade",id:"runWorkflow",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:I},[s("div",ot,[s("div",at,[t[3]||(t[3]=s("div",{class:"modal-status bg-info"},null,-1)),t[4]||(t[4]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Run Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),w.value.active?(E(),$("div",st,[s("div",rt,[s("span",nt,K(w.value.message),1),s("span",lt,K(w.value.completed)+" / "+K(w.value.total),1)]),s("div",it,[s("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Be({width:`${D.value}%`}),"aria-valuenow":D.value,"aria-valuemin":"0","aria-valuemax":"100"},null,12,ct)])])):z("",!0),s("div",ut,[_.value?(E(),$("div",dt,[...t[1]||(t[1]=[s("div",{class:"spinner-border",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)])])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(He,{key:1,"workflow-name":(o=l.value.workflowInfo)==null?void 0:o.workflowName,"workflow-param-data":l.value.workflowParams,"workflow-stage-mappings":l.value.workflowStageMappings||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(Ae,{key:2,popup:!0,"workflow-param-data":l.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):z("",!0)]),s("div",ft,[t[2]||(t[2]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("button",{type:"button",class:Ke(["btn btn-primary ms-auto",{disabled:h.value||_.value}]),"aria-disabled":h.value||_.value,onClick:t[0]||(t[0]=a=>j())},K(h.value?"Running...":"Run"),11,mt)])])])],512)}}}),pt=Ze(wt,[["__scopeId","data-v-cdce1b7e"]]),gt={class:"modal-dialog modal-xl",role:"document"},vt={class:"modal-content"},kt={class:"modal-body text-left py-4"},bt={class:"mb-5"},_t={key:0,class:"spinner-border",role:"status"},It={key:0},yt={class:"card mb-3"},Nt=["onClick"],ht={class:"card-title"},St={key:0,class:"card-body"},Ct=["value"],Et=3e3,Pt=Q({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(F,{emit:x}){const p=ee(),L=F,C=S(!1),N=S(),g=ae(()=>L.workflowIdx);Ie(g,async()=>{var u;(u=N.value)!=null&&u.classList.contains("show")&&(O(),await I(!0),A())}),se(()=>{var u,d;(u=N.value)==null||u.addEventListener("show.bs.modal",w),(d=N.value)==null||d.addEventListener("hidden.bs.modal",D)}),re(()=>{var u,d;(u=N.value)==null||u.removeEventListener("show.bs.modal",w),(d=N.value)==null||d.removeEventListener("hidden.bs.modal",D),O()});const l=S([]);let h,_=!1;const I=async(u=!0)=>{if(!g.value){l.value=[],C.value=!0,O();return}_||(_=!0,u&&(C.value=!1,l.value=[]),await Fe(g.value).then(({data:d})=>{var i;const b=Array.isArray(d)?d:[],c=k.value;l.value=b,b.some(m=>m.buildIdx===c)||(k.value=((i=b[0])==null?void 0:i.buildIdx)??0)}).catch(d=>{console.log(d),u&&p.error("Failed to load workflow logs.")}).finally(()=>{u&&(C.value=!0),_=!1}))},w=async()=>{await I(!0),A()},D=()=>{M()},M=()=>{O(),l.value=[],k.value=1},k=S(1),V=u=>{k.value===u?k.value=0:k.value=u},j=u=>u===0?"DB History":u,A=()=>{O(),!(!T()||!g.value)&&(h=setInterval(async()=>{await I(!1),(!T()||!g.value)&&O()},Et))},O=()=>{h&&(clearInterval(h),h=void 0)},T=()=>{var u;return!!((u=N.value)!=null&&u.classList.contains("show"))};return(u,d)=>(E(),$("div",{class:"modal",id:"workflowLog",tabindex:"-1",ref_key:"modalElement",ref:N},[s("div",gt,[s("div",vt,[d[3]||(d[3]=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s("div",kt,[s("h3",bt,[d[1]||(d[1]=ze(" Workflow Log ",-1)),C.value?z("",!0):(E(),$("div",_t,[...d[0]||(d[0]=[s("span",{class:"visually-hidden"},"Loading...",-1)])]))]),s("div",null,[l.value.length<=0?(E(),$("div",It,[...d[2]||(d[2]=[s("p",{class:"text-secondary"},"No Data",-1)])])):(E(!0),$(je,{key:1},Ue(l.value,b=>(E(),$("div",{key:b.buildIdx},[s("div",yt,[s("div",{class:"card-header",onClick:c=>V(b.buildIdx),style:{cursor:"pointer"}},[s("h3",ht,K(j(b.buildIdx)),1)],8,Nt),k.value===b.buildIdx?(E(),$("div",St,[s("textarea",{value:b.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,Ct)])):z("",!0)])]))),128))])]),s("div",{class:"modal-footer"},[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:M}," Cancel ")])])])],512))}}),Lt={class:"card card-flush w-100"},Rt={class:"card-body"},$t={class:"workflow-list-table"},Ot=3e4,Ft=Q({__name:"WorkflowList",setup(F){const x=S(!0);ee();const p=S([]),L=S([]),C=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],N=new Map(C.map((c,i)=>[c,i]));se(async()=>{j(),await I(),h()}),re(()=>{_()});let g,l=!1;const h=()=>{_(),g=setInterval(()=>{I(!1)},Ot)},_=()=>{g&&(clearInterval(g),g=void 0)},I=async(c=!0)=>{if(!l){l=!0;try{c&&(x.value=!0),await Ve("N").then(({data:i})=>{p.value=D(M(i||[],!c))})}catch(i){console.log(i)}finally{c&&(x.value=!1),l=!1}}},w=c=>{var i,m;return String(((i=c.workflowInfo)==null?void 0:i.workflowIdx)||((m=c.workflowInfo)==null?void 0:m.workflowName)||"")},D=c=>[...c].sort((i,m)=>{const P=N.get(i.workflowInfo.workflowName)??C.length,G=N.get(m.workflowInfo.workflowName)??C.length;return P-G}),M=(c,i=!1)=>{if(p.value.length===0)return c;const m=new Map(c.map(R=>[w(R),R])),P=new Set,G=p.value.map(R=>{const q=w(R),H=m.get(q);return H?(P.add(q),H):i?R:null}).filter(R=>R!==null);if(i)return G;const U=c.filter(R=>!P.has(w(R)));return[...G,...U]},k=S(0),V=S(""),j=()=>{L.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",minWidth:220,widthGrow:3,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Purpose",field:"workflowInfo.workflowPurpose",minWidth:150,widthGrow:1.2,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Status",field:"workflowInfo.status",minWidth:150,widthGrow:1,formatter:u,variableHeight:!0},{title:"Params Count",formatter:T,minWidth:120,widthGrow:.8,hozAlign:"center"},{title:"Last Run Date",field:"runDate",minWidth:170,widthGrow:1.6,formatter:d,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Action",minWidth:260,widthGrow:2,formatter:b,cssClass:"workflow-action-cell",headerSort:!1,variableHeight:!0,cellClick:async(c,i)=>{const m=c.target,P=m==null?void 0:m.getAttribute("id");k.value=i.getRow().getData().workflowInfo.workflowIdx,P==="detail-btn"?_e.push("/web/workflows/workflow/detail/"+k.value):P==="delete-btn"?(V.value=i.getRow().getData().workflowInfo.workflowName,await A("deleteWorkflow")):P==="run-btn"?await A("runWorkflow"):P==="log-btn"&&await A("workflowLog")}}]},A=async c=>{await Ne();const i=document.getElementById(c);i&&ye.getOrCreateInstance(i).show()},O=()=>{_e.push("/web/workflows/workflow/new")},T=c=>`${(c._cell.row.data.workflowParams||[]).filter(m=>String((m==null?void 0:m.paramKey)||"").trim()).length} `,u=c=>{const i=c.getValue()||"-";return`
+import{_ as Re}from"./TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js";import{_ as $e}from"./request-DPzMytGP.js";import{e as Oe,d as We,g as xe,P as Ae,r as De,a as Me,b as Ge,c as Fe,f as Ve}from"./SearchableSelect-DlLPIFTu.js";import{d as Q,u as ee,c as $,a as s,t as K,g as E,l as Te,w as Ie,o as se,m as re,n as Be,j as z,p as be,q as Ke,h as ae,r as S,M as ye,s as Ne,x as ze,F as je,e as Ue,y as _e,i as B,z as qe}from"./index-Woncnlsa.js";import{T as He}from"./TumblebugParamSelector-DeFn1gSY.js";import{_ as Ze}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ye={class:"modal modal-blur fade",id:"deleteWorkflow",tabindex:"-1","aria-hidden":"true"},Xe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Je={class:"modal-content"},Qe={class:"modal-body py-4"},et={class:"modal-footer"},tt=Q({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=F,C=x,N=async()=>{const{data:g}=await Oe(L.workflowIdx);if(g){p.error("Workflows linked to an Event Listener cannot be deleted."),C("get-workflow-list");return}const{data:l}=await We(L.workflowIdx);l?p.success("Deleted successfully."):p.error("Failed to delete."),C("get-workflow-list")};return(g,l)=>(E(),$("div",Ye,[s("div",Xe,[s("div",Je,[l[2]||(l[2]=s("div",{class:"modal-status bg-danger"},null,-1)),l[3]||(l[3]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Delete Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),s("div",Qe,[s("h4",null,"Are you sure you want to delete "+K(L.workflowName)+"?",1)]),s("div",et,[l[1]||(l[1]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=h=>N())}," Delete ")])])])]))}}),ot={class:"modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable",role:"document"},at={class:"modal-content"},st={key:0,class:"run-progress"},rt={class:"d-flex align-items-center justify-content-between mb-2"},nt={class:"text-muted"},lt={class:"text-muted"},it={class:"progress"},ct=["aria-valuenow"],ut={class:"modal-body py-4"},dt={key:0,class:"d-flex justify-content-center py-4"},ft={class:"modal-footer"},mt=["aria-disabled"],wt=Q({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(F,{emit:x}){const p=ee(),L=Te(),C=F,N=x,g=ae(()=>C.workflowIdx),l=S({}),h=S(!1),_=S(!1),I=S(),w=S({active:!1,completed:0,total:0,message:""}),D=ae(()=>w.value.total?Math.min(100,Math.round(w.value.completed/w.value.total*100)):0);Ie(()=>g.value,async()=>{var e;(e=I.value)!=null&&e.classList.contains("show")&&await k()}),se(()=>{var e;(e=I.value)==null||e.addEventListener("show.bs.modal",M)}),re(()=>{var e;(e=I.value)==null||e.removeEventListener("show.bs.modal",M)});const M=async()=>{await k()},k=async()=>{if(!g.value){l.value={};return}_.value=!0;try{const{data:e}=await xe(g.value,"N");V(e),l.value=e}catch(e){console.log(e),p.error("Failed to load workflow run parameters.")}finally{_.value=!1}},V=e=>{var a;const t=(L.projectInfo.ns_id||L.projectInfo.name||"").trim();if(!t)return;const o=(a=e.workflowParams)==null?void 0:a.find(n=>{var f;return((f=n.paramKey)==null?void 0:f.trim().toUpperCase())==="NAMESPACE"});o&&(o.paramValue=t)},j=async()=>{if(!(h.value||_.value)){if(!l.value.workflowInfo){p.error("Failed to load workflow run parameters.");return}h.value=!0;try{if(await T(),!await he()||!await m())return;await d("Requesting workflow run");const{data:e}=await De(A());await b("Workflow run request completed"),e?(p.success("Workflow run request has been submitted."),O()):p.error("Failed to process workflow run request."),N("get-workflow-list")}catch(e){console.log(e),p.error("Failed to process workflow run request.")}finally{h.value=!1,u()}}},A=()=>{const e=l.value.workflowInfo;return{workflowInfo:{workflowIdx:e==null?void 0:e.workflowIdx},workflowParams:[...l.value.workflowParams||[]],workflowStageMappings:[]}},O=()=>{var e;I.value&&((e=ye.getInstance(I.value))==null||e.hide())},T=async()=>{w.value={active:!0,completed:0,total:i(),message:"Preparing pre-run validation"},await c()},u=()=>{w.value.active=!1},d=async e=>{w.value.message=e,await c()},b=async e=>{w.value.completed=Math.min(w.value.completed+1,w.value.total),w.value.message=e,await c()},c=async()=>{await Ne(),await new Promise(e=>{window.requestAnimationFrame(()=>e())})},i=()=>{const e=Y(),t=ie(e),o=ce(e),a=Math.max(1,ue().length),n=a*Number(t)+a*Number(o),f=P()&&G()?1:0;return Math.max(1,n+f+1)},m=async()=>{if(!P())return!0;const e=G();if(!e)return!0;try{await d("Running infra pre-run validation");const{data:t}=await Me(ve(),e);return await b("Infra pre-run validation completed"),q(t)?(p.error(`Infra pre-run validation failed: ${H(t)}`),!1):!0}catch(t){return console.log(t),p.error("Failed to process infra pre-run validation request."),!1}},P=()=>{const e=Y();return e.includes("infra-create")||e.includes("multi-csp-vm-deploy")},G=()=>{var a;const e=r("CSP_LIST").split(",").map(n=>n.trim()).filter(Boolean),o=(e.length>0?e.map(n=>U(`${te(n)}_`,n)):[U("",r("CSP")||r("PROVIDER"))]).filter(Boolean);return o.length===0?null:{name:r("INFRA_ID")||r("INFRA_PREFIX")||((a=l.value.workflowInfo)==null?void 0:a.workflowName)||"workflow-infra",description:r("INFRA_DESC")||"Workflow created infra",installMonAgent:r("INSTALL_MON_AGENT")||"no",policyOnPartialFailure:r("POLICY_ON_PARTIAL_FAILURE")||"continue",nodeGroups:o}},U=(e,t)=>{const o=r(`${e}REGION`)||r("REGION"),a=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,o),n=r(`${e}SPEC_ID`)||r("SPEC_ID"),f=r(`${e}IMAGE_ID`)||r("IMAGE_ID");if(!n||!f)return null;const v={name:R(e,t),nodeGroupSize:Number(r("INFRA_NODEGROUP_SIZE")||"1"),specId:n,imageId:f,rootDiskType:r("ROOT_DISK_TYPE")||"default",rootDiskSize:Number(r("ROOT_DISK_SIZE")||"50")};a&&(v.connectionName=a);const y=r(`${e}ZONE`)||r("ZONE");return y&&(v.zone=y),v},R=(e,t)=>{const o=r(`${e}NODEGROUP_NAME`);return o||(t?`${r("INFRA_NODEGROUP_PREFIX")||r("INFRA_NODEGROUP_NAME")||"ng"}-${te(t).toLowerCase().replace(/_/g,"-")}`:r("INFRA_NODEGROUP_NAME")||"g1")},q=e=>{if(!e||Z(e,["reviewStatus","status","validationStatus"]).map(a=>W(a)).some(a=>["error","failed","fail"].includes(a)))return!0;const o=JSON.stringify(e).toLowerCase();return o.includes('"reviewstatus":"error"')||o.includes('"status":"error"')||o.includes("sold out")},H=e=>Z(e,["message","details","detail","reason","errorMessage"]).map(o=>String(o||"").trim()).filter(Boolean)[0]||"The selected Image/Spec combination cannot create resources.",Z=(e,t)=>{if(Array.isArray(e))return e.flatMap(a=>Z(a,t));if(!e||typeof e!="object")return[];const o=t.map(a=>a.toLowerCase());return Object.entries(e).flatMap(([a,n])=>[...o.includes(a.toLowerCase())?[n]:[],...Z(n,t)])},he=async()=>{l.value.workflowParams;const e=Y(),t=ie(e),o=ce(e);if(!t&&!o)return!0;const a=ue(),n=[];if(a.length>0)for(const f of a){const v=`${te(f)}_`;o&&await le(v,f,n),t&&await ne(v,f,n)}else{const f=r("CSP")||r("PROVIDER");o&&await le("",f,n),t&&await ne("",f,n)}return n.length>0?(p.error(`Please reselect ${n.join(", ")} for the current Region/Connection.`),!1):!0},ne=async(e,t,o)=>{const a=`${e}SPEC_ID`,n=r(a),f=r(`${e}REGION`)||r("REGION"),v=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,f);if(!n||ke(n,v,f,t)){o.push(a);return}const y=ge(n);if(y.region&&f&&!pe(y.region,f)){o.push(a);return}await d(`Validating ${a} list`),await de("spec",n,t,f,v)||o.push(a),await b(`${a} list validation completed`)},le=async(e,t,o)=>{const a=`${e}IMAGE_ID`,n=r(a),f=r(`${e}SPEC_ID`),v=r(`${e}REGION`)||r("REGION"),y=r(`${e}CONNECTION_NAME`)||r("CONNECTION_NAME")||oe(t,v),X=Se(Y());if(X&&Ce(t))return;if(!n||ke(n,y,v,t)){o.push(a);return}const J=ge(n);if(J.region&&v&&!pe(J.region,v)){o.push(a);return}await d(`Validating ${a} list`),await de("image",n,t,v,y,f,X)||o.push(a),await b(`${a} list validation completed`)},Y=()=>(l.value.workflowStageMappings||[]).map(e=>String(e.workflowStageName||"").trim().toLowerCase()),ie=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),ce=e=>e.some(t=>["infra-create","k8s-cluster-create","multi-csp-vm-deploy","multi-csp-k8s-cluster-deploy"].includes(t)),Se=e=>e.some(t=>["k8s-cluster-create","k8s-nodegroup-add","multi-csp-k8s-cluster-deploy"].includes(t)),Ce=e=>["azure","ibm","ncp","tencent"].includes(W(e)),ue=()=>r("CSP_LIST").split(",").map(e=>e.trim()).filter(Boolean),de=async(e,t,o,a,n,f="",v=!1)=>{if(!t||!o||!a)return!1;try{const{data:y}=await Ge(ve(),e,{providerName:o,regionName:a,connectionName:n,matchedSpecId:e==="image"?f:"",isKubernetesImage:e==="image"&&v?"true":void 0}),X=fe((y==null?void 0:y.data)??y),J=W(t);return X.some(Pe=>Ee(Pe,e).some(Le=>W(Le)===J))}catch(y){return console.log(y),!1}},Ee=(e,t)=>e==null?[]:typeof e!="object"?[String(e)]:me(t==="image"?[e.id,e.name,e.imageId,e.cspImageId,e.cspImageName,e.imageName,e.displayName]:[e.id,e.name,e.specId,e.cspSpecId,e.cspSpecName,e.CspSpecName,e.specName,e.Name,e.VMSpecName]),fe=e=>{if(Array.isArray(e))return e;if(!e||typeof e!="object")return[];const t=["images","image","imageList","specs","spec","specList","resources","resource","resourceList","items","list","result","output"];for(const o of t)if(Array.isArray(e[o]))return e[o];for(const o of Object.values(e)){const a=fe(o);if(a.length>0)return a}return[]},me=e=>{const t=new Set;return e.map(o=>o==null?"":String(o).trim()).filter(o=>!o||t.has(o)?!1:(t.add(o),!0))},r=e=>{const t=we(e),o=(l.value.workflowParams||[]).find(a=>we(a.paramKey)===t);return String((o==null?void 0:o.paramValue)||"").trim()},we=e=>String(e||"").trim().toUpperCase(),te=e=>String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"_"),W=e=>String(e||"").trim().toLowerCase(),pe=(e,t)=>{const o=W(e),a=W(t);return!o||!a?!0:o===a||o.startsWith(`${a}-`)||a.startsWith(`${o}-`)},oe=(e,t)=>e&&t?`${e}-${t}`:"",ge=e=>{const t=String(e||"").split("+");return t.length<3?{provider:"",region:""}:{provider:t[0],region:t[1]}},ve=()=>r("NAMESPACE")||"system",ke=(e,t,o,a)=>{const n=W(e);return n?n===W(t)||n===W(o)||n===W(a):!0};return(e,t)=>{var o;return E(),$("div",{class:"modal modal-blur fade",id:"runWorkflow",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:I},[s("div",ot,[s("div",at,[t[3]||(t[3]=s("div",{class:"modal-status bg-info"},null,-1)),t[4]||(t[4]=s("div",{class:"modal-header"},[s("h3",{class:"modal-title"},"Run Workflow"),s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),w.value.active?(E(),$("div",st,[s("div",rt,[s("span",nt,K(w.value.message),1),s("span",lt,K(w.value.completed)+" / "+K(w.value.total),1)]),s("div",it,[s("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Be({width:`${D.value}%`}),"aria-valuenow":D.value,"aria-valuemin":"0","aria-valuemax":"100"},null,12,ct)])])):z("",!0),s("div",ut,[_.value?(E(),$("div",dt,[...t[1]||(t[1]=[s("div",{class:"spinner-border",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)])])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(He,{key:1,"workflow-name":(o=l.value.workflowInfo)==null?void 0:o.workflowName,"workflow-param-data":l.value.workflowParams,"workflow-stage-mappings":l.value.workflowStageMappings||[]},null,8,["workflow-name","workflow-param-data","workflow-stage-mappings"])):z("",!0),!_.value&&l.value.workflowParams?(E(),be(Ae,{key:2,popup:!0,"workflow-param-data":l.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):z("",!0)]),s("div",ft,[t[2]||(t[2]=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),s("button",{type:"button",class:Ke(["btn btn-primary ms-auto",{disabled:h.value||_.value}]),"aria-disabled":h.value||_.value,onClick:t[0]||(t[0]=a=>j())},K(h.value?"Running...":"Run"),11,mt)])])])],512)}}}),pt=Ze(wt,[["__scopeId","data-v-cdce1b7e"]]),gt={class:"modal-dialog modal-xl",role:"document"},vt={class:"modal-content"},kt={class:"modal-body text-left py-4"},bt={class:"mb-5"},_t={key:0,class:"spinner-border",role:"status"},It={key:0},yt={class:"card mb-3"},Nt=["onClick"],ht={class:"card-title"},St={key:0,class:"card-body"},Ct=["value"],Et=3e3,Pt=Q({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(F,{emit:x}){const p=ee(),L=F,C=S(!1),N=S(),g=ae(()=>L.workflowIdx);Ie(g,async()=>{var u;(u=N.value)!=null&&u.classList.contains("show")&&(O(),await I(!0),A())}),se(()=>{var u,d;(u=N.value)==null||u.addEventListener("show.bs.modal",w),(d=N.value)==null||d.addEventListener("hidden.bs.modal",D)}),re(()=>{var u,d;(u=N.value)==null||u.removeEventListener("show.bs.modal",w),(d=N.value)==null||d.removeEventListener("hidden.bs.modal",D),O()});const l=S([]);let h,_=!1;const I=async(u=!0)=>{if(!g.value){l.value=[],C.value=!0,O();return}_||(_=!0,u&&(C.value=!1,l.value=[]),await Fe(g.value).then(({data:d})=>{var i;const b=Array.isArray(d)?d:[],c=k.value;l.value=b,b.some(m=>m.buildIdx===c)||(k.value=((i=b[0])==null?void 0:i.buildIdx)??0)}).catch(d=>{console.log(d),u&&p.error("Failed to load workflow logs.")}).finally(()=>{u&&(C.value=!0),_=!1}))},w=async()=>{await I(!0),A()},D=()=>{M()},M=()=>{O(),l.value=[],k.value=1},k=S(1),V=u=>{k.value===u?k.value=0:k.value=u},j=u=>u===0?"DB History":u,A=()=>{O(),!(!T()||!g.value)&&(h=setInterval(async()=>{await I(!1),(!T()||!g.value)&&O()},Et))},O=()=>{h&&(clearInterval(h),h=void 0)},T=()=>{var u;return!!((u=N.value)!=null&&u.classList.contains("show"))};return(u,d)=>(E(),$("div",{class:"modal",id:"workflowLog",tabindex:"-1",ref_key:"modalElement",ref:N},[s("div",gt,[s("div",vt,[d[3]||(d[3]=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s("div",kt,[s("h3",bt,[d[1]||(d[1]=ze(" Workflow Log ",-1)),C.value?z("",!0):(E(),$("div",_t,[...d[0]||(d[0]=[s("span",{class:"visually-hidden"},"Loading...",-1)])]))]),s("div",null,[l.value.length<=0?(E(),$("div",It,[...d[2]||(d[2]=[s("p",{class:"text-secondary"},"No Data",-1)])])):(E(!0),$(je,{key:1},Ue(l.value,b=>(E(),$("div",{key:b.buildIdx},[s("div",yt,[s("div",{class:"card-header",onClick:c=>V(b.buildIdx),style:{cursor:"pointer"}},[s("h3",ht,K(j(b.buildIdx)),1)],8,Nt),k.value===b.buildIdx?(E(),$("div",St,[s("textarea",{value:b.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,Ct)])):z("",!0)])]))),128))])]),s("div",{class:"modal-footer"},[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:M}," Cancel ")])])])],512))}}),Lt={class:"card card-flush w-100"},Rt={class:"card-body"},$t={class:"workflow-list-table"},Ot=3e4,Ft=Q({__name:"WorkflowList",setup(F){const x=S(!0);ee();const p=S([]),L=S([]),C=["vm-mariadb-backup-import-data-init","vm-mariadb-data-init-cleanup","k8s-mariadb-backup-import-data-init","k8s-mariadb-data-init-cleanup","multi-csp-vm-deploy","multi-csp-vm-cleanup","multi-csp-k8s-cluster-deploy","multi-csp-k8s-cluster-cleanup","vm-object-storage-data-lab-init","vm-object-storage-data-lab-cleanup"],N=new Map(C.map((c,i)=>[c,i]));se(async()=>{j(),await I(),h()}),re(()=>{_()});let g,l=!1;const h=()=>{_(),g=setInterval(()=>{I(!1)},Ot)},_=()=>{g&&(clearInterval(g),g=void 0)},I=async(c=!0)=>{if(!l){l=!0;try{c&&(x.value=!0),await Ve("N").then(({data:i})=>{p.value=D(M(i||[],!c))})}catch(i){console.log(i)}finally{c&&(x.value=!1),l=!1}}},w=c=>{var i,m;return String(((i=c.workflowInfo)==null?void 0:i.workflowIdx)||((m=c.workflowInfo)==null?void 0:m.workflowName)||"")},D=c=>[...c].sort((i,m)=>{const P=N.get(i.workflowInfo.workflowName)??C.length,G=N.get(m.workflowInfo.workflowName)??C.length;return P-G}),M=(c,i=!1)=>{if(p.value.length===0)return c;const m=new Map(c.map(R=>[w(R),R])),P=new Set,G=p.value.map(R=>{const q=w(R),H=m.get(q);return H?(P.add(q),H):i?R:null}).filter(R=>R!==null);if(i)return G;const U=c.filter(R=>!P.has(w(R)));return[...G,...U]},k=S(0),V=S(""),j=()=>{L.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",minWidth:220,widthGrow:3,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Purpose",field:"workflowInfo.workflowPurpose",minWidth:150,widthGrow:1.2,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Status",field:"workflowInfo.status",minWidth:150,widthGrow:1,formatter:u,variableHeight:!0},{title:"Params Count",formatter:T,minWidth:120,widthGrow:.8,hozAlign:"center"},{title:"Last Run Date",field:"runDate",minWidth:170,widthGrow:1.6,formatter:d,cssClass:"workflow-text-cell",variableHeight:!0},{title:"Action",minWidth:260,widthGrow:2,formatter:b,cssClass:"workflow-action-cell",headerSort:!1,variableHeight:!0,cellClick:async(c,i)=>{const m=c.target,P=m==null?void 0:m.getAttribute("id");k.value=i.getRow().getData().workflowInfo.workflowIdx,P==="detail-btn"?_e.push("/web/workflows/workflow/detail/"+k.value):P==="delete-btn"?(V.value=i.getRow().getData().workflowInfo.workflowName,await A("deleteWorkflow")):P==="run-btn"?await A("runWorkflow"):P==="log-btn"&&await A("workflowLog")}}]},A=async c=>{await Ne();const i=document.getElementById(c);i&&ye.getOrCreateInstance(i).show()},O=()=>{_e.push("/web/workflows/workflow/new")},T=c=>`${(c._cell.row.data.workflowParams||[]).filter(m=>String((m==null?void 0:m.paramKey)||"").trim()).length} `,u=c=>{const i=c.getValue()||"-";return`
v.get("/workflowStageType/list"),K=()=>v.get("/workflowStage/list");function Q(s){return v.get("/workflowStage/"+s)}function X(s){return v.get(`/workflowStage/duplicate?workflowStageName=${s.workflowStageName}&workflowStageTypeName=${s.workflowStageTypeName}`)}function Y(s){return v.post("/workflowStage",s)}function Z(s){return v.patch(`/workflowStage/${s.workflowStageIdx}`,s)}function ee(s){return v.delete(`/workflowStage/${s}`)}function te(s){return v.get(`/workflowStage/default/script/${s}`)}const oe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},ae={class:"modal-content"},le={class:"modal-header"},se={class:"modal-title"},re={class:"modal-body py-4"},ne={class:"mb-3"},ie={style:{display:"flex","justify-content":"start"}},de={key:0},we={class:"grid gap-0 column-gap-3"},ue=["value"],fe={class:"mb-3"},ce={class:"grid gap-0 column-gap-3"},ge={class:"col"},me={key:1,class:"btn btn-success",style:{margin:"3px"}},ke={class:"mb-3"},Se={class:"mb-3"},pe={class:"modal-footer"},ve=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{},workflowStageName:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=d(),g=d(),r=s,k=N,i=F(()=>r.workflowStageIdx),W=F(()=>r.workflowStageName),m=d(!1);$(i,async()=>{b(),await w()}),E(async()=>{c.value&&(g.value=new z(c.value)),b(),await w()});const t=d({}),w=async()=>{m.value=!0,r.mode==="new"?(t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,p.value=!1,S.value=!1,m.value=!1,console.log("isInitializing",m.value)):await Q(r.workflowStageIdx).then(a=>{t.value=a.data,p.value=!0,m.value=!1})},y=d([]),b=async()=>{try{const{data:a}=await J();y.value=a}catch(a){console.log(a)}},S=d(!1),V=async()=>{S.value=!S.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},B=async()=>{p.value=!1,y.value.forEach(a=>{t.value.workflowStageTypeIdx===a.workflowStageTypeIdx&&(t.value.workflowStageTypeName=a.workflowStageTypeName)}),await I(t.value.workflowStageTypeName)},I=async a=>{const{data:o}=await te(a);t.value.workflowStageContent=o[0].workflowStageContent},p=d(!1),M=async()=>{const a={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await X(a);o?l.error("Name is already in use."):(l.success("Name is available."),p.value=!0)};$(()=>[t.value.workflowStageName,t.value.workflowStageTypeName],()=>{if(!m.value){if(W.value===t.value.workflowStageName){p.value=!0;return}p.value=!1}});const P=async()=>{if(!S.value&&(!t.value.workflowStageTypeIdx||t.value.workflowStageTypeIdx===0)){l.error("Please select Workflow Stage Type.");return}if(S.value&&!t.value.workflowStageTypeName){l.error("Please enter new Workflow Stage Type.");return}if(!t.value.workflowStageName){l.error("Please enter Workflow Stage Name.");return}if(!p.value){l.error("Please perform duplicate check.");return}if(!t.value.workflowStageContent){l.error("Please enter Script.");return}let a=!1;r.mode==="new"?a=await U():a=await A(),a&&(k("get-workflow-stage-list"),w(),g.value&&(g.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const o=document.querySelector(".modal-backdrop");o==null||o.remove()},150)))},U=async()=>{try{const{data:a}=await Y(t.value);return a?(l.success("Registered successfully."),!0):(l.error("Failed to register."),!1)}catch{return l.error("Failed to register."),!1}},A=async()=>{try{const{data:a}=await Z(t.value);return a?(l.success("Updated successfully."),!0):(l.error("Failed to update."),!1)}catch{return l.error("Failed to update."),!1}};return(a,o)=>(f(),u("div",{class:"modal modal-blur fade",id:"workflowStageForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",oe,[e("div",ae,[e("div",le,[e("h3",se,h(r.mode==="new"?"New":"Edit")+" Workflow Stage",1),o[8]||(o[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",re,[e("div",null,[e("div",ne,[e("div",ie,[o[10]||(o[10]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(f(),u("div",de,[e("input",{type:"checkBox",onChange:V},null,32),o[9]||(o[9]=e("label",{class:"ms-2"},"Add Workflow Type",-1))])):G("",!0)]),e("div",we,[S.value?T((f(),u("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>I(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):T((f(),u("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:B},[o[11]||(o[11]=e("option",{value:0},"Select Workflow Stage Type",-1)),(f(!0),u(L,null,H(y.value,(n,q)=>(f(),u("option",{value:n.workflowStageTypeIdx,key:q},h(n.workflowStageTypeName),9,ue))),128))],544)),[[O,t.value.workflowStageTypeIdx]])])]),e("div",fe,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",ce,[T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ge,[p.value?(f(),u("button",me,"Duplicate Check")):(f(),u("button",{key:0,class:"btn btn-primary chk",onClick:M},"Duplicate Check"))])])]),e("div",ke,[o[13]||(o[13]=e("label",{class:"form-label"},"Workflow Stage Description",-1)),T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",Se,[o[14]||(o[14]=e("label",{class:"form-label required"},"Script",-1)),T(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",pe,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>w())}," Cancel "),e("button",{type:"button",class:"btn btn-primary ms-auto",onClick:o[7]||(o[7]=n=>P())},h(r.mode==="new"?"Regist":"Edit"),1)])])])],512))}}),ye={class:"modal modal-blur fade",id:"deleteWorkflowStage",tabindex:"-1","aria-hidden":"true"},be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Ne={class:"modal-content"},Te={class:"modal-body py-4"},We={class:"modal-footer"},_e=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=s,g=N,r=async()=>{const{data:k}=await ee(c.workflowStageIdx);k?l.success("Deleted successfully."):l.error("Failed to delete."),g("get-workflow-stage-list")};return(k,i)=>(f(),u("div",ye,[e("div",be,[e("div",Ne,[i[2]||(i[2]=e("div",{class:"modal-status bg-danger"},null,-1)),i[3]||(i[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete Workflow Stage"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",Te,[e("h4",null,"Are you sure you want to delete "+h(c.workflowStageName)+"?",1)]),e("div",We,[i[1]||(i[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:i[0]||(i[0]=W=>r())}," Delete ")])])])]))}}),xe={class:"card card-flush w-100"},Ie=C({__name:"WorkflowStageList",setup(s){const N=D(),l=d([]),c=d([]);E(async()=>{i(),await g()});const g=async()=>{try{const{data:w}=await K();l.value=w}catch(w){console.log(w),N.error("Failed to load data.")}},r=d(0),k=d(""),i=()=>{c.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:W,cellClick:function(w,y){const b=w.target,S=b==null?void 0:b.getAttribute("id");r.value=y.getRow().getData().workflowStageIdx,k.value=y.getRow().getData().workflowStageName,S==="edit-btn"&&(m.value="edit")}}]},W=()=>`
+import{_ as R}from"./TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js";import{s as v,_ as j}from"./request-DPzMytGP.js";import{d as C,u as D,w as $,o as E,M as z,r as d,c as u,a as e,t as h,j as G,b as T,v as O,F as L,e as H,f as _,g as f,h as F,i as x}from"./index-Woncnlsa.js";const J=()=>v.get("/workflowStageType/list"),K=()=>v.get("/workflowStage/list");function Q(s){return v.get("/workflowStage/"+s)}function X(s){return v.get(`/workflowStage/duplicate?workflowStageName=${s.workflowStageName}&workflowStageTypeName=${s.workflowStageTypeName}`)}function Y(s){return v.post("/workflowStage",s)}function Z(s){return v.patch(`/workflowStage/${s.workflowStageIdx}`,s)}function ee(s){return v.delete(`/workflowStage/${s}`)}function te(s){return v.get(`/workflowStage/default/script/${s}`)}const oe={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},ae={class:"modal-content"},le={class:"modal-header"},se={class:"modal-title"},re={class:"modal-body py-4"},ne={class:"mb-3"},ie={style:{display:"flex","justify-content":"start"}},de={key:0},we={class:"grid gap-0 column-gap-3"},ue=["value"],fe={class:"mb-3"},ce={class:"grid gap-0 column-gap-3"},ge={class:"col"},me={key:1,class:"btn btn-success",style:{margin:"3px"}},ke={class:"mb-3"},Se={class:"mb-3"},pe={class:"modal-footer"},ve=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{},workflowStageName:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=d(),g=d(),r=s,k=N,i=F(()=>r.workflowStageIdx),W=F(()=>r.workflowStageName),m=d(!1);$(i,async()=>{b(),await w()}),E(async()=>{c.value&&(g.value=new z(c.value)),b(),await w()});const t=d({}),w=async()=>{m.value=!0,r.mode==="new"?(t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,p.value=!1,S.value=!1,m.value=!1,console.log("isInitializing",m.value)):await Q(r.workflowStageIdx).then(a=>{t.value=a.data,p.value=!0,m.value=!1})},y=d([]),b=async()=>{try{const{data:a}=await J();y.value=a}catch(a){console.log(a)}},S=d(!1),V=async()=>{S.value=!S.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},B=async()=>{p.value=!1,y.value.forEach(a=>{t.value.workflowStageTypeIdx===a.workflowStageTypeIdx&&(t.value.workflowStageTypeName=a.workflowStageTypeName)}),await I(t.value.workflowStageTypeName)},I=async a=>{const{data:o}=await te(a);t.value.workflowStageContent=o[0].workflowStageContent},p=d(!1),M=async()=>{const a={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await X(a);o?l.error("Name is already in use."):(l.success("Name is available."),p.value=!0)};$(()=>[t.value.workflowStageName,t.value.workflowStageTypeName],()=>{if(!m.value){if(W.value===t.value.workflowStageName){p.value=!0;return}p.value=!1}});const P=async()=>{if(!S.value&&(!t.value.workflowStageTypeIdx||t.value.workflowStageTypeIdx===0)){l.error("Please select Workflow Stage Type.");return}if(S.value&&!t.value.workflowStageTypeName){l.error("Please enter new Workflow Stage Type.");return}if(!t.value.workflowStageName){l.error("Please enter Workflow Stage Name.");return}if(!p.value){l.error("Please perform duplicate check.");return}if(!t.value.workflowStageContent){l.error("Please enter Script.");return}let a=!1;r.mode==="new"?a=await U():a=await A(),a&&(k("get-workflow-stage-list"),w(),g.value&&(g.value.hide(),setTimeout(()=>{document.body.classList.remove("modal-open");const o=document.querySelector(".modal-backdrop");o==null||o.remove()},150)))},U=async()=>{try{const{data:a}=await Y(t.value);return a?(l.success("Registered successfully."),!0):(l.error("Failed to register."),!1)}catch{return l.error("Failed to register."),!1}},A=async()=>{try{const{data:a}=await Z(t.value);return a?(l.success("Updated successfully."),!0):(l.error("Failed to update."),!1)}catch{return l.error("Failed to update."),!1}};return(a,o)=>(f(),u("div",{class:"modal modal-blur fade",id:"workflowStageForm",tabindex:"-1","aria-hidden":"true",ref_key:"modalElement",ref:c},[e("div",oe,[e("div",ae,[e("div",le,[e("h3",se,h(r.mode==="new"?"New":"Edit")+" Workflow Stage",1),o[8]||(o[8]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",re,[e("div",null,[e("div",ne,[e("div",ie,[o[10]||(o[10]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(f(),u("div",de,[e("input",{type:"checkBox",onChange:V},null,32),o[9]||(o[9]=e("label",{class:"ms-2"},"Add Workflow Type",-1))])):G("",!0)]),e("div",we,[S.value?T((f(),u("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>I(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):T((f(),u("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:B},[o[11]||(o[11]=e("option",{value:0},"Select Workflow Stage Type",-1)),(f(!0),u(L,null,H(y.value,(n,q)=>(f(),u("option",{value:n.workflowStageTypeIdx,key:q},h(n.workflowStageTypeName),9,ue))),128))],544)),[[O,t.value.workflowStageTypeIdx]])])]),e("div",fe,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",ce,[T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ge,[p.value?(f(),u("button",me,"Duplicate Check")):(f(),u("button",{key:0,class:"btn btn-primary chk",onClick:M},"Duplicate Check"))])])]),e("div",ke,[o[13]||(o[13]=e("label",{class:"form-label"},"Workflow Stage Description",-1)),T(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",Se,[o[14]||(o[14]=e("label",{class:"form-label required"},"Script",-1)),T(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",pe,[e("button",{type:"button",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>w())}," Cancel "),e("button",{type:"button",class:"btn btn-primary ms-auto",onClick:o[7]||(o[7]=n=>P())},h(r.mode==="new"?"Regist":"Edit"),1)])])])],512))}}),ye={class:"modal modal-blur fade",id:"deleteWorkflowStage",tabindex:"-1","aria-hidden":"true"},be={class:"modal-dialog modal-lg modal-dialog-centered",role:"document"},Ne={class:"modal-content"},Te={class:"modal-body py-4"},We={class:"modal-footer"},_e=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(s,{emit:N}){const l=D(),c=s,g=N,r=async()=>{const{data:k}=await ee(c.workflowStageIdx);k?l.success("Deleted successfully."):l.error("Failed to delete."),g("get-workflow-stage-list")};return(k,i)=>(f(),u("div",ye,[e("div",be,[e("div",Ne,[i[2]||(i[2]=e("div",{class:"modal-status bg-danger"},null,-1)),i[3]||(i[3]=e("div",{class:"modal-header"},[e("h3",{class:"modal-title"},"Delete Workflow Stage"),e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})],-1)),e("div",Te,[e("h4",null,"Are you sure you want to delete "+h(c.workflowStageName)+"?",1)]),e("div",We,[i[1]||(i[1]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:i[0]||(i[0]=W=>r())}," Delete ")])])])]))}}),xe={class:"card card-flush w-100"},Ie=C({__name:"WorkflowStageList",setup(s){const N=D(),l=d([]),c=d([]);E(async()=>{i(),await g()});const g=async()=>{try{const{data:w}=await K();l.value=w}catch(w){console.log(w),N.error("Failed to load data.")}},r=d(0),k=d(""),i=()=>{c.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:W,cellClick:function(w,y){const b=w.target,S=b==null?void 0:b.getAttribute("id");r.value=y.getRow().getData().workflowStageIdx,k.value=y.getRow().getData().workflowStageName,S==="edit-btn"&&(m.value="edit")}}]},W=()=>`
(r(),o("div",_,[s(t(a))]))}}),m=c(n,[["__scopeId","data-v-55d88093"]]);export{m as default};
+import{d as e,c as o,i as s,k as t,R as a,g as r}from"./index-Woncnlsa.js";import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";const _={class:"workflows-page"},n=e({__name:"Workflows",setup(p){return(f,d)=>(r(),o("div",_,[s(t(a))]))}}),m=c(n,[["__scopeId","data-v-55d88093"]]);export{m as default};
diff --git a/src/main/resources/static/assets/index-CtQCsPEr.js b/src/main/resources/static/assets/index-Woncnlsa.js
similarity index 99%
rename from src/main/resources/static/assets/index-CtQCsPEr.js
rename to src/main/resources/static/assets/index-Woncnlsa.js
index f8448dc..47b09e9 100644
--- a/src/main/resources/static/assets/index-CtQCsPEr.js
+++ b/src/main/resources/static/assets/index-Woncnlsa.js
@@ -1,4 +1,4 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OssList-D1_cdyaa.js","assets/TableHeader.vue_vue_type_script_setup_true_lang-CRXExD9m.js","assets/request-txnOTK5f.js","assets/request-D-mU9AON.css","assets/oss-Be13WU3l.js","assets/WorkflowStageList-BlF1uALP.js","assets/Workflows-CD5-Fvl1.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Workflows-D3tuAkrq.css","assets/WorkflowList-C9mZIQL4.js","assets/SearchableSelect-TBocqjLd.js","assets/SearchableSelect-DrO6pei3.css","assets/TumblebugParamSelector-Sfwskzms.js","assets/TumblebugParamSelector-BieG703l.css","assets/WorkflowList-BYC83Dat.css","assets/WorkflowForm-B-l55TnO.js","assets/WorkflowForm-DRmOmizc.css","assets/EventListenerList-C9FR2rd-.js","assets/EventListenerList-DWk2gDBw.css"])))=>i.map(i=>d[i]);
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OssList-DGiiI3mx.js","assets/TableHeader.vue_vue_type_script_setup_true_lang-D78qmq0S.js","assets/request-DPzMytGP.js","assets/request-D-mU9AON.css","assets/oss-BcA1Ys4Q.js","assets/WorkflowStageList-BDmTRIVL.js","assets/Workflows-B6W1rN24.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Workflows-D3tuAkrq.css","assets/WorkflowList-BTwN2T6N.js","assets/SearchableSelect-DlLPIFTu.js","assets/SearchableSelect-DrO6pei3.css","assets/TumblebugParamSelector-DeFn1gSY.js","assets/TumblebugParamSelector-BieG703l.css","assets/WorkflowList-BYC83Dat.css","assets/WorkflowForm-DJg8ZeUF.js","assets/WorkflowForm-DRmOmizc.css","assets/EventListenerList-XxjlV0iN.js","assets/EventListenerList-DWk2gDBw.css"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -36,7 +36,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OssList-D1_cdya
`);return o===-1?"":r.stack.slice(o+1)})();try{if(!s.stack)s.stack=i;else if(i){const o=i.indexOf(`
`),a=o===-1?-1:i.indexOf(`
`,o+1),u=a===-1?"":i.slice(a+1);String(s.stack).endsWith(u)||(s.stack+=`
-`+i)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=jr(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Ya.assertOptions(s,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean),legacyInterceptorReqResOrdering:zt.transitional(zt.boolean),advertiseZstdAcceptEncoding:zt.transitional(zt.boolean),validateStatusUndefinedResolves:zt.transitional(zt.boolean)},!1),r!=null&&(L.isFunction(r)?n.paramsSerializer={serialize:r}:Ya.assertOptions(r,{encode:zt.function,serialize:zt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ya.assertOptions(n,{baseUrl:zt.spelling("baseURL"),withXsrfToken:zt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[n.method]);i&&L.forEach(["delete","get","head","post","put","patch","query","common"],O=>{delete i[O]}),n.headers=Kt.concat(o,i);const a=[];let u=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;u=u&&A.synchronous;const C=n.transitional||Kd;C&&C.legacyInterceptorReqResOrdering?a.unshift(A.fulfilled,A.rejected):a.push(A.fulfilled,A.rejected)});const d=[];this.interceptors.response.forEach(function(A){d.push(A.fulfilled,A.rejected)});let c,f=0,h;if(!u){const O=[hc.bind(this),void 0];for(O.unshift(...a),O.push(...d),h=O.length,c=Promise.resolve(n);fhc.call(this,g)))}catch(_){c=Promise.reject(_)}break}}if(!c)try{c=hc.call(this,g)}catch(O){c=Promise.reject(O)}for(f=0,h=d.length;f{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Jo(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new d_(function(r){t=r}),cancel:t}}};function Kx(e){return function(n){return e.apply(null,n)}}function Gx(e){return L.isObject(e)&&e.isAxiosError===!0}const td={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(td).forEach(([e,t])=>{td[t]=e});function f_(e){const t=new Lr(e),n=Hb(Lr.prototype.request,t);return L.extend(n,Lr.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return f_(jr(e,r))},n}const Ot=f_(Xo);Ot.Axios=Lr;Ot.CanceledError=Jo;Ot.CancelToken=Wx;Ot.isCancel=r_;Ot.VERSION=Yd;Ot.toFormData=Xl;Ot.AxiosError=be;Ot.Cancel=Ot.CanceledError;Ot.all=function(t){return Promise.all(t)};Ot.spread=Kx;Ot.isAxiosError=Gx;Ot.mergeConfig=jr;Ot.AxiosHeaders=Kt;Ot.formToJSON=e=>s_(L.isHTMLForm(e)?new FormData(e):e);Ot.getAdapter=c_.getAdapter;Ot.HttpStatusCode=td;Ot.default=Ot;const{Axios:IM,AxiosError:PM,CanceledError:RM,isCancel:$M,CancelToken:DM,VERSION:LM,all:BM,Cancel:VM,isAxiosError:MM,spread:FM,toFormData:HM,AxiosHeaders:jM,HttpStatusCode:zM,formToJSON:UM,getAdapter:qM,mergeConfig:WM,create:KM}=Ot,Yx="modulepreload",Xx=function(e){return"/"+e},bm={},Ks=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(u=>{if(u=Xx(u),u in bm)return;bm[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Yx,d||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),d)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},p_=BC({history:gC(),routes:[{path:"/",redirect:"/web/workflows/workflow/list"},{path:"/web",name:"rootOssList",component:()=>Ks(()=>import("./OssList-D1_cdyaa.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/oss/list",name:"ossList",component:()=>Ks(()=>import("./OssList-D1_cdyaa.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/workflowStage/list",name:"workflowStageList",component:()=>Ks(()=>import("./WorkflowStageList-BlF1uALP.js"),__vite__mapDeps([5,1,2,3]))},{path:"/web/workflows",name:"workflows",component:()=>Ks(()=>import("./Workflows-CD5-Fvl1.js"),__vite__mapDeps([6,7,8])),redirect:"/web/workflows/workflow/list",children:[{path:"workflow/list",name:"workflowList",component:()=>Ks(()=>import("./WorkflowList-C9mZIQL4.js"),__vite__mapDeps([9,1,2,3,10,7,11,12,13,14]))},{path:"workflow/new",name:"workflowNew",component:()=>Ks(()=>import("./WorkflowForm-B-l55TnO.js"),__vite__mapDeps([15,4,2,3,10,7,11,16]))},{path:"workflow/detail/:workflowIdx",name:"workflowDetail",component:()=>Ks(()=>import("./WorkflowForm-B-l55TnO.js"),__vite__mapDeps([15,4,2,3,10,7,11,16]))},{path:"eventListener/list",name:"eventListenerList",component:()=>Ks(()=>import("./EventListenerList-C9FR2rd-.js"),__vite__mapDeps([17,1,2,3,10,7,11,12,13,18]))}]},{path:"/web/workflow/list",redirect:"/web/workflows/workflow/list"},{path:"/web/workflow/new",redirect:"/web/workflows/workflow/new"},{path:"/web/workflow/detail/:workflowIdx",redirect:e=>`/web/workflows/workflow/detail/${e.params.workflowIdx}`},{path:"/web/eventListener/list",redirect:"/web/workflows/eventListener/list"}]}),h_=PS("user",{state:()=>({accessToken:"",workspaceInfo:{id:"",name:"",description:"",created_at:"",updated_at:""},projectInfo:{id:"",ns_id:"",mci_id:"",cluster_id:"",name:"",description:"",created_at:"",updated_at:""},operationId:""}),actions:{setUser(e){this.accessToken=e.accessToken,this.workspaceInfo=e.workspaceInfo,this.projectInfo=e.projectInfo,this.operationId=e.operationId}}}),Jx=()=>{window.parent===window&&h_().setUser({accessToken:"accesstokenExample",workspaceInfo:{id:"",name:"",description:"",created_at:"",updated_at:""},projectInfo:{id:"",ns_id:"ns01",mci_id:"mci01",cluster_id:"cluster01",name:"ns01",description:"",created_at:"",updated_at:""},operationId:""})};p_.beforeEach(async(e,t,n)=>{console.log("## to ### : ",e),console.log("## from ### : ",t),Jx(),window.addEventListener("message",async function(s){let r;console.log("## event.data ### : ",s),console.log("## event.data ### : ",s.data),console.log("## event.data.accessToken ### : ",s.data.accessToken),s.data.accessToken===void 0?r={accessToken:"accesstokenExample",workspaceInfo:{id:"8b2df1f9-b937-4861-b5ce-855a41c346bc",name:"workspace2",description:"workspace2 desc",created_at:"2024-06-18T00:10:16.192337Z",updated_at:"2024-06-18T00:10:16.192337Z"},projectInfo:{id:"1e88f4ea-d052-4314-80a4-9ac3f6691feb",ns_id:"ns01",mci_id:"mci01",cluster_id:"cluster01",name:"ns01",description:"ns01 desc",created_at:"2024-06-18T00:28:57.094105Z",updated_at:"2024-06-18T00:28:57.094105Z"},operationId:"op1"}:r=s.data;try{console.log(r),h_().setUser(r)}catch(i){console.error("Error in processing message:",i)}}),n()});var Qx=Object.defineProperty,_m=Object.getOwnPropertySymbols,Zx=Object.prototype.hasOwnProperty,ek=Object.prototype.propertyIsEnumerable,ym=(e,t,n)=>t in e?Qx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m_=(e,t)=>{for(var n in t||(t={}))Zx.call(t,n)&&ym(e,n,t[n]);if(_m)for(var n of _m(t))ek.call(t,n)&&ym(e,n,t[n]);return e},Ql=e=>typeof e=="function",Zl=e=>typeof e=="string",g_=e=>Zl(e)&&e.trim().length>0,tk=e=>typeof e=="number",Nr=e=>typeof e>"u",jo=e=>typeof e=="object"&&e!==null,nk=e=>hs(e,"tag")&&g_(e.tag),v_=e=>window.TouchEvent&&e instanceof TouchEvent,b_=e=>hs(e,"component")&&__(e.component),sk=e=>Ql(e)||jo(e),__=e=>!Nr(e)&&(Zl(e)||sk(e)||b_(e)),wm=e=>jo(e)&&["height","width","right","left","top","bottom"].every(t=>tk(e[t])),hs=(e,t)=>(jo(e)||Ql(e))&&t in e,rk=(e=>()=>e++)(0);function mc(e){return v_(e)?e.targetTouches[0].clientX:e.clientX}function Em(e){return v_(e)?e.targetTouches[0].clientY:e.clientY}var ik=e=>{Nr(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Qo=e=>b_(e)?Qo(e.component):nk(e)?ne({render(){return e}}):typeof e=="string"?e:nt(b(e)),ok=e=>{if(typeof e=="string")return e;const t=hs(e,"props")&&jo(e.props)?e.props:{},n=hs(e,"listeners")&&jo(e.listeners)?e.listeners:{};return{component:Qo(e),props:t,listeners:n}},ak=()=>typeof window<"u",Jd=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(s=>s(t))}},lk=e=>["on","off","emit"].every(t=>hs(e,t)&&Ql(e[t])),gn;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(gn||(gn={}));var _l;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(_l||(_l={}));var vn;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(vn||(vn={}));var Kn="Vue-Toastification",Wn={type:{type:String,default:gn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},y_={type:Wn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Xa={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Wn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},nd={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},w_={transition:{type:[Object,String],default:`${Kn}__bounce`}},uk={position:{type:String,default:_l.TOP_RIGHT},draggable:Wn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Wn.trueBoolean,pauseOnHover:Wn.trueBoolean,closeOnClick:Wn.trueBoolean,timeout:nd.timeout,hideProgressBar:nd.hideProgressBar,toastClassName:Wn.classNames,bodyClassName:Wn.classNames,icon:y_.customIcon,closeButton:Xa.component,closeButtonClassName:Xa.classNames,showCloseButtonOnHover:Xa.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Jd}},ck={id:{type:[String,Number],required:!0,default:0},type:Wn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},dk={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Wn.trueBoolean,maxToasts:{type:Number,default:20},transition:w_.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Wn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},Is={CORE_TOAST:uk,TOAST:ck,CONTAINER:dk,PROGRESS_BAR:nd,ICON:y_,TRANSITION:w_,CLOSE_BUTTON:Xa},E_=ne({name:"VtProgressBar",props:Is.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Kn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function fk(e,t){return k(),U("div",{style:Ht(e.style),class:ue(e.cpClass)},null,6)}E_.render=fk;var pk=E_,T_=ne({name:"VtCloseButton",props:Is.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Qo(this.component):"button"},classes(){const e=[`${Kn}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),hk=je(" × ");function mk(e,t){return k(),ce(Me(e.buttonComponent),Be({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:ge(()=>[hk]),_:1},16,["aria-label","class"])}T_.render=mk;var gk=T_,A_={},vk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bk=we("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),_k=[bk];function yk(e,t){return k(),U("svg",vk,_k)}A_.render=yk;var wk=A_,S_={},Ek={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Tk=we("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Ak=[Tk];function Sk(e,t){return k(),U("svg",Ek,Ak)}S_.render=Sk;var Tm=S_,C_={},Ck={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ok=we("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),xk=[Ok];function kk(e,t){return k(),U("svg",Ck,xk)}C_.render=kk;var Nk=C_,O_={},Ik={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},Pk=we("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Rk=[Pk];function $k(e,t){return k(),U("svg",Ik,Rk)}O_.render=$k;var Dk=O_,x_=ne({name:"VtIcon",props:Is.ICON,computed:{customIconChildren(){return hs(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Zl(this.customIcon)?this.trimValue(this.customIcon):hs(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return hs(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:__(this.customIcon)?Qo(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[gn.DEFAULT]:Tm,[gn.INFO]:Tm,[gn.SUCCESS]:wk,[gn.ERROR]:Dk,[gn.WARNING]:Nk}[this.type]},iconClasses(){const e=[`${Kn}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return g_(e)?e.trim():t}}});function Lk(e,t){return k(),ce(Me(e.component),{class:ue(e.iconClasses)},{default:ge(()=>[je(Ae(e.customIconChildren),1)]),_:1},8,["class"])}x_.render=Lk;var Bk=x_,k_=ne({name:"VtToast",components:{ProgressBar:pk,CloseButton:gk,Icon:Bk},inheritAttrs:!1,props:Object.assign({},Is.CORE_TOAST,Is.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${Kn}__toast`,`${Kn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${Kn}__toast--rtl`),e},bodyClasses(){return[`${Kn}__toast-${Zl(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return wm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:hs,getVueComponentFromObj:Qo,closeToast(){this.eventBus.emit(vn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:mc(e),y:Em(e)},this.dragStart=mc(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:mc(e),y:Em(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,wm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Vk=["role"];function Mk(e,t){const n=$r("Icon"),s=$r("CloseButton"),r=$r("ProgressBar");return k(),U("div",{class:ue(e.classes),style:Ht(e.draggableStyle),onClick:t[0]||(t[0]=(...i)=>e.clickHandler&&e.clickHandler(...i)),onMouseenter:t[1]||(t[1]=(...i)=>e.hoverPause&&e.hoverPause(...i)),onMouseleave:t[2]||(t[2]=(...i)=>e.hoverPlay&&e.hoverPlay(...i))},[e.icon?(k(),ce(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):xe("v-if",!0),we("div",{role:e.accessibility.toastRole||"alert",class:ue(e.bodyClasses)},[typeof e.content=="string"?(k(),U(Ve,{key:0},[je(Ae(e.content),1)],2112)):(k(),ce(Me(e.getVueComponentFromObj(e.content)),Be({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},tA(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,Vk),e.closeButton?(k(),ce(s,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:ql(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):xe("v-if",!0),e.timeout?(k(),ce(r,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):xe("v-if",!0)],38)}k_.render=Mk;var Fk=k_,N_=ne({name:"VtTransition",props:Is.TRANSITION,emits:["leave"],methods:{hasProp:hs,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Hk(e,t){return k(),ce(dS,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:ge(()=>[G(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}N_.render=Hk;var jk=N_,I_=ne({name:"VueToastification",devtools:{hide:!0},components:{Toast:Fk,VtTransition:jk},props:Object.assign({},Is.CORE_TOAST,Is.CONTAINER,Is.TRANSITION),data(){return{count:0,positions:Object.values(_l),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(vn.ADD,this.addToast),e.on(vn.CLEAR,this.clearToasts),e.on(vn.DISMISS,this.dismissToast),e.on(vn.UPDATE,this.updateToast),e.on(vn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Ql(e)&&(e=await e()),ik(this.$el),e.appendChild(this.$el)},setToast(e){Nr(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=ok(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!Nr(t)&&!Nr(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){Nr(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${Kn}__container`,e].concat(this.defaults.containerClassName)}}});function zk(e,t){const n=$r("Toast"),s=$r("VtTransition");return k(),U("div",null,[(k(!0),U(Ve,null,mt(e.positions,r=>(k(),U("div",{key:r},[Je(s,{transition:e.defaults.transition,class:ue(e.getClasses(r))},{default:ge(()=>[(k(!0),U(Ve,null,mt(e.getPositionToasts(r),i=>(k(),ce(n,Be({key:i.id},i),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}I_.render=zk;var Uk=I_,Am=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new Jd;t&&wn(()=>{const i=Tb(Uk,m_({},e)),o=i.mount(document.createElement("div")),a=e.onMounted;if(Nr(a)||a(o,i),e.shareAppContext){const u=e.shareAppContext;u===!0?console.warn(`[${Kn}] App to share context with was not provided.`):(i._context.components=u._context.components,i._context.directives=u._context.directives,i._context.mixins=u._context.mixins,i._context.provides=u._context.provides,i.config.globalProperties=u.config.globalProperties)}});const s=(i,o)=>{const a=Object.assign({},{id:rk(),type:gn.DEFAULT},o,{content:i});return n.emit(vn.ADD,a),a.id};s.clear=()=>n.emit(vn.CLEAR,void 0),s.updateDefaults=i=>{n.emit(vn.UPDATE_DEFAULTS,i)},s.dismiss=i=>{n.emit(vn.DISMISS,i)};function r(i,{content:o,options:a},u=!1){const d=Object.assign({},a,{content:o});n.emit(vn.UPDATE,{id:i,options:d,create:u})}return s.update=r,s.success=(i,o)=>s(i,Object.assign({},o,{type:gn.SUCCESS})),s.info=(i,o)=>s(i,Object.assign({},o,{type:gn.INFO})),s.error=(i,o)=>s(i,Object.assign({},o,{type:gn.ERROR})),s.warning=(i,o)=>s(i,Object.assign({},o,{type:gn.WARNING})),s},qk=()=>{const e=()=>console.warn(`[${Kn}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function P_(e){return ak()?lk(e)?Am({eventBus:e},!1):Am(e,!0):qk()}var R_=Symbol("VueToastification"),$_=new Jd,Wk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=P_(m_({eventBus:$_},t));e.provide(R_,n)},GM=e=>{const t=qr()?Ct(R_,void 0):void 0;return t||P_($_)},Kk=Wk,Gk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yk={exports:{}};/*!
+`+i)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=jr(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Ya.assertOptions(s,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean),legacyInterceptorReqResOrdering:zt.transitional(zt.boolean),advertiseZstdAcceptEncoding:zt.transitional(zt.boolean),validateStatusUndefinedResolves:zt.transitional(zt.boolean)},!1),r!=null&&(L.isFunction(r)?n.paramsSerializer={serialize:r}:Ya.assertOptions(r,{encode:zt.function,serialize:zt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ya.assertOptions(n,{baseUrl:zt.spelling("baseURL"),withXsrfToken:zt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[n.method]);i&&L.forEach(["delete","get","head","post","put","patch","query","common"],O=>{delete i[O]}),n.headers=Kt.concat(o,i);const a=[];let u=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;u=u&&A.synchronous;const C=n.transitional||Kd;C&&C.legacyInterceptorReqResOrdering?a.unshift(A.fulfilled,A.rejected):a.push(A.fulfilled,A.rejected)});const d=[];this.interceptors.response.forEach(function(A){d.push(A.fulfilled,A.rejected)});let c,f=0,h;if(!u){const O=[hc.bind(this),void 0];for(O.unshift(...a),O.push(...d),h=O.length,c=Promise.resolve(n);fhc.call(this,g)))}catch(_){c=Promise.reject(_)}break}}if(!c)try{c=hc.call(this,g)}catch(O){c=Promise.reject(O)}for(f=0,h=d.length;f{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Jo(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new d_(function(r){t=r}),cancel:t}}};function Kx(e){return function(n){return e.apply(null,n)}}function Gx(e){return L.isObject(e)&&e.isAxiosError===!0}const td={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(td).forEach(([e,t])=>{td[t]=e});function f_(e){const t=new Lr(e),n=Hb(Lr.prototype.request,t);return L.extend(n,Lr.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return f_(jr(e,r))},n}const Ot=f_(Xo);Ot.Axios=Lr;Ot.CanceledError=Jo;Ot.CancelToken=Wx;Ot.isCancel=r_;Ot.VERSION=Yd;Ot.toFormData=Xl;Ot.AxiosError=be;Ot.Cancel=Ot.CanceledError;Ot.all=function(t){return Promise.all(t)};Ot.spread=Kx;Ot.isAxiosError=Gx;Ot.mergeConfig=jr;Ot.AxiosHeaders=Kt;Ot.formToJSON=e=>s_(L.isHTMLForm(e)?new FormData(e):e);Ot.getAdapter=c_.getAdapter;Ot.HttpStatusCode=td;Ot.default=Ot;const{Axios:IM,AxiosError:PM,CanceledError:RM,isCancel:$M,CancelToken:DM,VERSION:LM,all:BM,Cancel:VM,isAxiosError:MM,spread:FM,toFormData:HM,AxiosHeaders:jM,HttpStatusCode:zM,formToJSON:UM,getAdapter:qM,mergeConfig:WM,create:KM}=Ot,Yx="modulepreload",Xx=function(e){return"/"+e},bm={},Ks=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(u=>{if(u=Xx(u),u in bm)return;bm[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Yx,d||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),d)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},p_=BC({history:gC(),routes:[{path:"/",redirect:"/web/workflows/workflow/list"},{path:"/web",name:"rootOssList",component:()=>Ks(()=>import("./OssList-DGiiI3mx.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/oss/list",name:"ossList",component:()=>Ks(()=>import("./OssList-DGiiI3mx.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/workflowStage/list",name:"workflowStageList",component:()=>Ks(()=>import("./WorkflowStageList-BDmTRIVL.js"),__vite__mapDeps([5,1,2,3]))},{path:"/web/workflows",name:"workflows",component:()=>Ks(()=>import("./Workflows-B6W1rN24.js"),__vite__mapDeps([6,7,8])),redirect:"/web/workflows/workflow/list",children:[{path:"workflow/list",name:"workflowList",component:()=>Ks(()=>import("./WorkflowList-BTwN2T6N.js"),__vite__mapDeps([9,1,2,3,10,7,11,12,13,14]))},{path:"workflow/new",name:"workflowNew",component:()=>Ks(()=>import("./WorkflowForm-DJg8ZeUF.js"),__vite__mapDeps([15,4,2,3,10,7,11,16]))},{path:"workflow/detail/:workflowIdx",name:"workflowDetail",component:()=>Ks(()=>import("./WorkflowForm-DJg8ZeUF.js"),__vite__mapDeps([15,4,2,3,10,7,11,16]))},{path:"eventListener/list",name:"eventListenerList",component:()=>Ks(()=>import("./EventListenerList-XxjlV0iN.js"),__vite__mapDeps([17,1,2,3,10,7,11,12,13,18]))}]},{path:"/web/workflow/list",redirect:"/web/workflows/workflow/list"},{path:"/web/workflow/new",redirect:"/web/workflows/workflow/new"},{path:"/web/workflow/detail/:workflowIdx",redirect:e=>`/web/workflows/workflow/detail/${e.params.workflowIdx}`},{path:"/web/eventListener/list",redirect:"/web/workflows/eventListener/list"}]}),h_=PS("user",{state:()=>({accessToken:"",workspaceInfo:{id:"",name:"",description:"",created_at:"",updated_at:""},projectInfo:{id:"",ns_id:"",mci_id:"",cluster_id:"",name:"",description:"",created_at:"",updated_at:""},operationId:""}),actions:{setUser(e){this.accessToken=e.accessToken,this.workspaceInfo=e.workspaceInfo,this.projectInfo=e.projectInfo,this.operationId=e.operationId}}}),Jx=()=>{window.parent===window&&h_().setUser({accessToken:"accesstokenExample",workspaceInfo:{id:"",name:"",description:"",created_at:"",updated_at:""},projectInfo:{id:"",ns_id:"ns01",mci_id:"mci01",cluster_id:"cluster01",name:"ns01",description:"",created_at:"",updated_at:""},operationId:""})};p_.beforeEach(async(e,t,n)=>{console.log("## to ### : ",e),console.log("## from ### : ",t),Jx(),window.addEventListener("message",async function(s){let r;console.log("## event.data ### : ",s),console.log("## event.data ### : ",s.data),console.log("## event.data.accessToken ### : ",s.data.accessToken),s.data.accessToken===void 0?r={accessToken:"accesstokenExample",workspaceInfo:{id:"8b2df1f9-b937-4861-b5ce-855a41c346bc",name:"workspace2",description:"workspace2 desc",created_at:"2024-06-18T00:10:16.192337Z",updated_at:"2024-06-18T00:10:16.192337Z"},projectInfo:{id:"1e88f4ea-d052-4314-80a4-9ac3f6691feb",ns_id:"ns01",mci_id:"mci01",cluster_id:"cluster01",name:"ns01",description:"ns01 desc",created_at:"2024-06-18T00:28:57.094105Z",updated_at:"2024-06-18T00:28:57.094105Z"},operationId:"op1"}:r=s.data;try{console.log(r),h_().setUser(r)}catch(i){console.error("Error in processing message:",i)}}),n()});var Qx=Object.defineProperty,_m=Object.getOwnPropertySymbols,Zx=Object.prototype.hasOwnProperty,ek=Object.prototype.propertyIsEnumerable,ym=(e,t,n)=>t in e?Qx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m_=(e,t)=>{for(var n in t||(t={}))Zx.call(t,n)&&ym(e,n,t[n]);if(_m)for(var n of _m(t))ek.call(t,n)&&ym(e,n,t[n]);return e},Ql=e=>typeof e=="function",Zl=e=>typeof e=="string",g_=e=>Zl(e)&&e.trim().length>0,tk=e=>typeof e=="number",Nr=e=>typeof e>"u",jo=e=>typeof e=="object"&&e!==null,nk=e=>hs(e,"tag")&&g_(e.tag),v_=e=>window.TouchEvent&&e instanceof TouchEvent,b_=e=>hs(e,"component")&&__(e.component),sk=e=>Ql(e)||jo(e),__=e=>!Nr(e)&&(Zl(e)||sk(e)||b_(e)),wm=e=>jo(e)&&["height","width","right","left","top","bottom"].every(t=>tk(e[t])),hs=(e,t)=>(jo(e)||Ql(e))&&t in e,rk=(e=>()=>e++)(0);function mc(e){return v_(e)?e.targetTouches[0].clientX:e.clientX}function Em(e){return v_(e)?e.targetTouches[0].clientY:e.clientY}var ik=e=>{Nr(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Qo=e=>b_(e)?Qo(e.component):nk(e)?ne({render(){return e}}):typeof e=="string"?e:nt(b(e)),ok=e=>{if(typeof e=="string")return e;const t=hs(e,"props")&&jo(e.props)?e.props:{},n=hs(e,"listeners")&&jo(e.listeners)?e.listeners:{};return{component:Qo(e),props:t,listeners:n}},ak=()=>typeof window<"u",Jd=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(s=>s(t))}},lk=e=>["on","off","emit"].every(t=>hs(e,t)&&Ql(e[t])),gn;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(gn||(gn={}));var _l;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(_l||(_l={}));var vn;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(vn||(vn={}));var Kn="Vue-Toastification",Wn={type:{type:String,default:gn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},y_={type:Wn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Xa={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Wn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},nd={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},w_={transition:{type:[Object,String],default:`${Kn}__bounce`}},uk={position:{type:String,default:_l.TOP_RIGHT},draggable:Wn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Wn.trueBoolean,pauseOnHover:Wn.trueBoolean,closeOnClick:Wn.trueBoolean,timeout:nd.timeout,hideProgressBar:nd.hideProgressBar,toastClassName:Wn.classNames,bodyClassName:Wn.classNames,icon:y_.customIcon,closeButton:Xa.component,closeButtonClassName:Xa.classNames,showCloseButtonOnHover:Xa.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Jd}},ck={id:{type:[String,Number],required:!0,default:0},type:Wn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},dk={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Wn.trueBoolean,maxToasts:{type:Number,default:20},transition:w_.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Wn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},Is={CORE_TOAST:uk,TOAST:ck,CONTAINER:dk,PROGRESS_BAR:nd,ICON:y_,TRANSITION:w_,CLOSE_BUTTON:Xa},E_=ne({name:"VtProgressBar",props:Is.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Kn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function fk(e,t){return k(),U("div",{style:Ht(e.style),class:ue(e.cpClass)},null,6)}E_.render=fk;var pk=E_,T_=ne({name:"VtCloseButton",props:Is.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Qo(this.component):"button"},classes(){const e=[`${Kn}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),hk=je(" × ");function mk(e,t){return k(),ce(Me(e.buttonComponent),Be({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:ge(()=>[hk]),_:1},16,["aria-label","class"])}T_.render=mk;var gk=T_,A_={},vk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bk=we("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),_k=[bk];function yk(e,t){return k(),U("svg",vk,_k)}A_.render=yk;var wk=A_,S_={},Ek={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Tk=we("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Ak=[Tk];function Sk(e,t){return k(),U("svg",Ek,Ak)}S_.render=Sk;var Tm=S_,C_={},Ck={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ok=we("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),xk=[Ok];function kk(e,t){return k(),U("svg",Ck,xk)}C_.render=kk;var Nk=C_,O_={},Ik={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},Pk=we("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Rk=[Pk];function $k(e,t){return k(),U("svg",Ik,Rk)}O_.render=$k;var Dk=O_,x_=ne({name:"VtIcon",props:Is.ICON,computed:{customIconChildren(){return hs(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Zl(this.customIcon)?this.trimValue(this.customIcon):hs(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return hs(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:__(this.customIcon)?Qo(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[gn.DEFAULT]:Tm,[gn.INFO]:Tm,[gn.SUCCESS]:wk,[gn.ERROR]:Dk,[gn.WARNING]:Nk}[this.type]},iconClasses(){const e=[`${Kn}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return g_(e)?e.trim():t}}});function Lk(e,t){return k(),ce(Me(e.component),{class:ue(e.iconClasses)},{default:ge(()=>[je(Ae(e.customIconChildren),1)]),_:1},8,["class"])}x_.render=Lk;var Bk=x_,k_=ne({name:"VtToast",components:{ProgressBar:pk,CloseButton:gk,Icon:Bk},inheritAttrs:!1,props:Object.assign({},Is.CORE_TOAST,Is.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${Kn}__toast`,`${Kn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${Kn}__toast--rtl`),e},bodyClasses(){return[`${Kn}__toast-${Zl(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return wm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:hs,getVueComponentFromObj:Qo,closeToast(){this.eventBus.emit(vn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:mc(e),y:Em(e)},this.dragStart=mc(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:mc(e),y:Em(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,wm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Vk=["role"];function Mk(e,t){const n=$r("Icon"),s=$r("CloseButton"),r=$r("ProgressBar");return k(),U("div",{class:ue(e.classes),style:Ht(e.draggableStyle),onClick:t[0]||(t[0]=(...i)=>e.clickHandler&&e.clickHandler(...i)),onMouseenter:t[1]||(t[1]=(...i)=>e.hoverPause&&e.hoverPause(...i)),onMouseleave:t[2]||(t[2]=(...i)=>e.hoverPlay&&e.hoverPlay(...i))},[e.icon?(k(),ce(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):xe("v-if",!0),we("div",{role:e.accessibility.toastRole||"alert",class:ue(e.bodyClasses)},[typeof e.content=="string"?(k(),U(Ve,{key:0},[je(Ae(e.content),1)],2112)):(k(),ce(Me(e.getVueComponentFromObj(e.content)),Be({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},tA(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,Vk),e.closeButton?(k(),ce(s,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:ql(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):xe("v-if",!0),e.timeout?(k(),ce(r,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):xe("v-if",!0)],38)}k_.render=Mk;var Fk=k_,N_=ne({name:"VtTransition",props:Is.TRANSITION,emits:["leave"],methods:{hasProp:hs,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Hk(e,t){return k(),ce(dS,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:ge(()=>[G(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}N_.render=Hk;var jk=N_,I_=ne({name:"VueToastification",devtools:{hide:!0},components:{Toast:Fk,VtTransition:jk},props:Object.assign({},Is.CORE_TOAST,Is.CONTAINER,Is.TRANSITION),data(){return{count:0,positions:Object.values(_l),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(vn.ADD,this.addToast),e.on(vn.CLEAR,this.clearToasts),e.on(vn.DISMISS,this.dismissToast),e.on(vn.UPDATE,this.updateToast),e.on(vn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Ql(e)&&(e=await e()),ik(this.$el),e.appendChild(this.$el)},setToast(e){Nr(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=ok(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!Nr(t)&&!Nr(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){Nr(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${Kn}__container`,e].concat(this.defaults.containerClassName)}}});function zk(e,t){const n=$r("Toast"),s=$r("VtTransition");return k(),U("div",null,[(k(!0),U(Ve,null,mt(e.positions,r=>(k(),U("div",{key:r},[Je(s,{transition:e.defaults.transition,class:ue(e.getClasses(r))},{default:ge(()=>[(k(!0),U(Ve,null,mt(e.getPositionToasts(r),i=>(k(),ce(n,Be({key:i.id},i),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}I_.render=zk;var Uk=I_,Am=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new Jd;t&&wn(()=>{const i=Tb(Uk,m_({},e)),o=i.mount(document.createElement("div")),a=e.onMounted;if(Nr(a)||a(o,i),e.shareAppContext){const u=e.shareAppContext;u===!0?console.warn(`[${Kn}] App to share context with was not provided.`):(i._context.components=u._context.components,i._context.directives=u._context.directives,i._context.mixins=u._context.mixins,i._context.provides=u._context.provides,i.config.globalProperties=u.config.globalProperties)}});const s=(i,o)=>{const a=Object.assign({},{id:rk(),type:gn.DEFAULT},o,{content:i});return n.emit(vn.ADD,a),a.id};s.clear=()=>n.emit(vn.CLEAR,void 0),s.updateDefaults=i=>{n.emit(vn.UPDATE_DEFAULTS,i)},s.dismiss=i=>{n.emit(vn.DISMISS,i)};function r(i,{content:o,options:a},u=!1){const d=Object.assign({},a,{content:o});n.emit(vn.UPDATE,{id:i,options:d,create:u})}return s.update=r,s.success=(i,o)=>s(i,Object.assign({},o,{type:gn.SUCCESS})),s.info=(i,o)=>s(i,Object.assign({},o,{type:gn.INFO})),s.error=(i,o)=>s(i,Object.assign({},o,{type:gn.ERROR})),s.warning=(i,o)=>s(i,Object.assign({},o,{type:gn.WARNING})),s},qk=()=>{const e=()=>console.warn(`[${Kn}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function P_(e){return ak()?lk(e)?Am({eventBus:e},!1):Am(e,!0):qk()}var R_=Symbol("VueToastification"),$_=new Jd,Wk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=P_(m_({eventBus:$_},t));e.provide(R_,n)},GM=e=>{const t=qr()?Ct(R_,void 0):void 0;return t||P_($_)},Kk=Wk,Gk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yk={exports:{}};/*!
* Bootstrap v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
diff --git a/src/main/resources/static/assets/oss-Be13WU3l.js b/src/main/resources/static/assets/oss-BcA1Ys4Q.js
similarity index 89%
rename from src/main/resources/static/assets/oss-Be13WU3l.js
rename to src/main/resources/static/assets/oss-BcA1Ys4Q.js
index 94fbb93..d3dc951 100644
--- a/src/main/resources/static/assets/oss-Be13WU3l.js
+++ b/src/main/resources/static/assets/oss-BcA1Ys4Q.js
@@ -1 +1 @@
-import{s as e}from"./request-txnOTK5f.js";const o=()=>e.get("/ossType/list"),n=()=>e.get("/ossType/filter/list"),r=()=>e.get("/oss/list"),i=s=>e.get(`/oss/list/${s}`);function c(s){return e.get(`/oss/duplicate?ossName=${s.ossName}&ossUrl=${s.ossUrl}&ossUsername=${s.ossUsername}`)}function u(s){return e.post("/oss/connection-check",s)}function a(s){return e.get("/oss/"+s)}function l(s){return e.post("/oss",s)}function g(s){return e.patch(`/oss/${s.ossIdx}`,s)}function f(s){return e.delete(`/oss/${s}`)}export{n as a,o as b,f as c,c as d,r as e,i as f,a as g,u as o,l as r,g as u};
+import{s as e}from"./request-DPzMytGP.js";const o=()=>e.get("/ossType/list"),n=()=>e.get("/ossType/filter/list"),r=()=>e.get("/oss/list"),i=s=>e.get(`/oss/list/${s}`);function c(s){return e.get(`/oss/duplicate?ossName=${s.ossName}&ossUrl=${s.ossUrl}&ossUsername=${s.ossUsername}`)}function u(s){return e.post("/oss/connection-check",s)}function a(s){return e.get("/oss/"+s)}function l(s){return e.post("/oss",s)}function g(s){return e.patch(`/oss/${s.ossIdx}`,s)}function f(s){return e.delete(`/oss/${s}`)}export{n as a,o as b,f as c,c as d,r as e,i as f,a as g,u as o,l as r,g as u};
diff --git a/src/main/resources/static/assets/request-txnOTK5f.js b/src/main/resources/static/assets/request-DPzMytGP.js
similarity index 99%
rename from src/main/resources/static/assets/request-txnOTK5f.js
rename to src/main/resources/static/assets/request-DPzMytGP.js
index fc71c01..dfbd2ee 100644
--- a/src/main/resources/static/assets/request-txnOTK5f.js
+++ b/src/main/resources/static/assets/request-DPzMytGP.js
@@ -1,4 +1,4 @@
-var wt=Object.defineProperty;var Ct=(l,e,t)=>e in l?wt(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var b=(l,e,t)=>Ct(l,typeof e!="symbol"?e+"":e,t);import{d as Et,w as We,o as yt,m as Rt,c as xt,r as Ge,g as Tt,T as Je,u as kt}from"./index-CtQCsPEr.js";class M{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class R{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var s=e?t.split(e):[t],n=s.length,r;for(let o=0;od.subject===o),a>-1?t[r]=i[a].copy:(h=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:h}),t[r]=this.deepClone(o,h,i)))}return t}}let Mt=class Ke extends M{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let n=R.elOffset(this.container);i-=n.left,s-=n.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=R.elOffset(e),s,n,r;switch(this.container!==document.body&&(s=R.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":n=i.left+e.offsetWidth,r=i.top-1;break;case"bottom":n=i.left,r=i.top+e.offsetHeight;break;case"left":n=i.left,r=i.top-1;break;case"top":n=i.left,r=i.top;break;case"center":n=i.left+e.offsetWidth/2,r=i.top+e.offsetHeight/2;break}return{x:n,y:r,offset:i}}show(e,t){var i,s,n,r,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(n=e,o=this.elementPositionCoords(e,t),r=o.offset,i=o.x,s=o.y):typeof e=="number"?(r={top:0,left:0},i=e,s=t):(o=this.containerEventCoords(e),i=o.x,s=o.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,n,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",a=>{a.stopPropagation()}),this)}_fitToScreen(e,t,i,s,n){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(n){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else{let a=this.element.offsetHeight;if(a>o)this.element.style.top="0px",this.element.style.height=o+"px";else{let h=t-a;h<0&&(h=o-a),this.element.style.top=h+"px"}}}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.key==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new Ke(this.table,e,this),this.childPopup}};class w extends M{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Mt(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Lt={rownum:function(l,e,t,i,s,n){return n.getPosition()}};const Y=class Y extends w{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupAccessor(e.definition[n]),r&&(t=!0,i[n]={accessor:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Y.accessors[e]?t=Y.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),n=R.deepClone(e.data||{});return this.table.columnManager.traverse(function(r){var o,a,h,d;r.modules.accessor&&(a=r.modules.accessor[i]||r.modules.accessor.accessor||!1,a&&(o=r.getFieldValue(n),o!="undefined"&&(d=r.getComponent(),h=typeof a.params=="function"?a.params(o,n,t,d,s):a.params,r.setFieldValue(n,a.accessor(o,n,t,h,d,s)))))}),n}};b(Y,"moduleName","accessor"),b(Y,"accessors",Lt);let ce=Y;var St={method:"GET"};function fe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(fe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(fe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function Dt(l){var e=fe(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function qe(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+Dt(t)),l}function zt(l,e,t){var i;return new Promise((s,n)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var r in i.headers)e.headers||(e.headers={}),typeof e.headers[r]>"u"&&(e.headers[r]=i.headers[r]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(o=>{o.ok?o.json().then(a=>{s(a)}).catch(a=>{n(a),console.warn("Ajax Load Error - Invalid JSON returned",a)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),n(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),n(o)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function pe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(pe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(pe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var Ht={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=pe(t),s=new FormData;return i.forEach(function(n){s.append(n.key,n.value)}),s}}};const F=class F extends w{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=F.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||F.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||F.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var n=this.table.options.ajaxParams;return n&&(typeof n=="function"&&(n=n.call(this.table)),s=Object.assign(Object.assign({},n),s)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,n){var r;return!n&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(i),this.sendRequest(this.url,t,r)):n}setDefaultConfig(e={}){this.config=Object.assign({},F.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}};b(F,"moduleName","ajax"),b(F,"defaultConfig",St),b(F,"defaultURLGenerator",qe),b(F,"defaultLoaderPromise",zt),b(F,"contentTypeFormatters",Ht);let me=F;var Ft={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},At={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,s=[],n=[];return l=l.split(`
+var wt=Object.defineProperty;var Ct=(l,e,t)=>e in l?wt(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var b=(l,e,t)=>Ct(l,typeof e!="symbol"?e+"":e,t);import{d as Et,w as We,o as yt,m as Rt,c as xt,r as Ge,g as Tt,T as Je,u as kt}from"./index-Woncnlsa.js";class M{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class R{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var s=e?t.split(e):[t],n=s.length,r;for(let o=0;od.subject===o),a>-1?t[r]=i[a].copy:(h=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:h}),t[r]=this.deepClone(o,h,i)))}return t}}let Mt=class Ke extends M{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let n=R.elOffset(this.container);i-=n.left,s-=n.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=R.elOffset(e),s,n,r;switch(this.container!==document.body&&(s=R.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":n=i.left+e.offsetWidth,r=i.top-1;break;case"bottom":n=i.left,r=i.top+e.offsetHeight;break;case"left":n=i.left,r=i.top-1;break;case"top":n=i.left,r=i.top;break;case"center":n=i.left+e.offsetWidth/2,r=i.top+e.offsetHeight/2;break}return{x:n,y:r,offset:i}}show(e,t){var i,s,n,r,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(n=e,o=this.elementPositionCoords(e,t),r=o.offset,i=o.x,s=o.y):typeof e=="number"?(r={top:0,left:0},i=e,s=t):(o=this.containerEventCoords(e),i=o.x,s=o.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,n,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",a=>{a.stopPropagation()}),this)}_fitToScreen(e,t,i,s,n){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(n){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else{let a=this.element.offsetHeight;if(a>o)this.element.style.top="0px",this.element.style.height=o+"px";else{let h=t-a;h<0&&(h=o-a),this.element.style.top=h+"px"}}}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.key==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new Ke(this.table,e,this),this.childPopup}};class w extends M{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Mt(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Lt={rownum:function(l,e,t,i,s,n){return n.getPosition()}};const Y=class Y extends w{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupAccessor(e.definition[n]),r&&(t=!0,i[n]={accessor:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Y.accessors[e]?t=Y.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),n=R.deepClone(e.data||{});return this.table.columnManager.traverse(function(r){var o,a,h,d;r.modules.accessor&&(a=r.modules.accessor[i]||r.modules.accessor.accessor||!1,a&&(o=r.getFieldValue(n),o!="undefined"&&(d=r.getComponent(),h=typeof a.params=="function"?a.params(o,n,t,d,s):a.params,r.setFieldValue(n,a.accessor(o,n,t,h,d,s)))))}),n}};b(Y,"moduleName","accessor"),b(Y,"accessors",Lt);let ce=Y;var St={method:"GET"};function fe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(fe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(fe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function Dt(l){var e=fe(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function qe(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+Dt(t)),l}function zt(l,e,t){var i;return new Promise((s,n)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var r in i.headers)e.headers||(e.headers={}),typeof e.headers[r]>"u"&&(e.headers[r]=i.headers[r]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(o=>{o.ok?o.json().then(a=>{s(a)}).catch(a=>{n(a),console.warn("Ajax Load Error - Invalid JSON returned",a)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),n(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),n(o)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function pe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(pe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(pe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var Ht={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=pe(t),s=new FormData;return i.forEach(function(n){s.append(n.key,n.value)}),s}}};const F=class F extends w{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=F.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||F.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||F.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var n=this.table.options.ajaxParams;return n&&(typeof n=="function"&&(n=n.call(this.table)),s=Object.assign(Object.assign({},n),s)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,n){var r;return!n&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(i),this.sendRequest(this.url,t,r)):n}setDefaultConfig(e={}){this.config=Object.assign({},F.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}};b(F,"moduleName","ajax"),b(F,"defaultConfig",St),b(F,"defaultURLGenerator",qe),b(F,"defaultLoaderPromise",zt),b(F,"contentTypeFormatters",Ht);let me=F;var Ft={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},At={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,s=[],n=[];return l=l.split(`
`),l.forEach(function(r){e.push(r.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(r){var o=i.find(function(a){return r&&a.definition.title&&r.trim()&&a.definition.title.trim()===r.trim()});o?s.push(o):t=!1}),t||(t=!0,s=[],e[0].forEach(function(r){var o=i.find(function(a){return r&&a.field&&r.trim()&&a.field.trim()===r.trim()});o?s.push(o):t=!1}),t||(s=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(r){var o={};r.forEach(function(a,h){s[h]&&(o[s[h].field]=a)}),n.push(o)}),n):!1}},Ot={copyToClipboard:["ctrl + 67","meta + 67"]},Pt={copyToClipboard:function(l){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},_t={keybindings:{bindings:Ot,actions:Pt}};const _=class _ extends w{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(s),t=i?this.generatePlainContent(s):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var s=[];i.columns.forEach(n=>{var r="";if(n)if(i.type==="group"&&(n.value=n.component.getKey()),n.value===null)r="";else switch(typeof n.value){case"object":r=JSON.stringify(n.value);break;case"undefined":r="";break;default:r=n.value}s.push(r)}),t.push(s.join(" "))}),t.join(`
`)}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(s=document.body.createTextRange(),s.moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=_.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=_.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,s;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}};b(_,"moduleName","clipboard"),b(_,"moduleExtensions",_t),b(_,"pasteActions",Ft),b(_,"pasteParsers",At);let ge=_;class Bt{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class Ye{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class re extends M{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=s[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var n=this.column.definition.cssClass.split(" ");n.forEach(r=>{e.classList.add(r)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var s=this.setValueProcessData(e,t,i);s&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new Ye(this)),this.component}}class $e{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Qe={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};const j=class j extends M{constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((s,n)=>{var r=new j(s,this);this.attachColumn(r)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(j.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{j.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",s=>{s.stopPropagation(),i.focus()}),i.addEventListener("mousedown",s=>{s.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,s=>{i.value=s||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,s=i.length,n;for(let r=0;r{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e{this.isGroup&&this.columns.forEach(function(s){s.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let s=0;s-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(s=>{s.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(s=>{var n=s.getWidth();n>t&&(t=n)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new $e(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof j?this.parent.getComponent():!1}};b(j,"defaultOptionList",Qe);let J=j;class ae{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class L extends M{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&R.elVisible(this.element),i={},s;return new Promise((n,r)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),s=this.chain("row-data-changing",[this,i,e],null,e);const o=[];for(let a in e)this.table.columnManager.getColumnsByFieldRoot(a).forEach(d=>{let u=this.getCell(d.getField());if(u){let c=d.getFieldValue(s);u.getValue()!==c&&o.push([u,c])}});for(let a in s)this.data[a]=s[a];this.dispatch("row-data-save-after",this),o.forEach(([a,h])=>{a.setValueProcessData(h),t&&a.cellRendered()}),t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new ae(this)),this.component}}var Vt={avg:function(l,e,t){var i=0,s=typeof t.precision<"u"?t.precision:2;return l.length&&(i=l.reduce(function(n,r){return Number(n)+Number(r)}),i=i/l.length,i=s!==!1?i.toFixed(s):i),parseFloat(i).toString()},max:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n>i||i===null)&&(i=n)}),i!==null?s!==!1?i.toFixed(s):i:""},min:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n(l||s===0)&&l.indexOf(s)===n);return i.length}};const B=class B extends w{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new J({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":B.calculations[t.topCalc]?i.topCalc=B.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":B.calculations[t.bottomCalc]?i.botCalc=B.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,s=this.table.modules.dataTree;return e.forEach(n=>{var r;t.push(n.getData()),i&&((r=n.modules.dataTree)!=null&&r.open)&&this.rowsToData(s.getFilteredTreeChildren(n)).forEach(o=>{t.push(o)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),s;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),s=new L(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),s.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),s.component=!1,s.getComponent=()=>(s.component||(s.component=new Bt(s)),s.component),s.generateCells=()=>{var n=[];this.table.columnManager.columnsByIndex.forEach(r=>{this.genColumn.setField(r.getField()),this.genColumn.hozAlign=r.hozAlign,r.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(r.definition[e+"CalcFormatter"]),params:r.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=r.definition.cssClass;var o=new re(this.genColumn,s);o.getElement(),o.column=r,o.setWidth(),r.cells.push(o),n.push(o),r.visible||o.hide()}),s.cells=n},s}generateRowData(e,t){var i={},s=e=="top"?this.topCalcs:this.botCalcs,n=e=="top"?"topCalc":"botCalc",r,o;return s.forEach(function(a){var h=[];a.modules.columnCalcs&&a.modules.columnCalcs[n]&&(t.forEach(function(d){h.push(a.getFieldValue(d))}),o=n+"Params",r=typeof a.modules.columnCalcs[o]=="function"?a.modules.columnCalcs[o](h,t):a.modules.columnCalcs[o],a.setFieldValue(i,a.modules.columnCalcs[n](h,t,r)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={},n={};return i.forEach(r=>{s[r.getKey()]=this.getGroupResults(r)}),n={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s},n}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}};b(B,"moduleName","columnCalcs"),b(B,"calculations",Vt);let be=B;class Ze extends w{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,s){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,s){return t.dataTreeStartExpanded[s]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&typeof t=="object"&&t!==null;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:s?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&s?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&s?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:s}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),s=e.modules.dataTree;s.branchEl&&(s.branchEl.parentNode&&s.branchEl.parentNode.removeChild(s.branchEl),s.branchEl=!1),s.controlEl&&(s.controlEl.parentNode&&s.controlEl.parentNode.removeChild(s.controlEl),s.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+s.index),s.index&&(this.branchEl?(s.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(s.branchEl,i.firstChild),this.table.rtl?s.branchEl.style.marginRight=(s.branchEl.offsetWidth+s.branchEl.style.marginLeft)*(s.index-1)+s.index*this.indent+"px":s.branchEl.style.marginLeft=(s.branchEl.offsetWidth+s.branchEl.style.marginRight)*(s.index-1)+s.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+s.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+s.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",n=>{n.stopPropagation()}),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,s)=>{var n,r;t.push(i),i instanceof L&&(i.create(),n=i.modules.dataTree,!n.index&&n.children!==!1&&(r=this.getChildren(i,!1,!0),r.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var s=e.modules.dataTree,n=[],r=[];return s.children!==!1&&(s.open||t)&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(s.children):n=s.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n,i),n.forEach(o=>{r.push(o);var a=this.getChildren(o,!1,!0);a.forEach(h=>{r.push(h)})})),r}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(s=>{var n=new L(s||{},this.table.rowManager);n.create(),n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=this.startOpen(n.getComponent(),n.modules.dataTree.index)),t.push(n)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],s;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(t.children):s=t.children,s.forEach(n=>{n instanceof L&&i.push(n)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof L&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var n=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof s<"u"&&(n=this.findChildIndex(s,e),n!==!1&&e.data[this.field].splice(i?n:n+1,0,t)),n===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof L?i=e.data:e instanceof ae?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(s=>s instanceof L?s.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(s=>s.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,n=[];return s&&s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach(r=>{r instanceof L&&(n.push(t?r.getComponent():r),i&&this.getTreeChildren(r,t,i).forEach(o=>{n.push(o)}))})),n}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}b(Ze,"moduleName","dataTree");function Nt(l,e={},t){var i=e.delimiter?e.delimiter:",",s=[],n=[];l.forEach(r=>{var o=[];switch(r.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":r.columns.forEach((a,h)=>{a&&a.depth===1&&(n[h]=typeof a.value>"u"||a.value===null?"":'"'+String(a.value).split('"').join('""')+'"')});break;case"row":r.columns.forEach(a=>{if(a){switch(typeof a.value){case"object":a.value=a.value!==null?JSON.stringify(a.value):"";break;case"undefined":a.value="";break}o.push('"'+String(a.value).split('"').join('""')+'"')}}),s.push(o.join(i));break}}),n.length&&s.unshift(n.join(i)),s=s.join(`
`),e.bom&&(s="\uFEFF"+s),t(s,"text/csv")}function It(l,e,t){var i=[];l.forEach(s=>{var n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(n);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function Wt(l,e={},t){var i=[],s=[],n={},r=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},a=e.jsPDF||{},h=e.title?e.title:"",d,u;a.orientation||(a.orientation=e.orientation||"landscape"),a.unit||(a.unit="pt"),l.forEach(f=>{switch(f.type){case"header":i.push(c(f));break;case"group":s.push(c(f,r));break;case"calc":s.push(c(f,o));break;case"row":s.push(c(f));break}});function c(f,p){var g=[];return f.columns.forEach(v=>{var m;if(v){switch(typeof v.value){case"object":v.value=v.value!==null?JSON.stringify(v.value):"";break;case"undefined":v.value="";break}m={content:v.value,colSpan:v.width,rowSpan:v.height},p&&(m.styles=p),g.push(m)}}),g}d=this.dependencyRegistry.lookup("jspdf","jsPDF"),u=new d(a),e.autoTable&&(typeof e.autoTable=="function"?n=e.autoTable(u)||{}:n=e.autoTable),h&&(n.didDrawPage=function(f){u.text(h,40,30)}),n.head=i,n.body=s,u.autoTable(n),e.documentProcessing&&e.documentProcessing(u),t(u.output("arraybuffer"),"application/pdf")}function Gt(l,e,t){var i=this,s=e.sheetName||"Sheet1",n=this.dependencyRegistry.lookup("XLSX"),r=n.utils.book_new(),o=new M(this),a="compress"in e?e.compress:!0,h=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:a},d;h.type="binary",r.SheetNames=[],r.Sheets={};function u(){var p=[],g=[],v={},m={s:{c:0,r:0},e:{c:l[0]?l[0].columns.reduce((C,T)=>C+(T&&T.width?T.width:1),0):0,r:l.length}};return l.forEach((C,T)=>{var k=[];C.columns.forEach(function(x,z){x?(k.push(!(x.value instanceof Date)&&typeof x.value=="object"?JSON.stringify(x.value):x.value),(x.width>1||x.height>-1)&&(x.height>1||x.width>1)&&g.push({s:{r:T,c:z},e:{r:T+x.height-1,c:z+x.width-1}})):k.push("")}),p.push(k)}),n.utils.sheet_add_aoa(v,p),v["!ref"]=n.utils.encode_range(m),g.length&&(v["!merges"]=g),v}if(e.sheetOnly){t(u());return}if(e.sheets)for(var c in e.sheets)e.sheets[c]===!0?(r.SheetNames.push(c),r.Sheets[c]=u()):(r.SheetNames.push(c),o.commsSend(e.sheets[c],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(p){r.Sheets[c]=p}}));else r.SheetNames.push(s),r.Sheets[s]=u();e.documentProcessing&&(r=e.documentProcessing(r));function f(p){for(var g=new ArrayBuffer(p.length),v=new Uint8Array(g),m=0;m!=p.length;++m)v[m]=p.charCodeAt(m)&255;return g}d=n.write(r,h),t(f(d),"application/octet-stream")}function jt(l,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(l),"text/html")}function Ut(l,e,t){const i=[];l.forEach(s=>{const n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(JSON.stringify(n));break}}),t(i.join(`
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index 75f2057..103f2d5 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -5,7 +5,7 @@
Workflow
-
+
diff --git a/workflowFE/src/views/eventListener/components/eventListenerForm.vue b/workflowFE/src/views/eventListener/components/eventListenerForm.vue
index b4ce696..3ca5c13 100644
--- a/workflowFE/src/views/eventListener/components/eventListenerForm.vue
+++ b/workflowFE/src/views/eventListener/components/eventListenerForm.vue
@@ -47,7 +47,8 @@
{
/* Comment translated to English. */
const eventListenerFormData = ref({} as EventListener)
const setParamFlag = ref(false as Boolean)
+const selectorReady = ref(false)
+const selectorRevision = ref(0)
/* Comment translated to English. */
const setInit = async () => {
+ selectorReady.value = false
if (props.mode === 'new') {
- eventListenerFormData.value.eventListenerName = ''
- eventListenerFormData.value.eventListenerDesc = ''
- eventListenerFormData.value.workflowIdx = 0
- eventListenerFormData.value.workflowParams = []
+ eventListenerFormData.value = {
+ eventListenerIdx: 0,
+ eventListenerName: '',
+ eventListenerDesc: '',
+ eventListenerUrl: '',
+ eventListenerCallUrl: '',
+ workflowIdx: 0,
+ workflowParams: [],
+ }
duplicatedEventListener.value = false
checkedEventListenerName.value = ''
@@ -163,7 +172,9 @@ const setInit = async () => {
checkedEventListenerName.value = normalizeEventListenerName(data.eventListenerName)
originalEventListenerName.value = normalizeEventListenerName(data.eventListenerName)
setParamFlag.value = true
+ selectorReady.value = Boolean(eventListenerFormData.value.workflowIdx)
}
+ selectorRevision.value += 1
}
const workflowList = ref([] as Array)
@@ -321,11 +332,19 @@ const _updateEventListener = async (): Promise => {
}
}
const onSelectWorkflow = (selectedWorkflowIdx:number) => {
- workflowList.value.forEach((workflow) => {
- if (workflow.workflowInfo.workflowIdx === selectedWorkflowIdx) {
- eventListenerFormData.value.workflowParams = cloneWorkflowParams(workflow.workflowParams)
- }
+ selectorReady.value = false
+ const workflow = workflowList.value.find((item) => {
+ return Number(item.workflowInfo.workflowIdx) === Number(selectedWorkflowIdx)
})
+
+ if (!workflow) {
+ eventListenerFormData.value.workflowParams = []
+ return
+ }
+
+ eventListenerFormData.value.workflowParams = cloneWorkflowParams(workflow.workflowParams)
+ selectorRevision.value += 1
+ selectorReady.value = true
}
const cloneWorkflowParams = (params: Array = []) => {