@knoflows/engine 0.1.0-alpha.1 → 0.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/engine.js +33 -132
- package/dist/migrations/20260917165450_baseline/migration.sql +127 -0
- package/dist/migrations/20260917165450_baseline/snapshot.json +1212 -0
- package/dist/migrations/20260918025930_context_files/migration.sql +7 -0
- package/dist/migrations/20260918025930_context_files/snapshot.json +1275 -0
- package/dist/migrations/20260918074816_large_kate_bishop/migration.sql +8 -0
- package/dist/migrations/20260918074816_large_kate_bishop/snapshot.json +1338 -0
- package/package.json +19 -10
- package/static/assets/i18n/en.json +253 -16
- package/static/assets/i18n/es.json +253 -16
- package/static/chunk-2KSNHCgb.js +1 -0
- package/static/chunk-3mppll1n.js +1 -0
- package/static/chunk-6BQlxALO.js +1 -0
- package/static/chunk-A4AkMf2s.js +1 -0
- package/static/chunk-B2hO-qT3.js +1 -0
- package/static/chunk-B8MrNxxk.js +1 -0
- package/static/{chunk-CeFjDLjY.js → chunk-BAc0DRm8.js} +1 -1
- package/static/chunk-BFkZ796p.js +7 -0
- package/static/chunk-BNOYZq-b.js +1 -0
- package/static/chunk-BUuwGTt7.js +66 -0
- package/static/chunk-BVw7xkK9.js +1 -0
- package/static/chunk-BbcTWKT2.js +1 -0
- package/static/chunk-BhGgxvgu.js +1 -0
- package/static/chunk-BjZIiizu.js +1 -0
- package/static/chunk-CDWIMt6y.js +1 -0
- package/static/{chunk-C50zASMN.js → chunk-CEcbtdnK.js} +1 -1
- package/static/chunk-CJDp11v5.js +1 -0
- package/static/chunk-CJRNatUw.js +1 -0
- package/static/chunk-CWbxWv5I.js +1 -0
- package/static/chunk-Cd8F2jeN.js +1 -0
- package/static/chunk-Cf_xd8ER.js +1 -0
- package/static/chunk-CgqRVtSF.js +1 -0
- package/static/chunk-CxBYhrEj.js +1 -0
- package/static/chunk-D6YfO72h.js +1 -0
- package/static/{chunk-Dw1tJgiv.js → chunk-DNOjVPY0.js} +1 -1
- package/static/chunk-DQnMulwi.js +1 -0
- package/static/chunk-DblClAqu.js +1 -0
- package/static/chunk-DjibVmY7.js +1 -0
- package/static/chunk-DoXxOh8j.js +1 -0
- package/static/{chunk-CSPhdKAb.js → chunk-Ojn34cvU.js} +1 -1
- package/static/chunk-W5GAgssE.js +1 -0
- package/static/chunk-XLpSkczx.js +1 -0
- package/static/chunk-cHfOiAJm.js +1 -0
- package/static/{chunk-ZijlINsH.js → chunk-eSxb3-OU.js} +1 -1
- package/static/chunk-hZzW00VR.js +1 -0
- package/static/chunk-jct1_zOr.js +1 -0
- package/static/chunk-mzyds3TS.js +1 -0
- package/static/chunk-tYnBYi0l.js +1 -0
- package/static/chunk-wbdetocK.js +5 -0
- package/static/index.html +2 -2
- package/static/main-MNK6ZYDO.js +249 -0
- package/static/chunk-8DHqiag3.js +0 -1
- package/static/chunk-B4GVyu_H.js +0 -1
- package/static/chunk-B5hULR_G.js +0 -1
- package/static/chunk-BDOL5Qby.js +0 -1
- package/static/chunk-BJLDaNHl.js +0 -1
- package/static/chunk-BQYw1slv.js +0 -1
- package/static/chunk-BU5DKI8R.js +0 -1
- package/static/chunk-BquD19tF.js +0 -5
- package/static/chunk-C40TdCIk.js +0 -1
- package/static/chunk-C9CuVcTl.js +0 -1
- package/static/chunk-CCjvFBCX.js +0 -1
- package/static/chunk-CPxI4OjB.js +0 -1
- package/static/chunk-CgvdAwRh.js +0 -1
- package/static/chunk-Cnkrtkdu.js +0 -7
- package/static/chunk-Csk1w6sD.js +0 -1
- package/static/chunk-DI-Ex2sC.js +0 -1
- package/static/chunk-DK8z5vU5.js +0 -1
- package/static/chunk-DS9-TMN6.js +0 -1
- package/static/chunk-DxRo8m4J.js +0 -66
- package/static/chunk-DyP6QbgY.js +0 -1
- package/static/chunk-KyBZUWGU.js +0 -1
- package/static/main-BK4MAPTK.js +0 -249
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Q as QE,K as Kt,aQ as Jc,v as vw,R as Rw,aR as Xc,p as gI,P as Ph,O as Ow}from'./main-MNK6ZYDO.js';var x=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-preferences-manage"]],decls:9,vars:6,consts:[["data-testid","preferences-manage",1,"list-page"],[1,"header"],[1,"lede"]],template:function(t,l){t&1&&(Jc(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Rw(5,"transloco"),Xc(),Jc(6,"p",2),vw(7),Rw(8,"transloco"),Xc()()()()),t&2&&(gI(4),Ph(Ow(5,2,"manage.preferences.title")),gI(3),Ph(Ow(8,4,"manage.preferences.body")));},dependencies:[Kt],styles:[".list-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}"]});}}return e})();export{x as PreferencesManageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {E as E_,N as N_}from'./chunk-BUuwGTt7.js';import {s,r,t as t$1}from'./main-MNK6ZYDO.js';var y=["agent","interaction","shell","git","provider_action","sub_workflow","loop"];function I(){return {name:"",appliesTo:"none",subjectHandling:"per-subject",inputSchema:[],steps:[],notificationPolicy:{triggers:[]}}}function d(){return crypto.randomUUID()}function g(t,e){return t.map(n=>{let r$1=s(r({},n),{_key:d(),_idAutoSync:e.idAutoSync});return n.type==="loop"?s(r({},r$1),{steps:g(n.steps,e)}):r$1})}function h(t,e){let n=e?.id??"",r$1=e?.name??"",i={_key:e?.key??d(),_idAutoSync:e?.idAutoSync??true};switch(t){case "agent":return r({type:t,id:n,name:r$1,objective:"",outputFormat:"free_text"},i);case "interaction":return r({type:t,id:n,name:r$1,interaction:"questionnaire"},i);case "shell":return r({type:t,id:n,name:r$1,command:""},i);case "git":return r({type:t,id:n,name:r$1,operation:"create_worktree",params:{}},i);case "provider_action":return r({type:t,id:n,name:r$1,action:"get_subject",params:{}},i);case "sub_workflow":return r({type:t,id:n,name:r$1,workflowId:"",forEach:"selection"},i);case "loop":return r({type:t,id:n,name:r$1,steps:[],until:{type:"field_empty",stepId:"",field:""},maxIterations:3,onMaxIterations:{action:"fail"}},i)}}function b(){return {name:"",label:"",type:"string",required:false}}function A(t){return t?Object.entries(t).map(([e,n])=>({key:e,value:n==null?"":String(n)})):[]}function j(t){let e={};for(let n of t){let r=n.key.trim();r&&(e[r]=n.value);}return e}function T(t){return t.issues.map(e=>`${e.path.length>0?e.path.map(String).join("."):"(root)"}: ${e.message}`)}function m(t){let i=t,{_key:e,_idAutoSync:n}=i,r$1=t$1(i,["_key","_idAutoSync"]);return r$1.type==="loop"?s(r({},r$1),{steps:r$1.steps.map(a=>m(a))}):r$1}function v(t,e={}){let n=t.steps.map(_=>{let u=m(_);if(!u.id){let p=u,{id:x}=p;return t$1(p,["id"])}return u}),a=t,{id:r$1}=a,i=t$1(a,["id"]);return e.omitWorkflowId||!r$1?s(r({},i),{steps:n}):s(r({},i),{id:r$1,steps:n})}function E(t,e,n){if(!t._idAutoSync)return s(r({},t),{name:e});let r$1=E_(n);t.id&&r$1.delete(t.id);let i=e.trim().length>0?N_(e,r$1):"";return s(r({},t),{name:e,id:i})}function P(t,e){return s(r({},t),{id:e,_idAutoSync:false})}export{A,E,I,P,T,b,g,h,j,v,y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as ai,z as z$1}from'./chunk-CWbxWv5I.js';import {C,V as Ve,b as at,bi as U0,a0 as $0,q as qo,H as Hw,u as ue$1,o,Q as QE,M as Mi,n as n8,am as S4,J as J6,k as k3,d as dd,z as zc,c as t7,Z as y7,K as Kt,f as _i,m as bD,g as Kc,p as gI,B as _D,ae as Zi,a8 as a,ca as re,af as E,i as ie,F as LD,v as vw,R as Rw,N as ND,h as gh,E as VD,w as nl,O as Ow,A as xD,P as Ph,a5 as ah,a4 as Mh,U as Lh,G as Pu,I as Lu,j as oE,x as ch,y as sE}from'./main-MNK6ZYDO.js';var pe=(()=>{class t{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/filesystem`;}browse(e){let i=new re;return e!=null&&e.trim()!==""&&(i=i.set("path",e.trim())),this.http.get(`${this.baseUrl}/browse`,{params:i}).pipe(E())}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();function z(t){if(!t)return [];if(/^[A-Za-z]:/.test(t)){let r=t.includes("\\")?"\\":"/",y=`${t.slice(0,2)}${r}`,v=t.slice(2).replace(/^[\\/]+/,"").split(/[\\/]/).filter(Boolean),P=[{label:t.slice(0,2),path:y}],M=y;for(let k of v)M=M.endsWith(r)?M+k:M+r+k,P.push({label:k,path:M});return P}if(t.startsWith("/")){let r=t.split("/").filter(Boolean),y=[{label:"/",path:"/"}],B="";for(let v of r)B+=`/${v}`,y.push({label:v,path:B});return y}let o=t.includes("\\")?"\\":"/",e=t.split(/[\\/]/).filter(Boolean),i=[],n="";for(let r of e)n=n?n+o+r:r,i.push({label:r,path:n});return i}function N(t){let o=z(t);return o.length<2?null:o[o.length-2].path}var de=(t,o)=>o.path;function ue(t,o){if(t&1){let e=LD();_i(0,"input",1),gh("ngModelChange",function(n){Pu(e);let r=VD();return Lu(r.path.set(n))}),Kc(),oE(),_i(1,"button",2),gh("click",function(){Pu(e);let n=VD();return Lu(n.showBrowser())}),vw(2),Rw(3,"transloco"),Kc();}if(t&2){let e=VD();ch("ngModel",e.path()),sE(),gI(2),nl(" ",Ow(3,2,e.selectMode()==="directory"?"file-browser.browseDirectory":"file-browser.browse")," ");}}function _e(t,o){if(t&1){let e=LD();_i(0,"button",11),gh("click",function(){Pu(e);let n=VD().$implicit,r=VD(2);return Lu(r.loadDir(n.path))}),vw(1),Kc(),_i(2,"span",12),vw(3,"/"),Kc();}if(t&2){let e=VD().$implicit;ah("data-testid","file-browser-crumb-"+e.label),gI(),nl(" ",e.label," ");}}function fe(t,o){if(t&1&&(_i(0,"span",10),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","file-browser-crumb-"+e.label),gI(),Ph(e.label);}}function he(t,o){if(t&1&&bD(0,_e,4,2)(1,fe,2,2,"span",10),t&2){let e=o.$index,i=o.$count;_D(e!==i-1?0:1);}}function be(t,o){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ce(t,o){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.error());}}function ge(t,o){if(t&1){let e=LD();_i(0,"li")(1,"button",13),gh("click",function(){let n=Pu(e),r=VD(3);return Lu(r.loadDir(n))}),vw(2," ../ "),Kc()();}}function we(t,o){if(t&1){let e=LD();_i(0,"li")(1,"button",14),gh("click",function(){let n=Pu(e).$implicit,r=VD(3);return Lu(r.onEntry(n))}),vw(2),Kc()();}if(t&2){let e=o.$implicit,i=VD(3);gI(),Mh("dir",e.isDirectory)("selected",i.isSelected(e)),ah("data-testid","file-browser-entry-"+e.name),gI(),Lh(" ",e.name,"",e.isDirectory?"/":""," ");}}function xe(t,o){if(t&1&&(_i(0,"ul",7),bD(1,ge,3,0,"li"),ND(2,we,3,7,"li",null,de),Kc()),t&2){let e,i=VD(2);gI(),_D((e=i.parentDir())?1:-1,e),gI(),xD(i.entries());}}function ye(t,o){if(t&1){let e=LD();_i(0,"button",15),gh("click",function(){Pu(e);let n=VD(2);return Lu(n.useCurrentFolder())}),vw(1),Rw(2,"transloco"),Kc();}t&2&&(gI(),nl(" ",Ow(2,1,"file-browser.useFolder")," "));}function Me(t,o){if(t&1){let e=LD();_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc(),_i(3,"nav",4),ND(4,he,2,1,null,null,de),Kc(),bD(6,be,3,3,"p",5)(7,Ce,2,1,"p",6)(8,xe,4,1,"ul",7),_i(9,"button",8),gh("click",function(){Pu(e);let n=VD();return Lu(n.showManual())}),vw(10),Rw(11,"transloco"),Kc(),bD(12,ye,3,3,"button",9);}if(t&2){let e=VD();gI(),nl(" ",e.path()||Ow(2,4,e.selectMode()==="directory"?"file-browser.emptySelectionDirectory":"file-browser.emptySelection")," "),gI(3),xD(e.crumbs()),gI(2),_D(e.loading()?6:e.error()?7:8),gI(4),nl(" ",Ow(11,6,"file-browser.enterManually")," "),gI(2),_D(e.selectMode()==="directory"&&!e.loading()&&!e.error()?12:-1);}}var qe=(()=>{class t{constructor(){this.filesystem=C(pe),this.transloco=C(Ve),this.destroyRef=C(at),this.path=U0(""),this.selectMode=$0("file"),this.manual=qo(false),this.currentDir=qo(""),this.entries=qo([]),this.loading=qo(false),this.error=qo(null),this.crumbs=Hw(()=>z(this.currentDir())),this.parentDir=Hw(()=>N(this.currentDir()));}ngOnInit(){this.openAround(this.path());}isSelected(e){return this.selectMode()==="directory"?e.isDirectory&&e.path===this.path():!e.isDirectory&&e.path===this.path()}onEntry(e){if(e.isDirectory){this.loadDir(e.path);return}this.selectMode()==="file"&&this.path.set(e.path);}useCurrentFolder(){this.path.set(this.currentDir());}loadDir(e){this.loading.set(true),this.error.set(null),this.filesystem.browse(e).pipe(ue$1(this.destroyRef)).subscribe({next:i=>this.applyListing(i),error:i=>{this.loading.set(false),this.error.set(this.errorMessage(i,this.transloco.translate("file-browser.loadFailed")));}});}showManual(){this.manual.set(true);}showBrowser(){this.manual.set(false),this.openAround(this.path());}openAround(e){let i=e.trim();if(!i){this.loadDir(void 0);return}this.loading.set(true),this.error.set(null),this.filesystem.browse(i).pipe(ue$1(this.destroyRef)).subscribe({next:n=>this.applyListing(n),error:()=>this.loadDir(N(i)??void 0)});}applyListing(e){this.currentDir.set(e.path),this.entries.set(e.entries),this.loading.set(false),this.error.set(null);}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-file-browser"]],inputs:{path:[1,"path"],selectMode:[1,"selectMode"]},outputs:{path:"pathChange"},decls:3,vars:1,consts:[["data-testid","file-browser",1,"file-browser"],["nz-input","","data-testid","context-file-path",3,"ngModelChange","ngModel"],["nz-button","","type","button","data-testid","file-browser-browse-toggle",3,"click"],["data-testid","file-browser-selected",1,"selected"],["data-testid","file-browser-breadcrumbs",1,"crumbs"],["data-testid","file-browser-loading"],["data-testid","file-browser-error",1,"error"],["data-testid","file-browser-entries",1,"entries"],["nz-button","","nzType","link","type","button","data-testid","file-browser-manual-toggle",3,"click"],["nz-button","","nzType","primary","type","button","data-testid","file-browser-use-folder"],[1,"current"],["nz-button","","nzType","link","type","button",3,"click"],["aria-hidden","true",1,"sep"],["type","button","data-testid","file-browser-up",1,"entry","dir",3,"click"],["type","button",1,"entry",3,"click"],["nz-button","","nzType","primary","type","button","data-testid","file-browser-use-folder",3,"click"]],template:function(i,n){i&1&&(_i(0,"div",0),bD(1,ue,4,4)(2,Me,13,8),Kc()),i&2&&(gI(),_D(n.manual()?1:2));},dependencies:[Mi,n8,S4,J6,k3,dd,zc,t7,y7,ai,z$1,Kt],styles:[".file-browser[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.45rem}.selected[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:#44403c;overflow-wrap:anywhere;word-break:break-word}.crumbs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.1rem;font-size:.85rem}.crumbs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-inline:.15rem;height:auto}.sep[_ngcontent-%COMP%]{color:#a8a29e}.current[_ngcontent-%COMP%]{color:#1c1917;font-weight:600}.entries[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.2rem 0;max-height:12rem;overflow:auto;border:1px solid #e7e5e4;background:#fff}.entry[_ngcontent-%COMP%]{display:block;width:100%;text-align:left;border:0;background:transparent;padding:.3rem .6rem;cursor:pointer;font:inherit;color:inherit}.entry[_ngcontent-%COMP%]:hover{background:#f5f5f4}.entry.dir[_ngcontent-%COMP%]{font-weight:600}.entry.selected[_ngcontent-%COMP%]{background:#e7e5e4}.error[_ngcontent-%COMP%]{margin:0;color:#9f1239}"]});}}return t})();export{qe as q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {u,f}from'./chunk-CxBYhrEj.js';import {W,I}from'./chunk-DNOjVPY0.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-3mppll1n.js';import {C,$,T as Ie,V as Ve,b as at,a0 as $0,q as qo,W as rd,Y as Bw,a9 as Ng,aa as Xi,ab as Dg,u as ue,o,s,r,Q as QE,M as Mi,L as Ln,d as dd,z as zc,c as t7,K as Kt,m as bD,B as _D,f as _i,v as vw,R as Rw,g as Kc,p as gI,P as Ph,O as Ow,E as VD,N as ND,x as ch,A as xD,a5 as ah,a3 as xw,w as nl,F as LD,h as gh,G as Pu,I as Lu}from'./main-MNK6ZYDO.js';var st=n=>["/jobs",n],lt=(n,m)=>m.id;function dt(n,m){n&1&&(_i(0,"p",0),vw(1),Rw(2,"transloco"),Kc()),n&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ct(n,m){if(n&1&&(_i(0,"p",1),vw(1),Kc()),n&2){let t=VD();gI(),Ph(t.loadError());}}function pt(n,m){if(n&1){let t=LD();_i(0,"button",6),gh("click",function(e){Pu(t);let d=VD().$implicit,g=VD(2);return Lu(g.retryJob(d,e))}),vw(1),Rw(2,"transloco"),Kc();}if(n&2){let t=VD().$implicit,i=VD(2);ch("disabled",i.retryingJobId()===t.id),ah("data-testid","job-retry-"+t.id),gI(),nl(" ",Ow(2,3,i.retryingJobId()===t.id?"jobs.detail.retrying":"jobs.table.retry")," ");}}function bt(n,m){if(n&1){let t=LD();_i(0,"button",7),gh("click",function(e){Pu(t);let d=VD().$implicit,g=VD(2);return Lu(g.cancelJob(d,e))}),vw(1),Rw(2,"transloco"),Kc();}if(n&2){let t=VD().$implicit,i=VD(2);ch("disabled",i.cancellingJobId()===t.id),ah("data-testid","job-cancel-"+t.id),gI(),nl(" ",Ow(2,3,i.cancellingJobId()===t.id?"jobs.detail.cancelling":"jobs.table.cancel")," ");}}function ut(n,m){if(n&1&&(_i(0,"tr")(1,"td")(2,"a",3),vw(3),Kc()(),_i(4,"td")(5,"nz-tag"),vw(6),Rw(7,"transloco"),Kc()(),_i(8,"td")(9,"span"),vw(10),Kc()(),_i(11,"td")(12,"span"),vw(13),Kc()(),_i(14,"td")(15,"span"),vw(16),Kc()(),_i(17,"td"),bD(18,pt,3,5,"button",4),bD(19,bt,3,5,"button",5),Kc()()),n&2){let t=m.$implicit,i=VD(2);ah("data-testid","job-row-"+t.id),gI(2),ch("routerLink",xw(16,st,t.id)),ah("data-testid","job-link-"+t.id),gI(),nl(" ",t.id," "),gI(2),ah("data-testid","job-status-"+t.id),gI(),Ph(Ow(7,14,i.statusKey(t.status))),gI(3),ah("data-testid","job-subject-"+t.id),gI(),Ph(i.subjectText(t)),gI(2),ah("data-testid","job-started-"+t.id),gI(),Ph(t.createdAt),gI(2),ah("data-testid","job-completed-"+t.id),gI(),Ph(t.completedAt??"\u2014"),gI(2),_D(t.status==="failed"?18:-1),gI(),_D(i.isTerminalStatus(t.status)?-1:19);}}function mt(n,m){if(n&1&&(_i(0,"nz-table",2)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),_i(12,"th"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"th"),vw(16),Rw(17,"transloco"),Kc(),_i(18,"th"),vw(19),Rw(20,"transloco"),Kc()()(),_i(21,"tbody"),ND(22,ut,20,18,"tr",null,lt),Kc()()),n&2){let t=VD();ch("nzData",t.displayJobs())("nzFrontPagination",false)("nzShowPagination",false)("nzSize","middle"),gI(4),Ph(Ow(5,10,"jobs.table.column.id")),gI(3),Ph(Ow(8,12,"jobs.table.column.status")),gI(3),Ph(Ow(11,14,"jobs.table.column.subject")),gI(3),Ph(Ow(14,16,"jobs.table.column.started")),gI(3),Ph(Ow(17,18,"jobs.table.column.completed")),gI(3),Ph(Ow(20,20,"jobs.table.column.actions")),gI(3),xD(t.displayJobs());}}var Bt=(()=>{class n{constructor(){this.jobsApi=C($),this.router=C(Ie),this.transloco=C(Ve),this.destroyRef=C(at),this.jobs=$0(null),this.jobIds=$0([]),this.loaded=qo([]),this.loading=qo(false),this.loadError=qo(null),this.retryingJobId=qo(null),this.cancellingJobId=qo(null),this.patched=qo({}),rd(()=>{let t=this.jobs(),i=this.jobIds();if(t!=null){Bw(()=>{this.loaded.set([]),this.loading.set(false),this.loadError.set(null),this.patched.set({});});return}if(i.length===0){Bw(()=>{this.loaded.set([]),this.loading.set(false);});return}Bw(()=>{this.loading.set(true),this.loadError.set(null),Ng(i.map(e=>this.jobsApi.get(e).pipe(Xi(()=>Dg(null))))).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.loaded.set(e.filter(d=>d!=null)),this.loading.set(false);},error:()=>{this.loading.set(false),this.loadError.set("Failed to load jobs");}});});});}displayJobs(){let t=this.jobs(),i=t??this.loaded(),e=this.patched();return i.map(d=>e[d.id]??d)}isTerminalStatus(t){return u(t)}statusKey(t){return `jobs.status.${t}`}subjectText(t){return f(t.subjectContext)??"\u2014"}retryJob(t,i){i.preventDefault(),i.stopPropagation(),!(t.status!=="failed"||this.retryingJobId()===t.id)&&(this.retryingJobId.set(t.id),this.loadError.set(null),this.jobsApi.retry(t.id).subscribe({next:e=>{this.retryingJobId.set(null),this.router.navigate(["/jobs",e.id]);},error:e=>{this.retryingJobId.set(null),this.loadError.set(e instanceof o||e instanceof Error?e.message:this.transloco.translate("jobs.errors.retryFailed"));}}));}cancelJob(t,i){i.preventDefault(),i.stopPropagation(),!(u(t.status)||this.cancellingJobId()===t.id)&&(this.cancellingJobId.set(t.id),this.loadError.set(null),this.jobsApi.cancel(t.id).subscribe({next:e=>{this.cancellingJobId.set(null),this.patched.update(d=>s(r({},d),{[e.id]:e})),this.loaded.update(d=>d.map(g=>g.id===e.id?e:g));},error:e=>{this.cancellingJobId.set(null),this.loadError.set(e instanceof o||e instanceof Error?e.message:this.transloco.translate("jobs.errors.cancelFailed"));}}));}static{this.\u0275fac=function(i){return new(i||n)};}static{this.\u0275cmp=QE({type:n,selectors:[["app-job-status-table"]],inputs:{jobs:[1,"jobs"],jobIds:[1,"jobIds"]},decls:3,vars:1,consts:[["data-testid","job-status-loading"],["data-testid","job-status-error",1,"error"],["data-testid","job-status-table",3,"nzData","nzFrontPagination","nzShowPagination","nzSize"],[3,"routerLink"],["nz-button","","nzType","link","type","button",3,"disabled"],["nz-button","","nzType","link","nzDanger","","type","button",3,"disabled"],["nz-button","","nzType","link","type","button",3,"click","disabled"],["nz-button","","nzType","link","nzDanger","","type","button",3,"click","disabled"]],template:function(i,e){i&1&&bD(0,dt,3,3,"p",0)(1,ct,2,1,"p",1)(2,mt,24,22,"nz-table",2),i&2&&_D(e.loading()&&e.jobs()==null?0:e.loadError()?1:2);},dependencies:[Mi,Ln,dd,zc,t7,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".error[_ngcontent-%COMP%]{color:#9f1239}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return n})();export{Bt as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {C,aY as Ee,aq as kt,aw as Le,bx as re,by as Vg,bz as Gl,bA as Rt$1,bB as Bu,bC as pn,bD as Ga,bE as Na,bF as t2,bG as K1,bH as A1,bI as G1,a_ as j3,bJ as A,i as ie$1,an as YE,ao as uu,r,bK as Le$1,bL as Sy,Q as QE,aA as pt,aB as Se$1,aC as Tt,aD as Ie,bM as Z4,bN as Da,d as dd,z as zc,c as t7,Z as y7,bO as Ky,bP as eh,f as _i,R as Rw,m as bD,l as lh,aN as nh,g as Kc,bq as sw,be as cw,ag as _h,O as Ow,p as gI,B as _D,x as ch,bc as rD,bQ as on,h as gh,a4 as Mh,aJ as Ih,aK as qD,aL as WD,bR as W,bS as We,bT as Ge,bU as on$1,bV as yt$1,bW as im,bX as Pa,bY as v,bZ as wr,at as z0,a0 as $0,a1 as B0,b_ as G4,b$ as Uo,as as oe,ar as _r,c0 as i0,c1 as XI,c2 as Gm,b as at,bp as Vt$1,c3 as s9,c4 as x1,ay as St$1,u as ue,bt as XE,c5 as eD,F as LD,aO as el,aP as tl,E as VD,v as vw,a5 as ah,w as nl,G as Pu,I as Lu,c6 as h9,c7 as d9,c8 as Aw,N as ND,S as SD,A as xD,c9 as vv}from'./main-MNK6ZYDO.js';(class n{static formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}};transform(o,e=0,t="B",i){if(!(h9(o)&&h9(e)&&e%1===0&&e>=0))return o;let a=o,r=t;for(;r!=="B";)a*=1024,r=n.formats[r].prev;if(i){let m=n.formats[i],k=d9(n.calculateResult(m,a),e);return n.formatResult(k,i)}for(let m in n.formats)if(n.formats.hasOwnProperty(m)){let k=n.formats[m];if(a<k.max){let kt=d9(n.calculateResult(k,a),e);return n.formatResult(kt,m)}}}static formatResult(o,e){return `${o} ${e}`}static calculateResult(o,e){let t=o.prev?n.formats[o.prev]:void 0;return t?e/t.max:e}static \u0275fac=function(e){return new(e||n)};static \u0275pipe=eD({name:"nzBytes",type:n,pure:true})});var Se=(()=>{class n{transform(e,t="px"){return typeof e=="number"?`${e}${t}`:e}static \u0275fac=function(t){return new(t||n)};static \u0275pipe=eD({name:"nzToCssUnit",type:n,pure:true})}return n})();var Fe=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=YE({type:n});static \u0275inj=uu({})}return n})();function Ot(n,o){if(n&1&&(el(0),lh(1,"nz-icon",2),tl()),n&2){let e=o.$implicit;gI(),ch("nzType",e);}}var gt=["modalElement"];function Dt(n,o){if(n&1){let e=LD();_i(0,"button",16),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())}),Kc();}}function xt(n,o){if(n&1&&(el(0),lh(1,"span",12),tl()),n&2){let e=VD();gI(),ch("innerHTML",e.config.nzTitle,vv);}}function Et(n,o){}function Nt(n,o){if(n&1&&lh(0,"div",12),n&2){let e=VD();ch("innerHTML",e.config.nzContent,vv);}}function At(n,o){if(n&1){let e=LD();_i(0,"button",17),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCancel())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD();ch("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),gI(),nl(" ",e.config.nzCancelText||Ow(2,4,"Modal.cancelText")," ");}}function St(n,o){if(n&1){let e=LD();_i(0,"button",18),gh("click",function(){Pu(e);let i=VD();return Lu(i.onOk())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD();ch("nzType",e.config.nzOkType)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled)("nzDanger",e.config.nzOkDanger),ah("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),gI(),nl(" ",e.config.nzOkText||Ow(2,6,"Modal.okText")," ");}}var Ft=(n,o)=>({$implicit:n,modalRef:o});function Rt(n,o){if(n&1){let e=LD();_i(0,"button",3),gh("click",function(){let i=Pu(e).$implicit,a=VD(4);return Lu(a.onButtonClick(i))}),vw(1),Kc();}if(n&2){let e=o.$implicit,t=VD(4);ch("hidden",!t.getButtonCallableProp(e,"show"))("nzLoading",t.getButtonCallableProp(e,"loading"))("disabled",t.getButtonCallableProp(e,"disabled"))("nzType",e.type)("nzDanger",e.danger)("nzShape",e.shape)("nzSize",e.size)("nzGhost",e.ghost),gI(),nl(" ",e.label," ");}}function wt(n,o){if(n&1&&ND(0,Rt,2,9,"button",2,SD),n&2){let e=VD(3);xD(e.buttons);}}function Lt(n,o){if(n&1&&lh(0,"div",1),n&2){let e=VD(3);ch("innerHTML",e.config.nzFooter,vv);}}function It(n,o){if(n&1&&(el(0),bD(1,wt,2,0)(2,Lt,1,1,"div",1),tl()),n&2){let e=VD(2);gI(),_D(e.buttons?1:2);}}function Bt(n,o){if(n&1&&nh(0,It,3,1,"ng-container",0),n&2){let e=VD();ch("nzStringTemplateOutlet",e.config.nzFooter)("nzStringTemplateOutletContext",Aw(2,Ft,e.config.nzData,e.modalRef()));}}function Pt(n,o){if(n&1){let e=LD();_i(0,"button",6),gh("click",function(){Pu(e);let i=VD(2);return Lu(i.onCancel())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD(2);ch("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),gI(),nl(" ",e.config.nzCancelText||Ow(2,4,"Modal.cancelText")," ");}}function Vt(n,o){if(n&1){let e=LD();_i(0,"button",7),gh("click",function(){Pu(e);let i=VD(2);return Lu(i.onOk())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD(2);ch("nzType",e.config.nzOkType)("nzDanger",e.config.nzOkDanger)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),gI(),nl(" ",e.config.nzOkText||Ow(2,6,"Modal.okText")," ");}}function Wt(n,o){if(n&1&&(bD(0,Pt,3,6,"button",4),bD(1,Vt,3,8,"button",5)),n&2){let e=VD();_D(e.config.nzCancelText!==null?0:-1),gI(),_D(e.config.nzOkText!==null?1:-1);}}function jt(n,o){if(n&1&&(el(0),lh(1,"div",2),tl()),n&2){let e=VD();gI(),ch("innerHTML",e.config.nzTitle,vv);}}function Ht(n,o){if(n&1){let e=LD();_i(0,"button",9),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())}),Kc();}}function $t(n,o){if(n&1&&lh(0,"div",10),n&2){let e=VD();_h("cursor",e.config.nzDraggable?"move":"auto");}}function Zt(n,o){}function Kt(n,o){if(n&1&&lh(0,"div",7),n&2){let e=VD();ch("innerHTML",e.config.nzContent,vv);}}function Qt(n,o){if(n&1){let e=LD();_i(0,"div",11),gh("cancelTriggered",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())})("okTriggered",function(){Pu(e);let i=VD();return Lu(i.onOkClick())}),Kc();}if(n&2){let e=VD();ch("modalRef",e.modalRef);}}var zt=()=>{},T=class{nzCentered=false;nzClosable=true;nzOkLoading=false;nzOkDisabled=false;nzCancelDisabled=false;nzCancelLoading=false;nzDraggable=false;nzNoAnimation=false;nzAutofocus="auto";nzMask;nzMaskClosable;nzKeyboard=true;nzZIndex=1e3;nzWidth=520;nzCloseIcon="close";nzOkType="primary";nzOkDanger=false;nzModalType="default";nzOnCancel=zt;nzOnOk=zt;nzData;nzMaskStyle;nzBodyStyle;nzWrapClassName;nzClassName;nzStyle;nzTitle;nzFooter;nzCancelText;nzOkText;nzContent;nzCloseOnNavigation;nzViewContainerRef;nzAfterOpen;nzAfterClose;nzIconType="question-circle";nzDirection},_={enter:"ant-zoom-enter",enterActive:"ant-zoom-enter-active",leave:"ant-zoom-leave",leaveActive:"ant-zoom-leave-active"},I={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},te="ant-modal-mask",ne="modal",Ut=new A(""),we=(()=>{class n{config=C(T);static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["button","nz-modal-close",""]],hostAttrs:["aria-label","Close",1,"ant-modal-close"],exportAs:["nzModalCloseBuiltin"],decls:2,vars:1,consts:[[1,"ant-modal-close-x"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-close-icon",3,"nzType"]],template:function(t,i){t&1&&(_i(0,"span",0),nh(1,Ot,2,1,"ng-container",1),Kc()),t&2&&(gI(),ch("nzStringTemplateOutlet",i.config.nzCloseIcon));},dependencies:[pt,Se$1,Tt,Ie],encapsulation:2})}return n})();function qt(n,o){return r(r({},o),n)}function q(n,o,e){return typeof n>"u"?typeof o>"u"?e:o:n}function Ct(){throw Error("Attempting to attach modal content after content is already attached")}var ht=(()=>{class n extends G4{document=C(Uo);cdr=C(z0);config=C(T);ngZone=C(oe);host=C(_r);focusTrapFactory=C(i0);renderer=C(XI);overlayRef=C(t2);nzConfigService=C(kt);animationType=C(Gm,{optional:true});destroyRef=C(at);portalOutlet;modalElementRef;animationStateChanged=new Le$1;containerClick=new Le$1;cancelTriggered=new Le$1;okTriggered=new Le$1;modalRef;isStringContent=false;dir="ltr";elementFocusedBeforeModalWasOpened=null;focusTrap;mouseDown=false;oldMaskStyle=null;get showMask(){let e=this.nzConfigService.getConfigForComponent(ne)||{};return !!q(this.config.nzMask,e.nzMask,true)}get maskClosable(){let e=this.nzConfigService.getConfigForComponent(ne)||{};return !!q(this.config.nzMaskClosable,e.nzMaskClosable,true)}constructor(){super(),this.dir=this.overlayRef.getDirection(),this.isStringContent=typeof this.config.nzContent=="string",Vt$1(ne,()=>this.updateMaskClassname()),this.destroyRef.onDestroy(()=>{this.setMaskExitAnimationClass(true);});}onContainerClick(e){e.target===e.currentTarget&&!this.mouseDown&&this.showMask&&this.maskClosable&&this.containerClick.emit();}onCloseClick(){this.cancelTriggered.emit();}onOkClick(){this.okTriggered.emit();}markForCheck(){this.cdr.markForCheck();}attachComponentPortal(e){this.portalOutlet.hasAttached()&&Ct(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop();let t=this.portalOutlet.attachComponentPortal(e);return this._startEnterAnimation(),t}attachTemplatePortal(e){this.portalOutlet.hasAttached()&&Ct(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop();let t=this.portalOutlet.attachTemplatePortal(e);return this._startEnterAnimation(),t}attachStringContent(){this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this._startEnterAnimation();}getNativeElement(){return this.host.nativeElement}animationDisabled(){return this.config.nzNoAnimation||this.animationType==="NoopAnimations"}setModalTransformOrigin(){let e=this.modalElementRef.nativeElement;if(this.elementFocusedBeforeModalWasOpened){let t=this.elementFocusedBeforeModalWasOpened.getBoundingClientRect(),i=s9(this.elementFocusedBeforeModalWasOpened),a=i.left+t.width/2,r=i.top+t.height/2,m=`${a-e.offsetLeft}px ${r-e.offsetTop}px 0px`;this.renderer.setStyle(e,"transform-origin",m);}}savePreviouslyFocusedElement(){this.focusTrap||(this.focusTrap=this.focusTrapFactory.create(this.host.nativeElement)),this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement,this.host.nativeElement.focus&&this.ngZone.runOutsideAngular(()=>x1(()=>this.host.nativeElement.focus())));}trapFocus(){let e=this.host.nativeElement;if(this.config.nzAutofocus)this.focusTrap.focusInitialElementWhenReady();else {let t=this.document.activeElement;t!==e&&!e.contains(t)&&e.focus();}}restoreFocus(){this.elementFocusedBeforeModalWasOpened?.focus(),this.focusTrap?.destroy();}setEnterInitialClass(){if(this.animationDisabled())return;let e=this.modalElementRef.nativeElement,t=this.overlayRef.backdropElement;e.classList.add(_.enter),t&&t.classList.add(I.enter);}setEnterActiveClass(){if(this.animationDisabled())return;this.setModalTransformOrigin();let e=this.modalElementRef.nativeElement,t=this.overlayRef.backdropElement;e.classList.add(_.enterActive),t&&t.classList.add(I.enterActive);}setExitAnimationClass(){let e=this.modalElementRef.nativeElement;e.classList.add(_.leave),e.classList.add(_.leaveActive),this.setMaskExitAnimationClass();}setMaskExitAnimationClass(e=false){let t=this.overlayRef.backdropElement;if(t){if(this.animationDisabled()||e){t.classList.remove(te);return}t.classList.add(I.leave),t.classList.add(I.leaveActive);}}cleanAnimationClass(){if(this.animationDisabled())return;let e=this.overlayRef.backdropElement,t=this.modalElementRef.nativeElement;e&&(e.classList.remove(I.enter),e.classList.remove(I.enterActive)),t.classList.remove(_.enter),t.classList.remove(_.enterActive),t.classList.remove(_.leave),t.classList.remove(_.leaveActive);}setZIndexForBackdrop(){let e=this.overlayRef.backdropElement;e&&j3(this.config.nzZIndex)&&this.renderer.setStyle(e,"z-index",this.config.nzZIndex);}bindBackdropStyle(){let e=this.overlayRef.backdropElement;if(e){if(this.oldMaskStyle){let t=this.oldMaskStyle;Object.keys(t).forEach(i=>{this.renderer.removeStyle(e,i);}),this.oldMaskStyle=null;}if(this.setZIndexForBackdrop(),typeof this.config.nzMaskStyle=="object"&&Object.keys(this.config.nzMaskStyle).length){let t=r({},this.config.nzMaskStyle);Object.keys(t).forEach(i=>{this.renderer.setStyle(e,i,t[i]);}),this.oldMaskStyle=t;}}}updateMaskClassname(){let e=this.overlayRef.backdropElement;e&&(this.showMask?e.classList.add(te):e.classList.remove(te));}_startEnterAnimation(){if(this.bindBackdropStyle(),this.animationStateChanged.emit("enter-start"),this.animationDisabled())this.trapFocus(),this.animationStateChanged.emit("enter-active");else {this.setEnterInitialClass(),x1(()=>this.setEnterActiveClass());let e=this.modalElementRef.nativeElement,t=()=>{e.removeEventListener("animationend",t),this.trapFocus(),this.cleanAnimationClass(),this.animationStateChanged.emit("enter-active");};e.addEventListener("animationend",t);}}_startLeaveAnimation(e){if(this.animationStateChanged.emit("leave-start"),this.animationDisabled())this.restoreFocus(),e?.(),this.animationStateChanged.emit("leave-active");else {this.setExitAnimationClass();let t=this.modalElementRef.nativeElement,i=()=>{t.removeEventListener("animationend",i),this.restoreFocus(),this.cleanAnimationClass(),e?.(),this.animationStateChanged.emit("leave-active");};t.addEventListener("animationend",i);}}setupMouseListeners(e){St$1(this.host.nativeElement,"mouseup").pipe(ue(this.destroyRef)).subscribe(()=>{this.mouseDown&&setTimeout(()=>{this.mouseDown=false;});}),St$1(e.nativeElement,"mousedown").pipe(ue(this.destroyRef)).subscribe(()=>{this.mouseDown=true;});}static \u0275fac=function(t){return new(t||n)};static \u0275dir=XE({type:n,features:[eh]})}return n})(),yt=(()=>{class n extends ht{set _portalOutlet(e){this.portalOutlet=e;}set _modalElementRef(e){this.modalElementRef=e;}cancelTriggered=new Le$1;okTriggered=new Le$1;ngOnInit(){this.setupMouseListeners(this.modalElementRef);}onCancel(){this.cancelTriggered.emit();}onOk(){this.okTriggered.emit();}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=QE({type:n,selectors:[["nz-modal-confirm-container"]],viewQuery:function(t,i){if(t&1&&Ih(Da,7)(gt,7),t&2){let a;qD(a=WD())&&(i._portalOutlet=a.first),qD(a=WD())&&(i._modalElementRef=a.first);}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:8,hostBindings:function(t,i){t&1&&gh("click",function(r){return i.onContainerClick(r)}),t&2&&(cw(i.config.nzWrapClassName?"ant-modal-wrap "+i.config.nzWrapClassName:"ant-modal-wrap"),_h("z-index",i.config.nzZIndex),Mh("ant-modal-wrap-rtl",i.dir==="rtl")("ant-modal-centered",i.config.nzCentered));},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalConfirmContainer"],features:[rD([on]),eh],decls:17,vars:16,consts:[["modalElement",""],["role","document",1,"ant-modal"],[1,"ant-modal-content"],["nz-modal-close",""],[1,"ant-modal-body"],[1,"ant-modal-confirm-body-wrapper"],[1,"ant-modal-confirm-body"],[3,"nzType"],[1,"ant-modal-confirm-title"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-confirm-content"],["cdkPortalOutlet",""],[3,"innerHTML"],[1,"ant-modal-confirm-btns"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger"],["nz-modal-close","",3,"click"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzLoading","disabled","nzDanger"]],template:function(t,i){t&1&&(_i(0,"div",1,0),Rw(2,"nzToCssUnit"),_i(3,"div",2),bD(4,Dt,1,0,"button",3),_i(5,"div",4)(6,"div",5)(7,"div",6),lh(8,"nz-icon",7),_i(9,"span",8),nh(10,xt,2,1,"ng-container",9),Kc(),_i(11,"div",10),nh(12,Et,0,0,"ng-template",11),bD(13,Nt,1,1,"div",12),Kc()(),_i(14,"div",13),bD(15,At,3,6,"button",14),bD(16,St,3,8,"button",15),Kc()()()()()),t&2&&(sw(i.config.nzStyle),cw(i.config.nzClassName),_h("width",Ow(2,14,i.config?.nzWidth)),gI(4),_D(i.config.nzClosable?4:-1),gI(),sw(i.config.nzBodyStyle),gI(3),ch("nzType",i.config.nzIconType),gI(2),ch("nzStringTemplateOutlet",i.config.nzTitle),gI(3),_D(i.isStringContent?13:-1),gI(2),_D(i.config.nzCancelText!==null?15:-1),gI(),_D(i.config.nzOkText!==null?16:-1));},dependencies:[Fe,pt,Se$1,we,Tt,Ie,Z4,Da,dd,zc,t7,y7,Se,Ky],encapsulation:2})}return n})(),Re=(()=>{class n{cdr=C(z0);config=C(T);modalRef=$0.required();cancelTriggered=B0();okTriggered=B0();buttons=Array.isArray(this.config.nzFooter)?this.config.nzFooter.map(Gt):null;onCancel(){this.cancelTriggered.emit();}onOk(){this.okTriggered.emit();}markForCheck(){this.cdr.markForCheck();}getButtonCallableProp(e,t){let i=e[t],a=this.modalRef().getContentComponent();return typeof i=="function"?i.apply(e,a&&[a]):i}onButtonClick(e){if(!this.getButtonCallableProp(e,"loading")){let i=this.getButtonCallableProp(e,"onClick");e.autoLoading&&wr(i)&&(e.loading=true,i.then(()=>e.loading=false).catch(a=>{throw e.loading=false,a}));}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["div","nz-modal-footer",""]],hostAttrs:[1,"ant-modal-footer"],inputs:{modalRef:[1,"modalRef"]},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalFooterBuiltin"],decls:2,vars:1,consts:[[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"click","hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzDanger","nzLoading","disabled"]],template:function(t,i){t&1&&bD(0,Bt,1,5,"ng-container")(1,Wt,2,2),t&2&&_D(i.config.nzFooter?0:1);},dependencies:[Tt,Ie,dd,zc,t7,y7,Ky],encapsulation:2})}return n})();function Gt(n){return r({type:null,size:"default",autoLoading:true,show:true,loading:false,disabled:false},n)}var vt=(()=>{class n{config=C(T);static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["div","nz-modal-title",""]],hostAttrs:[1,"ant-modal-header"],exportAs:["nzModalTitleBuiltin"],decls:2,vars:1,consts:[[1,"ant-modal-title"],[4,"nzStringTemplateOutlet"],[3,"innerHTML"]],template:function(t,i){t&1&&(_i(0,"div",0),nh(1,jt,2,1,"ng-container",1),Kc()),t&2&&(gI(),ch("nzStringTemplateOutlet",i.config.nzTitle));},dependencies:[Tt,Ie],encapsulation:2})}return n})(),Mt=(()=>{class n extends ht{set _portalOutlet(e){this.portalOutlet=e;}set _modalElementRef(e){this.modalElementRef=e;}modalFooter;markForCheck(){super.markForCheck(),this.modalFooter?.markForCheck();}ngOnInit(){this.setupMouseListeners(this.modalElementRef);}onDragEnded(e){let t=this.modalElementRef.nativeElement,i=e.source.getFreeDragPosition(),{top:a,left:r}=getComputedStyle(t);this.renderer.setStyle(t,"top",W((parseFloat(a)||0)+i.y)),this.renderer.setStyle(t,"left",W((parseFloat(r)||0)+i.x)),e.source.reset();}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=QE({type:n,selectors:[["nz-modal-container"]],viewQuery:function(t,i){if(t&1&&Ih(Da,7)(gt,7)(Re,5),t&2){let a;qD(a=WD())&&(i._portalOutlet=a.first),qD(a=WD())&&(i._modalElementRef=a.first),qD(a=WD())&&(i.modalFooter=a.first);}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:8,hostBindings:function(t,i){t&1&&gh("click",function(r){return i.onContainerClick(r)}),t&2&&(cw(i.config.nzWrapClassName?"ant-modal-wrap "+i.config.nzWrapClassName:"ant-modal-wrap"),_h("z-index",i.config.nzZIndex),Mh("ant-modal-wrap-rtl",i.dir==="rtl")("ant-modal-centered",i.config.nzCentered));},exportAs:["nzModalContainer"],features:[rD([on]),eh],decls:10,vars:15,consts:[["modalElement",""],["cdkDrag","","cdkDragBoundary",".cdk-overlay-container","role","document",1,"ant-modal",3,"cdkDragEnded","cdkDragDisabled"],[1,"ant-modal-content"],["nz-modal-close",""],["nz-modal-title","","cdkDragHandle","",3,"cursor"],[1,"ant-modal-body"],["cdkPortalOutlet",""],[3,"innerHTML"],["nz-modal-footer","",3,"modalRef"],["nz-modal-close","",3,"click"],["nz-modal-title","","cdkDragHandle",""],["nz-modal-footer","",3,"cancelTriggered","okTriggered","modalRef"]],template:function(t,i){t&1&&(_i(0,"div",1,0),Rw(2,"nzToCssUnit"),gh("cdkDragEnded",function(r){return i.onDragEnded(r)}),_i(3,"div",2),bD(4,Ht,1,0,"button",3),bD(5,$t,1,2,"div",4),_i(6,"div",5),nh(7,Zt,0,0,"ng-template",6),bD(8,Kt,1,1,"div",7),Kc(),bD(9,Qt,1,1,"div",8),Kc()()),t&2&&(sw(i.config.nzStyle),cw(i.config.nzClassName),_h("width",Ow(2,13,i.config?.nzWidth)),ch("cdkDragDisabled",!i.config.nzDraggable),gI(4),_D(i.config.nzClosable?4:-1),gI(),_D(i.config.nzTitle?5:-1),gI(),sw(i.config.nzBodyStyle),gI(2),_D(i.isStringContent?8:-1),gI(),_D(i.config.nzFooter!==null?9:-1));},dependencies:[we,vt,Z4,Da,Re,Fe,We,Ge,Se],encapsulation:2})}return n})(),U={OPEN:0,CLOSING:1,CLOSED:2},b={CANCEL:"cancel",OK:"ok"},ie=class{overlayRef;config;containerInstance;componentInstance=null;componentRef=null;result;state=U.OPEN;afterClose=new re;afterOpen=new re;destroy$=new re;constructor(o,e,t){this.overlayRef=o,this.config=e,this.containerInstance=t,t.animationStateChanged.pipe(on$1(i=>i==="enter-active"),yt$1(1)).subscribe(()=>{this.afterOpen.next(),this.afterOpen.complete(),e.nzAfterOpen instanceof Le$1&&e.nzAfterOpen.emit();}),t.animationStateChanged.pipe(on$1(i=>i==="leave-active"),yt$1(1)).subscribe(()=>this._finishDialogClose()),t.containerClick.pipe(im(this.destroy$)).subscribe(()=>{!this.config.nzCancelLoading&&!this.config.nzOkLoading&&this.trigger(b.CANCEL);}),o.keydownEvents().pipe(on$1(()=>this.config.nzKeyboard&&!this.config.nzCancelLoading&&!this.config.nzOkLoading),on$1(i=>i.keyCode===27&&!Pa(i))).subscribe(i=>{i.preventDefault(),this.trigger(b.CANCEL);}),t.cancelTriggered.pipe(im(this.destroy$)).subscribe(()=>this.trigger(b.CANCEL)),t.okTriggered.pipe(im(this.destroy$)).subscribe(()=>this.trigger(b.OK)),o.detachments().subscribe(()=>{this.afterClose.next(this.result),this.afterClose.complete(),e.nzAfterClose instanceof Le$1&&e.nzAfterClose.emit(this.result),this.componentInstance=null,this.componentRef=null,this.overlayRef.dispose();});}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}getElement(){return this.containerInstance.getNativeElement()}destroy(o){this.close(o);}triggerOk(){return this.trigger(b.OK)}triggerCancel(){return this.trigger(b.CANCEL)}close(o){this.state===U.OPEN&&(this.result=o,this.state=U.CLOSING,this.containerInstance._startLeaveAnimation(()=>{this.overlayRef.detachBackdrop(),this._finishDialogClose();}));}updateConfig(o){Object.assign(this.config,o),this.containerInstance.bindBackdropStyle(),this.containerInstance.markForCheck();}getState(){return this.state}getConfig(){return this.config}getBackdropElement(){return this.overlayRef.backdropElement}trigger(o){return v(this,null,function*(){if(this.state===U.CLOSING)return;let e={[b.OK]:{trigger:this.config.nzOnOk,loadingKey:"nzOkLoading"},[b.CANCEL]:{trigger:this.config.nzOnCancel,loadingKey:"nzCancelLoading"}},{trigger:t,loadingKey:i}=e[o];if(!this.config[i]){if(t instanceof Le$1)t.emit(this.getContentComponent());else if(typeof t=="function"){let a=t(this.getContentComponent());if(wr(a)){this.config[i]=true,this.updateConfig(this.config);let r=false;try{r=yield a;}finally{this.config[i]=false,this.updateConfig(this.config),this.closeWhitResult(r);}}else this.closeWhitResult(a);}}})}closeWhitResult(o){o!==false&&this.close(o);}_finishDialogClose(){this.state=U.CLOSED,this.overlayRef.dispose(),this.destroy$.next();}},Xt=(()=>{class n{injector=C(Ee);nzConfigService=C(kt);directionality=C(Le);parentModal=C(n,{skipSelf:true,optional:true});openModalsAtThisLevel=[];afterAllClosedAtThisLevel=new re;get openModals(){return this.parentModal?this.parentModal.openModals:this.openModalsAtThisLevel}get _afterAllClosed(){let e=this.parentModal;return e?e._afterAllClosed:this.afterAllClosedAtThisLevel}afterAllClose=Vg(()=>this.openModals.length?this._afterAllClosed:this._afterAllClosed.pipe(Gl(void 0)));create(e){return this.open(e.nzContent,e)}closeAll(){this.closeModals(this.openModals);}confirm(e={},t="confirm"){return "nzFooter"in e&&Rt$1(`The Confirm-Modal doesn't support "nzFooter", this property will be ignored.`),"nzWidth"in e||(e.nzWidth=416),"nzMaskClosable"in e||(e.nzMaskClosable=false),e.nzModalType="confirm",e.nzClassName=`ant-modal-confirm ant-modal-confirm-${t} ${e.nzClassName||""}`,this.create(e)}info(e={}){return this.confirmFactory(e,"info")}success(e={}){return this.confirmFactory(e,"success")}error(e={}){return this.confirmFactory(e,"error")}warning(e={}){return this.confirmFactory(e,"warning")}open(e,t){let i=qt(t||{},new T),a=this.createOverlay(i),r=this.attachModalContainer(a,i),m=this.attachModalContent(e,r,a,i);return r.modalRef=m,Bu(a,t?.nzZIndex),this.openModals.push(m),m.afterClose.subscribe(()=>this.removeOpenModal(m)),m}removeOpenModal(e){let t=this.openModals.indexOf(e);t>-1&&(this.openModals.splice(t,1),this.openModals.length||this._afterAllClosed.next());}closeModals(e){let t=e.length;for(;t--;)e[t].close(),this.openModals.length||this._afterAllClosed.next();}createOverlay(e){let t=this.nzConfigService.getConfigForComponent(ne)||{};return pn(this.injector,{hasBackdrop:true,scrollStrategy:Na(this.injector),backdropClass:q(e.nzMask,t.nzMask,true)?te:"",positionStrategy:Ga(this.injector),disposeOnNavigation:q(e.nzCloseOnNavigation,t.nzCloseOnNavigation,true),direction:q(e.nzDirection,t.nzDirection,this.directionality.valueSignal())})}attachModalContainer(e,t){let i=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector,a=Ee.create({parent:i||this.injector,providers:[{provide:t2,useValue:e},{provide:T,useValue:t}]}),r=t.nzModalType==="confirm"?yt:Mt,m=new K1(r,t.nzViewContainerRef,a);return e.attach(m).instance}attachModalContent(e,t,i,a){let r=new ie(i,a,t);if(A1(e))t.attachTemplatePortal(new G1(e,null,{$implicit:a.nzData,modalRef:r}));else if(j3(e)&&typeof e!="string"){let m=this.createInjector(r,a),k=t.attachComponentPortal(new K1(e,a.nzViewContainerRef,m));r.componentRef=k,r.componentInstance=k.instance;}else t.attachStringContent();return r}createInjector(e,t){let i=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector;return Ee.create({parent:i||this.injector,providers:[{provide:ie,useValue:e},{provide:Ut,useValue:t.nzData}]})}confirmFactory(e={},t){let i={info:"info-circle",success:"check-circle",error:"close-circle",warning:"exclamation-circle"};return "nzIconType"in e||(e.nzIconType=i[t]),"nzCancelText"in e||(e.nzCancelText=null),this.confirm(e,t)}ngOnDestroy(){this.closeModals(this.openModalsAtThisLevel),this.afterAllClosedAtThisLevel.complete();}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ie$1({token:n,factory:n.\u0275fac})}return n})();var Zn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=YE({type:n});static \u0275inj=uu({providers:[Xt],imports:[we,Re,vt,Mt,yt]})}return n})();export{Ut as U,Xt as X,Zn as Z,ie as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {C,
|
|
1
|
+
import {C,dC as ms,u as ue,bz as Gl,al as Se,cA as Kg,i as ie,as as oe,b as at,bx as re,dD as Dr,df as Qg,cl as ql}from'./main-MNK6ZYDO.js';var u=()=>{},R=(()=>{class e{ngZone=C(oe);destroyRef=C(at);resizeSource$=new re;listeners=0;renderer=C(Dr).createRenderer(null,null);disposeHandle=u;handler=()=>{this.ngZone.run(()=>{this.resizeSource$.next();});};constructor(){this.destroyRef.onDestroy(()=>{this.handler=u;});}connect(){return this.registerListener(),this.resizeSource$.pipe(Qg(16),ql(()=>this.unregisterListener()))}disconnet(){this.unregisterListener();}registerListener(){this.listeners===0&&this.ngZone.runOutsideAngular(()=>{this.disposeHandle=this.renderer.listen("window","resize",this.handler);}),this.listeners+=1;}unregisterListener(){this.listeners-=1,this.listeners===0&&(this.disposeHandle(),this.disposeHandle=u);}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$=(()=>{class e{get singletonRegistry(){return this._singletonRegistry}_singletonRegistry=new Map;registerSingletonWithKey(t,n){let i=this.singletonRegistry.has(t),r=i?this.singletonRegistry.get(t):this.withNewTarget(n);i||this.singletonRegistry.set(t,r);}unregisterSingletonWithKey(t){this.singletonRegistry.has(t)&&this.singletonRegistry.delete(t);}getSingletonWithKey(t){return this.singletonRegistry.has(t)?this.singletonRegistry.get(t).target:null}withNewTarget(t){return {target:t}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var M=(function(e){return e.xxxl="xxxl",e.xxl="xxl",e.xl="xl",e.lg="lg",e.md="md",e.sm="sm",e.xs="xs",e})(M||{});var b={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)",xxxl:"(min-width: 1920px)"};var z=(()=>{class e{resizeService=C(R);mediaMatcher=C(ms);constructor(){this.resizeService.connect().pipe(ue()).subscribe();}subscribe(t,n){return n?this.resizeService.connect().pipe(Gl(void 0),Se(()=>this.matchMedia(t,true)),Kg((i,r)=>i[0]===r[0]),Se(i=>i[1])):this.resizeService.connect().pipe(Gl(void 0),Se(()=>this.matchMedia(t)),Kg())}matchMedia(t,n){let i=M.md,r={};return Object.keys(t).map(S=>{let d=S,g=this.mediaMatcher.matchMedia(b[d]).matches;r[d]=g,g&&(i=d);}),n?[i,r]:i}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$,M,R,b,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f}from'./chunk-2KSNHCgb.js';import {C,b as at,a0 as $0,a1 as B0,q as qo,u as ue,s,r,Q as QE,M as Mi,K as Kt,aQ as Jc,N as ND,aR as Xc,p as gI,A as xD,v as vw,m as bD,w as nl,B as _D,F as LD,dB as mh,E as VD,d9 as ph,a5 as ah,S as SD,a6 as Nw,R as Rw,P as Ph,O as Ow,G as Pu,I as Lu}from'./main-MNK6ZYDO.js';var q=()=>[],A=(t,o)=>o.name,B=(t,o)=>o.id;function j(t,o){t&1&&(Jc(0,"span",1),vw(1,"*"),Xc());}function z(t,o){if(t&1){let e=LD();Jc(0,"input",6),mh("change",function(r){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,r))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("checked",n.checked(e)),ah("data-testid","input-"+e.name);}}function U(t,o){if(t&1){let e=LD();Jc(0,"input",7),mh("input",function(r){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,r))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function G(t,o){if(t&1&&(Jc(0,"option",4),vw(1),Xc()),t&2){let e=o.$implicit;ph("value",e),gI(),Ph(e);}}function H(t,o){if(t&1){let e=LD();Jc(0,"select",8),mh("change",function(r){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,r))}),ND(1,G,2,2,"option",4,SD),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name),gI(),xD(e.options??Nw(2,q));}}function J(t,o){if(t&1&&(Jc(0,"option",4),vw(1),Xc()),t&2){let e=o.$implicit;ph("value",e.id),gI(),Ph(e.name);}}function K(t,o){if(t&1){let e=LD();Jc(0,"select",8),mh("change",function(r){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,r))}),Jc(1,"option",9),vw(2),Rw(3,"transloco"),Xc(),ND(4,J,2,2,"option",4,B),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name),gI(2),Ph(Ow(3,3,"workflow-input.localRepositoryPlaceholder")),gI(2),xD(n.localRepositories());}}function Q(t,o){if(t&1){let e=LD();Jc(0,"input",10),mh("input",function(r){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,r))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function X(t,o){if(t&1&&(Jc(0,"label"),vw(1),bD(2,j,2,0,"span",1),bD(3,z,1,2,"input",2)(4,U,1,2,"input",3)(5,H,3,3,"select",4)(6,K,6,5,"select",4)(7,Q,1,2,"input",5),Xc()),t&2){let e,n=o.$implicit;gI(),nl(" ",n.label," "),gI(),_D(n.required?2:-1),gI(),_D((e=n.type)==="boolean"?3:e==="number"?4:e==="select"?5:e==="localRepository"?6:7);}}function Y(t){if(t.defaultValue!==void 0)return t.defaultValue;switch(t.type){case "boolean":return false;case "number":return "";case "select":return t.options?.[0]??"";default:return ""}}function ae(t){let o={};for(let e of t)o[e.name]=Y(e);return o}var le=(()=>{class t{constructor(){this.reposApi=C(f),this.destroyRef=C(at),this.fields=$0([]),this.values=$0({}),this.valuesChange=B0(),this.localRepositories=qo([]),this.reposApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.localRepositories.set(e),error:()=>this.localRepositories.set([])});}displayValue(e){let n=this.values()[e.name];return n==null?"":String(n)}checked(e){return !!this.values()[e.name]}setValue(e,n){let r$1=n.target,a=r$1.value;e.type==="boolean"?a=r$1.checked:e.type==="number"&&(a=r$1.value===""?"":Number(r$1.value)),this.valuesChange.emit(s(r({},this.values()),{[e.name]:a}));}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-input-form"]],inputs:{fields:[1,"fields"],values:[1,"values"]},outputs:{valuesChange:"valuesChange"},decls:3,vars:0,consts:[["data-testid","workflow-input-form",1,"input-form"],[1,"required"],["type","checkbox",3,"checked"],["type","number",3,"value"],[3,"value"],["type","text",3,"value"],["type","checkbox",3,"change","checked"],["type","number",3,"input","value"],[3,"change","value"],["value",""],["type","text",3,"input","value"]],template:function(n,r){n&1&&(Jc(0,"div",0),ND(1,X,8,3,"label",null,A),Xc()),n&2&&(gI(),xD(r.fields()));},dependencies:[Mi,Kt],styles:["label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}input[type=checkbox][_ngcontent-%COMP%]{width:1.1rem;height:1.1rem}.required[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{ae as a,le as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {q as qo,H as Hw,a8 as a,i as ie}from'./main-MNK6ZYDO.js';var f=(()=>{class e{connect(t){let n=new URLSearchParams;t?.jobId&&n.set("jobId",t.jobId),t?.batchId&&n.set("batchId",t.batchId);let r=n.toString(),p=`${a.apiBaseUrl}/events${r?`?${r}`:""}`,a$1=qo([]),b=Hw(()=>{let o=a$1();return o.length>0?o[o.length-1]:void 0}),s=new EventSource(p);return s.onmessage=o=>{let c;try{c=JSON.parse(o.data);}catch(d){return}a$1.update(d=>[...d,c]);},{events:a$1.asReadonly(),latest:b,close:()=>{s.onmessage=null,s.close();}}}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {an as YE,ao as uu,C,ar as _r,aW as N1,b as at$1,aZ as ga,bJ as A,au as a3,cx as ji,dr as bt$1,q as qo,H as Hw,a0 as $0,aF as Z0,aw as Le,b0 as Uw,ax as m1,a$ as za,aT as de,al as Se,cS as mt,b2 as D8,ds as Me,u as ue,W as rd,bz as Gl,b7 as va,b6 as g9,bt as XE,aG as Sw,bb as B1,bc as rD,bd as R4,h as gh,a5 as ah,be as cw,a4 as Mh,b1 as W0,bw as Er,a1 as B0,r,b3 as p9,ak as Ml,a_ as j3,c6 as h9,b5 as Kf,Q as QE,aA as pt,aB as Se$1,d as dd,z as zc,c as t7,Z as y7,b8 as es,b9 as BD,m as bD,aN as nh,ba as Lw,B as _D,aI as wo,bh as Eh,bg as GD,dt as G5,du as p3,dv as zl,dw as $5,am as S4,J as J6,dx as R0,dy as tr,aE as ly,aV as Y0,N as ND,a7 as MD,A as xD,aH as h1,aJ as Ih,aK as qD,aL as WD,bi as U0,E as VD,bj as zD,x as ch,f as _i,g as Kc,p as gI,bm as $D,F as LD,G as Pu,I as Lu,j as oE,y as sE,cw as Bh,dz as Tw,v as vw,P as Ph,l as lh,a3 as xw,dA as Cw,w as nl}from'./main-MNK6ZYDO.js';var nt=new A("");var ht=["otpInput"];function gt(t,o){if(t&1){let e=LD();_i(0,"input",2,0),gh("input",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onInput(r,i))})("focus",function(i){Pu(e);let r=VD();return Lu(r.onFocus(i))})("keydown",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onKeyDown(r,i))})("paste",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onPaste(r,i))}),Kc(),oE();}if(t&2){let e=o.$implicit,n=VD();ch("nzSize",n.nzSize)("formControl",e)("nzStatus",n.nzStatus),sE();}}var _t=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputSearchEnterButton",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputClearIcon",""]],[["","nz-input",""]]],vt=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputSearchEnterButton]","[nzInputPrefix]","[nzInputSuffix]","[nzInputClearIcon]","[nz-input]"],Ct=t=>({$implicit:t});function zt(t,o){}function bt(t,o){if(t&1&&nh(0,zt,0,0,"ng-template",4),t&2){VD();let e=zD(4);ch("ngTemplateOutlet",e);}}function yt(t,o){}function Nt(t,o){if(t&1&&nh(0,yt,0,0,"ng-template",4),t&2){VD();let e=zD(8);ch("ngTemplateOutlet",e);}}function Dt(t,o){}function xt(t,o){if(t&1&&nh(0,Dt,0,0,"ng-template",4),t&2){VD();let e=zD(10);ch("ngTemplateOutlet",e);}}function Mt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonBefore());}}function St(t,o){t&1&&(_i(0,"span",6),$D(1,0,null,Mt,1,1),Kc());}function It(t,o){}function wt(t,o){if(t&1&&nh(0,It,0,0,"ng-template",4),t&2){VD(2);let e=zD(6);ch("ngTemplateOutlet",e);}}function At(t,o){}function Et(t,o){if(t&1&&nh(0,At,0,0,"ng-template",4),t&2){VD(2);let e=zD(10);ch("ngTemplateOutlet",e);}}function Tt(t,o){if(t&1&&vw(0),t&2){VD(2);let e=Cw(0);nl(" ",e," ");}}function Ft(t,o){t&1&&lh(0,"nz-icon",9);}function Vt(t,o){if(t&1&&bD(0,Tt,1,1)(1,Ft,1,0,"nz-icon",9),t&2){VD();let e=Cw(0);_D(e&&typeof e=="string"?0:1);}}function Rt(t,o){if(t&1){let e=LD();Bh(0),_i(1,"button",8),gh("click",function(i){Pu(e);let r=VD(3);return Lu(r.inputSearchDir.search(i))}),$D(2,2,null,Vt,2,1),Kc();}if(t&2){let e=VD(3),n=Tw(e.inputSearchDir.nzEnterButton()),i=e.inputSearchEnterButton()??n!==false;gI(),ch("nzType",i?"primary":"default")("nzSize",e.size())("nzLoading",e.inputSearchDir.nzLoading());}}function kt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonAfter());}}function Pt(t,o){if(t&1&&(_i(0,"span",6),bD(1,Rt,4,4,"button",7),$D(2,1,null,kt,1,1),Kc()),t&2){let e=VD(2);gI(),_D(e.inputSearchDir?1:-1);}}function Ot(t,o){if(t&1&&(_i(0,"span",5),bD(1,St,3,0,"span",6),bD(2,wt,1,1,null,4)(3,Et,1,1,null,4),bD(4,Pt,4,1,"span",6),Kc()),t&2){let e=VD();gI(),_D(e.hasAddonBefore()?1:-1),gI(),_D(e.hasAffix()?2:3),gI(2),_D(e.hasAddonAfter()?4:-1);}}function Bt(t,o){}function Wt(t,o){if(t&1&&(_i(0,"span"),nh(1,Bt,0,0,"ng-template",4),Kc()),t&2){let e=VD(),n=zD(8);cw(e.affixWrapperClass()),gI(),ch("ngTemplateOutlet",n);}}function Lt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzPrefix());}}function jt(t,o){t&1&&(_i(0,"span",10),$D(1,3,null,Lt,1,1),Kc());}function $t(t,o){}function qt(t,o){t&1&&lh(0,"nz-icon",17);}function Ut(t,o){if(t&1){let e=LD();_i(0,"span",16),gh("click",function(i){Pu(e);let r=VD(3);return r.clear(),Lu(r.inputSearchDir?.search(i,"clear"))}),$D(1,5,null,qt,1,0),Kc();}if(t&2){let e=VD(3);Mh("ant-input-clear-icon-has-suffix",e.nzSuffix()||e.suffix()||e.hasFeedback()||e.inputPasswordDir?.nzVisibilityToggle())("ant-input-clear-icon-hidden",!e.inputDir().value()||e.disabled()||e.readOnly());}}function Ht(t,o){if(t&1&&(_i(0,"span",13),vw(1),Kc()),t&2){let e=VD(3);gI(),Ph(e.dataCount());}}function Gt(t,o){}function Qt(t,o){if(t&1&&nh(0,Gt,0,0,"ng-template",19),t&2){let e=VD(4);ch("ngTemplateOutlet",o)("ngTemplateOutletContext",xw(2,Ct,e.inputPasswordDir.nzVisible()));}}function Zt(t,o){if(t&1&&lh(0,"nz-icon",20),t&2){let e=VD(4);ch("nzType",e.inputPasswordDir.nzVisible()?"eye":"eye-invisible");}}function Kt(t,o){if(t&1){let e=LD();_i(0,"span",18),gh("click",function(){Pu(e);let i=VD(3);return Lu(i.inputPasswordDir.toggleVisible())}),bD(1,Qt,1,4,null,19)(2,Zt,1,1,"nz-icon",20),Kc();}if(t&2){let e,n=VD(3);gI(),_D((e=n.inputPasswordIconTmpl())?1:2,e);}}function Xt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzSuffix());}}function Yt(t,o){if(t&1&&lh(0,"nz-form-item-feedback-icon",15),t&2){let e=VD(3);ch("status",e.status());}}function Jt(t,o){if(t&1&&(_i(0,"span",11),bD(1,Ut,3,4,"span",12),bD(2,Ht,2,1,"span",13),bD(3,Kt,3,1,"span",14),$D(4,4,null,Xt,1,1),bD(6,Yt,1,1,"nz-form-item-feedback-icon",15),Kc()),t&2){let e=VD(2);gI(),_D(e.nzAllowClear()?1:-1),gI(),_D(e.nzShowCount()?2:-1),gI(),_D(e.inputPasswordDir&&e.inputPasswordDir.nzVisibilityToggle()?3:-1),gI(3),_D(e.hasFeedback()&&e.status()?6:-1);}}function en(t,o){if(t&1&&(bD(0,jt,3,0,"span",10),nh(1,$t,0,0,"ng-template",4),bD(2,Jt,7,4,"span",11)),t&2){let e=VD(),n=zD(10);_D(e.hasPrefix()?0:-1),gI(),ch("ngTemplateOutlet",n),gI(),_D(e.hasSuffix()?2:-1);}}function tn(t,o){t&1&&$D(0,6);}var it=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonBefore",""]]})}return t})(),rt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonAfter",""]]})}return t})(),ot=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPrefix",""]]})}return t})(),at=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSuffix",""]]})}return t})(),lt=(()=>{class t{nzVisibilityToggle=$0(true);nzVisible=U0(false);toggleVisible(){this.nzVisible.update(e=>!e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-password"]],hostAttrs:[1,"ant-input-password"],inputs:{nzVisibilityToggle:[1,"nzVisibilityToggle"],nzVisible:[1,"nzVisible"]},outputs:{nzVisible:"nzVisibleChange"},exportAs:["nzInputPassword"]})}return t})(),st=(()=>{class t{static ngTemplateContextGuard(e,n){return true}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPasswordIcon",""]]})}return t})(),dt=new A(""),ct=new A(""),nn="ant-input",z=(()=>{class t{elementRef=C(_r);compactSize=C(N1,{optional:true});destroyRef=C(at$1);nzFormStatusService=C(ga,{optional:true});inputWrapper=C(dt,{host:true,optional:true});focusMonitor=C(a3);hostView=C(ji);inputPasswordDir=C(lt,{host:true,optional:true});inputSearchDir=C(ct,{host:true,optional:true});formField=C(nt,{self:true,optional:true});ngControl=C(bt$1,{self:true,optional:true});nativeValue=qo(this.elementRef.nativeElement.value);value=Hw(()=>this.formField?String(this.formField.state().value()??""):this.nativeValue());nzVariant=$0();nzSize=$0("default");nzStatus=$0("");disabled=$0(false,{transform:Z0});readonly=$0(false,{transform:Z0});controlDisabled=qo(false);finalDisabled=Hw(()=>this.formField?this.formField.state().disabled():this.ngControl?this.controlDisabled():this.disabled());dir=C(Le).valueSignal;size=Uw(this.nzSize);formSize=C(m1,{optional:true});formVariant=C(za,{optional:true});status=this.nzFormStatusService?de(this.nzFormStatusService.formStatusChanges.pipe(Se(e=>e.status)),{initialValue:""}):this.nzStatus;hasFeedback=de(this.nzFormStatusService?.formStatusChanges.pipe(Se(e=>e.hasFeedback))??mt,{initialValue:false});classes=Hw(()=>D8(nn,this.status(),this.hasFeedback()));type=Hw(()=>this.inputPasswordDir?this.inputPasswordDir.nzVisible()?"text":"password":this.inputSearchDir?"search":this.elementRef.nativeElement.getAttribute("type")||"text");focused=qo(false);finalSize=Hw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.size());finalVariant=Hw(()=>this.nzVariant()||this.formVariant?.()||"outlined");feedbackRef=null;disabled$=Me(this.finalDisabled);constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.focusMonitor.monitor(this.elementRef,false).pipe(ue()).subscribe(e=>this.focused.set(!!e)),rd(()=>{this.renderFeedbackIcon();});}ngOnInit(){this.ngControl?.statusChanges?.pipe(Gl(null),ue(this.destroyRef)).subscribe(()=>{this.controlDisabled.set(!!this.ngControl.disabled);}),this.ngControl?.valueChanges?.pipe(Gl(this.ngControl?.control?.value),ue(this.destroyRef)).subscribe(e=>{this.nativeValue.set(e??"");});}onInput(e){this.nativeValue.set(e.target.value);}renderFeedbackIcon(){if(!this.status()||!this.hasFeedback()||this.inputWrapper){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(va),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.setInput("status",this.status());}focus(e){g9(this.elementRef.nativeElement,e);}blur(){this.elementRef.nativeElement.blur();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["input","nz-input",""],["textarea","nz-input",""]],hostAttrs:[1,"ant-input"],hostVars:23,hostBindings:function(n,i){n&1&&gh("input",function(l){return i.onInput(l)}),n&2&&(ah("type",i.type())("disabled",i.finalDisabled()||null)("readonly",i.readonly()||null),cw(i.classes()),Mh("ant-input-disabled",i.finalDisabled())("ant-input-outlined",i.finalVariant()==="outlined")("ant-input-borderless",i.finalVariant()==="borderless")("ant-input-filled",i.finalVariant()==="filled")("ant-input-underlined",i.finalVariant()==="underlined")("ant-input-lg",i.finalSize()==="large")("ant-input-sm",i.finalSize()==="small")("ant-input-rtl",i.dir()==="rtl")("ant-input-focused",i.focused()));},inputs:{nzVariant:[1,"nzVariant"],nzSize:[1,"nzSize"],nzStatus:[1,"nzStatus"],disabled:[1,"disabled"],readonly:[1,"readonly"]},exportAs:["nzInput"],features:[Sw([{provide:B1,useValue:"input"}]),rD([R4])]})}return t})(),rn=(()=>{class t{formBuilder=C(G5);destroyRef=C(at$1);otpInputs;nzLength=6;nzSize="default";disabled=false;nzStatus="";nzFormatter=e=>e;nzMask=null;otpArray;internalValue=[];onChangeCallback;onTouched=()=>{};constructor(){this.createFormArray();}ngOnChanges(e){e.nzLength?.currentValue&&this.createFormArray(),e.disabled&&this.setDisabledState(this.disabled);}onInput(e,n){let i=n.target,r=this.otpInputs.toArray()[e+1];i.value&&r?r.nativeElement.focus():r||this.selectInputBox(e);}onFocus(e){e.target.select();}onKeyDown(e,n){let i=this.otpInputs.toArray()[e-1];n.keyCode===8?(n.preventDefault(),this.internalValue[e]="",this.otpArray.at(e).setValue("",{emitEvent:false}),i&&this.selectInputBox(e-1),this.emitValue()):n.keyCode===37?(n.preventDefault(),this.selectInputBox(e-1)):n.keyCode===39&&(n.preventDefault(),this.selectInputBox(e+1));}writeValue(e){if(!e){this.otpArray.reset();return}let n=e.split("");this.internalValue=n,n.forEach((i,r)=>{let l=this.nzFormatter(i),G=this.nzMask?this.nzMask:l;this.otpArray.at(r).setValue(G,{emitEvent:false});});}registerOnChange(e){this.onChangeCallback=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){e?this.otpArray.disable():this.otpArray.enable();}onPaste(e,n){let i=n.clipboardData?.getData("text")||"";if(!i)return;let r=e;for(let l of i.split(""))if(r<this.nzLength){let G=this.nzFormatter(l);this.internalValue[r]=l;let pt=this.nzMask?this.nzMask:G;this.otpArray.at(r).setValue(pt,{emitEvent:false}),r++;}else break;n.preventDefault(),this.selectInputBox(r),this.emitValue();}createFormArray(){this.otpArray=this.formBuilder.array([]),this.internalValue=new Array(this.nzLength).fill("");for(let e=0;e<this.nzLength;e++){let n=this.formBuilder.nonNullable.control("",[p3.required]);n.valueChanges.pipe(zl(i=>{let r=this.nzFormatter(i);this.internalValue[e]=r,n.setValue(this.nzMask??r,{emitEvent:false}),this.emitValue();}),ue(this.destroyRef)).subscribe(),this.otpArray.push(n);}}emitValue(){let e=this.internalValue.join("");this.onChangeCallback&&this.onChangeCallback(e);}selectInputBox(e){let n=this.otpInputs.toArray();e<=0&&(e=0),e>=n.length&&(e=n.length-1),n[e].nativeElement.select();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-otp"]],viewQuery:function(n,i){if(n&1&&Ih(ht,5),n&2){let r;qD(r=WD())&&(i.otpInputs=r);}},hostAttrs:[1,"ant-otp"],inputs:{nzLength:[2,"nzLength","nzLength",Y0],nzSize:"nzSize",disabled:[2,"disabled","disabled",Z0],nzStatus:"nzStatus",nzFormatter:"nzFormatter",nzMask:"nzMask"},exportAs:["nzInputOtp"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true}]),ly],decls:2,vars:0,consts:[["otpInput",""],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"nzSize","formControl","nzStatus"],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"input","focus","keydown","paste","nzSize","formControl","nzStatus"]],template:function(n,i){n&1&&ND(0,gt,2,3,"input",1,MD),n&2&&xD(i.otpArray.controls);},dependencies:[z,$5,S4,J6,R0,tr],encapsulation:2})}return t})(),on=(()=>{class t{inputDir=W0.required(z);inputRef=W0.required(z,{read:_r});nzEnterButton=$0(false);nzLoading=$0(false,{transform:Z0});nzSearch=B0();size=Hw(()=>this.inputDir().nzSize());search(e,n="input"){this.nzLoading()||this.nzSearch.emit({value:this.inputRef().nativeElement.value,event:e,source:n});}onEnter(e){e.target===this.inputRef().nativeElement&&this.search(e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputDir,z,5)(r,i.inputRef,z,5,_r),n&2&&GD(2);},hostAttrs:[1,"ant-input-search"],hostVars:6,hostBindings:function(n,i){n&1&&gh("keydown.enter",function(l){return i.onEnter(l)}),n&2&&Mh("ant-input-search-large",i.size()==="large")("ant-input-search-small",i.size()==="small")("ant-input-search-with-button",i.nzEnterButton()!==false);},inputs:{nzEnterButton:[1,"nzEnterButton"],nzLoading:[1,"nzLoading"]},outputs:{nzSearch:"nzSearch"},exportAs:["nzInputSearch"],features:[Sw([{provide:ct,useExisting:wo(()=>t)}])]})}return t})(),ut=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSearchEnterButton",""]]})}return t})(),an=(()=>{class t{focusMonitor=C(a3);inputPasswordDir=C(lt,{self:true,optional:true});inputSearchDir=C(on,{self:true,optional:true});inputRef=W0.required(z,{read:_r});inputDir=W0.required(z);prefix=W0(ot);suffix=W0(at);addonBefore=W0(it);addonAfter=W0(rt);inputPasswordIconTmpl=W0(st,{read:Er});inputSearchEnterButton=W0(ut);nzAllowClear=$0(false,{transform:Z0});nzPrefix=$0();nzSuffix=$0();nzAddonBefore=$0();nzAddonAfter=$0();nzShowCount=$0(false,{transform:Z0});nzCount=$0();nzClear=B0();size=Hw(()=>this.inputDir().nzSize());variant=Hw(()=>this.inputDir().nzVariant());disabled=Hw(()=>this.inputDir().finalDisabled());readOnly=Hw(()=>this.inputDir().readonly());status=Hw(()=>this.inputDir().status());hasFeedback=Hw(()=>this.inputDir().hasFeedback());hasPrefix=Hw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Hw(()=>!!this.nzSuffix()||!!this.suffix()||this.nzAllowClear()||this.hasFeedback()||this.nzShowCount()||this.inputPasswordDir);hasAffix=Hw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Hw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Hw(()=>!!this.nzAddonAfter()||!!this.addonAfter()||!!this.inputSearchDir);hasAddon=Hw(()=>this.hasAddonBefore()||this.hasAddonAfter());compactSize=C(N1,{optional:true});dir=C(Le).valueSignal;focused=qo(false);isTextarea=Hw(()=>this.inputRef().nativeElement instanceof HTMLTextAreaElement);finalSize=Hw(()=>this.compactSize?this.compactSize():this.size());class=Hw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():null);affixWrapperClass=Hw(()=>r(r({"ant-input-affix-wrapper":true,"ant-input-affix-wrapper-lg":this.finalSize()==="large","ant-input-affix-wrapper-sm":this.finalSize()==="small","ant-input-affix-wrapper-disabled":this.disabled(),"ant-input-affix-wrapper-readonly":this.readOnly(),"ant-input-affix-wrapper-focused":this.focused(),"ant-input-affix-wrapper-rtl":this.dir()==="rtl"},D8("ant-input-affix-wrapper",this.status(),this.hasFeedback())),p9("ant-input-affix-wrapper",this.variant())));groupWrapperClass=Hw(()=>r(r({"ant-input-group-wrapper":true,"ant-input-group-wrapper-sm":this.finalSize()==="small","ant-input-group-wrapper-lg":this.finalSize()==="large","ant-input-group-wrapper-rtl":this.dir()==="rtl"},D8("ant-input-group-wrapper",this.status(),this.hasFeedback())),p9("ant-input-group-wrapper",this.variant())));inputValue=de(Me(this.inputDir).pipe(Ml(e=>{let n=e.ngControl;return n?(n.valueChanges??mt).pipe(Gl(n.value)):mt})));formattedValue=Hw(()=>{let e=this.nzCount(),n=this.inputValue(),i=e?.max??0,r=j3(n)?String(n):"",l=r;return e?.exceedFormatter&&(l=e.exceedFormatter(r,{max:i})),l});computedCount=Hw(()=>{let e=this.nzCount(),n=this.formattedValue(),i=n.length;return e?.strategy&&(i=e.strategy(n)),i});dataCount=Hw(()=>{let e=this.nzCount(),n=this.computedCount(),i=e?.max;return `${n}${i?`/${i}`:""}`});isOutOfRange=Hw(()=>{let n=this.nzCount()?.max;return h9(n)?this.computedCount()>n:false});constructor(){let e=C(at$1);Kf(()=>{let n=this.inputRef();this.focusMonitor.monitor(n).pipe(ue(e)).subscribe(i=>{this.focused.set(!!i);}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(n);});}),rd(()=>{if(this.nzCount()){let n=this.inputValue(),i=this.formattedValue();j3(n)&&i!==n&&this.inputDir().ngControl?.control?.setValue(i);}});}clear(){this.inputDir().ngControl?.control?.setValue(""),this.nzClear.emit();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-wrapper"],["nz-input-password"],["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputRef,z,5,_r)(r,i.inputDir,z,5)(r,i.prefix,ot,5)(r,i.suffix,at,5)(r,i.addonBefore,it,5)(r,i.addonAfter,rt,5)(r,i.inputPasswordIconTmpl,st,5,Er)(r,i.inputSearchEnterButton,ut,5),n&2&&GD(8);},hostVars:8,hostBindings:function(n,i){n&2&&(cw(i.class()),Mh("ant-input-disabled",i.disabled())("ant-input-out-of-range",i.nzShowCount()&&i.isOutOfRange())("ant-input-affix-wrapper-textarea-with-clear-btn",i.nzAllowClear()&&i.isTextarea()));},inputs:{nzAllowClear:[1,"nzAllowClear"],nzPrefix:[1,"nzPrefix"],nzSuffix:[1,"nzSuffix"],nzAddonBefore:[1,"nzAddonBefore"],nzAddonAfter:[1,"nzAddonAfter"],nzShowCount:[1,"nzShowCount"],nzCount:[1,"nzCount"]},outputs:{nzClear:"nzClear"},exportAs:["nzInputWrapper"],features:[Sw([{provide:B1,useValue:"input"},{provide:dt,useExisting:wo(()=>t)}]),rD([R4])],ngContentSelectors:vt,decls:11,vars:1,consts:[["inputWithAddonInner",""],["inputWithAffix",""],["inputWithAffixInner",""],["input",""],[3,"ngTemplateOutlet"],[1,"ant-input-wrapper","ant-input-group"],[1,"ant-input-group-addon"],["nz-button","","type","button",1,"ant-input-search-button",3,"nzType","nzSize","nzLoading"],["nz-button","","type","button",1,"ant-input-search-button",3,"click","nzType","nzSize","nzLoading"],["nzType","search","nzTheme","outline"],[1,"ant-input-prefix"],[1,"ant-input-suffix"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"ant-input-clear-icon-has-suffix","ant-input-clear-icon-hidden"],[1,"ant-input-show-count-suffix"],["role","button","tabindex","-1",1,"ant-input-password-icon"],[3,"status"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"click"],["nzType","close-circle","nzTheme","fill"],["role","button","tabindex","-1",1,"ant-input-password-icon",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&(BD(_t),bD(0,bt,1,1,null,4)(1,Nt,1,1,null,4)(2,xt,1,1,null,4),nh(3,Ot,5,3,"ng-template",null,0,Lw)(5,Wt,2,3,"ng-template",null,1,Lw)(7,en,3,3,"ng-template",null,2,Lw)(9,tn,1,0,"ng-template",null,3,Lw)),n&2&&_D(i.hasAddon()?0:i.hasAffix()?1:2);},dependencies:[pt,Se$1,dd,zc,t7,y7,va,es],encapsulation:2})}return t})();var ai=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[an,rn]})}return t})();export{ai as a,at as b,it as i,ot as o,rt as r,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {U}from'./chunk-W5GAgssE.js';import {f as f$1}from'./chunk-CJRNatUw.js';import {B as Bt}from'./chunk-BjZIiizu.js';import {W,I}from'./chunk-DNOjVPY0.js';import'./chunk-3mppll1n.js';import'./chunk-CEcbtdnK.js';import {C,a as ae,$,V as Ve,b as at,q as qo,u as ue,W as rd,Y as Bw,o,Q as QE,M as Mi,L as Ln,d as dd,z as zc,c as t7,Z as y7,K as Kt,f as _i,m as bD,g as Kc,p as gI,B as _D,v as vw,R as Rw,P as Ph,O as Ow,E as VD,l as lh,a2 as Pw,a3 as xw,x as ch,F as LD,h as gh,w as nl,G as Pu,I as Lu}from'./main-MNK6ZYDO.js';import'./chunk-CxBYhrEj.js';var G=i=>({count:i});function Q(i,p){i&1&&(_i(0,"p",1),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function X(i,p){if(i&1&&(_i(0,"p",2),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function Y(i,p){if(i&1){let t=LD();_i(0,"button",15),gh("click",function(){Pu(t);let u=VD(2);return Lu(u.cancelBatch())}),vw(1),Rw(2,"transloco"),Kc();}if(i&2){let t=VD(2);ch("disabled",t.cancelling()),gI(),nl(" ",Ow(2,2,t.cancelling()?"batches.detail.cancelling":"batches.detail.cancel")," ");}}function Z(i,p){if(i&1&&(_i(0,"p",12),vw(1),Kc()),i&2){let t=VD(2);gI(),Ph(t.actionError());}}function tt(i,p){if(i&1&&(_i(0,"header",3)(1,"div")(2,"a",4),vw(3),Rw(4,"transloco"),Kc(),_i(5,"h1",5),vw(6),Kc(),_i(7,"p",6)(8,"nz-tag",7),vw(9),Rw(10,"transloco"),Kc(),_i(11,"span",8),vw(12),Kc(),vw(13," \xB7 "),_i(14,"span",9),vw(15),Rw(16,"transloco"),Kc(),vw(17," \xB7 "),_i(18,"span",10),vw(19),Rw(20,"transloco"),Kc()()(),bD(21,Y,3,4,"button",11),Kc(),bD(22,Z,2,1,"p",12),_i(23,"section",13)(24,"h2"),vw(25),Rw(26,"transloco"),Kc(),lh(27,"app-job-status-table",14),Kc()),i&2){let t=p,e=VD();gI(3),Ph(Ow(4,10,"batches.detail.backHint")),gI(3),Ph(t.id),gI(3),Ph(Ow(10,12,e.statusKey(t.status))),gI(3),Ph(t.workflowId),gI(3),Ph(Pw(16,14,"batches.detail.subjectCount",xw(21,G,t.resolvedSubjects.length))),gI(4),Ph(Ow(20,17,e.triggeredByKey(t.triggeredBy))),gI(2),_D(t.status==="running"?21:-1),gI(),_D(e.actionError()?22:-1),gI(3),Ph(Ow(26,19,"batches.detail.membersHeading")),gI(2),ch("jobs",e.memberJobs());}}var et=3e3;function f(i){return i!=="running"}var _t=(()=>{class i{constructor(){this.route=C(ae),this.batchesApi=C(U),this.jobsApi=C($),this.eventsService=C(f$1),this.transloco=C(Ve),this.destroyRef=C(at),this.batch=qo(null),this.memberJobs=qo([]),this.loading=qo(true),this.loadError=qo(null),this.polling=qo(false),this.cancelling=qo(false),this.actionError=qo(null),this.eventStream=qo(null),this.pollHandle=null,this.batchId=null,this.destroyRef.onDestroy(()=>{this.stopPolling(),this.closeStream();}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(t=>{let e=t.get("id");if(!e){this.loading.set(false),this.loadError.set(this.transloco.translate("batches.detail.loadFailed"));return}this.load(e);}),rd(()=>{let t=this.eventStream();if(!t)return;let e=t.latest();e&&(e.type!=="batch_completed"&&e.type!=="batch_cancelled"||e.batchId===this.batchId&&Bw(()=>{this.refreshBatch(),this.refreshMembers(),this.stopPolling(),this.closeStream();}));});}statusKey(t){return `batches.status.${t}`}triggeredByKey(t){return `batches.triggeredBy.${t}`}isPolling(){return this.polling()}cancelBatch(){let t=this.batch();!t||t.status!=="running"||this.cancelling()||(this.actionError.set(null),this.cancelling.set(true),this.batchesApi.cancel(t.id).subscribe({next:e=>{this.cancelling.set(false),this.batch.set(e),this.refreshMembers(),f(e.status)&&(this.stopPolling(),this.closeStream());},error:e=>{this.cancelling.set(false),this.actionError.set(this.errorMessage(e,this.transloco.translate("batches.errors.cancelFailed")));}}));}load(t){this.batchId=t,this.loading.set(true),this.loadError.set(null),this.stopPolling(),this.closeStream(),this.batchesApi.get(t).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.batch.set(e),this.loading.set(false),this.refreshMembers(),f(e.status)||(this.startPolling(),this.eventStream.set(this.eventsService.connect({batchId:t})));},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("batches.detail.loadFailed")));}});}refreshBatch(){let t=this.batchId;t&&this.batchesApi.get(t).subscribe({next:e=>{this.batch.set(e),f(e.status)&&this.stopPolling();},error:()=>{}});}refreshMembers(){let t=this.batchId;t&&this.jobsApi.list({batchId:t}).subscribe({next:e=>this.memberJobs.set(e),error:()=>{}});}startPolling(){this.pollHandle==null&&(this.polling.set(true),this.pollHandle=setInterval(()=>{let t=this.batch();if(!t||f(t.status)){this.stopPolling();return}this.refreshMembers();},et));}stopPolling(){this.pollHandle!=null&&(clearInterval(this.pollHandle),this.pollHandle=null),this.polling.set(false);}closeStream(){let t=this.eventStream();t&&(t.close(),this.eventStream.set(null));}errorMessage(t,e){return t instanceof o||t instanceof Error?t.message:e}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-batch-detail"]],decls:4,vars:1,consts:[["data-testid","batch-detail",1,"detail-page"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"header"],["routerLink","/views"],["data-testid","batch-id"],[1,"meta"],["data-testid","batch-status"],["data-testid","batch-workflow"],["data-testid","batch-subjects"],["data-testid","batch-triggered-by"],["nz-button","","nzDanger","","type","button","data-testid","cancel-batch",3,"disabled"],["data-testid","action-error",1,"error"],["data-testid","batch-members",1,"members"],[3,"jobs"],["nz-button","","nzDanger","","type","button","data-testid","cancel-batch",3,"click","disabled"]],template:function(e,u){if(e&1&&(_i(0,"main",0),bD(1,Q,3,3,"p",1)(2,X,2,1,"p",2)(3,tt,28,23),Kc()),e&2){let _;gI(),_D(u.loading()?1:u.loadError()?2:(_=u.batch())?3:-1,_);}},dependencies:[Mi,Ln,dd,zc,t7,y7,W,I,Bt,Kt],styles:[".detail-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:1.35rem;word-break:break-all}.meta[_ngcontent-%COMP%]{margin:.35rem 0 0;color:#57534e;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.members[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1.1rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{_t as BatchDetailComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {C,ae as Zi,a8 as a,cf as u,af as E,i as ie}from'./main-MNK6ZYDO.js';var U=(()=>{class r{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/workflows`;}list(t){return this.http.get(this.baseUrl,{params:u(t)}).pipe(E())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}create(t){return this.http.post(this.baseUrl,t).pipe(E())}update(t,i){return this.http.patch(`${this.baseUrl}/${encodeURIComponent(t)}`,i).pipe(E())}delete(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}static{this.\u0275fac=function(i){return new(i||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {N as Nt,K as Ke$1}from'./chunk-BAc0DRm8.js';import {X as Xt,Z as Zn,i as ie}from'./chunk-CDWIMt6y.js';import {_ as _n,C as Cn}from'./chunk-Ojn34cvU.js';import {C,V as Ve$1,b as at,q as qo,u as ue,o,Q as QE,M as Mi,n as n8,J as J6,k as k3,L as Ln,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt,f as _i,v as vw,R as Rw,g as Kc,h as gh,m as bD,p as gI,P as Ph,O as Ow,w as nl,B as _D,T as Ie$1,E as VD,F as LD,N as ND,S as SD,j as oE,x as ch,y as sE,A as xD,ae as Zi,a8 as a,af as E,i as ie$1,l as lh,a5 as ah,a2 as Pw,a3 as xw,a7 as MD,ag as _h,G as Pu,I as Lu}from'./main-MNK6ZYDO.js';import {U}from'./chunk-Cf_xd8ER.js';import {W,I}from'./chunk-DNOjVPY0.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-3mppll1n.js';import'./chunk-CEcbtdnK.js';var ke=(()=>{class t{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/workflow-library`;}list(){return this.http.get(this.baseUrl).pipe(E())}add(e){return this.http.post(`${this.baseUrl}/${encodeURIComponent(e)}/add`,{}).pipe(E())}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=ie$1({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();var Se=(t,d)=>d.id;function Be(t,d){t&1&&(_i(0,"p",2),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ie(t,d){if(t&1&&(_i(0,"p",3),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Pe(t,d){if(t&1&&(_i(0,"p",4),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.addError());}}function Le(t,d){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=d.$implicit,i=VD(3);gI(),Ph(Ow(2,1,i.subjectTypeKey(e)));}}function Ne(t,d){if(t&1&&(_i(0,"li")(1,"span"),vw(2),Kc(),_i(3,"span",14),vw(4),Rw(5,"transloco"),Kc()()),t&2){let e=d.$implicit,i=VD(4);_h("margin-left",e.depth,"rem"),gI(2),Ph(e.name),gI(2),Ph(Ow(5,4,i.stepTypeKey(e.type)));}}function We(t,d){if(t&1&&(_i(0,"ol",12),ND(1,Ne,6,6,"li",13,MD),Kc()),t&2){let e=VD().$implicit,i=VD(2);ah("data-testid","library-steps-"+e.id),gI(),xD(i.previewSteps(e));}}function je(t,d){if(t&1){let e=LD();_i(0,"nz-card")(1,"div",6)(2,"h2"),vw(3),Kc(),_i(4,"nz-tag"),vw(5),Rw(6,"transloco"),Kc()(),_i(7,"p",7),vw(8),Kc(),_i(9,"div",8),ND(10,Le,3,3,"nz-tag",null,SD),Kc(),_i(12,"div",9)(13,"button",10),gh("click",function(){let c=Pu(e).$implicit,C=VD(2);return Lu(C.togglePreview(c.id))}),vw(14),Rw(15,"transloco"),Kc(),_i(16,"button",11),gh("click",function(){let c=Pu(e).$implicit,C=VD(2);return Lu(C.addToMyWorkflows(c.id))}),vw(17),Rw(18,"transloco"),Kc()(),bD(19,We,3,1,"ol",12),Kc();}if(t&2){let e=d.$implicit,i=VD(2);ah("data-testid","library-entry-"+e.id),gI(2),ah("data-testid","library-name-"+e.id),gI(),Ph(e.name),gI(),ah("data-testid","library-source-"+e.id),gI(),Ph(Ow(6,13,i.sourceKey(e.source))),gI(2),ah("data-testid","library-description-"+e.id),gI(),nl(" ",e.description," "),gI(2),xD(i.appliesToValues(e)),gI(3),ah("data-testid","library-preview-"+e.id),gI(),nl(" ",Ow(15,15,i.isExpanded(e.id)?"workflow-library.hideSteps":"workflow-library.previewSteps")," "),gI(2),ch("disabled",i.addingId()!==null),ah("data-testid","library-add-"+e.id),gI(),nl(" ",Ow(18,17,i.addingId()===e.id?"workflow-library.adding":"workflow-library.add")," "),gI(2),_D(i.isExpanded(e.id)?19:-1);}}function Fe(t,d){if(t&1&&(bD(0,Pe,2,1,"p",4),_i(1,"div",5),ND(2,je,20,19,"nz-card",null,Se),Kc()),t&2){let e=VD();_D(e.addError()?0:-1),gI(2),xD(e.entries());}}var he=(()=>{class t{constructor(){this.libraryApi=C(ke),this.router=C(Ie$1),this.transloco=C(Ve$1),this.destroyRef=C(at),this.modalRef=C(ie,{optional:true}),this.entries=qo([]),this.loading=qo(true),this.loadError=qo(null),this.addError=qo(null),this.addingId=qo(null),this.expandedIds=qo(new Set),this.libraryApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>{this.entries.set(e),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("workflow-library.loadFailed")));}});}sourceKey(e){return `workflow-library.source.${e}`}appliesToValues(e){let i=e.workflowDefinition.appliesTo;return i==="none"?["none"]:Array.isArray(i)?i:[i]}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}stepTypeKey(e){return `step-list.stepType.${e}`}isExpanded(e){return this.expandedIds().has(e)}togglePreview(e){this.expandedIds.update(i=>{let c=new Set(i);return c.has(e)?c.delete(e):c.add(e),c});}previewSteps(e){return ve(e.workflowDefinition.steps,0)}addToMyWorkflows(e){this.addingId()||(this.addError.set(null),this.addingId.set(e),this.libraryApi.add(e).pipe(ue(this.destroyRef)).subscribe({next:i=>{this.addingId.set(null),this.modalRef?.close(),this.router.navigate(["/workflows",i.id,"edit"]);},error:i=>{this.addingId.set(null),this.addError.set(this.errorMessage(i,this.transloco.translate("workflow-library.addFailed")));}}));}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-library-browser"]],decls:7,vars:4,consts:[["data-testid","workflow-library-browser",1,"library"],[1,"lede"],["data-testid","library-loading"],["data-testid","library-load-error",1,"error"],["data-testid","library-add-error",1,"error"],[1,"cards"],[1,"card-head"],[1,"description"],[1,"applies-to"],[1,"card-actions"],["nz-button","","nzType","link","type","button",3,"click"],["nz-button","","nzType","primary","type","button",3,"click","disabled"],[1,"steps-preview"],[3,"margin-left"],[1,"step-type"]],template:function(i,c){i&1&&(_i(0,"div",0)(1,"p",1),vw(2),Rw(3,"transloco"),Kc(),bD(4,Be,3,3,"p",2)(5,Ie,2,1,"p",3)(6,Fe,4,1),Kc()),i&2&&(gI(2),Ph(Ow(3,2,"workflow-library.lede")),gI(2),_D(c.loading()?4:c.loadError()?5:6));},dependencies:[Mi,dd,zc,t7,y7,Nt,Ke$1,W,I,Kt],styles:[".library[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.lede[_ngcontent-%COMP%]{margin:0;color:#57534e}.cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}.card-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600}.description[_ngcontent-%COMP%]{margin:.5rem 0 0;color:#57534e}.applies-to[_ngcontent-%COMP%]{margin-top:.5rem}.card-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.5rem}.steps-preview[_ngcontent-%COMP%]{margin:.75rem 0 0;padding-left:1.25rem;color:#44403c}.steps-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:.75rem;margin:.25rem 0}.step-type[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();function ve(t,d){let e=[];for(let i of t)e.push({name:i.name,type:i.type,depth:d}),i.type==="loop"&&Array.isArray(i.steps)&&e.push(...ve(i.steps,d+1));return e}var Oe=t=>({count:t}),De=t=>["/workflows",t,"edit"],$e=(t,d)=>d.id;function He(t,d){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ve(t,d){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Ae(t,d){if(t&1&&(lh(0,"nz-option",9),Rw(1,"transloco")),t&2){let e=d.$implicit,i=VD(2);ch("nzValue",e)("nzLabel",Ow(1,2,i.subjectHandlingFilterKey(e)));}}function Re(t,d){if(t&1&&(_i(0,"p",10),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.deleteError());}}function Ke(t,d){if(t&1){let e=LD();_i(0,"section",11)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",13)(5,"button",14),gh("click",function(){Pu(e);let c=VD(2);return Lu(c.openLibrary())}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"a",15),vw(9),Rw(10,"transloco"),Kc()()();}t&2&&(gI(2),Ph(Ow(3,3,"workflows.list.emptyState")),gI(4),nl(" ",Ow(7,5,"workflows.list.emptyBrowseLibrary")," "),gI(3),nl(" ",Ow(10,7,"workflows.list.emptyCreateButton")," "));}function Ue(t,d){if(t&1&&(_i(0,"span"),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","description-"+e.id),gI(),Ph(e.description);}}function qe(t,d){if(t&1&&(_i(0,"span",17),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit;ah("data-testid","description-"+e.id),gI(),Ph(Ow(2,2,"workflows.list.noDescription"));}}function Ge(t,d){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=d.$implicit,i=VD().$implicit,c=VD(3);ah("data-testid","applies-to-"+i.id),gI(),Ph(Ow(2,2,c.subjectTypeKey(e)));}}function Je(t,d){if(t&1){let e=LD();_i(0,"tr")(1,"td")(2,"span"),vw(3),Kc()(),_i(4,"td",16),bD(5,Ue,2,2,"span")(6,qe,3,4,"span",17),Kc(),_i(7,"td"),ND(8,Ge,3,4,"nz-tag",null,SD),Kc(),_i(10,"td")(11,"nz-tag"),vw(12),Rw(13,"transloco"),Kc()(),_i(14,"td")(15,"span"),vw(16),Rw(17,"transloco"),Kc()(),_i(18,"td",18)(19,"a",19),vw(20),Rw(21,"transloco"),Kc(),_i(22,"button",20),Rw(23,"transloco"),Rw(24,"transloco"),Rw(25,"transloco"),gh("nzOnConfirm",function(){let c=Pu(e).$implicit,C=VD(3);return Lu(C.deleteWorkflow(c.id))}),vw(26),Rw(27,"transloco"),Kc()()();}if(t&2){let e=d.$implicit,i=VD(3);ah("data-testid","workflow-"+e.id),gI(2),ah("data-testid","name-"+e.id),gI(),Ph(e.name),gI(2),_D(e.description?.trim()?5:6),gI(3),xD(i.appliesToValues(e)),gI(3),ah("data-testid","subject-handling-"+e.id),gI(),Ph(Ow(13,16,i.subjectHandlingKey(e.subjectHandling))),gI(3),ah("data-testid","step-count-"+e.id),gI(),Ph(Pw(17,18,"workflows.list.stepCount",xw(31,Oe,e.steps.length))),gI(3),ch("routerLink",xw(33,De,e.id)),ah("data-testid","edit-"+e.id),gI(),nl(" ",Ow(21,21,"workflows.list.edit")," "),gI(2),ch("nzPopconfirmTitle",Ow(23,23,"workflows.list.deleteConfirm"))("nzOkText",Ow(24,25,"workflows.list.delete"))("nzCancelText",Ow(25,27,"common.cancel")),ah("data-testid","delete-"+e.id),gI(4),nl(" ",Ow(27,29,"workflows.list.delete")," ");}}function Qe(t,d){if(t&1&&(_i(0,"nz-table",12)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),_i(12,"th"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"th"),vw(16),Rw(17,"transloco"),Kc(),_i(18,"th"),vw(19),Rw(20,"transloco"),Kc()()(),_i(21,"tbody"),ND(22,Je,28,35,"tr",null,$e),Kc()()),t&2){let e=VD(2);ch("nzData",e.workflows())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Ph(Ow(5,9,"workflows.list.column.name")),gI(3),Ph(Ow(8,11,"workflows.list.column.description")),gI(3),Ph(Ow(11,13,"workflow-editor.appliesTo")),gI(3),Ph(Ow(14,15,"workflow-editor.subjectHandling.label")),gI(3),Ph(Ow(17,17,"workflows.list.column.steps")),gI(3),Ph(Ow(20,19,"workflows.list.column.actions")),gI(3),xD(e.workflows());}}function Xe(t,d){if(t&1){let e=LD();_i(0,"div",7)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",8),gh("ngModelChange",function(c){Pu(e);let C=VD();return Lu(C.setSubjectHandlingFilter(c))}),ND(5,Ae,2,4,"nz-option",9,SD),Kc(),oE(),Kc(),bD(7,Re,2,1,"p",10),bD(8,Ke,11,9,"section",11)(9,Qe,24,21,"nz-table",12);}if(t&2){let e=VD();gI(2),Ph(Ow(3,4,"workflows.list.filterBySubjectHandling")),gI(2),ch("ngModel",e.subjectHandlingFilter()),sE(),gI(),xD(e.subjectHandlingOptions),gI(2),_D(e.deleteError()?7:-1),gI(),_D(e.workflows().length===0?8:9);}}var Ot=(()=>{class t{constructor(){this.workflowsApi=C(U),this.transloco=C(Ve$1),this.destroyRef=C(at),this.modal=C(Xt),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.subjectHandlingFilter=qo("all"),this.subjectHandlingOptions=["all","per-subject","collection"],this.load();}setSubjectHandlingFilter(e){this.subjectHandlingFilter.set(e),this.load();}appliesToValues(e){let i=e.appliesTo;return i==="none"?["none"]:Array.isArray(i)?i:[i]}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}subjectHandlingKey(e){return `workflow-editor.subjectHandling.${e}`}subjectHandlingFilterKey(e){return e==="all"?"workflows.list.filterAll":`workflow-editor.subjectHandling.${e}`}deleteWorkflow(e){this.deleteError.set(null),this.workflowsApi.delete(e).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.workflows.update(i=>i.filter(c=>c.id!==e));},error:i=>{this.deleteError.set(this.errorMessage(i,this.transloco.translate("workflows.list.deleteFailed")));}});}openLibrary(){this.modal.create({nzTitle:this.transloco.translate("workflow-library.title"),nzContent:he,nzFooter:null,nzWidth:720});}load(){let e=this.subjectHandlingFilter();this.loading.set(true),this.loadError.set(null),this.workflowsApi.list(e==="all"?void 0:{subjectHandling:e}).pipe(ue(this.destroyRef)).subscribe({next:i=>{this.workflows.set(i),this.loading.set(false);},error:i=>{this.loading.set(false),this.loadError.set(this.errorMessage(i,this.transloco.translate("workflows.list.loadFailed")));}});}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-list"]],decls:15,vars:10,consts:[["data-testid","workflows-list",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","type","button","data-testid","browse-library",3,"click"],["nz-button","","nzType","primary","routerLink","/workflows/new","data-testid","create-workflow"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"field"],["data-testid","subject-handling-filter",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","workflow-items",3,"nzData","nzFrontPagination","nzShowPagination"],[1,"empty-actions"],["nz-button","","type","button","data-testid","empty-browse-library",3,"click"],["nz-button","","nzType","primary","routerLink","/workflows/new","data-testid","empty-create"],[1,"description-cell"],[1,"muted"],[1,"actions"],["nz-button","","nzType","link",3,"routerLink"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"]],template:function(i,c){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"div",2)(6,"button",3),gh("click",function(){return c.openLibrary()}),vw(7),Rw(8,"transloco"),Kc(),_i(9,"a",4),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,He,3,3,"p",5)(13,Ve,2,1,"p",6)(14,Xe,10,6),Kc()),i&2&&(gI(3),Ph(Ow(4,4,"workflows.list.title")),gI(4),nl(" ",Ow(8,6,"workflows.list.browseLibrary")," "),gI(3),nl(" ",Ow(11,8,"workflows.list.createButton")," "),gI(2),_D(c.loading()?12:c.loadError()?13:14));},dependencies:[Mi,n8,J6,k3,Ln,dd,zc,t7,y7,Zn,_n,Cn,Xb,V5,D5,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;flex-shrink:0}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;max-width:16rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.muted[_ngcontent-%COMP%]{color:#a8a29e;font-style:italic}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.empty-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;gap:.75rem}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] td.description-cell{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;text-overflow:unset;max-width:28rem;vertical-align:top}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{Ot as WorkflowListComponent,Ot as WorkflowsManageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=new Set(["completed","failed","cancelled"]);function l(t){return t==="agent"||t==="shell"||t==="git"||t==="provider_action"}function u(t){return s.has(t)}function c(t){let n=t.stepHistory.find(e=>e.status==="running");if(n)return n;if((t.status==="waiting_for_human"||t.status==="waiting_for_children")&&t.currentStepExecutionId){let e=t.stepHistory.find(r=>r.id===t.currentStepExecutionId);if(e)return e}return u(t.status)&&t.stepHistory.length>0?t.stepHistory[t.stepHistory.length-1]??null:null}function o(t,n){let e=new Map;for(let r of n)e.set(r.stepDefinitionId,r);return t.map(r=>{let i=e.get(r.id)??null;return {definition:r,execution:i,reached:i!=null}})}function f(t){if(!t)return null;if(t.mode==="single"){let e=t.subject;return `${e.id} \xB7 ${e.title}`}let n=t.subjects.length;if(n===0)return null;if(n===1){let e=t.subjects[0];return `${e.id} \xB7 ${e.title}`}return `${n} subjects`}export{c,f,l,o,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {I,g,b,v,T,y,h,E,P,A,j}from'./chunk-BbcTWKT2.js';import {N as Nt,K as Ke}from'./chunk-BAc0DRm8.js';import {$ as $$1,F,B}from'./chunk-A4AkMf2s.js';import {y as yx,o as oy,U as Um,J as J_,M as M_,a as ay}from'./chunk-BUuwGTt7.js';import {M as Me,z as zt}from'./chunk-BNOYZq-b.js';import {X as Xt,Z as Zn$1}from'./chunk-CDWIMt6y.js';import'./chunk-BhGgxvgu.js';import {a as ai$1,z,o as ot,b as at$1,i as it,r as rt}from'./chunk-CWbxWv5I.js';import'./chunk-Ojn34cvU.js';import {C,a as ae,T as Ie,aj as $,b as at,V as Ve,aS as O,aT as de,al as Se,q as qo,H as Hw,u as ue,s,r,o,Q as QE,M as Mi$1,n as n8,am as S4,J as J6,k as k3,L as Ln$1,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt,f as _i$1,v as vw,g as Kc,R as Rw,h as gh,m as bD,p as gI,P as Ph,O as Ow,x as ch,w as nl,B as _D,a0 as $0,a1 as B0,W as rd,t as t$1,aU as $6,N as ND,a5 as ah,A as xD,E as VD,F as LD,j as oE,S as SD,a7 as MD,y as sE,an as YE,ao as uu,aV as Y0,aF as Z0,aW as N1,aX as q0,ar as _r,aY as Ee,au as a3,aw as Le,aZ as ga,a_ as j3,ax as m1,a$ as za,b0 as Uw,b1 as W0,b2 as D8,b3 as p9,b4 as a9,b5 as Kf,Y as Bw,b6 as g9,aA as pt,aB as Se$1,b7 as va,b8 as es,b9 as BD,aN as nh,ba as Lw,aG as Sw,aH as h1,bb as B1,aI as wo,bc as rD,bd as R4,be as cw,bf as Dh,bg as GD,bh as Eh,bi as U0,a4 as Mh,l as lh,a2 as Pw,a3 as xw,bj as zD,G as Pu,I as Lu,bk as Vh,bl as jh,bm as $D,bn as ww,a6 as Nw}from'./main-MNK6ZYDO.js';import {U}from'./chunk-Cf_xd8ER.js';import {G as Gn$1,u as un$1}from'./chunk-eSxb3-OU.js';import {W,I as I$1}from'./chunk-DNOjVPY0.js';import {L as Lt,u as ut}from'./chunk-3mppll1n.js';import'./chunk-CEcbtdnK.js';var fn=["input"],Cn=["inputNumberHost"],gn=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputNumberUpIcon",""]],[["","nzInputNumberDownIcon",""]]],hn=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputPrefix]","[nzInputSuffix]","[nzInputNumberUpIcon]","[nzInputNumberDownIcon]"];function bn(i,l){}function wn(i,l){if(i&1&&nh(0,bn,0,0,"ng-template",8),i&2){VD();let e=zD(4);ch("ngTemplateOutlet",e);}}function vn(i,l){}function zn(i,l){if(i&1&&nh(0,vn,0,0,"ng-template",8),i&2){VD();let e=zD(8);ch("ngTemplateOutlet",e);}}function Sn(i,l){}function yn(i,l){if(i&1&&nh(0,Sn,0,0,"ng-template",8),i&2){VD();let e=zD(12);ch("ngTemplateOutlet",e);}}function Mn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzAddonBefore());}}function Tn(i,l){i&1&&(_i$1(0,"div",10),$D(1,0,null,Mn,1,1),Kc());}function Nn(i,l){}function In(i,l){if(i&1&&nh(0,Nn,0,0,"ng-template",8),i&2){VD(2);let e=zD(6);ch("ngTemplateOutlet",e);}}function kn(i,l){}function En(i,l){if(i&1&&nh(0,kn,0,0,"ng-template",8),i&2){VD(2);let e=zD(10);ch("ngTemplateOutlet",e);}}function Vn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzAddonAfter());}}function Fn(i,l){i&1&&(_i$1(0,"div",10),$D(1,1,null,Vn,1,1),Kc());}function An(i,l){if(i&1&&(_i$1(0,"div",9),bD(1,Tn,3,0,"div",10),bD(2,In,1,1,null,8)(3,En,1,1,null,8),bD(4,Fn,3,0,"div",10),Kc()),i&2){let e=VD();gI(),_D(e.hasAddonBefore()?1:-1),gI(),_D(e.hasAffix()?2:3),gI(2),_D(e.hasAddonAfter()?4:-1);}}function $n(i,l){}function Pn(i,l){if(i&1&&(_i$1(0,"div"),nh(1,$n,0,0,"ng-template",8),Kc()),i&2){let e=VD(),n=zD(8);cw(e.affixWrapperClass()),gI(),ch("ngTemplateOutlet",n);}}function Dn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzPrefix());}}function Bn(i,l){i&1&&(_i$1(0,"span",11),$D(1,2,null,Dn,1,1),Kc());}function Ln(i,l){}function Wn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzSuffix());}}function On(i,l){if(i&1&&lh(0,"nz-form-item-feedback-icon",13),i&2){let e=VD(3);ch("status",e.finalStatus());}}function jn(i,l){if(i&1&&(_i$1(0,"span",12),$D(1,3,null,Wn,1,1),bD(3,On,1,1,"nz-form-item-feedback-icon",13),Kc()),i&2){let e=VD(2);gI(3),_D(e.hasFeedback()&&e.finalStatus()?3:-1);}}function Rn(i,l){if(i&1&&(bD(0,Bn,3,0,"span",11),nh(1,Ln,0,0,"ng-template",8),bD(2,jn,4,1,"span",12)),i&2){let e=VD(),n=zD(10);_D(e.hasPrefix()?0:-1),gI(),ch("ngTemplateOutlet",n),gI(),_D(e.hasSuffix()?2:-1);}}function Kn(i,l){}function Hn(i,l){if(i&1&&(_i$1(0,"div",null,5),nh(2,Kn,0,0,"ng-template",8),Kc()),i&2){let e=VD(),n=zD(12);cw(e.inputNumberClass()),gI(2),ch("ngTemplateOutlet",n);}}function qn(i,l){i&1&&lh(0,"nz-icon",20);}function Gn(i,l){i&1&&lh(0,"nz-icon",21);}function Un(i,l){if(i&1){let e=LD();_i$1(0,"div",17,7),gh("mouseup",function(){Pu(e);let t=VD(2);return Lu(t.stopAutoStep())})("mouseleave",function(){Pu(e);let t=VD(2);return Lu(t.stopAutoStep())}),_i$1(2,"span",18),gh("mousedown",function(t){Pu(e);let o=VD(2);return Lu(o.onStepMouseDown(t,true))}),$D(3,4,null,qn,1,0),Kc(),_i$1(5,"span",19),gh("mousedown",function(t){Pu(e);let o=VD(2);return Lu(o.onStepMouseDown(t,false))}),$D(6,5,null,Gn,1,0),Kc()();}if(i&2){let e=VD(2);gI(2),Mh("ant-input-number-handler-up-disabled",e.upDisabled()),ah("aria-disabled",e.upDisabled()),gI(3),Mh("ant-input-number-handler-down-disabled",e.downDisabled()),ah("aria-disabled",e.downDisabled());}}function Zn(i,l){if(i&1){let e=LD();bD(0,Un,8,6,"div",14),_i$1(1,"div",15)(2,"input",16,6),gh("input",function(){Pu(e);let t=zD(3),o=VD();return Lu(o.onInput(t.value))})("wheel",function(t){Pu(e);let o=VD();return Lu(o.onWheel(t))}),Kc()();}if(i&2){let e=VD();_D(e.nzControls()?0:-1),gI(2),ch("value",e.displayValue())("placeholder",e.nzPlaceHolder()??"")("disabled",e.finalDisabled())("readOnly",e.nzReadOnly()),ah("aria-valuemin",e.nzMin())("aria-valuemax",e.nzMax())("id",e.nzId())("step",e.nzStep())("value",e.displayValue());}}var Ze=(()=>{class i{nzId=$0(null);nzSize=$0("default");nzPlaceHolder=$0(null);nzStatus=$0("");nzVariant=$0();nzStep=$0(1,{transform:Y0});nzMin=$0(Number.MIN_SAFE_INTEGER,{transform:Y0});nzMax=$0(Number.MAX_SAFE_INTEGER,{transform:Y0});nzPrecision=$0(null);nzParser=$0();nzFormatter=$0();nzDisabled=$0(false,{transform:Z0});nzReadOnly=$0(false,{transform:Z0});nzAutoFocus=$0(false,{transform:Z0});nzKeyboard=$0(true,{transform:Z0});nzControls=$0(true,{transform:Z0});nzChangeOnWheel=$0(true,{transform:Z0});nzPrefix=$0();nzSuffix=$0();nzAddonBefore=$0();nzAddonAfter=$0();nzBlur=B0();nzFocus=B0();nzOnStep=B0();onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;compactSize=C(N1,{optional:true});inputRef=q0.required("input");hostRef=q0("inputNumberHost");elementRef=C(_r);injector=C(Ee);focusMonitor=C(a3);directionality=C(Le);nzFormStatusService=C(ga,{optional:true});autoStepTimer=null;defaultFormatter=e=>{let n=this.nzPrecision();return j3(n)?e.toFixed(n):e.toString()};value=qo(null);displayValue=qo("");formSize=C(m1,{optional:true});formVariant=C(za,{optional:true});dir=C(Le).valueSignal;focused=qo(false);hasFeedback=qo(false);finalStatus=Uw(()=>this.nzStatus());finalDisabled=Uw(()=>this.nzDisabled());prefix=W0(ot);suffix=W0(at$1);addonBefore=W0(it);addonAfter=W0(rt);hasPrefix=Hw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Hw(()=>!!this.nzSuffix()||!!this.suffix()||this.hasFeedback());hasAffix=Hw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Hw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Hw(()=>!!this.nzAddonAfter()||!!this.addonAfter());hasAddon=Hw(()=>this.hasAddonBefore()||this.hasAddonAfter());class=Hw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():this.inputNumberClass());inputNumberClass=Hw(()=>r(r({"ant-input-number":true,"ant-input-number-lg":this.finalSize()==="large","ant-input-number-sm":this.finalSize()==="small","ant-input-number-disabled":this.finalDisabled(),"ant-input-number-readonly":this.nzReadOnly(),"ant-input-number-focused":this.focused(),"ant-input-number-rtl":this.dir()==="rtl","ant-input-number-in-form-item":!!this.nzFormStatusService,"ant-input-number-out-of-range":this.value()!==null&&!Ge(this.value(),this.nzMin(),this.nzMax())},p9("ant-input-number",this.finalVariant())),D8("ant-input-number",this.finalStatus(),this.hasFeedback())));affixWrapperClass=Hw(()=>r(r({"ant-input-number-affix-wrapper":true,"ant-input-number-affix-wrapper-disabled":this.finalDisabled(),"ant-input-number-affix-wrapper-readonly":this.nzReadOnly(),"ant-input-number-affix-wrapper-focused":this.focused(),"ant-input-number-affix-wrapper-rtl":this.dir()==="rtl"},D8("ant-input-number-affix-wrapper",this.finalStatus(),this.hasFeedback())),p9("ant-input-number-affix-wrapper",this.finalVariant())));groupWrapperClass=Hw(()=>r(r({"ant-input-number-group-wrapper":true,"ant-input-number-group-wrapper-rtl":this.dir()==="rtl"},D8("ant-input-number-group-wrapper",this.finalStatus(),this.hasFeedback())),p9("ant-input-number-group-wrapper",this.finalVariant())));finalSize=Hw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.nzSize());finalVariant=Hw(()=>this.nzVariant()||this.formVariant?.()||"outlined");upDisabled=Hw(()=>!a9(this.value())&&this.value()>=this.nzMax());downDisabled=Hw(()=>!a9(this.value())&&this.value()<=this.nzMin());constructor(){let e=C(at);Kf(()=>{let n=this.hostRef(),t=n||this.elementRef;this.focusMonitor.monitor(t,true).pipe(ue(e)).subscribe(o=>{Bw(()=>{this.focused.set(!!o),o?this.nzFocus.emit():(this.fixValue(),this.onTouched(),this.nzBlur.emit());});}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(t);});}),this.nzFormStatusService?.formStatusChanges.pipe(ue()).subscribe(({status:n,hasFeedback:t})=>{this.finalStatus.set(n),this.hasFeedback.set(t);});}ngOnInit(){this.nzAutoFocus()&&Kf(()=>this.focus(),{injector:this.injector});}writeValue(e){a9(e)&&(e=null),Bw(()=>{this.value.set(e),this.setValue(e);});}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){Bw(()=>{this.finalDisabled.set(this.isDisabledFirstChange&&this.nzDisabled()||e);}),this.isDisabledFirstChange=false;}focus(e){g9(this.inputRef().nativeElement,e);}blur(){this.inputRef().nativeElement.blur();}step(e,n,t){if(n&&this.upDisabled()||!n&&this.downDisabled())return;let o=e.shiftKey?this.nzStep()*10:this.nzStep();n||(o=-o);let E=10**nn(o),W=tn((Math.round((this.value()||0)*E)+Math.round(o*E))/E,this.nzMin(),this.nzMax(),this.nzPrecision());this.setValue(W),this.nzOnStep.emit({type:n?"up":"down",value:this.value(),offset:this.nzStep(),emitter:t}),this.focus();}setValue(e){let n=this.nzFormatter()??this.defaultFormatter,t=this.nzPrecision();j3(t)&&(e&&=+e.toFixed(t));let o=a9(e)?"":n(e);this.displayValue.set(o),this.updateValue(e);}setValueByTyping(e){if(this.displayValue.set(e),e===""){this.updateValue(null);return}let t=(this.nzParser()??en)(e);if(Jn(e)||Number.isNaN(t))return;let o=this.nzFormatter();if(o){let d=o(t);this.displayValue.set(d);}Ge(t,this.nzMin(),this.nzMax())&&this.updateValue(t);}updateValue(e){this.value()!==e&&(this.value.set(e),this.onChange(e));}fixValue(){let e=this.displayValue();if(e==="")return;let t=(this.nzParser()??en)(e);if(Number.isNaN(t))t=this.value();else {let o=this.nzPrecision();j3(o)&&nn(t)!==o&&(t=+t.toFixed(o)),Ge(t,this.nzMin(),this.nzMax())||(t=tn(t,this.nzMin(),this.nzMax(),o));}this.setValue(t);}stopAutoStep(){this.autoStepTimer!==null&&(clearTimeout(this.autoStepTimer),this.autoStepTimer=null);}onStepMouseDown(e,n){e.preventDefault(),this.stopAutoStep(),this.step(e,n,"handler");let t=()=>{this.step(e,n,"handler"),this.autoStepTimer=setTimeout(t,Qn);};this.autoStepTimer=setTimeout(t,Yn);}onKeyDown(e){switch(e.keyCode){case 38:e.preventDefault(),this.nzKeyboard()&&this.step(e,true,"keyboard");break;case 40:e.preventDefault(),this.nzKeyboard()&&this.step(e,false,"keyboard");break;case 13:this.fixValue();break}}onInput(e){this.setValueByTyping(e);}onWheel(e){this.finalDisabled()||this.nzReadOnly()||!this.nzChangeOnWheel()||(e.preventDefault(),this.step(e,e.deltaY<0,"wheel"));}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=QE({type:i,selectors:[["nz-input-number"]],contentQueries:function(n,t,o){n&1&&Eh(o,t.prefix,ot,5)(o,t.suffix,at$1,5)(o,t.addonBefore,it,5)(o,t.addonAfter,rt,5),n&2&&GD(4);},viewQuery:function(n,t){n&1&&Dh(t.inputRef,fn,5)(t.hostRef,Cn,5),n&2&&GD(2);},hostVars:2,hostBindings:function(n,t){n&1&&gh("keydown",function(d){return t.onKeyDown(d)}),n&2&&cw(t.class());},inputs:{nzId:[1,"nzId"],nzSize:[1,"nzSize"],nzPlaceHolder:[1,"nzPlaceHolder"],nzStatus:[1,"nzStatus"],nzVariant:[1,"nzVariant"],nzStep:[1,"nzStep"],nzMin:[1,"nzMin"],nzMax:[1,"nzMax"],nzPrecision:[1,"nzPrecision"],nzParser:[1,"nzParser"],nzFormatter:[1,"nzFormatter"],nzDisabled:[1,"nzDisabled"],nzReadOnly:[1,"nzReadOnly"],nzAutoFocus:[1,"nzAutoFocus"],nzKeyboard:[1,"nzKeyboard"],nzControls:[1,"nzControls"],nzChangeOnWheel:[1,"nzChangeOnWheel"],nzPrefix:[1,"nzPrefix"],nzSuffix:[1,"nzSuffix"],nzAddonBefore:[1,"nzAddonBefore"],nzAddonAfter:[1,"nzAddonAfter"]},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus",nzOnStep:"nzOnStep"},exportAs:["nzInputNumber"],features:[Sw([{provide:h1,useExisting:wo(()=>i),multi:true},{provide:B1,useValue:"input-number"}]),rD([R4])],ngContentSelectors:hn,decls:13,vars:1,consts:[["inputNumberWithAddonInner",""],["inputNumberWithAffix",""],["inputNumberWithAffixInner",""],["inputNumber",""],["inputNumberInner",""],["inputNumberHost",""],["input",""],["handlers",""],[3,"ngTemplateOutlet"],[1,"ant-input-number-wrapper","ant-input-number-group"],[1,"ant-input-number-group-addon"],[1,"ant-input-number-prefix"],[1,"ant-input-number-suffix"],[3,"status"],[1,"ant-input-number-handler-wrap"],[1,"ant-input-number-input-wrap"],["autocomplete","off","role","spinbutton",1,"ant-input-number-input",3,"input","wheel","value","placeholder","disabled","readOnly"],[1,"ant-input-number-handler-wrap",3,"mouseup","mouseleave"],["role","button","unselectable","on",1,"ant-input-number-handler","ant-input-number-handler-up",3,"mousedown"],["role","button","unselectable","on",1,"ant-input-number-handler","ant-input-number-handler-down",3,"mousedown"],["nzType","up",1,"ant-input-number-handler-up-inner"],["nzType","down",1,"ant-input-number-handler-down-inner"]],template:function(n,t){n&1&&(BD(gn),bD(0,wn,1,1,null,8)(1,zn,1,1,null,8)(2,yn,1,1,null,8),nh(3,An,5,3,"ng-template",null,0,Lw)(5,Pn,2,3,"ng-template",null,1,Lw)(7,Rn,3,3,"ng-template",null,2,Lw)(9,Hn,3,3,"ng-template",null,3,Lw)(11,Zn,4,10,"ng-template",null,4,Lw)),n&2&&_D(t.hasAddon()?0:t.hasAffix()?1:2);},dependencies:[pt,Se$1,va,es],encapsulation:2})}return i})(),Qn=200,Yn=600;function en(i){let l=i.trim().replace(/,/g,"").replace(/。/g,".");return l.length?+l:NaN}function Ge(i,l,e){return i>=l&&i<=e}function tn(i,l,e,n=null){if(n===null)return i<l?l:i>e?e:i;let t=+i.toFixed(n),o=Math.pow(10,n);return t<l?Math.ceil(l*o)/o:t>e?Math.floor(e*o)/o:t}function nn(i){return i.toString().split(".")[1]?.length||0}function Jn(i){return /[.。](\d*0)?$/.test(i.toString())}var on=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=YE({type:i});static \u0275inj=uu({imports:[Ze]})}return i})();function ei(i,l){if(i&1){let e=LD();_i$1(0,"div",1)(1,"input",3),Vh("ngModelChange",function(t){let o=Pu(e).$implicit;return ww(o.key,t)||(o.key=t),Lu(t)}),gh("ngModelChange",function(){Pu(e);let t=VD();return Lu(t.emitRows())}),Kc(),oE(),_i$1(2,"input",4),Vh("ngModelChange",function(t){let o=Pu(e).$implicit;return ww(o.value,t)||(o.value=t),Lu(t)}),gh("ngModelChange",function(){Pu(e);let t=VD();return Lu(t.emitRows())}),Kc(),oE(),_i$1(3,"button",5),gh("click",function(){let t=Pu(e).$index,o=VD();return Lu(o.remove(t))}),vw(4,"Remove"),Kc()();}if(i&2){let e=l.$implicit;gI(),jh("ngModel",e.key),sE(),gI(),jh("ngModel",e.value),sE();}}var dn=(()=>{class i{constructor(){this.rows=U0.required();}add(){this.rows.update(e=>[...e,{key:"",value:""}]);}remove(e){this.rows.update(n=>n.filter((t,o)=>o!==e));}emitRows(){this.rows.set(this.rows().map(e=>r({},e)));}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-key-value-editor"]],inputs:{rows:[1,"rows"]},outputs:{rows:"rowsChange"},decls:5,vars:0,consts:[[1,"kv-editor"],[1,"kv-row"],["nz-button","","nzType","dashed","type","button",3,"click"],["nz-input","","placeholder","key",3,"ngModelChange","ngModel"],["nz-input","","placeholder","value",3,"ngModelChange","ngModel"],["nz-button","","nzType","default","type","button",3,"click"]],template:function(n,t){n&1&&(_i$1(0,"div",0),ND(1,ei,5,2,"div",1,MD),_i$1(3,"button",2),gh("click",function(){return t.add()}),vw(4,"Add param"),Kc()()),n&2&&(gI(),xD(t.rows()));},dependencies:[n8,S4,J6,k3,dd,zc,t7,y7,ai$1,z],styles:[".kv-editor[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.kv-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}"]});}}return i})();function Te(i,l){let e=M_(i);return B(l,e).map(n=>n.id)}function _n(i,l){return Te(i,l)[0]??""}function cn(i,l,e){let n=Te(l,e);if(n.includes(i))return null;let t=(e?.providerInstances??[]).find(o=>o.id===i);return t?ay(t)&&M_(l).includes(t.subjectType)?null:{required:i,active:n[0]??t.id}:{required:i,active:n[0]??""}}function mn(i,l,e){if(i.extendedAction?.providerId){let n=cn(i.extendedAction.providerId,l,e);if(n)return n}return i.target?.source?cn(i.target.source,i.target.subjectType,e):null}function un(i){return i.extendedAction!=null}var oi=()=>[];function ri(i,l){return this.trackKey(l)}var Ne=(i,l)=>l.id,ai=(i,l)=>l.actionId,si=(i,l)=>l.name;function li(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(3);ch("nzValue",e)("nzLabel",Ow(1,2,n.stepTypeKey(e)));}}function pi(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.outputFormatKey(e)));}}function di(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function ci(i,l){if(i&1){let e=LD();_i$1(0,"nz-tag",26),gh("nzOnClose",function(){let t=Pu(e).$implicit,o=VD(3).$index,d=VD();return Lu(d.removeContextFile(o,t.id))}),vw(1),Kc();}if(i&2){let e=l.$implicit;ah("data-testid","context-file-chip-"+e.id),gI(),nl(" ",e.name," ");}}function _i(i,l){i&1&&(_i$1(0,"span",24),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.contextFilesEmpty")));}function mi(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"textarea",20),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{objective:t}))}),Kc(),oE(),Kc(),_i$1(5,"div",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{outputFormat:t}))}),ND(10,pi,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(12,"div",16)(13,"span"),vw(14),Rw(15,"transloco"),Kc(),_i$1(16,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setAgentInstance(o,t))}),lh(17,"nz-option",15),Rw(18,"transloco"),ND(19,di,1,2,"nz-option",15,Ne),Kc(),oE(),Kc(),_i$1(21,"div",16)(22,"span"),vw(23),Rw(24,"transloco"),Kc(),_i$1(25,"div",22),ND(26,ci,2,2,"nz-tag",23,Ne,false,_i,3,3,"span",24),Kc(),_i$1(29,"button",25),gh("click",function(){Pu(e);let t=VD(2).$index,o=VD();return Lu(o.openContextFilePicker(t))}),vw(30),Rw(31,"transloco"),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(),ah("data-testid","agent-prompt-label-"+t),gI(),Ph(Ow(3,17,"step-list.objective")),gI(2),ch("ngModel",o.asAgent(n).objective),ah("data-testid","agent-objective-"+t),sE(),gI(3),Ph(Ow(8,19,"step-list.outputFormat.label")),gI(2),ch("ngModel",o.asAgent(n).outputFormat),ah("data-testid","agent-output-"+t),sE(),gI(),xD(o.outputFormats),gI(4),Ph(Ow(15,21,"step-list.agentInstance.label")),gI(2),ch("ngModel",o.asAgent(n).agentInstanceId??null),ah("data-testid","agent-instance-"+t),sE(),gI(),ch("nzValue",null)("nzLabel",Ow(18,23,"step-list.agentInstance.default")),gI(2),xD(o.agentInstanceOptions()),gI(2),ah("data-testid","agent-context-files-"+t),gI(2),Ph(Ow(24,25,"step-list.contextFiles")),gI(3),xD(o.selectedContextFiles(o.asAgent(n))),gI(3),ah("data-testid","select-context-files-"+t),gI(),nl(" ",Ow(31,27,"step-list.selectContextFiles")," ");}}function ui(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.interactionKey(e)));}}function xi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{interaction:t}))}),ND(5,ui,2,4,"nz-option",15,SD),Kc(),oE(),Kc();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.interaction.label")),gI(2),ch("ngModel",o.asInteraction(n).interaction),ah("data-testid","interaction-type-"+t),sE(),gI(),xD(o.interactions);}}function fi(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"textarea",20),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{command:t}))}),Kc(),oE(),Kc();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.command")),gI(2),ch("ngModel",o.asShell(n).command),ah("data-testid","shell-command-"+t),sE();}}function Ci(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.gitOperationKey(e)));}}function gi(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"baseBranch",t))}),Kc(),oE(),Kc(),_i$1(5,"label",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"branchName",t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(4),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,6,"step-list.createWorktree.baseBranch")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"baseBranch")),ah("data-testid","git-base-branch-"+t),sE(),gI(3),Ph(Ow(8,8,"step-list.createWorktree.branchName")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"branchName")),ah("data-testid","git-branch-name-"+t),sE();}}function hi(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"branch",t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(4),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.createWorktree.branch")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"branch")),ah("data-testid","git-branch-"+t),sE();}}function bi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setCreateWorktreeMode(o,t))}),lh(5,"nz-option",27),Rw(6,"transloco"),lh(7,"nz-option",28),Rw(8,"transloco"),Kc(),oE(),Kc(),_i$1(9,"label",16)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i$1(13,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setGitParam(o,"repoPath",t))}),Kc(),oE(),Kc(),bD(14,gi,10,10)(15,hi,5,5,"label",16);}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,9,"step-list.createWorktree.mode")),gI(2),ch("ngModel",o.createWorktreeMode(o.asGit(n))),ah("data-testid","git-worktree-mode-"+t),sE(),gI(),ch("nzLabel",Ow(6,11,"step-list.createWorktree.newBranch")),gI(2),ch("nzLabel",Ow(8,13,"step-list.createWorktree.existingBranch")),gI(4),Ph(Ow(12,15,"step-list.createWorktree.repoPath")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"repoPath")),ah("data-testid","git-repo-path-"+t),sE(),gI(),_D(o.createWorktreeMode(o.asGit(n))==="new-branch"?14:15);}}function wi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"app-key-value-editor",29),gh("rowsChange",function(t){Pu(e);let o=VD(3),d=o.$implicit,E=o.$index,W=VD();return Lu(W.onParamRowsChange(E,d,t))}),Kc()();}if(i&2){let e=VD(3).$implicit,n=VD();gI(2),Ph(Ow(3,2,"step-list.params")),gI(2),ch("rows",n.paramRows(e));}}function vi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{operation:t}))}),ND(5,Ci,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),bD(7,bi,16,17)(8,wi,5,4,"div",16);}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,4,"step-list.operation")),gI(2),ch("ngModel",o.asGit(n).operation),ah("data-testid","git-operation-"+t),sE(),gI(),xD(o.gitOperations),gI(2),_D(o.asGit(n).operation==="create_worktree"?7:8);}}function zi(i,l){if(i&1&&lh(0,"nz-alert",30),i&2){let e=VD(3).$index;ch("nzMessage",l),ah("data-testid","extended-action-mismatch-"+e);}}function Si(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",Ow(1,2,n.subjectTypeKey(e)));}}function yi(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function Mi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSubjectType(o,t))}),ND(5,Si,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"nz-select",34),Rw(12,"transloco"),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSource(o,t))}),ND(13,yi,1,2,"nz-option",15,Ne),Kc(),oE(),Kc(),_i$1(15,"label",16)(16,"span"),vw(17),Rw(18,"transloco"),Kc(),_i$1(19,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSubjectId(o,t))}),Kc(),oE(),_i$1(20,"span",19),vw(21),Rw(22,"transloco"),Kc()();}if(i&2){let e=l,n=VD(3),t=n.$implicit,o=n.$index,d=VD();gI(2),Ph(Ow(3,11,"step-list.target.subjectType")),gI(2),ch("ngModel",e.subjectType),ah("data-testid","provider-action-target-type-"+o),sE(),gI(),xD(d.targetSubjectTypes),gI(4),Ph(Ow(10,13,"step-list.target.source")),gI(2),ch("ngModel",e.source||null)("nzPlaceHolder",Ow(12,15,"step-list.target.sourcePlaceholder")),ah("data-testid","provider-action-target-source-"+o),sE(),gI(2),xD(d.targetInstanceOptions(d.asProvider(t))),gI(4),Ph(Ow(18,17,"step-list.target.subjectId")),gI(2),ch("ngModel",e.subjectId),ah("data-testid","provider-action-target-id-"+o),sE(),gI(2),Ph(Ow(22,19,"step-list.target.subjectIdHint"));}}function Ti(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",n.providerLabel(e));}}function Ni(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.actionId)("nzLabel",e.label);}}function Ii(i,l){i&1&&(_i$1(0,"span",19),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.extendedAction.empty")));}function ki(i,l){i&1&&(_i$1(0,"span",35),vw(1,"*"),Kc());}function Ei(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e)("nzLabel",e);}}function Vi(i,l){if(i&1){let e=LD();_i$1(0,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD().$implicit,d=VD(5).$index,E=VD();return Lu(E.setExtendedParam(d,o.name,t))}),ND(1,Ei,1,2,"nz-option",15,SD),Kc(),oE();}if(i&2){let e=VD().$implicit,n=VD(5),t=n.$implicit,o=n.$index,d=VD();ch("ngModel",d.extendedParamValue(d.asProvider(t),e.name)),ah("data-testid","extended-action-param-"+e.name+"-"+o),sE(),gI(),xD(e.options??Nw(2,oi));}}function Fi(i,l){if(i&1){let e=LD();_i$1(0,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD().$implicit,d=VD(5).$index,E=VD();return Lu(E.setExtendedParam(d,o.name,t))}),Kc(),oE();}if(i&2){let e=VD().$implicit,n=VD(5),t=n.$implicit,o=n.$index,d=VD();ch("ngModel",d.extendedParamValue(d.asProvider(t),e.name)),ah("data-testid","extended-action-param-"+e.name+"-"+o),sE();}}function Ai(i,l){if(i&1&&(_i$1(0,"label",16)(1,"span"),vw(2),bD(3,ki,2,0,"span",35),Kc(),bD(4,Vi,3,3,"nz-select",36)(5,Fi,1,2,"input",37),Kc()),i&2){let e=l.$implicit;gI(2),nl(" ",e.label," "),gI(),_D(e.required?3:-1),gI(),_D(e.type==="select"?4:5);}}function $i(i,l){i&1&&ND(0,Ai,6,3,"label",16,si),i&2&&xD(l.params);}function Pi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setExtendedProvider(o,t))}),ND(5,Ti,1,2,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"nz-select",34),Rw(12,"transloco"),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setExtendedAction(o,t))}),ND(13,Ni,1,2,"nz-option",15,ai),Kc(),oE(),bD(15,Ii,3,3,"span",19),Kc(),bD(16,$i,2,0);}if(i&2){let e,n=VD(3),t=n.$implicit,o=n.$index,d=VD();gI(2),Ph(Ow(3,9,"step-list.extendedAction.provider")),gI(2),ch("ngModel",d.asProvider(t).extendedAction?.providerId),ah("data-testid","extended-action-provider-"+o),sE(),gI(),xD(d.extendedProviderOptions()),gI(4),Ph(Ow(10,11,"step-list.extendedAction.action")),gI(2),ch("ngModel",d.asProvider(t).extendedAction?.actionId||null)("nzPlaceHolder",Ow(12,13,"step-list.extendedAction.none")),ah("data-testid","extended-action-id-"+o),sE(),gI(2),xD(d.extendedDescriptors(d.asProvider(t))),gI(2),_D(d.extendedDescriptors(d.asProvider(t)).length===0?15:-1),gI(),_D((e=d.selectedExtendedDescriptor(d.asProvider(t)))?16:-1,e);}}function Di(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",Ow(1,2,n.providerActionKey(e)));}}function Bi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.patchAt(o,{action:t}))}),ND(5,Di,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"app-key-value-editor",29),gh("rowsChange",function(t){Pu(e);let o=VD(3),d=o.$implicit,E=o.$index,W=VD();return Lu(W.onParamRowsChange(E,d,t))}),Kc()();}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,5,"step-list.action")),gI(2),ch("ngModel",o.asProvider(n).action),ah("data-testid","provider-action-"+t),sE(),gI(),xD(o.providerActions),gI(4),Ph(Ow(10,7,"step-list.params")),gI(2),ch("rows",o.paramRows(n));}}function Li(i,l){if(i&1){let e=LD();bD(0,zi,1,2,"nz-alert",30),_i$1(1,"label",31),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setTargetEnabled(o,t))}),vw(2),Rw(3,"transloco"),Kc(),oE(),bD(4,Mi,23,21),_i$1(5,"div",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setActionMode(o,t))}),lh(10,"nz-option",32),Rw(11,"transloco"),lh(12,"nz-option",33),Rw(13,"transloco"),Kc(),oE(),Kc(),bD(14,Pi,17,15)(15,Bi,12,9);}if(i&2){let e,n,t=VD(2),o=t.$implicit,d=t.$index,E=VD();_D((e=E.mismatchWarning(E.asProvider(o)))?0:-1,e),gI(),ch("ngModel",E.hasTarget(o)),ah("data-testid","provider-action-target-toggle-"+d),sE(),gI(),nl(" ",Ow(3,11,"step-list.target.toggle")," "),gI(2),_D((n=E.asProvider(o).target)?4:-1,n),gI(3),Ph(Ow(8,13,"step-list.extendedAction.mode")),gI(2),ch("ngModel",E.isExtended(o)?"extended":"portable"),ah("data-testid","provider-action-mode-"+d),sE(),gI(),ch("nzLabel",Ow(11,15,"step-list.extendedAction.portable")),gI(2),ch("nzLabel",Ow(13,17,"step-list.extendedAction.extended")),gI(2),_D(E.isExtended(o)?14:15);}}function Wi(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e.id)("nzLabel",n.workflowOptionLabel(e));}}function Oi(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",38),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{workflowId:t}))}),ND(5,Wi,1,2,"nz-option",15,Ne),Kc(),oE(),Kc(),_i$1(7,"p",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"code",39),vw(12,"selection"),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,4,"step-list.workflowId")),gI(2),ch("ngModel",o.asSubWorkflow(n).workflowId),ah("data-testid","sub-workflow-id-"+t),sE(),gI(),xD(o.availableWorkflows()),gI(4),Ph(Ow(10,6,"step-list.forEach"));}}function ji(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.untilTypeKey(e)));}}function Ri(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(3).$index,d=VD();return Lu(d.setUntilValue(o,t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.until.value")),gI(2),ch("ngModel",o.untilValue(o.asLoop(n))),ah("data-testid","loop-until-value-"+t),sE();}}function Ki(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.onMaxIterationsKey(e)));}}function Hi(i,l){if(i&1){let e=LD();_i$1(0,"div",40)(1,"div",16)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i$1(5,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilType(o,t))}),ND(6,ji,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(8,"label",16)(9,"span"),vw(10),Rw(11,"transloco"),Kc(),_i$1(12,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilField(o,"stepId",t))}),Kc(),oE(),Kc(),_i$1(13,"label",16)(14,"span"),vw(15),Rw(16,"transloco"),Kc(),_i$1(17,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilField(o,"field",t))}),Kc(),oE(),Kc(),bD(18,Ri,5,5,"label",16),_i$1(19,"label",16)(20,"span"),vw(21),Rw(22,"transloco"),Kc(),_i$1(23,"nz-input-number",41),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{maxIterations:t??0}))}),Kc(),oE(),Kc(),_i$1(24,"div",16)(25,"span"),vw(26),Rw(27,"transloco"),Kc(),_i$1(28,"nz-select",21),gh("ngModelChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{onMaxIterations:{action:t}}))}),ND(29,Ki,2,4,"nz-option",15,SD),Kc(),oE(),Kc()(),_i$1(31,"div",42)(32,"h4"),vw(33),Rw(34,"transloco"),Kc(),_i$1(35,"app-step-list",43),gh("stepsChange",function(t){Pu(e);let o=VD(2).$index,d=VD();return Lu(d.setNestedSteps(o,t))}),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(3),Ph(Ow(4,25,"step-list.until.type")),gI(2),ch("ngModel",o.asLoop(n).until.type),ah("data-testid","loop-until-type-"+t),sE(),gI(),xD(o.untilTypes),gI(4),Ph(Ow(11,27,"step-list.until.stepId")),gI(2),ch("ngModel",o.asLoop(n).until.stepId),ah("data-testid","loop-until-stepId-"+t),sE(),gI(3),Ph(Ow(16,29,"step-list.until.field")),gI(2),ch("ngModel",o.asLoop(n).until.field),ah("data-testid","loop-until-field-"+t),sE(),gI(),_D(o.asLoop(n).until.type==="field_equals"?18:-1),gI(3),Ph(Ow(22,31,"step-list.maxIterations")),gI(2),ch("ngModel",o.asLoop(n).maxIterations)("nzMin",0),ah("data-testid","loop-max-"+t),sE(),gI(3),Ph(Ow(27,33,"step-list.onMaxIterations.action")),gI(2),ch("ngModel",o.asLoop(n).onMaxIterations.action),ah("data-testid","loop-on-max-"+t),sE(),gI(),xD(o.maxIterationActions),gI(2),ah("data-testid","loop-nested-"+t),gI(2),Ph(Ow(34,35,"step-list.nestedSteps")),gI(2),ch("steps",o.asLoop(n).steps)("rootSteps",o.effectiveRoot())("availableWorkflows",o.availableWorkflows())("appliesTo",o.appliesTo())("settings",o.settings())("depth",o.depth()+1);}}function qi(i,l){if(i&1){let e=LD();_i$1(0,"div",12)(1,"div",13)(2,"nz-select",14),gh("ngModelChange",function(t){Pu(e);let o=VD().$index,d=VD();return Lu(d.changeType(o,t))}),ND(3,li,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(5,"label",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"input",17),gh("ngModelChange",function(t){Pu(e);let o=VD().$index,d=VD();return Lu(d.onNameChange(o,t))}),Kc(),oE(),Kc(),_i$1(10,"label",16)(11,"span"),vw(12),Rw(13,"transloco"),Kc(),_i$1(14,"input",18),gh("ngModelChange",function(t){Pu(e);let o=VD().$index,d=VD();return Lu(d.onIdChange(o,t))}),Kc(),oE(),_i$1(15,"p",19),vw(16),Rw(17,"transloco"),Kc()(),bD(18,mi,32,29)(19,xi,7,5,"div",16)(20,fi,5,5,"label",16)(21,vi,9,6)(22,Li,16,19)(23,Oi,13,8)(24,Hi,36,37),Kc();}if(i&2){let e,n=VD(),t=n.$implicit,o=n.$index,d=VD();ah("data-testid","step-body-"+o),gI(2),ch("ngModel",t.type),ah("data-testid","step-type-"+o),sE(),gI(),xD(d.stepTypes),gI(4),Ph(Ow(8,11,"step-list.name")),gI(2),ch("ngModel",t.name),ah("data-testid","step-name-"+o),sE(),gI(3),Ph(Ow(13,13,"step-list.id")),gI(2),ch("ngModel",t.id),ah("data-testid","step-id-"+o),sE(),gI(2),Ph(Ow(17,15,"step-list.idHint")),gI(2),_D((e=t.type)==="agent"?18:e==="interaction"?19:e==="shell"?20:e==="git"?21:e==="provider_action"?22:e==="sub_workflow"?23:e==="loop"?24:-1);}}function Gi(i,l){if(i&1){let e=LD();_i$1(0,"nz-card",3)(1,"div",4),gh("click",function(){let t=Pu(e).$implicit,o=VD();return Lu(o.toggleExpanded(t))}),_i$1(2,"div",5)(3,"span",6),vw(4),Kc(),_i$1(5,"span",7),vw(6),Rw(7,"transloco"),Kc(),_i$1(8,"span",8),vw(9),Rw(10,"transloco"),Kc()(),_i$1(11,"div",9),gh("click",function(t){return t.stopPropagation()}),_i$1(12,"button",10),gh("click",function(){let t=Pu(e).$index,o=VD();return Lu(o.moveUp(t))}),vw(13),Rw(14,"transloco"),Kc(),_i$1(15,"button",10),gh("click",function(){let t=Pu(e).$index,o=VD();return Lu(o.moveDown(t))}),vw(16),Rw(17,"transloco"),Kc(),_i$1(18,"button",11),gh("click",function(){let t=Pu(e).$index,o=VD();return Lu(o.removeStep(t))}),vw(19),Rw(20,"transloco"),Kc()()(),bD(21,qi,25,17,"div",12),Kc();}if(i&2){let e=l.$implicit,n=l.$index,t=VD();Mh("step-card-expanded",t.isExpanded(e)),ah("data-testid","step-card-"+n),gI(),ah("data-testid","step-header-"+n),gI(3),Ph(t.isExpanded(e)?"\u25BE":"\u25B8"),gI(),ah("data-testid","step-header-name-"+n),gI(),nl(" ",e.name||Ow(7,18,"step-list.unnamed")," "),gI(2),ah("data-testid","step-type-label-"+n),gI(),nl(" ",Ow(10,20,t.stepTypeKey(e.type))," "),gI(3),ch("disabled",n===0),ah("data-testid","move-up-"+n),gI(),nl(" ",Ow(14,22,"step-list.moveUp")," "),gI(2),ch("disabled",n===t.steps().length-1),ah("data-testid","move-down-"+n),gI(),nl(" ",Ow(17,24,"step-list.moveDown")," "),gI(2),ah("data-testid","remove-"+n),gI(),nl(" ",Ow(20,26,"step-list.remove")," "),gI(2),_D(t.isExpanded(e)?21:-1);}}var xn=(()=>{class i{constructor(){this.transloco=C(Ve),this.language=C(O),this.providersApi=C($$1),this.contextFilesApi=C(Me),this.modal=C(Xt),this.steps=$0.required(),this.rootSteps=$0([]),this.availableWorkflows=$0([]),this.appliesTo=$0("none"),this.settings=$0(oy),this.depth=$0(0),this.stepsChange=B0(),this.stepTypes=y,this.outputFormats=["questionnaire","confirmation","comment_suggestions","free_text"],this.interactions=["questionnaire","confirmation"],this.gitOperations=["create_worktree","checkout","create_branch","commit","push"],this.providerActions=["get_subject","get_comments","post_comment","update_status","get_content"],this.untilTypes=["field_empty","field_equals"],this.maxIterationActions=["fail","continue","ask_human"],this.expandedKey=qo(null),this.contextFiles=qo([]),this.paramRowsByStepKey=new Map,this.actionsByProvider=new Map,this.loadingActions=new Set,this.targetSubjectTypes=F,this.contextFilesApi.list().pipe(ue()).subscribe({next:e=>this.contextFiles.set(e),error:()=>this.contextFiles.set([])}),rd(()=>{for(let e of this.steps())e.type==="provider_action"&&e.extendedAction?.providerId&&this.ensureActionsLoaded(e.extendedAction.providerId);});}stepTypeKey(e){return `step-list.stepType.${e}`}outputFormatKey(e){return `step-list.outputFormat.${e}`}interactionKey(e){return `step-list.interaction.${e}`}gitOperationKey(e){return `step-list.gitOperation.${e}`}providerActionKey(e){return `step-list.providerAction.${e}`}untilTypeKey(e){return `step-list.untilType.${e}`}onMaxIterationsKey(e){return `step-list.onMaxIterations.${e}`}workflowOptionLabel(e){return this.language.currentLang(),this.transloco.translate("step-list.workflowOption",{name:e.name,id:e.id})}effectiveRoot(){let e=this.rootSteps();return e.length>0?e:this.steps()}trackKey(e){return e._key}isExpanded(e){return this.expandedKey()===e._key}toggleExpanded(e){this.expandedKey.update(n=>n===e._key?null:e._key);}addStep(){this.emit([...this.steps(),h("agent")]);}removeStep(e){let n=this.steps()[e];n&&this.paramRowsByStepKey.delete(n._key),this.emit(this.steps().filter((t,o)=>o!==e));}moveUp(e){if(e<=0)return;let n=[...this.steps()],t=n[e-1];n[e-1]=n[e],n[e]=t,this.emit(n);}moveDown(e){if(e>=this.steps().length-1)return;let n=[...this.steps()],t=n[e+1];n[e+1]=n[e],n[e]=t,this.emit(n);}changeType(e,n){let t=this.steps()[e];if(!t||t.type===n)return;this.paramRowsByStepKey.delete(t._key);let o=h(n,{id:t.id,name:t.name,idAutoSync:t._idAutoSync,key:t._key});this.replaceAt(e,o);}patchAt(e,n){let t=this.steps()[e];t&&this.replaceAt(e,r(r({},t),n));}onNameChange(e,n){let t=this.steps()[e];t&&this.replaceAt(e,E(t,n,this.effectiveRoot()));}onIdChange(e,n){let t=this.steps()[e];t&&this.replaceAt(e,P(t,n));}setNestedSteps(e,n){let t=this.steps()[e];!t||t.type!=="loop"||this.replaceAt(e,s(r({},t),{steps:n}));}asAgent(e){return e}asInteraction(e){return e}asShell(e){return e}asGit(e){return e}createWorktreeMode(e){return e.params?.mode==="existing-branch"?"existing-branch":"new-branch"}gitParam(e,n){let t=e.params?.[n];return typeof t=="string"?t:""}setGitParam(e,n,t){let o=this.steps()[e];!o||o.type!=="git"||(this.paramRowsByStepKey.delete(o._key),this.patchAt(e,{params:s(r({},o.params),{[n]:t})}));}setCreateWorktreeMode(e,n){let t=this.steps()[e];if(!t||t.type!=="git")return;let o=this.gitParam(t,"repoPath");if(this.paramRowsByStepKey.delete(t._key),n==="existing-branch"){this.patchAt(e,{params:{mode:"existing-branch",repoPath:o,branch:this.gitParam(t,"branch")||this.gitParam(t,"branchName")}});return}this.patchAt(e,{params:{repoPath:o,baseBranch:this.gitParam(t,"baseBranch"),branchName:this.gitParam(t,"branchName")||this.gitParam(t,"branch")}});}asProvider(e){return e}asSubWorkflow(e){return e}asLoop(e){return e}paramRows(e){let n=this.paramRowsByStepKey.get(e._key);if(!n){let t=e.type==="git"||e.type==="provider_action"?e.params:void 0;n=A(t),this.paramRowsByStepKey.set(e._key,n);}return n}onParamRowsChange(e,n,t){this.paramRowsByStepKey.set(n._key,t),this.patchAt(e,{params:j(t)});}isExtended(e){return e.type==="provider_action"&&un(this.asProvider(e))}setActionMode(e,n){let t=this.asProvider(this.steps()[e]);if(n==="portable"){let d=t,{extendedAction:E}=d,W=t$1(d,["extendedAction"]);this.replaceAt(e,W);return}let o=_n(this.appliesTo(),this.settings());this.patchAt(e,{extendedAction:{providerId:o,actionId:"",params:{}}}),this.ensureActionsLoaded(o);}extendedProviderOptions(){return Te(this.appliesTo(),this.settings())}providerLabel(e){return (this.settings().providerInstances??[]).find(t=>t.id===e)?.displayName||e}agentInstanceOptions(){return (this.settings().providerInstances??[]).filter(e=>e.kind==="agent")}setAgentInstance(e,n){this.patchAt(e,{agentInstanceId:n||void 0});}selectedContextFiles(e){let n=e.contextFileIds??[],t=this.contextFiles();return n.map(o=>t.find(d=>d.id===o)??{id:o,name:o,tier:"user",path:""})}removeContextFile(e,n){let t=this.asAgent(this.steps()[e]);this.patchAt(e,{contextFileIds:(t.contextFileIds??[]).filter(o=>o!==n)});}openContextFilePicker(e){let n=this.asAgent(this.steps()[e]),t=this.modal.create({nzTitle:this.transloco.translate("context-files.selectTitle"),nzContent:zt,nzData:{selectionMode:true,selectedIds:[...n.contextFileIds??[]]},nzWidth:800,nzOnOk:()=>{let o=t.getContentComponent();this.patchAt(e,{contextFileIds:o.currentSelectedIds()}),this.contextFilesApi.list().subscribe({next:d=>this.contextFiles.set(d)});}});}setExtendedProvider(e,n){this.patchAt(e,{extendedAction:{providerId:n,actionId:"",params:{}}}),this.ensureActionsLoaded(n);}setExtendedAction(e,n){let t=this.asProvider(this.steps()[e]),o=this.extendedDescriptors(t).find(d=>d.actionId===n);this.patchAt(e,{extendedAction:{providerId:t.extendedAction?.providerId??"",actionId:n,params:o?Ui(o):{}}});}setExtendedParam(e,n,t){let d=this.asProvider(this.steps()[e]).extendedAction;d&&this.patchAt(e,{extendedAction:s(r({},d),{params:s(r({},d.params??{}),{[n]:t})})});}extendedParamValue(e,n){let t=e.extendedAction?.params?.[n];return t==null?"":String(t)}extendedDescriptors(e){let n=e.extendedAction?.providerId;return n?this.actionsByProvider.get(n)??[]:[]}selectedExtendedDescriptor(e){let n=e.extendedAction?.actionId;if(n)return this.extendedDescriptors(e).find(t=>t.actionId===n)}mismatchWarning(e){let n=mn(e,this.appliesTo(),this.settings());return n?(this.language.currentLang(),this.transloco.translate("step-list.extendedAction.mismatch",n)):null}hasTarget(e){return e.type==="provider_action"&&this.asProvider(e).target!=null}setTargetEnabled(e,n){let t=this.asProvider(this.steps()[e]);if(!n){let o=t,{target:d}=o,E=t$1(o,["target"]);this.replaceAt(e,E);return}this.patchAt(e,{target:{subjectType:"ticket",source:"",subjectId:""}});}setTargetSubjectType(e,n){let t=this.asProvider(this.steps()[e]);this.patchAt(e,{target:{subjectType:n,source:"",subjectId:t.target?.subjectId??""}});}setTargetSource(e,n){let t=this.asProvider(this.steps()[e]);t.target&&this.patchAt(e,{target:s(r({},t.target),{source:n})});}setTargetSubjectId(e,n){let t=this.asProvider(this.steps()[e]);t.target&&this.patchAt(e,{target:s(r({},t.target),{subjectId:n})});}targetInstanceOptions(e){let n=e.target?.subjectType;return n?B(this.settings(),[n]):[]}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}ensureActionsLoaded(e){!e||this.actionsByProvider.has(e)||this.loadingActions.has(e)||(this.loadingActions.add(e),this.providersApi.listExtendedActions(e).subscribe({next:n=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,n);},error:()=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,[]);}}));}setUntilType(e,n){let t=this.asLoop(this.steps()[e]);if(n==="field_empty"){this.patchAt(e,{until:{type:n,stepId:t.until.stepId,field:t.until.field}});return}let o=t.until.type==="field_equals"?t.until.value:"";this.patchAt(e,{until:{type:n,stepId:t.until.stepId,field:t.until.field,value:o}});}setUntilField(e,n,t){let o=this.asLoop(this.steps()[e]);this.patchAt(e,{until:s(r({},o.until),{[n]:t})});}setUntilValue(e,n){let t=this.asLoop(this.steps()[e]);t.until.type==="field_equals"&&this.patchAt(e,{until:s(r({},t.until),{value:n})});}untilValue(e){return e.until.type==="field_equals"?String(e.until.value??""):""}replaceAt(e,n){this.emit(this.steps().map((t,o)=>o===e?n:t));}emit(e){this.stepsChange.emit(e);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-step-list"]],inputs:{steps:[1,"steps"],rootSteps:[1,"rootSteps"],availableWorkflows:[1,"availableWorkflows"],appliesTo:[1,"appliesTo"],settings:[1,"settings"],depth:[1,"depth"]},outputs:{stepsChange:"stepsChange"},decls:6,vars:4,consts:[["data-testid","step-list",1,"step-list"],[1,"step-card",3,"step-card-expanded"],["nz-button","","nzType","dashed","nzBlock","","type","button","data-testid","add-step",3,"click"],[1,"step-card"],[1,"step-header",3,"click"],[1,"step-header-meta"],["aria-hidden","true",1,"step-chevron"],[1,"step-name-preview"],[1,"step-type"],[1,"step-header-actions",3,"click"],["nz-button","","type","button",3,"click","disabled"],["nz-button","","nzDanger","","type","button",3,"click"],[1,"step-body"],[1,"step-toolbar"],[1,"type-select",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[1,"field"],["nz-input","","required","",3,"ngModelChange","ngModel"],["nz-input","",3,"ngModelChange","ngModel"],[1,"hint"],["nz-input","","rows","3",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],[1,"context-file-chips"],["nzMode","closeable"],["data-testid","context-files-empty",1,"hint"],["nz-button","","type","button",3,"click"],["nzMode","closeable",3,"nzOnClose"],["nzValue","new-branch",3,"nzLabel"],["nzValue","existing-branch",3,"nzLabel"],[3,"rowsChange","rows"],["nzType","warning","nzShowIcon","",1,"mismatch",3,"nzMessage"],["nz-checkbox","",3,"ngModelChange","ngModel"],["nzValue","portable",3,"nzLabel"],["nzValue","extended",3,"nzLabel"],[3,"ngModelChange","ngModel","nzPlaceHolder"],[1,"required"],[3,"ngModel"],["nz-input","",3,"ngModel"],["nzShowSearch","","nzAllowClear","",3,"ngModelChange","ngModel"],["data-testid","sub-workflow-foreach"],[1,"field-grid"],[3,"ngModelChange","ngModel","nzMin"],[1,"nested"],[3,"stepsChange","steps","rootSteps","availableWorkflows","appliesTo","settings","depth"]],template:function(n,t){n&1&&(_i$1(0,"div",0),ND(1,Gi,22,28,"nz-card",1,ri,true),_i$1(3,"button",2),gh("click",function(){return t.addStep()}),vw(4),Rw(5,"transloco"),Kc()()),n&2&&(ah("data-depth",t.depth()),gI(),xD(t.steps()),gI(3),nl(" ",Ow(5,2,"step-list.addStep")," "));},dependencies:[i,Mi$1,n8,S4,J6,$6,k3,dd,zc,t7,y7,Nt,Ke,Lt,ut,ai$1,z,on,Ze,Zn$1,Xb,V5,D5,Gn$1,un$1,W,I$1,dn,Kt],styles:[".step-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.step-card[_ngcontent-%COMP%]{background:#fff}.step-header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;cursor:pointer;-webkit-user-select:none;user-select:none}.step-header-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.step-chevron[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem;width:.9rem}.step-type[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:#57534e;background:#f5f5f4;border-radius:999px;padding:.15rem .55rem}.step-name-preview[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.step-body[_ngcontent-%COMP%]{margin-top:.75rem;padding-top:.75rem;border-top:1px solid #e7e5e4}.step-toolbar[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem;align-items:center}.type-select[_ngcontent-%COMP%]{min-width:11rem}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.65rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.field-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.5rem 1rem}.hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:#78716c}.mismatch[_ngcontent-%COMP%]{margin:.5rem 0}.required[_ngcontent-%COMP%]{color:#b91c1c}.nested[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;border-left:3px solid #d6d3d1;background:#fafaf9}.nested[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .5rem}.context-file-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin:.35rem 0}"]});}}return i})();function Ui(i){let l={};for(let e of i.params)l[e.name]=e.type==="select"?e.options?.[0]??"":"";return l}var Zi=i=>({ids:i});function Qi(i,l){i&1&&(_i$1(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"workflow-editor.loading")));}function Yi(i,l){if(i&1&&(_i$1(0,"p",6),vw(1),Kc()),i&2){let e=VD();gI(),Ph(e.loadError());}}function Ji(i,l){if(i&1&&(_i$1(0,"li"),vw(1),Kc()),i&2){let e=l.$implicit;gI(),Ph(e);}}function Xi(i,l){if(i&1&&(_i$1(0,"section",7)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"ul"),ND(5,Ji,2,1,"li",null,SD),Kc()()),i&2){let e=VD(2);gI(2),Ph(Ow(3,1,"workflow-editor.validation")),gI(3),xD(e.validationErrors());}}function eo(i,l){if(i&1&&(lh(0,"nz-option",13),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(2);ch("nzValue",e)("nzLabel",Ow(1,2,n.subjectTypeKey(e)));}}function to(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(2);ch("nzValue",e)("nzLabel",Ow(1,3,n.subjectHandlingKey(e)))("nzDisabled",e==="collection"&&n.appliesToValue()==="none");}}function no(i,l){if(i&1&&(lh(0,"nz-option",13),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(3);ch("nzValue",e)("nzLabel",Ow(1,2,n.inputTypeKey(e)));}}function io(i,l){if(i&1){let e=LD();_i$1(0,"div",18)(1,"label",10)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i$1(5,"input",22),gh("ngModelChange",function(t){let o=Pu(e).$index,d=VD(2);return Lu(d.patchInputField(o,{name:t}))}),Kc(),oE(),Kc(),_i$1(6,"label",10)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i$1(10,"input",22),gh("ngModelChange",function(t){let o=Pu(e).$index,d=VD(2);return Lu(d.patchInputField(o,{label:t}))}),Kc(),oE(),Kc(),_i$1(11,"div",10)(12,"span"),vw(13),Rw(14,"transloco"),Kc(),_i$1(15,"nz-select",23),gh("ngModelChange",function(t){let o=Pu(e).$index,d=VD(2);return Lu(d.patchInputField(o,{type:t}))}),ND(16,no,2,4,"nz-option",13,SD),Kc(),oE(),Kc(),_i$1(18,"label",24),gh("ngModelChange",function(t){let o=Pu(e).$index,d=VD(2);return Lu(d.patchInputField(o,{required:t}))}),vw(19),Rw(20,"transloco"),Kc(),oE(),_i$1(21,"button",25),gh("click",function(){let t=Pu(e).$index,o=VD(2);return Lu(o.removeInputField(t))}),vw(22),Rw(23,"transloco"),Kc()();}if(i&2){let e=l.$implicit,n=l.$index,t=VD(2);ah("data-testid","input-field-"+n),gI(3),Ph(Ow(4,10,"workflow-editor.fieldName")),gI(2),ch("ngModel",e.name),sE(),gI(3),Ph(Ow(9,12,"workflow-editor.fieldLabel")),gI(2),ch("ngModel",e.label),sE(),gI(3),Ph(Ow(14,14,"workflow-editor.fieldType")),gI(2),ch("ngModel",e.type),sE(),gI(),xD(t.inputFieldTypes),gI(2),ch("ngModel",e.required),sE(),gI(),nl(" ",Ow(20,16,"workflow-editor.required")," "),gI(3),nl(" ",Ow(23,18,"workflow-editor.remove")," ");}}function oo(i,l){if(i&1&&(_i$1(0,"p",20),vw(1),Rw(2,"transloco"),Kc()),i&2){let e=VD(2);gI(),nl(" ",Pw(2,1,"workflow-editor.duplicateStepIds",xw(4,Zi,e.duplicateStepIds().join(", ")))," ");}}function ro(i,l){if(i&1){let e=LD();bD(0,Xi,7,3,"section",7),_i$1(1,"nz-card",8),Rw(2,"transloco"),_i$1(3,"div",9)(4,"label",10)(5,"span"),vw(6),Rw(7,"transloco"),Kc(),_i$1(8,"input",11),gh("ngModelChange",function(t){Pu(e);let o=VD();return Lu(o.patchWorkflow({name:t}))}),Kc(),oE(),Kc(),_i$1(9,"div",10)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i$1(13,"nz-select",12),gh("ngModelChange",function(t){Pu(e);let o=VD();return Lu(o.setAppliesTo(t))}),ND(14,eo,2,4,"nz-option",13,SD),Kc(),oE(),Kc(),_i$1(16,"div",10)(17,"span"),vw(18),Rw(19,"transloco"),Kc(),_i$1(20,"nz-select",14),gh("ngModelChange",function(t){Pu(e);let o=VD();return Lu(o.patchWorkflow({subjectHandling:t}))}),ND(21,to,2,5,"nz-option",15,SD),Kc(),oE(),_i$1(23,"p",16),vw(24),Rw(25,"transloco"),Kc()()(),_i$1(26,"label",10)(27,"span"),vw(28),Rw(29,"transloco"),Kc(),_i$1(30,"textarea",17),gh("ngModelChange",function(t){Pu(e);let o=VD();return Lu(o.patchWorkflow({description:t||void 0}))}),Kc(),oE(),Kc()(),_i$1(31,"nz-card",8),Rw(32,"transloco"),ND(33,io,24,20,"div",18,MD),_i$1(35,"button",19),gh("click",function(){Pu(e);let t=VD();return Lu(t.addInputField())}),vw(36),Rw(37,"transloco"),Kc()(),_i$1(38,"nz-card",8),Rw(39,"transloco"),bD(40,oo,3,6,"p",20),_i$1(41,"app-step-list",21),gh("stepsChange",function(t){Pu(e);let o=VD();return Lu(o.onStepsChange(t))}),Kc()();}if(i&2){let e=VD();_D(e.validationErrors().length>0?0:-1),gI(),ch("nzTitle",Ow(2,20,"workflow-editor.basics")),gI(5),Ph(Ow(7,22,"workflow-editor.name")),gI(2),ch("ngModel",e.workflow().name),sE(),gI(3),Ph(Ow(12,24,"workflow-editor.appliesTo")),gI(2),ch("ngModel",e.appliesToValue()),sE(),gI(),xD(e.subjectTypes),gI(4),Ph(Ow(19,26,"workflow-editor.subjectHandling.label")),gI(2),ch("ngModel",e.workflow().subjectHandling),sE(),gI(),xD(e.subjectHandlingOptions),gI(3),nl(" ",Ow(25,28,e.subjectHandlingHelpKey())," "),gI(4),Ph(Ow(29,30,"workflow-editor.description")),gI(2),ch("ngModel",e.workflow().description??""),sE(),gI(),ch("nzTitle",Ow(32,32,"workflow-editor.inputSchema")),gI(2),xD(e.workflow().inputSchema),gI(3),nl(" ",Ow(37,34,"workflow-editor.addInputField")," "),gI(2),ch("nzTitle",Ow(39,36,"workflow-editor.steps")),gI(2),_D(e.duplicateStepIds().length>0?40:-1),gI(),ch("steps",e.workflow().steps)("rootSteps",e.workflow().steps)("availableWorkflows",e.availableWorkflows())("appliesTo",e.workflow().appliesTo)("settings",e.settings());}}var Fr=(()=>{class i{constructor(){this.route=C(ae),this.router=C(Ie),this.workflowsApi=C(U),this.settingsApi=C($),this.message=C(yx),this.destroyRef=C(at),this.transloco=C(Ve),this.language=C(O),this.routeId=de(this.route.paramMap.pipe(Se(e=>e.get("id"))),{initialValue:this.route.snapshot.paramMap.get("id")}),this.workflow=qo(I()),this.availableWorkflows=qo([]),this.settings=qo(oy),this.loadError=qo(null),this.validationErrors=qo([]),this.duplicateStepIds=qo([]),this.saving=qo(false),this.loading=qo(true),this.isNew=Hw(()=>!this.routeId()),this.pageTitle=Hw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("workflow-editor.titleNew"):this.transloco.translate("workflow-editor.titleEdit",{id:this.workflow().id||this.routeId()}))),this.subjectTypes=["none","ticket","pull_request","documentation"],this.subjectHandlingOptions=["per-subject","collection"],this.inputFieldTypes=["string","number","boolean","select","localRepository"],this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.availableWorkflows.set(e),error:()=>{}}),this.settingsApi.getSettings().pipe(ue(this.destroyRef)).subscribe({next:e=>this.settings.set(e),error:()=>{}}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(e=>{let n=e.get("id");if(this.validationErrors.set([]),this.duplicateStepIds.set([]),this.loadError.set(null),!n){this.workflow.set(I()),this.loading.set(false);return}this.loading.set(true),this.workflowsApi.get(n).subscribe({next:t=>{this.workflow.set(s(r({},structuredClone(t)),{steps:g(t.steps,{idAutoSync:false})})),this.loading.set(false);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,`Failed to load workflow ${n}`));}});});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}subjectHandlingKey(e){return `workflow-editor.subjectHandling.${e}`}subjectHandlingHelpKey(){return `workflow-editor.subjectHandling.help.${this.workflow().subjectHandling}`}inputTypeKey(e){return `workflow-editor.inputType.${e}`}patchWorkflow(e){this.workflow.update(n=>r(r({},n),e));}setAppliesTo(e){if(e==="none"){this.patchWorkflow({appliesTo:e,subjectHandling:"per-subject"});return}this.patchWorkflow({appliesTo:e});}appliesToValue(){let e=this.workflow().appliesTo;return Array.isArray(e)?e[0]??"none":e}onStepsChange(e){this.patchWorkflow({steps:e}),this.duplicateStepIds.set(Um(e));}addInputField(){this.patchWorkflow({inputSchema:[...this.workflow().inputSchema,b()]});}removeInputField(e){this.patchWorkflow({inputSchema:this.workflow().inputSchema.filter((n,t)=>t!==e)});}patchInputField(e,n){let t=this.workflow().inputSchema.map((o,d)=>d===e?r(r({},o),n):o);this.patchWorkflow({inputSchema:t});}save(){let e=this.workflow(),n=Um(e.steps);if(this.duplicateStepIds.set(n),n.length>0){this.validationErrors.set([this.transloco.translate("workflow-editor.duplicateStepIds",{ids:n.join(", ")})]);return}let t=v(e,{omitWorkflowId:this.isNew()}),o=J_.safeParse(t);if(!o.success){this.validationErrors.set(T(o.error));return}this.validationErrors.set([]),this.saving.set(true);let d=o.data,E=this.routeId();(this.isNew()||!E?this.workflowsApi.create(d):this.workflowsApi.update(E,s(r({},d),{id:E}))).subscribe({next:ne=>{this.saving.set(false),this.workflow.set(s(r({},structuredClone(ne)),{steps:g(ne.steps,{idAutoSync:false})})),this.message.success(this.isNew()?"Workflow created":"Workflow saved"),this.isNew()&&this.router.navigate(["/workflows",ne.id,"edit"]);},error:ne=>{this.saving.set(false),this.message.error(this.errorMessage(ne,"Save failed"));}});}errorMessage(e,n){return e instanceof o||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-workflow-editor"]],decls:15,vars:10,consts:[["data-testid","workflow-editor",1,"editor"],[1,"header"],[1,"header-actions"],["routerLink","/workflows","data-testid","back-to-workflows"],["nz-button","","nzType","primary","type","button","data-testid","save-button",3,"click","nzLoading","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","validation-errors",1,"errors"],[3,"nzTitle"],[1,"grid"],[1,"field"],["nz-input","","data-testid","workflow-name",3,"ngModelChange","ngModel"],["data-testid","workflow-applies-to",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","workflow-subject-handling",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel","nzDisabled"],["data-testid","workflow-subject-handling-help",1,"help"],["nz-input","","rows","2","data-testid","workflow-description",3,"ngModelChange","ngModel"],[1,"input-field-row"],["nz-button","","nzType","dashed","type","button",3,"click"],["data-testid","duplicate-step-ids",1,"error"],[3,"stepsChange","steps","rootSteps","availableWorkflows","appliesTo","settings"],["nz-input","",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["nz-checkbox","",3,"ngModelChange","ngModel"],["nz-button","","nzDanger","","type","button",3,"click"]],template:function(n,t){n&1&&(_i$1(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Kc()(),_i$1(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"button",4),gh("click",function(){return t.save()}),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,Qi,3,3,"p",5)(13,Yi,2,1,"p",6)(14,ro,42,38),Kc()),n&2&&(gI(4),Ph(t.pageTitle()),gI(3),Ph(Ow(8,6,"workflow-editor.backToWorkflows")),gI(2),ch("nzLoading",t.saving())("disabled",t.loading()||!!t.loadError()),gI(),nl(" ",Ow(11,8,"common.save")," "),gI(2),_D(t.loading()?12:t.loadError()?13:14));},dependencies:[Mi$1,n8,S4,J6,k3,Ln$1,dd,zc,t7,y7,Nt,Ke,Lt,ut,ai$1,z,Xb,V5,D5,xn,Kt],styles:[".editor[_ngcontent-%COMP%]{max-width:56rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem 1rem}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.help[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:#78716c}.checkbox-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.5rem}.input-field-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 8rem auto auto;gap:.5rem;align-items:end;margin-bottom:.5rem}.input-field-row[_ngcontent-%COMP%] > .field[_ngcontent-%COMP%]{margin:0}.errors[_ngcontent-%COMP%]{border:1px solid #fecdd3;background:#fff1f2;padding:.75rem 1rem}.errors[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .35rem;font-size:1rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{Fr as WorkflowEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {an as YE,ao as uu,C,c1 as XI,ar as _r,aw as Le,bK as Le$1,cb as N7,cc as B7,Q as QE,aA as pt,aB as Se,aE as ly,aF as Z0,b9 as BD,bm as $D,m as bD,p as gI,B as _D,h as gh,ag as _h,a4 as Mh,cd as fr,ce as pr,F as LD,f as _i,g as Kc,G as Pu,E as VD,I as Lu}from'./main-MNK6ZYDO.js';var V=["*"];function x(o,A){if(o&1){let n=LD();_i(0,"nz-icon",1),gh("click",function(e){Pu(n);let i=VD();return Lu(i.closeTag(e))}),Kc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Le).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...fr,...pr].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=N7(this.nzColor)||B7(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=QE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&gh("click",function(){return e.updateCheckedStatus()}),t&2&&(_h("background-color",e.isPresetColor?"":e.nzColor),Mh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",Z0],nzBordered:[2,"nzBordered","nzBordered",Z0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&(BD(),$D(0),bD(1,x,1,0,"nz-icon",0)),t&2&&(gI(),_D(e.nzMode==="closeable"?1:-1));},dependencies:[pt,Se],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=YE({type:o});static \u0275inj=uu({imports:[I]})}return o})();export{I,W};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Q as QE,ac as Lr,L as Ln,ad as Mu,K as Kt,f as _i,N as ND,g as Kc,l as lh,p as gI,A as xD,v as vw,R as Rw,x as ch,a3 as xw,a6 as Nw,a5 as ah,w as nl,O as Ow}from'./main-MNK6ZYDO.js';var k=e=>["/manage",e],w=()=>({exact:true}),O=(e,o)=>o.path;function P(e,o){if(e&1&&(_i(0,"a",2),vw(1),Rw(2,"transloco"),Kc()),e&2){let t=o.$implicit;ch("routerLink",xw(6,k,t.path))("routerLinkActiveOptions",Nw(8,w)),ah("data-testid","manage-tab-"+t.path),gI(),nl(" ",Ow(2,4,t.labelKey)," ");}}var K=[{path:"workflows",labelKey:"manage.tab.workflows"},{path:"views",labelKey:"manage.tab.views"},{path:"providers",labelKey:"manage.tab.providers"},{path:"context-files",labelKey:"manage.tab.contextFiles"},{path:"local-repositories",labelKey:"manage.tab.localRepositories"},{path:"worktrees",labelKey:"manage.tab.worktrees"},{path:"preferences",labelKey:"manage.tab.preferences"}],F=(()=>{class e{constructor(){this.tabs=K;}static{this.\u0275fac=function(a){return new(a||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-manage-shell"]],decls:5,vars:0,consts:[["data-testid","manage-shell",1,"manage-shell"],["data-testid","manage-tabs","role","tablist",1,"manage-tabs"],["role","tab","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"]],template:function(a,M){a&1&&(_i(0,"section",0)(1,"nav",1),ND(2,P,3,9,"a",2,O),Kc(),lh(4,"router-outlet"),Kc()),a&2&&(gI(2),xD(M.tabs));},dependencies:[Lr,Ln,Mu,Kt],styles:[".manage-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.manage-tabs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;padding:.5rem 1.5rem 0;border-bottom:1px solid #d6d3d1;background:#ffffffb3}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:.65rem .9rem;color:#57534e;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#1c1917}.manage-tabs[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#1c1917;font-weight:600;border-bottom-color:#1c1917}"]});}}return e})();export{K as MANAGE_TABS,F as ManageShellComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w as we}from'./chunk-cHfOiAJm.js';import {_ as _n}from'./chunk-Ojn34cvU.js';import {C,ai as u,$,T as Ie,V as Ve,b as at,q as qo,H as Hw,u as ue,a9 as Ng,o,Q as QE,M as Mi,L as Ln,d as dd,z as zc,c as t7,K as Kt,f as _i,v as vw,R as Rw,g as Kc,m as bD,p as gI,P as Ph,O as Ow,w as nl,B as _D,E as VD,F as LD,h as gh,x as ch,G as Pu,I as Lu}from'./main-MNK6ZYDO.js';import {U}from'./chunk-Cf_xd8ER.js';import'./chunk-3mppll1n.js';import'./chunk-CEcbtdnK.js';function q(i,b){i&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function G(i,b){if(i&1&&(_i(0,"p",4),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function H(i,b){if(i&1&&(_i(0,"p",5),vw(1),Kc()),i&2){let t=VD(2);gI(),Ph(t.actionError());}}function K(i,b){i&1&&(_i(0,"section",6)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",8),vw(5),Rw(6,"transloco"),Kc()()),i&2&&(gI(2),Ph(Ow(3,2,"shortcuts.list.emptyState")),gI(3),nl(" ",Ow(6,4,"shortcuts.list.emptyCreateButton")," "));}function Q(i,b){if(i&1){let t=LD();_i(0,"app-runnable-items-table",9),gh("rowAction",function(e){Pu(t);let c=VD(2);return Lu(c.onRowAction(e))}),Kc();}if(i&2){let t=VD(2);ch("rows",t.rows())("selectable",false)("showRowAction",true);}}function X(i,b){if(i&1&&(bD(0,H,2,1,"p",5),bD(1,K,7,6,"section",6)(2,Q,1,3,"app-runnable-items-table",7)),i&2){let t=VD();_D(t.actionError()?0:-1),gI(),_D(t.shortcuts().length===0?1:2);}}var ht=(()=>{class i{constructor(){this.shortcutsApi=C(u),this.workflowsApi=C(U),this.jobsApi=C($),this.router=C(Ie),this.transloco=C(Ve),this.destroyRef=C(at),this.shortcuts=qo([]),this.workflows=qo([]),this.jobsById=qo({}),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.rows=Hw(()=>{let t=this.jobsById(),o=this.workflows();return this.shortcuts().map(e=>({id:e.id,primaryLabel:e.name,subtitle:o.find(c=>c.id===e.workflowId)?.name,latestJob:e.lastJobId?t[e.lastJobId]??null:null}))}),this.load();}onRowAction(t){let o=this.shortcuts().find(e=>e.id===t);o&&(this.actionError.set(null),this.jobsApi.start({workflowId:o.workflowId,inputValues:o.inputValues}).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.shortcutsApi.update(o.id,{lastJobId:e.id}).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.shortcuts.update(W=>W.map(C=>C.id===c.id?c:C)),this.router.navigate(["/jobs",e.id]);},error:()=>{this.router.navigate(["/jobs",e.id]);}});},error:e=>{this.actionError.set(this.errorMessage(e,this.transloco.translate("shortcuts.list.runFailed")));}}));}deleteShortcut(t){this.actionError.set(null),this.shortcutsApi.delete(t).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.shortcuts.update(o=>o.filter(e=>e.id!==t));},error:o=>{this.actionError.set(this.errorMessage(o,this.transloco.translate("shortcuts.list.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({shortcuts:t,workflows:o})=>{this.shortcuts.set(t),this.workflows.set(o),this.loading.set(false),this.loadLatestJobs(t);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("shortcuts.list.loadFailed")));}});}loadLatestJobs(t){let o=t.map(e=>e.lastJobId).filter(e=>e!=null);if(o.length===0){this.jobsById.set({});return}Ng(Object.fromEntries(o.map(e=>[e,this.jobsApi.get(e)]))).pipe(ue(this.destroyRef)).subscribe({next:e=>this.jobsById.set(e),error:()=>this.jobsById.set({})});}errorMessage(t,o$1){return t instanceof o||t instanceof Error?t.message:o$1}static{this.\u0275fac=function(o){return new(o||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-shortcut-list"]],decls:11,vars:7,consts:[["data-testid","shortcuts-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","empty-state",1,"empty"],[3,"rows","selectable","showRowAction"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","empty-create"],[3,"rowAction","rows","selectable","showRowAction"]],template:function(o,e){o&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),bD(8,q,3,3,"p",3)(9,G,2,1,"p",4)(10,X,3,2),Kc()),o&2&&(gI(3),Ph(Ow(4,3,"shortcuts.list.title")),gI(3),nl(" ",Ow(7,5,"shortcuts.list.createButton")," "),gI(2),_D(e.loading()?8:e.loadError()?9:10));},dependencies:[Mi,Ln,dd,zc,t7,_n,we,Kt],styles:[".list-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{ht as ShortcutListComponent};
|