@whoz-oss/coday-factory-cockpit 0.0.0-workstream-forge.24 → 0.0.0-workstream-forge.26

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.
@@ -1 +1 @@
1
- import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-ClIwjGK_.js';import {h,A as Ae,I as IW,_ as _W,f as fa,k as kC,E as Ed,v as ni,Q as Qo,u as uy,y as ri,$ as $g,D as Dt,a2 as Cd,R as sC}from'./main-JNLIQ323.js';function S(o,m){if(o&1&&(fa(0,"code",1),kC(1),Ed()),o&2){let a=sC();Qo(),uy(a.data.detail);}}var I=class o{data=h($e);static \u0275fac=function(a){return new(a||o)};static \u0275cmp=Ae({type:o,selectors:[["sf-confirm-dialog"]],decls:11,vars:8,consts:[["mat-dialog-title",""],[1,"sf-mono","dialog-detail"],["align","end"],["mat-button","",3,"mat-dialog-close"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(a,l){a&1&&(fa(0,"h2",0),kC(1),Ed(),fa(2,"mat-dialog-content")(3,"p"),kC(4),Ed(),ni(5,S,2,1,"code",1),Ed(),fa(6,"mat-dialog-actions",2)(7,"button",3),kC(8,"Cancel"),Ed(),fa(9,"button",4),kC(10),Ed()()),a&2&&(Qo(),uy(l.data.title),Qo(3),uy(l.data.message),Qo(),ri(l.data.detail?5:-1),Qo(2),$g("mat-dialog-close",false),Qo(2),Dt("sf-danger",l.data.destructive),$g("mat-dialog-close",true),Qo(),Cd(" ",l.data.confirmLabel??"Confirm"," "));},dependencies:[IW,_W,Ht,jt,Nt,zt,Vt],styles:[".dialog-detail[_ngcontent-%COMP%]{display:inline-block;margin-top:10px;padding:4px 8px;border-radius:6px;background:var(--sf-surface-2);color:var(--sf-primary)}"]})};export{I};
1
+ import {$ as $e,H as Ht,j as jt,N as Nt,z as zt,V as Vt}from'./chunk-C_DeZqXA.js';import {h,A as Ae,I as IW,_ as _W,f as fa,k as kC,E as Ed,v as ni,Q as Qo,u as uy,y as ri,$ as $g,D as Dt,a2 as Cd,R as sC}from'./main-4Q33BLD3.js';function S(o,m){if(o&1&&(fa(0,"code",1),kC(1),Ed()),o&2){let a=sC();Qo(),uy(a.data.detail);}}var I=class o{data=h($e);static \u0275fac=function(a){return new(a||o)};static \u0275cmp=Ae({type:o,selectors:[["sf-confirm-dialog"]],decls:11,vars:8,consts:[["mat-dialog-title",""],[1,"sf-mono","dialog-detail"],["align","end"],["mat-button","",3,"mat-dialog-close"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(a,l){a&1&&(fa(0,"h2",0),kC(1),Ed(),fa(2,"mat-dialog-content")(3,"p"),kC(4),Ed(),ni(5,S,2,1,"code",1),Ed(),fa(6,"mat-dialog-actions",2)(7,"button",3),kC(8,"Cancel"),Ed(),fa(9,"button",4),kC(10),Ed()()),a&2&&(Qo(),uy(l.data.title),Qo(3),uy(l.data.message),Qo(),ri(l.data.detail?5:-1),Qo(2),$g("mat-dialog-close",false),Qo(2),Dt("sf-danger",l.data.destructive),$g("mat-dialog-close",true),Qo(),Cd(" ",l.data.confirmLabel??"Confirm"," "));},dependencies:[IW,_W,Ht,jt,Nt,zt,Vt],styles:[".dialog-detail[_ngcontent-%COMP%]{display:inline-block;margin-top:10px;padding:4px 8px;border-radius:6px;background:var(--sf-surface-2);color:var(--sf-primary)}"]})};export{I};
@@ -1 +1 @@
1
- import {J,Z}from'./chunk-Df09vgbA.js';import {h,a4 as fb,g as Ye,p as pb,A as Ae,N as Nt,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,c as Yg,v as ni,Q as Qo,$ as $g,y as ri,u as uy,z as zg,q as qw,R as sC,Z as Zw,r as rr,l as ly,a2 as Cd}from'./main-JNLIQ323.js';function z(n,e){return this.definitionKey(e)}function I(n,e){n&1&&(fa(0,"div",5)(1,"mat-icon",9),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),n&2&&(Qo(4),uy(e));}function L(n,e){n&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",10),fa(2,"span",3),kC(3,"Loading definitions\u2026"),Ed()());}function N(n,e){n&1&&(fa(0,"div",7)(1,"mat-icon",9),kC(2,"inventory_2"),Ed(),fa(3,"p",3),kC(4,"No workflow definitions registered."),Ed()());}function j(n,e){if(n&1&&(fa(0,"a",11)(1,"div",12)(2,"h2",13),kC(3),Ed(),fa(4,"p",14),kC(5),Ed()(),fa(6,"span",15),kC(7),Ed(),fa(8,"mat-icon",16),kC(9,"chevron_right"),Ed()()),n&2){let t=e.$implicit,i=sC(2);$g("routerLink",i.detailLink(t)),rr("data-workflow-card",i.definitionKey(t))("data-workflow-card-link",i.definitionKey(t)),Qo(3),uy(i.definitionTitle(t)),Qo(2),ly(" ",t.workflowType,"@",t.version," "),Qo(),$g("title",t.definitionHash??""),Qo(),Cd(" ",i.shortHash(t)," ");}}function F(n,e){if(n&1&&(fa(0,"div",8),qw(1,j,10,8,"a",11,z,true),Ed()),n&2){let t=sC();Qo(),Zw(t.definitions());}}function H(n){if(Array.isArray(n))return n;let e=typeof n=="object"&&n!==null?n:{};if(Array.isArray(e.items))return e.items;let t=e.data;if(Array.isArray(t))return t;let i=typeof t=="object"&&t!==null?t:{};return Array.isArray(i.items)?i.items:[]}var A=class n{api=h(fb);definitions=Ye([]);loading=Ye(false);error=Ye(null);constructor(){h(pb).crumbs.set([{label:"Workflows"}]),this.load();}load(){this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinitions().subscribe({next:e=>{this.definitions.set(H(e)),this.loading.set(false);},error:e=>{this.error.set(e?.message?.trim()||"Unable to load workflow definitions."),this.definitions.set([]),this.loading.set(false);}});}definitionKey(e){return `${e.workflowType??""}@${e.version??""}`}definitionTitle(e){let t=typeof e.title=="string"?e.title.trim():"",i=typeof e.workflowType=="string"?e.workflowType.trim():"";return t||i||"Definition without type"}shortHash(e){let t=typeof e.definitionHash=="string"?e.definitionHash.trim():"";return t?t.length>12?`${t.slice(0,12)}\u2026`:t:"\u2014"}detailLink(e){return ["/workflows",String(e.workflowType??""),String(e.version??"")]}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ae({type:n,selectors:[["sf-workflows-page"]],decls:15,vars:3,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-stroked-button","",1,"sf-secondary",3,"click","disabled"],["role","alert","data-workflow-error","true",1,"banner","banner--warn"],["data-workflow-loading","true",1,"state"],["data-workflow-empty","true",1,"state","sf-panel"],["data-workflow-list","true",1,"grid"],["aria-hidden","true"],["diameter","32","mode","indeterminate"],[1,"wf-card",3,"routerLink"],[1,"wf-card__titles"],["data-workflow-title","",1,"wf-card__title"],["data-workflow-subtitle","",1,"wf-card__subtitle","sf-mono"],["data-workflow-hash","",1,"wf-card__hash","sf-mono",3,"title"],["aria-hidden","true",1,"wf-card__chevron"]],template:function(t,i){if(t&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflows"),Ed(),fa(5,"p",3),kC(6,"Registered workflow definitions and their governed steps."),Ed()(),fa(7,"button",4),Yg("click",function(){return i.load()}),fa(8,"mat-icon"),kC(9,"refresh"),Ed(),kC(10," Refresh "),Ed()(),ni(11,I,5,1,"div",5),ni(12,L,4,0,"div",6)(13,N,5,0,"div",7)(14,F,3,0,"div",8),Ed()),t&2){let f;Qo(7),$g("disabled",i.loading()),Qo(4),ri((f=i.error())?11:-1,f),Qo(),ri(i.loading()?12:i.definitions().length===0?13:14);}},dependencies:[Nt,IW,_W,A8,x8,J,Z],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.state.sf-panel[_ngcontent-%COMP%]{flex-direction:column;justify-content:center;gap:8px;padding:40px;text-align:center}.state.sf-panel[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:36px;height:36px;font-size:36px;color:var(--sf-text-muted)}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:16px}.wf-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:18px 20px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface);text-decoration:none;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.wf-card[_ngcontent-%COMP%]:hover{background:#141a26;border-color:var(--sf-outline-active)}.wf-card[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary);outline-offset:2px}.wf-card__titles[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.wf-card__title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:var(--sf-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wf-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:12.5px;color:var(--sf-secondary)}.wf-card__hash[_ngcontent-%COMP%]{font-size:12px;color:var(--sf-text-muted);padding:4px 10px;border:1px solid var(--sf-outline-strong);border-radius:999px;background:var(--sf-surface-2);white-space:nowrap;flex-shrink:0}.wf-card__chevron[_ngcontent-%COMP%]{color:var(--sf-text-muted);flex-shrink:0}"]})};export{A as WorkflowsPageComponent,H as extractWorkflowDefinitions};
1
+ import {J,Z}from'./chunk-DQGIYG48.js';import {h,a4 as fb,g as Ye,p as pb,A as Ae,N as Nt,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,c as Yg,v as ni,Q as Qo,$ as $g,y as ri,u as uy,z as zg,q as qw,R as sC,Z as Zw,r as rr,l as ly,a2 as Cd}from'./main-4Q33BLD3.js';function z(n,e){return this.definitionKey(e)}function I(n,e){n&1&&(fa(0,"div",5)(1,"mat-icon",9),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),n&2&&(Qo(4),uy(e));}function L(n,e){n&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",10),fa(2,"span",3),kC(3,"Loading definitions\u2026"),Ed()());}function N(n,e){n&1&&(fa(0,"div",7)(1,"mat-icon",9),kC(2,"inventory_2"),Ed(),fa(3,"p",3),kC(4,"No workflow definitions registered."),Ed()());}function j(n,e){if(n&1&&(fa(0,"a",11)(1,"div",12)(2,"h2",13),kC(3),Ed(),fa(4,"p",14),kC(5),Ed()(),fa(6,"span",15),kC(7),Ed(),fa(8,"mat-icon",16),kC(9,"chevron_right"),Ed()()),n&2){let t=e.$implicit,i=sC(2);$g("routerLink",i.detailLink(t)),rr("data-workflow-card",i.definitionKey(t))("data-workflow-card-link",i.definitionKey(t)),Qo(3),uy(i.definitionTitle(t)),Qo(2),ly(" ",t.workflowType,"@",t.version," "),Qo(),$g("title",t.definitionHash??""),Qo(),Cd(" ",i.shortHash(t)," ");}}function F(n,e){if(n&1&&(fa(0,"div",8),qw(1,j,10,8,"a",11,z,true),Ed()),n&2){let t=sC();Qo(),Zw(t.definitions());}}function H(n){if(Array.isArray(n))return n;let e=typeof n=="object"&&n!==null?n:{};if(Array.isArray(e.items))return e.items;let t=e.data;if(Array.isArray(t))return t;let i=typeof t=="object"&&t!==null?t:{};return Array.isArray(i.items)?i.items:[]}var A=class n{api=h(fb);definitions=Ye([]);loading=Ye(false);error=Ye(null);constructor(){h(pb).crumbs.set([{label:"Workflows"}]),this.load();}load(){this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinitions().subscribe({next:e=>{this.definitions.set(H(e)),this.loading.set(false);},error:e=>{this.error.set(e?.message?.trim()||"Unable to load workflow definitions."),this.definitions.set([]),this.loading.set(false);}});}definitionKey(e){return `${e.workflowType??""}@${e.version??""}`}definitionTitle(e){let t=typeof e.title=="string"?e.title.trim():"",i=typeof e.workflowType=="string"?e.workflowType.trim():"";return t||i||"Definition without type"}shortHash(e){let t=typeof e.definitionHash=="string"?e.definitionHash.trim():"";return t?t.length>12?`${t.slice(0,12)}\u2026`:t:"\u2014"}detailLink(e){return ["/workflows",String(e.workflowType??""),String(e.version??"")]}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ae({type:n,selectors:[["sf-workflows-page"]],decls:15,vars:3,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-stroked-button","",1,"sf-secondary",3,"click","disabled"],["role","alert","data-workflow-error","true",1,"banner","banner--warn"],["data-workflow-loading","true",1,"state"],["data-workflow-empty","true",1,"state","sf-panel"],["data-workflow-list","true",1,"grid"],["aria-hidden","true"],["diameter","32","mode","indeterminate"],[1,"wf-card",3,"routerLink"],[1,"wf-card__titles"],["data-workflow-title","",1,"wf-card__title"],["data-workflow-subtitle","",1,"wf-card__subtitle","sf-mono"],["data-workflow-hash","",1,"wf-card__hash","sf-mono",3,"title"],["aria-hidden","true",1,"wf-card__chevron"]],template:function(t,i){if(t&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflows"),Ed(),fa(5,"p",3),kC(6,"Registered workflow definitions and their governed steps."),Ed()(),fa(7,"button",4),Yg("click",function(){return i.load()}),fa(8,"mat-icon"),kC(9,"refresh"),Ed(),kC(10," Refresh "),Ed()(),ni(11,I,5,1,"div",5),ni(12,L,4,0,"div",6)(13,N,5,0,"div",7)(14,F,3,0,"div",8),Ed()),t&2){let f;Qo(7),$g("disabled",i.loading()),Qo(4),ri((f=i.error())?11:-1,f),Qo(),ri(i.loading()?12:i.definitions().length===0?13:14);}},dependencies:[Nt,IW,_W,A8,x8,J,Z],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.state.sf-panel[_ngcontent-%COMP%]{flex-direction:column;justify-content:center;gap:8px;padding:40px;text-align:center}.state.sf-panel[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:36px;height:36px;font-size:36px;color:var(--sf-text-muted)}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:16px}.wf-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:18px 20px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface);text-decoration:none;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.wf-card[_ngcontent-%COMP%]:hover{background:#141a26;border-color:var(--sf-outline-active)}.wf-card[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary);outline-offset:2px}.wf-card__titles[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.wf-card__title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:var(--sf-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wf-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:12.5px;color:var(--sf-secondary)}.wf-card__hash[_ngcontent-%COMP%]{font-size:12px;color:var(--sf-text-muted);padding:4px 10px;border:1px solid var(--sf-outline-strong);border-radius:999px;background:var(--sf-surface-2);white-space:nowrap;flex-shrink:0}.wf-card__chevron[_ngcontent-%COMP%]{color:var(--sf-text-muted);flex-shrink:0}"]})};export{A as WorkflowsPageComponent,H as extractWorkflowDefinitions};
@@ -1,4 +1,4 @@
1
- import {h,a4 as fb,S as St,g as Ye,n as nT,bg as Q,aa as M,bh as KV,bM as gt,p as pb,V as Vs,a8 as AW,A as Ae,N as Nt,I as IW,_ as _W,bN as LM,aj as Pt,ak as It,al as Me,am as Se,bO as bi,a as A8,x as x8,bP as Mt,ao as Wr,ap as Hr,aq as ce$1,o as ot,f as fa,k as kC,E as Ed,c as Yg,z as zg,q as qw,v as ni$1,bQ as _d,b1 as jg,bR as Id,G as GC,Q as Qo,$ as $g,a2 as Cd,Z as Zw,y as ri$1,u as uy,U as YC,bo as UC,aK as gy,bS as et$1,bT as C,bm as ey,bn as dC,bU as ao,aV as q,aU as ke,bV as bt,F as y,aH as tt$1,b0 as ha,aJ as Et,B as pe,C as ce$2,bz as lb,J as Jr,bW as Vt,aE as xc,aA as yr,aG as um,aI as qr,H as or,bc as un$1,L as nt$1,bd as ln$1,bC as Ge,bK as qg,r as rr,D as Dt,aL as Qg,aM as uC,aN as lC,bX as di,bY as Vt$1,aS as ue,b4 as Ny,bZ as Y,aP as ro,aD as Yn$1,aW as ff,aF as df,bu as Ac,ba as Zb,bb as Yv,b_ as Gl,b$ as Bg,b2 as Xg,aQ as k,b3 as sf,b6 as Bt,b7 as cb,bD as K3,b5 as G,aT as ti$1,c0 as _i,c1 as Ei$1,c2 as f3,b as xy,bf as ry,R as sC,w as $C,W as ZC,bF as fC,bA as QS,be as Ld,bJ as ys,c3 as qV,aR as P,c4 as yf,c5 as ab,c6 as Xa,X as ii$1,bp as Jp,aO as Gr,aZ as at,c7 as Xt,c8 as q$1,c9 as Yt,by as Ce,aY as wt,a_ as $,ca as UI,bq as dn$1,cb as It$1,e as eC,cc as Kg,a0 as Vp,a1 as Hp,bL as Ur}from'./main-JNLIQ323.js';import {B as Be,P as Pe}from'./chunk-ovD0yLfE.js';import {K as Ke,c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai,l as li,U}from'./chunk-DRZVzb9J.js';import {_}from'./chunk-DEjDJvry.js';var Di=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Ei=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Qi(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),Ed());}function Gi(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}function Ki(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),fa(2,"span",7),Jp(),fa(3,"svg",8),zg(4,"path",9),Ed()()());}function Ui(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}var Yi=`.mdc-evolution-chip,
1
+ import {h,a4 as fb,S as St,g as Ye,n as nT,bg as Q,aa as M,bh as KV,bM as gt,p as pb,V as Vs,a8 as AW,A as Ae,N as Nt,I as IW,_ as _W,bN as LM,aj as Pt,ak as It,al as Me,am as Se,bO as bi,a as A8,x as x8,bP as Mt,ao as Wr,ap as Hr,aq as ce$1,o as ot,f as fa,k as kC,E as Ed,c as Yg,z as zg,q as qw,v as ni$1,bQ as _d,b1 as jg,bR as Id,G as GC,Q as Qo,$ as $g,a2 as Cd,Z as Zw,y as ri$1,u as uy,U as YC,bo as UC,aK as gy,bS as et$1,bT as C,bm as ey,bn as dC,bU as ao,aV as q,aU as ke,bV as bt,F as y,aH as tt$1,b0 as ha,aJ as Et,B as pe,C as ce$2,bz as lb,J as Jr,bW as Vt,aE as xc,aA as yr,aG as um,aI as qr,H as or,bc as un$1,L as nt$1,bd as ln$1,bC as Ge,bK as qg,r as rr,D as Dt,aL as Qg,aM as uC,aN as lC,bX as di,bY as Vt$1,aS as ue,b4 as Ny,bZ as Y,aP as ro,aD as Yn$1,aW as ff,aF as df,bu as Ac,ba as Zb,bb as Yv,b_ as Gl,b$ as Bg,b2 as Xg,aQ as k,b3 as sf,b6 as Bt,b7 as cb,bD as K3,b5 as G,aT as ti$1,c0 as _i,c1 as Ei$1,c2 as f3,b as xy,bf as ry,R as sC,w as $C,W as ZC,bF as fC,bA as QS,be as Ld,bJ as ys,c3 as qV,aR as P,c4 as yf,c5 as ab,c6 as Xa,X as ii$1,bp as Jp,aO as Gr,aZ as at,c7 as Xt,c8 as q$1,c9 as Yt,by as Ce,aY as wt,a_ as $,ca as UI,bq as dn$1,cb as It$1,e as eC,cc as Kg,a0 as Vp,a1 as Hp,bL as Ur}from'./main-4Q33BLD3.js';import {B as Be,P as Pe}from'./chunk-BTxEtkRc.js';import {K as Ke,c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai,l as li,U}from'./chunk-BvcgLtmT.js';import {_}from'./chunk-D9NghTGy.js';var Di=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Ei=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Qi(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),Ed());}function Gi(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}function Ki(n,a){n&1&&(fa(0,"span",3),nt$1(1,1),fa(2,"span",7),Jp(),fa(3,"svg",8),zg(4,"path",9),Ed()()());}function Ui(n,a){n&1&&(fa(0,"span",6),nt$1(1,2),Ed());}var Yi=`.mdc-evolution-chip,
2
2
  .mdc-evolution-chip__cell,
