@knoflows/engine 0.1.0-alpha.9 → 0.1.0-beta.16

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.
Files changed (107) hide show
  1. package/README.md +5 -10
  2. package/dist/engine.js +110 -10
  3. package/dist/migrations/20260918025930_context_files/migration.sql +7 -0
  4. package/dist/migrations/20260918025930_context_files/snapshot.json +1275 -0
  5. package/dist/migrations/20260918074816_large_kate_bishop/migration.sql +8 -0
  6. package/dist/migrations/20260918074816_large_kate_bishop/snapshot.json +1338 -0
  7. package/dist/migrations/20260919073531_tense_grey_gargoyle/migration.sql +1 -0
  8. package/dist/migrations/20260919073531_tense_grey_gargoyle/snapshot.json +1348 -0
  9. package/dist/migrations/20260919081637_fearless_warlock/migration.sql +1 -0
  10. package/dist/migrations/20260919081637_fearless_warlock/snapshot.json +1358 -0
  11. package/package.json +4 -4
  12. package/static/apple-touch-icon.png +0 -0
  13. package/static/assets/i18n/en.json +216 -12
  14. package/static/assets/i18n/es.json +216 -12
  15. package/static/chunk-9U0WIegY.js +1 -0
  16. package/static/chunk-B0kZCuEt.js +1 -0
  17. package/static/chunk-B2Xol2Un.js +1 -0
  18. package/static/chunk-B7WkIFy0.js +1 -0
  19. package/static/chunk-BW9BdLk-.js +1 -0
  20. package/static/chunk-Bgl02GNl.js +1 -0
  21. package/static/chunk-BhF-m2HP.js +70 -0
  22. package/static/chunk-BhTujCrk.js +1 -0
  23. package/static/chunk-Bu6_39Nh.js +1 -0
  24. package/static/chunk-C0HCwfa5.js +1 -0
  25. package/static/chunk-C2BVYtVN.js +66 -0
  26. package/static/chunk-C7h8oMzu.js +1 -0
  27. package/static/chunk-CRdEWPUM.js +1 -0
  28. package/static/chunk-CRv0PDB7.js +1 -0
  29. package/static/chunk-CecXf-CU.js +1 -0
  30. package/static/chunk-CenXuPs5.js +1 -0
  31. package/static/chunk-CeywzbyD.js +1 -0
  32. package/static/{chunk-WzBVBHEz.js → chunk-Cg2E0vnT.js} +1 -1
  33. package/static/chunk-CsQ_HDGC.js +1 -0
  34. package/static/chunk-D19C8Gcb.js +1 -0
  35. package/static/chunk-DGC4TkAL.js +1 -0
  36. package/static/chunk-DUkiyf7y.js +1 -0
  37. package/static/chunk-DYzSLsNo.js +1 -0
  38. package/static/chunk-DZJZYEZl.js +1 -0
  39. package/static/chunk-DfcFBVF4.js +1 -0
  40. package/static/chunk-DixyYfV_.js +1 -0
  41. package/static/chunk-Dp4H7MY0.js +1 -0
  42. package/static/chunk-DtQtDE8q.js +1 -0
  43. package/static/chunk-Dv5GyY6h.js +1 -0
  44. package/static/chunk-Edaw7VGW.js +1 -0
  45. package/static/chunk-FOJfn_t9.js +1 -0
  46. package/static/chunk-Fwpw-z7T.js +1 -0
  47. package/static/chunk-HUIPNwd9.js +1 -0
  48. package/static/chunk-NZ-CPWJ2.js +1 -0
  49. package/static/chunk-Th9whP36.js +1 -0
  50. package/static/chunk-bCuvpgQS.js +1 -0
  51. package/static/{chunk-BmSmqIC7.js → chunk-iE460Kz5.js} +1 -1
  52. package/static/chunk-p6dftaf8.js +5 -0
  53. package/static/chunk-yoe_30RI.js +1 -0
  54. package/static/chunk-z2vvQAle.js +1 -0
  55. package/static/favicon-16x16.png +0 -0
  56. package/static/favicon-32x32.png +0 -0
  57. package/static/favicon.ico +0 -0
  58. package/static/favicon.svg +12 -0
  59. package/static/icon-192.png +0 -0
  60. package/static/icon-512.png +0 -0
  61. package/static/index.html +30 -5
  62. package/static/main-CHQMTVIP.js +248 -0
  63. package/static/media/inter-latin-400-normal-55WT6UWF.woff2 +0 -0
  64. package/static/media/inter-latin-400-normal-FR5HOXA4.woff +0 -0
  65. package/static/media/inter-latin-500-normal-W62DVTXI.woff2 +0 -0
  66. package/static/media/inter-latin-500-normal-ZNGIZ2YB.woff +0 -0
  67. package/static/media/inter-latin-600-normal-R6Y2SZCR.woff2 +0 -0
  68. package/static/media/inter-latin-600-normal-ZYHV6QZT.woff +0 -0
  69. package/static/media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff +0 -0
  70. package/static/media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2 +0 -0
  71. package/static/media/space-grotesk-latin-500-normal-GESQWJQV.woff2 +0 -0
  72. package/static/media/space-grotesk-latin-500-normal-HV4TE4RA.woff +0 -0
  73. package/static/media/space-grotesk-latin-700-normal-6Z7GHSI6.woff +0 -0
  74. package/static/media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2 +0 -0
  75. package/static/nz-theme-dark.css +1 -0
  76. package/static/nz-theme.css +1 -0
  77. package/static/styles-JGCTKGGH.css +1 -0
  78. package/static/chunk-1SlEtaMr.js +0 -1
  79. package/static/chunk-5H-9s7GP.js +0 -7
  80. package/static/chunk-B-P3MXAn.js +0 -1
  81. package/static/chunk-B76UD1mt.js +0 -1
  82. package/static/chunk-BFYi_kYd.js +0 -1
  83. package/static/chunk-BG0Azip9.js +0 -1
  84. package/static/chunk-BWr0M-hk.js +0 -1
  85. package/static/chunk-Bpxo3nwV.js +0 -1
  86. package/static/chunk-Bw9D3p4h.js +0 -1
  87. package/static/chunk-C-T2O6LE.js +0 -1
  88. package/static/chunk-C1E15gBW.js +0 -5
  89. package/static/chunk-C1V4WljN.js +0 -1
  90. package/static/chunk-C3wpjxgW.js +0 -1
  91. package/static/chunk-C4yhGGeB.js +0 -1
  92. package/static/chunk-C5hSEJdm.js +0 -1
  93. package/static/chunk-CTkRZ4w1.js +0 -1
  94. package/static/chunk-CYX8w88D.js +0 -1
  95. package/static/chunk-Cq4-aSSE.js +0 -1
  96. package/static/chunk-Cwf9CcBI.js +0 -1
  97. package/static/chunk-D32ZkSz4.js +0 -1
  98. package/static/chunk-DE9IK0Os.js +0 -1
  99. package/static/chunk-DNtWpE65.js +0 -1
  100. package/static/chunk-DdVQ8Ilm.js +0 -66
  101. package/static/chunk-W0OF0P_2.js +0 -1
  102. package/static/chunk-XvSvuf-k.js +0 -1
  103. package/static/chunk-aWIxMbtR.js +0 -1
  104. package/static/chunk-f1UVptf5.js +0 -1
  105. package/static/chunk-vj0RDTCf.js +0 -1
  106. package/static/main-BRWQ5RNE.js +0 -249
  107. package/static/styles-6MW3GE4V.css +0 -1