3
3
  .mdc-evolution-chip__action {
4
4
  display: inline-flex;
@@ -1 +1 @@
1
- import {J,Z}from'./chunk-Df09vgbA.js';import {h,a4 as fb,au as G,p as pb,g as Ye,A as Ae,I as IW,_ as _W,a as A8,x as x8,N as Nt,f as fa,k as kC,E as Ed,v as ni,Q as Qo,$ as $g,l as ly,y as ri,u as uy,z as zg,R as sC}from'./main-JNLIQ323.js';function T(e,t){e&1&&(fa(0,"p",5),kC(1),Ed()),e&2&&(Qo(),uy(t));}function W(e,t){e&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",9),fa(2,"span",10),kC(3,"Loading definition\u2026"),Ed()());}function I(e,t){e&1&&(fa(0,"div",7)(1,"mat-icon",11),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function z(e,t){if(e&1&&(fa(0,"pre",8)(1,"code"),kC(2),Ed()()),e&2){let l=sC();Qo(2),uy(l.formatJson(t));}}function F(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}var E=class e{api=h(fb);route=h(G);shell=h(pb);backLink=["/workflows"];loading=Ye(false);error=Ye(null);definition=Ye(null);workflowType;version;formatJson=F;constructor(){let t=this.route.snapshot.paramMap;this.workflowType=t.get("type")??"",this.version=t.get("version")??"",this.shell.crumbs.set([{label:"Workflows",link:"/workflows"},{label:`${this.workflowType}@${this.version}`,mono:true}]),this.load();}load(){if(!this.workflowType||!this.version){this.error.set("Missing route parameters (type or version).");return}this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinition(this.workflowType,this.version).subscribe({next:t=>{this.definition.set(t),this.loading.set(false);},error:t=>{this.error.set(t?.message?.trim()||"Unable to load workflow definition."),this.loading.set(false);}});}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workflow-detail-page"]],decls:13,vars:5,consts:[[1,"page"],[1,"page-head"],["mat-stroked-button","","data-workflow-back","",1,"sf-secondary","back-btn",3,"routerLink"],[1,"titles"],["data-workflow-detail-type","",1,"sf-mono"],["data-workflow-detail-title","",1,"sf-muted"],["data-workflow-detail-loading","",1,"state"],["role","alert","data-workflow-detail-error","",1,"banner","banner--warn"],["data-workflow-detail-json","",1,"json-block"],["diameter","32","mode","indeterminate"],[1,"sf-muted"],["aria-hidden","true"]],template:function(l,a){if(l&1&&(fa(0,"div",0)(1,"header",1)(2,"a",2)(3,"mat-icon"),kC(4,"arrow_back"),Ed(),kC(5," Back "),Ed(),fa(6,"div",3)(7,"h1",4),kC(8),Ed(),ni(9,T,2,1,"p",5),Ed()(),ni(10,W,4,0,"div",6)(11,I,5,1,"div",7)(12,z,3,1,"pre",8),Ed()),l&2){let g,f;Qo(2),$g("routerLink",a.backLink),Qo(6),ly("",a.workflowType,"@",a.version),Qo(),ri((g=a.definition()?.title)?9:-1,g),Qo(),ri(a.loading()?10:(f=a.error())?11:(f=a.definition())?12:-1,f);}},dependencies:[IW,_W,A8,x8,J,Z,Nt],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px}.back-btn[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:22px;font-weight:700;letter-spacing:-.01em;word-break:break-all}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.json-block[_ngcontent-%COMP%]{margin:0;padding:20px 24px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface-2);font-family:var(--sf-mono);font-size:13px;line-height:1.6;overflow-x:auto;overflow-y:auto;max-height:75vh;white-space:pre;tab-size:2}.json-block[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font:inherit;color:inherit;background:none;padding:0}"]})};export{E as WorkflowDetailPageComponent,F as formatJson};
1
+ import {J,Z}from'./chunk-DQGIYG48.js';import {h,a4 as fb,au as G,p as pb,g as Ye,A as Ae,I as IW,_ as _W,a as A8,x as x8,N as Nt,f as fa,k as kC,E as Ed,v as ni,Q as Qo,$ as $g,l as ly,y as ri,u as uy,z as zg,R as sC}from'./main-4Q33BLD3.js';function T(e,t){e&1&&(fa(0,"p",5),kC(1),Ed()),e&2&&(Qo(),uy(t));}function W(e,t){e&1&&(fa(0,"div",6),zg(1,"mat-progress-spinner",9),fa(2,"span",10),kC(3,"Loading definition\u2026"),Ed()());}function I(e,t){e&1&&(fa(0,"div",7)(1,"mat-icon",11),kC(2,"cloud_off"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function z(e,t){if(e&1&&(fa(0,"pre",8)(1,"code"),kC(2),Ed()()),e&2){let l=sC();Qo(2),uy(l.formatJson(t));}}function F(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}var E=class e{api=h(fb);route=h(G);shell=h(pb);backLink=["/workflows"];loading=Ye(false);error=Ye(null);definition=Ye(null);workflowType;version;formatJson=F;constructor(){let t=this.route.snapshot.paramMap;this.workflowType=t.get("type")??"",this.version=t.get("version")??"",this.shell.crumbs.set([{label:"Workflows",link:"/workflows"},{label:`${this.workflowType}@${this.version}`,mono:true}]),this.load();}load(){if(!this.workflowType||!this.version){this.error.set("Missing route parameters (type or version).");return}this.loading.set(true),this.error.set(null),this.api.getWorkflowDefinition(this.workflowType,this.version).subscribe({next:t=>{this.definition.set(t),this.loading.set(false);},error:t=>{this.error.set(t?.message?.trim()||"Unable to load workflow definition."),this.loading.set(false);}});}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-workflow-detail-page"]],decls:13,vars:5,consts:[[1,"page"],[1,"page-head"],["mat-stroked-button","","data-workflow-back","",1,"sf-secondary","back-btn",3,"routerLink"],[1,"titles"],["data-workflow-detail-type","",1,"sf-mono"],["data-workflow-detail-title","",1,"sf-muted"],["data-workflow-detail-loading","",1,"state"],["role","alert","data-workflow-detail-error","",1,"banner","banner--warn"],["data-workflow-detail-json","",1,"json-block"],["diameter","32","mode","indeterminate"],[1,"sf-muted"],["aria-hidden","true"]],template:function(l,a){if(l&1&&(fa(0,"div",0)(1,"header",1)(2,"a",2)(3,"mat-icon"),kC(4,"arrow_back"),Ed(),kC(5," Back "),Ed(),fa(6,"div",3)(7,"h1",4),kC(8),Ed(),ni(9,T,2,1,"p",5),Ed()(),ni(10,W,4,0,"div",6)(11,I,5,1,"div",7)(12,z,3,1,"pre",8),Ed()),l&2){let g,f;Qo(2),$g("routerLink",a.backLink),Qo(6),ly("",a.workflowType,"@",a.version),Qo(),ri((g=a.definition()?.title)?9:-1,g),Qo(),ri(a.loading()?10:(f=a.error())?11:(f=a.definition())?12:-1,f);}},dependencies:[IW,_W,A8,x8,J,Z,Nt],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1200px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px}.back-btn[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:22px;font-weight:700;letter-spacing:-.01em;word-break:break-all}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.json-block[_ngcontent-%COMP%]{margin:0;padding:20px 24px;border-radius:12px;border:1px solid var(--sf-outline);background:var(--sf-surface-2);font-family:var(--sf-mono);font-size:13px;line-height:1.6;overflow-x:auto;overflow-y:auto;max-height:75vh;white-space:pre;tab-size:2}.json-block[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font:inherit;color:inherit;background:none;padding:0}"]})};export{E as WorkflowDetailPageComponent,F as formatJson};
@@ -1,4 +1,4 @@
1
- import {B as pe,C as ce,aj as Pt,J as Jr,h,aS as ue,cd as be,ce as M,aR as P,cf as Ee,aT as ti,aW as ff,F as y,aV as q,cg as P3,a7 as ie,ch as C3,ci as qt,ah as Kt,bW as Vt,cj as zt,ck as Gn,cl as me,V as Vs,aH as tt,b0 as ha,aJ as Et,aK as gy,cm as Fe,c as Yg,bK as qg,r as rr,D as Dt,cn as Je,b6 as Bt,b9 as In,co as pn,cp as F,A as Ae}from'./main-JNLIQ323.js';var J=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Ae({type:s,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize {
1
+ import {B as pe,C as ce,aj as Pt,J as Jr,h,aS as ue,cd as be,ce as M,aR as P,cf as Ee,aT as ti,aW as ff,F as y,aV as q,cg as P3,a7 as ie,ch as C3,ci as qt,ah as Kt,bW as Vt,cj as zt,ck as Gn,cl as me,V as Vs,aH as tt,b0 as ha,aJ as Et,aK as gy,cm as Fe,c as Yg,bK as qg,r as rr,D as Dt,cn as Je,b6 as Bt,b9 as In,co as pn,cp as F,A as Ae}from'./main-4Q33BLD3.js';var J=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Ae({type:s,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize {
2
2
  resize: none;
3
3
  }
4
4
 
@@ -1 +1 @@
1
- import {B as Be,P as Pe}from'./chunk-ovD0yLfE.js';import {h,a4 as fb,S as St,a5 as ce,g as Ye,a6 as Dn,a7 as ie,p as pb,a8 as AW,a9 as cc,aa as M,A as Ae,ab as An,ac as Vn,ad as Ue,ae as yn,af as Cn,ag as Nt,ah as Kt,ai as Xt,N as Nt$1,I as IW,_ as _W,aj as Pt,ak as It,al as Me$1,am as Se,an as _i,a as A8,x as x8,ao as Wr,ap as Hr,aq as ce$1,f as fa,k as kC,E as Ed,v as ni,c as Yg,z as zg,ar as OI,Q as Qo,y as ri,$ as $g,u as uy,as as LI,a2 as Cd,q as qw,at as Gw,R as sC,Z as Zw}from'./main-JNLIQ323.js';var de=(e,t)=>t.id;function pe(e,t){e&1&&(fa(0,"div",4)(1,"mat-icon",21),kC(2,"check_circle"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ue(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",21),kC(2,"error"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function fe(e,t){e&1&&(fa(0,"div",6)(1,"mat-icon",21),kC(2,"warning"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ge(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n),Qo(),uy(n);}}function he(e,t){if(e&1&&(fa(0,"mat-select",9),qw(1,ge,2,2,"mat-option",22,Gw),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.workflowTypes());}}function be(e,t){e&1&&(zg(0,"input",10),OI()),e&2&&LI();}function ye(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Workflow definition is required."),Ed());}function xe(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n.id),Qo(),uy(n.name);}}function Ce(e,t){if(e&1&&(fa(0,"mat-select",11),qw(1,xe,2,2,"mat-option",22,de),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.namespaces());}}function _e(e,t){e&1&&(zg(0,"input",12),OI()),e&2&&LI();}function ve(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Namespace is required."),Ed());}function we(e,t){e&1&&(fa(0,"mat-error"),kC(1,"The objective must not exceed 4,000 characters."),Ed());}function Me(e){let t=Array.isArray(e)?e:Array.isArray(e?.items)?e.items:[],n=new Set;for(let a of t){if(typeof a=="string"){a.trim()&&n.add(a.trim());continue}let s=a?.workflowType;typeof s=="string"&&s.trim()&&n.add(s.trim());}return Array.from(n)}function ke(e){let t=e?.code??"UNKNOWN_ERROR",n=e?.message?.trim();return n?`${n} (${t})`:`Launch failed (${t}).`}var me=class e{api=h(fb);store=h(St);router=h(ce);workflowTypes=Ye([]);namespaces=Ye([]);submitting=Ye(false);successMessage=Ye(null);errorMessage=Ye(null);definitionsLoading=Ye(false);definitionsError=Ye(null);form=h(Dn).group({workflowType:["",ie.required],namespaceId:["",ie.required],title:["",ie.maxLength(200)],ticket:["",ie.maxLength(64)],initialRequest:["",ie.maxLength(4e3)]});constructor(){h(pb).crumbs.set([{label:"Sandboxes",link:"/sandboxes"},{label:"Launch a run"}]),this.loadDefinitions(),this.loadNamespaces();}loadDefinitions(){this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{let n=Me(t);if(this.workflowTypes.set(n),n.length===1){let[a]=n;a&&this.form.controls.workflowType.setValue(a);}this.definitionsLoading.set(false);},error:t=>{this.definitionsError.set(t?.message??"Workflow definitions unavailable."),this.definitionsLoading.set(false);}});}loadNamespaces(){this.api.getNamespaces().subscribe(t=>{let n=AW(t);this.namespaces.set(n);let[a]=n;a&&!this.form.controls.namespaceId.value&&this.form.controls.namespaceId.setValue(a.id);});}onSubmit(){if(this.submitting())return;if(this.form.invalid){this.form.markAllAsTouched();return}let{workflowType:t,namespaceId:n,title:a,ticket:s,initialRequest:C}=this.form.getRawValue(),y=a.trim(),E=s.trim(),S=C.trim(),ce=cc();this.submitting.set(true),this.successMessage.set(null),this.errorMessage.set(null),this.api.createWorkflowRun(M(M(M({workflowType:t},y?{title:y}:{}),S?{initialRequest:S}:{}),E?{parameters:{ticket:E}}:{}),n,ce).subscribe({next:_=>{this.submitting.set(false);let L=_?.submissionId;this.successMessage.set(L?`Launch accepted (id: ${L})`:"Launch accepted."),this.store.refresh(),this.router.navigate(["/sessions",_.workflowId]);},error:_=>{this.submitting.set(false),this.errorMessage.set(ke(_));}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-launch-page"]],decls:49,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["role","status","data-launch-success","true",1,"banner","banner--success"],["role","alert","data-launch-error","true",1,"banner","banner--error"],["role","alert","data-launch-definitions-error","true",1,"banner","banner--warn"],["novalidate","",1,"sf-panel","launch-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"field"],["formControlName","workflowType","data-launch-workflow-type","true"],["matInput","","formControlName","workflowType","placeholder","adw_simple_sdlc","data-launch-workflow-type","true",1,"sf-mono"],["formControlName","namespaceId","data-launch-namespace","true"],["matInput","","formControlName","namespaceId","placeholder","default","data-launch-namespace","true",1,"sf-mono"],["appearance","outline",1,"field","field--wide"],["matInput","","formControlName","title","maxlength","200","placeholder","Readable run title","data-launch-title","true"],["matInput","","formControlName","ticket","placeholder","ABC-123","data-launch-ticket","true",1,"sf-mono"],["matInput","","id","launch-initial-request","formControlName","initialRequest","aria-describedby","launch-initial-request-help","rows","5","maxlength","4000","data-launch-initial-request","true"],["id","launch-initial-request-help"],[1,"form-actions"],["mat-flat-button","","type","submit","data-launch-submit","true",1,"sf-primary",3,"disabled"],["mat-stroked-button","","routerLink","/sandboxes",1,"sf-secondary"],["aria-hidden","true"],[3,"value"]],template:function(n,a){if(n&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Launch a run"),Ed(),fa(5,"p",3),kC(6," Creates and durably submits a real workflow. Factory assigns identity and execution context. "),Ed()()(),ni(7,pe,5,1,"div",4),ni(8,ue,5,1,"div",5),ni(9,fe,5,1,"div",6),fa(10,"form",7),Yg("ngSubmit",function(){return a.onSubmit()}),fa(11,"mat-form-field",8)(12,"mat-label"),kC(13,"Workflow definition"),Ed(),ni(14,he,3,0,"mat-select",9)(15,be,1,0,"input",10),ni(16,ye,2,0,"mat-error"),fa(17,"mat-hint"),kC(18),Ed()(),fa(19,"mat-form-field",8)(20,"mat-label"),kC(21,"Namespace"),Ed(),ni(22,Ce,3,0,"mat-select",11)(23,_e,1,0,"input",12),ni(24,ve,2,0,"mat-error"),Ed(),fa(25,"mat-form-field",13)(26,"mat-label"),kC(27,"Title (optional)"),Ed(),zg(28,"input",14),OI(),fa(29,"mat-hint"),kC(30,"Factory generates a readable title if omitted."),Ed()(),fa(31,"mat-form-field",8)(32,"mat-label"),kC(33,"Jira ticket (optional)"),Ed(),zg(34,"input",15),OI(),Ed(),fa(35,"mat-form-field",13)(36,"mat-label"),kC(37,"What would you like to do? (optional)"),Ed(),zg(38,"textarea",16),OI(),ni(39,we,2,0,"mat-error"),fa(40,"mat-hint",17),kC(41," Describe your objective, even briefly. The agent will ask for any clarifications needed. "),Ed()(),fa(42,"div",18)(43,"button",19)(44,"mat-icon"),kC(45),Ed(),kC(46),Ed(),fa(47,"a",20),kC(48,"Cancel"),Ed()()()()),n&2){let s,C,y;Qo(7),ri((s=a.successMessage())?7:-1,s),Qo(),ri((C=a.errorMessage())?8:-1,C),Qo(),ri((y=a.definitionsError())?9:-1,y),Qo(),$g("formGroup",a.form),Qo(4),ri(a.workflowTypes().length>0?14:15),Qo(2),ri(a.form.controls.workflowType.hasError("required")?16:-1),Qo(2),uy(a.definitionsLoading()?"Loading definitions\u2026":"workflowType"),Qo(4),ri(a.namespaces().length>0?22:23),Qo(2),ri(a.form.controls.namespaceId.hasError("required")?24:-1),Qo(4),LI(),Qo(6),LI(),Qo(4),LI(),Qo(),ri(a.form.controls.initialRequest.hasError("maxlength")?39:-1),Qo(4),$g("disabled",a.submitting()),Qo(2),uy(a.submitting()?"hourglass_top":"play_arrow"),Qo(),Cd(" ",a.submitting()?"Launching\u2026":"Launch run"," ");}},dependencies:[An,Vn,Ue,yn,Cn,Nt,Kt,Xt,Nt$1,IW,_W,Pt,It,Me$1,Se,_i,A8,x8,Be,Pe,Wr,Hr,ce$1],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:900px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:12px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.launch-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;padding:24px}.field[_ngcontent-%COMP%]{width:100%}.field--wide[_ngcontent-%COMP%]{grid-column:1/-1}.form-actions[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;gap:10px;padding-top:8px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}@media(max-width:720px){.launch-form[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}"]})};export{me as LaunchPageComponent,Me as extractWorkflowTypes,ke as formatLaunchError};
1
+ import {B as Be,P as Pe}from'./chunk-BTxEtkRc.js';import {h,a4 as fb,S as St,a5 as ce,g as Ye,a6 as Dn,a7 as ie,p as pb,a8 as AW,a9 as cc,aa as M,A as Ae,ab as An,ac as Vn,ad as Ue,ae as yn,af as Cn,ag as Nt,ah as Kt,ai as Xt,N as Nt$1,I as IW,_ as _W,aj as Pt,ak as It,al as Me$1,am as Se,an as _i,a as A8,x as x8,ao as Wr,ap as Hr,aq as ce$1,f as fa,k as kC,E as Ed,v as ni,c as Yg,z as zg,ar as OI,Q as Qo,y as ri,$ as $g,u as uy,as as LI,a2 as Cd,q as qw,at as Gw,R as sC,Z as Zw}from'./main-4Q33BLD3.js';var de=(e,t)=>t.id;function pe(e,t){e&1&&(fa(0,"div",4)(1,"mat-icon",21),kC(2,"check_circle"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ue(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",21),kC(2,"error"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function fe(e,t){e&1&&(fa(0,"div",6)(1,"mat-icon",21),kC(2,"warning"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function ge(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n),Qo(),uy(n);}}function he(e,t){if(e&1&&(fa(0,"mat-select",9),qw(1,ge,2,2,"mat-option",22,Gw),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.workflowTypes());}}function be(e,t){e&1&&(zg(0,"input",10),OI()),e&2&&LI();}function ye(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Workflow definition is required."),Ed());}function xe(e,t){if(e&1&&(fa(0,"mat-option",22),kC(1),Ed()),e&2){let n=t.$implicit;$g("value",n.id),Qo(),uy(n.name);}}function Ce(e,t){if(e&1&&(fa(0,"mat-select",11),qw(1,xe,2,2,"mat-option",22,de),Ed(),OI()),e&2){let n=sC();LI(),Qo(),Zw(n.namespaces());}}function _e(e,t){e&1&&(zg(0,"input",12),OI()),e&2&&LI();}function ve(e,t){e&1&&(fa(0,"mat-error"),kC(1,"Namespace is required."),Ed());}function we(e,t){e&1&&(fa(0,"mat-error"),kC(1,"The objective must not exceed 4,000 characters."),Ed());}function Me(e){let t=Array.isArray(e)?e:Array.isArray(e?.items)?e.items:[],n=new Set;for(let a of t){if(typeof a=="string"){a.trim()&&n.add(a.trim());continue}let s=a?.workflowType;typeof s=="string"&&s.trim()&&n.add(s.trim());}return Array.from(n)}function ke(e){let t=e?.code??"UNKNOWN_ERROR",n=e?.message?.trim();return n?`${n} (${t})`:`Launch failed (${t}).`}var me=class e{api=h(fb);store=h(St);router=h(ce);workflowTypes=Ye([]);namespaces=Ye([]);submitting=Ye(false);successMessage=Ye(null);errorMessage=Ye(null);definitionsLoading=Ye(false);definitionsError=Ye(null);form=h(Dn).group({workflowType:["",ie.required],namespaceId:["",ie.required],title:["",ie.maxLength(200)],ticket:["",ie.maxLength(64)],initialRequest:["",ie.maxLength(4e3)]});constructor(){h(pb).crumbs.set([{label:"Sandboxes",link:"/sandboxes"},{label:"Launch a run"}]),this.loadDefinitions(),this.loadNamespaces();}loadDefinitions(){this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{let n=Me(t);if(this.workflowTypes.set(n),n.length===1){let[a]=n;a&&this.form.controls.workflowType.setValue(a);}this.definitionsLoading.set(false);},error:t=>{this.definitionsError.set(t?.message??"Workflow definitions unavailable."),this.definitionsLoading.set(false);}});}loadNamespaces(){this.api.getNamespaces().subscribe(t=>{let n=AW(t);this.namespaces.set(n);let[a]=n;a&&!this.form.controls.namespaceId.value&&this.form.controls.namespaceId.setValue(a.id);});}onSubmit(){if(this.submitting())return;if(this.form.invalid){this.form.markAllAsTouched();return}let{workflowType:t,namespaceId:n,title:a,ticket:s,initialRequest:C}=this.form.getRawValue(),y=a.trim(),E=s.trim(),S=C.trim(),ce=cc();this.submitting.set(true),this.successMessage.set(null),this.errorMessage.set(null),this.api.createWorkflowRun(M(M(M({workflowType:t},y?{title:y}:{}),S?{initialRequest:S}:{}),E?{parameters:{ticket:E}}:{}),n,ce).subscribe({next:_=>{this.submitting.set(false);let L=_?.submissionId;this.successMessage.set(L?`Launch accepted (id: ${L})`:"Launch accepted."),this.store.refresh(),this.router.navigate(["/sessions",_.workflowId]);},error:_=>{this.submitting.set(false),this.errorMessage.set(ke(_));}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-launch-page"]],decls:49,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["role","status","data-launch-success","true",1,"banner","banner--success"],["role","alert","data-launch-error","true",1,"banner","banner--error"],["role","alert","data-launch-definitions-error","true",1,"banner","banner--warn"],["novalidate","",1,"sf-panel","launch-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"field"],["formControlName","workflowType","data-launch-workflow-type","true"],["matInput","","formControlName","workflowType","placeholder","adw_simple_sdlc","data-launch-workflow-type","true",1,"sf-mono"],["formControlName","namespaceId","data-launch-namespace","true"],["matInput","","formControlName","namespaceId","placeholder","default","data-launch-namespace","true",1,"sf-mono"],["appearance","outline",1,"field","field--wide"],["matInput","","formControlName","title","maxlength","200","placeholder","Readable run title","data-launch-title","true"],["matInput","","formControlName","ticket","placeholder","ABC-123","data-launch-ticket","true",1,"sf-mono"],["matInput","","id","launch-initial-request","formControlName","initialRequest","aria-describedby","launch-initial-request-help","rows","5","maxlength","4000","data-launch-initial-request","true"],["id","launch-initial-request-help"],[1,"form-actions"],["mat-flat-button","","type","submit","data-launch-submit","true",1,"sf-primary",3,"disabled"],["mat-stroked-button","","routerLink","/sandboxes",1,"sf-secondary"],["aria-hidden","true"],[3,"value"]],template:function(n,a){if(n&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Launch a run"),Ed(),fa(5,"p",3),kC(6," Creates and durably submits a real workflow. Factory assigns identity and execution context. "),Ed()()(),ni(7,pe,5,1,"div",4),ni(8,ue,5,1,"div",5),ni(9,fe,5,1,"div",6),fa(10,"form",7),Yg("ngSubmit",function(){return a.onSubmit()}),fa(11,"mat-form-field",8)(12,"mat-label"),kC(13,"Workflow definition"),Ed(),ni(14,he,3,0,"mat-select",9)(15,be,1,0,"input",10),ni(16,ye,2,0,"mat-error"),fa(17,"mat-hint"),kC(18),Ed()(),fa(19,"mat-form-field",8)(20,"mat-label"),kC(21,"Namespace"),Ed(),ni(22,Ce,3,0,"mat-select",11)(23,_e,1,0,"input",12),ni(24,ve,2,0,"mat-error"),Ed(),fa(25,"mat-form-field",13)(26,"mat-label"),kC(27,"Title (optional)"),Ed(),zg(28,"input",14),OI(),fa(29,"mat-hint"),kC(30,"Factory generates a readable title if omitted."),Ed()(),fa(31,"mat-form-field",8)(32,"mat-label"),kC(33,"Jira ticket (optional)"),Ed(),zg(34,"input",15),OI(),Ed(),fa(35,"mat-form-field",13)(36,"mat-label"),kC(37,"What would you like to do? (optional)"),Ed(),zg(38,"textarea",16),OI(),ni(39,we,2,0,"mat-error"),fa(40,"mat-hint",17),kC(41," Describe your objective, even briefly. The agent will ask for any clarifications needed. "),Ed()(),fa(42,"div",18)(43,"button",19)(44,"mat-icon"),kC(45),Ed(),kC(46),Ed(),fa(47,"a",20),kC(48,"Cancel"),Ed()()()()),n&2){let s,C,y;Qo(7),ri((s=a.successMessage())?7:-1,s),Qo(),ri((C=a.errorMessage())?8:-1,C),Qo(),ri((y=a.definitionsError())?9:-1,y),Qo(),$g("formGroup",a.form),Qo(4),ri(a.workflowTypes().length>0?14:15),Qo(2),ri(a.form.controls.workflowType.hasError("required")?16:-1),Qo(2),uy(a.definitionsLoading()?"Loading definitions\u2026":"workflowType"),Qo(4),ri(a.namespaces().length>0?22:23),Qo(2),ri(a.form.controls.namespaceId.hasError("required")?24:-1),Qo(4),LI(),Qo(6),LI(),Qo(4),LI(),Qo(),ri(a.form.controls.initialRequest.hasError("maxlength")?39:-1),Qo(4),$g("disabled",a.submitting()),Qo(2),uy(a.submitting()?"hourglass_top":"play_arrow"),Qo(),Cd(" ",a.submitting()?"Launching\u2026":"Launch run"," ");}},dependencies:[An,Vn,Ue,yn,Cn,Nt,Kt,Xt,Nt$1,IW,_W,Pt,It,Me$1,Se,_i,A8,x8,Be,Pe,Wr,Hr,ce$1],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:900px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:12px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.launch-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;padding:24px}.field[_ngcontent-%COMP%]{width:100%}.field--wide[_ngcontent-%COMP%]{grid-column:1/-1}.form-actions[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;gap:10px;padding-top:8px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}@media(max-width:720px){.launch-form[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}"]})};export{me as LaunchPageComponent,Me as extractWorkflowTypes,ke as formatLaunchError};
@@ -1,4 +1,4 @@
1
- import {cI as dt$1,bt as En,aV as q,cJ as Rv,ba as Zb,by as Ce,cK as Ic,aw as O,B as pe$1,C as ce$1,J as Jr,aG as um,A as Ae,aI as qr,H as or,L as nt$1,v as ni$1,Q as Qo,y as ri$1,aK as gy,F as y,D as Dt,aH as tt,aJ as Et,cs as Gg,h,aL as Qg,aM as uC,aN as lC,bj as Bt,cL as Ay,b4 as Ny,aS as ue$1,bA as QS,cd as be,cM as A,bZ as Y,cN as Ee,aQ as k,aU as ke,b8 as Aa,aA as yr,cO as ut$1,cP as g,cQ as Se,cR as Z,cS as jb,cT as Yb,cU as Ab,cV as xb,aO as Gr,bL as Ur,b0 as ha,b_ as Gl,f as fa,E as Ed}from'./main-JNLIQ323.js';var ot=[[["caption"]],[["colgroup"],["col"]],"*"],nt=["caption","colgroup, col","*"];function rt(i,n){i&1&&nt$1(0,2);}function st(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",0),Gg(3,2)(4,3),Ed(),fa(5,"tfoot",0),Gg(6,4),Ed());}function at(i,n){i&1&&Gg(0,1)(1,2)(2,3)(3,4);}var R=new y("CDK_TABLE");var te=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),ie=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Qe=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),U=(()=>{class i{_table=h(R,{optional:true});_hasStickyChanged=false;get name(){return this._name}set name(e){this._setNameInput(e);}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=true);}_stickyEnd=false;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`];}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName());}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,te,5)(r,ie,5)(r,Qe,5),t&2){let s;uC(s=lC())&&(o.cell=s.first),uC(s=lC())&&(o.headerCell=s.first),uC(s=lC())&&(o.footerCell=s.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Et],stickyEnd:[2,"stickyEnd","stickyEnd",Et]}})}return i})(),ee=class{constructor(n,e){e.nativeElement.classList.add(...n._columnCssClassName);}},We=(()=>{class i extends ee{constructor(){super(h(U),h(ue$1));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[qr]})}return i})();var $e=(()=>{class i extends ee{constructor(){let e=h(U),t=h(ue$1);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[qr]})}return i})();var de=(()=>{class i{template=h(Ur);_differs=h(Ay);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t);}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof W?e.headerCell.template:this instanceof fe?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,features:[ha]})}return i})(),W=(()=>{class i extends de{_table=h(R,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),fe=(()=>{class i extends de{_table=h(R,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),oe=(()=>{class i extends de{_table=h(R,{optional:true});when;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[qr]})}return i})(),N=(()=>{class i{_viewContainer=h(Gr);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this;}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),ue=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})();var he=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})(),ne=(()=>{class i{templateRef=h(Ur);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ue=["top","bottom","left","right"],ce=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(n=>this._updateCachedSizes(n)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(n,e,t=true,o=true,r,s,a){this._isNativeHtmlTable=n,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=s,this._tableInjector=a,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(n,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(n);let t=[];for(let o of n)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Gl({write:()=>{for(let o of t)this._removeStickyStyle(o,e);}},{injector:this._tableInjector});}updateStickyColumns(n,e,t,o=true,r=true){if(!n.length||!this._isBrowser||!(e.some(D=>D)||t.some(D=>D))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let s=n[0],a=s.children.length,c=this.direction==="rtl",d=c?"right":"left",u=c?"left":"right",h=e.lastIndexOf(true),y=t.indexOf(true),_,we,Ce;r&&this._updateStickyColumnReplayQueue({rows:[...n],stickyStartStates:[...e],stickyEndStates:[...t]}),Gl({earlyRead:()=>{_=this._getCellWidths(s,o),we=this._getStickyStartColumnPositions(_,e),Ce=this._getStickyEndColumnPositions(_,t);},write:()=>{for(let D of n)for(let w=0;w<a;w++){let De=D.children[w];e[w]&&this._addStickyStyle(De,d,we[w],w===h),t[w]&&this._addStickyStyle(De,u,Ce[w],w===y);}this._positionListener&&_.some(D=>!!D)&&(this._positionListener.stickyColumnsUpdated({sizes:h===-1?[]:_.slice(0,h+1).map((D,w)=>e[w]?D:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:y===-1?[]:_.slice(y).map((D,w)=>t[w+y]?D:null).reverse()}));}},{injector:this._tableInjector});}stickRows(n,e,t){if(!this._isBrowser)return;let o=t==="bottom"?n.slice().reverse():n,r=t==="bottom"?e.slice().reverse():e,s=[],a=[],c=[];Gl({earlyRead:()=>{for(let d=0,u=0;d<o.length;d++){if(!r[d])continue;s[d]=u;let h=o[d];c[d]=this._isNativeHtmlTable?Array.from(h.children):[h];let y=this._retrieveElementSize(h).height;u+=y,a[d]=y;}},write:()=>{let d=r.lastIndexOf(true);for(let u=0;u<o.length;u++){if(!r[u])continue;let h=s[u],y=u===d;for(let _ of c[u])this._addStickyStyle(_,t,h,y);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:s,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:s,elements:c});}},{injector:this._tableInjector});}updateStickyFooterContainer(n,e){this._isNativeHtmlTable&&Gl({write:()=>{let t=n.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,false));}},{injector:this._tableInjector});}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=true;}_removeStickyStyle(n,e){if(!n.classList.contains(this._stickCellCss))return;for(let o of e)n.style[o]="",n.classList.remove(this._borderCellCss[o]);Ue.some(o=>e.indexOf(o)===-1&&n.style[o])?n.style.zIndex=this._getCalculatedZIndex(n):(n.style.zIndex="",this._needsPositionStickyOnElement&&(n.style.position=""),n.classList.remove(this._stickCellCss));}_addStickyStyle(n,e,t,o){n.classList.add(this._stickCellCss),o&&n.classList.add(this._borderCellCss[e]),n.style[e]=`${t}px`,n.style.zIndex=this._getCalculatedZIndex(n),this._needsPositionStickyOnElement&&(n.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(n){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Ue)n.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(n,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=n.children;for(let r=0;r<o.length;r++){let s=o[r];t.push(this._retrieveElementSize(s).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(n,e){let t=[],o=0;for(let r=0;r<n.length;r++)e[r]&&(t[r]=o,o+=n[r]);return t}_getStickyEndColumnPositions(n,e){let t=[],o=0;for(let r=n.length;r>0;r--)e[r]&&(t[r]=o,o+=n[r]);return t}_retrieveElementSize(n){let e=this._elemSizeCache.get(n);if(e)return e;let t=n.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(n,o),this._resizeObserver.observe(n,{box:"border-box"})),o}_updateStickyColumnReplayQueue(n){this._removeFromStickyColumnReplayQueue(n.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(n);}_removeFromStickyColumnReplayQueue(n){let e=new Set(n);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(n){let e=false;for(let t of n){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&lt(t.target)&&(e=true),this._elemSizeCache.set(t.target,o);}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,true,false);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null;}},0));}};function lt(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(n=>i.classList.contains(n))}var Q=new y("STICKY_POSITIONING_LISTENER");var me=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ye=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_e=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),pe=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),ge=(()=>{class i{_differs=h(Ay);_changeDetectorRef=h(Ny);_elementRef=h(ue$1);_dir=h(QS,{optional:true});_platform=h(be);_viewRepeater;_viewportRuler=h(A);_injector=h(Y);_virtualScrollViewport=h(Ee,{optional:true,host:true});_positionListener=h(Q,{optional:true})||h(Q,{optional:true,skipSelf:true});_document=h(k);_data;_renderedRange;_onDestroy=new q;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=true;_footerRowDefChanged=true;_stickyColumnStylesNeedReset=true;_forceRecalculateCellWidths=true;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=true;_isServer;_isShowingNoDataRow=false;_hasAllOutlets=false;_hasInitialized=false;_headerRowStickyUpdates=new q;_footerRowStickyUpdates=new q;_disableVirtualScrolling=false;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e;}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck());}_dataSource;_dataSourceChanges=new q;_dataStream=new q;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles());}_multiTemplateDataRows=false;get fixedLayout(){return this._virtualScrollEnabled()?true:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=true,this._stickyColumnStylesNeedReset=true;}_fixedLayout=false;recycleRows=false;contentChanged=new ke;viewChange=new En({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new Aa("role"),{optional:true})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(yr(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new g,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=true;}ngAfterContentChecked(){this._canRender()&&this._render();}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear();}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Se(this.dataSource)&&this.dataSource.disconnect(this);}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,r,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===Z.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.item.data;}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles();}addColumnDef(e){this._customColumnDefs.add(e);}removeColumnDef(e){this._customColumnDefs.delete(e);}addRowDef(e){this._customRowDefs.add(e);}removeRowDef(e){this._customRowDefs.delete(e);}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=true;}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=true;}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=true;}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=true;}setNoDataRow(e){this._customNoDataRow=e;}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s]);}),this._rowDefs.forEach(r=>{let s=[];for(let a=0;a<t.length;a++)this._renderRows[a].rowDef===r&&s.push(t[a]);this._addStickyColumnStyles(s,r);}),o.forEach((r,s)=>{this._addStickyColumnStyles([r],this._footerRowDefs[s]);}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged());}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e);}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e);}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e);}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e);}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=true,this._canRender()&&this._render());}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=false),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=false),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates();}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return [];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let s=this._data[r],a=this._getRenderRowsForData(s,r,o.get(s));this._cachedRenderRowsMap.has(s)||this._cachedRenderRowsMap.set(s,new WeakMap);for(let c=0;c<a.length;c++){let d=a[c],u=this._cachedRenderRowsMap.get(d.data);u.has(d.rowDef)?u.get(d.rowDef).push(d):u.set(d.rowDef,[d]),e.push(d);}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(s=>{let a=o&&o.has(s)?o.get(s):[];if(a.length){let c=a.shift();return c.dataIndex=t,c}else return {data:e,rowDef:s,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),J(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=J(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=J(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=J(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(s,a)=>{let c=!!a.getColumnsDiff();return s||c},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,false);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,false);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Se(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e;}_observeRenderChanges(){if(!this.dataSource)return;let e;Se(this.dataSource)?e=this.dataSource.connect(this):jb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=Ic([e,this.viewChange]).pipe(yr(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows();});}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles();}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles();}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(a=>{let c=this._columnDefsByName.get(a);return c}),r=o.map(a=>a.sticky),s=o.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let r=e.viewContainer.get(o);t.push(r.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(r=>!r.when||r.when(t,e));else {let r=this._rowDefs.find(s=>s.when&&s.when(t,e))||this._defaultRowDef;r&&o.push(r);}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return {templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let s=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),s}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))N.mostRecentCellOutlet&&N.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let s=e.get(t).context;s.count=o,s.first=t===0,s.last=t===o-1,s.even=t%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[t].dataIndex,s.renderIndex=t):s.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,false)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,false)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,false)&&(this._stickyColumnStylesNeedReset=true,this.updateStickyColumnStyles());}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new ce(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(yr(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ab:xb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Yb(0,t),yr(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Ic([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a){let c=r.offsets[s],d=o!==0?Math.max(o-c,c):-c;for(let u of a)u.style.top=`${-d}px`;}}}),Ic([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a)for(let c of a)c.style.bottom=`${o+r.offsets[s]}px`;}});}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),s=r.rootNodes[0];if(r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE){s.setAttribute("role","row"),s.classList.add(...e._contentClassNames);let a=s.querySelectorAll(e._cellSelector);for(let c=0;c<a.length;c++)a[c].classList.add(...e._cellClassNames);}}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<o.start||e.end>o.end;let s=e.start-o.start,a=e.end-e.start,c,d;for(let y=0;y<a;y++){let _=r.get(y+s);if(_&&_.rootNodes.length){c=d=_.rootNodes[0];break}}for(let y=a-1;y>-1;y--){let _=r.get(y+s);if(_&&_.rootNodes.length){d=_.rootNodes[_.rootNodes.length-1];break}}let u=c?.getBoundingClientRect?.(),h=d?.getBoundingClientRect?.();return u&&h?h.bottom-u.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,ne,5)(r,U,5)(r,oe,5)(r,W,5)(r,fe,5),t&2){let s;uC(s=lC())&&(o._noDataRow=s.first),uC(s=lC())&&(o._contentColumnDefs=s),uC(s=lC())&&(o._contentRowDefs=s),uC(s=lC())&&(o._contentHeaderRowDefs=s),uC(s=lC())&&(o._contentFooterRowDefs=s);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("cdk-table-fixed-layout",o.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Et],fixedLayout:[2,"fixedLayout","fixedLayout",Et],recycleRows:[2,"recycleRows","recycleRows",Et]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[gy([{provide:R,useExisting:i},{provide:Q,useValue:null}])],ngContentSelectors:nt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ot),nt$1(0),nt$1(1,1),ni$1(2,rt,1,0),ni$1(3,st,7,0)(4,at,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.cdk-table-fixed-layout {
1
+ import {cI as dt$1,bt as En,aV as q,cJ as Rv,ba as Zb,by as Ce,cK as Ic,aw as O,B as pe$1,C as ce$1,J as Jr,aG as um,A as Ae,aI as qr,H as or,L as nt$1,v as ni$1,Q as Qo,y as ri$1,aK as gy,F as y,D as Dt,aH as tt,aJ as Et,cs as Gg,h,aL as Qg,aM as uC,aN as lC,bj as Bt,cL as Ay,b4 as Ny,aS as ue$1,bA as QS,cd as be,cM as A,bZ as Y,cN as Ee,aQ as k,aU as ke,b8 as Aa,aA as yr,cO as ut$1,cP as g,cQ as Se,cR as Z,cS as jb,cT as Yb,cU as Ab,cV as xb,aO as Gr,bL as Ur,b0 as ha,b_ as Gl,f as fa,E as Ed}from'./main-4Q33BLD3.js';var ot=[[["caption"]],[["colgroup"],["col"]],"*"],nt=["caption","colgroup, col","*"];function rt(i,n){i&1&&nt$1(0,2);}function st(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",0),Gg(3,2)(4,3),Ed(),fa(5,"tfoot",0),Gg(6,4),Ed());}function at(i,n){i&1&&Gg(0,1)(1,2)(2,3)(3,4);}var R=new y("CDK_TABLE");var te=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),ie=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Qe=(()=>{class i{template=h(Ur);static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),U=(()=>{class i{_table=h(R,{optional:true});_hasStickyChanged=false;get name(){return this._name}set name(e){this._setNameInput(e);}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=true);}_stickyEnd=false;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`];}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName());}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,te,5)(r,ie,5)(r,Qe,5),t&2){let s;uC(s=lC())&&(o.cell=s.first),uC(s=lC())&&(o.headerCell=s.first),uC(s=lC())&&(o.footerCell=s.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Et],stickyEnd:[2,"stickyEnd","stickyEnd",Et]}})}return i})(),ee=class{constructor(n,e){e.nativeElement.classList.add(...n._columnCssClassName);}},We=(()=>{class i extends ee{constructor(){super(h(U),h(ue$1));}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[qr]})}return i})();var $e=(()=>{class i extends ee{constructor(){let e=h(U),t=h(ue$1);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[qr]})}return i})();var de=(()=>{class i{template=h(Ur);_differs=h(Ay);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t);}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof W?e.headerCell.template:this instanceof fe?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,features:[ha]})}return i})(),W=(()=>{class i extends de{_table=h(R,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),fe=(()=>{class i extends de{_table=h(R,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Et]},features:[qr,ha]})}return i})(),oe=(()=>{class i extends de{_table=h(R,{optional:true});when;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275dir=tt({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[qr]})}return i})(),N=(()=>{class i{_viewContainer=h(Gr);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this;}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null);}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),ue=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})();var he=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&Gg(0,0);},dependencies:[N],encapsulation:2,changeDetection:1})}return i})(),ne=(()=>{class i{templateRef=h(Ur);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Ue=["top","bottom","left","right"],ce=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(n=>this._updateCachedSizes(n)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(n,e,t=true,o=true,r,s,a){this._isNativeHtmlTable=n,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=s,this._tableInjector=a,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(n,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(n);let t=[];for(let o of n)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Gl({write:()=>{for(let o of t)this._removeStickyStyle(o,e);}},{injector:this._tableInjector});}updateStickyColumns(n,e,t,o=true,r=true){if(!n.length||!this._isBrowser||!(e.some(D=>D)||t.some(D=>D))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let s=n[0],a=s.children.length,c=this.direction==="rtl",d=c?"right":"left",u=c?"left":"right",h=e.lastIndexOf(true),y=t.indexOf(true),_,we,Ce;r&&this._updateStickyColumnReplayQueue({rows:[...n],stickyStartStates:[...e],stickyEndStates:[...t]}),Gl({earlyRead:()=>{_=this._getCellWidths(s,o),we=this._getStickyStartColumnPositions(_,e),Ce=this._getStickyEndColumnPositions(_,t);},write:()=>{for(let D of n)for(let w=0;w<a;w++){let De=D.children[w];e[w]&&this._addStickyStyle(De,d,we[w],w===h),t[w]&&this._addStickyStyle(De,u,Ce[w],w===y);}this._positionListener&&_.some(D=>!!D)&&(this._positionListener.stickyColumnsUpdated({sizes:h===-1?[]:_.slice(0,h+1).map((D,w)=>e[w]?D:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:y===-1?[]:_.slice(y).map((D,w)=>t[w+y]?D:null).reverse()}));}},{injector:this._tableInjector});}stickRows(n,e,t){if(!this._isBrowser)return;let o=t==="bottom"?n.slice().reverse():n,r=t==="bottom"?e.slice().reverse():e,s=[],a=[],c=[];Gl({earlyRead:()=>{for(let d=0,u=0;d<o.length;d++){if(!r[d])continue;s[d]=u;let h=o[d];c[d]=this._isNativeHtmlTable?Array.from(h.children):[h];let y=this._retrieveElementSize(h).height;u+=y,a[d]=y;}},write:()=>{let d=r.lastIndexOf(true);for(let u=0;u<o.length;u++){if(!r[u])continue;let h=s[u],y=u===d;for(let _ of c[u])this._addStickyStyle(_,t,h,y);}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:s,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:s,elements:c});}},{injector:this._tableInjector});}updateStickyFooterContainer(n,e){this._isNativeHtmlTable&&Gl({write:()=>{let t=n.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,false));}},{injector:this._tableInjector});}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=true;}_removeStickyStyle(n,e){if(!n.classList.contains(this._stickCellCss))return;for(let o of e)n.style[o]="",n.classList.remove(this._borderCellCss[o]);Ue.some(o=>e.indexOf(o)===-1&&n.style[o])?n.style.zIndex=this._getCalculatedZIndex(n):(n.style.zIndex="",this._needsPositionStickyOnElement&&(n.style.position=""),n.classList.remove(this._stickCellCss));}_addStickyStyle(n,e,t,o){n.classList.add(this._stickCellCss),o&&n.classList.add(this._borderCellCss[e]),n.style[e]=`${t}px`,n.style.zIndex=this._getCalculatedZIndex(n),this._needsPositionStickyOnElement&&(n.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(n){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Ue)n.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(n,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=n.children;for(let r=0;r<o.length;r++){let s=o[r];t.push(this._retrieveElementSize(s).width);}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(n,e){let t=[],o=0;for(let r=0;r<n.length;r++)e[r]&&(t[r]=o,o+=n[r]);return t}_getStickyEndColumnPositions(n,e){let t=[],o=0;for(let r=n.length;r>0;r--)e[r]&&(t[r]=o,o+=n[r]);return t}_retrieveElementSize(n){let e=this._elemSizeCache.get(n);if(e)return e;let t=n.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(n,o),this._resizeObserver.observe(n,{box:"border-box"})),o}_updateStickyColumnReplayQueue(n){this._removeFromStickyColumnReplayQueue(n.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(n);}_removeFromStickyColumnReplayQueue(n){let e=new Set(n);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length);}_updateCachedSizes(n){let e=false;for(let t of n){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&lt(t.target)&&(e=true),this._elemSizeCache.set(t.target,o);}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,true,false);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null;}},0));}};function lt(i){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(n=>i.classList.contains(n))}var Q=new y("STICKY_POSITIONING_LISTENER");var me=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","rowOutlet",""]]})}return i})(),ye=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),_e=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),pe=(()=>{class i{viewContainer=h(Gr);elementRef=h(ue$1);constructor(){let e=h(R);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=tt({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),ge=(()=>{class i{_differs=h(Ay);_changeDetectorRef=h(Ny);_elementRef=h(ue$1);_dir=h(QS,{optional:true});_platform=h(be);_viewRepeater;_viewportRuler=h(A);_injector=h(Y);_virtualScrollViewport=h(Ee,{optional:true,host:true});_positionListener=h(Q,{optional:true})||h(Q,{optional:true,skipSelf:true});_document=h(k);_data;_renderedRange;_onDestroy=new q;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=true;_footerRowDefChanged=true;_stickyColumnStylesNeedReset=true;_forceRecalculateCellWidths=true;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=true;_isServer;_isShowingNoDataRow=false;_hasAllOutlets=false;_hasInitialized=false;_headerRowStickyUpdates=new q;_footerRowStickyUpdates=new q;_disableVirtualScrolling=false;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e;}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck());}_dataSource;_dataSourceChanges=new q;_dataStream=new q;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles());}_multiTemplateDataRows=false;get fixedLayout(){return this._virtualScrollEnabled()?true:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=true,this._stickyColumnStylesNeedReset=true;}_fixedLayout=false;recycleRows=false;contentChanged=new ke;viewChange=new En({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new Aa("role"),{optional:true})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(yr(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut$1:new g,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=true;}ngAfterContentChecked(){this._canRender()&&this._render();}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear();}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Se(this.dataSource)&&this.dataSource.disconnect(this);}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,r,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===Z.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.item.data;}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles();}addColumnDef(e){this._customColumnDefs.add(e);}removeColumnDef(e){this._customColumnDefs.delete(e);}addRowDef(e){this._customRowDefs.add(e);}removeRowDef(e){this._customRowDefs.delete(e);}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=true;}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=true;}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=true;}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=true;}setNoDataRow(e){this._customNoDataRow=e;}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none");}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=Ve(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none");}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((r,s)=>{this._addStickyColumnStyles([r],this._headerRowDefs[s]);}),this._rowDefs.forEach(r=>{let s=[];for(let a=0;a<t.length;a++)this._renderRows[a].rowDef===r&&s.push(t[a]);this._addStickyColumnStyles(s,r);}),o.forEach((r,s)=>{this._addStickyColumnStyles([r],this._footerRowDefs[s]);}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged());}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e);}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e);}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e);}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e);}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=true,this._canRender()&&this._render());}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=false),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=false),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates();}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return [];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let s=this._data[r],a=this._getRenderRowsForData(s,r,o.get(s));this._cachedRenderRowsMap.has(s)||this._cachedRenderRowsMap.set(s,new WeakMap);for(let c=0;c<a.length;c++){let d=a[c],u=this._cachedRenderRowsMap.get(d.data);u.has(d.rowDef)?u.get(d.rowDef).push(d):u.set(d.rowDef,[d]),e.push(d);}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(s=>{let a=o&&o.has(s)?o.get(s):[];if(a.length){let c=a.shift();return c.dataIndex=t,c}else return {data:e,rowDef:s,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),J(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t);});}_cacheRowDefs(){this._headerRowDefs=J(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=J(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=J(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(s,a)=>{let c=!!a.getColumnsDiff();return s||c},t=this._rowDefs.reduce(e,false);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,false);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,false);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Se(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e;}_observeRenderChanges(){if(!this.dataSource)return;let e;Se(this.dataSource)?e=this.dataSource.connect(this):jb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=Ic([e,this.viewChange]).pipe(yr(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows();});}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles();}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles();}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(a=>{let c=this._columnDefsByName.get(a);return c}),r=o.map(a=>a.sticky),s=o.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,s,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let r=e.viewContainer.get(o);t.push(r.rootNodes[0]);}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return [this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(r=>!r.when||r.when(t,e));else {let r=this._rowDefs.find(s=>s.when&&s.when(t,e))||this._defaultRowDef;r&&o.push(r);}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return {templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let s=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),s}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))N.mostRecentCellOutlet&&N.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let s=e.get(t).context;s.count=o,s.first=t===0,s.last=t===o-1,s.even=t%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[t].dataIndex,s.renderIndex=t):s.index=this._renderRows[t].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,false)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,false)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,false)&&(this._stickyColumnStylesNeedReset=true,this.updateStickyColumnStyles());}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new ce(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(yr(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ab:xb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Yb(0,t),yr(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Ic([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a){let c=r.offsets[s],d=o!==0?Math.max(o-c,c):-c;for(let u of a)u.style.top=`${-d}px`;}}}),Ic([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(yr(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let s=0;s<r.elements.length;s++){let a=r.elements[s];if(a)for(let c of a)c.style.bottom=`${o+r.offsets[s]}px`;}});}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),s=r.rootNodes[0];if(r.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE){s.setAttribute("role","row"),s.classList.add(...e._contentClassNames);let a=s.querySelectorAll(e._cellSelector);for(let c=0;c<a.length;c++)a[c].classList.add(...e._cellClassNames);}}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<o.start||e.end>o.end;let s=e.start-o.start,a=e.end-e.start,c,d;for(let y=0;y<a;y++){let _=r.get(y+s);if(_&&_.rootNodes.length){c=d=_.rootNodes[0];break}}for(let y=a-1;y>-1;y--){let _=r.get(y+s);if(_&&_.rootNodes.length){d=_.rootNodes[_.rootNodes.length-1];break}}let u=c?.getBoundingClientRect?.(),h=d?.getBoundingClientRect?.();return u&&h?h.bottom-u.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Qg(r,ne,5)(r,U,5)(r,oe,5)(r,W,5)(r,fe,5),t&2){let s;uC(s=lC())&&(o._noDataRow=s.first),uC(s=lC())&&(o._contentColumnDefs=s),uC(s=lC())&&(o._contentRowDefs=s),uC(s=lC())&&(o._contentHeaderRowDefs=s),uC(s=lC())&&(o._contentFooterRowDefs=s);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("cdk-table-fixed-layout",o.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Et],fixedLayout:[2,"fixedLayout","fixedLayout",Et],recycleRows:[2,"recycleRows","recycleRows",Et]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[gy([{provide:R,useExisting:i},{provide:Q,useValue:null}])],ngContentSelectors:nt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ot),nt$1(0),nt$1(1,1),ni$1(2,rt,1,0),ni$1(3,st,7,0)(4,at,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.cdk-table-fixed-layout {
2
2
  table-layout: fixed;
3
3
  }
4
4
  `],encapsulation:2,changeDetection:1})}return i})();function J(i,n){return i.concat(Array.from(n))}function Ve(i,n){let e=n.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode;}return null}var qe=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=pe$1({type:i});static \u0275inj=ce$1({imports:[Bt]})}return i})();var ct=[[["caption"]],[["colgroup"],["col"]],"*"],dt=["caption","colgroup, col","*"];function ft(i,n){i&1&&nt$1(0,2);}function ut(i,n){i&1&&(fa(0,"thead",0),Gg(1,1),Ed(),fa(2,"tbody",2),Gg(3,3)(4,4),Ed(),fa(5,"tfoot",0),Gg(6,5),Ed());}function ht(i,n){i&1&&Gg(0,1)(1,3)(2,4)(3,5);}var Zt=(()=>{class i extends ge{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=false;static \u0275fac=(()=>{let e;return function(o){return (e||(e=um(i)))(o||i)}})();static \u0275cmp=Ae({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&Dt("mat-table-fixed-layout",o.fixedLayout);},exportAs:["matTable"],features:[gy([{provide:ge,useExisting:i},{provide:R,useExisting:i},{provide:Q,useValue:null}]),qr],ngContentSelectors:dt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(or(ct),nt$1(0),nt$1(1,1),ni$1(2,ft,1,0),ni$1(3,ut,7,0)(4,ht,4,0)),t&2&&(Qo(2),ri$1(o._isServer?2:-1),Qo(),ri$1(o._isNativeHtmlTable?3:4));},dependencies:[ye,me,pe,_e],styles:[`.mat-mdc-table-sticky {
@@ -1,4 +1,4 @@
1
- import {h,F as y,aW as ff,bZ as Y,aP as ro,aV as q,cu as qb,aE as xc,aa as M,bg as Q,cv as je$1,cp as F,cw as Le$1,cx as Xe$1,c7 as Xt,aZ as at,c8 as q$1,cy as wt,cz as Ft,bL as Ur,a_ as $$1,bA as QS,bU as ao,aY as wt$1,ba as Zb,bb as Yv,aU as ke,aG as um,A as Ae,a$ as Wi,aI as qr,f as fa,b1 as jg,E as Ed,bK as qg,r as rr,D as Dt,B as pe,C as ce,bX as di,aC as Pe$1,J as Jr,aS as ue,aH as tt,b0 as ha,c as Yg,cA as Aw,cB as pt,cC as vM,cD as zv,aR as P,b3 as sf,aT as ti,b4 as Ny,cd as be,aQ as k,b_ as Gl,cE as rM,b2 as Xg,aM as uC,aN as lC,g as Ye$1,cF as oM,cG as EM,cH as At}from'./main-JNLIQ323.js';function ze(i,a){}var g=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=true;backdropClass="";disableClose=false;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=false;autoFocus="first-tabbable";restoreFocus=true;scrollStrategy;closeOnNavigation=true;closeOnDestroy=true;closeOnOverlayDetachments=true;disableAnimations=false;providers;container;templateContext;bindings};var K=(()=>{class i extends pt{_elementRef=h(ue);_focusTrapFactory=h(vM);_config;_interactivityChecker=h(zv);_ngZone=h(P);_focusMonitor=h(sf);_renderer=h(ti);_changeDetectorRef=h(Ny);_injector=h(Y);_platform=h(be);_document=h(k);_portalOutlet;_focusTrapped=new q;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=false;constructor(){super(),this._config=h(g,{optional:true})||new g,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck();}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck());}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus();}_captureInitialFocus(){this._trapFocus();}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=true,this._restoreFocus();}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus();}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{o(),l(),e.removeAttribute("tabindex");},o=this._renderer.listen(e,"blur",n),l=this._renderer.listen(e,"mousedown",n);})),e.focus(t);}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t);}_trapFocus(e){this._isDestroyed||Gl(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case false:case "dialog":this._containsFocus()||t.focus(e);break;case true:case "first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next();},{injector:this._injector});}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=rM(),o=this._elementRef.nativeElement;(!n||n===this._document.body||n===o||o.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus());}this._focusTrap&&this._focusTrap.destroy();}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e);}_containsFocus(){let e=this._elementRef.nativeElement,t=rM();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=rM()));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Xg(Wi,7),t&2){let o;uC(o=lC())&&(n._portalOutlet=o.first);}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&rr("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null);},features:[qr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&jg(0,ze,0,0,"ng-template",0);},dependencies:[Wi],styles:[`.cdk-dialog-container {
1
+ import {h,F as y,aW as ff,bZ as Y,aP as ro,aV as q,cu as qb,aE as xc,aa as M,bg as Q,cv as je$1,cp as F,cw as Le$1,cx as Xe$1,c7 as Xt,aZ as at,c8 as q$1,cy as wt,cz as Ft,bL as Ur,a_ as $$1,bA as QS,bU as ao,aY as wt$1,ba as Zb,bb as Yv,aU as ke,aG as um,A as Ae,a$ as Wi,aI as qr,f as fa,b1 as jg,E as Ed,bK as qg,r as rr,D as Dt,B as pe,C as ce,bX as di,aC as Pe$1,J as Jr,aS as ue,aH as tt,b0 as ha,c as Yg,cA as Aw,cB as pt,cC as vM,cD as zv,aR as P,b3 as sf,aT as ti,b4 as Ny,cd as be,aQ as k,b_ as Gl,cE as rM,b2 as Xg,aM as uC,aN as lC,g as Ye$1,cF as oM,cG as EM,cH as At}from'./main-4Q33BLD3.js';function ze(i,a){}var g=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=true;backdropClass="";disableClose=false;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=false;autoFocus="first-tabbable";restoreFocus=true;scrollStrategy;closeOnNavigation=true;closeOnDestroy=true;closeOnOverlayDetachments=true;disableAnimations=false;providers;container;templateContext;bindings};var K=(()=>{class i extends pt{_elementRef=h(ue);_focusTrapFactory=h(vM);_config;_interactivityChecker=h(zv);_ngZone=h(P);_focusMonitor=h(sf);_renderer=h(ti);_changeDetectorRef=h(Ny);_injector=h(Y);_platform=h(be);_document=h(k);_portalOutlet;_focusTrapped=new q;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=false;constructor(){super(),this._config=h(g,{optional:true})||new g,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck();}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck());}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus();}_captureInitialFocus(){this._trapFocus();}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=true,this._restoreFocus();}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus();}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{o(),l(),e.removeAttribute("tabindex");},o=this._renderer.listen(e,"blur",n),l=this._renderer.listen(e,"mousedown",n);})),e.focus(t);}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t);}_trapFocus(e){this._isDestroyed||Gl(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case false:case "dialog":this._containsFocus()||t.focus(e);break;case true:case "first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case "first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next();},{injector:this._injector});}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=rM(),o=this._elementRef.nativeElement;(!n||n===this._document.body||n===o||o.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus());}this._focusTrap&&this._focusTrap.destroy();}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e);}_containsFocus(){let e=this._elementRef.nativeElement,t=rM();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=rM()));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Ae({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Xg(Wi,7),t&2){let o;uC(o=lC())&&(n._portalOutlet=o.first);}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&rr("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null);},features:[qr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&jg(0,ze,0,0,"ng-template",0);},dependencies:[Wi],styles:[`.cdk-dialog-container {
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -1,4 +1,4 @@
1
- import {y}from'./chunk-CNqkQ8sx.js';import {h,S as St,p as pb,A as Ae,N as Nt$1,I as IW,_ as _W,a as A8,x as x8,o as ot,f as fa,k as kC,E as Ed,z as zg,G as GC,q as qw,Q as Qo,u as uy,K as KC,Z as Zw,b as xy,Y as YV,n as nT,r as rr,$ as $g,l as ly,e as eC,c as Yg,d as rn,g as Ye,V as Vs,i as bt$1,j as nS,s as st,m as nt,t as py,v as ni,P as PC,D as Dt,w as $C,y as ri,B as pe,C as ce$1,J as Jr,F as y$1,H as or,L as nt$1,M as $t$1,O as vt,R as sC,T as jC,U as YC,W as ZC,X as ii,a0 as Vp,a1 as Hp,a2 as Cd,a3 as Om}from'./main-JNLIQ323.js';import {I}from'./chunk-DyRJ_Grj.js';import {e as ee$1}from'./chunk-ClIwjGK_.js';import {_}from'./chunk-DEjDJvry.js';var wt=["*"];var Mt=new y$1("MAT_CARD_CONFIG"),_t=(()=>{class e{appearance;constructor(){let t=h(Mt,{optional:true});this.appearance=t?.appearance||"raised";}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=Ae({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(s,d){s&2&&Dt("mat-mdc-card-outlined",d.appearance==="outlined")("mdc-card--outlined",d.appearance==="outlined")("mat-mdc-card-filled",d.appearance==="filled")("mdc-card--filled",d.appearance==="filled");},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:wt,decls:1,vars:0,template:function(s,d){s&1&&(or(),nt$1(0));},styles:[`.mat-mdc-card {
1
+ import {y}from'./chunk-DI3QSFg9.js';import {h,S as St,p as pb,A as Ae,N as Nt$1,I as IW,_ as _W,a as A8,x as x8,o as ot,f as fa,k as kC,E as Ed,z as zg,G as GC,q as qw,Q as Qo,u as uy,K as KC,Z as Zw,b as xy,Y as YV,n as nT,r as rr,$ as $g,l as ly,e as eC,c as Yg,d as rn,g as Ye,V as Vs,i as bt$1,j as nS,s as st,m as nt,t as py,v as ni,P as PC,D as Dt,w as $C,y as ri,B as pe,C as ce$1,J as Jr,F as y$1,H as or,L as nt$1,M as $t$1,O as vt,R as sC,T as jC,U as YC,W as ZC,X as ii,a0 as Vp,a1 as Hp,a2 as Cd,a3 as Om}from'./main-4Q33BLD3.js';import {I}from'./chunk-Aooj_ST7.js';import {e as ee$1}from'./chunk-C_DeZqXA.js';import {_}from'./chunk-D9NghTGy.js';var wt=["*"];var Mt=new y$1("MAT_CARD_CONFIG"),_t=(()=>{class e{appearance;constructor(){let t=h(Mt,{optional:true});this.appearance=t?.appearance||"raised";}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=Ae({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(s,d){s&2&&Dt("mat-mdc-card-outlined",d.appearance==="outlined")("mdc-card--outlined",d.appearance==="outlined")("mat-mdc-card-filled",d.appearance==="filled")("mdc-card--filled",d.appearance==="filled");},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:wt,decls:1,vars:0,template:function(s,d){s&1&&(or(),nt$1(0));},styles:[`.mat-mdc-card {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  box-sizing: border-box;
@@ -1 +1 @@
1
- import {b as xy,aJ as Et,A as Ae,a as A8,x as x8,H as or,v as ni,L as nt,y as ri,X as ii,D as Dt,f as fa,k as kC,E as Ed,R as sC,Q as Qo,u as uy,z as zg}from'./main-JNLIQ323.js';var v=["*"];function P(o,i){if(o&1&&(fa(0,"mat-icon",2),kC(1),Ed()),o&2){let e=sC();Dt("sf-spin",e.spin()),Qo(),uy(e.icon());}}function O(o,i){o&1&&zg(0,"span",1);}var _=class o{tone=xy("neutral");icon=xy();spin=xy(false,{transform:Et});dot=xy(false,{transform:Et});size=xy("md");static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Ae({type:o,selectors:[["sf-status-chip"]],hostVars:4,hostBindings:function(e,t){e&2&&(ii("sf-chip sf-chip--"+t.tone()),Dt("sf-chip--sm",t.size()==="sm"));},inputs:{tone:[1,"tone"],icon:[1,"icon"],spin:[1,"spin"],dot:[1,"dot"],size:[1,"size"]},ngContentSelectors:v,decls:3,vars:1,consts:[["aria-hidden","true",3,"sf-spin"],["aria-hidden","true",1,"dot"],["aria-hidden","true"]],template:function(e,t){e&1&&(or(),ni(0,P,2,3,"mat-icon",0)(1,O,1,0,"span",1),nt(2)),e&2&&ri(t.icon()?0:t.dot()?1:-1);},dependencies:[A8,x8],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:999px;border:1px solid;font-size:13px;font-weight:700;white-space:nowrap}.sf-chip--sm[_nghost-%COMP%]{height:24px;padding:0 10px;font-size:12.5px}mat-icon[_ngcontent-%COMP%]{width:14px;height:14px;font-size:14px}.dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--sf-success)}.sf-chip--blue[_nghost-%COMP%]{color:var(--sf-running);border-color:#33486e;background:#121a2b}.sf-chip--amber[_nghost-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b;font-weight:600}.sf-chip--green[_nghost-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.sf-chip--red[_nghost-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.sf-chip--neutral[_nghost-%COMP%]{color:var(--sf-text-muted);border-color:var(--sf-outline-strong);background:var(--sf-surface-2)}.sf-chip--violet[_nghost-%COMP%]{color:#e3d6ff;border-color:#4b3d80;background:#2a2145}.sf-chip--cyan[_nghost-%COMP%]{color:var(--sf-secondary);border-color:#2c5d63;background:#0e1d21}"]})};export{_};
1
+ import {b as xy,aJ as Et,A as Ae,a as A8,x as x8,H as or,v as ni,L as nt,y as ri,X as ii,D as Dt,f as fa,k as kC,E as Ed,R as sC,Q as Qo,u as uy,z as zg}from'./main-4Q33BLD3.js';var v=["*"];function P(o,i){if(o&1&&(fa(0,"mat-icon",2),kC(1),Ed()),o&2){let e=sC();Dt("sf-spin",e.spin()),Qo(),uy(e.icon());}}function O(o,i){o&1&&zg(0,"span",1);}var _=class o{tone=xy("neutral");icon=xy();spin=xy(false,{transform:Et});dot=xy(false,{transform:Et});size=xy("md");static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Ae({type:o,selectors:[["sf-status-chip"]],hostVars:4,hostBindings:function(e,t){e&2&&(ii("sf-chip sf-chip--"+t.tone()),Dt("sf-chip--sm",t.size()==="sm"));},inputs:{tone:[1,"tone"],icon:[1,"icon"],spin:[1,"spin"],dot:[1,"dot"],size:[1,"size"]},ngContentSelectors:v,decls:3,vars:1,consts:[["aria-hidden","true",3,"sf-spin"],["aria-hidden","true",1,"dot"],["aria-hidden","true"]],template:function(e,t){e&1&&(or(),ni(0,P,2,3,"mat-icon",0)(1,O,1,0,"span",1),nt(2)),e&2&&ri(t.icon()?0:t.dot()?1:-1);},dependencies:[A8,x8],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 12px;border-radius:999px;border:1px solid;font-size:13px;font-weight:700;white-space:nowrap}.sf-chip--sm[_nghost-%COMP%]{height:24px;padding:0 10px;font-size:12.5px}mat-icon[_ngcontent-%COMP%]{width:14px;height:14px;font-size:14px}.dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--sf-success)}.sf-chip--blue[_nghost-%COMP%]{color:var(--sf-running);border-color:#33486e;background:#121a2b}.sf-chip--amber[_nghost-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b;font-weight:600}.sf-chip--green[_nghost-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.sf-chip--red[_nghost-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.sf-chip--neutral[_nghost-%COMP%]{color:var(--sf-text-muted);border-color:var(--sf-outline-strong);background:var(--sf-surface-2)}.sf-chip--violet[_nghost-%COMP%]{color:#e3d6ff;border-color:#4b3d80;background:#2a2145}.sf-chip--cyan[_nghost-%COMP%]{color:var(--sf-secondary);border-color:#2c5d63;background:#0e1d21}"]})};export{_};
@@ -1 +1 @@
1
- import {b as xy,n as nT,A as Ae,a as A8,x as x8,M as $t,O as vt,H as or,f as fa,k as kC,E as Ed,L as nt,$ as $g,r as rr,Q as Qo,u as uy}from'./main-JNLIQ323.js';var v=["*"],y=class a{icon=xy.required();label=xy("");unknownCostCount=xy(0);tooltip=nT(()=>{let t=this.label(),e=this.unknownCostCount();return e>0?`${t} \xB7 ${e} round(s) with unknown cost (floor value)`:t});static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Ae({type:a,selectors:[["sf-metric"]],inputs:{icon:[1,"icon"],label:[1,"label"],unknownCostCount:[1,"unknownCostCount"]},ngContentSelectors:v,decls:4,vars:3,consts:[[1,"metric",3,"matTooltip"],["aria-hidden","true"]],template:function(e,n){e&1&&(or(),fa(0,"span",0)(1,"mat-icon",1),kC(2),Ed(),nt(3),Ed()),e&2&&($g("matTooltip",n.tooltip()),rr("aria-label",n.tooltip()),Qo(2),uy(n.icon()));},dependencies:[A8,x8,$t,vt],styles:[".metric[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:8px;border:1px solid var(--sf-outline);background:var(--sf-surface);font-family:var(--sf-mono);font-size:13px;font-weight:600;color:var(--sf-text)}mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-text-muted)}"]})};export{y};
1
+ import {b as xy,n as nT,A as Ae,a as A8,x as x8,M as $t,O as vt,H as or,f as fa,k as kC,E as Ed,L as nt,$ as $g,r as rr,Q as Qo,u as uy}from'./main-4Q33BLD3.js';var v=["*"],y=class a{icon=xy.required();label=xy("");unknownCostCount=xy(0);tooltip=nT(()=>{let t=this.label(),e=this.unknownCostCount();return e>0?`${t} \xB7 ${e} round(s) with unknown cost (floor value)`:t});static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Ae({type:a,selectors:[["sf-metric"]],inputs:{icon:[1,"icon"],label:[1,"label"],unknownCostCount:[1,"unknownCostCount"]},ngContentSelectors:v,decls:4,vars:3,consts:[[1,"metric",3,"matTooltip"],["aria-hidden","true"]],template:function(e,n){e&1&&(or(),fa(0,"span",0)(1,"mat-icon",1),kC(2),Ed(),nt(3),Ed()),e&2&&($g("matTooltip",n.tooltip()),rr("aria-label",n.tooltip()),Qo(2),uy(n.icon()));},dependencies:[A8,x8,$t,vt],styles:[".metric[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:8px;border:1px solid var(--sf-outline);background:var(--sf-surface);font-family:var(--sf-mono);font-size:13px;font-weight:600;color:var(--sf-text)}mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;color:var(--sf-text-muted)}"]})};export{y};
@@ -1,4 +1,4 @@
1
- import {B as pe,C as ce,J as Jr,h,aS as ue,F as y,cq as TM,A as Ae,cr as JT,be as Ld,b1 as jg,f as fa,bp as Jp,z as zg,E as Ed,bH as eh,cs as Gg,bF as fC,Q as Qo,r as rr,bf as ry,$ as $g,X as ii,D as Dt,b2 as Xg,aM as uC,aN as lC,R as sC,ct as QC}from'./main-JNLIQ323.js';var I=["determinateSpinner"];function z(i,V){if(i&1&&(Jp(),fa(0,"svg",11),zg(1,"circle",12),Ed()),i&2){let e=sC();rr("viewBox",e._viewBox()),Qo(),ry("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),rr("r",e._circleRadius());}}var D=new y("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:O})}),O=100,N=10,Z=(()=>{class i{_elementRef=h(ue);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e;}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=h(D),n=TM(),r=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=r.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&r.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0));}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0;}_diameter=O;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0;}_strokeWidth;_circleRadius(){return (this.diameter-N)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return `0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Ae({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(n&1&&Xg(I,5),n&2){let s;uC(s=lC())&&(r._determinateCircle=s.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){n&2&&(rr("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),ii("mat-"+r.color),ry("width",r.diameter,"px")("height",r.diameter,"px")("--mat-progress-spinner-size",r.diameter+"px")("--mat-progress-spinner-active-indicator-width",r.diameter+"px"),Dt("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",Ld],diameter:[2,"diameter","diameter",Ld],strokeWidth:[2,"strokeWidth","strokeWidth",Ld]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(n&1&&(jg(0,z,2,8,"ng-template",null,0,QC),fa(2,"div",2,1),Jp(),fa(4,"svg",3),zg(5,"circle",4),Ed()(),eh(),fa(6,"div",5)(7,"div",6)(8,"div",7),Gg(9,8),Ed(),fa(10,"div",9),Gg(11,8),Ed(),fa(12,"div",10),Gg(13,8),Ed()()()),n&2){let s=fC(1);Qo(4),rr("viewBox",r._viewBox()),Qo(),ry("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),rr("r",r._circleRadius()),Qo(4),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s);}},dependencies:[JT],styles:[`.mat-mdc-progress-spinner {
1
+ import {B as pe,C as ce,J as Jr,h,aS as ue,F as y,cq as TM,A as Ae,cr as JT,be as Ld,b1 as jg,f as fa,bp as Jp,z as zg,E as Ed,bH as eh,cs as Gg,bF as fC,Q as Qo,r as rr,bf as ry,$ as $g,X as ii,D as Dt,b2 as Xg,aM as uC,aN as lC,R as sC,ct as QC}from'./main-4Q33BLD3.js';var I=["determinateSpinner"];function z(i,V){if(i&1&&(Jp(),fa(0,"svg",11),zg(1,"circle",12),Ed()),i&2){let e=sC();rr("viewBox",e._viewBox()),Qo(),ry("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),rr("r",e._circleRadius());}}var D=new y("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:O})}),O=100,N=10,Z=(()=>{class i{_elementRef=h(ue);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e;}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=h(D),n=TM(),r=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=r.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&r.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0));}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0;}_diameter=O;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0;}_strokeWidth;_circleRadius(){return (this.diameter-N)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return `0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Ae({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(n&1&&Xg(I,5),n&2){let s;uC(s=lC())&&(r._determinateCircle=s.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){n&2&&(rr("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),ii("mat-"+r.color),ry("width",r.diameter,"px")("height",r.diameter,"px")("--mat-progress-spinner-size",r.diameter+"px")("--mat-progress-spinner-active-indicator-width",r.diameter+"px"),Dt("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",Ld],diameter:[2,"diameter","diameter",Ld],strokeWidth:[2,"strokeWidth","strokeWidth",Ld]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(n&1&&(jg(0,z,2,8,"ng-template",null,0,QC),fa(2,"div",2,1),Jp(),fa(4,"svg",3),zg(5,"circle",4),Ed()(),eh(),fa(6,"div",5)(7,"div",6)(8,"div",7),Gg(9,8),Ed(),fa(10,"div",9),Gg(11,8),Ed(),fa(12,"div",10),Gg(13,8),Ed()()()),n&2){let s=fC(1);Qo(4),rr("viewBox",r._viewBox()),Qo(),ry("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),rr("r",r._circleRadius()),Qo(4),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s),Qo(2),$g("ngTemplateOutlet",s);}},dependencies:[JT],styles:[`.mat-mdc-progress-spinner {
2
2
  --mat-progress-spinner-animation-multiplier: 1;
3
3
  display: block;
4
4
  overflow: hidden;
@@ -1 +1 @@
1
- import {I}from'./chunk-DyRJ_Grj.js';import {e as ee$1}from'./chunk-ClIwjGK_.js';import {c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai}from'./chunk-DRZVzb9J.js';import {_}from'./chunk-DEjDJvry.js';import {h,a4 as fb,g as Ye,p as pb,aw as O,A as Ae,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,v as ni$1,c as Yg,z as zg,bQ as _d,b1 as jg,bR as Id,Q as Qo,$ as $g,a2 as Cd,y as ri$1,u as uy,e as eC,R as sC,a0 as Vp,a1 as Hp}from'./main-JNLIQ323.js';function X(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",29),kC(2,"gpp_bad"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function Y(e,t){e&1&&(fa(0,"span",11),kC(1),Ed()),e&2&&(Qo(),uy(t.name));}function Z(e,t){e&1&&(fa(0,"div",15),kC(1),Ed()),e&2&&(Qo(),uy(t));}function ee(e,t){e&1&&(fa(0,"th",30),kC(1,"Type"),Ed());}function te(e,t){if(e&1&&(fa(0,"td",31),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.workflowType);}}function ne(e,t){e&1&&(fa(0,"th",30),kC(1,"Version"),Ed());}function ie(e,t){if(e&1&&(fa(0,"td",32),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.version);}}function oe(e,t){e&1&&(fa(0,"th",30),kC(1,"Hash"),Ed());}function ae(e,t){if(e&1&&(fa(0,"td",33),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.definitionHash);}}function re(e,t){e&1&&zg(0,"th",30);}function de(e,t){if(e&1){let i=eC();fa(0,"td",34)(1,"button",35),Yg("click",function(){let l=Vp(i).$implicit,f=sC();return Hp(f.deleteDefinition(l))}),kC(2),Ed()();}if(e&2){let i=t.$implicit,n=sC();Qo(),$g("disabled",n.adminDisabled()||n.deletingKey()===n.definitionKey(i)),Qo(),Cd(" ",n.deletingKey()===n.definitionKey(i)?"Deleting\u2026":"Delete"," ");}}function le(e,t){e&1&&zg(0,"tr",36);}function se(e,t){e&1&&zg(0,"tr",37);}function me(e,t){if(e&1&&(fa(0,"p",28),kC(1),Ed()),e&2){let i=sC();Qo(),Cd(" ",i.definitionsLoading()?"Loading\u2026":"No definitions registered."," ");}}var q="FORBIDDEN_ADMIN_REQUIRED";function fe(e){let t=e?.status===403||e?.code===q,i=typeof e?.message=="string"&&e.message.trim()?e.message.trim():null;return t?{forbidden:true,message:`Access denied: ${i??"admin rights required"} (${q})`}:{forbidden:false,message:i??"Admin command failed (network or server error)."}}function pe(e){if(Array.isArray(e))return e;let t=e?.items;return Array.isArray(t)?t:[]}var G=class e{api=h(fb);dialog=h(ee$1);adminDisabled=Ye(false);forbiddenError=Ye(null);definitions=Ye([]);definitionsLoading=Ye(false);uploading=Ye(false);selectedFile=Ye(null);definitionsError=Ye(null);deletingKey=Ye(null);definitionColumns=["workflowType","version","definitionHash","actions"];constructor(){h(pb).crumbs.set([{label:"Workflow definitions"}]),this.loadDefinitions();}loadDefinitions(){this.adminDisabled()||(this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{this.definitions.set(pe(t)),this.definitionsLoading.set(false);},error:t=>{this.applyError(t,i=>this.definitionsError.set(i)),this.definitionsLoading.set(false);}}));}onFileSelected(t){let i=t.target;this.selectedFile.set(i.files?.[0]??null);}uploadDefinition(){if(this.adminDisabled()||this.uploading())return;let t=this.selectedFile();if(!t){this.definitionsError.set("Please select a JSON definition file.");return}this.uploading.set(true),this.definitionsError.set(null),this.api.uploadWorkflowDefinition(t).subscribe({next:()=>{this.selectedFile.set(null),this.uploading.set(false),this.loadDefinitions();},error:i=>{this.applyError(i,n=>this.definitionsError.set(n)),this.uploading.set(false);}});}deleteDefinition(t){if(this.adminDisabled()||this.deletingKey())return;let i=String(t.workflowType??"").trim(),n=String(t.version??"").trim();!i||!n||this.confirm({title:"Delete definition",message:"This will permanently delete the workflow definition. Already running executions are not affected.",detail:`${i}@${n}`,confirmLabel:"Delete",destructive:true}).subscribe(l=>{l&&(this.deletingKey.set(`${i}@${n}`),this.definitionsError.set(null),this.api.deleteWorkflowDefinition(i,n).subscribe({next:()=>{this.deletingKey.set(null),this.loadDefinitions();},error:f=>{this.applyError(f,x=>this.definitionsError.set(x)),this.deletingKey.set(null);}}));});}definitionKey(t){return `${t.workflowType??""}@${t.version??""}`}confirm(t){return this.dialog.open(I,{data:t,width:"440px"}).afterClosed().pipe(O(i=>i===true))}applyError(t,i){let n=fe(t);n.forbidden?(this.adminDisabled.set(true),this.forbiddenError.set(n.message)):i(n.message);}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-admin-page"]],decls:44,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["dot","",3,"tone"],["role","alert","data-admin-forbidden","true",1,"banner","banner--error"],["data-admin-definitions","true",1,"section","sf-panel"],[1,"section-title"],[1,"sf-muted","section-desc"],[1,"row","file-row"],["type","file","accept",".json,application/json","data-admin-definition-file","true",3,"change","disabled"],["data-admin-definition-filename","true",1,"result-chip"],[1,"sf-spacer"],["mat-flat-button","","data-admin-definition-upload","true",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","data-admin-definition-refresh","true",1,"sf-secondary",3,"click","disabled"],["role","alert","data-admin-definition-error","true",1,"banner","banner--warn"],["mat-table","",1,"definitions-table",3,"dataSource"],["matColumnDef","workflowType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","sf-mono","data-definition-type","true",4,"matCellDef"],["matColumnDef","version"],["mat-cell","","class","sf-mono","data-definition-version","true",4,"matCellDef"],["matColumnDef","definitionHash"],["mat-cell","","class","sf-mono","data-definition-hash","true",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["data-definition-empty","true",1,"sf-muted","empty"],["aria-hidden","true"],["mat-header-cell",""],["mat-cell","","data-definition-type","true",1,"sf-mono"],["mat-cell","","data-definition-version","true",1,"sf-mono"],["mat-cell","","data-definition-hash","true",1,"sf-mono"],["mat-cell",""],["mat-stroked-button","","data-admin-definition-delete","true",1,"sf-danger",3,"click","disabled"],["mat-header-row",""],["mat-row",""]],template:function(i,n){if(i&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflow definitions"),Ed(),fa(5,"p",3),kC(6,"Import and manage registered workflow definitions."),Ed()(),fa(7,"sf-status-chip",4),kC(8),Ed()(),ni$1(9,X,5,1,"div",5),fa(10,"section",6)(11,"h2",7),kC(12,"Workflow definitions"),Ed(),fa(13,"p",8),kC(14,"Import a JSON definition (v1 format) and manage registered definitions."),Ed(),fa(15,"div",9)(16,"input",10),Yg("change",function(f){return n.onFileSelected(f)}),Ed(),ni$1(17,Y,2,1,"span",11),zg(18,"span",12),fa(19,"button",13),Yg("click",function(){return n.uploadDefinition()}),fa(20,"mat-icon"),kC(21,"upload"),Ed(),kC(22),Ed(),fa(23,"button",14),Yg("click",function(){return n.loadDefinitions()}),fa(24,"mat-icon"),kC(25,"refresh"),Ed(),kC(26," Refresh "),Ed()(),ni$1(27,Z,2,1,"div",15),fa(28,"table",16),_d(29,17),jg(30,ee,2,0,"th",18)(31,te,2,1,"td",19),Id(),_d(32,20),jg(33,ne,2,0,"th",18)(34,ie,2,1,"td",21),Id(),_d(35,22),jg(36,oe,2,0,"th",18)(37,ae,2,1,"td",23),Id(),_d(38,24),jg(39,re,1,0,"th",18)(40,de,3,2,"td",25),Id(),jg(41,le,1,0,"tr",26)(42,se,1,0,"tr",27),Ed(),ni$1(43,me,2,1,"p",28),Ed()()),i&2){let l,f,x;Qo(7),$g("tone",n.adminDisabled()?"red":"green"),Qo(),Cd(" ",n.adminDisabled()?"Access denied":"Admin"," "),Qo(),ri$1((l=n.forbiddenError())?9:-1,l),Qo(7),$g("disabled",n.adminDisabled()||n.uploading()),Qo(),ri$1((f=n.selectedFile())?17:-1,f),Qo(2),$g("disabled",n.adminDisabled()||n.uploading()),Qo(3),Cd(" ",n.uploading()?"Importing\u2026":"Import definition"," "),Qo(),$g("disabled",n.adminDisabled()||n.definitionsLoading()),Qo(4),ri$1((x=n.definitionsError())?27:-1,x),Qo(),$g("dataSource",n.definitions()),Qo(13),$g("matHeaderRowDef",n.definitionColumns),Qo(),$g("matRowDefColumns",n.definitionColumns),Qo(),ri$1(n.definitions().length===0?43:-1);}},dependencies:[IW,_W,A8,x8,ci,Zt,ei,ni,ti,Jt,ri,ii,oi,si,ai,_],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1100px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px}.section-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700}.section-desc[_ngcontent-%COMP%]{margin:0;font-size:13.5px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-row[_ngcontent-%COMP%]{gap:10px}.file-row[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{color:var(--sf-text-2);font-size:13px}.field[_ngcontent-%COMP%]{width:100%;max-width:480px}.result[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:4px}.result-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:26px;padding:0 12px;border-radius:999px;border:1px solid var(--sf-outline-strong);background:var(--sf-surface-2);color:var(--sf-text-2);font-size:13px;font-weight:600}.result-chip--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.result-chip--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.timestamp[_ngcontent-%COMP%]{color:var(--sf-text-muted);font-size:12.5px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.definitions-table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--sf-chrome);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--sf-text-faint)}td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom-color:#1a1f2c}.empty[_ngcontent-%COMP%]{margin:0;padding:12px 4px;font-size:13.5px}.mat-mdc-unelevated-button.sf-danger[_ngcontent-%COMP%]{background:#6b2a2e;color:#ffd9d9;border-radius:10px;font-weight:700}"]})};export{G as AdminPageComponent,q as FORBIDDEN_ADMIN_REQUIRED,fe as describeAdminError};
1
+ import {I}from'./chunk-Aooj_ST7.js';import {e as ee$1}from'./chunk-C_DeZqXA.js';import {c as ci,Z as Zt,e as ei,n as ni,t as ti,J as Jt,r as ri,i as ii,o as oi,s as si,a as ai}from'./chunk-BvcgLtmT.js';import {_}from'./chunk-D9NghTGy.js';import {h,a4 as fb,g as Ye,p as pb,aw as O,A as Ae,I as IW,_ as _W,a as A8,x as x8,f as fa,k as kC,E as Ed,v as ni$1,c as Yg,z as zg,bQ as _d,b1 as jg,bR as Id,Q as Qo,$ as $g,a2 as Cd,y as ri$1,u as uy,e as eC,R as sC,a0 as Vp,a1 as Hp}from'./main-4Q33BLD3.js';function X(e,t){e&1&&(fa(0,"div",5)(1,"mat-icon",29),kC(2,"gpp_bad"),Ed(),fa(3,"span"),kC(4),Ed()()),e&2&&(Qo(4),uy(t));}function Y(e,t){e&1&&(fa(0,"span",11),kC(1),Ed()),e&2&&(Qo(),uy(t.name));}function Z(e,t){e&1&&(fa(0,"div",15),kC(1),Ed()),e&2&&(Qo(),uy(t));}function ee(e,t){e&1&&(fa(0,"th",30),kC(1,"Type"),Ed());}function te(e,t){if(e&1&&(fa(0,"td",31),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.workflowType);}}function ne(e,t){e&1&&(fa(0,"th",30),kC(1,"Version"),Ed());}function ie(e,t){if(e&1&&(fa(0,"td",32),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.version);}}function oe(e,t){e&1&&(fa(0,"th",30),kC(1,"Hash"),Ed());}function ae(e,t){if(e&1&&(fa(0,"td",33),kC(1),Ed()),e&2){let i=t.$implicit;Qo(),uy(i.definitionHash);}}function re(e,t){e&1&&zg(0,"th",30);}function de(e,t){if(e&1){let i=eC();fa(0,"td",34)(1,"button",35),Yg("click",function(){let l=Vp(i).$implicit,f=sC();return Hp(f.deleteDefinition(l))}),kC(2),Ed()();}if(e&2){let i=t.$implicit,n=sC();Qo(),$g("disabled",n.adminDisabled()||n.deletingKey()===n.definitionKey(i)),Qo(),Cd(" ",n.deletingKey()===n.definitionKey(i)?"Deleting\u2026":"Delete"," ");}}function le(e,t){e&1&&zg(0,"tr",36);}function se(e,t){e&1&&zg(0,"tr",37);}function me(e,t){if(e&1&&(fa(0,"p",28),kC(1),Ed()),e&2){let i=sC();Qo(),Cd(" ",i.definitionsLoading()?"Loading\u2026":"No definitions registered."," ");}}var q="FORBIDDEN_ADMIN_REQUIRED";function fe(e){let t=e?.status===403||e?.code===q,i=typeof e?.message=="string"&&e.message.trim()?e.message.trim():null;return t?{forbidden:true,message:`Access denied: ${i??"admin rights required"} (${q})`}:{forbidden:false,message:i??"Admin command failed (network or server error)."}}function pe(e){if(Array.isArray(e))return e;let t=e?.items;return Array.isArray(t)?t:[]}var G=class e{api=h(fb);dialog=h(ee$1);adminDisabled=Ye(false);forbiddenError=Ye(null);definitions=Ye([]);definitionsLoading=Ye(false);uploading=Ye(false);selectedFile=Ye(null);definitionsError=Ye(null);deletingKey=Ye(null);definitionColumns=["workflowType","version","definitionHash","actions"];constructor(){h(pb).crumbs.set([{label:"Workflow definitions"}]),this.loadDefinitions();}loadDefinitions(){this.adminDisabled()||(this.definitionsLoading.set(true),this.definitionsError.set(null),this.api.getWorkflowDefinitions().subscribe({next:t=>{this.definitions.set(pe(t)),this.definitionsLoading.set(false);},error:t=>{this.applyError(t,i=>this.definitionsError.set(i)),this.definitionsLoading.set(false);}}));}onFileSelected(t){let i=t.target;this.selectedFile.set(i.files?.[0]??null);}uploadDefinition(){if(this.adminDisabled()||this.uploading())return;let t=this.selectedFile();if(!t){this.definitionsError.set("Please select a JSON definition file.");return}this.uploading.set(true),this.definitionsError.set(null),this.api.uploadWorkflowDefinition(t).subscribe({next:()=>{this.selectedFile.set(null),this.uploading.set(false),this.loadDefinitions();},error:i=>{this.applyError(i,n=>this.definitionsError.set(n)),this.uploading.set(false);}});}deleteDefinition(t){if(this.adminDisabled()||this.deletingKey())return;let i=String(t.workflowType??"").trim(),n=String(t.version??"").trim();!i||!n||this.confirm({title:"Delete definition",message:"This will permanently delete the workflow definition. Already running executions are not affected.",detail:`${i}@${n}`,confirmLabel:"Delete",destructive:true}).subscribe(l=>{l&&(this.deletingKey.set(`${i}@${n}`),this.definitionsError.set(null),this.api.deleteWorkflowDefinition(i,n).subscribe({next:()=>{this.deletingKey.set(null),this.loadDefinitions();},error:f=>{this.applyError(f,x=>this.definitionsError.set(x)),this.deletingKey.set(null);}}));});}definitionKey(t){return `${t.workflowType??""}@${t.version??""}`}confirm(t){return this.dialog.open(I,{data:t,width:"440px"}).afterClosed().pipe(O(i=>i===true))}applyError(t,i){let n=fe(t);n.forbidden?(this.adminDisabled.set(true),this.forbiddenError.set(n.message)):i(n.message);}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ae({type:e,selectors:[["sf-admin-page"]],decls:44,vars:13,consts:[[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["dot","",3,"tone"],["role","alert","data-admin-forbidden","true",1,"banner","banner--error"],["data-admin-definitions","true",1,"section","sf-panel"],[1,"section-title"],[1,"sf-muted","section-desc"],[1,"row","file-row"],["type","file","accept",".json,application/json","data-admin-definition-file","true",3,"change","disabled"],["data-admin-definition-filename","true",1,"result-chip"],[1,"sf-spacer"],["mat-flat-button","","data-admin-definition-upload","true",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","data-admin-definition-refresh","true",1,"sf-secondary",3,"click","disabled"],["role","alert","data-admin-definition-error","true",1,"banner","banner--warn"],["mat-table","",1,"definitions-table",3,"dataSource"],["matColumnDef","workflowType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","sf-mono","data-definition-type","true",4,"matCellDef"],["matColumnDef","version"],["mat-cell","","class","sf-mono","data-definition-version","true",4,"matCellDef"],["matColumnDef","definitionHash"],["mat-cell","","class","sf-mono","data-definition-hash","true",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["data-definition-empty","true",1,"sf-muted","empty"],["aria-hidden","true"],["mat-header-cell",""],["mat-cell","","data-definition-type","true",1,"sf-mono"],["mat-cell","","data-definition-version","true",1,"sf-mono"],["mat-cell","","data-definition-hash","true",1,"sf-mono"],["mat-cell",""],["mat-stroked-button","","data-admin-definition-delete","true",1,"sf-danger",3,"click","disabled"],["mat-header-row",""],["mat-row",""]],template:function(i,n){if(i&1&&(fa(0,"div",0)(1,"header",1)(2,"div",2)(3,"h1"),kC(4,"Workflow definitions"),Ed(),fa(5,"p",3),kC(6,"Import and manage registered workflow definitions."),Ed()(),fa(7,"sf-status-chip",4),kC(8),Ed()(),ni$1(9,X,5,1,"div",5),fa(10,"section",6)(11,"h2",7),kC(12,"Workflow definitions"),Ed(),fa(13,"p",8),kC(14,"Import a JSON definition (v1 format) and manage registered definitions."),Ed(),fa(15,"div",9)(16,"input",10),Yg("change",function(f){return n.onFileSelected(f)}),Ed(),ni$1(17,Y,2,1,"span",11),zg(18,"span",12),fa(19,"button",13),Yg("click",function(){return n.uploadDefinition()}),fa(20,"mat-icon"),kC(21,"upload"),Ed(),kC(22),Ed(),fa(23,"button",14),Yg("click",function(){return n.loadDefinitions()}),fa(24,"mat-icon"),kC(25,"refresh"),Ed(),kC(26," Refresh "),Ed()(),ni$1(27,Z,2,1,"div",15),fa(28,"table",16),_d(29,17),jg(30,ee,2,0,"th",18)(31,te,2,1,"td",19),Id(),_d(32,20),jg(33,ne,2,0,"th",18)(34,ie,2,1,"td",21),Id(),_d(35,22),jg(36,oe,2,0,"th",18)(37,ae,2,1,"td",23),Id(),_d(38,24),jg(39,re,1,0,"th",18)(40,de,3,2,"td",25),Id(),jg(41,le,1,0,"tr",26)(42,se,1,0,"tr",27),Ed(),ni$1(43,me,2,1,"p",28),Ed()()),i&2){let l,f,x;Qo(7),$g("tone",n.adminDisabled()?"red":"green"),Qo(),Cd(" ",n.adminDisabled()?"Access denied":"Admin"," "),Qo(),ri$1((l=n.forbiddenError())?9:-1,l),Qo(7),$g("disabled",n.adminDisabled()||n.uploading()),Qo(),ri$1((f=n.selectedFile())?17:-1,f),Qo(2),$g("disabled",n.adminDisabled()||n.uploading()),Qo(3),Cd(" ",n.uploading()?"Importing\u2026":"Import definition"," "),Qo(),$g("disabled",n.adminDisabled()||n.definitionsLoading()),Qo(4),ri$1((x=n.definitionsError())?27:-1,x),Qo(),$g("dataSource",n.definitions()),Qo(13),$g("matHeaderRowDef",n.definitionColumns),Qo(),$g("matRowDefColumns",n.definitionColumns),Qo(),ri$1(n.definitions().length===0?43:-1);}},dependencies:[IW,_W,A8,x8,ci,Zt,ei,ni,ti,Jt,ri,ii,oi,si,ai,_],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1100px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px}.section-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:700}.section-desc[_ngcontent-%COMP%]{margin:0;font-size:13.5px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-row[_ngcontent-%COMP%]{gap:10px}.file-row[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{color:var(--sf-text-2);font-size:13px}.field[_ngcontent-%COMP%]{width:100%;max-width:480px}.result[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:4px}.result-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:26px;padding:0 12px;border-radius:999px;border:1px solid var(--sf-outline-strong);background:var(--sf-surface-2);color:var(--sf-text-2);font-size:13px;font-weight:600}.result-chip--success[_ngcontent-%COMP%]{color:#6ee79a;border-color:#22583a;background:#0e1f16}.result-chip--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.timestamp[_ngcontent-%COMP%]{color:var(--sf-text-muted);font-size:12.5px}.banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;border:1px solid;font-size:13.5px;font-weight:600}.banner[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.banner--error[_ngcontent-%COMP%]{color:#f58f8f;border-color:#6b2a2e;background:#1f1114}.banner--warn[_ngcontent-%COMP%]{color:var(--sf-tertiary);border-color:#5a4818;background:#1d180b}.definitions-table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--sf-chrome);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--sf-text-faint)}td.mat-mdc-cell[_ngcontent-%COMP%]{border-bottom-color:#1a1f2c}.empty[_ngcontent-%COMP%]{margin:0;padding:12px 4px;font-size:13.5px}.mat-mdc-unelevated-button.sf-danger[_ngcontent-%COMP%]{background:#6b2a2e;color:#ffd9d9;border-radius:10px;font-weight:700}"]})};export{G as AdminPageComponent,q as FORBIDDEN_ADMIN_REQUIRED,fe as describeAdminError};