@@ -0,0 +1 @@
1
+ @font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:500;src:url("./media/space-grotesk-latin-500-normal-GESQWJQV.woff2") format("woff2"),url("./media/space-grotesk-latin-500-normal-HV4TE4RA.woff") format("woff")}@font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:700;src:url("./media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2") format("woff2"),url("./media/space-grotesk-latin-700-normal-6Z7GHSI6.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url("./media/inter-latin-400-normal-55WT6UWF.woff2") format("woff2"),url("./media/inter-latin-400-normal-FR5HOXA4.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url("./media/inter-latin-500-normal-W62DVTXI.woff2") format("woff2"),url("./media/inter-latin-500-normal-ZNGIZ2YB.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url("./media/inter-latin-600-normal-R6Y2SZCR.woff2") format("woff2"),url("./media/inter-latin-600-normal-ZYHV6QZT.woff") format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-display:swap;font-weight:500;src:url("./media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2") format("woff2"),url("./media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff") format("woff")}html,body,app-root{height:100%;margin:0}body{font-family:Inter,sans-serif;overflow:hidden}:root{--app-chrome-height: 56px}h1,.display-heading{font-family:Space Grotesk,sans-serif;font-weight:700}code,pre,.mono{font-family:JetBrains Mono,ui-monospace,monospace}.ant-tag{border:none;border-radius:999px}.ant-table-thead>tr>th{font-family:JetBrains Mono,ui-monospace,monospace;font-size:12px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--knoflows-text-secondary)}
@@ -1 +0,0 @@
1
- import {_ as _n,C as Cn}from'./chunk-DNtWpE65.js';import {U}from'./chunk-BWr0M-hk.js';import {W,I}from'./chunk-BmSmqIC7.js';import {A as Ad,H as Hl,$ as $d,a as Al,V as Vd,b as Ai,X as Xl}from'./chunk-CYX8w88D.js';import'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.js';import {C,V as Ve,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,c as sd,z as zc,d as t7,$ as $b,e as V5,D as D5,K as Kt$1,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,N as ND,S as SD,j as oE,x as ch,y as sE,A as xD,l as lh,a5 as ah,a2 as Pw,a3 as xw,G as Pu,I as Lu}from'./main-BRWQ5RNE.js';var st=e=>({count:e}),dt=e=>["/workflows",e,"edit"],pt=(e,p)=>p.id;function ct(e,p){e&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function mt(e,p){if(e&1&&(_i(0,"p",4),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.loadError());}}function ft(e,p){if(e&1&&(lh(0,"nz-option",7),Rw(1,"transloco")),e&2){let t=p.$implicit,o=VD(2);ch("nzValue",t)("nzLabel",Ow(1,2,o.subjectHandlingFilterKey(t)));}}function wt(e,p){if(e&1&&(_i(0,"p",8),vw(1),Kc()),e&2){let t=VD(2);gI(),Ph(t.deleteError());}}function ut(e,p){e&1&&(_i(0,"section",9)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",11),vw(5),Rw(6,"transloco"),Kc()()),e&2&&(gI(2),Ph(Ow(3,2,"workflows.list.emptyState")),gI(3),nl(" ",Ow(6,4,"workflows.list.emptyCreateButton")," "));}function _t(e,p){if(e&1&&(_i(0,"span"),vw(1),Kc()),e&2){let t=VD().$implicit;ah("data-testid","description-"+t.id),gI(),Ph(t.description);}}function xt(e,p){if(e&1&&(_i(0,"span",13),vw(1),Rw(2,"transloco"),Kc()),e&2){let t=VD().$implicit;ah("data-testid","description-"+t.id),gI(),Ph(Ow(2,2,"workflows.list.noDescription"));}}function gt(e,p){if(e&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),e&2){let t=p.$implicit,o=VD().$implicit,m=VD(3);ah("data-testid","applies-to-"+o.id),gI(),Ph(Ow(2,2,m.subjectTypeKey(t)));}}function Ct(e,p){if(e&1){let t=LD();_i(0,"tr")(1,"td")(2,"span"),vw(3),Kc()(),_i(4,"td",12),bD(5,_t,2,2,"span")(6,xt,3,4,"span",13),Kc(),_i(7,"td"),ND(8,gt,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",14)(19,"a",15),vw(20),Rw(21,"transloco"),Kc(),_i(22,"button",16),Rw(23,"transloco"),Rw(24,"transloco"),Rw(25,"transloco"),gh("nzOnConfirm",function(){let m=Pu(t).$implicit,h=VD(3);return Lu(h.deleteWorkflow(m.id))}),vw(26),Rw(27,"transloco"),Kc()()();}if(e&2){let t=p.$implicit,o=VD(3);ah("data-testid","workflow-"+t.id),gI(2),ah("data-testid","name-"+t.id),gI(),Ph(t.name),gI(2),_D(t.description?.trim()?5:6),gI(3),xD(o.appliesToValues(t)),gI(3),ah("data-testid","subject-handling-"+t.id),gI(),Ph(Ow(13,16,o.subjectHandlingKey(t.subjectHandling))),gI(3),ah("data-testid","step-count-"+t.id),gI(),Ph(Pw(17,18,"workflows.list.stepCount",xw(31,st,t.steps.length))),gI(3),ch("routerLink",xw(33,dt,t.id)),ah("data-testid","edit-"+t.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-"+t.id),gI(4),nl(" ",Ow(27,29,"workflows.list.delete")," ");}}function kt(e,p){if(e&1&&(_i(0,"nz-table",10)(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,Ct,28,35,"tr",null,pt),Kc()()),e&2){let t=VD(2);ch("nzData",t.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(t.workflows());}}function bt(e,p){if(e&1){let t=LD();_i(0,"div",5)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",6),gh("ngModelChange",function(m){Pu(t);let h=VD();return Lu(h.setSubjectHandlingFilter(m))}),ND(5,ft,2,4,"nz-option",7,SD),Kc(),oE(),Kc(),bD(7,wt,2,1,"p",8),bD(8,ut,7,6,"section",9)(9,kt,24,21,"nz-table",10);}if(e&2){let t=VD();gI(2),Ph(Ow(3,4,"workflows.list.filterBySubjectHandling")),gI(2),ch("ngModel",t.subjectHandlingFilter()),sE(),gI(),xD(t.subjectHandlingOptions),gI(2),_D(t.deleteError()?7:-1),gI(),_D(t.workflows().length===0?8:9);}}var Kt=(()=>{class e{constructor(){this.workflowsApi=C(U),this.transloco=C(Ve),this.destroyRef=C(at),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(t){this.subjectHandlingFilter.set(t),this.load();}appliesToValues(t){let o=t.appliesTo;return o==="none"?["none"]:Array.isArray(o)?o:[o]}subjectTypeKey(t){return `workflow-editor.subjectType.${t}`}subjectHandlingKey(t){return `workflow-editor.subjectHandling.${t}`}subjectHandlingFilterKey(t){return t==="all"?"workflows.list.filterAll":`workflow-editor.subjectHandling.${t}`}deleteWorkflow(t){this.deleteError.set(null),this.workflowsApi.delete(t).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.workflows.update(o=>o.filter(m=>m.id!==t));},error:o=>{this.deleteError.set(this.errorMessage(o,this.transloco.translate("workflows.list.deleteFailed")));}});}load(){let t=this.subjectHandlingFilter();this.loading.set(true),this.loadError.set(null),this.workflowsApi.list(t==="all"?void 0:{subjectHandling:t}).pipe(ue(this.destroyRef)).subscribe({next:o=>{this.workflows.set(o),this.loading.set(false);},error:o=>{this.loading.set(false),this.loadError.set(this.errorMessage(o,this.transloco.translate("workflows.list.loadFailed")));}});}errorMessage(t,o$1){return t instanceof o||t instanceof Error?t.message:o$1}static{this.\u0275fac=function(o){return new(o||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-workflow-list"]],decls:11,vars:7,consts:[["data-testid","workflows-list",1,"list-page"],[1,"header"],["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"],["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(o,m){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,ct,3,3,"p",3)(9,mt,2,1,"p",4)(10,bt,10,6),Kc()),o&2&&(gI(3),Ph(Ow(4,3,"workflows.list.title")),gI(3),nl(" ",Ow(7,5,"workflows.list.createButton")," "),gI(2),_D(m.loading()?8:m.loadError()?9:10));},dependencies:[Mi,n8,J6,k3,Ln,sd,zc,t7,_n,Cn,$b,V5,D5,Ad,Hl,$d,Al,Vd,Ai,Xl,W,I,Kt$1],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}.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}.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 e})();export{Kt as WorkflowListComponent,Kt as WorkflowsManageComponent};
@@ -1,7 +0,0 @@
1
- import {G as Gn,u as un}from'./chunk-B76UD1mt.js';import {f}from'./chunk-BFYi_kYd.js';import {e as et,U as U$1,G,i as it,v as vt}from'./chunk-C-T2O6LE.js';import {W,I}from'./chunk-BmSmqIC7.js';import'./chunk-CYX8w88D.js';import'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.js';import {C,a as ae,U,V as Ve$1,b as at,q as qo,H as Hw,u as ue,X as rd,Y as Bw,o,Q as QE,M as Mi,L as Ln,c as sd,z as zc,d as t7,Z as y7,K as Kt,f as _i,m as bD,g as Kc,p as gI,B as _D,a0 as $0,a1 as B0,v as vw,R as Rw,P as Ph,O as Ow,E as VD,F as LD,h as gh,w as nl,a2 as Pw,a3 as xw,x as ch,N as ND,A as xD,l as lh,G as Pu,I as Lu,a4 as Mh,a5 as ah,a6 as Nw,a7 as MD}from'./main-BRWQ5RNE.js';var le=t=>({index:t}),de=()=>[],fe=(t,s)=>s.definition.id,Ce=(t,s)=>s.index;function ge(t,s){if(t&1){let e=LD();_i(0,"div",1)(1,"button",2),gh("click",function(){Pu(e);let r=VD();return Lu(r.closeIteration())}),vw(2),Rw(3,"transloco"),Kc(),_i(4,"p",3),vw(5),Rw(6,"transloco"),Kc(),_i(7,"app-job-step-workspace",4),gh("selectExecution",function(r){Pu(e);let m=VD();return Lu(m.onNestedSelect(r))}),Kc()();}if(t&2){let e=s,n=VD();gI(2),nl(" ",Ow(3,9,"jobs.detail.loopBack")," "),gI(3),nl(" ",Pw(6,11,"jobs.detail.loopIteration",xw(14,le,e.index+1))," "),gI(2),ch("definitions",n.nestedLoopDefinition().steps)("executions",e.stepExecutions)("job",n.job())("selectedExecutionId",n.nestedSelectedId())("currentExecutionId",null)("waitingEvent",null)("canResume",false);}}function be(t,s){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit,n=VD(2);ah("data-testid","step-status-"+e.definition.id),gI(),Ph(Ow(2,2,n.stepStatusKey(s.status)));}}function he(t,s){if(t&1){let e=LD();_i(0,"li")(1,"button",9),gh("click",function(){let r=Pu(e).$implicit,m=VD(2);return Lu(m.onStepClick(r))}),_i(2,"span",10),vw(3),Kc(),_i(4,"span",11)(5,"span",12),vw(6),Rw(7,"transloco"),Kc(),bD(8,be,3,4,"nz-tag"),Kc()()();}if(t&2){let e,n=s.$implicit,r=VD(2);gI(),Mh("selected",r.isSelected(n))("current",r.isCurrent(n))("unreached",!n.reached),ch("disabled",!n.reached),ah("data-testid","step-"+n.definition.id),gI(2),Ph(n.definition.name),gI(3),Ph(Ow(7,11,r.stepTypeKey(n.definition.type))),gI(2),_D((e=n.execution)?8:-1,e);}}function ve(t,s){t&1&&(_i(0,"p",8),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.noStepSelected")," "));}function Ee(t,s){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.detail.inProgress.loop")));}function Se(t,s){if(t&1){let e=LD();_i(0,"li")(1,"button",19),gh("click",function(){let r=Pu(e).$implicit,m=VD(4);return Lu(m.openIteration(m.selectedDefinition(),r))}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=s.$implicit;gI(),ah("data-testid","loop-iteration-"+e.index),gI(),nl(" ",Pw(3,2,"jobs.detail.loopIteration",xw(5,le,e.index+1))," ");}}function we(t,s){t&1&&(_i(0,"li",12),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.detail.noIterations")));}function Te(t,s){if(t&1&&(_i(0,"p",18),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function Ie(t,s){if(t&1&&(_i(0,"div",13)(1,"h3"),vw(2),Kc(),bD(3,Ee,3,3,"p",16),_i(4,"ul",17),ND(5,Se,4,7,"li",null,Ce,false,we,3,3,"li",12),Kc(),bD(8,Te,2,1,"p",18),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:-1),gI(2),xD(e.selectedExecution().iterations??Nw(4,de)),gI(3),_D(e.selectedExecution().error?8:-1);}}function ke(t,s){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.inProgress.sub_workflow")," "));}function Me(t,s){if(t&1&&(_i(0,"p",18),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function ye(t,s){if(t&1&&(_i(0,"div",14)(1,"h3"),vw(2),Kc(),bD(3,ke,3,3,"p",16),lh(4,"app-job-status-table",20),bD(5,Me,2,1,"p",18),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:-1),gI(),ch("jobIds",e.selectedExecution().childJobIds??Nw(4,de)),gI(),_D(e.selectedExecution().error?5:-1);}}function je(t,s){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=s.$implicit;gI(),Ph(e);}}function De(t,s){t&1&&(_i(0,"li",12),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.resume.noQuestions")));}function Je(t,s){if(t&1&&(_i(0,"p",25),vw(1),Kc()),t&2){let e=VD(5);gI(),Ph(e.resumeParseError());}}function Pe(t,s){if(t&1){let e=LD();_i(0,"section",21)(1,"h4"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul",23),ND(5,je,2,1,"li",null,MD,false,De,3,3,"li",12),Kc(),_i(8,"label"),vw(9),Rw(10,"transloco"),_i(11,"textarea",24),gh("input",function(r){Pu(e);let m=VD(4);return Lu(m.onResumeTextInput(r))}),Kc()(),bD(12,Je,2,1,"p",25),_i(13,"button",26),gh("click",function(){Pu(e);let r=VD(4);return Lu(r.resumeSubmit.emit())}),vw(14),Rw(15,"transloco"),Kc()();}if(t&2){let e=VD(4);gI(2),Ph(Ow(3,7,"jobs.resume.heading")),gI(3),xD(e.waitingPrompts()),gI(4),nl(" ",Ow(10,9,"jobs.resume.jsonLabel")," "),gI(2),ch("value",e.resumeText()),gI(),_D(e.resumeParseError()?12:-1),gI(),ch("disabled",e.resuming()),gI(),nl(" ",Ow(15,11,e.resuming()?"jobs.resume.submitting":"jobs.resume.button")," ");}}function Ne(t,s){if(t&1&&(_i(0,"pre",22),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.formatOutput(e.selectedExecution()));}}function Oe(t,s){if(t&1&&(_i(0,"div",15)(1,"h3"),vw(2),Kc(),bD(3,Pe,16,13,"section",21)(4,Ne,2,1,"pre",22),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.showResume()?3:4);}}function We(t,s){if(t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD(4);gI(),nl(" ",Ow(2,1,"jobs.detail.inProgress."+e.selectedExecution().type)," ");}}function ze(t,s){if(t&1&&(_i(0,"p",27),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function Re(t,s){if(t&1&&(_i(0,"pre",22),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.formatOutput(e.selectedExecution()));}}function Be(t,s){if(t&1&&(_i(0,"div")(1,"h3"),vw(2),Kc(),bD(3,We,3,3,"p",16)(4,ze,2,1,"p",27)(5,Re,2,1,"pre",22),Kc()),t&2){let e=VD(3);ah("data-testid",e.selectedExecution().type+"-view"),gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:e.selectedExecution().error?4:5);}}function Ve(t,s){if(t&1&&bD(0,Ie,9,5,"div",13)(1,ye,6,5,"div",14)(2,Oe,5,2,"div",15)(3,Be,6,3,"div"),t&2){let e,n=VD(2);_D((e=n.selectedExecution().type)==="loop"?0:e==="sub_workflow"?1:e==="interaction"?2:3);}}function Fe(t,s){if(t&1&&(_i(0,"aside",5)(1,"h3"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul",6),ND(5,he,9,13,"li",null,fe),Kc()(),_i(7,"section",7),bD(8,ve,3,3,"p",8)(9,Ve,4,1),Kc()),t&2){let e=VD();gI(2),Ph(Ow(3,2,"jobs.detail.stepsHeading")),gI(3),xD(e.rows()),gI(3),_D(e.selectedExecution()?9:8);}}var ce=(()=>{class t{constructor(){this.definitions=$0.required(),this.executions=$0.required(),this.job=$0.required(),this.selectedExecutionId=$0(null),this.currentExecutionId=$0(null),this.waitingEvent=$0(null),this.resumeText=$0(`{
2
-
3
- }`),this.resumeParseError=$0(null),this.resuming=$0(false),this.canResume=$0(false),this.selectExecution=B0(),this.resumeTextChange=B0(),this.resumeSubmit=B0(),this.nestedIteration=qo(null),this.nestedLoopDefinition=qo(null),this.nestedSelectedId=qo(null),this.rows=Hw(()=>it(this.definitions(),this.executions())),this.selectedExecution=Hw(()=>{let e=this.selectedExecutionId();return e?this.executions().find(n=>n.id===e)??null:null}),this.selectedDefinition=Hw(()=>{let e=this.selectedExecution();return e?this.definitions().find(n=>n.id===e.stepDefinitionId)??null:null}),this.waitingPrompts=Hw(()=>{let e=this.waitingEvent();return e?e.questions.length>0?e.questions:e.data!=null?[JSON.stringify(e.data,null,2)]:[]:[]}),this.showResume=Hw(()=>{if(!this.canResume())return false;let e=this.selectedExecution(),n=this.currentExecutionId();return e!=null&&e.id===n&&e.type==="interaction"&&this.job().status==="waiting_for_human"});}stepStatusKey(e){return `jobs.stepStatus.${e}`}stepTypeKey(e){return `step-list.stepType.${e}`}onStepClick(e){!e.reached||!e.execution||(this.nestedIteration.set(null),this.nestedLoopDefinition.set(null),this.selectExecution.emit(e.execution.id));}openIteration(e,n){this.nestedLoopDefinition.set(e),this.nestedIteration.set(n);let r=n.stepExecutions[0];this.nestedSelectedId.set(r?.id??null);}closeIteration(){this.nestedIteration.set(null),this.nestedLoopDefinition.set(null),this.nestedSelectedId.set(null);}onNestedSelect(e){this.nestedSelectedId.set(e);}onResumeTextInput(e){this.resumeTextChange.emit(e.target.value);}formatOutput(e){return e.error?e.error:e.output===void 0?"":typeof e.output=="string"?e.output:JSON.stringify(e.output,null,2)}isRunning(e){return e?.status==="running"}isSelected(e){return e.execution!=null&&e.execution.id===this.selectedExecutionId()}isCurrent(e){return e.execution!=null&&e.execution.id===this.currentExecutionId()}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-step-workspace"]],inputs:{definitions:[1,"definitions"],executions:[1,"executions"],job:[1,"job"],selectedExecutionId:[1,"selectedExecutionId"],currentExecutionId:[1,"currentExecutionId"],waitingEvent:[1,"waitingEvent"],resumeText:[1,"resumeText"],resumeParseError:[1,"resumeParseError"],resuming:[1,"resuming"],canResume:[1,"canResume"]},outputs:{selectExecution:"selectExecution",resumeTextChange:"resumeTextChange",resumeSubmit:"resumeSubmit"},decls:3,vars:1,consts:[["data-testid","job-step-workspace",1,"workspace"],["data-testid","loop-drill-in",1,"nested"],["nz-button","","nzType","link","type","button","data-testid","loop-back",3,"click"],[1,"nested-label"],[3,"selectExecution","definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","canResume"],["data-testid","step-side-panel",1,"side-panel"],[1,"step-list"],["data-testid","step-main-area",1,"main-area"],["data-testid","no-step-selected",1,"muted"],["type","button",1,"step-button",3,"click","disabled"],[1,"step-name"],[1,"step-meta"],[1,"muted"],["data-testid","loop-view"],["data-testid","sub-workflow-view"],["data-testid","interaction-view"],["data-testid","step-in-progress"],["data-testid","loop-iterations",1,"iteration-list"],[1,"error"],["nz-button","","nzType","link","type","button",3,"click"],[3,"jobIds"],["data-testid","resume-form",1,"resume"],["data-testid","step-output"],["data-testid","waiting-questions"],["data-testid","resume-json","rows","8",3,"input","value"],["data-testid","resume-parse-error",1,"error"],["nz-button","","nzType","primary","type","button","data-testid","resume-button",3,"click","disabled"],["data-testid","step-error",1,"error"]],template:function(n,r){if(n&1&&(_i(0,"div",0),bD(1,ge,8,16,"div",1)(2,Fe,10,4),Kc()),n&2){let m;gI(),_D((m=r.nestedIteration())?1:2,m);}},dependencies:[t,Mi,sd,zc,t7,y7,W,I,vt,Kt],styles:[".workspace[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(14rem,18rem) 1fr;gap:1rem;align-items:start;min-height:20rem}.nested[_ngcontent-%COMP%]{grid-column:1 / -1}.nested-label[_ngcontent-%COMP%]{margin:0 0 .75rem;color:#57534e}.side-panel[_ngcontent-%COMP%]{border:1px solid #d6d3d1;background:#ffffffbf;padding:.75rem}.side-panel[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem}.step-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}.step-button[_ngcontent-%COMP%]{width:100%;text-align:left;font:inherit;padding:.45rem .55rem;border:1px solid transparent;background:transparent;cursor:pointer;display:flex;flex-direction:column;gap:.2rem}.step-button[_ngcontent-%COMP%]:hover:not(:disabled){background:#f5f5f4}.step-button.selected[_ngcontent-%COMP%]{border-color:#a8a29e;background:#fafaf9}.step-button.current[_ngcontent-%COMP%]{box-shadow:inset 3px 0 #0c0a09}.step-button[_ngcontent-%COMP%]:disabled, .step-button.unreached[_ngcontent-%COMP%]{opacity:.55;cursor:not-allowed}.step-name[_ngcontent-%COMP%]{font-weight:600}.step-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;font-size:.8rem}.main-area[_ngcontent-%COMP%]{border:1px solid #d6d3d1;background:#ffffffd9;padding:1rem;min-height:16rem}.main-area[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0}.muted[_ngcontent-%COMP%]{color:#78716c}.error[_ngcontent-%COMP%]{color:#9f1239}pre[_ngcontent-%COMP%]{overflow:auto;padding:.75rem;background:#f5f5f4;border:1px solid #d6d3d1;font-size:.85rem}.iteration-list[_ngcontent-%COMP%]{padding-left:1.1rem}.resume[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0}.resume[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{font:inherit;font-family:ui-monospace,Consolas,monospace;padding:.4rem .5rem;border:1px solid #a8a29e}@media(max-width:48rem){.workspace[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});}}return t})();function Le(t,s){t&1&&(_i(0,"p",1),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function $e(t,s){if(t&1&&(_i(0,"p",2),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Ae(t,s){if(t&1){let e=LD();_i(0,"button",15),gh("click",function(){Pu(e);let r=VD(2);return Lu(r.jumpToCurrent())}),vw(1),Rw(2,"transloco"),Kc();}t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.jumpToCurrent")," "));}function qe(t,s){if(t&1&&(_i(0,"p",11),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.actionError());}}function Ke(t,s){t&1&&(lh(0,"nz-alert",12),Rw(1,"transloco")),t&2&&ch("nzMessage",Ow(1,1,"jobs.detail.queued"));}function Qe(t,s){if(t&1){let e=LD();_i(0,"app-job-step-workspace",16),gh("selectExecution",function(r){Pu(e);let m=VD(2);return Lu(m.onSelectExecution(r))})("resumeTextChange",function(r){Pu(e);let m=VD(2);return Lu(m.setResumeText(r))})("resumeSubmit",function(){Pu(e);let r=VD(2);return Lu(r.submitResume())}),Kc();}if(t&2){let e=VD(),n=VD();ch("definitions",s.steps)("executions",e.stepHistory)("job",e)("selectedExecutionId",n.viewedExecutionId())("currentExecutionId",n.currentStep()?.id??null)("waitingEvent",n.waitingEvent())("resumeText",n.resumeText())("resumeParseError",n.resumeParseError())("resuming",n.resuming())("canResume",true);}}function He(t,s){t&1&&(_i(0,"p",14),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.workflowMissing")," "));}function Ue(t,s){if(t&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,"span",7),vw(9),Kc(),vw(10," \xB7 "),_i(11,"nz-tag",8),vw(12),Rw(13,"transloco"),Kc(),vw(14," \xB7 "),_i(15,"span",9),vw(16),Kc()()(),bD(17,Ae,3,3,"button",10),Kc(),bD(18,qe,2,1,"p",11),bD(19,Ke,2,3,"nz-alert",12)(20,Qe,1,10,"app-job-step-workspace",13)(21,He,3,3,"p",14)),t&2){let e,n=s,r=VD();gI(3),Ph(Ow(4,8,"jobs.detail.backToStart")),gI(3),Ph(n.id),gI(3),Ph(n.workflowId),gI(3),Ph(Ow(13,10,r.statusKey(n.status))),gI(4),Ph(r.subjectText()),gI(),_D(r.showJumpToCurrent()?17:-1),gI(),_D(r.actionError()?18:-1),gI(),_D(r.showQueued()?19:(e=r.workflow())?20:21,e);}}var ht=(()=>{class t{constructor(){this.route=C(ae),this.jobsApi=C(U),this.eventsService=C(f),this.transloco=C(Ve$1),this.destroyRef=C(at),this.job=qo(null),this.workflow=qo(null),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.eventStream=qo(null),this.eventsSnapshot=qo([]),this.autoFollow=qo(true),this.viewedExecutionId=qo(null),this.resumeText=qo(`{
4
-
5
- }`),this.resumeParseError=qo(null),this.resuming=qo(false),this.currentStep=Hw(()=>{let e=this.job();return e?et(e):null}),this.showQueued=Hw(()=>{let e=this.job();return e!=null&&et(e)==null}),this.showJumpToCurrent=Hw(()=>{let e=this.currentStep();return e?this.viewedExecutionId()!==e.id:false}),this.eventLog=Hw(()=>this.eventStream()?.events()??this.eventsSnapshot()),this.waitingEvent=Hw(()=>{let e=this.eventLog();for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(r?.type==="waiting_for_human")return r}return null}),this.destroyRef.onDestroy(()=>this.closeStream()),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(e=>{let n=e.get("id");if(!n){this.loading.set(false),this.loadError.set(this.transloco.translate("jobs.detail.loadFailed"));return}this.load(n);}),rd(()=>{let e=this.eventStream();if(!e)return;let n=e.latest();n&&Bw(()=>{(n.type==="step_started"||n.type==="step_completed"||n.type==="step_failed"||n.type==="waiting_for_human"||n.type==="waiting_for_children"||n.type==="human_answered"||n.type==="job_completed"||n.type==="job_failed")&&this.refreshJob(n.jobId),(n.type==="job_completed"||n.type==="job_failed")&&this.closeStream();});}),rd(()=>{let e=this.currentStep();this.autoFollow()&&Bw(()=>{this.viewedExecutionId.set(e?.id??null);});});}statusKey(e){return `jobs.status.${e}`}subjectText(){return U$1(this.job()?.subjectContext)??"\u2014"}onSelectExecution(e){this.autoFollow.set(false),this.viewedExecutionId.set(e);}jumpToCurrent(){this.autoFollow.set(true),this.viewedExecutionId.set(this.currentStep()?.id??null);}setResumeText(e){this.resumeText.set(e),this.resumeParseError.set(null);}submitResume(){let e=this.job();if(!e)return;let n;try{n=JSON.parse(this.resumeText());}catch(r){this.resumeParseError.set(r instanceof Error?r.message:this.transloco.translate("jobs.resume.invalidJson"));return}this.resumeParseError.set(null),this.actionError.set(null),this.resuming.set(true),this.jobsApi.resume(e.id,n).subscribe({next:r=>{this.resuming.set(false),this.applyJob(r),G(r.status)&&this.closeStream();},error:r=>{this.resuming.set(false),this.actionError.set(this.errorMessage(r,this.transloco.translate("jobs.errors.resumeFailed")));}});}load(e){this.loading.set(true),this.loadError.set(null),this.actionError.set(null),this.autoFollow.set(true),this.viewedExecutionId.set(null),this.resumeText.set(`{
6
-
7
- }`),this.resumeParseError.set(null),this.closeStream(),this.eventsSnapshot.set([]),this.jobsApi.get(e).pipe(ue(this.destroyRef)).subscribe({next:n=>{this.applyJob(n),this.loading.set(false),G(n.status)||this.eventStream.set(this.eventsService.connect({jobId:n.id}));},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,this.transloco.translate("jobs.detail.loadFailed")));}});}applyJob(e){this.job.set(e),this.workflow.set(e.workflowSnapshot??null),this.autoFollow()&&this.viewedExecutionId.set(et(e)?.id??null);}refreshJob(e){this.jobsApi.get(e).subscribe({next:n=>this.applyJob(n),error:n=>{this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.refreshFailed")));}});}closeStream(){let e=this.eventStream();e&&(this.eventsSnapshot.set(e.events()),e.close(),this.eventStream.set(null));}errorMessage(e,n){return e instanceof o||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-detail"]],decls:4,vars:1,consts:[["data-testid","job-detail",1,"detail-page"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"header"],["routerLink","/jobs"],["data-testid","job-id"],[1,"meta"],["data-testid","job-workflow"],["data-testid","job-status"],["data-testid","job-subject"],["nz-button","","type","button","data-testid","jump-to-current"],["data-testid","action-error",1,"error"],["data-testid","queued-message","nzType","info",3,"nzMessage"],[3,"definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","resumeText","resumeParseError","resuming","canResume"],["data-testid","missing-workflow",1,"muted"],["nz-button","","type","button","data-testid","jump-to-current",3,"click"],[3,"selectExecution","resumeTextChange","resumeSubmit","definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","resumeText","resumeParseError","resuming","canResume"]],template:function(n,r){if(n&1&&(_i(0,"main",0),bD(1,Le,3,3,"p",1)(2,$e,2,1,"p",2)(3,Ue,22,12),Kc()),n&2){let m;gI(),_D(r.loading()?1:r.loadError()?2:(m=r.job())?3:-1,m);}},dependencies:[Mi,Ln,Gn,un,sd,zc,t7,y7,W,I,ce,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}.error[_ngcontent-%COMP%]{color:#9f1239}.muted[_ngcontent-%COMP%]{color:#78716c}"]});}}return t})();export{ht as JobDetailComponent};
@@ -1 +0,0 @@
1
- import {i as ie$1,_ as _$1,r,t as t$1}from'./main-BRWQ5RNE.js';var _=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(_||{}),z="*";function vt(n,e=null){return {type:_.Sequence,steps:n,options:e}}function Le(n){return {type:_.Style,styles:n,offset:null}}var $=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=false;_destroyed=false;_finished=false;_position=0;parentPlayer=null;totalTime;constructor(e=0,t=0){this.totalTime=e+t;}_onFinish(){this._finished||(this._finished=true,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]);}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e);}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e);}onDestroy(e){this._onDestroyFns.push(e);}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=true;}triggerMicrotask(){queueMicrotask(()=>this._onFinish());}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[];}pause(){}restart(){}finish(){this._onFinish();}destroy(){this._destroyed||(this._destroyed=true,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[]);}reset(){this._started=false,this._finished=false,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns;}setPosition(e){this._position=this.totalTime?e*this.totalTime:1;}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0;}},ee=class{_onDoneFns=[];_onStartFns=[];_finished=false;_started=false;_destroyed=false;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(e){this.players=e;let t=0,s=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==r&&this._onFinish();}),a.onDestroy(()=>{++s==r&&this._onDestroy();}),a.onStart(()=>{++i==r&&this._onStart();});}),this.totalTime=this.players.reduce((a,o)=>Math.max(a,o.totalTime),0);}_onFinish(){this._finished||(this._finished=true,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]);}init(){this.players.forEach(e=>e.init());}onStart(e){this._onStartFns.push(e);}_onStart(){this.hasStarted()||(this._started=true,this._onStartFns.forEach(e=>e()),this._onStartFns=[]);}onDone(e){this._onDoneFns.push(e);}onDestroy(e){this._onDestroyFns.push(e);}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play());}pause(){this.players.forEach(e=>e.pause());}restart(){this.players.forEach(e=>e.restart());}finish(){this._onFinish(),this.players.forEach(e=>e.finish());}destroy(){this._onDestroy();}_onDestroy(){this._destroyed||(this._destroyed=true,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[]);}reset(){this.players.forEach(e=>e.reset()),this._destroyed=false,this._finished=false,this._started=false;}setPosition(e){let t=e*this.totalTime;this.players.forEach(s=>{let i=s.totalTime?Math.min(1,t/s.totalTime):1;s.setPosition(i);});}getPosition(){let e=this.players.reduce((t,s)=>t===null||s.totalTime>t.totalTime?s:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy();});}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0;}},re="!";function bt(n){return new _$1(3e3,false)}function bs(){return new _$1(3100,false)}function ws(){return new _$1(3101,false)}function Ps(n){return new _$1(3001,false)}function As(n){return new _$1(3003,false)}function Ns(n){return new _$1(3004,false)}function Pt(n,e){return new _$1(3005,false)}function At(){return new _$1(3006,false)}function Nt(){return new _$1(3007,false)}function Ct(n,e){return new _$1(3008,false)}function Dt(n){return new _$1(3002,false)}function Mt(n,e,t,s,i){return new _$1(3010,false)}function kt(){return new _$1(3011,false)}function Ft(){return new _$1(3012,false)}function Rt(){return new _$1(3200,false)}function Ot(){return new _$1(3202,false)}function Lt(){return new _$1(3013,false)}function It(n){return new _$1(3014,false)}function zt(n){return new _$1(3015,false)}function Kt(n){return new _$1(3016,false)}function qt(n){return new _$1(3500,false)}function Bt(n){return new _$1(3501,false)}function Qt(n,e){return new _$1(3404,false)}function Cs(n){return new _$1(3502,false)}function Vt(n){return new _$1(3503,false)}function $t(){return new _$1(3300,false)}function Ut(n){return new _$1(3504,false)}function Gt(n){return new _$1(3301,false)}function jt(n,e){return new _$1(3302,false)}function Wt(n){return new _$1(3303,false)}function Ht(n,e){return new _$1(3400,false)}function Yt(n){return new _$1(3401,false)}function Xt(n){return new _$1(3402,false)}function xt(n,e){return new _$1(3505,false)}var Ds=new Set(["-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-ms-grid-columns","-ms-grid-rows","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","accent-color","all","backdrop-filter","background","background-color","background-position","background-size","block-size","border","border-block-end","border-block-end-color","border-block-end-width","border-block-start","border-block-start-color","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width","border-color","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-slice","border-image-width","border-inline-end","border-inline-end-color","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-width","border-left","border-left-color","border-left-width","border-radius","border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width","border-width","bottom","box-shadow","caret-color","clip","clip-path","color","column-count","column-gap","column-rule","column-rule-color","column-rule-width","column-width","columns","filter","flex","flex-basis","flex-grow","flex-shrink","font","font-size","font-size-adjust","font-stretch","font-variation-settings","font-weight","gap","grid-column-gap","grid-gap","grid-row-gap","grid-template-columns","grid-template-rows","height","inline-size","input-security","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","outline","outline-color","outline-offset","outline-width","padding","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","perspective","perspective-origin","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-coordinate","scroll-snap-destination","scrollbar-color","shape-image-threshold","shape-margin","shape-outside","tab-size","text-decoration","text-decoration-color","text-decoration-thickness","text-emphasis","text-emphasis-color","text-indent","text-shadow","text-underline-offset","top","transform","transform-origin","translate","vertical-align","visibility","width","word-spacing","z-index","zoom"]);function U(n){switch(n.length){case 0:return new $;case 1:return n[0];default:return new ee(n)}}function qe(n,e,t=new Map,s=new Map){let i=[],r=[],a=-1,o=null;if(e.forEach(l=>{let u=l.get("offset"),c=u==a,h=c&&o||new Map;l.forEach((S,y)=>{let d=y,g=S;if(y!=="offset")switch(d=n.normalizePropertyName(d,i),g){case re:g=t.get(y);break;case z:g=s.get(y);break;default:g=n.normalizeStyleValue(y,d,g,i);break}h.set(d,g);}),c||r.push(h),o=h,a=u;}),i.length)throw Cs();return r}function pe(n,e,t,s){switch(e){case "start":n.onStart(()=>s(t&&Ie(t,"start",n)));break;case "done":n.onDone(()=>s(t&&Ie(t,"done",n)));break;case "destroy":n.onDestroy(()=>s(t&&Ie(t,"destroy",n)));break}}function Ie(n,e,t){let s=t.totalTime,i=!!t.disabled,r=ge(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),a=n._data;return a!=null&&(r._data=a),r}function ge(n,e,t,s,i="",r=0,a){return {element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!a}}function F(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Be(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return [t,s]}var Ms=typeof document>"u"?null:document.documentElement;function ye(n){let e=n.parentNode||n.host||null;return e===Ms?null:e}function ks(n){return n.substring(1,6)=="ebkit"}var X=null,wt=false;function Jt(n){X||(X=Rs()||{},wt=X.style?"WebkitAppearance"in X.style:false);let e=true;return X.style&&!ks(n)&&(e=n in X.style,!e&&wt&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in X.style)),e}function Fs(n){return Ds.has(n)}function Rs(){return typeof document<"u"?document.body:null}function Qe(n,e){for(;e;){if(e===n)return true;e=ye(e);}return false}function Ve(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var Os=1e3,$e="{{",Ls="}}",_e="ng-enter",ae="ng-leave",oe="ng-trigger",le=".ng-trigger",Ue="ng-animating",Se=".ng-animating";function V(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return !e||e.length<2?0:ze(parseFloat(e[1]),e[2])}function ze(n,e){return e==="s"?n*Os:n}function ue(n,e,t){return n.hasOwnProperty("duration")?n:zs(n,e,t)}var Is=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function zs(n,e,t){let s,i=0,r="";if(typeof n=="string"){let a=n.match(Is);if(a===null)return e.push(bt()),{duration:0,delay:0,easing:""};s=ze(parseFloat(a[1]),a[2]);let o=a[3];o!=null&&(i=ze(parseFloat(o),a[4]));let l=a[5];l&&(r=l);}else s=n;if(!t){let a=false,o=e.length;s<0&&(e.push(bs()),a=true),i<0&&(e.push(ws()),a=true),a&&e.splice(o,0,bt());}return {duration:s,delay:i,easing:r}}function Zt(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function Ge(n){return Array.isArray(n)?new Map(...n):new Map(n)}function K(n,e,t){e.forEach((s,i)=>{let r=Ee(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s;});}function j(n,e){e.forEach((t,s)=>{let i=Ee(s);n.style[i]="";});}function te(n){return Array.isArray(n)?n.length==1?n[0]:vt(n):n}function es(n,e,t){let s=e.params||{},i=je(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(Ps());});}var Ke=new RegExp(`${$e}\\s*(.+?)\\s*${Ls}`,"g");function je(n){let e=[];if(typeof n=="string"){let t;for(;t=Ke.exec(n);)e.push(t[1]);Ke.lastIndex=0;}return e}function se(n,e,t){let s=`${n}`,i=s.replace(Ke,(r,a)=>{let o=e[a];return o==null&&(t.push(As()),o=""),o.toString()});return i==s?n:i}var Ks=/-+([a-z0-9])/g;function Ee(n){return n.replace(Ks,(...e)=>e[1].toUpperCase())}function qs(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ts(n,e){return n===0||e===0}function ss(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,a)=>{s.has(a)||i.push(a),s.set(a,r);}),i.length)for(let r=1;r<e.length;r++){let a=e[r];i.forEach(o=>a.set(o,Te(n,o)));}}return e}function R(n,e,t){switch(e.type){case _.Trigger:return n.visitTrigger(e,t);case _.State:return n.visitState(e,t);case _.Transition:return n.visitTransition(e,t);case _.Sequence:return n.visitSequence(e,t);case _.Group:return n.visitGroup(e,t);case _.Animate:return n.visitAnimate(e,t);case _.Keyframes:return n.visitKeyframes(e,t);case _.Style:return n.visitStyle(e,t);case _.Reference:return n.visitReference(e,t);case _.AnimateChild:return n.visitAnimateChild(e,t);case _.AnimateRef:return n.visitAnimateRef(e,t);case _.Query:return n.visitQuery(e,t);case _.Stagger:return n.visitStagger(e,t);default:throw Ns(e.type)}}function Te(n,e){return window.getComputedStyle(n)[e]}var gs=(()=>{class n{validateStyleProperty(t){return Jt(t)}containsElement(t,s){return Qe(t,s)}getParentElement(t){return ye(t)}query(t,s,i){return Ve(t,s,i)}computeStyle(t,s,i){return i||""}animate(t,s,i,r,a,o=[],l){return new $(i,r)}static \u0275fac=function(s){return new(s||n)};static \u0275prov=ie$1({token:n,factory:n.\u0275fac})}return n})(),is=class{static NOOP=new gs},Je=class{},Ze=class{normalizePropertyName(e,t){return e}normalizeStyleValue(e,t,s,i){return s}},Bs=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),et=class extends Je{normalizePropertyName(e,t){return Ee(e)}normalizeStyleValue(e,t,s,i){let r="",a=s.toString().trim();if(Bs.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else {let o=s.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&i.push(Pt());}return a+r}};var Ae="*";function Qs(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>Vs(s,t,e)):t.push(n),t}function Vs(n,e,t){if(n[0]==":"){let l=$s(n,t);if(typeof l=="function"){e.push(l);return}n=l;}let s=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(zt()),e;let i=s[1],r=s[2],a=s[3];e.push(ns(i,a));let o=i==Ae&&a==Ae;r[0]=="<"&&!o&&e.push(ns(a,i));}function $s(n,e){switch(n){case ":enter":return "void => *";case ":leave":return "* => void";case ":increment":return (t,s)=>parseFloat(s)>parseFloat(t);case ":decrement":return (t,s)=>parseFloat(s)<parseFloat(t);default:return e.push(Kt()),"* => *"}}var ve=new Set(["true","1"]),be=new Set(["false","0"]);function ns(n,e){let t=ve.has(n)||be.has(n),s=ve.has(e)||be.has(e);return (i,r)=>{let a=n==Ae||n==i,o=e==Ae||e==r;return !a&&t&&typeof i=="boolean"&&(a=i?ve.has(n):be.has(n)),!o&&s&&typeof r=="boolean"&&(o=r?ve.has(e):be.has(e)),a&&o}}var ys=":self",Us=new RegExp(`s*${ys}s*,?`,"g");function dt(n,e,t,s){return new tt(n).build(e,t,s)}var rs="",tt=class{_driver;constructor(e){this._driver=e;}build(e,t,s){let i=new st(t);return this._resetContextStyleTimingState(i),R(this,te(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=rs,e.collectedStyles=new Map,e.collectedStyles.set(rs,new Map),e.currentTime=0;}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],a=[];return e.name.charAt(0)=="@"&&t.errors.push(At()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==_.State){let l=o,u=l.name;u.toString().split(/\s*,\s*/).forEach(c=>{l.name=c,r.push(this.visitState(l,t));}),l.name=u;}else if(o.type==_.Transition){let l=this.visitTransition(o,t);s+=l.queryCount,i+=l.depCount,a.push(l);}else t.errors.push(Nt());}),{type:_.Trigger,name:e.name,states:r,transitions:a,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,a=i||{};s.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{je(l).forEach(u=>{a.hasOwnProperty(u)||r.add(u);});});}),r.size&&t.errors.push(Ct(e.name,[...r.values()]));}return {type:_.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=R(this,te(e.animation),t),i=Qs(e.expr,t.errors);return {type:_.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:x(e.options)}}visitSequence(e,t){return {type:_.Sequence,steps:e.steps.map(s=>R(this,s,t)),options:x(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(a=>{t.currentTime=s;let o=R(this,a,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:_.Group,steps:r,options:x(e.options)}}visitAnimate(e,t){let s=Hs(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:Le({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else {let a=e.styles,o=false;if(!a){o=true;let u={};s.easing&&(u.easing=s.easing),a=Le(u);}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(a,t);l.isEmptyStep=o,i=l;}return t.currentAnimateTimings=null,{type:_.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of i)typeof o=="string"?o===z?s.push(o):t.errors.push(Dt()):s.push(new Map(Object.entries(o)));let r=false,a=null;return s.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!r)){for(let l of o.values())if(l.toString().indexOf($e)>=0){r=true;break}}}),{type:_.Style,styles:s,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((o,l)=>{let u=t.collectedStyles.get(t.currentQuerySelector),c=u.get(l),h=true;c&&(r!=i&&r>=c.startTime&&i<=c.endTime&&(t.errors.push(Mt(l,c.startTime,c.endTime)),h=false),r=c.startTime),h&&u.set(l,{startTime:r,endTime:i}),t.options&&es(o,t.options,t.errors);});});}visitKeyframes(e,t){let s={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(kt()),s;let i=1,r=0,a=[],o=false,l=false,u=0,c=e.steps.map(w=>{let P=this._makeStyleAst(w,t),D=P.offset!=null?P.offset:Ws(P.styles),N=0;return D!=null&&(r++,N=P.offset=D),l=l||N<0||N>1,o=o||N<u,u=N,a.push(N),P});l&&t.errors.push(Ft()),o&&t.errors.push(Rt());let h=e.steps.length,S=0;r>0&&r<h?t.errors.push(Ot()):r==0&&(S=i/(h-1));let y=h-1,d=t.currentTime,g=t.currentAnimateTimings,v=g.duration;return c.forEach((w,P)=>{let D=S>0?P==y?1:S*P:a[P],N=D*v;t.currentTime=d+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=D,s.styles.push(w);}),s}visitReference(e,t){return {type:_.Reference,animation:R(this,te(e.animation),t),options:x(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:x(e.options)}}visitAnimateRef(e,t){return {type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:x(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,a]=Gs(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,F(t.collectedStyles,t.currentQuerySelector,new Map);let o=R(this,te(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:x(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Lt());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:ue(e.timings,t.errors,true);return {type:_.Stagger,animation:R(this,te(e.animation),t),timings:s,options:null}}};function Gs(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ys);return e&&(n=n.replace(Us,"")),n=n.replace(/@\*/g,le).replace(/@\w+/g,t=>le+"-"+t.slice(1)).replace(/:animating/g,Se),[n,e]}function js(n){return n?r({},n):null}var st=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e;}};function Ws(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset");}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset");}return e}function Hs(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=ue(n,e).duration;return We(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=We(0,0,"");return r.dynamic=true,r.strValue=t,r}let i=ue(t,e);return We(i.duration,i.delay,i.easing)}function x(n){return n?(n=r({},n),n.params&&(n.params=js(n.params))):n={},n}function We(n,e,t){return {duration:n,delay:e,easing:t}}function mt(n,e,t,s,i,r,a=null,o=false){return {type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:a,subTimeline:o}}var ne=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t);}has(e){return this._map.has(e)}clear(){this._map.clear();}},Ys=1,Xs=":enter",xs=new RegExp(Xs,"g"),Js=":leave",Zs=new RegExp(Js,"g");function pt(n,e,t,s,i,r=new Map,a=new Map,o,l,u=[]){return new it().buildKeyframes(n,e,t,s,i,r,a,o,l,u)}var it=class{buildKeyframes(e,t,s,i,r,a,o,l,u,c=[]){u=u||new ne;let h=new nt(e,t,u,i,r,c,[]);h.options=l;let S=l.delay?V(l.delay):0;h.currentTimeline.delayNextStep(S),h.currentTimeline.setStyles([a],null,h.errors,l),R(this,s,h);let y=h.timelines.filter(d=>d.containsAnimation());if(y.length&&o.size){let d;for(let g=y.length-1;g>=0;g--){let v=y[g];if(v.element===t){d=v;break}}d&&!d.allowOnlyTimelineStyles()&&d.setStyles([o],null,h.errors,l);}return y.length?y.map(d=>d.buildKeyframes()):[mt(t,[],[],[],0,S,"",false)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(s,i,i.options);r!=a&&t.transformIntoNewTimeline(a);}t.previousNode=e;}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e;}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let a=typeof r=="number"?r:V(se(r,i?.params??{},t.errors));s.delayNextStep(a);}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,a=s.duration!=null?V(s.duration):null,o=s.delay!=null?V(s.delay):null;return a!==0&&e.forEach(l=>{let u=t.appendInstructionToTimeline(l,a,o);r=Math.max(r,u.duration+u.delay);}),r}visitReference(e,t){t.updateOptions(e.options,true),R(this,e.animation,t),t.previousNode=e;}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==_.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ne);let a=V(r.delay);i.delayNextStep(a);}e.steps.length&&(e.steps.forEach(a=>R(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e;}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(a=>{let o=t.createSubContext(e.options);r&&o.delayNextStep(r),R(this,a,o),i=Math.max(i,o.currentTimeline.currentTime),s.push(o.currentTimeline);}),s.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(i),t.previousNode=e;}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?se(s,t.params,t.errors):s;return ue(i,t.errors)}else return {duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e;}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e;}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,o=t.createSubContext().currentTimeline;o.easing=s.easing,e.styles.forEach(l=>{let u=l.offset||0;o.forwardTime(u*r),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe();}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(i+r),t.previousNode=e;}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?V(i.delay):0;r&&(t.previousNode.type===_.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ne);let a=s,o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((u,c)=>{t.currentQueryIndex=c;let h=t.createSubContext(e.options,u);r&&h.delayNextStep(r),u===t.element&&(l=h.currentTimeline),R(this,e.animation,h),h.currentTimeline.applyStylesToKeyframe();let S=h.currentTimeline.currentTime;a=Math.max(a,S);}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e;}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),l=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case "reverse":l=o-l;break;case "full":l=s.currentStaggerTime;break}let c=t.currentTimeline;l&&c.delayNextStep(l);let h=c.currentTime;R(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-h+(i.startTime-s.currentTimeline.startTime);}},Ne={},nt=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ne;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,s,i,r,a,o,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=a,this.timelines=o,this.currentTimeline=l||new Ce(this._driver,t,0),o.push(this.currentTimeline);}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=V(s.duration)),s.delay!=null&&(i.delay=V(s.delay));let r=s.params;if(r){let a=i.params;a||(a=this.options.params={}),Object.keys(r).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=se(r[o],a,this.errors));});}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i];});}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ne,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new rt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e);}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e);}invokeQuery(e,t,s,i,r,a){let o=[];if(i&&o.push(this.element),e.length>0){e=e.replace(xs,"."+this._enterClassName),e=e.replace(Zs,"."+this._leaveClassName);let l=s!=1,u=this._driver.query(this.element,e,l);s!==0&&(u=s<0?u.slice(u.length+s,u.length):u.slice(0,s)),o.push(...u);}return !r&&o.length==0&&a.push(It()),o}},Ce=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe();}containsAnimation(){switch(this._keyframes.size){case 0:return false;case 1:return this.hasCurrentStyleProperties();default:return true}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e;}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe));}forwardFrame(){this.duration+=Ys,this._loadKeyframe();}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe();}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t});}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||z),this._currentKeyframe.set(t,z);this._currentEmptyStepKeyframe=this._currentKeyframe;}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},a=ei(e,this._globalTimelineStyles);for(let[o,l]of a){let u=se(l,r,s);this._pendingStyles.set(o,u),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??z),this._updateStyle(o,u);}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e);}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e);}));}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t);}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value);});}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((o,l)=>{let u=new Map([...this._backFill,...o]);u.forEach((c,h)=>{c===re?e.add(h):c===z&&t.add(h);}),s||u.set("offset",l/this.duration),i.push(u);});let r=[...e.values()],a=[...t.values()];if(s){let o=i[0],l=new Map(o);o.set("offset",0),l.set("offset",1),i=[o,l];}return mt(this.element,i,r,a,this.duration,this.startTime,this.easing,false)}},rt=class extends Ce{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,s,i,r,a,o=false){super(e,t,a.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing};}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],a=s+t,o=t/a,l=new Map(e[0]);l.set("offset",0),r.push(l);let u=new Map(e[0]);u.set("offset",as(o)),r.push(u);let c=e.length-1;for(let h=1;h<=c;h++){let S=new Map(e[h]),y=S.get("offset"),d=t+y*s;S.set("offset",as(d/a)),r.push(S);}s=a,t=0,i="",e=r;}return mt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,true)}};function as(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function ei(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,z);}else for(let[r,a]of i)t.set(r,a);}),t}function os(n,e,t,s,i,r,a,o,l,u,c,h,S){return {type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:a,timelines:o,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:S}}var He={},De=class{_triggerName;ast;_stateStyles;constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s;}match(e,t,s,i){return ti(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,a,o,l,u,c){let h=[],S=this.ast.options&&this.ast.options.params||He,y=o&&o.params||He,d=this.buildStyles(s,y,h),g=l&&l.params||He,v=this.buildStyles(i,g,h),w=new Set,P=new Map,D=new Map,N=i==="void",J={params:_s(g,S),delay:this.ast.options?.delay},B=c?[]:pt(e,t,this.ast.animation,r,a,d,v,J,u,h),M=0;return B.forEach(k=>{M=Math.max(k.duration+k.delay,M);}),h.length?os(t,this._triggerName,s,i,N,d,v,[],[],P,D,M,h):(B.forEach(k=>{let W=k.element,Z=F(P,W,new Set);k.preStyleProps.forEach(H=>Z.add(H));let gt=F(D,W,new Set);k.postStyleProps.forEach(H=>gt.add(H)),W!==t&&w.add(W);}),os(t,this._triggerName,s,i,N,d,v,B,[...w.values()],P,D,M))}};function ti(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function _s(n,e){let t=r({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i);}),t}var at=class{styles;defaultParams;normalizer;constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s;}buildStyles(e,t){let s=new Map,i=_s(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,o)=>{a&&(a=se(a,i,t));let l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),s.set(o,a);});}),s}};function si(n,e,t){return new ot(n,e,t)}var ot=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new at(i.style,r,s));}),ls(this.states,"true","1"),ls(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new De(e,i,this.states));}),this.fallbackTransition=ii(e,this.states);}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(a=>a.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function ii(n,e,t){let s=[(a,o)=>true],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new De(n,r,e)}function ls(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t));}var ni=new ne,lt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s;}register(e,t){let s=[],i=[],r=dt(this._driver,t,s,i);if(s.length)throw Vt();this._animations.set(e,r);}_buildPlayer(e,t,s){let i=e.element,r=qe(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],true)}create(e,t,s={}){let i=[],r=this._animations.get(e),a,o=new Map;if(r?(a=pt(this._driver,t,r,_e,ae,new Map,new Map,s,ni,i),a.forEach(c=>{let h=F(o,c.element,new Map);c.postStyleProps.forEach(S=>h.set(S,null));})):(i.push($t()),a=[]),i.length)throw Ut();o.forEach((c,h)=>{c.forEach((S,y)=>{c.set(y,this._driver.computeStyle(h,y,z));});});let l=a.map(c=>{let h=o.get(c.element);return this._buildPlayer(c,new Map,h)}),u=U(l);return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1);}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Gt();return t}listen(e,t,s,i){let r=ge(t,"","","");return pe(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let a=i[0]||{};this.create(e,t,a);return}let r=this._getPlayer(e);switch(s){case "play":r.play();break;case "pause":r.pause();break;case "reset":r.reset();break;case "restart":r.restart();break;case "finish":r.finish();break;case "init":r.init();break;case "setPosition":r.setPosition(parseFloat(i[0]));break;case "destroy":this.destroy(e);break}}},us="ng-animate-queued",ri=".ng-animate-queued",Ye="ng-animate-disabled",ai=".ng-animate-disabled",oi="ng-star-inserted",li=".ng-star-inserted",ui=[],Ss={namespaceId:"",setForRemoval:false,setForMove:false,hasAnimation:false,removedBeforeQueried:false},hi={namespaceId:"",setForMove:false,setForRemoval:false,hasAnimation:false,removedBeforeQueried:true},q="__ng_removed",ce=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=fi(i),s){let r=e,{value:a}=r,o=t$1(r,["value"]);this.options=o;}else this.options={};this.options.params||(this.options.params={});}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i]);});}}},he="void",Xe=new ce(he),ut=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this._hostClassName="ng-tns-"+e,I(t,this._hostClassName);}listen(e,t,s,i){if(!this._triggers.has(t))throw jt();if(s==null||s.length==0)throw Wt();if(!di(s))throw Ht();let r=F(this._elementListeners,e,[]),a={name:t,phase:s,callback:i};r.push(a);let o=F(this._engine.statesByElement,e,new Map);return o.has(t)||(I(e,oe),I(e,oe+"-"+t),o.set(t,Xe)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(t)||o.delete(t);});}}register(e,t){return this._triggers.has(e)?false:(this._triggers.set(e,t),true)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Yt();return t}trigger(e,t,s,i=true){let r=this._getTrigger(t),a=new fe(this.id,t,e),o=this._engine.statesByElement.get(e);o||(I(e,oe),I(e,oe+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t),u=new ce(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),o.set(t,u),l||(l=Xe),!(u.value===he)&&l.value===u.value){if(!gi(l.params,u.params)){let g=[],v=r.matchStyles(l.value,l.params,g),w=r.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{j(e,v),K(e,w);});}return}let S=F(this._engine.playersByElement,e,[]);S.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy();});let y=r.matchTransition(l.value,u.value,e,u.params),d=false;if(!y){if(!i)return;y=r.fallbackTransition,d=true;}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:u,player:a,isFallbackTransition:d}),d||(I(e,us),a.onStart(()=>{ie(e,us);})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(a);w>=0&&v.splice(w,1);}}),this.players.push(a),S.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e));});}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e));}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,le,true);s.forEach(i=>{if(i[q])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(a=>a.triggerLeaveAnimation(i,t,false,true)):this.clearElementCache(i);}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)));}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),a=new Map;if(r){let o=[];if(r.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){let c=this.trigger(e,u,he,i);c&&o.push(c);}}),o.length)return this._engine.markElementAsRemoved(this.id,e,true,t,a),s&&U(o).onDone(()=>this._engine.processLeaveNode(e)),true}return false}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let a=r.name;if(i.has(a))return;i.add(a);let l=this._triggers.get(a).fallbackTransition,u=s.get(a)||Xe,c=new ce(he),h=new fe(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:u,toState:c,player:h,isFallbackTransition:true});});}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,true))return;let i=false;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=true;else {let a=e;for(;a=a.parentNode;)if(s.statesByElement.get(a)){i=true;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,false,t);else {let r=e[q];(!r||r===Ss)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t));}}insertNode(e,t){I(e,this._hostClassName);}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,a=this._elementListeners.get(r);a&&a.forEach(o=>{if(o.name==s.triggerName){let l=ge(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,pe(s.player,o.phase,l,o.callback);}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy();}):t.push(s);}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,a=i.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e);}},ht=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t);}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s;}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s);});}),e}createNamespace(e,t){let s=new ut(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let a=false,o=this.driver.getParentElement(t);for(;o;){let l=i.get(o);if(l){let u=s.indexOf(l);s.splice(u+1,0,e),a=true;break}o=this.driver.getParentElement(o);}a||s.unshift(e);}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++;}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e];}));}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r);}}return t}trigger(e,t,s,i){if(we(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),true}return false}insertNode(e,t,s,i){if(!we(t))return;let r=t[q];if(r&&r.setForRemoval){r.setForRemoval=false,r.setForMove=true;let a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1);}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(t,s);}i&&this.collectEnterElement(t);}collectEnterElement(e){this.collectedEnterElements.push(e);}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),I(e,Ye)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ie(e,Ye));}removeNode(e,t,s){if(we(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,false,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s);}else this._onRemovalComplete(t,s);}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[q]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:false,previousTriggersValues:r};}listen(e,t,s,i,r){return we(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,le,true);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Se,true),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)));}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=true:s.destroy();});}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish());}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return U(this.players).onDone(()=>e());e();})}processLeaveNode(e){let t=e[q];if(t&&t.setForRemoval){if(e[q]=Ss,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e);}this._onRemovalComplete(e,t.setForRemoval);}e.classList?.contains(Ye)&&this.markElementAsDisabled(e,false),this.driver.query(e,ai,true).forEach(s=>{this.markElementAsDisabled(s,false);});}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;s<this.collectedEnterElements.length;s++){let i=this.collectedEnterElements[s];I(i,oi);}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let s=[];try{t=this._flushAnimations(s,e);}finally{for(let i=0;i<s.length;i++)s[i]();}}else for(let s=0;s<this.collectedLeaveElements.length;s++){let i=this.collectedLeaveElements[s];this.processLeaveNode(i);}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(s=>s()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?U(t).onDone(()=>{s.forEach(i=>i());}):s.forEach(i=>i());}}reportError(e){throw Xt()}_flushAnimations(e,t){let s=new ne,i=[],r=new Map,a=[],o=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach(f=>{c.add(f);let m=this.driver.query(f,ri,true);for(let p=0;p<m.length;p++)c.add(m[p]);});let h=this.bodyNode,S=Array.from(this.statesByElement.keys()),y=fs(S,this.collectedEnterElements),d=new Map,g=0;y.forEach((f,m)=>{let p=_e+g++;d.set(m,p),f.forEach(T=>I(T,p));});let v=[],w=new Set,P=new Set;for(let f=0;f<this.collectedLeaveElements.length;f++){let m=this.collectedLeaveElements[f],p=m[q];p&&p.setForRemoval&&(v.push(m),w.add(m),p.hasAnimation?this.driver.query(m,li,true).forEach(T=>w.add(T)):P.add(m));}let D=new Map,N=fs(S,Array.from(w));N.forEach((f,m)=>{let p=ae+g++;D.set(m,p),f.forEach(T=>I(T,p));}),e.push(()=>{y.forEach((f,m)=>{let p=d.get(m);f.forEach(T=>ie(T,p));}),N.forEach((f,m)=>{let p=D.get(m);f.forEach(T=>ie(T,p));}),v.forEach(f=>{this.processLeaveNode(f);});});let J=[],B=[];for(let f=this._namespaceList.length-1;f>=0;f--)this._namespaceList[f].drainQueuedTransitions(t).forEach(p=>{let T=p.player,A=p.element;if(J.push(T),this.collectedEnterElements.length){let C=A[q];if(C&&C.setForMove){if(C.previousTriggersValues&&C.previousTriggersValues.has(p.triggerName)){let Y=C.previousTriggersValues.get(p.triggerName),L=this.statesByElement.get(p.element);if(L&&L.has(p.triggerName)){let de=L.get(p.triggerName);de.value=Y,L.set(p.triggerName,de);}}T.destroy();return}}let Q=!h||!this.driver.containsElement(h,A),O=D.get(A),G=d.get(A),b=this._buildInstruction(p,s,G,O,Q);if(b.errors&&b.errors.length){B.push(b);return}if(Q){T.onStart(()=>j(A,b.fromStyles)),T.onDestroy(()=>K(A,b.toStyles)),i.push(T);return}if(p.isFallbackTransition){T.onStart(()=>j(A,b.fromStyles)),T.onDestroy(()=>K(A,b.toStyles)),i.push(T);return}let St=[];b.timelines.forEach(C=>{C.stretchStartingKeyframe=true,this.disabledNodes.has(C.element)||St.push(C);}),b.timelines=St,s.append(A,b.timelines);let vs={instruction:b,player:T,element:A};a.push(vs),b.queriedElements.forEach(C=>F(o,C,[]).push(T)),b.preStyleProps.forEach((C,Y)=>{if(C.size){let L=l.get(Y);L||l.set(Y,L=new Set),C.forEach((de,Oe)=>L.add(Oe));}}),b.postStyleProps.forEach((C,Y)=>{let L=u.get(Y);L||u.set(Y,L=new Set),C.forEach((de,Oe)=>L.add(Oe));});});if(B.length){let f=[];B.forEach(m=>{f.push(xt(m.triggerName,m.errors));}),J.forEach(m=>m.destroy()),this.reportError(f);}let M=new Map,k=new Map;a.forEach(f=>{let m=f.element;s.has(m)&&(k.set(m,m),this._beforeAnimationBuild(f.player.namespaceId,f.instruction,M));}),i.forEach(f=>{let m=f.element;this._getPreviousPlayers(m,false,f.namespaceId,f.triggerName,null).forEach(T=>{F(M,m,[]).push(T),T.destroy();});});let W=v.filter(f=>ds(f,l,u)),Z=new Map;cs(Z,this.driver,P,u,z).forEach(f=>{ds(f,l,u)&&W.push(f);});let H=new Map;y.forEach((f,m)=>{cs(H,this.driver,new Set(f),l,re);}),W.forEach(f=>{let m=Z.get(f),p=H.get(f);Z.set(f,new Map([...m?.entries()??[],...p?.entries()??[]]));});let Re=[],yt=[],_t={};a.forEach(f=>{let{element:m,player:p,instruction:T}=f;if(s.has(m)){if(c.has(m)){p.onDestroy(()=>K(m,T.toStyles)),p.disabled=true,p.overrideTotalTime(T.totalTime),i.push(p);return}let A=_t;if(k.size>1){let O=m,G=[];for(;O=O.parentNode;){let b=k.get(O);if(b){A=b;break}G.push(O);}G.forEach(b=>k.set(b,A));}let Q=this._buildAnimation(p.namespaceId,T,M,r,H,Z);if(p.setRealPlayer(Q),A===_t)Re.push(p);else {let O=this.playersByElement.get(A);O&&O.length&&(p.parentPlayer=U(O)),i.push(p);}}else j(m,T.fromStyles),p.onDestroy(()=>K(m,T.toStyles)),yt.push(p),c.has(m)&&i.push(p);}),yt.forEach(f=>{let m=r.get(f.element);if(m&&m.length){let p=U(m);f.setRealPlayer(p);}}),i.forEach(f=>{f.parentPlayer?f.syncPlayerEvents(f.parentPlayer):f.destroy();});for(let f=0;f<v.length;f++){let m=v[f],p=m[q];if(ie(m,ae),p&&p.hasAnimation)continue;let T=[];if(o.size){let Q=o.get(m);Q&&Q.length&&T.push(...Q);let O=this.driver.query(m,Se,true);for(let G=0;G<O.length;G++){let b=o.get(O[G]);b&&b.length&&T.push(...b);}}let A=T.filter(Q=>!Q.destroyed);A.length?mi(this,m,A):this.processLeaveNode(m);}return v.length=0,Re.forEach(f=>{this.players.push(f),f.onDone(()=>{f.destroy();let m=this.players.indexOf(f);this.players.splice(m,1);}),f.play();}),Re}afterFlush(e){this._flushFns.push(e);}afterFlushAnimationsDone(e){this._whenQuietFns.push(e);}_getPreviousPlayers(e,t,s,i,r){let a=[];if(t){let o=this.playersByQueriedElement.get(e);o&&(a=o);}else {let o=this.playersByElement.get(e);if(o){let l=!r||r==he;o.forEach(u=>{u.queued||!l&&u.triggerName!=i||a.push(u);});}}return (s||i)&&(a=a.filter(o=>!(s&&s!=o.namespaceId||i&&i!=o.triggerName))),a}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let u=l.element,c=u!==r,h=F(s,u,[]);this._getPreviousPlayers(u,c,a,o,t.toState).forEach(y=>{let d=y.getRealPlayer();d.beforeDestroy&&d.beforeDestroy(),y.destroy(),h.push(y);});}j(r,t.fromStyles);}_buildAnimation(e,t,s,i,r,a){let o=t.triggerName,l=t.element,u=[],c=new Set,h=new Set,S=t.timelines.map(d=>{let g=d.element;c.add(g);let v=g[q];if(v&&v.removedBeforeQueried)return new $(d.duration,d.delay);let w=g!==l,P=pi((s.get(g)||ui).map(M=>M.getRealPlayer())).filter(M=>{let k=M;return k.element?k.element===g:false}),D=r.get(g),N=a.get(g),J=qe(this._normalizer,d.keyframes,D,N),B=this._buildPlayer(d,J,P);if(d.subTimeline&&i&&h.add(g),w){let M=new fe(e,o,g);M.setRealPlayer(B),u.push(M);}return B});u.forEach(d=>{F(this.playersByQueriedElement,d.element,[]).push(d),d.onDone(()=>ci(this.playersByQueriedElement,d.element,d));}),c.forEach(d=>I(d,Ue));let y=U(S);return y.onDestroy(()=>{c.forEach(d=>ie(d,Ue)),K(l,t.toStyles);}),h.forEach(d=>{F(i,d,[]).push(y);}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new $(e.duration,e.delay)}},fe=class{namespaceId;triggerName;element;_player=new $;_containsRealPlayer=false;_queuedCallbacks=new Map;destroyed=false;parentPlayer=null;markedForDestroy=false;disabled=false;queued=true;totalTime=0;constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s;}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>pe(e,s,void 0,i));}),this._queuedCallbacks.clear(),this._containsRealPlayer=true,this.overrideTotalTime(e.totalTime),this.queued=false);}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e;}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy());}_queueEvent(e,t){F(this._queuedCallbacks,e,[]).push(t);}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e);}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e);}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e);}init(){this._player.init();}hasStarted(){return this.queued?false:this._player.hasStarted()}play(){!this.queued&&this._player.play();}pause(){!this.queued&&this._player.pause();}restart(){!this.queued&&this._player.restart();}finish(){this._player.finish();}destroy(){this.destroyed=true,this._player.destroy();}reset(){!this.queued&&this._player.reset();}setPosition(e){this.queued||this._player.setPosition(e);}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e);}};function ci(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1);}s.length==0&&n.delete(e);}return s}function fi(n){return n??null}function we(n){return n&&n.nodeType===1}function di(n){return n=="start"||n=="done"}function hs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function cs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(hs(l)));let a=[];s.forEach((l,u)=>{let c=new Map;l.forEach(h=>{let S=e.computeStyle(u,h,i);c.set(h,S),(!S||S.length==0)&&(u[q]=hi,a.push(u));}),n.set(u,c);});let o=0;return t.forEach(l=>hs(l,r[o++])),a}function fs(n,e){let t=new Map;if(n.forEach(o=>t.set(o,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function a(o){if(!o)return s;let l=r.get(o);if(l)return l;let u=o.parentNode;return t.has(u)?l=u:i.has(u)?l=s:l=a(u),r.set(o,l),l}return e.forEach(o=>{let l=a(o);l!==s&&t.get(l).push(o);}),t}function I(n,e){n.classList?.add(e);}function ie(n,e){n.classList?.remove(e);}function mi(n,e,t){U(t).onDone(()=>n.processLeaveNode(e));}function pi(n){let e=[];return Es(n,e),e}function Es(n,e){for(let t=0;t<n.length;t++){let s=n[t];s instanceof ee?Es(s.players,e):e.push(s);}}function gi(n,e){let t=Object.keys(n),s=Object.keys(e);if(t.length!=s.length)return false;for(let i=0;i<t.length;i++){let r=t[i];if(!e.hasOwnProperty(r)||n[r]!==e[r])return false}return true}function ds(n,e,t){let s=t.get(n);if(!s)return false;let i=e.get(n);return i?s.forEach(r=>i.add(r)):e.set(n,s),t.delete(n),true}var Me=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,s){this._driver=t,this._normalizer=s,this._transitionEngine=new ht(e.body,t,s),this._timelineEngine=new lt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r);}registerTrigger(e,t,s,i,r){let a=e+"-"+i,o=this._triggerCache[a];if(!o){let l=[],u=[],c=dt(this._driver,r,l,u);if(l.length)throw Qt();o=si(i,c,this._normalizer),this._triggerCache[a]=o;}this._transitionEngine.registerTrigger(t,i,o);}register(e,t){this._transitionEngine.register(e,t);}destroy(e,t){this._transitionEngine.destroy(e,t);}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i);}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s);}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t);}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,a]=Be(s),o=i;this._timelineEngine.command(r,t,a,o);}else this._transitionEngine.trigger(e,t,s,i);}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[a,o]=Be(s);return this._timelineEngine.listen(a,t,o,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e);}get players(){return [...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e);}};function yi(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=xe(e[0]),e.length>1&&(s=xe(e[e.length-1]))):e instanceof Map&&(t=xe(e)),t||s?new _i(n,t,s):null}var _i=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,s,i){this._element=t,this._startStyles=s,this._endStyles=i;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r=new Map),this._initialStyles=r;}start(){this._state<1&&(this._startStyles&&K(this._element,this._startStyles,this._initialStyles),this._state=1);}finish(){this.start(),this._state<2&&(K(this._element,this._initialStyles),this._endStyles&&(K(this._element,this._endStyles),this._endStyles=null),this._state=1);}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(j(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(j(this._element,this._endStyles),this._endStyles=null),K(this._element,this._initialStyles),this._state=3);}}return n})();function xe(n){let e=null;return n.forEach((t,s)=>{Si(s)&&(e=e||new Map,e.set(s,t));}),e}function Si(n){return n==="display"||n==="position"}var ke=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=false;_finished=false;_started=false;_destroyed=false;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay;}_onFinish(){this._finished||(this._finished=true,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]);}init(){this._buildPlayer()&&this._preparePlayerBeforeStart();}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=true;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let s=()=>this._onFinish();return t.addEventListener("finish",s),this.onDestroy(()=>{t.removeEventListener("finish",s);}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause();}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s));}),t}_triggerWebAnimation(e,t,s){let i=this._convertKeyframesToObject(t);try{return e.animate(i,s)}catch(r){return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e);}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e);}onDestroy(e){this._onDestroyFns.push(e);}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=true,this._specialStyles&&this._specialStyles.start()),e.play());}pause(){this.init(),this.domPlayer?.pause();}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish());}reset(){this._resetDomPlayerState(),this._destroyed=false,this._finished=false,this._started=false,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns;}_resetDomPlayerState(){this.domPlayer?.cancel();}restart(){this.reset(),this.play();}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=true,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[]);}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time);}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:Te(this.element,i));}),this.currentSnapshot=e;}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0;}},ct=class{validateStyleProperty(e){return true}validateAnimatableStyleProperty(e){return true}containsElement(e,t){return Qe(e,t)}getParentElement(e){return ye(e)}query(e,t,s){return Ve(e,t,s)}computeStyle(e,t,s){return Te(e,t)}animate(e,t,s,i,r,a=[]){let o=i==0?"both":"forwards",l={duration:s,delay:i,fill:o};r&&(l.easing=r);let u=new Map,c=a.filter(y=>y instanceof ke);ts(s,i)&&c.forEach(y=>{y.currentSnapshot.forEach((d,g)=>u.set(g,d));});let h=Zt(t).map(y=>new Map(y));h=ss(e,h,u);let S=yi(e,h);return new ke(e,h,l,S)}};function Di(n,e){return n==="noop"?new Me(e,new gs,new Ze):new Me(e,new ct,new et)}var ms=class{_driver;_animationAst;constructor(e,t){this._driver=e;let s=[],r=dt(e,t,s,[]);if(s.length)throw qt();this._animationAst=r;}buildTimelines(e,t,s,i,r){let a=Array.isArray(t)?Ge(t):t,o=Array.isArray(s)?Ge(s):s,l=[];r=r||new ne;let u=pt(this._driver,e,this._animationAst,_e,ae,a,o,i,r,l);if(l.length)throw Bt();return u}},Pe="@",Ts="@.disabled",Fe=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i;}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e);}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy();});}),this._onDestroy?.();}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,false);}insertBefore(e,t,s,i=true){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i);}removeChild(e,t,s,i){if(i){this.delegate.removeChild(e,t,s,i);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate);}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i);}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s);}addClass(e,t){this.delegate.addClass(e,t);}removeClass(e,t){this.delegate.removeClass(e,t);}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i);}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s);}setProperty(e,t,s){t.charAt(0)==Pe&&t==Ts?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s);}setValue(e,t){this.delegate.setValue(e,t);}listen(e,t,s,i){return this.delegate.listen(e,t,s,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t);}},ft=class extends Fe{factory;constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t;}setProperty(e,t,s){t.charAt(0)==Pe?t.charAt(1)=="."&&t==Ts?(s=s===void 0?true:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s);}listen(e,t,s,i){if(t.charAt(0)==Pe){let r=Ei(e),a=t.slice(1),o="";return a.charAt(0)!=Pe&&([a,o]=Ti(a)),this.engine.listen(this.namespaceId,r,a,o,l=>{let u=l._data||-1;this.factory.scheduleListenerCallback(u,s,l);})}return this.delegate.listen(e,t,s,i)}};function Ei(n){switch(n){case "body":return document.body;case "document":return document;case "window":return window;default:return n}}function Ti(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return [t,s]}var ps=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i);};}createRenderer(e,t){let i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let u=this._rendererCache,c=u.get(i);if(!c){let h=()=>u.delete(i);c=new Fe("",i,this.engine,h),u.set(i,c);}return c}let r=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let o=u=>{Array.isArray(u)?u.forEach(o):this.engine.registerTrigger(r,a,e,u.name,u);};return t.data.animation.forEach(o),new ft(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin();}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++;});}scheduleListenerCallback(e,t,s){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[a,o]=r;a(o);}),this._animationCallbacksBuffer=[];});}),i.push([t,s]);}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId);}),this.delegate.end&&this.delegate.end();}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e);}};export{is as AnimationDriver,gs as NoopAnimationDriver,ms as ɵAnimation,Me as ɵAnimationEngine,ft as ɵAnimationRenderer,ps as ɵAnimationRendererFactory,Je as ɵAnimationStyleNormalizer,Fe as ɵBaseAnimationRenderer,_e as ɵENTER_CLASSNAME,ae as ɵLEAVE_CLASSNAME,Ze as ɵNoopAnimationStyleNormalizer,fe as ɵTransitionAnimationPlayer,ct as ɵWebAnimationsDriver,ke as ɵWebAnimationsPlayer,et as ɵWebAnimationsStyleNormalizer,ts as ɵallowPreviousPlayerStylesMerge,qs as ɵcamelCaseToDashCase,Qe as ɵcontainsElement,Di as ɵcreateEngine,ye as ɵgetParentElement,Ve as ɵinvokeQuery,Zt as ɵnormalizeKeyframes,Jt as ɵvalidateStyleProperty,Fs as ɵvalidateWebAnimatableStyleProperty};
@@ -1 +0,0 @@
1
- import {ak as YE,al as uu,am as pT,C,aq as z0,bE as Gm,at as Le,as as hT,aO as Le$1,a$ as Vt,Q as QE,ax as pt,ay as Se,az as Tt,aA as Ie,bF as t4,aB as ly,aC as Z0,m as bD,B as _D,aJ as ut,F as LD,f as _i,bG as ec,g as Kc,E as VD,a4 as Mh,x as ch,p as gI,aK as nh,h as gh,l as lh,aL as el,v as vw,aM as tl,P as Ph,G as Pu,I as Lu,bH as fh}from'./main-BRWQ5RNE.js';function X(n,i){n&1&&fh(0);}function $(n,i){if(n&1&&nh(0,X,1,0,"ng-container",7),n&2){let e=VD(3);ch("nzStringTemplateOutlet",e.nzIcon);}}function nn(n,i){if(n&1&&lh(0,"nz-icon",6),n&2){let e=VD(3);ch("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme);}}function en(n,i){if(n&1&&(_i(0,"div",2),bD(1,$,1,1,"ng-container")(2,nn,1,2,"nz-icon",6),Kc()),n&2){let e=VD(2);gI(),_D(e.nzIcon?1:2);}}function tn(n,i){if(n&1&&(el(0),vw(1),tl()),n&2){let e=VD(4);gI(),Ph(e.nzMessage);}}function on(n,i){if(n&1&&(_i(0,"span",8),nh(1,tn,2,1,"ng-container",7),Kc()),n&2){let e=VD(3);gI(),ch("nzStringTemplateOutlet",e.nzMessage);}}function an(n,i){if(n&1&&(el(0),vw(1),tl()),n&2){let e=VD(4);gI(),Ph(e.nzDescription);}}function rn(n,i){if(n&1&&(_i(0,"span",9),nh(1,an,2,1,"ng-container",7),Kc()),n&2){let e=VD(3);gI(),ch("nzStringTemplateOutlet",e.nzDescription);}}function ln(n,i){if(n&1&&(_i(0,"div",3),bD(1,on,2,1,"span",8),bD(2,rn,2,1,"span",9),Kc()),n&2){let e=VD(2);gI(),_D(e.nzMessage?1:-1),gI(),_D(e.nzDescription?2:-1);}}function cn(n,i){if(n&1&&(el(0),vw(1),tl()),n&2){let e=VD(3);gI(),Ph(e.nzAction);}}function sn(n,i){if(n&1&&(_i(0,"div",4),nh(1,cn,2,1,"ng-container",7),Kc()),n&2){let e=VD(2);gI(),ch("nzStringTemplateOutlet",e.nzAction);}}function dn(n,i){if(n&1&&(el(0),_i(1,"span",12),vw(2),Kc(),tl()),n&2){let e=VD(4);gI(2),Ph(e.nzCloseText);}}function mn(n,i){if(n&1&&nh(0,dn,3,1,"ng-container",7),n&2){let e=VD(3);ch("nzStringTemplateOutlet",e.nzCloseText);}}function pn(n,i){n&1&&lh(0,"nz-icon",11);}function _n(n,i){if(n&1){let e=LD();_i(0,"button",10),gh("click",function(){Pu(e);let z=VD(2);return Lu(z.closeAlert())}),bD(1,mn,1,1,"ng-container")(2,pn,1,0,"nz-icon",11),Kc();}if(n&2){let e=VD(2);gI(),_D(e.nzCloseText?1:2);}}function zn(n,i){if(n&1){let e=LD();_i(0,"div",1),ec(function(z){Pu(e);let T=VD();return Lu(T.onLeaveAnimationDone(z))}),bD(1,en,3,1,"div",2),bD(2,ln,3,2,"div",3),bD(3,sn,2,1,"div",4),bD(4,_n,3,1,"button",5),Kc();}if(n&2){let e=VD();Mh("ant-alert-rtl",e.dir()==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),ch("nzNoAnimation",e.nzNoAnimation),gI(),_D(e.nzShowIcon?1:-1),gI(),_D(e.nzMessage||e.nzDescription?2:-1),gI(),_D(e.nzAction?3:-1),gI(),_D(e.nzCloseable||e.nzCloseText?4:-1);}}var Z="alert",un=(()=>{let n,i=[],e=[],_,z=[],T=[];return class D{static{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[ut()],_=[ut()],pT(null,null,n,{kind:"field",name:"nzCloseable",static:false,private:false,access:{has:t=>"nzCloseable"in t,get:t=>t.nzCloseable,set:(t,l)=>{t.nzCloseable=l;}},metadata:r},i,e),pT(null,null,_,{kind:"field",name:"nzShowIcon",static:false,private:false,access:{has:t=>"nzShowIcon"in t,get:t=>t.nzShowIcon,set:(t,l)=>{t.nzShowIcon=l;}},metadata:r},z,T),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:r});}cdr=C(z0);animationType=C(Gm,{optional:true});dir=C(Le).valueSignal;_nzModuleName=Z;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=hT(this,i,false);nzShowIcon=(hT(this,e),hT(this,z,false));nzBanner=(hT(this,T),false);nzNoAnimation=false;nzIcon=null;nzOnClose=new Le$1;closed=false;iconTheme="fill";inferredIconType="info-circle";isTypeSet=false;isShowIconSet=false;constructor(){Vt(Z,()=>this.cdr.markForCheck());}closeAlert(){this.closed=true,(this.nzNoAnimation||this.animationType==="NoopAnimations")&&this.nzOnClose.emit(true);}onLeaveAnimationDone(r){let t=r.target;if(this.nzNoAnimation||this.animationType==="NoopAnimations"){r.animationComplete();return}t.classList.add("ant-alert-motion-leave","ant-alert-motion-leave-active");let l=()=>{t.removeEventListener("transitionend",l),this.nzOnClose.emit(true),r.animationComplete();};t.addEventListener("transitionend",l);}ngOnChanges(r){let{nzShowIcon:t,nzDescription:l,nzType:J,nzBanner:K}=r;if(t&&(this.isShowIconSet=true),J)switch(this.isTypeSet=true,this.nzType){case "error":this.inferredIconType="close-circle";break;case "success":this.inferredIconType="check-circle";break;case "info":this.inferredIconType="info-circle";break;case "warning":this.inferredIconType="exclamation-circle";break}l&&(this.iconTheme=this.nzDescription?"outline":"fill"),K&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=true));}static \u0275fac=function(t){return new(t||D)};static \u0275cmp=QE({type:D,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",Z0],nzShowIcon:[2,"nzShowIcon","nzShowIcon",Z0],nzBanner:[2,"nzBanner","nzBanner",Z0],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",Z0],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[ly],decls:1,vars:1,consts:[[1,"ant-alert",3,"nzNoAnimation","ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert",3,"nzNoAnimation"],[1,"ant-alert-icon"],[1,"ant-alert-content"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon"],[3,"nzType","nzTheme"],[4,"nzStringTemplateOutlet"],[1,"ant-alert-message"],[1,"ant-alert-description"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],["nzType","close"],[1,"ant-alert-close-text"]],template:function(t,l){t&1&&bD(0,zn,5,23,"div",0),t&2&&_D(l.closed?-1:0);},dependencies:[pt,Se,Tt,Ie,t4],encapsulation:2})}})(),Gn=(()=>{class n{static \u0275fac=function(_){return new(_||n)};static \u0275mod=YE({type:n});static \u0275inj=uu({imports:[un]})}return n})();export{Gn as G,un as u};
@@ -1 +0,0 @@
1
- import {q as qo,H as Hw,a8 as a,i as ie}from'./main-BRWQ5RNE.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};
@@ -1 +0,0 @@
1
- import {T}from'./chunk-f1UVptf5.js';import {S as Sk,a as vx,u as uk,I as Ie$1}from'./chunk-DdVQ8Ilm.js';import {C,a as ae,T as Ie,af as u,b as at,V as Ve,aY as O,aZ as de,ai as Se,q as qo,H as Hw,u as ue$1,r,o,Q as QE,M as Mi,n as n8,aj as S4,J as J6,k as k3,L as Ln,c as sd,z as zc,d as t7,Z as y7,$ as $b,e as V5,D as D5,K as Kt,f as _i,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,E as VD,F as LD,j as oE,N as ND,y as sE,A as xD,S as SD,l as lh,G as Pu,I as Lu}from'./main-BRWQ5RNE.js';import {J,K}from'./chunk-DE9IK0Os.js';import {U}from'./chunk-BWr0M-hk.js';import'./chunk-WzBVBHEz.js';var me=(t,s)=>s.id;function ue(t,s){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function he(t,s){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function fe(t,s){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=s.$implicit;gI(),Ph(e);}}function ge(t,s){if(t&1&&(_i(0,"section",7)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,fe,2,1,"li",null,SD),Kc()()),t&2){let e=VD(2);gI(2),Ph(Ow(3,1,"shortcuts.editor.validation")),gI(3),xD(e.validationErrors());}}function _e(t,s){if(t&1&&lh(0,"nz-option",11),t&2){let e=s.$implicit;ch("nzValue",e.id)("nzLabel",e.name);}}function we(t,s){if(t&1){let e=LD();_i(0,"app-workflow-input-form",13),gh("valuesChange",function(i){Pu(e);let u=VD(2);return Lu(u.setInputValues(i))}),Kc();}if(t&2){let e=VD(2);ch("fields",s.inputSchema)("values",e.inputValues());}}function ve(t,s){if(t&1){let e=LD();bD(0,ge,7,3,"section",7),_i(1,"label",8)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"input",9),gh("ngModelChange",function(i){Pu(e);let u=VD();return Lu(u.name.set(i))}),Kc(),oE(),Kc(),_i(6,"div",8)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i(10,"nz-select",10),gh("ngModelChange",function(i){Pu(e);let u=VD();return Lu(u.onWorkflowChange(i))}),ND(11,_e,1,2,"nz-option",11,me),Kc(),oE(),Kc(),bD(13,we,1,2,"app-workflow-input-form",12);}if(t&2){let e,o=VD();_D(o.validationErrors().length>0?0:-1),gI(3),Ph(Ow(4,6,"shortcuts.editor.name")),gI(2),ch("ngModel",o.name()),sE(),gI(3),Ph(Ow(9,8,"shortcuts.editor.workflow")),gI(2),ch("ngModel",o.workflowId()),sE(),gI(),xD(o.eligibleWorkflows()),gI(2),_D((e=o.selectedWorkflow())?13:-1,e);}}function Ce(t){let s=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),e=crypto.randomUUID().slice(0,8);return s.length>0?`sc-${s}-${e}`:`sc-${e}`}var He=(()=>{class t{constructor(){this.route=C(ae),this.router=C(Ie),this.shortcutsApi=C(u),this.workflowsApi=C(U),this.message=C(Sk),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.name=qo(""),this.workflowId=qo(""),this.workflows=qo([]),this.inputValues=qo({}),this.lastJobId=qo(void 0),this.loadError=qo(null),this.validationErrors=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("shortcuts.editor.titleNew"):this.transloco.translate("shortcuts.editor.titleEdit",{id:this.routeId()}))),this.eligibleWorkflows=Hw(()=>this.workflows().filter(e=>e.appliesTo==="none"&&e.subjectHandling==="per-subject")),this.selectedWorkflow=Hw(()=>this.eligibleWorkflows().find(e=>e.id===this.workflowId())??null),this.workflowsApi.list().pipe(ue$1(this.destroyRef)).subscribe({next:e=>this.workflows.set(e),error:e=>{this.workflows.set([]),this.message.error(this.errorMessage(e,this.transloco.translate("shortcuts.editor.loadFailed")));}}),this.route.paramMap.pipe(ue$1(this.destroyRef)).subscribe(e=>{let o=e.get("id");if(this.validationErrors.set([]),this.loadError.set(null),!o){this.name.set(""),this.workflowId.set(""),this.inputValues.set({}),this.lastJobId.set(void 0),this.loading.set(false);return}this.loading.set(true),this.shortcutsApi.get(o).subscribe({next:i=>{this.name.set(i.name),this.workflowId.set(i.workflowId),this.inputValues.set(i.inputValues),this.lastJobId.set(i.lastJobId),this.loading.set(false);},error:i=>{this.loading.set(false),this.loadError.set(this.errorMessage(i,this.transloco.translate("shortcuts.editor.loadFailed")));}});});}onWorkflowChange(e){this.workflowId.set(e);let o=this.eligibleWorkflows().find(i=>i.id===e);this.inputValues.set(J(o?.inputSchema??[]));}setInputValues(e){this.inputValues.set(e);}save(){let e=this.routeId(),o=r({id:e??Ce(this.name()),name:this.name().trim(),workflowId:this.workflowId(),inputValues:this.inputValues()},this.lastJobId()?{lastJobId:this.lastJobId()}:{}),i=vx.safeParse(o);if(!i.success){this.validationErrors.set(T(i.error));return}this.validationErrors.set([]),this.saving.set(true),(this.isNew()||!e?this.shortcutsApi.create(i.data):this.shortcutsApi.update(e,i.data)).subscribe({next:M=>{this.saving.set(false),this.message.success(this.transloco.translate(this.isNew()?"shortcuts.editor.created":"shortcuts.editor.saved")),this.isNew()&&this.router.navigate(["/shortcuts",M.id,"edit"]);},error:M=>{this.saving.set(false),this.message.error(this.errorMessage(M,this.transloco.translate("shortcuts.editor.saveFailed")));}});}errorMessage(e,o$1){return e instanceof o||e instanceof Error?e.message:o$1}static{this.\u0275fac=function(o){return new(o||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-shortcut-editor"]],decls:15,vars:10,consts:[["data-testid","shortcut-editor",1,"editor"],[1,"header"],[1,"header-actions"],["routerLink","/shortcuts"],["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"],[1,"field"],["nz-input","","data-testid","shortcut-name",3,"ngModelChange","ngModel"],["data-testid","shortcut-workflow",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[3,"fields","values"],[3,"valuesChange","fields","values"]],template:function(o,i){o&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Kc()(),_i(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"button",4),gh("click",function(){return i.save()}),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,ue,3,3,"p",5)(13,he,2,1,"p",6)(14,ve,14,10),Kc()),o&2&&(gI(4),Ph(i.pageTitle()),gI(3),Ph(Ow(8,6,"shortcuts.editor.backToList")),gI(2),ch("nzLoading",i.saving())("disabled",i.loading()||!!i.loadError()),gI(),nl(" ",Ow(11,8,"common.save")," "),gI(2),_D(i.loading()?12:i.loadError()?13:14));},dependencies:[Mi,n8,S4,J6,k3,Ln,sd,zc,t7,y7,uk,Ie$1,$b,V5,D5,K,Kt],styles:[".editor[_ngcontent-%COMP%]{max-width:40rem;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}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.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 t})();export{He as ShortcutEditorComponent};
@@ -1 +0,0 @@
1
- import {C,bB as Zi,a8 as a,bD as u,bC as E,i as ie}from'./main-BRWQ5RNE.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};
@@ -1 +0,0 @@
1
- import {J,K as K$1}from'./chunk-DE9IK0Os.js';import {U}from'./chunk-BWr0M-hk.js';import {C,U as U$1,T as Ie,V as Ve,a as ae,q as qo,H as Hw,s,r,o,Q as QE,M as Mi,L as Ln,K as Kt,f as _i,v as vw,R as Rw,g as Kc,m as bD,h as gh,N as ND,p as gI,P as Ph,O as Ow,B as _D,w as nl,x as ch,A as xD,E as VD,W as Lh,F as LD,G as Pu,I as Lu}from'./main-BRWQ5RNE.js';var L=(t,p)=>p.id;function $(t,p){if(t&1&&(_i(0,"p",3),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function z(t,p){if(t&1&&(_i(0,"option",6),vw(1),Kc()),t&2){let e=p.$implicit;ch("value",e.id),gI(),Lh("",e.name," (",e.id,")");}}function H(t,p){if(t&1){let e=LD();_i(0,"label"),vw(1),Rw(2,"transloco"),_i(3,"input",10),Rw(4,"transloco"),gh("input",function(o){Pu(e);let s=VD(2);return Lu(s.setSubjectId(o))}),Kc()();}if(t&2){let e=VD(2);gI(),nl(" ",Ow(2,3,"jobs.start.subjectId")," "),gI(2),ch("value",e.subjectId())("placeholder",Ow(4,5,"jobs.start.subjectIdPlaceholder"));}}function G(t,p){if(t&1){let e=LD();bD(0,H,5,7,"label"),_i(1,"app-workflow-input-form",9),gh("valuesChange",function(o){Pu(e);let s=VD();return Lu(s.inputValues.set(o))}),Kc();}if(t&2){let e=VD();_D(e.needsSubjectId()?0:-1),gI(),ch("fields",p.inputSchema)("values",e.inputValues());}}function K(t,p){if(t&1&&(_i(0,"p",8),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.actionError());}}var re=(()=>{class t{constructor(){this.workflowsApi=C(U),this.jobsApi=C(U$1),this.router=C(Ie),this.transloco=C(Ve),this.route=C(ae),this.workflows=qo([]),this.selectedWorkflowId=qo(""),this.subjectId=qo(""),this.inputValues=qo({}),this.loadError=qo(null),this.actionError=qo(null),this.starting=qo(false),this.selectedWorkflow=Hw(()=>this.workflows().find(e=>e.id===this.selectedWorkflowId())??null),this.needsSubjectId=Hw(()=>{let e=this.selectedWorkflow();return e!=null&&e.appliesTo!=="none"}),this.workflowsApi.list({subjectHandling:"per-subject"}).subscribe({next:e=>{this.workflows.set(e);let n=this.route.snapshot.queryParamMap.get("workflowId"),o=n&&e.some(C=>C.id===n)?n:e[0]?.id;o&&this.selectWorkflow(o);let s=this.route.snapshot.queryParamMap.get("subjectId");s&&this.subjectId.set(s);},error:e=>{this.loadError.set(this.errorMessage(e,this.transloco.translate("jobs.errors.loadWorkflows")));}});}selectWorkflow(e){this.selectedWorkflowId.set(e);let n=this.workflows().find(o=>o.id===e);this.inputValues.set(J(n?.inputSchema??[])),this.actionError.set(null);}onWorkflowChange(e){let n=e.target.value;this.selectWorkflow(n);}setSubjectId(e){this.subjectId.set(e.target.value);}start(){let e=this.selectedWorkflow();if(e){if(this.needsSubjectId()&&!this.subjectId().trim()){this.actionError.set(this.transloco.translate("jobs.errors.subjectIdRequired"));return}this.actionError.set(null),this.starting.set(true),this.jobsApi.start(s(r({workflowId:e.id},this.needsSubjectId()?{subjectId:this.subjectId().trim()}:{}),{inputValues:r({},this.inputValues())})).subscribe({next:n=>{this.starting.set(false),this.router.navigate(["/jobs",n.id]);},error:n=>{this.starting.set(false),this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.startFailed")));}});}}errorMessage(e,n){return e instanceof o||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-runner"]],decls:26,vars:23,consts:[[1,"runner"],["routerLink","/jobs"],[1,"lede"],["data-testid","load-error",1,"error"],["data-testid","start-form",1,"panel"],["data-testid","workflow-select",3,"change","value"],[3,"value"],["data-testid","start-button","type","button",3,"click","disabled"],["data-testid","action-error",1,"error"],[3,"valuesChange","fields","values"],["data-testid","subject-id","type","text",3,"input","value","placeholder"]],template:function(n,o){if(n&1&&(_i(0,"main",0)(1,"a",1),vw(2),Rw(3,"transloco"),Kc(),_i(4,"h1"),vw(5),Rw(6,"transloco"),Kc(),_i(7,"p",2),vw(8),Rw(9,"transloco"),Kc(),bD(10,$,2,1,"p",3),_i(11,"section",4)(12,"h2"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"label"),vw(16),Rw(17,"transloco"),_i(18,"select",5),gh("change",function(C){return o.onWorkflowChange(C)}),ND(19,z,2,3,"option",6,L),Kc()(),bD(21,G,2,3),_i(22,"button",7),gh("click",function(){return o.start()}),vw(23),Rw(24,"transloco"),Kc()(),bD(25,K,2,1,"p",8),Kc()),n&2){let s;gI(2),Ph(Ow(3,11,"jobs.detail.backToStart")),gI(3),Ph(Ow(6,13,"jobs.title")),gI(3),Ph(Ow(9,15,"jobs.lede")),gI(2),_D(o.loadError()?10:-1),gI(3),Ph(Ow(14,17,"jobs.start.heading")),gI(3),nl(" ",Ow(17,19,"jobs.start.workflow")," "),gI(2),ch("value",o.selectedWorkflowId()),gI(),xD(o.workflows()),gI(2),_D((s=o.selectedWorkflow())?21:-1,s),gI(),ch("disabled",o.starting()),gI(),nl(" ",Ow(24,21,o.starting()?"jobs.start.starting":"jobs.start.button")," "),gI(2),_D(o.actionError()?25:-1);}},dependencies:[Mi,Ln,K$1,Kt],styles:[".runner[_ngcontent-%COMP%]{max-width:52rem;margin:0 auto;padding:1.5rem;color:#1c1917;line-height:1.45}.lede[_ngcontent-%COMP%]{color:#57534e}.panel[_ngcontent-%COMP%]{margin-top:1.25rem;padding:1rem 0;border-top:1px solid #d6d3d1}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}button[_ngcontent-%COMP%]{font:inherit;margin-top:.5rem;padding:.45rem .9rem;border:1px solid #44403c;background:#f5f5f4;cursor:pointer}button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{re as JobRunnerComponent};
@@ -1 +0,0 @@
1
- import {_ as _n,C as Cn}from'./chunk-DNtWpE65.js';import {C,ae as U,af as u,V as Ve,b as at,q as qo,u as ue,a9 as Ng,o,Q as QE,M as Mi,L as Ln,c as sd,z as zc,d 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,N as ND,x as ch,A as xD,F as LD,h as gh,a5 as ah,G as Pu,I as Lu}from'./main-BRWQ5RNE.js';import {U as U$1}from'./chunk-BWr0M-hk.js';import {W,I}from'./chunk-BmSmqIC7.js';import {A as Ad,H as Hl,$ as $d,a as Al,V as Vd,b as Ai,X as Xl}from'./chunk-CYX8w88D.js';import'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.js';function Z(t,p){return [...t.map(i=>({type:"view",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:i.subjectType})),...p.map(i=>({type:"shortcut",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:null}))].sort((i,c)=>i.name.localeCompare(c.name))}var ee=(t,p)=>p.type+p.id;function te(t,p){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ie(t,p){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function ne(t,p){if(t&1&&(_i(0,"p",7),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.deleteError());}}function oe(t,p){t&1&&(_i(0,"section",8)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",2)(5,"a",10),vw(6),Rw(7,"transloco"),Kc(),_i(8,"a",11),vw(9),Rw(10,"transloco"),Kc()()()),t&2&&(gI(2),Ph(Ow(3,3,"manage.views.emptyState")),gI(4),nl(" ",Ow(7,5,"manage.views.createView")," "),gI(3),nl(" ",Ow(10,7,"manage.views.createShortcut")," "));}function ae(t,p){if(t&1&&(vw(0),Rw(1,"transloco")),t&2){let e=VD().$implicit,i=VD(3);nl(" ",Ow(1,1,i.subjectTypeKey(e.subjectType))," ");}}function re(t,p){t&1&&(vw(0),Rw(1,"transloco")),t&2&&nl(" ",Ow(1,1,"manage.views.noSubjectType")," ");}function se(t,p){if(t&1){let e=LD();_i(0,"tr")(1,"td"),vw(2),Kc(),_i(3,"td")(4,"nz-tag"),vw(5),Rw(6,"transloco"),Kc()(),_i(7,"td"),vw(8),Kc(),_i(9,"td"),bD(10,ae,2,3)(11,re,2,3),Kc(),_i(12,"td",12)(13,"a",13),vw(14),Rw(15,"transloco"),Kc(),_i(16,"button",14),Rw(17,"transloco"),Rw(18,"transloco"),Rw(19,"transloco"),gh("nzOnConfirm",function(){let c=Pu(e).$implicit,v=VD(3);return Lu(v.deleteItem(c))}),vw(20),Rw(21,"transloco"),Kc()()();}if(t&2){let e=p.$implicit,i=VD(3);ah("data-testid","item-"+e.type+"-"+e.id),gI(),ah("data-testid","name-"+e.type+"-"+e.id),gI(),Ph(e.name),gI(2),ah("data-testid","type-"+e.type+"-"+e.id),gI(),Ph(Ow(6,17,i.typeKey(e.type))),gI(2),ah("data-testid","workflow-"+e.type+"-"+e.id),gI(),nl(" ",i.workflowName(e)," "),gI(),ah("data-testid","subject-type-"+e.type+"-"+e.id),gI(),_D(e.subjectType?10:11),gI(3),ch("routerLink",i.editLink(e)),ah("data-testid","edit-"+e.type+"-"+e.id),gI(),nl(" ",Ow(15,19,"manage.views.edit")," "),gI(2),ch("nzPopconfirmTitle",Ow(17,21,i.deleteConfirmKey(e)))("nzOkText",Ow(18,23,"manage.views.delete"))("nzCancelText",Ow(19,25,"common.cancel")),ah("data-testid","delete-"+e.type+"-"+e.id),gI(4),nl(" ",Ow(21,27,"manage.views.delete")," ");}}function de(t,p){if(t&1&&(_i(0,"nz-table",9)(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,"tbody"),ND(19,se,22,29,"tr",null,ee),Kc()()),t&2){let e=VD(2);ch("nzData",e.items())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Ph(Ow(5,8,"manage.views.column.name")),gI(3),Ph(Ow(8,10,"manage.views.column.type")),gI(3),Ph(Ow(11,12,"manage.views.column.workflow")),gI(3),Ph(Ow(14,14,"manage.views.column.subjectType")),gI(3),Ph(Ow(17,16,"manage.views.column.actions")),gI(3),xD(e.items());}}function pe(t,p){if(t&1&&(bD(0,ne,2,1,"p",7),bD(1,oe,11,9,"section",8)(2,de,21,18,"nz-table",9)),t&2){let e=VD();_D(e.deleteError()?0:-1),gI(),_D(e.items().length===0?1:2);}}var Ne=(()=>{class t{constructor(){this.viewsApi=C(U),this.shortcutsApi=C(u),this.workflowsApi=C(U$1),this.transloco=C(Ve),this.destroyRef=C(at),this.items=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.load();}typeKey(e){return `manage.views.type.${e}`}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}workflowName(e){return this.workflows().find(i=>i.id===e.workflowId)?.name??e.workflowId}editLink(e){return e.type==="view"?["/views",e.id,"edit"]:["/shortcuts",e.id,"edit"]}deleteConfirmKey(e){return e.type==="view"?"manage.views.deleteConfirmView":"manage.views.deleteConfirmShortcut"}deleteItem(e){this.deleteError.set(null),(e.type==="view"?this.viewsApi.delete(e.id):this.shortcutsApi.delete(e.id)).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.items.update(c=>c.filter(v=>!(v.type===e.type&&v.id===e.id)));},error:c=>{this.deleteError.set(this.errorMessage(c,this.transloco.translate("manage.views.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({views:this.viewsApi.list(),shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({views:e,shortcuts:i,workflows:c})=>{this.items.set(Z(e,i)),this.workflows.set(c),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("manage.views.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-views-and-shortcuts-manage"]],decls:15,vars:10,consts:[["data-testid","views-shortcuts-manage",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","managed-items",3,"nzData","nzFrontPagination","nzShowPagination"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","empty-create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","empty-create-shortcut"],[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,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"a",4),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,te,3,3,"p",5)(13,ie,2,1,"p",6)(14,pe,3,2),Kc()),i&2&&(gI(3),Ph(Ow(4,4,"manage.views.title")),gI(4),nl(" ",Ow(8,6,"manage.views.createView")," "),gI(3),nl(" ",Ow(11,8,"manage.views.createShortcut")," "),gI(2),_D(c.loading()?12:c.loadError()?13:14));},dependencies:[Mi,Ln,sd,zc,t7,_n,Cn,Ad,Hl,$d,Al,Vd,Ai,Xl,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;flex-wrap:wrap;gap:.5rem;justify-content:center}.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}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{Ne as ViewsAndShortcutsManageComponent};
@@ -1 +0,0 @@
1
- import {W,I}from'./chunk-BmSmqIC7.js';import {A as Ad,H as Hl,$ as $d,a as Al,V as Vd,b as Ai,X as Xl}from'./chunk-CYX8w88D.js';import {C,U as U$1,b as at,a0 as $0,q as qo,X as rd,Y as Bw,a9 as Ng,aa as Xi,ab as Dg,u as ue,Q as QE,M as Mi,L as Ln,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}from'./main-BRWQ5RNE.js';var q=new Set(["completed","failed","cancelled"]);function G(e){return q.has(e)}function et(e){let o=e.stepHistory.find(t=>t.status==="running");if(o)return o;if((e.status==="waiting_for_human"||e.status==="waiting_for_children")&&e.currentStepExecutionId){let t=e.stepHistory.find(n=>n.id===e.currentStepExecutionId);if(t)return t}return G(e.status)&&e.stepHistory.length>0?e.stepHistory[e.stepHistory.length-1]??null:null}function it(e,o){let t=new Map;for(let n of o)t.set(n.stepDefinitionId,n);return e.map(n=>{let d=t.get(n.id)??null;return {definition:n,execution:d,reached:d!=null}})}function U(e){if(!e)return null;if(e.mode==="single"){let t=e.subject;return `${t.id} \xB7 ${t.title}`}let o=e.subjects.length;if(o===0)return null;if(o===1){let t=e.subjects[0];return `${t.id} \xB7 ${t.title}`}return `${o} subjects`}var Q=e=>["/jobs",e],V=(e,o)=>o.id;function X(e,o){e&1&&(_i(0,"p",0),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Y(e,o){if(e&1&&(_i(0,"p",1),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.loadError());}}function Z(e,o){if(e&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()()()),e&2){let t=o.$implicit,n=VD(2);ah("data-testid","job-row-"+t.id),gI(2),ch("routerLink",xw(14,Q,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,12,n.statusKey(t.status))),gI(3),ah("data-testid","job-subject-"+t.id),gI(),Ph(n.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");}}function tt(e,o){if(e&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,"tbody"),ND(19,Z,17,16,"tr",null,V),Kc()()),e&2){let t=VD();ch("nzData",t.displayJobs())("nzFrontPagination",false)("nzShowPagination",false)("nzSize","middle"),gI(4),Ph(Ow(5,9,"jobs.table.column.id")),gI(3),Ph(Ow(8,11,"jobs.table.column.status")),gI(3),Ph(Ow(11,13,"jobs.table.column.subject")),gI(3),Ph(Ow(14,15,"jobs.table.column.started")),gI(3),Ph(Ow(17,17,"jobs.table.column.completed")),gI(3),xD(t.displayJobs());}}var vt=(()=>{class e{constructor(){this.jobsApi=C(U$1),this.destroyRef=C(at),this.jobs=$0(null),this.jobIds=$0([]),this.loaded=qo([]),this.loading=qo(false),this.loadError=qo(null),rd(()=>{let t=this.jobs(),n=this.jobIds();if(t!=null){Bw(()=>{this.loaded.set([]),this.loading.set(false),this.loadError.set(null);});return}if(n.length===0){Bw(()=>{this.loaded.set([]),this.loading.set(false);});return}Bw(()=>{this.loading.set(true),this.loadError.set(null),Ng(n.map(d=>this.jobsApi.get(d).pipe(Xi(()=>Dg(null))))).pipe(ue(this.destroyRef)).subscribe({next:d=>{this.loaded.set(d.filter(W=>W!=null)),this.loading.set(false);},error:()=>{this.loading.set(false),this.loadError.set("Failed to load jobs");}});});});}displayJobs(){let t=this.jobs();return t??this.loaded()}statusKey(t){return `jobs.status.${t}`}subjectText(t){return U(t.subjectContext)??"\u2014"}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275cmp=QE({type:e,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"]],template:function(n,d){n&1&&bD(0,X,3,3,"p",0)(1,Y,2,1,"p",1)(2,tt,21,19,"nz-table",2),n&2&&_D(d.loading()&&d.jobs()==null?0:d.loadError()?1:2);},dependencies:[Mi,Ln,Ad,Hl,$d,Al,Vd,Ai,Xl,W,I,Kt],styles:[".error[_ngcontent-%COMP%]{color:#9f1239}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return e})();export{G,U,et as e,it as i,vt as v};
@@ -1,5 +0,0 @@
1
- import {T}from'./chunk-f1UVptf5.js';import {$ as $$1,B}from'./chunk-Cwf9CcBI.js';import {S as Sk,p as px,D as Dx,j as jx,e as ex,u as uk,I as Ie$2}from'./chunk-DdVQ8Ilm.js';import {C,a as ae,T as Ie$1,ae as U,ag as $,b as at,V as Ve$1,aY as O$1,aZ as de,ai as Se$1,q as qo,H as Hw,u as ue,s,r,o,Q as QE,M as Mi,n as n8,aj as S4,J as J6,k as k3,L as Ln,c as sd,z as zc,d as t7,Z as y7,$ as $b,e as V5,D as D5,K as Kt,f as _i,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,E as VD,F as LD,j as oE,N as ND,y as sE,A as xD,S as SD,l as lh,G as Pu,I as Lu,a4 as Mh,a5 as ah,a6 as Nw}from'./main-BRWQ5RNE.js';import {U as U$1}from'./chunk-BWr0M-hk.js';import'./chunk-WzBVBHEz.js';var be=()=>[],O=(t,a)=>a.id,Me=(t,a)=>a.name;function Ie(t,a){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ee(t,a){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Ve(t,a){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=a.$implicit;gI(),Ph(e);}}function ze(t,a){if(t&1&&(_i(0,"section",7)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,Ve,2,1,"li",null,SD),Kc()()),t&2){let e=VD(2);gI(2),Ph(Ow(3,1,"views.editor.validation")),gI(3),xD(e.validationErrors());}}function ke(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name);}}function Pe(t,a){t&1&&(_i(0,"p",13),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"views.editor.noEligibleInstances")," "));}function Se(t,a){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"views.editor.instanceNeeded")," "));}function Ne(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function qe(t,a){if(t&1){let e=LD();_i(0,"div",15),bD(1,Se,3,3,"p",16),_i(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"nz-select",17),Rw(6,"transloco"),gh("ngModelChange",function(n){Pu(e);let s=VD(3);return Lu(s.onInstanceChange(n))}),ND(7,Ne,1,2,"nz-option",11,O),Kc(),oE(),Kc();}if(t&2){let e=VD(3);Mh("field-attention",e.needsInstanceAttention()),gI(),_D(e.needsInstanceAttention()?1:-1),gI(2),Ph(Ow(4,6,"views.editor.instance")),gI(2),ch("nzPlaceHolder",Ow(6,8,"views.editor.instancePlaceholder"))("ngModel",e.providerInstanceId()),sE(),gI(2),xD(e.eligibleInstances());}}function De(t,a){if(t&1&&bD(0,Pe,3,3,"p",13)(1,qe,9,10,"div",14),t&2){let e=VD(2);_D(e.eligibleInstances().length===0?0:1);}}function Ae(t,a){if(t&1){let e=LD();_i(0,"div",12)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",18)(5,"button",19),gh("click",function(){Pu(e);let n=VD(2);return Lu(n.setQueryMode("template"))}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"button",20),gh("click",function(){Pu(e);let n=VD(2);return Lu(n.setQueryMode("raw"))}),vw(9),Rw(10,"transloco"),Kc()()();}if(t&2){let e=VD(2);gI(2),Ph(Ow(3,5,"views.editor.queryMode")),gI(3),ch("nzType",e.queryMode()==="template"?"primary":"default"),gI(),nl(" ",Ow(7,7,"views.editor.queryMode.template")," "),gI(2),ch("nzType",e.queryMode()==="raw"?"primary":"default"),gI(),nl(" ",Ow(10,9,"views.editor.queryMode.raw")," ");}}function Fe(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.label);}}function je(t,a){t&1&&(_i(0,"span",22),vw(1,"*"),Kc());}function Oe(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e)("nzLabel",e);}}function Be(t,a){if(t&1){let e=LD();_i(0,"nz-select",25),gh("ngModelChange",function(n){Pu(e);let s=VD().$implicit,g=VD(4);return Lu(g.setTemplateParam(s.name,n))}),ND(1,Oe,1,2,"nz-option",11,SD),Kc(),oE();}if(t&2){let e=VD().$implicit,i=VD(4);ch("ngModel",i.templateParamValue(e.name)),ah("data-testid","template-param-"+e.name),sE(),gI(),xD(e.options??Nw(2,be));}}function $e(t,a){if(t&1){let e=LD();_i(0,"input",26),gh("ngModelChange",function(n){Pu(e);let s=VD().$implicit,g=VD(4);return Lu(g.setTemplateParam(s.name,n))}),Kc(),oE();}if(t&2){let e=VD().$implicit,i=VD(4);ch("ngModel",i.templateParamValue(e.name)),ah("data-testid","template-param-"+e.name),sE();}}function Le(t,a){if(t&1&&(_i(0,"label",8)(1,"span"),vw(2),bD(3,je,2,0,"span",22),Kc(),bD(4,Be,3,3,"nz-select",23)(5,$e,1,2,"input",24),Kc()),t&2){let e=a.$implicit;gI(2),nl(" ",e.label," "),gI(),_D(e.required?3:-1),gI(),_D(e.type==="select"?4:5);}}function We(t,a){t&1&&ND(0,Le,6,3,"label",8,Me),t&2&&xD(a.params);}function Re(t,a){if(t&1){let e=LD();_i(0,"div",8)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",21),gh("ngModelChange",function(n){Pu(e);let s=VD(2);return Lu(s.selectTemplate(n))}),ND(5,Fe,1,2,"nz-option",11,O),Kc(),oE(),Kc(),bD(7,We,2,0);}if(t&2){let e,i=VD(2);gI(2),Ph(Ow(3,3,"views.editor.template")),gI(2),ch("ngModel",i.selectedTemplateId()),sE(),gI(),xD(i.templates()),gI(2),_D((e=i.selectedTemplate())?7:-1,e);}}function Je(t,a){if(t&1){let e=LD();_i(0,"label",8)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"textarea",27),gh("ngModelChange",function(n){Pu(e);let s=VD(2);return Lu(s.queryText.set(n))}),Kc(),oE(),_i(5,"span",28),vw(6),Rw(7,"transloco"),Kc()();}if(t&2){let e=VD(2);gI(2),Ph(Ow(3,3,"views.editor.query")),gI(2),ch("ngModel",e.queryText()),sE(),gI(2),Ph(Ow(7,5,"views.editor.queryHint"));}}function Qe(t,a){if(t&1){let e=LD();bD(0,ze,7,3,"section",7),_i(1,"label",8)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"input",9),gh("ngModelChange",function(n){Pu(e);let s=VD();return Lu(s.name.set(n))}),Kc(),oE(),Kc(),_i(6,"div",8)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i(10,"nz-select",10),gh("ngModelChange",function(n){Pu(e);let s=VD();return Lu(s.onWorkflowChange(n))}),ND(11,ke,1,2,"nz-option",11,O),Kc(),oE(),Kc(),bD(13,De,2,1),bD(14,Ae,11,11,"div",12),bD(15,Re,8,5)(16,Je,8,7,"label",8);}if(t&2){let e=VD();_D(e.validationErrors().length>0?0:-1),gI(3),Ph(Ow(4,8,"views.editor.name")),gI(2),ch("ngModel",e.name()),sE(),gI(3),Ph(Ow(9,10,"views.editor.workflow")),gI(2),ch("ngModel",e.workflowId()),sE(),gI(),xD(e.bindableWorkflows()),gI(2),_D(e.selectedWorkflow()&&e.settings()?13:-1),gI(),_D(e.hasTemplates()?14:-1),gI(),_D(e.queryMode()==="template"&&e.hasTemplates()?15:16);}}function Ue(t){let a=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),e=crypto.randomUUID().slice(0,8);return a.length>0?`${a}-${e}`:`view-${e}`}function Te(t){let a={};for(let e of t.params)a[e.name]=e.type==="select"?e.options?.[0]??"":"";return a}function He(t){let a=t?.trim()??"";return a.length>0?a:null}var bt=(()=>{class t{constructor(){this.route=C(ae),this.router=C(Ie$1),this.viewsApi=C(U),this.workflowsApi=C(U$1),this.settingsApi=C($),this.providersApi=C($$1),this.message=C(Sk),this.destroyRef=C(at),this.transloco=C(Ve$1),this.language=C(O$1),this.routeId=de(this.route.paramMap.pipe(Se$1(e=>e.get("id"))),{initialValue:this.route.snapshot.paramMap.get("id")}),this.name=qo(""),this.workflowId=qo(""),this.providerInstanceId=qo(null),this.workflows=qo([]),this.subjectType=qo(null),this.queryText=qo(`{
2
-
3
- }`),this.queryMode=qo("template"),this.templates=qo([]),this.selectedTemplateId=qo(null),this.templateParams=qo({}),this.settings=qo(null),this.loadError=qo(null),this.validationErrors=qo([]),this.saving=qo(false),this.loading=qo(true),this.bindableWorkflows=Hw(()=>this.workflows().filter(e=>e.appliesTo!=="none")),this.selectedWorkflow=Hw(()=>this.bindableWorkflows().find(e=>e.id===this.workflowId())??null),this.subjectTypeOptions=Hw(()=>px(this.selectedWorkflow()?.appliesTo??"none")),this.eligibleInstances=Hw(()=>B(this.settings(),this.subjectTypeOptions())),this.selectedInstance=Hw(()=>this.eligibleInstances().find(e=>e.id===this.providerInstanceId())??null),this.needsInstanceAttention=Hw(()=>this.selectedWorkflow()!=null&&this.settings()!=null&&this.eligibleInstances().length>0&&this.selectedInstance()==null),this.isNew=Hw(()=>!this.routeId()),this.pageTitle=Hw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("views.editor.titleNew"):this.transloco.translate("views.editor.titleEdit",{id:this.routeId()}))),this.selectedTemplate=Hw(()=>this.templates().find(e=>e.id===this.selectedTemplateId())??null),this.hasTemplates=Hw(()=>this.templates().length>0),this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.workflows.set(e),error:e=>{this.workflows.set([]),this.message.error(this.errorMessage(e,this.transloco.translate("views.editor.loadFailed")));}}),this.settingsApi.getSettings().pipe(ue(this.destroyRef)).subscribe({next:e=>{this.settings.set(e),this.refreshTemplates();},error:e=>{this.settings.set(Dx),this.refreshTemplates(),this.message.error(this.errorMessage(e,this.transloco.translate("views.editor.loadFailed")));}}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(e=>{let i=e.get("id");if(this.validationErrors.set([]),this.loadError.set(null),this.pendingProvenance=void 0,!i){this.name.set(""),this.workflowId.set(""),this.providerInstanceId.set(null),this.subjectType.set(null),this.queryText.set(`{
4
-
5
- }`),this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({}),this.loading.set(false),this.refreshTemplates();return}this.loading.set(true),this.viewsApi.get(i).subscribe({next:n=>{this.name.set(n.name),this.workflowId.set(n.workflowId),this.providerInstanceId.set(He(n.providerInstanceId)),this.subjectType.set(n.subjectType),this.queryText.set(JSON.stringify(n.query,null,2)),this.pendingProvenance=n.queryTemplate,this.queryMode.set(n.queryTemplate?"template":"raw"),this.loading.set(false),this.refreshTemplates();},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,this.transloco.translate("views.editor.loadFailed")));}});});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}onWorkflowChange(e){this.workflowId.set(e);let i=px(this.bindableWorkflows().find(s=>s.id===e)?.appliesTo??"none");this.pendingProvenance=void 0,this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({});let n=B(this.settings(),i);if(n.length===1)this.applyInstance(n[0]);else {let s=this.providerInstanceId(),g=n.find(S=>S.id===s);g?this.applyInstance(g):(this.providerInstanceId.set(null),this.subjectType.set(null));}this.refreshTemplates();}onInstanceChange(e){let i=this.eligibleInstances().find(n=>n.id===e);this.pendingProvenance=void 0,this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({}),i&&this.applyInstance(i),this.refreshTemplates();}applyInstance(e){this.providerInstanceId.set(e.id),jx(e)&&this.subjectType.set(e.subjectType);}setQueryMode(e){this.queryMode.set(e),e==="template"&&!this.selectedTemplateId()&&this.templates()[0]&&this.selectTemplate(this.templates()[0].id);}selectTemplate(e){let i=this.templates().find(n=>n.id===e);this.selectedTemplateId.set(e),this.templateParams.set(i?Te(i):{});}templateParamValue(e){let i=this.templateParams()[e];return i==null?"":String(i)}setTemplateParam(e,i){this.templateParams.set(s(r({},this.templateParams()),{[e]:i}));}save(){if(!this.selectedInstance()){this.validationErrors.set([this.transloco.translate("views.editor.pickInstance")]);return}if(this.queryMode()==="template"&&this.hasTemplates()){this.saveFromTemplate();return}this.saveFromRawJson();}saveFromTemplate(){let e=this.selectedTemplate(),i=this.providerInstanceId();if(!e||!i){this.validationErrors.set([this.transloco.translate("views.editor.pickTemplate")]);return}let n=e.params.filter(s=>{if(!s.required)return false;let g=this.templateParams()[s.name];return g==null||String(g).trim()===""});if(n.length>0){this.validationErrors.set(n.map(s=>this.transloco.translate("views.editor.missingParam",{label:s.label})));return}this.validationErrors.set([]),this.saving.set(true),this.providersApi.resolveQueryTemplate(i,e.id,this.templateParams()).subscribe({next:s=>{this.persist({query:s.query,queryTemplate:{templateId:e.id,params:this.templateParams()}});},error:s=>{this.saving.set(false),this.message.error(this.errorMessage(s,this.transloco.translate("views.editor.resolveFailed")));}});}saveFromRawJson(){let e;try{e=JSON.parse(this.queryText());}catch(i){this.validationErrors.set([this.transloco.translate("views.editor.invalidJson")]);return}if(e===null||typeof e!="object"||Array.isArray(e)){this.validationErrors.set([this.transloco.translate("views.editor.invalidJson")]);return}this.persist({query:e});}persist(e){let i=this.routeId(),n=this.subjectType(),s=r({id:i??Ue(this.name()),name:this.name().trim(),subjectType:n??"",providerInstanceId:this.providerInstanceId()??"",workflowId:this.workflowId(),query:e.query},e.queryTemplate?{queryTemplate:e.queryTemplate}:{}),g=ex.safeParse(s);if(!g.success){this.saving.set(false),this.validationErrors.set(T(g.error));return}this.validationErrors.set([]),this.saving.set(true);let S=g.data;(this.isNew()||!i?this.viewsApi.create(S):this.viewsApi.update(i,S)).subscribe({next:q=>{this.saving.set(false),this.message.success(this.transloco.translate(this.isNew()?"views.editor.created":"views.editor.saved")),this.isNew()&&this.router.navigate(["/views",q.id,"edit"]);},error:q=>{this.saving.set(false),this.message.error(this.errorMessage(q,this.transloco.translate("views.editor.saveFailed")));}});}refreshTemplates(){let e=this.providerInstanceId();if(!e){this.templates.set([]),this.applyLoadedTemplates([]);return}this.providersApi.listQueryTemplates(e).subscribe({next:i=>{this.templates.set(i),this.applyLoadedTemplates(i);},error:()=>{this.templates.set([]),this.applyLoadedTemplates([]);}});}applyLoadedTemplates(e){let i=this.pendingProvenance;if(i){let n=e.find(s=>s.id===i.templateId);n?(this.queryMode.set("template"),this.selectedTemplateId.set(n.id),this.templateParams.set(r(r({},Te(n)),i.params))):(this.queryMode.set("raw"),this.selectedTemplateId.set(null)),this.pendingProvenance=void 0;return}if(this.queryMode()!=="raw"){if(e.length===0){this.queryMode.set("raw"),this.selectedTemplateId.set(null),this.templateParams.set({});return}e.some(n=>n.id===this.selectedTemplateId())||this.selectTemplate(e[0].id);}}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-view-editor"]],decls:15,vars:10,consts:[["data-testid","view-editor",1,"editor"],[1,"header"],[1,"header-actions"],["routerLink","/views"],["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"],[1,"field"],["nz-input","","data-testid","view-name",3,"ngModelChange","ngModel"],["data-testid","view-workflow",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","query-mode-toggle",1,"field"],["data-testid","view-instance-empty",1,"error"],["data-testid","view-instance-field",1,"field",3,"field-attention"],["data-testid","view-instance-field",1,"field"],["data-testid","view-instance-needed",1,"attention"],["data-testid","view-instance",3,"ngModelChange","nzPlaceHolder","ngModel"],[1,"mode-toggle"],["nz-button","","type","button","data-testid","query-mode-template",3,"click","nzType"],["nz-button","","type","button","data-testid","query-mode-raw",3,"click","nzType"],["data-testid","view-template",3,"ngModelChange","ngModel"],[1,"required"],[3,"ngModel"],["nz-input","",3,"ngModel"],[3,"ngModelChange","ngModel"],["nz-input","",3,"ngModelChange","ngModel"],["nz-input","","rows","8","data-testid","view-query",3,"ngModelChange","ngModel"],[1,"hint"]],template:function(i,n){i&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Kc()(),_i(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"button",4),gh("click",function(){return n.save()}),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,Ie,3,3,"p",5)(13,Ee,2,1,"p",6)(14,Qe,17,12),Kc()),i&2&&(gI(4),Ph(n.pageTitle()),gI(3),Ph(Ow(8,6,"views.editor.backToList")),gI(2),ch("nzLoading",n.saving())("disabled",n.loading()||!!n.loadError()),gI(),nl(" ",Ow(11,8,"common.save")," "),gI(2),_D(n.loading()?12:n.loadError()?13:14));},dependencies:[Mi,n8,S4,J6,k3,Ln,sd,zc,t7,y7,uk,Ie$2,$b,V5,D5,Kt],styles:[".editor[_ngcontent-%COMP%]{max-width:40rem;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}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#78716c}.field-attention[_ngcontent-%COMP%]{border:1px solid #f59e0b;background:#fffbeb;padding:.75rem 1rem;border-radius:.35rem}.attention[_ngcontent-%COMP%]{margin:0;color:#b45309;font-size:.85rem}.mode-toggle[_ngcontent-%COMP%]{display:flex;gap:.5rem}.required[_ngcontent-%COMP%]{color:#9f1239}.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}textarea[_ngcontent-%COMP%]{font-family:ui-monospace,Consolas,monospace}"]});}}return t})();export{bt as ViewEditorComponent};
@@ -1 +0,0 @@
1
- import {U as U$1}from'./chunk-BWr0M-hk.js';import {v as vt}from'./chunk-C-T2O6LE.js';import'./chunk-BmSmqIC7.js';import {S as Si,s as sn}from'./chunk-CYX8w88D.js';import {F as Fe,o as oe}from'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.js';import {C,U,a as ae,V as Ve,b as at$1,q as qo,H as Hw,u as ue,s,r,o,Q as QE,M as Mi,n as n8,J as J6,k as k3,L as Ln,c as sd,z as zc,d as t7,$ as $b,e as V5,D as D5,K as Kt,f as _i,v as vw,R as Rw,g as Kc,h as gh,j as oE,l as lh,N as ND,m as bD,S as SD,p as gI,P as Ph,O as Ow,w as nl,x as ch,y as sE,A as xD,B as _D,E as VD,F as LD,G as Pu,I as Lu}from'./main-BRWQ5RNE.js';var st=(e,d)=>d.id;function lt(e,d){if(e&1&&lh(0,"nz-option",10),e&2){let t=d.$implicit;ch("nzValue",t.id)("nzLabel",t.name+" ("+t.id+")");}}function at(e,d){e&1&&(_i(0,"p",11),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function dt(e,d){if(e&1&&(_i(0,"p",12),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.runningError());}}function pt(e,d){e&1&&(_i(0,"p",13),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.runningEmpty")," "));}function ht(e,d){if(e&1&&lh(0,"app-job-status-table",14),e&2){let t=VD();ch("jobs",t.runningJobs());}}function gt(e,d){if(e&1&&(lh(0,"nz-option",10),Rw(1,"transloco"),Rw(2,"transloco")),e&2){let t=d.$implicit,s=VD();ch("nzValue",t)("nzLabel",t==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,s.statusKey(t)));}}function mt(e,d){if(e&1&&lh(0,"nz-option",10),e&2){let t=d.$implicit;ch("nzValue",t.id)("nzLabel",t.name+" ("+t.id+")");}}function ct(e,d){e&1&&(_i(0,"p",18),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ut(e,d){if(e&1&&(_i(0,"p",19),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.historyError());}}function ft(e,d){e&1&&(_i(0,"p",20),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.historyEmpty")," "));}function yt(e,d){if(e&1){let t=LD();_i(0,"nz-pagination",22),gh("nzPageIndexChange",function(n){Pu(t);let c=VD(2);return Lu(c.setHistoryPage(n))}),Kc();}if(e&2){let t=VD(2);ch("nzPageIndex",t.historyPageIndex())("nzPageSize",t.pageSize)("nzTotal",t.historyTotal());}}function bt(e,d){if(e&1&&(lh(0,"app-job-status-table",14),bD(1,yt,1,3,"nz-pagination",21)),e&2){let t=VD();ch("jobs",t.historyJobs()),gI(),_D(t.historyTotal()>t.pageSize||t.historyPageIndex()>1?1:-1);}}var _t=20,Ct=50,xt=3e3,rt=["completed","failed","cancelled"],Vt=(()=>{class e{constructor(){this.jobsApi=C(U),this.workflowsApi=C(U$1),this.route=C(ae),this.transloco=C(Ve),this.destroyRef=C(at$1),this.pageSize=_t,this.historyStatusOptions=["all",...rt],this.runningJobs=qo([]),this.historyJobs=qo([]),this.workflows=qo([]),this.runningLoading=qo(true),this.historyLoading=qo(true),this.runningError=qo(null),this.historyError=qo(null),this.runningWorkflowId=qo(""),this.historyWorkflowId=qo(""),this.historyStatusFilter=qo("all"),this.showChildJobs=qo(false),this.historyPageIndex=qo(1),this.polling=qo(false),this.historyTotal=Hw(()=>{let t=(this.historyPageIndex()-1)*this.pageSize,s=this.historyJobs().length;return s<this.pageSize?t+s:t+s+1}),this.pollHandle=null,this.onVisibility=()=>{if(document.hidden){this.stopPolling();return}this.loadRunning({silent:true}),this.loadHistory({silent:true}),this.startPolling();},this.destroyRef.onDestroy(()=>{this.stopPolling(),document.removeEventListener("visibilitychange",this.onVisibility);}),this.loadWorkflows(),this.route.queryParamMap.pipe(ue(this.destroyRef)).subscribe(t=>{let s=t.get("status");s&&rt.includes(s)?this.historyStatusFilter.set(s):this.historyStatusFilter.set("all"),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}),document.addEventListener("visibilitychange",this.onVisibility),this.startPolling();}statusKey(t){return `jobs.status.${t}`}isPolling(){return this.polling()}setHistoryStatusFilter(t){this.historyStatusFilter.set(t),this.historyPageIndex.set(1),this.loadHistory();}setRunningWorkflowId(t){this.runningWorkflowId.set(t),this.loadRunning();}setHistoryWorkflowId(t){this.historyWorkflowId.set(t),this.historyPageIndex.set(1),this.loadHistory();}setShowChildJobs(t){this.showChildJobs.set(t),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}setHistoryPage(t){this.historyPageIndex.set(t),this.loadHistory();}loadWorkflows(){this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:t=>{this.workflows.set(t);},error:()=>{this.workflows.set([]);}});}loadRunning(t={}){let s$1=this.runningWorkflowId();t.silent||(this.runningLoading.set(true),this.runningError.set(null)),this.jobsApi.list(s(r({terminal:false,topLevelOnly:!this.showChildJobs()},s$1?{workflowId:s$1}:{}),{limit:Ct,offset:0})).pipe(ue(this.destroyRef)).subscribe({next:n=>{this.runningJobs.set(n),this.runningLoading.set(false);},error:n=>{this.runningLoading.set(false),!t.silent&&this.runningError.set(this.errorMessage(n,this.transloco.translate("jobs.list.loadFailed")));}});}loadHistory(t={}){let s$1=this.historyStatusFilter(),n=this.historyWorkflowId();t.silent||(this.historyLoading.set(true),this.historyError.set(null)),this.jobsApi.list(s(r(r({terminal:true,topLevelOnly:!this.showChildJobs()},s$1==="all"?{}:{status:s$1}),n?{workflowId:n}:{}),{limit:this.pageSize,offset:(this.historyPageIndex()-1)*this.pageSize})).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.historyJobs.set(c),this.historyLoading.set(false);},error:c=>{this.historyLoading.set(false),!t.silent&&this.historyError.set(this.errorMessage(c,this.transloco.translate("jobs.list.loadFailed")));}});}startPolling(){this.pollHandle!=null||document.hidden||(this.pollHandle=setInterval(()=>{this.loadRunning({silent:true}),this.loadHistory({silent:true});},xt),this.polling.set(true));}stopPolling(){this.pollHandle!=null&&(clearInterval(this.pollHandle),this.pollHandle=null),this.polling.set(false);}errorMessage(t,s){return t instanceof o||t instanceof Error?t.message:s}static{this.\u0275fac=function(s){return new(s||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-job-list"]],decls:56,vars:36,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","start-job"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","jobs-running",1,"section"],[1,"section-header"],[1,"filters"],[1,"field"],["data-testid","running-workflow-filter",3,"ngModelChange","ngModel"],["nzValue","",3,"nzLabel"],[3,"nzValue","nzLabel"],["data-testid","running-loading"],["data-testid","running-error",1,"error"],["data-testid","running-empty",1,"section-empty"],[3,"jobs"],["data-testid","jobs-history",1,"section","section-history"],["data-testid","history-status-filter",3,"ngModelChange","ngModel"],["data-testid","history-workflow-filter",3,"ngModelChange","ngModel"],["data-testid","history-loading"],["data-testid","history-error",1,"error"],["data-testid","history-empty",1,"section-empty"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(s,n){s&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()(),_i(8,"label",3),gh("ngModelChange",function(y){return n.setShowChildJobs(y)}),vw(9),Rw(10,"transloco"),Kc(),oE(),_i(11,"section",4)(12,"header",5)(13,"h2"),vw(14),Rw(15,"transloco"),Kc()(),_i(16,"div",6)(17,"div",7)(18,"span"),vw(19),Rw(20,"transloco"),Kc(),_i(21,"nz-select",8),gh("ngModelChange",function(y){return n.setRunningWorkflowId(y)}),lh(22,"nz-option",9),Rw(23,"transloco"),ND(24,lt,1,2,"nz-option",10,st),Kc(),oE(),Kc()(),bD(26,at,3,3,"p",11)(27,dt,2,1,"p",12)(28,pt,3,3,"p",13)(29,ht,1,1,"app-job-status-table",14),Kc(),_i(30,"section",15)(31,"header",5)(32,"h2"),vw(33),Rw(34,"transloco"),Kc()(),_i(35,"div",6)(36,"div",7)(37,"span"),vw(38),Rw(39,"transloco"),Kc(),_i(40,"nz-select",16),gh("ngModelChange",function(y){return n.setHistoryStatusFilter(y)}),ND(41,gt,3,6,"nz-option",10,SD),Kc(),oE(),Kc(),_i(43,"div",7)(44,"span"),vw(45),Rw(46,"transloco"),Kc(),_i(47,"nz-select",17),gh("ngModelChange",function(y){return n.setHistoryWorkflowId(y)}),lh(48,"nz-option",9),Rw(49,"transloco"),ND(50,mt,1,2,"nz-option",10,st),Kc(),oE(),Kc()(),bD(52,ct,3,3,"p",18)(53,ut,2,1,"p",19)(54,ft,3,3,"p",20)(55,bt,2,2),Kc()()),s&2&&(gI(3),Ph(Ow(4,16,"jobs.list.title")),gI(3),nl(" ",Ow(7,18,"jobs.list.startButton")," "),gI(2),ch("ngModel",n.showChildJobs()),sE(),gI(),nl(" ",Ow(10,20,"jobs.list.showChildJobs")," "),gI(5),Ph(Ow(15,22,"jobs.list.running")),gI(5),Ph(Ow(20,24,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.runningWorkflowId()),sE(),gI(),ch("nzLabel",Ow(23,26,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),_D(n.runningLoading()?26:n.runningError()?27:n.runningJobs().length===0?28:29),gI(7),Ph(Ow(34,28,"jobs.list.history")),gI(5),Ph(Ow(39,30,"jobs.list.filterByStatus")),gI(2),ch("ngModel",n.historyStatusFilter()),sE(),gI(),xD(n.historyStatusOptions),gI(4),Ph(Ow(46,32,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.historyWorkflowId()),sE(),gI(),ch("nzLabel",Ow(49,34,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),_D(n.historyLoading()?52:n.historyError()?53:n.historyJobs().length===0?54:55));},dependencies:[Mi,n8,J6,k3,Ln,sd,zc,t7,Fe,oe,Si,sn,$b,V5,D5,vt,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[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.child-toggle[_ngcontent-%COMP%]{align-self:flex-start}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-history[_ngcontent-%COMP%]{padding-top:1.25rem;border-top:1px solid #e7e5e4}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem 1.25rem;align-items:flex-end}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:12rem;max-width:18rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.section-empty[_ngcontent-%COMP%]{margin:0;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return e})();export{_t as JOB_LIST_PAGE_SIZE,Ct as JOB_RUNNING_LIMIT,xt as JOB_RUNNING_POLL_MS,Vt as JobListComponent,rt as TERMINAL_JOB_STATUSES};
@@ -1 +0,0 @@
1
- import {ak as YE,al as uu,C,ap as oe$1,ao as _r,aq as z0,ar as a3,at as Le,b as at,cH as A,ba as ga,aO as Le$1,X as rd,u as ue$1,av as St,Q as QE,n as n8,cZ as w0,J as J6,k as k3,aC as Z0,aR as BD,f as _i,h as gh,g as Kc,j as oE,l as lh,aS as $D,a4 as Mh,p as gI,x as ch,a5 as ah,y as sE,aD as Sw,aE as h1,aF as wo,aG as Ih,aH as qD,aI as WD,a0 as $0,q as qo,bd as Uw,H as Hw,bi as Kf,Y as Bw,N as ND,E as VD,A as xD,v as vw,w as nl}from'./main-BRWQ5RNE.js';var re=["inputElement"],te=["*"],ae=(t,s)=>s.value;function ce(t,s){if(t&1&&(_i(0,"label",0),vw(1),Kc()),t&2){let e=s.$implicit,i=VD(2);ch("nzValue",e.value)("nzName",i.nzName())("nzDisabled",e.disabled||i.finalDisabled()),gI(),nl(" ",e.label," ");}}function le(t,s){if(t&1&&ND(0,ce,2,4,"label",0,ae),t&2){let e=VD();xD(e.normalizedOptions());}}var ie=new A(""),oe=(()=>{class t{ngZone=C(oe$1);elementRef=C(_r);cdr=C(z0);focusMonitor=C(a3);dir=C(Le).valueSignal;destroyRef=C(at);checkboxGroupComponent=C(ie,{optional:true});nzFormStatusService=C(ga,{optional:true});isNzDisableFirstChange=true;onChange=()=>{};onTouched=()=>{};inputElement;nzCheckedChange=new Le$1;nzValue=null;nzAutoFocus=false;nzDisabled=false;nzIndeterminate=false;nzChecked=false;nzId=null;nzName=null;innerCheckedChange(e){!this.nzDisabled&&!this.checkboxGroupComponent?.finalDisabled()&&(this.setValue(e),this.checkboxGroupComponent?.onCheckedChange(this.nzValue,e));}writeValue(e){this.nzChecked=e,this.cdr.markForCheck();}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=false,this.cdr.markForCheck();}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard");}blur(){this.inputElement.nativeElement.blur();}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.checkboxGroupComponent&&rd(()=>{let e=this.checkboxGroupComponent.value()||[];this.setValue(e.includes(this.nzValue)),this.cdr.markForCheck();});}ngOnInit(){this.focusMonitor.monitor(this.elementRef,true).pipe(ue$1(this.destroyRef)).subscribe(e=>{e||Promise.resolve().then(()=>this.onTouched());}),St(this.elementRef.nativeElement,"click").pipe(ue$1(this.destroyRef)).subscribe(e=>{e.preventDefault(),this.focus(),!this.nzDisabled&&this.ngZone.run(()=>{this.innerCheckedChange(!this.nzChecked),this.cdr.markForCheck();});}),St(this.inputElement.nativeElement,"click").pipe(ue$1(this.destroyRef)).subscribe(e=>e.stopPropagation());}ngAfterViewInit(){this.nzAutoFocus&&this.focus();}setValue(e){this.nzChecked=e,this.onChange(e),this.nzCheckedChange.emit(e);}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["","nz-checkbox",""]],viewQuery:function(i,n){if(i&1&&Ih(re,7),i&2){let r;qD(r=WD())&&(n.inputElement=r.first);}},hostAttrs:[1,"ant-checkbox-wrapper"],hostVars:10,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-item",!!n.checkboxGroupComponent)("ant-checkbox-wrapper-in-form-item",!!n.nzFormStatusService)("ant-checkbox-wrapper-checked",n.nzChecked)("ant-checkbox-wrapper-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-rtl",n.dir()==="rtl");},inputs:{nzValue:"nzValue",nzAutoFocus:[2,"nzAutoFocus","nzAutoFocus",Z0],nzDisabled:[2,"nzDisabled","nzDisabled",Z0],nzIndeterminate:[2,"nzIndeterminate","nzIndeterminate",Z0],nzChecked:[2,"nzChecked","nzChecked",Z0],nzId:"nzId",nzName:"nzName"},outputs:{nzCheckedChange:"nzCheckedChange"},exportAs:["nzCheckbox"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true}])],ngContentSelectors:te,decls:6,vars:12,consts:[["inputElement",""],[1,"ant-checkbox"],["type","checkbox",1,"ant-checkbox-input",3,"ngModelChange","checked","ngModel","disabled"],[1,"ant-checkbox-inner"]],template:function(i,n){i&1&&(BD(),_i(0,"span",1)(1,"input",2,0),gh("ngModelChange",function(se){return n.innerCheckedChange(se)}),Kc(),oE(),lh(3,"span",3),Kc(),_i(4,"span"),$D(5),Kc()),i&2&&(Mh("ant-checkbox-checked",n.nzChecked&&!n.nzIndeterminate)("ant-checkbox-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-indeterminate",n.nzIndeterminate),gI(),ch("checked",n.nzChecked)("ngModel",n.nzChecked)("disabled",n.nzDisabled||(n.checkboxGroupComponent?.finalDisabled()??false)),ah("autofocus",n.nzAutoFocus?"autofocus":null)("id",n.nzId)("name",n.nzName||n.checkboxGroupComponent?.nzName()),sE());},dependencies:[n8,w0,J6,k3],encapsulation:2})}return t})(),ue=(()=>{class t{onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;dir=C(Le).valueSignal;nzName=$0(null);nzDisabled=$0(false,{transform:Z0});nzOptions=$0([]);value=qo(null);finalDisabled=Uw(()=>this.nzDisabled());normalizedOptions=Hw(()=>de(this.nzOptions()));constructor(){let e=C(_r),i=C(a3),n=C(at);Kf(()=>{i.monitor(e,true).pipe(ue$1(n)).subscribe(r=>{r||this.onTouched();}),n.onDestroy(()=>{i.stopMonitoring(e);});});}writeValue(e){Bw(()=>{this.value.set(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;}onCheckedChange(e,i){this.finalDisabled()||(this.value.update(n=>i?n?.concat(e)||[e]:n?.filter(r=>r!==e)||[]),this.onChange(this.value()));}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["nz-checkbox-group"]],hostAttrs:[1,"ant-checkbox-group"],hostVars:2,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-rtl",n.dir()==="rtl");},inputs:{nzName:[1,"nzName"],nzDisabled:[1,"nzDisabled"],nzOptions:[1,"nzOptions"]},exportAs:["nzCheckboxGroup"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true},{provide:ie,useExisting:wo(()=>t)}])],ngContentSelectors:te,decls:2,vars:0,consts:[["nz-checkbox","",3,"nzValue","nzName","nzDisabled"]],template:function(i,n){i&1&&(BD(),$D(0,0,null,le,2,0));},dependencies:[oe],encapsulation:2})}return t})();function de(t){return t.map(s=>typeof s=="string"||typeof s=="number"?{label:`${s}`,value:s}:s)}var Fe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[oe,ue]})}return t})();export{Fe as F,oe as o};
@@ -1 +0,0 @@
1
- import {C,bB as Zi,a8 as a,bD as u,bC as E,i as ie}from'./main-BRWQ5RNE.js';var U=(()=>{class r{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/batches`;}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())}jobs(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/jobs`).pipe(E())}launch(t){return this.http.post(this.baseUrl,t).pipe(E())}static{this.\u0275fac=function(a){return new(a||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
@@ -1 +0,0 @@
1
- import {_ as _n}from'./chunk-DNtWpE65.js';import {w as we}from'./chunk-D32ZkSz4.js';import {C,af as u,U as U$1,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,c as sd,z as zc,d 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-BRWQ5RNE.js';import {U}from'./chunk-BWr0M-hk.js';import'./chunk-CYX8w88D.js';import'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.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(U$1),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,sd,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};
@@ -1 +0,0 @@
1
- import {U}from'./chunk-C4yhGGeB.js';import {f}from'./chunk-BFYi_kYd.js';import {v as vt}from'./chunk-C-T2O6LE.js';import {W,I}from'./chunk-BmSmqIC7.js';import'./chunk-CYX8w88D.js';import'./chunk-C3wpjxgW.js';import'./chunk-WzBVBHEz.js';import {C,a as ae,U as U$1,V as Ve,b as at,q as qo,u as ue,X as rd,Y as Bw,o,Q as QE,M as Mi,L as Ln,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}from'./main-BRWQ5RNE.js';var z=i=>({count:i});function F(i,h){i&1&&(_i(0,"p",1),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function K(i,h){if(i&1&&(_i(0,"p",2),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function L(i,h){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()()()(),_i(21,"section",11)(22,"h2"),vw(23),Rw(24,"transloco"),Kc(),lh(25,"app-job-status-table",12),Kc()),i&2){let t=h,e=VD();gI(3),Ph(Ow(4,8,"batches.detail.backHint")),gI(3),Ph(t.id),gI(3),Ph(Ow(10,10,e.statusKey(t.status))),gI(3),Ph(t.workflowId),gI(3),Ph(Pw(16,12,"batches.detail.subjectCount",xw(19,z,t.resolvedSubjects.length))),gI(4),Ph(Ow(20,15,e.triggeredByKey(t.triggeredBy))),gI(4),Ph(Ow(24,17,"batches.detail.membersHeading")),gI(2),ch("jobs",e.memberJobs());}}var $=3e3;function g(i){return i!=="running"}var rt=(()=>{class i{constructor(){this.route=C(ae),this.batchesApi=C(U),this.jobsApi=C(U$1),this.eventsService=C(f),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.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.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()}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(),g(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),g(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||g(t.status)){this.stopPolling();return}this.refreshMembers();},$));}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"],["data-testid","batch-members",1,"members"],[3,"jobs"]],template:function(e,p){if(e&1&&(_i(0,"main",0),bD(1,F,3,3,"p",1)(2,K,2,1,"p",2)(3,L,26,21),Kc()),e&2){let f;gI(),_D(p.loading()?1:p.loadError()?2:(f=p.batch())?3:-1,f);}},dependencies:[Mi,Ln,W,I,vt,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%] 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{rt as BatchDetailComponent};