@yinuo-ngm/server 1.0.2 → 1.0.4

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.
@@ -0,0 +1,11 @@
1
+ import{a as an}from"./chunk-ACZLOZZH.js";import{f as on}from"./chunk-UIDFNBD4.js";import{e as sn}from"./chunk-ECWYTW7Q.js";import{g as rn}from"./chunk-5RKAWOOJ.js";import"./chunk-ZJKBRM7K.js";import{a as yn}from"./chunk-HZ73CM45.js";import{d as Se,e as Ne,f as Ie}from"./chunk-TN5O5PXP.js";import{e as Wt,g as qt,h as Ut}from"./chunk-34QRY4VA.js";import{A as Xt,B as Yt,C as en,D as De,G as tn,I as nn,c as ze,g as Zt,q as Ht,x as Kt,y as Jt,z as Gt}from"./chunk-A6CKMRBS.js";import{Cb as nt,Eb as me,F as Vt,H as ae,I as kt,M as ee,N as $,O as et,P as tt,T as Ft,U as Rt,V as ve,W as Ee,Wa as jt,Xa as Bt,Y as be,Ya as $t,Z as Te,ib as Me,kb as re,ob as se,q as Xe,r as Ot,sb as le,tb as At,ub as we,vb as Lt,w as Ye,x as Pt,xb as ce,yb as Qt,z as B,zb as Z}from"./chunk-J43J3F2V.js";import"./chunk-HFZLJHYR.js";import{B as Ge,d as It,i as O}from"./chunk-53YRDYLS.js";import{$b as N,Aa as Ct,Ab as xt,Ba as gt,Ca as _e,Dc as Mt,Eb as w,Ec as ye,Fb as Q,Fc as de,Gb as zt,Ha as I,Ic as m,Jc as V,Kb as J,Kc as F,Mc as Ze,Nc as He,Oa as Ue,Oc as Ke,Ra as he,Tb as vt,Vb as y,Vc as Y,W as ut,Wc as wt,Xb as x,Yb as Et,_b as S,a as H,ac as f,ad as Dt,b as K,bc as s,cc as l,da as qe,dc as T,e as hn,f as We,fd as j,g as dt,gd as St,hc as G,ic as X,kc as v,ld as Je,m as mt,ma as ft,mb as p,na as L,qc as C,r as ie,ra as u,rb as b,rd as xe,s as P,sb as _t,tc as r,ub as ht,uc as bt,vc as Tt,vd as oe,wd as Nt,xa as _,xb as yt,xc as W,ya as h,yc as q,z as ge,zc as U}from"./chunk-SJG2JCPL.js";var it=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=zt({type:t,selectors:[["button","nz-trans-button",""]],hostVars:8,hostBindings:function(i,o){i&2&&ye("border","0")("background","transparent")("padding","0")("line-height","inherit")}})}return t})(),ot=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({})}return t})();function vn(t,n){if(t&1&&(G(0),T(1,"nz-icon",2),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}var En=["textarea"];function bn(t,n){if(t&1){let e=v();s(0,"textarea",2,0),C("blur",function(){_(e);let o=r();return h(o.confirm())}),l(),s(2,"button",3),C("click",function(){_(e);let o=r();return h(o.confirm())}),T(3,"nz-icon",4),l()}}function Tn(t,n){if(t&1&&(G(0),T(1,"nz-icon",7),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}function Mn(t,n){if(t&1){let e=v();s(0,"button",5),C("click",function(){_(e);let o=r();return h(o.onClick())}),J(1,Tn,2,1,"ng-container",6),l()}if(t&2){let e=r();f("nzTooltipTitle",e.tooltip===null?null:e.tooltip||(e.locale==null?null:e.locale.edit)),p(),f("nzStringTemplateOutlet",e.icon)}}var wn=["ellipsisContainer"],Dn=["expandable"],Sn=["contentTemplate"],Nn=["*"],In=t=>({content:t});function On(t,n){t&1&&Tt(0)}function Pn(t,n){if(t&1&&(y(0,On,1,0),m(1)),t&2){let e=n.content;x(e?-1:0),p(),F(" ",e," ")}}function Vn(t,n){}function kn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Fn(t,n){if(t&1&&(J(0,Vn,0,0,"ng-template",5),y(1,kn,1,1)),t&2){let e=r(2),i=Mt(1);f("ngTemplateOutlet",i)("ngTemplateOutletContext",wt(3,In,e.nzContent)),p(),x(e.nzSuffix?1:-1)}}function Rn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.ellipsisStr," ")}}function jn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Bn(t,n){if(t&1){let e=v();s(0,"a",7,2),C("click",function(){_(e);let o=r(3);return h(o.onExpand())}),m(2),l()}if(t&2){let e=r(3);p(2),F(" ",e.locale==null?null:e.locale.expand," ")}}function $n(t,n){if(t&1&&(T(0,"span",null,1),y(2,Rn,1,1),y(3,jn,1,1),y(4,Bn,3,1,"a",6)),t&2){let e=r(2);p(2),x(e.isEllipsis?2:-1),p(),x(e.nzSuffix?3:-1),p(),x(e.nzExpandable&&e.isEllipsis?4:-1)}}function An(t,n){if(t&1&&y(0,Fn,2,5)(1,$n,5,3),t&2){let e=r();x(e.expanded||!e.hasOperationsWithEllipsis&&e.nzEllipsisRows===1&&!e.hasEllipsisObservers||e.canCssEllipsis||e.nzSuffix&&e.expanded?0:1)}}function Ln(t,n){if(t&1){let e=v();s(0,"nz-text-edit",8),C("endEditing",function(o){_(e);let a=r();return h(a.onEndEditing(o))})("startEditing",function(){_(e);let o=r();return h(o.onStartEditing())}),l()}if(t&2){let e=r();f("text",e.nzContent)("icon",e.nzEditIcon)("tooltip",e.nzEditTooltip)}}function Qn(t,n){if(t&1){let e=v();s(0,"nz-text-copy",9),C("textCopy",function(o){_(e);let a=r();return h(a.onTextCopy(o))}),l()}if(t&2){let e=r();f("text",e.copyText)("tooltips",e.nzCopyTooltips)("icons",e.nzCopyIcons)}}var at=(()=>{class t{cdr=u(xe);clipboard=u(rn);i18n=u(ze);destroyRef=u(_e);copied=!1;copyId;locale;nativeElement=u(he).nativeElement;copyTooltip=null;copedTooltip=null;copyIcon="copy";copedIcon="check";text;tooltips;icons=["copy","check"];textCopy=new b;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.copyId)})}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.updateTooltips(),this.cdr.markForCheck()})}ngOnChanges(e){let{tooltips:i,icons:o}=e;i&&this.updateTooltips(),o&&this.updateIcons()}onClick(){if(this.copied)return;this.copied=!0,this.cdr.detectChanges();let e=this.text;this.textCopy.emit(e),this.clipboard.copy(e),this.onCopied()}onCopied(){clearTimeout(this.copyId),this.copyId=setTimeout(()=>{this.copied=!1,this.cdr.detectChanges()},3e3)}updateTooltips(){if(this.tooltips===null)this.copedTooltip=null,this.copyTooltip=null;else if(Array.isArray(this.tooltips)){let[e,i]=this.tooltips;this.copyTooltip=e||this.locale?.copy,this.copedTooltip=i||this.locale?.copied}else this.copyTooltip=this.locale?.copy,this.copedTooltip=this.locale?.copied;this.cdr.markForCheck()}updateIcons(){let[e,i]=this.icons;this.copyIcon=e,this.copedIcon=i,this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-copy"]],inputs:{text:"text",tooltips:"tooltips",icons:"icons"},outputs:{textCopy:"textCopy"},exportAs:["nzTextCopy"],features:[Ue],decls:2,vars:4,consts:[["type","button","nz-tooltip","","nz-trans-button","",1,"ant-typography-copy",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&(s(0,"button",0),C("click",function(){return o.onClick()}),J(1,vn,2,1,"ng-container",1),l()),i&2&&(de("ant-typography-copy-success",o.copied),f("nzTooltipTitle",o.copied?o.copedTooltip:o.copyTooltip),p(),f("nzStringTemplateOutlet",o.copied?o.copedIcon:o.copyIcon))},dependencies:[me,nt,ot,it,$,ee,tt,et],encapsulation:2,changeDetection:0})}return t})(),rt=(()=>{class t{ngZone=u(_t);cdr=u(xe);i18n=u(ze);destroyRef=u(_e);editing=!1;locale;text;icon="edit";tooltip;startEditing=new b;endEditing=new b(!0);set textarea(e){this.textarea$.next(e)}autosizeDirective;beforeText;currentText;nativeElement=u(he).nativeElement;textarea$=new mt(null);injector=u(Ct);ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"keydown")),B(this.destroyRef)).subscribe(e=>{e.keyCode!==27&&e.keyCode!==13||this.ngZone.run(()=>{e.keyCode===27?this.onCancel():this.onEnter(e),this.cdr.markForCheck()})}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"input")),B(this.destroyRef)).subscribe(e=>{this.currentText=e.target.value})}onClick(){this.beforeText=this.text,this.currentText=this.beforeText,this.editing=!0,this.startEditing.emit(),this.focusAndSetValue()}confirm(){this.editing=!1,this.endEditing.emit(this.currentText)}onEnter(e){e.stopPropagation(),e.preventDefault(),this.confirm()}onCancel(){this.currentText=this.beforeText,this.confirm()}focusAndSetValue(){let{injector:e}=this;ht(()=>{this.textarea$.pipe(ut(i=>i!=null),B(this.destroyRef)).subscribe(i=>{i.nativeElement.focus(),i.nativeElement.value=this.currentText||"",this.autosizeDirective.resizeToFitContent(),this.cdr.markForCheck()})},{injector:e})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-edit"]],viewQuery:function(i,o){if(i&1&&(W(En,5),W(we,5)),i&2){let a;q(a=U())&&(o.textarea=a.first),q(a=U())&&(o.autosizeDirective=a.first)}},inputs:{text:"text",icon:"icon",tooltip:"tooltip"},outputs:{startEditing:"startEditing",endEditing:"endEditing"},exportAs:["nzTextEdit"],decls:2,vars:1,consts:[["textarea",""],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"nzTooltipTitle"],["nz-input","","nzAutosize","",3,"blur"],["nz-trans-button","",1,"ant-typography-edit-content-confirm",3,"click"],["nzType","enter"],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&y(0,bn,4,0)(1,Mn,2,2,"button",1),i&2&&x(o.editing?0:1)},dependencies:[Z,ce,we,ot,it,$,ee,me,nt,tt,et],encapsulation:2,changeDetection:0})}return t})(),Wn="typography",qn="ant-typography-expand",Un=(()=>{var k;let t,n=[],e=[],i,o=[],a=[],E,D=[],z=[],R,fe=[],Ce=[],lt,ct=[],pt=[];return k=class{_nzModuleName=Wn;nzConfigService=u(Vt);el=u(he).nativeElement;cdr=u(xe);viewContainerRef=u(xt);renderer=u(yt);platform=u(kt);i18n=u(ze);resizeService=u($t);directionality=u(Pt);document=u(gt);destroyRef=u(_e);nzCopyable=!1;nzEditable=!1;nzDisabled=!1;nzExpandable=!1;nzEllipsis=!1;nzCopyTooltips=P(this,n,void 0);nzCopyIcons=(P(this,e),P(this,o,["copy","check"]));nzEditTooltip=(P(this,a),P(this,D,void 0));nzEditIcon=(P(this,z),P(this,fe,"edit"));nzContent=P(this,Ce);nzEllipsisRows=P(this,ct,1);nzType=P(this,pt);nzCopyText;nzSuffix;nzContentChange=new b;nzCopy=new b;nzExpandChange=new b;nzOnEllipsis=new b;textEditRef;textCopyRef;ellipsisContainer;expandableBtn;contentTemplate;locale;expandableBtnElementCache=null;editing=!1;ellipsisText;cssEllipsis=!1;isEllipsis=!0;expanded=!1;ellipsisStr="...";dir="ltr";get hasEllipsisObservers(){return this.nzOnEllipsis.observers.length>0}get canCssEllipsis(){return this.nzEllipsis&&this.cssEllipsis&&!this.expanded&&!this.hasEllipsisObservers}get hasOperationsWithEllipsis(){return(this.nzCopyable||this.nzEditable||this.nzExpandable)&&this.nzEllipsis}viewInit=!1;requestId=-1;windowResizeSubscription=dt.EMPTY;get copyText(){return typeof this.nzCopyText=="string"?this.nzCopyText:this.nzContent}constructor(){this.destroyRef.onDestroy(()=>{this.expandableBtnElementCache=null,this.windowResizeSubscription.unsubscribe()})}onTextCopy(g){this.nzCopy.emit(g)}onStartEditing(){this.editing=!0}onEndEditing(g){this.editing=!1,this.nzContentChange.emit(g),this.nzContent===g&&this.renderOnNextFrame(),this.cdr.markForCheck()}onExpand(){this.isEllipsis=!1,this.expanded=!0,this.nzExpandChange.emit(),this.nzOnEllipsis.emit(!1)}canUseCSSEllipsis(){return this.nzEditable||this.nzCopyable||this.nzExpandable||this.nzSuffix||this.hasEllipsisObservers?!1:this.nzEllipsisRows===1?Xe("textOverflow"):Xe("webkitLineClamp")}renderOnNextFrame(){Bt(this.requestId),!(!this.viewInit||!this.nzEllipsis||this.nzEllipsisRows<0||this.expanded||!this.platform.isBrowser)&&(this.requestId=jt(()=>this.syncEllipsis()))}getOriginContentViewRef(){let g=this.viewContainerRef.createEmbeddedView(this.contentTemplate,{content:this.nzContent});return g.detectChanges(),{viewRef:g,removeView:()=>this.viewContainerRef.remove(this.viewContainerRef.indexOf(g))}}syncEllipsis(){if(this.cssEllipsis)return;let{viewRef:g,removeView:d}=this.getOriginContentViewRef(),c=[this.textCopyRef,this.textEditRef].filter(ne=>ne&&ne.nativeElement).map(ne=>ne.nativeElement),M=this.getExpandableBtnElement();M&&c.push(M);let{contentNodes:Le,text:Qe,ellipsis:pe}=Ot(this.el,this.nzEllipsisRows,g.rootNodes,c,this.ellipsisStr,this.nzSuffix);d(),this.ellipsisText=Qe,pe!==this.isEllipsis&&(this.isEllipsis=pe,this.nzOnEllipsis.emit(pe));let te=this.ellipsisContainer.nativeElement;for(;te.firstChild;)this.renderer.removeChild(te,te.firstChild);Le.forEach(ne=>{this.renderer.appendChild(te,ne.cloneNode(!0))}),this.cdr.markForCheck()}getExpandableBtnElement(){if(this.nzExpandable){let g=this.locale?this.locale.expand:"",d=this.expandableBtnElementCache;if(!d||d.innerText===g){let c=this.document.createElement("a");c.className=qn,c.innerText=g,this.expandableBtnElementCache=c}return this.expandableBtnElementCache}else return this.expandableBtnElementCache=null,null}renderAndSubscribeWindowResize(){this.platform.isBrowser&&(this.windowResizeSubscription.unsubscribe(),this.cssEllipsis=this.canUseCSSEllipsis(),this.renderOnNextFrame(),this.windowResizeSubscription=this.resizeService.connect().pipe(B(this.destroyRef)).subscribe(()=>this.renderOnNextFrame()))}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.directionality.change?.pipe(B(this.destroyRef)).subscribe(g=>{this.dir=g,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterViewInit(){this.viewInit=!0,this.renderAndSubscribeWindowResize()}ngOnChanges(g){let{nzCopyable:d,nzEditable:c,nzExpandable:M,nzEllipsis:Le,nzContent:Qe,nzEllipsisRows:pe,nzSuffix:te}=g;(d||c||M||Le||Qe||pe||te)&&this.nzEllipsis&&(this.expanded?this.windowResizeSubscription.unsubscribe():this.renderAndSubscribeWindowResize())}},(()=>{let g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ae()],i=[ae()],E=[ae()],R=[ae()],lt=[ae()],ie(null,null,t,{kind:"field",name:"nzCopyTooltips",static:!1,private:!1,access:{has:d=>"nzCopyTooltips"in d,get:d=>d.nzCopyTooltips,set:(d,c)=>{d.nzCopyTooltips=c}},metadata:g},n,e),ie(null,null,i,{kind:"field",name:"nzCopyIcons",static:!1,private:!1,access:{has:d=>"nzCopyIcons"in d,get:d=>d.nzCopyIcons,set:(d,c)=>{d.nzCopyIcons=c}},metadata:g},o,a),ie(null,null,E,{kind:"field",name:"nzEditTooltip",static:!1,private:!1,access:{has:d=>"nzEditTooltip"in d,get:d=>d.nzEditTooltip,set:(d,c)=>{d.nzEditTooltip=c}},metadata:g},D,z),ie(null,null,R,{kind:"field",name:"nzEditIcon",static:!1,private:!1,access:{has:d=>"nzEditIcon"in d,get:d=>d.nzEditIcon,set:(d,c)=>{d.nzEditIcon=c}},metadata:g},fe,Ce),ie(null,null,lt,{kind:"field",name:"nzEllipsisRows",static:!1,private:!1,access:{has:d=>"nzEllipsisRows"in d,get:d=>d.nzEllipsisRows,set:(d,c)=>{d.nzEllipsisRows=c}},metadata:g},ct,pt),g&&Object.defineProperty(k,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),We(k,"\u0275fac",function(d){return new(d||k)}),We(k,"\u0275cmp",w({type:k,selectors:[["nz-typography"],["","nz-typography",""],["p","nz-paragraph",""],["span","nz-text",""],["h1","nz-title",""],["h2","nz-title",""],["h3","nz-title",""],["h4","nz-title",""]],viewQuery:function(d,c){if(d&1&&(W(rt,5),W(at,5),W(wn,5),W(Dn,5),W(Sn,5)),d&2){let M;q(M=U())&&(c.textEditRef=M.first),q(M=U())&&(c.textCopyRef=M.first),q(M=U())&&(c.ellipsisContainer=M.first),q(M=U())&&(c.expandableBtn=M.first),q(M=U())&&(c.contentTemplate=M.first)}},hostVars:26,hostBindings:function(d,c){d&2&&(ye("-webkit-line-clamp",c.canCssEllipsis&&c.nzEllipsisRows>1?c.nzEllipsisRows:null),de("ant-typography",!c.editing)("ant-typography-rtl",c.dir==="rtl")("ant-typography-edit-content",c.editing)("ant-typography-secondary",c.nzType==="secondary")("ant-typography-warning",c.nzType==="warning")("ant-typography-danger",c.nzType==="danger")("ant-typography-success",c.nzType==="success")("ant-typography-disabled",c.nzDisabled)("ant-typography-ellipsis",c.nzEllipsis&&!c.expanded)("ant-typography-single-line",c.nzEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-single-line",c.canCssEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-multiple-line",c.canCssEllipsis&&c.nzEllipsisRows>1))},inputs:{nzCopyable:[2,"nzCopyable","nzCopyable",oe],nzEditable:[2,"nzEditable","nzEditable",oe],nzDisabled:[2,"nzDisabled","nzDisabled",oe],nzExpandable:[2,"nzExpandable","nzExpandable",oe],nzEllipsis:[2,"nzEllipsis","nzEllipsis",oe],nzCopyTooltips:"nzCopyTooltips",nzCopyIcons:"nzCopyIcons",nzEditTooltip:"nzEditTooltip",nzEditIcon:"nzEditIcon",nzContent:"nzContent",nzEllipsisRows:[2,"nzEllipsisRows","nzEllipsisRows",Nt],nzType:"nzType",nzCopyText:"nzCopyText",nzSuffix:"nzSuffix"},outputs:{nzContentChange:"nzContentChange",nzCopy:"nzCopy",nzExpandChange:"nzExpandChange",nzOnEllipsis:"nzOnEllipsis"},exportAs:["nzTypography"],features:[Ue],ngContentSelectors:Nn,decls:5,vars:3,consts:[["contentTemplate",""],["ellipsisContainer",""],["expandable",""],[3,"text","icon","tooltip"],[3,"text","tooltips","icons"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-typography-expand"],[1,"ant-typography-expand",3,"click"],[3,"endEditing","startEditing","text","icon","tooltip"],[3,"textCopy","text","tooltips","icons"]],template:function(d,c){d&1&&(bt(),J(0,Pn,2,2,"ng-template",null,0,Dt),y(2,An,2,1),y(3,Ln,1,3,"nz-text-edit",3),y(4,Qn,1,3,"nz-text-copy",4)),d&2&&(p(2),x(c.editing?-1:2),p(),x(c.nzEditable?3:-1),p(),x(c.nzCopyable&&!c.editing?4:-1))},dependencies:[It,rt,at],encapsulation:2,changeDetection:0})),k})(),pn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({imports:[Un,at,rt]})}return t})();var ue=hn(yn());function Jn(t,n){if(t&1){let e=v();s(0,"div",0)(1,"span",1),m(2,"\u6709\u672A\u4FDD\u5B58\u66F4\u6539"),l(),s(3,"button",2),C("click",function(){_(e);let o=r();return h(o.diff.emit())}),m(4,"Diff"),l(),s(5,"button",2),C("click",function(){_(e);let o=r();return h(o.reset.emit())}),m(6,"\u91CD\u7F6E"),l(),s(7,"button",3),C("click",function(){_(e);let o=r();return h(o.save.emit())}),m(8,"\u4FDD\u5B58"),l()()}}var Oe=class t{dirty=!1;diff=new b;reset=new b;save=new b;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-change-bar-component"]],inputs:{dirty:"dirty"},outputs:{diff:"diff",reset:"reset",save:"save"},decls:1,vars:1,consts:[[1,"change-bar"],[1,"hint"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(e,i){e&1&&y(0,Jn,9,0,"div",0),e&2&&x(i.dirty?0:-1)},dependencies:[O,Te,be,ve,Ee],styles:[".change-bar[_ngcontent-%COMP%]{width:100%;padding:10px 20px;display:flex;justify-content:flex-end;align-items:center;gap:10px;box-shadow:0 -2px 8px #0000000f;background:var(--app-component-bg);border:1px solid var(--app-border-color)}.hint[_ngcontent-%COMP%]{margin-right:auto;opacity:.75}"]})};var Gn=(t,n)=>n.id;function Xn(t,n){if(t&1){let e=v();s(0,"div",6),C("click",function(){let o=_(e).$implicit,a=r();return h(a.selectDomain(o))}),s(1,"div",7)(2,"div",8),T(3,"nz-icon",9),l(),s(4,"div",10)(5,"div",11),m(6),l(),s(7,"div",12),m(8),l()()()()}if(t&2){let e=n.$implicit,i=r();de("active",e.id===i.activeDomainId()),p(3),f("nzType",e.icon||"setting"),p(3),V(e.label),p(2),V(e.description)}}var Ve=class t{keyword=I("");nodes=Je([]);activeDomainId=Je("");domainSelect=new b;selectDomain(n){this.domainSelect.emit(n.id)}filtered=j(()=>{let n=this.keyword().trim().toLowerCase();return n?this.nodes().map(e=>K(H({},e),{children:(e.children??[]).filter(i=>(i.label??"").toLowerCase().includes(n)||(i.relPath??"").toLowerCase().includes(n))})).filter(e=>(e.children?.length??0)>0):this.nodes()});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-nav-component"]],inputs:{nodes:[1,"nodes"],activeDomainId:[1,"activeDomainId"]},outputs:{domainSelect:"domainSelect"},decls:8,vars:1,consts:[[1,"list"],[1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","",3,"ngModelChange","ngModel"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],[1,"row"],[1,"icon"],["nzTheme","outline",1,"project-suffix-icon",3,"nzType"],[1,"info"],[1,"name"],[1,"description"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),T(3,"nz-icon",2),s(4,"input",3),C("ngModelChange",function(a){return i.keyword.set(a)}),l()()(),s(5,"div",4),S(6,Xn,9,5,"div",5,Gn),l()()),e&2&&(p(4),f("ngModel",i.keyword()),p(2),N(i.filtered()))},dependencies:[O,le,Me,re,se,Z,ce,Qt,Lt,$,ee],styles:[".list[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 16px}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;height:0;display:flex;flex-direction:column;gap:8px;padding:8px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover, .list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%]{background:var(--app-primary-2)}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:13px;color:var(--app-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]})};function ke(t,n){return n.split(".").reduce((e,i)=>e?e[i]:void 0,t)}function mn(t,n,e){let i=n.split("."),o=i.pop(),a=t;for(let E of i)a[E]??={},a=a[E];a[o]=e}function un(t){return t.sort((n,e)=>(n.domain?.nav?.order??0)-(e.domain?.nav?.order??0)).map(n=>({id:n.domain.id,type:"domain",label:n.domain.label,icon:n.domain.icon,description:n.domain.description,children:(n.docs??[]).map(e=>({id:e.spec.id,type:"doc",label:e.spec.title,docId:e.spec.id,relPath:e.chosen?.relPath,codec:e.chosen?.codec,exists:e.exists}))}))}var fn=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);function Fe(t,n,e,i=""){if(e===void 0)return[];if(!fn(e))return[{scope:t,target:n,path:i||"/",value:e}];let o=[],a=Object.keys(e);if(a.length===0)return o.push({scope:t,target:n,path:i||"/",value:{}}),o;for(let E of a){let D=i?`${i}.${E}`:E,z=e[E];fn(z)?o.push(...Fe(t,n,z,D)):o.push({scope:t,target:n,path:D,value:z})}return o}var Cn=(t,n)=>n.value,ei=(t,n)=>n.key;function ti(t,n){if(t&1&&(s(0,"div",3),m(1),l()),t&2){let e=r();p(),F(" ",e.item.desc," ")}}function ni(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function ii(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function oi(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r();p(),V(e.value)}}function ai(t,n){if(t&1&&(s(0,"nz-space",6),T(1,"nz-icon",9),s(2,"span"),m(3),l()()),t&2){let e=r();p(3),V(e.value)}}function ri(t,n){if(t&1){let e=v();s(0,"nz-switch",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function si(t,n){if(t&1&&T(0,"nz-option",11),t&2){let e=n.$implicit;f("nzValue",e.value)("nzLabel",e.label)}}function li(t,n){if(t&1){let e=v();s(0,"nz-select",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),S(1,si,1,2,"nz-option",11,Cn),l()}if(t&2){let e=r();f("ngModel",e.value),p(),N(e.options)}}function ci(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r().$index;p(),V(e+1)}}function pi(t,n){t&1&&T(0,"nz-icon",12)}function di(t,n){if(t&1&&(T(0,"nz-icon",9),s(1,"span"),m(2),l(),y(3,pi,1,0,"nz-icon",12)),t&2){let e=n.$implicit,i=r().$implicit,o=r(3);p(2),F(" ",i==null?null:i[e.key]," "),p(),x(e!==o.arrayFields()[o.arrayFields().length-1]?3:-1)}}function mi(t,n){if(t&1&&(s(0,"nz-space"),y(1,ci,2,1,"span"),S(2,di,4,2,null,null,ei),l()),t&2){let e=r(3);p(),x(e.arrayValue().length>1?1:-1),p(),N(e.arrayFields())}}function ui(t,n){if(t&1&&S(0,mi,4,1,"nz-space",null,Et),t&2){let e=r(2);N(e.arrayValue())}}function fi(t,n){t&1&&(s(0,"span"),m(1,"\u6570\u7EC4\u7C7B\u578B\u914D\u7F6E\u9879\uFF0C\u6682\u4E0D\u652F\u6301\u8868\u5355\u7F16\u8F91"),l())}function Ci(t,n){if(t&1&&y(0,ui,2,0)(1,fi,2,0,"span"),t&2){let e=r();x(e.isArrayObjectEditor()?0:1)}}function gi(t,n){if(t&1&&(s(0,"nz-space")(1,"span",2),m(2),l(),s(3,"span",14),m(4),l()()),t&2){let e=n.$implicit;p(2),F("",e.label,":"),p(2),V(e.value)}}function _i(t,n){if(t&1&&(s(0,"div",13),S(1,gi,5,2,"nz-space",null,Cn),l()),t&2){let e=r(2);p(),N(e.objectKv())}}function hi(t,n){if(t&1&&y(0,_i,3,0,"div",13),t&2){let e=r();x(e.isObjectEditor()?0:-1)}}var Re=class t{item;value;valueChange=new b;options=[];emit(n){this.valueChange.emit(n)}isObjectEditor(){return this.item?.type==="object"}objectKv(){let n=this.value??{};return Object.values(n).map((e,i)=>typeof e=="string"?{label:Object.keys(n)[i],value:e}:{label:Object.keys(n)[i],value:JSON.stringify(e)})}isArrayObjectEditor(){return this.item?.type==="array"&&this.item?.item?.type==="object"&&Array.isArray(this.item?.item?.fields)&&this.item.item.fields.length>0}arrayFields(){return this.item?.item?.fields??[]}arrayValue(){return Array.isArray(this.value)?this.value:[]}addRow(){let n=this.arrayFields(),e={};for(let o of n)o.key&&(e[o.key]=o.default??"");let i=[...this.arrayValue(),e];this.emit(i)}removeRow(n){let i=this.arrayValue().filter((o,a)=>a!==n);this.emit(i)}updateCell(n,e,i){let a=this.arrayValue().map((E,D)=>D!==n?E:K(H({},E??{}),{[e]:i}));this.emit(a)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-item-component"]],inputs:{item:"item",value:"value",options:"options"},outputs:{valueChange:"valueChange"},decls:14,vars:3,consts:[[1,"config-item"],[1,"meta"],[1,"label"],[1,"desc"],[1,"control"],["nz-input","",3,"ngModel"],["nzAlign","center"],[3,"ngModel"],["nz-input","",3,"ngModelChange","ngModel"],["nzType","file","nzTheme","fill"],[3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["nzType","arrow-right","nzTheme","outline"],[1,"kv"],[1,"value"]],template:function(e,i){if(e&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),m(3),l(),y(4,ti,2,1,"div",3),l(),s(5,"div",4),y(6,ni,1,1,"input",5)(7,ii,1,1,"input",5)(8,oi,2,1,"span")(9,ai,4,1,"nz-space",6)(10,ri,1,1,"nz-switch",7)(11,li,3,1,"nz-select",7)(12,Ci,2,1)(13,hi,1,1),l()()),e&2){let o;p(3),V(i.item.label),p(),x(i.item.desc?4:-1),p(2),x((o=i.item.type)==="input"?6:o==="path"?7:o==="string"?8:o==="file"?9:o==="boolean"?10:o==="select"?11:o==="array"?12:o==="object"?13:-1)}},dependencies:[O,le,Me,re,se,$,ee,De,en,Z,ce,Ie,Se,Ne,Rt,Ft,an],styles:[".config-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px}.config-item[_ngcontent-%COMP%]:hover{background:var(--app-primary-2)}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;opacity:.75}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:14px;margin-top:4px;opacity:.55}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%]{min-width:200px;max-width:600px;width:60%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] input[nz-input][_ngcontent-%COMP%], .config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] nz-select[_ngcontent-%COMP%]{width:100%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] .kv[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;width:100%}"]})};var st=()=>[],yi=(t,n)=>n.id,gn=(t,n)=>n.key;function xi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(5);return h(E.onValueChange(o,a))}),l()}if(t&2){let e=n.$implicit,i=r(2).$implicit,o=r(3);f("item",e)("options",e.options||o.options[e.optionsRef==null?null:e.optionsRef.key]||Y(3,st))("value",o.getChild(e,i))}}function zi(t,n){if(t&1&&S(0,xi,1,4,"app-config-item-component",4,gn),t&2){let e=r().$implicit;N(e.children)}}function vi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(3);return h(E.onValueChange(o,a))}),l(),y(1,zi,2,0)}if(t&2){let e=n.$implicit,i=r(3);f("item",e)("options",e.options||i.options[e.optionsRef==null?null:e.optionsRef.key]||Y(4,st))("value",i.get(e)),p(),x(e.children!=null&&e.children.length?1:-1)}}function Ei(t,n){if(t&1&&(s(0,"section",1)(1,"h3",2),m(2),l(),S(3,vi,2,5,null,null,gn),l()),t&2){let e=n.$implicit;vt("id",e.id),p(2),V(e.label),p(),N(e.items)}}function bi(t,n){if(t&1&&S(0,Ei,5,2,"section",1,yi),t&2){let e=r().schema.sections||Y(0,st);N(e)}}function Ti(t,n){t&1&&(s(0,"div",0),m(1," \u8BE5\u914D\u7F6E\u6682\u4E0D\u652F\u6301\u8868\u5355\u6A21\u5F0F\uFF08\u53EF\u5207\u6362 Raw / \u6216\u7A0D\u540E\u5B9E\u73B0 provider\uFF09 "),l())}var je=class t{schema;vm;options={};vmChange=new b;get(n){let e=ke(this.vm,n.key);return e??n.default}getChild(n,e){let i=this.get(e);if(i==null||i==="")return n.default;let o=this.resolveDynamicPath(n.key,e.key,i),a=ke(this.vm,o);return a??n.default}onValueChange(n,e){let i=this.resolvePathForWrite(e);this.update(i,n)}resolvePathForWrite(n){let e=n.key||"",i=e.match(/<([^>]+)>/);if(!i)return e;let o=i[1],a=ke(this.vm,o);return this.resolveDynamicPath(e,o,a)}resolveDynamicPath(n,e,i){let o=`<${e}>`;return n.replace(o,String(i??""))}update(n,e){let i=structuredClone(this.vm);mn(i,n,e),this.vmChange.emit(i)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-section-component"]],inputs:{schema:"schema",vm:"vm",options:"options"},outputs:{vmChange:"vmChange"},decls:2,vars:1,consts:[[1,"empty"],[1,"section"],[1,"section-title"],[3,"valueChange","item","options","value"],[3,"item","options","value"]],template:function(e,i){e&1&&y(0,bi,2,1)(1,Ti,2,0,"div",0),e&2&&x(i.schema?0:1)},dependencies:[O,Re],styles:[".section[_ngcontent-%COMP%]{padding:0}.section[_ngcontent-%COMP%]:last-child{border-bottom:none}.section-title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:24px;opacity:.85;font-weight:500;padding:0 16px}.empty[_ngcontent-%COMP%]{padding:12px 14px}"]})};var Be=class t{api=u(Zt);getCatalog(n){return this.api.get(`/api/config/catalog/${n}`)}openInEditor(n,e){return this.api.post(`/api/config/openInEditor/${n}/${encodeURIComponent(e)}`,{})}writeDomainSchema(n,e,i){return this.api.post(`/api/config/writeSchema/${n}/${e}`,{vm:i})}getDomainSchemas(n,e){return this.api.get(`/api/config/getDomainSchema/${n}/${e}`)}diffDomainSchema(n,e,i){return this.api.post(`/api/config/diffSchema/${n}/${e}`,{vm:i})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ft({token:t,factory:t.\u0275fac,providedIn:"root"})};var Mi=["class","component"],wi=()=>({}),Di=()=>[],Si=(t,n)=>n.docId;function Ni(t,n){if(t&1&&T(0,"nz-option",13),t&2){let e=n.$implicit;f("nzLabel",e.title)("nzValue",e.docId)}}function Ii(t,n){if(t&1){let e=v();G(0),s(1,"div",11)(2,"label"),m(3,"\u9009\u62E9\u914D\u7F6E\u6587\u4EF6"),l(),s(4,"nz-select",12),Ke("ngModelChange",function(o){_(e);let a=r();return He(a.selectedDocId,o)||(a.selectedDocId=o),h(o)}),S(5,Ni,1,2,"nz-option",13,Si),l()(),X()}if(t&2){let e=r();p(4),Ze("ngModel",e.selectedDocId),p(),N(e.activeDocsMeta()||Y(1,Di))}}function Oi(t,n){if(t&1){let e=v();G(0),s(1,"button",14),C("click",function(){_(e);let o=r();return h(o.openConfig())}),m(2," \u6253\u5F00\u914D\u7F6E\u6587\u4EF6 "),l(),X()}if(t&2){let e=r();p(),f("disabled",!e.selectedDocId())}}var $e=class t{api=u(Be);projectState=u(nn);msg=u(tn);modal=u(Kt);projectId=j(()=>this.projectState.currentProjectId()||"");loading=I(!1);isModalVisible=I(!1);catalog=I(null);navNodes=j(()=>un(this.catalog()??[]));activeDomainId=I(null);selectedDocId=I(null);docStates=I({});domainSchema=I(null);domainVM=I(null);baselineDomainVM=I(null);activeDomain=j(()=>{let n=this.activeDomainId();return(this.catalog()??[]).find(e=>e.domain.id===n)??null});activeDocs=j(()=>this.activeDomain()?.docs??[]);activeDocsMeta=j(()=>{let n=this.activeDomain();return n?(n.docs??[]).map(e=>({docId:e.spec.id,title:e.spec.title,exists:e.exists,relPath:e.chosen?.relPath,codec:e.chosen?.codec})):[]});domainDirty=j(()=>{let n=this.baselineDomainVM(),e=this.domainVM();return!n||!e?!1:!ue.isEqual(n,e)});constructor(){St(()=>{this.projectId()&&this.getCatalog()})}getCatalog(){let n=this.projectId();n&&(this.loading.set(!0),this.api.getCatalog(n).subscribe({next:e=>{this.catalog.set(e);let i=e[0]?.domain?.id??"";i&&(this.activeDomainId.set(i),this.loadDomainSchema(i))},error:e=>{console.error(e),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u76EE\u5F55\u5931\u8D25")},complete:()=>this.loading.set(!1)}))}onDomainSelect(n){this.activeDomainId.set(n),n==="angular"?this.loadDomainSchema(n):this.domainVM.set(null)}async loadDomainSchema(n){let e=this.projectId();if(e){this.loading.set(!0);try{let i=await ge(this.api.getDomainSchemas(e,n));this.domainSchema.set(i),this.domainVM.set(i.vm),this.baselineDomainVM.set(ue.cloneDeep(i.vm))}catch(i){console.error(i),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u6A21\u578B\u5931\u8D25"),this.domainVM.set(null),this.baselineDomainVM.set(null)}finally{this.loading.set(!1)}}}async onDiff(){let n=this.projectId(),e=this.activeDomainId(),i=this.domainVM();if(!(!n||!e||!i)){this.loading.set(!0);try{let o=await ge(this.api.diffDomainSchema(n,e,i)),a=o?.docPatch??{},E=o?.filePatch??[],D=[];for(let[z,R]of Object.entries(a))D.push(...Fe("doc",z,R));for(let z of E)D.push(...Fe("file",z.relPath,z.patch));if(D.length===0){this.msg.info("\u6CA1\u6709\u53EF\u5199\u56DE\u7684\u53D8\u66F4");return}D.sort((z,R)=>{if(z.scope!==R.scope)return z.scope.localeCompare(R.scope);let fe=`${z.target}:${z.path}`,Ce=`${R.target}:${R.path}`;return fe.localeCompare(Ce)}),this.modal.create({nzTitle:"\u53D8\u66F4",nzContent:`
2
+ <div style="max-height:60vh; overflow:auto;">
3
+ ${D.map(z=>`
4
+ <div style="padding:8px 0; border-bottom:1px solid #f0f0f0;">
5
+ <div style="font-weight:600;">[${z.scope}] ${z.target}</div>
6
+ <div style="opacity:.85; margin-top:4px;">${z.path}</div>
7
+ <pre style="margin:6px 0;">after : ${this.safeStringify(z.value)}</pre>
8
+ </div>
9
+ `).join("")}
10
+ </div>
11
+ `,nzFooter:null,nzWidth:900})}catch(o){console.error(o),this.msg.error("\u751F\u6210 Diff \u5931\u8D25")}finally{this.loading.set(!1)}}}safeStringify(n){try{return JSON.stringify(n,null,2)}catch{return String(n)}}onReset(){let n=this.baselineDomainVM();n&&(this.domainVM.set(ue.cloneDeep(n)),this.msg.success("\u5DF2\u91CD\u7F6E\u4E3A\u672A\u4FEE\u6539\u72B6\u6001"))}onRawChange(n){let e=this.docStates(),i=e[n.docId];if(!i)return;let o=i.baselineRaw??"",a=n.raw!==o;this.docStates.set(K(H({},e),{[n.docId]:K(H({},i),{raw:n.raw,dirty:a})}))}onValuesChange(n){}async saveActive(){let n=this.projectId(),e=this.activeDomainId(),i=this.domainVM();if(!(!n||!e||!i)){this.loading.set(!0);try{await ge(this.api.writeDomainSchema(n,e,i)),this.msg.success("\u4FDD\u5B58\u6210\u529F"),await this.loadDomainSchema(e)}catch(o){console.error(o),this.msg.error("\u4FDD\u5B58\u5931\u8D25")}finally{this.loading.set(!1)}}}openConfig(){if(!this.selectedDocId()){this.msg.warning("\u8BF7\u5148\u9009\u62E9\u914D\u7F6E\u6587\u4EF6");return}this.api.openInEditor(this.projectId(),this.selectedDocId()).subscribe(n=>{this.msg.success("\u5DF2\u5728\u9ED8\u8BA4\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u8BE5\u914D\u7F6E\u6587\u4EF6"),this.isModalVisible.set(!1)})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-project-conf",8,"component"]],attrs:Mi,decls:13,vars:11,consts:[[3,"title","loading"],["ngProjectAs","actions",5,["actions"]],["nz-button","","nzType","primary",3,"click"],[1,"panel"],[3,"domainSelect","nodes","activeDomainId"],[1,"content"],[3,"vmChange","schema","vm","options"],[3,"diff","reset","save","dirty"],["nzTitle","\u914D\u7F6E",3,"nzVisibleChange","nzOnCancel","nzVisible","nzMaskClosable"],[4,"nzModalContent"],[4,"nzModalFooter"],[1,"modal-body"],["nzPlaceHolder","\u8BF7\u9009\u62E9\u914D\u7F6E\u6587\u4EF6",2,"width","100%",3,"ngModelChange","ngModel"],[3,"nzLabel","nzValue"],["nz-button","","nzType","primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(s(0,"page-layout",0),G(1,1),s(2,"button",2),C("click",function(){return i.isModalVisible.set(!0)}),m(3,"\u6253\u5F00\u914D\u7F6E\u6587\u4EF6"),l(),T(4,"app-ng-devtool"),X(),s(5,"div",3)(6,"app-config-nav-component",4),C("domainSelect",function(a){return i.onDomainSelect(a)}),l(),s(7,"div",5)(8,"app-config-section-component",6),C("vmChange",function(a){return i.domainVM.set(a)}),l(),s(9,"app-config-change-bar-component",7),C("diff",function(){return i.onDiff()})("reset",function(){return i.onReset()})("save",function(){return i.saveActive()}),l()()()(),s(10,"nz-modal",8),Ke("nzVisibleChange",function(a){return He(i.isModalVisible,a)||(i.isModalVisible=a),a}),C("nzOnCancel",function(){return i.isModalVisible.set(!1)}),J(11,Ii,7,2,"ng-container",9)(12,Oi,3,1,"ng-container",10),l()),e&2){let o,a;f("title","\u9879\u76EE\u914D\u7F6E")("loading",i.loading()),p(6),f("nodes",i.navNodes())("activeDomainId",i.activeDomainId()??""),p(2),f("schema",(o=i.domainSchema())==null?null:o.schema)("vm",i.domainVM())("options",((a=i.domainSchema())==null?null:a.options)??Y(10,wi)),p(),f("dirty",i.domainDirty()),p(),Ze("nzVisible",i.isModalVisible),f("nzMaskClosable",!1)}},dependencies:[O,le,re,se,At,on,Ht,sn,Z,Ie,Se,Ne,De,Te,be,ve,Ee,pn,qt,me,Ut,$,Ve,Oe,Yt,Xt,Gt,Jt,je,Wt],styles:[".panel[_ngcontent-%COMP%]{border-radius:10px;box-shadow:0 2px 8px #0000000f;display:flex}.panel[_ngcontent-%COMP%] app-config-nav-component[_ngcontent-%COMP%]{flex:0 0 300px}.panel[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;padding:8px 16px}.panel[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] app-config-section-component[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden}.panel[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] app-config-change-bar-component[_ngcontent-%COMP%]{flex:0 0 auto;position:sticky;bottom:0}"]})};var Pi=[{path:"",component:$e}],Ae=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Q({type:t});static \u0275inj=L({imports:[Ge.forChild(Pi),Ge]})};var _n=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Q({type:t});static \u0275inj=L({imports:[O,Ae]})};export{_n as ConfigurationModule};
@@ -0,0 +1 @@
1
+ import{a as Ie,b as Oe}from"./chunk-6ZXMOHQD.js";import"./chunk-SIVPP74B.js";import{b as je}from"./chunk-ZJKBRM7K.js";import{a as Se,b as Fe}from"./chunk-IGJYBE5M.js";import"./chunk-HZ73CM45.js";import{b as ce,c as de,d as ue,e as De,g as Pe,h as Te}from"./chunk-34QRY4VA.js";import"./chunk-SNCDDYQR.js";import{G as be,I as Ne,g as we}from"./chunk-A6CKMRBS.js";import{Cb as ye,Eb as Me,M as oe,N as re,O as ae,P as pe,V as se,Y as le,Z as me,ib as ge,kb as fe,ob as _e,sb as ze,vb as Ce,xb as ve,yb as he,zb as xe}from"./chunk-J43J3F2V.js";import"./chunk-HFZLJHYR.js";import{B as U,d as ie,i as E}from"./chunk-53YRDYLS.js";import{$b as J,B as q,Dc as K,Eb as O,Fb as y,Fc as Q,Ha as z,Ic as s,Jc as b,Kb as M,Kc as F,Mc as X,Nc as Y,Oc as Z,Tc as ee,Ub as W,V as P,Vb as C,Wc as $,Xb as v,_b as H,a as d,ac as c,ad as te,b as u,bc as r,cc as a,dc as g,fd as N,gd as ne,hc as j,ic as S,jc as R,kc as T,ma as G,mb as p,na as h,qc as w,ra as _,tc as l,vd as A,xa as x,ya as D}from"./chunk-SJG2JCPL.js";function Ve(n,t){if(n&1&&(j(0),s(1),S()),n&2){let e=l(2);p(),b(e.nzText)}}function Be(n,t){if(n&1&&(r(0,"span",0),M(1,Ve,2,1,"ng-container",1),a()),n&2){let e=l();p(),c("nzStringTemplateOutlet",e.nzText)}}var L=(()=>{class n{nzText;nzType="horizontal";nzOrientation="center";nzVariant="solid";nzSize;nzDashed=!1;nzPlain=!1;static \u0275fac=function(o){return new(o||n)};static \u0275cmp=O({type:n,selectors:[["nz-divider"]],hostAttrs:[1,"ant-divider"],hostVars:22,hostBindings:function(o,i){o&2&&Q("ant-divider-horizontal",i.nzType==="horizontal")("ant-divider-vertical",i.nzType==="vertical")("ant-divider-with-text",i.nzText)("ant-divider-plain",i.nzPlain)("ant-divider-with-text-left",i.nzText&&i.nzOrientation==="left")("ant-divider-with-text-right",i.nzText&&i.nzOrientation==="right")("ant-divider-with-text-center",i.nzText&&i.nzOrientation==="center")("ant-divider-dashed",i.nzDashed||i.nzVariant==="dashed")("ant-divider-dotted",i.nzVariant==="dotted")("ant-divider-sm",i.nzSize==="small")("ant-divider-md",i.nzSize==="middle")},inputs:{nzText:"nzText",nzType:"nzType",nzOrientation:"nzOrientation",nzVariant:"nzVariant",nzSize:"nzSize",nzDashed:[2,"nzDashed","nzDashed",A],nzPlain:[2,"nzPlain","nzPlain",A]},exportAs:["nzDivider"],decls:1,vars:1,consts:[[1,"ant-divider-inner-text"],[4,"nzStringTemplateOutlet"]],template:function(o,i){o&1&&C(0,Be,2,1,"span",0),o&2&&v(i.nzText?0:-1)},dependencies:[pe,ae],encapsulation:2,changeDetection:0})}return n})(),Ee=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=y({type:n});static \u0275inj=h({imports:[L]})}return n})();var I=class n{api=_(we);getDeps(t){return this.api.get(`/api/deps/list/${t}`).pipe(q(e=>({items:[...e.dependencies.map(i=>u(d({},i),{group:"dependencies"})),...e.devDependencies.map(i=>u(d({},i),{group:"devDependencies"}))],meta:e.meta})))}install(t,e){return this.api.post(`/api/deps/install/${t}`,e)}uninstall(t,e){return this.api.post(`/api/deps/uninstall/${t}`,e)}installDevtools(t){return this.api.post(`/api/deps/devtools/install/${t}`,{tool:"devtools"})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=G({token:n,factory:n.\u0275fac,providedIn:"root"})};var $e=["class","component"],Ae=n=>({$implicit:n,title:"\u8FD0\u884C\u4F9D\u8D56"}),Ue=n=>({$implicit:n,title:"\u5F00\u53D1\u4F9D\u8D56"});function Le(n,t){n&1&&R(0)}function qe(n,t){n&1&&R(0)}function Ge(n,t){n&1&&(r(0,"nz-tag",20),s(1,"\u5DF2\u5B89\u88C5"),a())}function We(n,t){n&1&&(r(0,"nz-tag",21),s(1,"\u672A\u5B89\u88C5"),a())}function He(n,t){if(n&1){let e=T();r(0,"button",27),w("click",function(){x(e);let i=l().$implicit,m=l(2);return D(m.installOrUpdate(i))}),g(1,"nz-icon",28),a()}if(n&2){let e=l().$implicit,o=l(2);c("nzLoading",o.installing()[e.name])("nz-tooltip",e.hasUpdate?"\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C":"\u5B89\u88C5\u4F9D\u8D56")}}function Je(n,t){if(n&1){let e=T();r(0,"button",29),w("nzOnConfirm",function(){x(e);let i=l().$implicit,m=l(2);return D(m.uninstall(i))}),g(1,"nz-icon",30),a()}if(n&2){let e=l().$implicit;c("nzPopconfirmTitle",ee("\u786E\u5B9A\u5378\u8F7D ",e.name,"\uFF1F")),p(),c("nz-tooltip","\u5378\u8F7D"+e.name)}}function Ke(n,t){if(n&1){let e=T();r(0,"div",9)(1,"div",11)(2,"div",12)(3,"div",13),g(4,"span",14),a(),r(5,"div",15)(6,"div",16),s(7),a(),r(8,"div",17)(9,"span"),s(10),a(),r(11,"span",18),s(12,"\xB7"),a(),r(13,"span"),s(14),a(),r(15,"span",18),s(16,"\xB7"),a(),r(17,"span"),s(18),a()()()(),r(19,"div",19),C(20,Ge,2,0,"nz-tag",20)(21,We,2,0,"nz-tag",21),r(22,"a",22),w("click",function(){let i=x(e).$implicit,m=l(2);return D(m.openDetail(i))}),g(23,"span",23),s(24," \u67E5\u770B\u8BE6\u60C5 "),a()(),r(25,"div",24),C(26,He,2,2,"button",25),C(27,Je,2,3,"button",26),a()()()}if(n&2){let e=t.$implicit;p(7),b(e.name),p(3),F("\u7248\u672C ",e.current||"-"),p(4),F("\u8981\u6C42 ",e.required||"-"),p(4),F("\u6700\u65B0 ",e.latest||"-"),p(2),v(e.installed?20:21),p(6),v(e.hasUpdate||!e.installed?26:-1),p(),v(e.installed?27:-1)}}function Qe(n,t){n&1&&(r(0,"div",10),s(1,"\u65E0\u6570\u636E"),a())}function Xe(n,t){if(n&1&&(r(0,"div",7),s(1),a(),r(2,"div",8),H(3,Ke,28,7,"div",9,W().trackByName,!0),C(5,Qe,2,0,"div",10),a()),n&2){let e=t.$implicit,o=t.title;p(),b(o),p(2),J(e),p(2),v(e.length===0?5:-1)}}var V=class n{api=_(I);msg=_(be);projectId=N(()=>this.projectState.currentProjectId()||"");loading=z(!1);keyword=z("");items=z([]);meta=z(null);installing=z({});uninstalling=z({});runtimeItems=N(()=>this.filterItems(this.items().filter(t=>t.group==="dependencies")));devItems=N(()=>this.filterItems(this.items().filter(t=>t.group==="devDependencies")));runningCount=N(()=>this.items().filter(t=>t.hasUpdate).length);projectState=_(Ne);depsState=_(I);constructor(){ne(async()=>{this.refresh()})}filterItems(t){let e=this.keyword().trim().toLowerCase();return e?t.filter(o=>o.name.toLowerCase().includes(e)):t}refresh(){this.loading.set(!0),this.api.getDeps(this.projectId()).pipe(P(()=>this.loading.set(!1))).subscribe({next:({items:t,meta:e})=>{this.items.set(t),this.meta.set(e)},error:t=>this.msg.error(t?.message||"\u52A0\u8F7D\u4F9D\u8D56\u5931\u8D25")})}openDetail(t){t.homepage?window.open(t.homepage,"_blank"):window.open(`https://www.npmjs.com/package/${encodeURIComponent(t.name)}`,"_blank")}installOrUpdate(t){let e=t.name;this.installing.set(u(d({},this.installing()),{[e]:!0}));let o=t.installed&&t.hasUpdate?"latest":"required",i=t.installed&&t.hasUpdate?"\u5DF2\u66F4\u65B0":"\u5DF2\u5B89\u88C5";this.api.install(this.projectId(),{name:t.name,group:t.group,target:o}).pipe(P(()=>this.installing.set(u(d({},this.installing()),{[e]:!1})))).subscribe({next:()=>{this.msg.success(i),this.refresh()}})}uninstall(t){let e=t.name;this.uninstalling.set(u(d({},this.uninstalling()),{[e]:!0})),this.api.uninstall(this.projectId(),{name:t.name,group:t.group}).pipe(P(()=>this.uninstalling.set(u(d({},this.uninstalling()),{[e]:!1})))).subscribe({next:()=>{this.msg.success("\u5DF2\u5378\u8F7D"),this.refresh()}})}installDevtools(){this.loading.set(!0),this.api.installDevtools(this.projectId()).pipe(P(()=>this.loading.set(!1))).subscribe({next:()=>{this.msg.success("devtools \u5DF2\u5B89\u88C5"),this.refresh()},error:t=>this.msg.error(t?.message||"devtools \u5B89\u88C5\u5931\u8D25")})}installAll(){let t=this.items().filter(o=>!o.installed);if(!t.length){this.msg.info("\u6CA1\u6709\u9700\u8981\u5B89\u88C5\u7684\u4F9D\u8D56");return}(async()=>{this.loading.set(!0);try{for(let o of t)await new Promise((i,m)=>{this.api.install(this.projectId(),{name:o.name,group:o.group,target:"required"}).subscribe({next:()=>i(),error:f=>m(f)})});this.msg.success("\u5DF2\u5B8C\u6210\u5B89\u88C5"),this.refresh()}catch{this.msg.error("\u6279\u91CF\u5B89\u88C5\u5931\u8D25")}finally{this.loading.set(!1)}})()}trackByName(t,e){return e.group+":"+e.name}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=O({type:n,selectors:[["app-project-deps",8,"component"]],attrs:$e,decls:12,vars:11,consts:[["contentTemplate",""],[3,"title","loading"],["ngProjectAs","actions",5,["actions"]],["nz-input","","placeholder","\u641C\u7D22",1,"search",3,"ngModelChange","ngModel"],["nzType","search","nzInputPrefix",""],[1,"panel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"group-title"],[1,"list"],[1,"row"],[1,"empty"],["nz-row","","nzAlign","middle",1,"row-inner"],["nz-col","","nzFlex","400px",1,"left"],[1,"pkg-icon"],["nz-icon","","nzType","appstore"],[1,"pkg"],[1,"name"],[1,"sub"],[1,"sep"],["nz-col","","nzFlex","auto",1,"mid"],["nzColor","success"],["nzColor","warning"],[1,"detail",3,"click"],["nz-icon","","nzType","link"],["nz-col","","nzFlex","180px",1,"right"],["nz-button","","nzType","text",3,"nzLoading","nz-tooltip"],["nz-button","","nzType","text","nz-popconfirm","",3,"nzPopconfirmTitle"],["nz-button","","nzType","text",3,"click","nzLoading","nz-tooltip"],["nzType","download"],["nz-button","","nzType","text","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle"],["nzType","delete","nzTheme","fill",3,"nz-tooltip"]],template:function(e,o){if(e&1){let i=T();r(0,"page-layout",1),j(1,2),g(2,"app-ng-devtool"),r(3,"nz-input-wrapper")(4,"input",3),Z("ngModelChange",function(f){return x(i),Y(o.keyword,f)||(o.keyword=f),D(f)}),w("ngModelChange",function(f){return x(i),D(o.keyword.set(f))}),a(),g(5,"nz-icon",4),a(),S(),r(6,"div",5),M(7,Le,1,0,"ng-container",6),g(8,"nz-divider"),M(9,qe,1,0,"ng-container",6),a()(),M(10,Xe,6,2,"ng-template",null,0,te)}if(e&2){let i=K(11);c("title","\u9879\u76EE\u914D\u7F6E")("loading",o.loading()),p(4),X("ngModel",o.keyword),p(3),c("ngTemplateOutlet",i)("ngTemplateOutletContext",$(7,Ae,o.runtimeItems())),p(2),c("ngTemplateOutlet",i)("ngTemplateOutletContext",$(9,Ue,o.devItems()))}},dependencies:[E,ie,ze,ge,fe,_e,ue,de,ce,me,le,se,xe,ve,he,Ce,re,oe,Me,ye,Fe,Se,je,Ee,L,Oe,Ie,Pe,Te,De],styles:[".panel[_ngcontent-%COMP%]{border-radius:10px;padding:16px 18px;box-shadow:0 2px 8px #0000000f}.group-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin:6px 0 12px;opacity:.65}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.row[_ngcontent-%COMP%]{border-radius:10px}.row[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001a;background:var(--app-primary-3)}.row-inner[_ngcontent-%COMP%]{padding:10px 12px}.left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.left[_ngcontent-%COMP%] .pkg-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:8px;opacity:.65;display:inline-flex;align-items:center;justify-content:center}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;line-height:18px}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{margin-top:2px;font-size:12px;opacity:.55}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%] .sep[_ngcontent-%COMP%]{margin:0 6px}.mid[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px}.mid[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:var(--text-color-primary)}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:6px}.empty[_ngcontent-%COMP%]{padding:16px 0;text-align:center}"]})};var Ye=[{path:"",component:V}],B=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=y({type:n});static \u0275inj=h({imports:[U.forChild(Ye),U]})};var ke=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=y({type:n});static \u0275inj=h({imports:[E,B]})};export{ke as DependenciesModule};
@@ -1,3 +1,3 @@
1
- import{a as no,b as io,c as oo,d as ro,e as ao}from"./chunk-ECWYTW7Q.js";import{a as Di,b as Ni,c as Ii}from"./chunk-GNFBCMLE.js";import{b as Zi,c as Yt,d as qt,e as zt,f as Ki,g as to}from"./chunk-5RKAWOOJ.js";import"./chunk-SIVPP74B.js";import{a as Ji,b as eo}from"./chunk-ZJKBRM7K.js";import{a as Zt,b as bt}from"./chunk-2FQR5HIO.js";import{a as Ie,b as le,c as Hi,d as Qi}from"./chunk-CF64VPDQ.js";import{a as Qt,c as Xt,d as Xi,e as Ui,f as Ut}from"./chunk-TN5O5PXP.js";import{a as Nn,b as Ee,c as _e,d as Oe,f as ji,g as Bi}from"./chunk-34QRY4VA.js";import{b as $i,c as Yi,d as qi}from"./chunk-GKOCPXFS.js";import"./chunk-SNCDDYQR.js";import{B as Xe,C as Gt,D as _t,E as $t,F as Ht,H as Ct,I as Ue,h as Ai,k as Wt,l as Ri,n as Wi,q as Vi,r as Li,t as Gi,v as Vt,w as Lt,x as gt}from"./chunk-A6CKMRBS.js";import{Cb as He,Eb as Qe,F as bi,G as vi,H as ue,La as wi,M as E,N as w,O as Ve,P as Le,T as Ti,U as xi,V as Z,W as Ne,Wa as At,Y as ne,Z as H,a as kn,b as _i,ba as yi,c as wn,f as Dn,ga as Si,h as Ci,ha as Pi,i as Bt,ia as Mi,ib as Fe,kb as Ce,la as ki,lb as Ei,nb as Oi,ob as ze,pb as Fi,sb as Q,u as zi,vb as Rt,w as ot,x as rt,xb as je,yb as ht,z as te,zb as be}from"./chunk-J43J3F2V.js";import"./chunk-HFZLJHYR.js";import{B as wt,d as De,f as fi,i as I,v as hi,y as ft,z as gi}from"./chunk-53YRDYLS.js";import{$b as re,A as xn,Ac as ei,Ca as Be,Cc as ti,Dc as B,Eb as y,Ec as Re,Fb as we,Fc as K,Gb as $e,Gc as mt,Ha as pe,Hc as ni,Ic as p,Jc as G,Kb as S,Kc as me,L as Je,Lb as Kn,M as et,Mc as A,N as Gn,Nc as R,Oa as Te,Oc as W,Pc as ii,Q as $n,Qc as oi,Ra as tt,Rc as ri,Sa as Ot,T as Hn,Tb as xe,U as Qn,Uc as ai,Vb as T,Vc as ut,W as Et,Wc as kt,Xa as Zn,Xb as x,Yb as jt,Yc as si,Zb as pt,Zc as li,_b as oe,_c as ci,a as ve,ac as m,ad as $,b as Tn,bc as a,c as Wn,ca as St,cc as s,da as Xn,dc as h,ea as yn,f as ct,fd as ee,g as Ke,gd as pi,hc as ae,ic as se,jc as Sn,jd as di,kc as P,l as Ge,la as Un,ld as Pn,ma as Yn,mb as l,mc as Jn,na as ke,o as Vn,od as mi,p as Ln,pa as qn,pd as ui,qc as v,r as ce,ra as f,rb as k,rd as We,s as j,sb as nt,tc as c,u as xt,uc as Mt,vb as it,vc as dt,vd as J,wc as Ae,wd as Mn,xa as C,xc as de,ya as z,yb as Ft,yc as V,z as yt,za as Pt,zc as L}from"./chunk-SJG2JCPL.js";function Oo(t,o){if(t&1&&(ae(0),h(1,"nz-icon",1),se()),t&2){let e=o.$implicit;l(),m("nzType",e)}}var Fo=["nz-tab-body",""];function jo(t,o){}function Bo(t,o){if(t&1&&(ae(0),h(1,"nz-icon",1),se()),t&2){let e=o.$implicit;l(),m("nzType",e)}}var Ao=()=>({minWidth:"46px"}),Ro=()=>({visible:!1});function Wo(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c().$implicit;l(),me(" ",e.tab.label," ")}}function Vo(t,o){if(t&1){let e=P();a(0,"li",7),v("click",function(){let i=C(e).$implicit,r=c(2);return z(r.onSelect(i))})("contextmenu",function(i){let r=C(e).$implicit,d=c(2);return z(d.onContextmenu(r,i))}),S(1,Wo,2,1,"ng-container",8),s()}if(t&2){let e=o.$implicit;K("ant-tabs-dropdown-menu-item-disabled",e.disabled),m("nzSelected",e.active)("nzDisabled",e.disabled),l(),m("nzStringTemplateOutlet",e.tab.label)("nzStringTemplateOutletContext",ut(6,Ro))}}function Lo(t,o){if(t&1&&(a(0,"ul",4),oe(1,Vo,2,7,"li",6,pt),s()),t&2){let e=c();l(),re(e.items)}}function Go(t,o){if(t&1){let e=P();a(0,"button",9),v("click",function(){C(e);let i=c();return z(i.addClicked.emit())}),s()}if(t&2){let e=c();m("addIcon",e.addIcon)}}var $o=["navWrap"],Ho=["navList"],Qo=["*"];function Xo(t,o){}function Uo(t,o){if(t&1&&(a(0,"div",2),S(1,Xo,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.startExtraContent().templateRef)}}function Yo(t,o){if(t&1){let e=P();a(0,"button",9),v("click",function(){C(e);let i=c();return z(i.addClicked.emit())}),s()}if(t&2){let e=c();m("addIcon",e.addIcon),xe("tabindex",-1)}}function qo(t,o){}function Zo(t,o){if(t&1&&(a(0,"div",2),S(1,qo,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.endExtraContent().templateRef)}}function Ko(t,o){}function Jo(t,o){if(t&1&&(a(0,"div",2),S(1,Ko,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.extraTemplate)}}var er=["contentTemplate"],tr=[[["","nz-tab-link",""]],"*"],nr=["[nz-tab-link]","*"];function ir(t,o){t&1&&dt(0)}function or(t,o){t&1&&dt(0,1)}var rr=()=>({visible:!0});function ar(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c().$implicit;l(),me(" ",e.label," ")}}function sr(t,o){if(t&1){let e=P();a(0,"button",10),v("click",function(i){C(e);let r=c().$index,d=c(2);return z(d.onClose(r,i))}),s()}if(t&2){let e=c().$implicit;m("closeIcon",e.nzCloseIcon)}}function lr(t,o){if(t&1){let e=P();a(0,"div",6),v("click",function(i){let r=C(e),d=r.$implicit,M=r.$index,O=c(2);return z(O.clickNavItem(d,M,i))})("contextmenu",function(i){let r=C(e).$implicit,d=c(2);return z(d.contextmenuNavItem(r,i))}),a(1,"button",7),S(2,ar,2,1,"ng-container",8),T(3,sr,1,1,"button",9),s()()}if(t&2){let e=o.$implicit,n=o.$index,i=c(2);Re("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),K("ant-tabs-tab-active",i.nzSelectedIndex===n)("ant-tabs-tab-disabled",e.nzDisabled),l(),m("id",i.getTabContentId(n))("disabled",e.nzDisabled)("tab",e)("active",i.nzSelectedIndex===n),xe("tabIndex",i.getTabIndex(e,n))("aria-disabled",e.nzDisabled)("aria-selected",i.nzSelectedIndex===n&&!i.nzHideAll)("aria-controls",i.getTabContentId(n)),l(),m("nzStringTemplateOutlet",e.label)("nzStringTemplateOutletContext",ut(19,rr)),l(),x(e.nzClosable&&i.closable&&!e.nzDisabled?3:-1)}}function cr(t,o){if(t&1){let e=P();a(0,"nz-tabs-nav",4),v("tabScroll",function(i){C(e);let r=c();return z(r.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){C(e);let r=c();return z(r.setSelectedIndex(i))})("addClicked",function(){C(e);let i=c();return z(i.onAdd())}),oe(1,lr,4,20,"div",5,pt),s()}if(t&2){let e=c();mt(e.nzTabBarStyle),m("selectedIndex",e.nzSelectedIndex||0)("inkBarAnimated",e.inkBarAnimated)("addable",e.addable)("addIcon",e.nzAddIcon)("hideBar",e.nzHideAll)("position",e.position)("extraTemplate",e.nzTabBarExtraContent)("extraContents",e.extraContents()),l(),re(e.tabs)}}function pr(t,o){}function dr(t,o){if(t&1&&S(0,pr,0,0,"ng-template",11),t&2){c();let e=B(4);m("ngTemplateOutlet",e)}}function mr(t,o){}function ur(t,o){if(t&1&&S(0,mr,0,0,"ng-template",11),t&2){c(2);let e=B(4);m("ngTemplateOutlet",e)}}function fr(t,o){if(t&1&&T(0,ur,1,1,null,11),t&2){let e=c().$index,n=c(2);x(n.nzSelectedIndex===e?0:-1)}}function hr(t,o){}function gr(t,o){if(t&1&&S(0,hr,0,0,"ng-template",11),t&2){c(2);let e=B(4);m("ngTemplateOutlet",e)}}function _r(t,o){if(t&1&&T(0,gr,1,1,null,11),t&2){let e=c(),n=e.$implicit,i=e.$index,r=c(2);x(r.nzSelectedIndex===i||n.hasBeenActive?0:-1)}}function Cr(t,o){if(t&1&&h(0,"div",12),t&2){let e=c(),n=e.$implicit,i=e.$index,r=c(2);m("id",r.getTabContentId(i))("active",r.nzSelectedIndex===i)("content",n.content)("animated",r.tabPaneAnimated),xe("aria-labelledby",r.getTabContentId(i))}}function zr(t,o){if(t&1&&(T(0,dr,1,1,null,11)(1,fr,1,1)(2,_r,1,1),S(3,Cr,1,5,"ng-template",null,0,$)),t&2){let e=o.$implicit,n=c(2);x(e.nzForceRender?0:n.nzDestroyInactiveTabPane?1:2)}}function br(t,o){if(t&1&&oe(0,zr,5,1,null,null,pt),t&2){let e=c();re(e.tabs)}}var In=class{index;tab},Jt=(()=>{class t{addIcon="plus";element=f(tt).nativeElement;getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,Oo,2,1,"ng-container",0),n&2&&m("nzStringTemplateOutlet",i.addIcon)},dependencies:[Le,Ve,w,E],encapsulation:2})}return t})(),so=(()=>{class t{position=Pn("end",{alias:"nzTabBarExtraContent"});templateRef=f(it);static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabBarExtraContent","",5,"nz-tabset",5,"nz-tabs"]],inputs:{position:[1,"nzTabBarExtraContent","position"]}})}return t})(),vr=(()=>{class t{content=null;active=!1;animated=!0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:10,hostBindings:function(n,i){n&2&&(Jn("@tabSwitchMotion",i.active?"enter":"leave")("@.disabled",!i.animated),xe("tabindex",i.active?0:-1)("aria-hidden",!i.active),Re("overflow-y",i.animated?i.active?null:"none":null),K("ant-tabs-tabpane-active",i.active)("ant-tabs-tabpane-hidden",i.animated?null:!i.active))},inputs:{content:"content",active:"active",animated:"animated"},exportAs:["nzTabBody"],attrs:Fo,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(n,i){n&1&&S(0,jo,0,0,"ng-template",0),n&2&&m("ngTemplateOutlet",i.content)},dependencies:[De],encapsulation:2,data:{animation:[wi]},changeDetection:0})}return t})(),fo=(()=>{class t{closeIcon="close";static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,Bo,2,1,"ng-container",0),n&2&&m("nzStringTemplateOutlet",i.closeIcon)},dependencies:[Le,Ve,w,E],encapsulation:2})}return t})(),Tr=(()=>{class t{templateRef=f(it,{host:!0});static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]})}return t})(),ho=(()=>{class t{elementRef=f(tt);routerLink=f(gi,{self:!0,optional:!0});static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]})}return t})(),go=(()=>{class t{disabled=!1;tab;active=!1;elementRef=f(tt);el=this.elementRef.nativeElement;parentElement=this.el.parentElement;focus(){this.el.focus({preventScroll:!0})}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabNavItem",""]],inputs:{disabled:[2,"disabled","disabled",J],tab:"tab",active:[2,"active","active",J]}})}return t})(),En=(()=>{class t{items=[];addable=!1;addIcon="plus";addClicked=new k;selected=new k;closeAnimationWaitTimeoutId;menuOpened=!1;cdr=f(We);element=f(tt).nativeElement;onSelect(e){e.disabled||(e.tab.nzClick.emit(),this.selected.emit(e))}onContextmenu(e,n){e.disabled||e.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(e){e||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(n,i){n&2&&K("ant-tabs-nav-operations-hidden",i.items.length===0)},inputs:{items:"items",addable:[2,"addable","addable",J],addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],decls:7,vars:6,consts:[["dropdownTrigger","nzDropdown"],["menu","nzDropdownMenu"],["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzVisibleChange","mouseenter","nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement"],["nzType","ellipsis"],["nz-menu",""],["nz-tab-add-button","",3,"addIcon"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"click","contextmenu","nzSelected","nzDisabled"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let r=P();a(0,"button",2,0),v("nzVisibleChange",function(M){return C(r),z(i.menuVisChange(M))})("mouseenter",function(){return C(r),z(i.showItems())}),h(2,"nz-icon",3),s(),a(3,"nz-dropdown-menu",null,1),T(5,Lo,3,0,"ul",4),s(),T(6,Go,1,1,"button",5)}if(n&2){let r=B(4);m("nzDropdownMenu",r)("nzOverlayStyle",ut(5,Ao))("nzMatchWidthElement",null),l(5),x(i.menuOpened?5:-1),l(),x(i.addable?6:-1)}},dependencies:[w,E,Le,Ve,Jt,Gi,Vi,Wi,Ri,Li],encapsulation:2,changeDetection:0})}return t})(),xr=.1,lo=.01,Kt=20,co=.995**Kt,yr=(()=>{class t{ngZone=f(nt);destroyRef=f(Be);el=f(tt).nativeElement;lastWheelDirection=null;lastWheelTimestamp=0;lastTimestamp=0;lastTimeDiff=0;lastMixedWheel=0;lastWheelPrevent=!1;touchPosition=null;lastOffset=null;motion=-1;offsetChange=new k;tabScroll=new k;ngOnInit(){let e=ot(this.el,"wheel"),n=ot(this.el,"touchstart"),i=ot(this.el,"touchmove"),r=ot(this.el,"touchend");this.subscribeWrap("wheel",e,this.onWheel),this.subscribeWrap("touchstart",n,this.onTouchStart),this.subscribeWrap("touchmove",i,this.onTouchMove),this.subscribeWrap("touchend",r,this.onTouchEnd)}subscribeWrap(e,n,i){return n.pipe(te(this.destroyRef)).subscribe(r=>{this.tabScroll.emit({type:e,event:r}),r.defaultPrevented||i(r)})}onTouchEnd=e=>{if(!this.touchPosition)return;let n=this.lastOffset,i=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,n){let r=n.x/i,d=n.y/i,M=Math.abs(r),O=Math.abs(d);if(Math.max(M,O)<xr)return;let X=r,Y=d;this.motion=window.setInterval(()=>{if(Math.abs(X)<lo&&Math.abs(Y)<lo){window.clearInterval(this.motion);return}X*=co,Y*=co,this.onOffset(X*Kt,Y*Kt,e)},Kt)}};onTouchMove=e=>{if(!this.touchPosition)return;e.preventDefault();let{screenX:n,screenY:i}=e.touches[0],r=n-this.touchPosition.x,d=i-this.touchPosition.y;this.onOffset(r,d,e);let M=Date.now();this.lastTimeDiff=M-this.lastTimestamp,this.lastTimestamp=M,this.lastOffset={x:r,y:d},this.touchPosition={x:n,y:i}};onTouchStart=e=>{let{screenX:n,screenY:i}=e.touches[0];this.touchPosition={x:n,y:i},window.clearInterval(this.motion)};onWheel=e=>{let{deltaX:n,deltaY:i}=e,r,d=Math.abs(n),M=Math.abs(i);d===M?r=this.lastWheelDirection==="x"?n:i:d>M?(r=n,this.lastWheelDirection="x"):(r=i,this.lastWheelDirection="y");let O=Date.now(),X=Math.abs(r);(O-this.lastWheelTimestamp>100||X-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-r,-r,e),(e.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=O,this.lastMixedWheel=X};onOffset(e,n,i){this.offsetChange.observers.length&&this.ngZone.run(()=>{this.offsetChange.emit({x:e,y:n,event:i})})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}})}return t})(),po=(()=>{class t{ngZone=f(nt);el=f(tt).nativeElement;position="horizontal";animated=!0;animationMode=f(Zn,{optional:!0});get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}alignToElement(e){this.ngZone.runOutsideAngular(()=>{At(()=>this.setStyles(e))})}setStyles(e){this.position==="horizontal"?(this.el.style.top="",this.el.style.height="",this.el.style.left=this.getLeftPosition(e),this.el.style.width=this.getElementWidth(e)):(this.el.style.left="",this.el.style.width="",this.el.style.top=this.getTopPosition(e),this.el.style.height=this.getElementHeight(e))}getLeftPosition(e){return e?`${e.offsetLeft||0}px`:"0"}getElementWidth(e){return e?`${e.offsetWidth||0}px`:"0"}getTopPosition(e){return e?`${e.offsetTop||0}px`:"0"}getElementHeight(e){return e?`${e.offsetHeight||0}px`:"0"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(n,i){n&2&&K("ant-tabs-ink-bar-animated",i._animated)},inputs:{position:"position",animated:"animated"}})}return t})(),Sr=typeof At<"u"?Ln:Vn,mo=150,On=(()=>{class t{cdr=f(We);ngZone=f(nt);viewportRuler=f(ki);nzResizeObserver=f(Ki);dir=f(rt);destroyRef=f(Be);indexFocused=new k;selectFocusedIndex=new k;addClicked=new k;tabScroll=new k;position="horizontal";addable=!1;hideBar=!1;addIcon="plus";inkBarAnimated=!0;extraTemplate;extraContents=Pn.required();startExtraContent=ee(()=>this.extraContents().find(e=>e.position()==="start"));endExtraContent=ee(()=>this.extraContents().find(e=>e.position()==="end"));get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let n=wn(e);this._selectedIndex!==n&&(this._selectedIndex=e,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(e))}navWrapRef;navListRef;operationRef;addBtnRef;inkBar;items;get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(e){!this.isValidIndex(e)||this.focusIndex===e||!this.keyManager||this.keyManager.setActiveItem(e)}get showAddButton(){return this.hiddenItems.length===0&&this.addable}translate=null;transformX=0;transformY=0;pingLeft=!1;pingRight=!1;pingTop=!1;pingBottom=!1;hiddenItems=[];keyManager;_selectedIndex=0;wrapperWidth=0;wrapperHeight=0;scrollListWidth=0;scrollListHeight=0;operationWidth=0;operationHeight=0;addButtonWidth=0;addButtonHeight=0;selectedIndexChanged=!1;lockAnimationTimeoutId;cssTransformTimeWaitingId;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId)})}ngAfterViewInit(){let e=this.dir?this.dir.change.asObservable():xt(null),n=this.viewportRuler.change(150),i=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new Mi(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),At(i),Je(this.nzResizeObserver.observe(this.navWrapRef),this.nzResizeObserver.observe(this.navListRef)).pipe(te(this.destroyRef),Gn(16,Sr)).subscribe(()=>{i()}),Je(e,n,this.items.changes).pipe(te(this.destroyRef)).subscribe(()=>{Promise.resolve().then(i),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(te(this.destroyRef)).subscribe(r=>{this.indexFocused.emit(r),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}onSelectedFromMenu(e){let n=this.items.toArray().findIndex(i=>i===e);n!==-1&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(e)))}onOffsetChange(e){if(this.position==="horizontal"){if(!this.lockAnimationTimeoutId&&(this.transformX>=0&&e.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&e.x<0))return;e.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+e.x),this.setTransform(this.transformX,0)}else{if(!this.lockAnimationTimeoutId&&(this.transformY>=0&&e.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&e.y<0))return;e.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+e.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(e){let n=this.navWrapRef.nativeElement.contains(e.target);if(!(Pi(e)||!n))switch(e.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(e);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(e)}}isValidIndex(e){if(!this.items)return!0;let n=this.items?this.items.toArray()[e]:null;return!!n&&!n.disabled}scrollToTab(e){if(!this.items.find(i=>i===e))return;let n=this.items.toArray();if(this.position==="horizontal"){let i=this.transformX;if(this.getLayoutDirection()==="rtl"){let r=n[0].left+n[0].width-e.left-e.width;r<this.transformX?i=r:r+e.width>this.transformX+this.wrapperWidth&&(i=r+e.width-this.wrapperWidth)}else e.left<-this.transformX?i=-e.left:e.left+e.width>-this.transformX+this.wrapperWidth&&(i=-(e.left+e.width-this.wrapperWidth));this.transformX=i,this.transformY=0,this.setTransform(i,0)}else{let i=this.transformY;e.top<-this.transformY?i=-e.top:e.top+e.height>-this.transformY+this.wrapperHeight&&(i=-(e.top+e.height-this.wrapperHeight)),this.transformY=i,this.transformX=0,this.setTransform(0,i)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},mo)}lockAnimation(){this.lockAnimationTimeoutId||this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=void 0},mo)})}setTransform(e,n){this.navListRef.nativeElement.style.transform=`translate(${e}px, ${n}px)`}clampTransformX(e){let n=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(n,e),0):Math.min(Math.max(n,e),0)}clampTransformY(e){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,e),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWrapRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWrapRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){let e=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=e?e.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){let e={top:!1,right:!1,bottom:!1,left:!1},n=this.navWrapRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(e.right=this.transformX>0,e.left=this.transformX+this.wrapperWidth<this.scrollListWidth):(e.left=this.transformX<0,e.right=-this.transformX+this.wrapperWidth<this.scrollListWidth):(e.top=this.transformY<0,e.bottom=-this.transformY+this.wrapperHeight<this.scrollListHeight),Object.keys(e).forEach(i=>{let r=`ant-tabs-nav-wrap-ping-${i}`;e[i]?n.classList.add(r):n.classList.remove(r)})}setVisibleRange(){let e,n,i,r,d,M,O=this.items.toArray(),X={width:0,height:0,left:0,top:0,right:0},Y=D=>{let ie,st=O[D]||X;return n==="right"?ie=O[0].left+O[0].width-O[D].left-O[D].width:ie=st[n],ie};this.position==="horizontal"?(e="width",r=this.wrapperWidth,d=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),M=this.addButtonWidth,i=Math.abs(this.transformX),this.getLayoutDirection()==="rtl"?(n="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidth<this.scrollListWidth):(this.pingLeft=this.transformX<0,this.pingRight=-this.transformX+this.wrapperWidth<this.scrollListWidth,n="left")):(e="height",r=this.wrapperHeight,d=this.scrollListHeight-(this.hiddenItems.length?this.operationHeight:0),M=this.addButtonHeight,n="top",i=-this.transformY,this.pingTop=this.transformY<0,this.pingBottom=-this.transformY+this.wrapperHeight<this.scrollListHeight);let ye=r;if(d+M>r&&(ye=r-M),!O.length){this.hiddenItems=[],this.cdr.markForCheck();return}let q=O.length,Tt=q;for(let D=0;D<q;D+=1){let ie=Y(D),st=O[D]||X;if(ie+st[e]>i+ye){Tt=D-1;break}}let g=0;for(let D=q-1;D>=0;D-=1)if(Y(D)<i){g=D+1;break}let u=O.slice(0,g),b=O.slice(Tt+1);this.hiddenItems=[...u,...b],this.cdr.markForCheck()}getLayoutDirection(){return this.dir&&this.dir.value==="rtl"?"rtl":"ltr"}ngOnChanges(e){let{position:n}=e;n&&!n.isFirstChange()&&(this.alignInkBarToSelectedTab(),this.lockAnimation(),this.updateScrollListPosition())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tabs-nav"]],contentQueries:function(n,i,r){if(n&1&&Ae(r,go,5),n&2){let d;V(d=L())&&(i.items=d)}},viewQuery:function(n,i){if(n&1&&(de($o,7),de(Ho,7),de(En,7),de(Jt,5),de(po,7)),n&2){let r;V(r=L())&&(i.navWrapRef=r.first),V(r=L())&&(i.navListRef=r.first),V(r=L())&&(i.operationRef=r.first),V(r=L())&&(i.addBtnRef=r.first),V(r=L())&&(i.inkBar=r.first)}},hostAttrs:[1,"ant-tabs-nav"],hostBindings:function(n,i){n&1&&v("keydown",function(d){return i.handleKeydown(d)})},inputs:{position:"position",addable:[2,"addable","addable",J],hideBar:[2,"hideBar","hideBar",J],addIcon:"addIcon",inkBarAnimated:"inkBarAnimated",extraTemplate:"extraTemplate",extraContents:[1,"extraContents"],selectedIndex:"selectedIndex"},outputs:{indexFocused:"indexFocused",selectFocusedIndex:"selectFocusedIndex",addClicked:"addClicked",tabScroll:"tabScroll"},exportAs:["nzTabsNav"],features:[Te],ngContentSelectors:Qo,decls:11,vars:17,consts:[["navWrap",""],["navList",""],[1,"ant-tabs-extra-content"],[1,"ant-tabs-nav-wrap"],["nzTabScrollList","","role","tablist",1,"ant-tabs-nav-list",3,"offsetChange","tabScroll"],["role","tab","nz-tab-add-button","",3,"addIcon"],["nz-tabs-ink-bar","",3,"hidden","position","animated"],[3,"addClicked","selected","addIcon","addable","items"],[3,"ngTemplateOutlet"],["role","tab","nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let r=P();Mt(),T(0,Uo,2,1,"div",2),a(1,"div",3,0)(3,"div",4,1),v("offsetChange",function(M){return C(r),z(i.onOffsetChange(M))})("tabScroll",function(M){return C(r),z(i.tabScroll.emit(M))}),dt(5),T(6,Yo,1,2,"button",5),h(7,"div",6),s()(),a(8,"nz-tab-nav-operation",7),v("addClicked",function(){return C(r),z(i.addClicked.emit())})("selected",function(M){return C(r),z(i.onSelectedFromMenu(M))}),s(),T(9,Zo,2,1,"div",2)(10,Jo,2,1,"div",2)}n&2&&(x(i.startExtraContent()?0:-1),l(),K("ant-tabs-nav-wrap-ping-left",i.pingLeft)("ant-tabs-nav-wrap-ping-right",i.pingRight)("ant-tabs-nav-wrap-ping-top",i.pingTop)("ant-tabs-nav-wrap-ping-bottom",i.pingBottom),l(5),x(i.showAddButton?6:-1),l(),m("hidden",i.hideBar)("position",i.position)("animated",i.inkBarAnimated),l(),m("addIcon",i.addIcon)("addable",i.addable)("items",i.hiddenItems),l(),x(i.endExtraContent()?9:i.extraTemplate?10:-1))},dependencies:[yr,Jt,po,En,De],encapsulation:2,changeDetection:0})}return t})(),Fn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nz-tab",""]],exportAs:["nzTab"]})}return t})(),_o=new qn(""),jn=(()=>{class t{nzTitle="";nzClosable=!1;nzCloseIcon="close";nzDisabled=!1;nzForceRender=!1;nzSelect=new k;nzDeselect=new k;nzClick=new k;nzContextmenu=new k;nzTabLinkTemplateDirective;template=null;linkDirective;contentTemplate;isActive=!1;hasBeenActive=!1;position=null;origin=null;closestTabSet=f(_o);stateChanges=new Ge;get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}ngOnChanges(e){let{nzTitle:n,nzDisabled:i,nzForceRender:r}=e;(n||i||r)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}setActive(e){this.isActive=e,e&&(this.hasBeenActive=!0)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab"]],contentQueries:function(n,i,r){if(n&1&&(Ae(r,Tr,5),Ae(r,Fn,5,it),Ae(r,ho,5)),n&2){let d;V(d=L())&&(i.nzTabLinkTemplateDirective=d.first),V(d=L())&&(i.template=d.first),V(d=L())&&(i.linkDirective=d.first)}},viewQuery:function(n,i){if(n&1&&de(er,7),n&2){let r;V(r=L())&&(i.contentTemplate=r.first)}},inputs:{nzTitle:"nzTitle",nzClosable:[2,"nzClosable","nzClosable",J],nzCloseIcon:"nzCloseIcon",nzDisabled:[2,"nzDisabled","nzDisabled",J],nzForceRender:[2,"nzForceRender","nzForceRender",J]},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[Te],ngContentSelectors:nr,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(n,i){n&1&&(Mt(tr),Kn(0,ir,1,0,"ng-template",null,0,$)(2,or,1,0,"ng-template",null,1,$))},encapsulation:2,changeDetection:0})}return t})(),Pr="tabs",Mr=0,Bn=(()=>{var q;let t,o=[],e=[],n,i=[],r=[],d,M=[],O=[],X,Y=[],ye=[];return q=class{_nzModuleName=Pr;nzConfigService=f(bi);ngZone=f(nt);cdr=f(We);directionality=f(rt);destroyRef=f(Be);get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(g){this.indexToSelect=wn(g,null)}nzTabPosition="top";nzTabBarExtraContent;nzCanDeactivate=null;nzAddIcon="plus";nzTabBarStyle=null;nzType=j(this,o,"line");nzSize=(j(this,e),j(this,i,"default"));nzAnimated=(j(this,r),j(this,M,!0));nzTabBarGutter=(j(this,O),j(this,Y,void 0));nzHideAdd=(j(this,ye),!1);nzCentered=!1;nzHideAll=!1;nzLinkRouter=!1;nzLinkExact=!0;nzDestroyInactiveTabPane=!1;nzSelectChange=new k(!0);nzSelectedIndexChange=new k;nzTabListScroll=new k;nzClose=new k;nzAdd=new k;get position(){return["top","bottom"].indexOf(this.nzTabPosition)===-1?"vertical":"horizontal"}get addable(){return this.nzType==="editable-card"&&!this.nzHideAdd}get closable(){return this.nzType==="editable-card"}get line(){return this.nzType==="line"}get inkBarAnimated(){return this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.tabPane}allTabs=new Ot;tabLinks=new Ot;tabNavBarRef;tabs=new Ot;extraContents=mi(so);dir="ltr";tabSetId;indexToSelect=0;selectedIndex=null;tabLabelSubscription=Ke.EMPTY;canDeactivateSubscription=Ke.EMPTY;router=f(ft,{optional:!0});constructor(){this.tabSetId=Mr++,f(di)==="nz-tabset"&&_i(`${kn} <nz-tabset> is deprecated, please use <nz-tabs> instead.`),this.destroyRef.onDestroy(()=>{this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()})}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(te(this.destroyRef)).subscribe(g=>{this.dir=g,this.cdr.detectChanges()})}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabs.changes.pipe(te(this.destroyRef)).subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let u=this.tabs.toArray();for(let b=0;b<u.length;b++)if(u[b].isActive){this.indexToSelect=this.selectedIndex=b;break}}this.subscribeToTabLabels(),this.cdr.markForCheck()})}ngAfterContentChecked(){let g=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this.selectedIndex!==g){let u=this.selectedIndex==null;u||this.nzSelectChange.emit(this.createChangeEvent(g)),Promise.resolve().then(()=>{this.tabs.forEach((b,D)=>b.setActive(D===g)),u||this.nzSelectedIndexChange.emit(g)})}this.tabs.forEach((u,b)=>{u.position=b-g,this.selectedIndex!=null&&u.position===0&&!u.origin&&(u.origin=g-this.selectedIndex)}),this.selectedIndex!==g&&(this.selectedIndex=g,this.cdr.markForCheck())}onClose(g,u){u.preventDefault(),u.stopPropagation(),this.nzClose.emit({index:g})}onAdd(){this.nzAdd.emit()}clampTabIndex(g){return Math.min(this.tabs.length-1,Math.max(g||0,0))}createChangeEvent(g){let u=new In;return u.index=g,this.tabs&&this.tabs.length&&(u.tab=this.tabs.toArray()[g],this.tabs.forEach((b,D)=>{D!==g&&b.nzDeselect.emit()}),u.tab.nzSelect.emit()),u}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=Je(...this.tabs.map(g=>g.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(St(this.allTabs)).subscribe(g=>{this.tabs.reset(g.filter(u=>u.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(g,u){return typeof this.nzCanDeactivate=="function"?zi(this.nzCanDeactivate(g,u)).pipe(Et(),te(this.destroyRef)):xt(!0)}clickNavItem(g,u,b){g.nzDisabled||(g.nzClick.emit(),this.isRouterLinkClickEvent(u,b)||this.setSelectedIndex(u))}isRouterLinkClickEvent(g,u){let b=u.target;return this.nzLinkRouter?!!this.tabs.toArray()[g]?.linkDirective?.elementRef.nativeElement.contains(b):!1}contextmenuNavItem(g,u){g.nzDisabled||g.nzContextmenu.emit(u)}setSelectedIndex(g){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,g).subscribe(u=>{u&&(this.nzSelectedIndex=g,this.tabNavBarRef.focusIndex=g,this.cdr.markForCheck())})}getTabIndex(g,u){return g.nzDisabled?null:this.selectedIndex===u?0:-1}getTabContentId(g){return`nz-tabs-${this.tabSetId}-tab-${g}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${kn} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);Je(this.router.events.pipe(et(g=>g instanceof hi)),this.tabLinks.changes).pipe(St(!0),Hn(0),te(this.destroyRef)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router?.navigated){let g=this.findShouldActiveTabIndex();g!==this.selectedIndex&&this.setSelectedIndex(g),Promise.resolve().then(()=>this.nzHideAll=g===-1)}}findShouldActiveTabIndex(){let g=this.tabs.toArray(),u=this.isLinkActive(this.router);return g.findIndex(b=>{let D=b.linkDirective;return D?u(D.routerLink):!1})}isLinkActive(g){return u=>u?!!g?.isActive(u.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}},(()=>{let g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ue()],n=[ue()],d=[ue()],X=[ue()],ce(null,null,t,{kind:"field",name:"nzType",static:!1,private:!1,access:{has:u=>"nzType"in u,get:u=>u.nzType,set:(u,b)=>{u.nzType=b}},metadata:g},o,e),ce(null,null,n,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:u=>"nzSize"in u,get:u=>u.nzSize,set:(u,b)=>{u.nzSize=b}},metadata:g},i,r),ce(null,null,d,{kind:"field",name:"nzAnimated",static:!1,private:!1,access:{has:u=>"nzAnimated"in u,get:u=>u.nzAnimated,set:(u,b)=>{u.nzAnimated=b}},metadata:g},M,O),ce(null,null,X,{kind:"field",name:"nzTabBarGutter",static:!1,private:!1,access:{has:u=>"nzTabBarGutter"in u,get:u=>u.nzTabBarGutter,set:(u,b)=>{u.nzTabBarGutter=b}},metadata:g},Y,ye),g&&Object.defineProperty(q,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),ct(q,"\u0275fac",function(u){return new(u||q)}),ct(q,"\u0275cmp",y({type:q,selectors:[["nz-tabs"],["nz-tabset"]],contentQueries:function(u,b,D){if(u&1&&(ei(D,b.extraContents,so,4),Ae(D,jn,5),Ae(D,ho,5)),u&2){ti();let ie;V(ie=L())&&(b.allTabs=ie),V(ie=L())&&(b.tabLinks=ie)}},viewQuery:function(u,b){if(u&1&&de(On,5),u&2){let D;V(D=L())&&(b.tabNavBarRef=D.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(u,b){u&2&&K("ant-tabs-card",b.nzType==="card"||b.nzType==="editable-card")("ant-tabs-editable",b.nzType==="editable-card")("ant-tabs-editable-card",b.nzType==="editable-card")("ant-tabs-centered",b.nzCentered)("ant-tabs-rtl",b.dir==="rtl")("ant-tabs-top",b.nzTabPosition==="top")("ant-tabs-bottom",b.nzTabPosition==="bottom")("ant-tabs-left",b.nzTabPosition==="left")("ant-tabs-right",b.nzTabPosition==="right")("ant-tabs-default",b.nzSize==="default")("ant-tabs-small",b.nzSize==="small")("ant-tabs-large",b.nzSize==="large")},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:[2,"nzHideAdd","nzHideAdd",J],nzCentered:[2,"nzCentered","nzCentered",J],nzHideAll:[2,"nzHideAll","nzHideAll",J],nzLinkRouter:[2,"nzLinkRouter","nzLinkRouter",J],nzLinkExact:[2,"nzLinkExact","nzLinkExact",J],nzDestroyInactiveTabPane:[2,"nzDestroyInactiveTabPane","nzDestroyInactiveTabPane",J]},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabs"],features:[ai([{provide:_o,useExisting:Un(()=>q)}])],decls:4,vars:12,consts:[["tabpaneTmpl",""],[3,"style","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],[3,"tabScroll","selectFocusedIndex","addClicked","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled"],[1,"ant-tabs-tab",3,"click","contextmenu"],["type","button","role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"id","disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["type","button","nz-tab-close-button","",3,"closeIcon"],["type","button","nz-tab-close-button","",3,"click","closeIcon"],[3,"ngTemplateOutlet"],["role","tabpanel","nz-tab-body","",3,"id","active","content","animated"]],template:function(u,b){u&1&&(T(0,cr,3,10,"nz-tabs-nav",1),a(1,"div",2)(2,"div",3),T(3,br,2,0),s()()),u&2&&(x(b.tabs.length||b.addable?0:-1),l(2),K("ant-tabs-content-top",b.nzTabPosition==="top")("ant-tabs-content-bottom",b.nzTabPosition==="bottom")("ant-tabs-content-left",b.nzTabPosition==="left")("ant-tabs-content-right",b.nzTabPosition==="right")("ant-tabs-content-animated",b.tabPaneAnimated),l(),x(b.nzHideAll?-1:3))},dependencies:[On,De,go,Si,yi,Le,Ve,fo,vr],encapsulation:2})),q})();var Co=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[Bn,On,En,Jt,fo]})}return t})();var wr=t=>({$implicit:t});function Dr(t,o){if(t&1&&h(0,"nz-icon",3),t&2){let e=c(3);m("nzType",e.icon)}}function Nr(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=o.$implicit,n=c(4);l(),me(" ",e(n.nzPercent)," ")}}function Ir(t,o){if(t&1&&S(0,Nr,2,1,"ng-container",4),t&2){let e=c(3);m("nzStringTemplateOutlet",e.formatter)("nzStringTemplateOutletContext",kt(2,wr,e.nzPercent))}}function Er(t,o){if(t&1&&(a(0,"span",2),T(1,Dr,1,1,"nz-icon",3)(2,Ir,1,4,"ng-container"),s()),t&2){let e=c(2);l(),x((e.status==="exception"||e.status==="success")&&!e.nzFormat?1:2)}}function Or(t,o){if(t&1&&T(0,Er,3,1,"span",2),t&2){let e=c();x(e.nzShowInfo?0:-1)}}function Fr(t,o){if(t&1&&h(0,"div",8),t&2){let e=o.$implicit;mt(e)}}function jr(t,o){}function Br(t,o){if(t&1&&(a(0,"div",5),oe(1,Fr,1,2,"div",6,jt),S(3,jr,0,0,"ng-template",7),s()),t&2){let e=c(2),n=B(1);l(),re(e.steps),l(2),m("ngTemplateOutlet",n)}}function Ar(t,o){if(t&1&&h(0,"div",13),t&2){let e=c(3);Re("width",e.nzSuccessPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("height",e.strokeWidth,"px")}}function Rr(t,o){}function Wr(t,o){if(t&1&&(a(0,"div",9)(1,"div",10),h(2,"div",11),T(3,Ar,1,6,"div",12),s()(),S(4,Rr,0,0,"ng-template",7)),t&2){let e=c(2),n=B(1);l(2),Re("width",e.nzPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("background",e.isGradient?null:e.nzStrokeColor)("background-image",e.isGradient?e.lineGradient:null)("height",e.strokeWidth,"px"),l(),x(e.nzSuccessPercent||e.nzSuccessPercent===0?3:-1),l(),m("ngTemplateOutlet",n)}}function Vr(t,o){if(t&1&&(a(0,"div"),T(1,Br,4,1,"div",5)(2,Wr,5,12),s()),t&2){let e=c();l(),x(e.isSteps?1:2)}}function Lr(t,o){if(t&1&&(Pt(),h(0,"stop")),t&2){let e=o.$implicit;xe("offset",e.offset)("stop-color",e.color)}}function Gr(t,o){if(t&1&&(Pt(),a(0,"defs")(1,"linearGradient",17),oe(2,Lr,1,2,":svg:stop",null,jt),s()()),t&2){let e=c(2);l(),m("id","gradient-"+e.gradientId),l(),re(e.circleGradient)}}function $r(t,o){if(t&1&&(Pt(),h(0,"path",18)),t&2){let e=o.$implicit,n=c(2);mt(e.strokePathStyle),xe("d",n.pathString)("stroke-linecap",n.nzStrokeLinecap)("stroke",e.stroke)("stroke-width",n.nzPercent?n.strokeWidth:0)}}function Hr(t,o){}function Qr(t,o){if(t&1&&(a(0,"div",10),Pt(),a(1,"svg",14),T(2,Gr,4,1,":svg:defs"),h(3,"path",15),oe(4,$r,1,6,":svg:path",16,jt),s(),S(6,Hr,0,0,"ng-template",7),s()),t&2){let e=c(),n=B(1);Re("width",e.nzWidth,"px")("height",e.nzWidth,"px")("font-size",e.nzWidth*.15+6,"px"),K("ant-progress-circle-gradient",e.isGradient),l(2),x(e.isGradient?2:-1),l(),mt(e.trailPathStyle),xe("stroke-width",e.strokeWidth)("d",e.pathString),l(),re(e.progressCirclePath),l(2),m("ngTemplateOutlet",n)}}function Xr(t){return+t.replace("%","")}var bo=t=>{let o=[];return Object.keys(t).forEach(e=>{let n=t[e],i=Xr(e);isNaN(i)||o.push({key:i,value:n})}),o=o.sort((e,n)=>e.key-n.key),o},Ur=t=>bo(t).map(({key:o,value:e})=>({offset:`${o}%`,color:e})),Yr=t=>{let r=t,{from:o="#1890ff",to:e="#1890ff",direction:n="to right"}=r,i=Wn(r,["from","to","direction"]);if(Object.keys(i).length!==0){let d=bo(i).map(({key:M,value:O})=>`${O} ${M}%`).join(", ");return`linear-gradient(${n}, ${d})`}return`linear-gradient(${n}, ${o}, ${e})`},qr=0,zo="progress",Zr=new Map([["success","check"],["exception","close"]]),Kr=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),Jr=t=>`${t}%`,An=(()=>{var Se;let t,o=[],e=[],n,i=[],r=[],d,M=[],O=[],X,Y=[],ye=[],q,Tt=[],g=[],u,b=[],D=[],ie,st=[],Rn=[];return Se=class{_nzModuleName=zo;cdr=f(We);directionality=f(rt);destroyRef=f(Be);nzShowInfo=j(this,o,!0);nzWidth=(j(this,e),132);nzStrokeColor=j(this,i,void 0);nzSize=(j(this,r),j(this,M,"default"));nzFormat=j(this,O);nzSuccessPercent;nzPercent=0;nzStrokeWidth=j(this,Y,void 0);nzGapDegree=(j(this,ye),j(this,Tt,void 0));nzStatus=j(this,g);nzType="line";nzGapPosition=j(this,b,"top");nzStrokeLinecap=(j(this,D),j(this,st,"round"));nzSteps=(j(this,Rn),0);steps=[];lineGradient=null;isGradient=!1;isSteps=!1;gradientId=qr++;progressCirclePath=[];circleGradient;trailPathStyle=null;pathString;icon;dir="ltr";get formatter(){return this.nzFormat||Jr}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}cachedStatus="normal";inferredStatus="normal";constructor(){vi(zo,()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()})}ngOnChanges(F){let{nzSteps:_,nzGapPosition:N,nzStrokeLinecap:Pe,nzStrokeColor:ge,nzGapDegree:qe,nzType:lt,nzStatus:Ze,nzPercent:Me,nzSuccessPercent:It,nzStrokeWidth:bn}=F;Ze&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(Me||It)&&(parseInt(this.nzPercent.toString(),10)>=100?(Dn(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(Ze||Me||It||ge)&&this.updateIcon(),ge&&this.setStrokeColor(),(N||Pe||qe||lt||Me||ge||ge)&&this.getCirclePaths(),(Me||_||bn)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.directionality.change?.pipe(te(this.destroyRef)).subscribe(F=>{this.dir=F,this.cdr.detectChanges()}),this.dir=this.directionality.value}updateIcon(){let F=Zr.get(this.status);this.icon=F?F+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let F=Math.floor(this.nzSteps*(this.nzPercent/100)),_=this.nzSize==="small"?2:14,N=[];for(let Pe=0;Pe<this.nzSteps;Pe++){let ge;Pe<=F-1&&(ge=this.nzStrokeColor);let qe={backgroundColor:`${ge}`,width:`${_}px`,height:`${this.strokeWidth}px`};N.push(qe)}this.steps=N}getCirclePaths(){if(!this.isCircleStyle)return;let F=Dn(this.nzSuccessPercent)?[this.nzSuccessPercent,this.nzPercent]:[this.nzPercent],_=50-this.strokeWidth/2,N=this.nzGapPosition||(this.nzType==="circle"?"top":"bottom"),Pe=Math.PI*2*_,ge=this.nzGapDegree||(this.nzType==="circle"?0:75),qe=0,lt=-_,Ze=0,Me=_*-2;switch(N){case"left":qe=-_,lt=0,Ze=_*2,Me=0;break;case"right":qe=_,lt=0,Ze=_*-2,Me=0;break;case"bottom":lt=_,Me=_*2;break;default:}this.pathString=`M 50,50 m ${qe},${lt}
1
+ import{a as no,b as io,c as oo,d as ro,e as ao}from"./chunk-ECWYTW7Q.js";import{a as Di,b as Ni,c as Ii}from"./chunk-GNFBCMLE.js";import{b as Zi,c as Yt,d as qt,e as zt,f as Ki,g as to}from"./chunk-5RKAWOOJ.js";import"./chunk-SIVPP74B.js";import{a as Ji,b as eo}from"./chunk-ZJKBRM7K.js";import{a as Zt,b as bt}from"./chunk-IGJYBE5M.js";import"./chunk-HZ73CM45.js";import{a as Ie,b as le,c as Hi,d as Qi}from"./chunk-CF64VPDQ.js";import{a as Qt,c as Xt,d as Xi,e as Ui,f as Ut}from"./chunk-TN5O5PXP.js";import{a as Nn,b as Ee,c as _e,d as Oe,f as ji,g as Bi}from"./chunk-34QRY4VA.js";import{b as $i,c as Yi,d as qi}from"./chunk-GKOCPXFS.js";import"./chunk-SNCDDYQR.js";import{B as Xe,C as Gt,D as _t,E as $t,F as Ht,H as Ct,I as Ue,h as Ai,k as Wt,l as Ri,n as Wi,q as Vi,r as Li,t as Gi,v as Vt,w as Lt,x as gt}from"./chunk-A6CKMRBS.js";import{Cb as He,Eb as Qe,F as bi,G as vi,H as ue,La as wi,M as E,N as w,O as Ve,P as Le,T as Ti,U as xi,V as Z,W as Ne,Wa as At,Y as ne,Z as H,a as kn,b as _i,ba as yi,c as wn,f as Dn,ga as Si,h as Ci,ha as Pi,i as Bt,ia as Mi,ib as Fe,kb as Ce,la as ki,lb as Ei,nb as Oi,ob as ze,pb as Fi,sb as Q,u as zi,vb as Rt,w as ot,x as rt,xb as je,yb as ht,z as te,zb as be}from"./chunk-J43J3F2V.js";import"./chunk-HFZLJHYR.js";import{B as wt,d as De,f as fi,i as I,v as hi,y as ft,z as gi}from"./chunk-53YRDYLS.js";import{$b as re,A as xn,Ac as ei,Ca as Be,Cc as ti,Dc as B,Eb as y,Ec as Re,Fb as we,Fc as K,Gb as $e,Gc as mt,Ha as pe,Hc as ni,Ic as p,Jc as G,Kb as S,Kc as me,L as Je,Lb as Kn,M as et,Mc as A,N as Gn,Nc as R,Oa as Te,Oc as W,Pc as ii,Q as $n,Qc as oi,Ra as tt,Rc as ri,Sa as Ot,T as Hn,Tb as xe,U as Qn,Uc as ai,Vb as T,Vc as ut,W as Et,Wc as kt,Xa as Zn,Xb as x,Yb as jt,Yc as si,Zb as pt,Zc as li,_b as oe,_c as ci,a as ve,ac as m,ad as $,b as Tn,bc as a,c as Wn,ca as St,cc as s,da as Xn,dc as h,ea as yn,f as ct,fd as ee,g as Ke,gd as pi,hc as ae,ic as se,jc as Sn,jd as di,kc as P,l as Ge,la as Un,ld as Pn,ma as Yn,mb as l,mc as Jn,na as ke,o as Vn,od as mi,p as Ln,pa as qn,pd as ui,qc as v,r as ce,ra as f,rb as k,rd as We,s as j,sb as nt,tc as c,u as xt,uc as Mt,vb as it,vc as dt,vd as J,wc as Ae,wd as Mn,xa as C,xc as de,ya as z,yb as Ft,yc as V,z as yt,za as Pt,zc as L}from"./chunk-SJG2JCPL.js";function Oo(t,o){if(t&1&&(ae(0),h(1,"nz-icon",1),se()),t&2){let e=o.$implicit;l(),m("nzType",e)}}var Fo=["nz-tab-body",""];function jo(t,o){}function Bo(t,o){if(t&1&&(ae(0),h(1,"nz-icon",1),se()),t&2){let e=o.$implicit;l(),m("nzType",e)}}var Ao=()=>({minWidth:"46px"}),Ro=()=>({visible:!1});function Wo(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c().$implicit;l(),me(" ",e.tab.label," ")}}function Vo(t,o){if(t&1){let e=P();a(0,"li",7),v("click",function(){let i=C(e).$implicit,r=c(2);return z(r.onSelect(i))})("contextmenu",function(i){let r=C(e).$implicit,d=c(2);return z(d.onContextmenu(r,i))}),S(1,Wo,2,1,"ng-container",8),s()}if(t&2){let e=o.$implicit;K("ant-tabs-dropdown-menu-item-disabled",e.disabled),m("nzSelected",e.active)("nzDisabled",e.disabled),l(),m("nzStringTemplateOutlet",e.tab.label)("nzStringTemplateOutletContext",ut(6,Ro))}}function Lo(t,o){if(t&1&&(a(0,"ul",4),oe(1,Vo,2,7,"li",6,pt),s()),t&2){let e=c();l(),re(e.items)}}function Go(t,o){if(t&1){let e=P();a(0,"button",9),v("click",function(){C(e);let i=c();return z(i.addClicked.emit())}),s()}if(t&2){let e=c();m("addIcon",e.addIcon)}}var $o=["navWrap"],Ho=["navList"],Qo=["*"];function Xo(t,o){}function Uo(t,o){if(t&1&&(a(0,"div",2),S(1,Xo,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.startExtraContent().templateRef)}}function Yo(t,o){if(t&1){let e=P();a(0,"button",9),v("click",function(){C(e);let i=c();return z(i.addClicked.emit())}),s()}if(t&2){let e=c();m("addIcon",e.addIcon),xe("tabindex",-1)}}function qo(t,o){}function Zo(t,o){if(t&1&&(a(0,"div",2),S(1,qo,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.endExtraContent().templateRef)}}function Ko(t,o){}function Jo(t,o){if(t&1&&(a(0,"div",2),S(1,Ko,0,0,"ng-template",8),s()),t&2){let e=c();l(),m("ngTemplateOutlet",e.extraTemplate)}}var er=["contentTemplate"],tr=[[["","nz-tab-link",""]],"*"],nr=["[nz-tab-link]","*"];function ir(t,o){t&1&&dt(0)}function or(t,o){t&1&&dt(0,1)}var rr=()=>({visible:!0});function ar(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c().$implicit;l(),me(" ",e.label," ")}}function sr(t,o){if(t&1){let e=P();a(0,"button",10),v("click",function(i){C(e);let r=c().$index,d=c(2);return z(d.onClose(r,i))}),s()}if(t&2){let e=c().$implicit;m("closeIcon",e.nzCloseIcon)}}function lr(t,o){if(t&1){let e=P();a(0,"div",6),v("click",function(i){let r=C(e),d=r.$implicit,M=r.$index,O=c(2);return z(O.clickNavItem(d,M,i))})("contextmenu",function(i){let r=C(e).$implicit,d=c(2);return z(d.contextmenuNavItem(r,i))}),a(1,"button",7),S(2,ar,2,1,"ng-container",8),T(3,sr,1,1,"button",9),s()()}if(t&2){let e=o.$implicit,n=o.$index,i=c(2);Re("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),K("ant-tabs-tab-active",i.nzSelectedIndex===n)("ant-tabs-tab-disabled",e.nzDisabled),l(),m("id",i.getTabContentId(n))("disabled",e.nzDisabled)("tab",e)("active",i.nzSelectedIndex===n),xe("tabIndex",i.getTabIndex(e,n))("aria-disabled",e.nzDisabled)("aria-selected",i.nzSelectedIndex===n&&!i.nzHideAll)("aria-controls",i.getTabContentId(n)),l(),m("nzStringTemplateOutlet",e.label)("nzStringTemplateOutletContext",ut(19,rr)),l(),x(e.nzClosable&&i.closable&&!e.nzDisabled?3:-1)}}function cr(t,o){if(t&1){let e=P();a(0,"nz-tabs-nav",4),v("tabScroll",function(i){C(e);let r=c();return z(r.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){C(e);let r=c();return z(r.setSelectedIndex(i))})("addClicked",function(){C(e);let i=c();return z(i.onAdd())}),oe(1,lr,4,20,"div",5,pt),s()}if(t&2){let e=c();mt(e.nzTabBarStyle),m("selectedIndex",e.nzSelectedIndex||0)("inkBarAnimated",e.inkBarAnimated)("addable",e.addable)("addIcon",e.nzAddIcon)("hideBar",e.nzHideAll)("position",e.position)("extraTemplate",e.nzTabBarExtraContent)("extraContents",e.extraContents()),l(),re(e.tabs)}}function pr(t,o){}function dr(t,o){if(t&1&&S(0,pr,0,0,"ng-template",11),t&2){c();let e=B(4);m("ngTemplateOutlet",e)}}function mr(t,o){}function ur(t,o){if(t&1&&S(0,mr,0,0,"ng-template",11),t&2){c(2);let e=B(4);m("ngTemplateOutlet",e)}}function fr(t,o){if(t&1&&T(0,ur,1,1,null,11),t&2){let e=c().$index,n=c(2);x(n.nzSelectedIndex===e?0:-1)}}function hr(t,o){}function gr(t,o){if(t&1&&S(0,hr,0,0,"ng-template",11),t&2){c(2);let e=B(4);m("ngTemplateOutlet",e)}}function _r(t,o){if(t&1&&T(0,gr,1,1,null,11),t&2){let e=c(),n=e.$implicit,i=e.$index,r=c(2);x(r.nzSelectedIndex===i||n.hasBeenActive?0:-1)}}function Cr(t,o){if(t&1&&h(0,"div",12),t&2){let e=c(),n=e.$implicit,i=e.$index,r=c(2);m("id",r.getTabContentId(i))("active",r.nzSelectedIndex===i)("content",n.content)("animated",r.tabPaneAnimated),xe("aria-labelledby",r.getTabContentId(i))}}function zr(t,o){if(t&1&&(T(0,dr,1,1,null,11)(1,fr,1,1)(2,_r,1,1),S(3,Cr,1,5,"ng-template",null,0,$)),t&2){let e=o.$implicit,n=c(2);x(e.nzForceRender?0:n.nzDestroyInactiveTabPane?1:2)}}function br(t,o){if(t&1&&oe(0,zr,5,1,null,null,pt),t&2){let e=c();re(e.tabs)}}var In=class{index;tab},Jt=(()=>{class t{addIcon="plus";element=f(tt).nativeElement;getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,Oo,2,1,"ng-container",0),n&2&&m("nzStringTemplateOutlet",i.addIcon)},dependencies:[Le,Ve,w,E],encapsulation:2})}return t})(),so=(()=>{class t{position=Pn("end",{alias:"nzTabBarExtraContent"});templateRef=f(it);static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabBarExtraContent","",5,"nz-tabset",5,"nz-tabs"]],inputs:{position:[1,"nzTabBarExtraContent","position"]}})}return t})(),vr=(()=>{class t{content=null;active=!1;animated=!0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:10,hostBindings:function(n,i){n&2&&(Jn("@tabSwitchMotion",i.active?"enter":"leave")("@.disabled",!i.animated),xe("tabindex",i.active?0:-1)("aria-hidden",!i.active),Re("overflow-y",i.animated?i.active?null:"none":null),K("ant-tabs-tabpane-active",i.active)("ant-tabs-tabpane-hidden",i.animated?null:!i.active))},inputs:{content:"content",active:"active",animated:"animated"},exportAs:["nzTabBody"],attrs:Fo,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(n,i){n&1&&S(0,jo,0,0,"ng-template",0),n&2&&m("ngTemplateOutlet",i.content)},dependencies:[De],encapsulation:2,data:{animation:[wi]},changeDetection:0})}return t})(),fo=(()=>{class t{closeIcon="close";static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,Bo,2,1,"ng-container",0),n&2&&m("nzStringTemplateOutlet",i.closeIcon)},dependencies:[Le,Ve,w,E],encapsulation:2})}return t})(),Tr=(()=>{class t{templateRef=f(it,{host:!0});static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]})}return t})(),ho=(()=>{class t{elementRef=f(tt);routerLink=f(gi,{self:!0,optional:!0});static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]})}return t})(),go=(()=>{class t{disabled=!1;tab;active=!1;elementRef=f(tt);el=this.elementRef.nativeElement;parentElement=this.el.parentElement;focus(){this.el.focus({preventScroll:!0})}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabNavItem",""]],inputs:{disabled:[2,"disabled","disabled",J],tab:"tab",active:[2,"active","active",J]}})}return t})(),En=(()=>{class t{items=[];addable=!1;addIcon="plus";addClicked=new k;selected=new k;closeAnimationWaitTimeoutId;menuOpened=!1;cdr=f(We);element=f(tt).nativeElement;onSelect(e){e.disabled||(e.tab.nzClick.emit(),this.selected.emit(e))}onContextmenu(e,n){e.disabled||e.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(e){e||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(n,i){n&2&&K("ant-tabs-nav-operations-hidden",i.items.length===0)},inputs:{items:"items",addable:[2,"addable","addable",J],addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],decls:7,vars:6,consts:[["dropdownTrigger","nzDropdown"],["menu","nzDropdownMenu"],["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzVisibleChange","mouseenter","nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement"],["nzType","ellipsis"],["nz-menu",""],["nz-tab-add-button","",3,"addIcon"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"click","contextmenu","nzSelected","nzDisabled"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let r=P();a(0,"button",2,0),v("nzVisibleChange",function(M){return C(r),z(i.menuVisChange(M))})("mouseenter",function(){return C(r),z(i.showItems())}),h(2,"nz-icon",3),s(),a(3,"nz-dropdown-menu",null,1),T(5,Lo,3,0,"ul",4),s(),T(6,Go,1,1,"button",5)}if(n&2){let r=B(4);m("nzDropdownMenu",r)("nzOverlayStyle",ut(5,Ao))("nzMatchWidthElement",null),l(5),x(i.menuOpened?5:-1),l(),x(i.addable?6:-1)}},dependencies:[w,E,Le,Ve,Jt,Gi,Vi,Wi,Ri,Li],encapsulation:2,changeDetection:0})}return t})(),xr=.1,lo=.01,Kt=20,co=.995**Kt,yr=(()=>{class t{ngZone=f(nt);destroyRef=f(Be);el=f(tt).nativeElement;lastWheelDirection=null;lastWheelTimestamp=0;lastTimestamp=0;lastTimeDiff=0;lastMixedWheel=0;lastWheelPrevent=!1;touchPosition=null;lastOffset=null;motion=-1;offsetChange=new k;tabScroll=new k;ngOnInit(){let e=ot(this.el,"wheel"),n=ot(this.el,"touchstart"),i=ot(this.el,"touchmove"),r=ot(this.el,"touchend");this.subscribeWrap("wheel",e,this.onWheel),this.subscribeWrap("touchstart",n,this.onTouchStart),this.subscribeWrap("touchmove",i,this.onTouchMove),this.subscribeWrap("touchend",r,this.onTouchEnd)}subscribeWrap(e,n,i){return n.pipe(te(this.destroyRef)).subscribe(r=>{this.tabScroll.emit({type:e,event:r}),r.defaultPrevented||i(r)})}onTouchEnd=e=>{if(!this.touchPosition)return;let n=this.lastOffset,i=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,n){let r=n.x/i,d=n.y/i,M=Math.abs(r),O=Math.abs(d);if(Math.max(M,O)<xr)return;let X=r,Y=d;this.motion=window.setInterval(()=>{if(Math.abs(X)<lo&&Math.abs(Y)<lo){window.clearInterval(this.motion);return}X*=co,Y*=co,this.onOffset(X*Kt,Y*Kt,e)},Kt)}};onTouchMove=e=>{if(!this.touchPosition)return;e.preventDefault();let{screenX:n,screenY:i}=e.touches[0],r=n-this.touchPosition.x,d=i-this.touchPosition.y;this.onOffset(r,d,e);let M=Date.now();this.lastTimeDiff=M-this.lastTimestamp,this.lastTimestamp=M,this.lastOffset={x:r,y:d},this.touchPosition={x:n,y:i}};onTouchStart=e=>{let{screenX:n,screenY:i}=e.touches[0];this.touchPosition={x:n,y:i},window.clearInterval(this.motion)};onWheel=e=>{let{deltaX:n,deltaY:i}=e,r,d=Math.abs(n),M=Math.abs(i);d===M?r=this.lastWheelDirection==="x"?n:i:d>M?(r=n,this.lastWheelDirection="x"):(r=i,this.lastWheelDirection="y");let O=Date.now(),X=Math.abs(r);(O-this.lastWheelTimestamp>100||X-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-r,-r,e),(e.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=O,this.lastMixedWheel=X};onOffset(e,n,i){this.offsetChange.observers.length&&this.ngZone.run(()=>{this.offsetChange.emit({x:e,y:n,event:i})})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}})}return t})(),po=(()=>{class t{ngZone=f(nt);el=f(tt).nativeElement;position="horizontal";animated=!0;animationMode=f(Zn,{optional:!0});get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}alignToElement(e){this.ngZone.runOutsideAngular(()=>{At(()=>this.setStyles(e))})}setStyles(e){this.position==="horizontal"?(this.el.style.top="",this.el.style.height="",this.el.style.left=this.getLeftPosition(e),this.el.style.width=this.getElementWidth(e)):(this.el.style.left="",this.el.style.width="",this.el.style.top=this.getTopPosition(e),this.el.style.height=this.getElementHeight(e))}getLeftPosition(e){return e?`${e.offsetLeft||0}px`:"0"}getElementWidth(e){return e?`${e.offsetWidth||0}px`:"0"}getTopPosition(e){return e?`${e.offsetTop||0}px`:"0"}getElementHeight(e){return e?`${e.offsetHeight||0}px`:"0"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(n,i){n&2&&K("ant-tabs-ink-bar-animated",i._animated)},inputs:{position:"position",animated:"animated"}})}return t})(),Sr=typeof At<"u"?Ln:Vn,mo=150,On=(()=>{class t{cdr=f(We);ngZone=f(nt);viewportRuler=f(ki);nzResizeObserver=f(Ki);dir=f(rt);destroyRef=f(Be);indexFocused=new k;selectFocusedIndex=new k;addClicked=new k;tabScroll=new k;position="horizontal";addable=!1;hideBar=!1;addIcon="plus";inkBarAnimated=!0;extraTemplate;extraContents=Pn.required();startExtraContent=ee(()=>this.extraContents().find(e=>e.position()==="start"));endExtraContent=ee(()=>this.extraContents().find(e=>e.position()==="end"));get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let n=wn(e);this._selectedIndex!==n&&(this._selectedIndex=e,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(e))}navWrapRef;navListRef;operationRef;addBtnRef;inkBar;items;get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(e){!this.isValidIndex(e)||this.focusIndex===e||!this.keyManager||this.keyManager.setActiveItem(e)}get showAddButton(){return this.hiddenItems.length===0&&this.addable}translate=null;transformX=0;transformY=0;pingLeft=!1;pingRight=!1;pingTop=!1;pingBottom=!1;hiddenItems=[];keyManager;_selectedIndex=0;wrapperWidth=0;wrapperHeight=0;scrollListWidth=0;scrollListHeight=0;operationWidth=0;operationHeight=0;addButtonWidth=0;addButtonHeight=0;selectedIndexChanged=!1;lockAnimationTimeoutId;cssTransformTimeWaitingId;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId)})}ngAfterViewInit(){let e=this.dir?this.dir.change.asObservable():xt(null),n=this.viewportRuler.change(150),i=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new Mi(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),At(i),Je(this.nzResizeObserver.observe(this.navWrapRef),this.nzResizeObserver.observe(this.navListRef)).pipe(te(this.destroyRef),Gn(16,Sr)).subscribe(()=>{i()}),Je(e,n,this.items.changes).pipe(te(this.destroyRef)).subscribe(()=>{Promise.resolve().then(i),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(te(this.destroyRef)).subscribe(r=>{this.indexFocused.emit(r),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}onSelectedFromMenu(e){let n=this.items.toArray().findIndex(i=>i===e);n!==-1&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(e)))}onOffsetChange(e){if(this.position==="horizontal"){if(!this.lockAnimationTimeoutId&&(this.transformX>=0&&e.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&e.x<0))return;e.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+e.x),this.setTransform(this.transformX,0)}else{if(!this.lockAnimationTimeoutId&&(this.transformY>=0&&e.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&e.y<0))return;e.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+e.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(e){let n=this.navWrapRef.nativeElement.contains(e.target);if(!(Pi(e)||!n))switch(e.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(e);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(e)}}isValidIndex(e){if(!this.items)return!0;let n=this.items?this.items.toArray()[e]:null;return!!n&&!n.disabled}scrollToTab(e){if(!this.items.find(i=>i===e))return;let n=this.items.toArray();if(this.position==="horizontal"){let i=this.transformX;if(this.getLayoutDirection()==="rtl"){let r=n[0].left+n[0].width-e.left-e.width;r<this.transformX?i=r:r+e.width>this.transformX+this.wrapperWidth&&(i=r+e.width-this.wrapperWidth)}else e.left<-this.transformX?i=-e.left:e.left+e.width>-this.transformX+this.wrapperWidth&&(i=-(e.left+e.width-this.wrapperWidth));this.transformX=i,this.transformY=0,this.setTransform(i,0)}else{let i=this.transformY;e.top<-this.transformY?i=-e.top:e.top+e.height>-this.transformY+this.wrapperHeight&&(i=-(e.top+e.height-this.wrapperHeight)),this.transformY=i,this.transformX=0,this.setTransform(0,i)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},mo)}lockAnimation(){this.lockAnimationTimeoutId||this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=void 0},mo)})}setTransform(e,n){this.navListRef.nativeElement.style.transform=`translate(${e}px, ${n}px)`}clampTransformX(e){let n=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(n,e),0):Math.min(Math.max(n,e),0)}clampTransformY(e){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,e),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWrapRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWrapRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){let e=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=e?e.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){let e={top:!1,right:!1,bottom:!1,left:!1},n=this.navWrapRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(e.right=this.transformX>0,e.left=this.transformX+this.wrapperWidth<this.scrollListWidth):(e.left=this.transformX<0,e.right=-this.transformX+this.wrapperWidth<this.scrollListWidth):(e.top=this.transformY<0,e.bottom=-this.transformY+this.wrapperHeight<this.scrollListHeight),Object.keys(e).forEach(i=>{let r=`ant-tabs-nav-wrap-ping-${i}`;e[i]?n.classList.add(r):n.classList.remove(r)})}setVisibleRange(){let e,n,i,r,d,M,O=this.items.toArray(),X={width:0,height:0,left:0,top:0,right:0},Y=D=>{let ie,st=O[D]||X;return n==="right"?ie=O[0].left+O[0].width-O[D].left-O[D].width:ie=st[n],ie};this.position==="horizontal"?(e="width",r=this.wrapperWidth,d=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),M=this.addButtonWidth,i=Math.abs(this.transformX),this.getLayoutDirection()==="rtl"?(n="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidth<this.scrollListWidth):(this.pingLeft=this.transformX<0,this.pingRight=-this.transformX+this.wrapperWidth<this.scrollListWidth,n="left")):(e="height",r=this.wrapperHeight,d=this.scrollListHeight-(this.hiddenItems.length?this.operationHeight:0),M=this.addButtonHeight,n="top",i=-this.transformY,this.pingTop=this.transformY<0,this.pingBottom=-this.transformY+this.wrapperHeight<this.scrollListHeight);let ye=r;if(d+M>r&&(ye=r-M),!O.length){this.hiddenItems=[],this.cdr.markForCheck();return}let q=O.length,Tt=q;for(let D=0;D<q;D+=1){let ie=Y(D),st=O[D]||X;if(ie+st[e]>i+ye){Tt=D-1;break}}let g=0;for(let D=q-1;D>=0;D-=1)if(Y(D)<i){g=D+1;break}let u=O.slice(0,g),b=O.slice(Tt+1);this.hiddenItems=[...u,...b],this.cdr.markForCheck()}getLayoutDirection(){return this.dir&&this.dir.value==="rtl"?"rtl":"ltr"}ngOnChanges(e){let{position:n}=e;n&&!n.isFirstChange()&&(this.alignInkBarToSelectedTab(),this.lockAnimation(),this.updateScrollListPosition())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tabs-nav"]],contentQueries:function(n,i,r){if(n&1&&Ae(r,go,5),n&2){let d;V(d=L())&&(i.items=d)}},viewQuery:function(n,i){if(n&1&&(de($o,7),de(Ho,7),de(En,7),de(Jt,5),de(po,7)),n&2){let r;V(r=L())&&(i.navWrapRef=r.first),V(r=L())&&(i.navListRef=r.first),V(r=L())&&(i.operationRef=r.first),V(r=L())&&(i.addBtnRef=r.first),V(r=L())&&(i.inkBar=r.first)}},hostAttrs:[1,"ant-tabs-nav"],hostBindings:function(n,i){n&1&&v("keydown",function(d){return i.handleKeydown(d)})},inputs:{position:"position",addable:[2,"addable","addable",J],hideBar:[2,"hideBar","hideBar",J],addIcon:"addIcon",inkBarAnimated:"inkBarAnimated",extraTemplate:"extraTemplate",extraContents:[1,"extraContents"],selectedIndex:"selectedIndex"},outputs:{indexFocused:"indexFocused",selectFocusedIndex:"selectFocusedIndex",addClicked:"addClicked",tabScroll:"tabScroll"},exportAs:["nzTabsNav"],features:[Te],ngContentSelectors:Qo,decls:11,vars:17,consts:[["navWrap",""],["navList",""],[1,"ant-tabs-extra-content"],[1,"ant-tabs-nav-wrap"],["nzTabScrollList","","role","tablist",1,"ant-tabs-nav-list",3,"offsetChange","tabScroll"],["role","tab","nz-tab-add-button","",3,"addIcon"],["nz-tabs-ink-bar","",3,"hidden","position","animated"],[3,"addClicked","selected","addIcon","addable","items"],[3,"ngTemplateOutlet"],["role","tab","nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let r=P();Mt(),T(0,Uo,2,1,"div",2),a(1,"div",3,0)(3,"div",4,1),v("offsetChange",function(M){return C(r),z(i.onOffsetChange(M))})("tabScroll",function(M){return C(r),z(i.tabScroll.emit(M))}),dt(5),T(6,Yo,1,2,"button",5),h(7,"div",6),s()(),a(8,"nz-tab-nav-operation",7),v("addClicked",function(){return C(r),z(i.addClicked.emit())})("selected",function(M){return C(r),z(i.onSelectedFromMenu(M))}),s(),T(9,Zo,2,1,"div",2)(10,Jo,2,1,"div",2)}n&2&&(x(i.startExtraContent()?0:-1),l(),K("ant-tabs-nav-wrap-ping-left",i.pingLeft)("ant-tabs-nav-wrap-ping-right",i.pingRight)("ant-tabs-nav-wrap-ping-top",i.pingTop)("ant-tabs-nav-wrap-ping-bottom",i.pingBottom),l(5),x(i.showAddButton?6:-1),l(),m("hidden",i.hideBar)("position",i.position)("animated",i.inkBarAnimated),l(),m("addIcon",i.addIcon)("addable",i.addable)("items",i.hiddenItems),l(),x(i.endExtraContent()?9:i.extraTemplate?10:-1))},dependencies:[yr,Jt,po,En,De],encapsulation:2,changeDetection:0})}return t})(),Fn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["","nz-tab",""]],exportAs:["nzTab"]})}return t})(),_o=new qn(""),jn=(()=>{class t{nzTitle="";nzClosable=!1;nzCloseIcon="close";nzDisabled=!1;nzForceRender=!1;nzSelect=new k;nzDeselect=new k;nzClick=new k;nzContextmenu=new k;nzTabLinkTemplateDirective;template=null;linkDirective;contentTemplate;isActive=!1;hasBeenActive=!1;position=null;origin=null;closestTabSet=f(_o);stateChanges=new Ge;get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}ngOnChanges(e){let{nzTitle:n,nzDisabled:i,nzForceRender:r}=e;(n||i||r)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}setActive(e){this.isActive=e,e&&(this.hasBeenActive=!0)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-tab"]],contentQueries:function(n,i,r){if(n&1&&(Ae(r,Tr,5),Ae(r,Fn,5,it),Ae(r,ho,5)),n&2){let d;V(d=L())&&(i.nzTabLinkTemplateDirective=d.first),V(d=L())&&(i.template=d.first),V(d=L())&&(i.linkDirective=d.first)}},viewQuery:function(n,i){if(n&1&&de(er,7),n&2){let r;V(r=L())&&(i.contentTemplate=r.first)}},inputs:{nzTitle:"nzTitle",nzClosable:[2,"nzClosable","nzClosable",J],nzCloseIcon:"nzCloseIcon",nzDisabled:[2,"nzDisabled","nzDisabled",J],nzForceRender:[2,"nzForceRender","nzForceRender",J]},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[Te],ngContentSelectors:nr,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(n,i){n&1&&(Mt(tr),Kn(0,ir,1,0,"ng-template",null,0,$)(2,or,1,0,"ng-template",null,1,$))},encapsulation:2,changeDetection:0})}return t})(),Pr="tabs",Mr=0,Bn=(()=>{var q;let t,o=[],e=[],n,i=[],r=[],d,M=[],O=[],X,Y=[],ye=[];return q=class{_nzModuleName=Pr;nzConfigService=f(bi);ngZone=f(nt);cdr=f(We);directionality=f(rt);destroyRef=f(Be);get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(g){this.indexToSelect=wn(g,null)}nzTabPosition="top";nzTabBarExtraContent;nzCanDeactivate=null;nzAddIcon="plus";nzTabBarStyle=null;nzType=j(this,o,"line");nzSize=(j(this,e),j(this,i,"default"));nzAnimated=(j(this,r),j(this,M,!0));nzTabBarGutter=(j(this,O),j(this,Y,void 0));nzHideAdd=(j(this,ye),!1);nzCentered=!1;nzHideAll=!1;nzLinkRouter=!1;nzLinkExact=!0;nzDestroyInactiveTabPane=!1;nzSelectChange=new k(!0);nzSelectedIndexChange=new k;nzTabListScroll=new k;nzClose=new k;nzAdd=new k;get position(){return["top","bottom"].indexOf(this.nzTabPosition)===-1?"vertical":"horizontal"}get addable(){return this.nzType==="editable-card"&&!this.nzHideAdd}get closable(){return this.nzType==="editable-card"}get line(){return this.nzType==="line"}get inkBarAnimated(){return this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.tabPane}allTabs=new Ot;tabLinks=new Ot;tabNavBarRef;tabs=new Ot;extraContents=mi(so);dir="ltr";tabSetId;indexToSelect=0;selectedIndex=null;tabLabelSubscription=Ke.EMPTY;canDeactivateSubscription=Ke.EMPTY;router=f(ft,{optional:!0});constructor(){this.tabSetId=Mr++,f(di)==="nz-tabset"&&_i(`${kn} <nz-tabset> is deprecated, please use <nz-tabs> instead.`),this.destroyRef.onDestroy(()=>{this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()})}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(te(this.destroyRef)).subscribe(g=>{this.dir=g,this.cdr.detectChanges()})}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabs.changes.pipe(te(this.destroyRef)).subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let u=this.tabs.toArray();for(let b=0;b<u.length;b++)if(u[b].isActive){this.indexToSelect=this.selectedIndex=b;break}}this.subscribeToTabLabels(),this.cdr.markForCheck()})}ngAfterContentChecked(){let g=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this.selectedIndex!==g){let u=this.selectedIndex==null;u||this.nzSelectChange.emit(this.createChangeEvent(g)),Promise.resolve().then(()=>{this.tabs.forEach((b,D)=>b.setActive(D===g)),u||this.nzSelectedIndexChange.emit(g)})}this.tabs.forEach((u,b)=>{u.position=b-g,this.selectedIndex!=null&&u.position===0&&!u.origin&&(u.origin=g-this.selectedIndex)}),this.selectedIndex!==g&&(this.selectedIndex=g,this.cdr.markForCheck())}onClose(g,u){u.preventDefault(),u.stopPropagation(),this.nzClose.emit({index:g})}onAdd(){this.nzAdd.emit()}clampTabIndex(g){return Math.min(this.tabs.length-1,Math.max(g||0,0))}createChangeEvent(g){let u=new In;return u.index=g,this.tabs&&this.tabs.length&&(u.tab=this.tabs.toArray()[g],this.tabs.forEach((b,D)=>{D!==g&&b.nzDeselect.emit()}),u.tab.nzSelect.emit()),u}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=Je(...this.tabs.map(g=>g.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(St(this.allTabs)).subscribe(g=>{this.tabs.reset(g.filter(u=>u.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(g,u){return typeof this.nzCanDeactivate=="function"?zi(this.nzCanDeactivate(g,u)).pipe(Et(),te(this.destroyRef)):xt(!0)}clickNavItem(g,u,b){g.nzDisabled||(g.nzClick.emit(),this.isRouterLinkClickEvent(u,b)||this.setSelectedIndex(u))}isRouterLinkClickEvent(g,u){let b=u.target;return this.nzLinkRouter?!!this.tabs.toArray()[g]?.linkDirective?.elementRef.nativeElement.contains(b):!1}contextmenuNavItem(g,u){g.nzDisabled||g.nzContextmenu.emit(u)}setSelectedIndex(g){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,g).subscribe(u=>{u&&(this.nzSelectedIndex=g,this.tabNavBarRef.focusIndex=g,this.cdr.markForCheck())})}getTabIndex(g,u){return g.nzDisabled?null:this.selectedIndex===u?0:-1}getTabContentId(g){return`nz-tabs-${this.tabSetId}-tab-${g}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${kn} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);Je(this.router.events.pipe(et(g=>g instanceof hi)),this.tabLinks.changes).pipe(St(!0),Hn(0),te(this.destroyRef)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router?.navigated){let g=this.findShouldActiveTabIndex();g!==this.selectedIndex&&this.setSelectedIndex(g),Promise.resolve().then(()=>this.nzHideAll=g===-1)}}findShouldActiveTabIndex(){let g=this.tabs.toArray(),u=this.isLinkActive(this.router);return g.findIndex(b=>{let D=b.linkDirective;return D?u(D.routerLink):!1})}isLinkActive(g){return u=>u?!!g?.isActive(u.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}},(()=>{let g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ue()],n=[ue()],d=[ue()],X=[ue()],ce(null,null,t,{kind:"field",name:"nzType",static:!1,private:!1,access:{has:u=>"nzType"in u,get:u=>u.nzType,set:(u,b)=>{u.nzType=b}},metadata:g},o,e),ce(null,null,n,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:u=>"nzSize"in u,get:u=>u.nzSize,set:(u,b)=>{u.nzSize=b}},metadata:g},i,r),ce(null,null,d,{kind:"field",name:"nzAnimated",static:!1,private:!1,access:{has:u=>"nzAnimated"in u,get:u=>u.nzAnimated,set:(u,b)=>{u.nzAnimated=b}},metadata:g},M,O),ce(null,null,X,{kind:"field",name:"nzTabBarGutter",static:!1,private:!1,access:{has:u=>"nzTabBarGutter"in u,get:u=>u.nzTabBarGutter,set:(u,b)=>{u.nzTabBarGutter=b}},metadata:g},Y,ye),g&&Object.defineProperty(q,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),ct(q,"\u0275fac",function(u){return new(u||q)}),ct(q,"\u0275cmp",y({type:q,selectors:[["nz-tabs"],["nz-tabset"]],contentQueries:function(u,b,D){if(u&1&&(ei(D,b.extraContents,so,4),Ae(D,jn,5),Ae(D,ho,5)),u&2){ti();let ie;V(ie=L())&&(b.allTabs=ie),V(ie=L())&&(b.tabLinks=ie)}},viewQuery:function(u,b){if(u&1&&de(On,5),u&2){let D;V(D=L())&&(b.tabNavBarRef=D.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(u,b){u&2&&K("ant-tabs-card",b.nzType==="card"||b.nzType==="editable-card")("ant-tabs-editable",b.nzType==="editable-card")("ant-tabs-editable-card",b.nzType==="editable-card")("ant-tabs-centered",b.nzCentered)("ant-tabs-rtl",b.dir==="rtl")("ant-tabs-top",b.nzTabPosition==="top")("ant-tabs-bottom",b.nzTabPosition==="bottom")("ant-tabs-left",b.nzTabPosition==="left")("ant-tabs-right",b.nzTabPosition==="right")("ant-tabs-default",b.nzSize==="default")("ant-tabs-small",b.nzSize==="small")("ant-tabs-large",b.nzSize==="large")},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:[2,"nzHideAdd","nzHideAdd",J],nzCentered:[2,"nzCentered","nzCentered",J],nzHideAll:[2,"nzHideAll","nzHideAll",J],nzLinkRouter:[2,"nzLinkRouter","nzLinkRouter",J],nzLinkExact:[2,"nzLinkExact","nzLinkExact",J],nzDestroyInactiveTabPane:[2,"nzDestroyInactiveTabPane","nzDestroyInactiveTabPane",J]},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabs"],features:[ai([{provide:_o,useExisting:Un(()=>q)}])],decls:4,vars:12,consts:[["tabpaneTmpl",""],[3,"style","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],[3,"tabScroll","selectFocusedIndex","addClicked","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled"],[1,"ant-tabs-tab",3,"click","contextmenu"],["type","button","role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"id","disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["type","button","nz-tab-close-button","",3,"closeIcon"],["type","button","nz-tab-close-button","",3,"click","closeIcon"],[3,"ngTemplateOutlet"],["role","tabpanel","nz-tab-body","",3,"id","active","content","animated"]],template:function(u,b){u&1&&(T(0,cr,3,10,"nz-tabs-nav",1),a(1,"div",2)(2,"div",3),T(3,br,2,0),s()()),u&2&&(x(b.tabs.length||b.addable?0:-1),l(2),K("ant-tabs-content-top",b.nzTabPosition==="top")("ant-tabs-content-bottom",b.nzTabPosition==="bottom")("ant-tabs-content-left",b.nzTabPosition==="left")("ant-tabs-content-right",b.nzTabPosition==="right")("ant-tabs-content-animated",b.tabPaneAnimated),l(),x(b.nzHideAll?-1:3))},dependencies:[On,De,go,Si,yi,Le,Ve,fo,vr],encapsulation:2})),q})();var Co=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[Bn,On,En,Jt,fo]})}return t})();var wr=t=>({$implicit:t});function Dr(t,o){if(t&1&&h(0,"nz-icon",3),t&2){let e=c(3);m("nzType",e.icon)}}function Nr(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=o.$implicit,n=c(4);l(),me(" ",e(n.nzPercent)," ")}}function Ir(t,o){if(t&1&&S(0,Nr,2,1,"ng-container",4),t&2){let e=c(3);m("nzStringTemplateOutlet",e.formatter)("nzStringTemplateOutletContext",kt(2,wr,e.nzPercent))}}function Er(t,o){if(t&1&&(a(0,"span",2),T(1,Dr,1,1,"nz-icon",3)(2,Ir,1,4,"ng-container"),s()),t&2){let e=c(2);l(),x((e.status==="exception"||e.status==="success")&&!e.nzFormat?1:2)}}function Or(t,o){if(t&1&&T(0,Er,3,1,"span",2),t&2){let e=c();x(e.nzShowInfo?0:-1)}}function Fr(t,o){if(t&1&&h(0,"div",8),t&2){let e=o.$implicit;mt(e)}}function jr(t,o){}function Br(t,o){if(t&1&&(a(0,"div",5),oe(1,Fr,1,2,"div",6,jt),S(3,jr,0,0,"ng-template",7),s()),t&2){let e=c(2),n=B(1);l(),re(e.steps),l(2),m("ngTemplateOutlet",n)}}function Ar(t,o){if(t&1&&h(0,"div",13),t&2){let e=c(3);Re("width",e.nzSuccessPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("height",e.strokeWidth,"px")}}function Rr(t,o){}function Wr(t,o){if(t&1&&(a(0,"div",9)(1,"div",10),h(2,"div",11),T(3,Ar,1,6,"div",12),s()(),S(4,Rr,0,0,"ng-template",7)),t&2){let e=c(2),n=B(1);l(2),Re("width",e.nzPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("background",e.isGradient?null:e.nzStrokeColor)("background-image",e.isGradient?e.lineGradient:null)("height",e.strokeWidth,"px"),l(),x(e.nzSuccessPercent||e.nzSuccessPercent===0?3:-1),l(),m("ngTemplateOutlet",n)}}function Vr(t,o){if(t&1&&(a(0,"div"),T(1,Br,4,1,"div",5)(2,Wr,5,12),s()),t&2){let e=c();l(),x(e.isSteps?1:2)}}function Lr(t,o){if(t&1&&(Pt(),h(0,"stop")),t&2){let e=o.$implicit;xe("offset",e.offset)("stop-color",e.color)}}function Gr(t,o){if(t&1&&(Pt(),a(0,"defs")(1,"linearGradient",17),oe(2,Lr,1,2,":svg:stop",null,jt),s()()),t&2){let e=c(2);l(),m("id","gradient-"+e.gradientId),l(),re(e.circleGradient)}}function $r(t,o){if(t&1&&(Pt(),h(0,"path",18)),t&2){let e=o.$implicit,n=c(2);mt(e.strokePathStyle),xe("d",n.pathString)("stroke-linecap",n.nzStrokeLinecap)("stroke",e.stroke)("stroke-width",n.nzPercent?n.strokeWidth:0)}}function Hr(t,o){}function Qr(t,o){if(t&1&&(a(0,"div",10),Pt(),a(1,"svg",14),T(2,Gr,4,1,":svg:defs"),h(3,"path",15),oe(4,$r,1,6,":svg:path",16,jt),s(),S(6,Hr,0,0,"ng-template",7),s()),t&2){let e=c(),n=B(1);Re("width",e.nzWidth,"px")("height",e.nzWidth,"px")("font-size",e.nzWidth*.15+6,"px"),K("ant-progress-circle-gradient",e.isGradient),l(2),x(e.isGradient?2:-1),l(),mt(e.trailPathStyle),xe("stroke-width",e.strokeWidth)("d",e.pathString),l(),re(e.progressCirclePath),l(2),m("ngTemplateOutlet",n)}}function Xr(t){return+t.replace("%","")}var bo=t=>{let o=[];return Object.keys(t).forEach(e=>{let n=t[e],i=Xr(e);isNaN(i)||o.push({key:i,value:n})}),o=o.sort((e,n)=>e.key-n.key),o},Ur=t=>bo(t).map(({key:o,value:e})=>({offset:`${o}%`,color:e})),Yr=t=>{let r=t,{from:o="#1890ff",to:e="#1890ff",direction:n="to right"}=r,i=Wn(r,["from","to","direction"]);if(Object.keys(i).length!==0){let d=bo(i).map(({key:M,value:O})=>`${O} ${M}%`).join(", ");return`linear-gradient(${n}, ${d})`}return`linear-gradient(${n}, ${o}, ${e})`},qr=0,zo="progress",Zr=new Map([["success","check"],["exception","close"]]),Kr=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),Jr=t=>`${t}%`,An=(()=>{var Se;let t,o=[],e=[],n,i=[],r=[],d,M=[],O=[],X,Y=[],ye=[],q,Tt=[],g=[],u,b=[],D=[],ie,st=[],Rn=[];return Se=class{_nzModuleName=zo;cdr=f(We);directionality=f(rt);destroyRef=f(Be);nzShowInfo=j(this,o,!0);nzWidth=(j(this,e),132);nzStrokeColor=j(this,i,void 0);nzSize=(j(this,r),j(this,M,"default"));nzFormat=j(this,O);nzSuccessPercent;nzPercent=0;nzStrokeWidth=j(this,Y,void 0);nzGapDegree=(j(this,ye),j(this,Tt,void 0));nzStatus=j(this,g);nzType="line";nzGapPosition=j(this,b,"top");nzStrokeLinecap=(j(this,D),j(this,st,"round"));nzSteps=(j(this,Rn),0);steps=[];lineGradient=null;isGradient=!1;isSteps=!1;gradientId=qr++;progressCirclePath=[];circleGradient;trailPathStyle=null;pathString;icon;dir="ltr";get formatter(){return this.nzFormat||Jr}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}cachedStatus="normal";inferredStatus="normal";constructor(){vi(zo,()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()})}ngOnChanges(F){let{nzSteps:_,nzGapPosition:N,nzStrokeLinecap:Pe,nzStrokeColor:ge,nzGapDegree:qe,nzType:lt,nzStatus:Ze,nzPercent:Me,nzSuccessPercent:It,nzStrokeWidth:bn}=F;Ze&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(Me||It)&&(parseInt(this.nzPercent.toString(),10)>=100?(Dn(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(Ze||Me||It||ge)&&this.updateIcon(),ge&&this.setStrokeColor(),(N||Pe||qe||lt||Me||ge||ge)&&this.getCirclePaths(),(Me||_||bn)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.directionality.change?.pipe(te(this.destroyRef)).subscribe(F=>{this.dir=F,this.cdr.detectChanges()}),this.dir=this.directionality.value}updateIcon(){let F=Zr.get(this.status);this.icon=F?F+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let F=Math.floor(this.nzSteps*(this.nzPercent/100)),_=this.nzSize==="small"?2:14,N=[];for(let Pe=0;Pe<this.nzSteps;Pe++){let ge;Pe<=F-1&&(ge=this.nzStrokeColor);let qe={backgroundColor:`${ge}`,width:`${_}px`,height:`${this.strokeWidth}px`};N.push(qe)}this.steps=N}getCirclePaths(){if(!this.isCircleStyle)return;let F=Dn(this.nzSuccessPercent)?[this.nzSuccessPercent,this.nzPercent]:[this.nzPercent],_=50-this.strokeWidth/2,N=this.nzGapPosition||(this.nzType==="circle"?"top":"bottom"),Pe=Math.PI*2*_,ge=this.nzGapDegree||(this.nzType==="circle"?0:75),qe=0,lt=-_,Ze=0,Me=_*-2;switch(N){case"left":qe=-_,lt=0,Ze=_*2,Me=0;break;case"right":qe=_,lt=0,Ze=_*-2,Me=0;break;case"bottom":lt=_,Me=_*2;break;default:}this.pathString=`M 50,50 m ${qe},${lt}
2
2
  a ${_},${_} 0 1 1 ${Ze},${-Me}
3
3
  a ${_},${_} 0 1 1 ${-Ze},${Me}`,this.trailPathStyle={strokeDasharray:`${Pe-ge}px ${Pe}px`,strokeDashoffset:`-${ge/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},this.progressCirclePath=F.map((It,bn)=>{let vn=F.length===2&&bn===0;return{stroke:this.isGradient&&!vn?`url(#gradient-${this.gradientId})`:null,strokePathStyle:{stroke:this.isGradient?null:vn?Kr.get("success"):this.nzStrokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(It||0)/100*(Pe-ge)}px ${Pe}px`,strokeDashoffset:`-${ge/2}px`}}}).reverse()}setStrokeColor(){let F=this.nzStrokeColor,_=this.isGradient=!!F&&typeof F!="string";_&&!this.isCircleStyle?this.lineGradient=Yr(F):_&&this.isCircleStyle?this.circleGradient=Ur(this.nzStrokeColor):(this.lineGradient=null,this.circleGradient=[])}},(()=>{let F=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ue()],n=[ue()],d=[ue()],X=[ue()],q=[ue()],u=[ue()],ie=[ue()],ce(null,null,t,{kind:"field",name:"nzShowInfo",static:!1,private:!1,access:{has:_=>"nzShowInfo"in _,get:_=>_.nzShowInfo,set:(_,N)=>{_.nzShowInfo=N}},metadata:F},o,e),ce(null,null,n,{kind:"field",name:"nzStrokeColor",static:!1,private:!1,access:{has:_=>"nzStrokeColor"in _,get:_=>_.nzStrokeColor,set:(_,N)=>{_.nzStrokeColor=N}},metadata:F},i,r),ce(null,null,d,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:_=>"nzSize"in _,get:_=>_.nzSize,set:(_,N)=>{_.nzSize=N}},metadata:F},M,O),ce(null,null,X,{kind:"field",name:"nzStrokeWidth",static:!1,private:!1,access:{has:_=>"nzStrokeWidth"in _,get:_=>_.nzStrokeWidth,set:(_,N)=>{_.nzStrokeWidth=N}},metadata:F},Y,ye),ce(null,null,q,{kind:"field",name:"nzGapDegree",static:!1,private:!1,access:{has:_=>"nzGapDegree"in _,get:_=>_.nzGapDegree,set:(_,N)=>{_.nzGapDegree=N}},metadata:F},Tt,g),ce(null,null,u,{kind:"field",name:"nzGapPosition",static:!1,private:!1,access:{has:_=>"nzGapPosition"in _,get:_=>_.nzGapPosition,set:(_,N)=>{_.nzGapPosition=N}},metadata:F},b,D),ce(null,null,ie,{kind:"field",name:"nzStrokeLinecap",static:!1,private:!1,access:{has:_=>"nzStrokeLinecap"in _,get:_=>_.nzStrokeLinecap,set:(_,N)=>{_.nzStrokeLinecap=N}},metadata:F},st,Rn),F&&Object.defineProperty(Se,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:F})})(),ct(Se,"\u0275fac",function(_){return new(_||Se)}),ct(Se,"\u0275cmp",y({type:Se,selectors:[["nz-progress"]],inputs:{nzShowInfo:"nzShowInfo",nzWidth:"nzWidth",nzStrokeColor:"nzStrokeColor",nzSize:"nzSize",nzFormat:"nzFormat",nzSuccessPercent:[2,"nzSuccessPercent","nzSuccessPercent",Bt],nzPercent:[2,"nzPercent","nzPercent",Mn],nzStrokeWidth:[2,"nzStrokeWidth","nzStrokeWidth",Bt],nzGapDegree:[2,"nzGapDegree","nzGapDegree",Bt],nzStatus:"nzStatus",nzType:"nzType",nzGapPosition:"nzGapPosition",nzStrokeLinecap:"nzStrokeLinecap",nzSteps:[2,"nzSteps","nzSteps",Mn]},exportAs:["nzProgress"],features:[Te],decls:5,vars:18,consts:[["progressInfoTemplate",""],[1,"ant-progress-inner",3,"width","height","fontSize","ant-progress-circle-gradient"],[1,"ant-progress-text"],[3,"nzType"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[1,"ant-progress-steps-outer"],[1,"ant-progress-steps-item",3,"style"],[3,"ngTemplateOutlet"],[1,"ant-progress-steps-item"],[1,"ant-progress-outer"],[1,"ant-progress-inner"],[1,"ant-progress-bg"],[1,"ant-progress-success-bg",3,"width","border-radius","height"],[1,"ant-progress-success-bg"],["viewBox","0 0 100 100",1,"ant-progress-circle"],["stroke","#f3f3f3","fill-opacity","0",1,"ant-progress-circle-trail"],["fill-opacity","0",1,"ant-progress-circle-path",3,"style"],["x1","100%","y1","0%","x2","0%","y2","0%",3,"id"],["fill-opacity","0",1,"ant-progress-circle-path"]],template:function(_,N){_&1&&(S(0,Or,1,1,"ng-template",null,0,$),a(2,"div"),T(3,Vr,3,1,"div"),T(4,Qr,7,14,"div",1),s()),_&2&&(l(2),ni("ant-progress ant-progress-status-"+N.status),K("ant-progress-line",N.nzType==="line")("ant-progress-small",N.nzSize==="small")("ant-progress-default",N.nzSize==="default")("ant-progress-show-info",N.nzShowInfo)("ant-progress-circle",N.isCircleStyle)("ant-progress-steps",N.isSteps)("ant-progress-rtl",N.dir==="rtl"),l(),x(N.nzType==="line"?3:-1),l(),x(N.isCircleStyle?4:-1))},dependencies:[w,E,Le,Ve,De],encapsulation:2,changeDetection:0})),Se})(),vo=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[An]})}return t})();var ta=["processDotTemplate"],na=["itemContainer"],ia=(t,o,e)=>({$implicit:t,status:o,index:e});function oa(t,o){t&1&&h(0,"div",3)}function ra(t,o){if(t&1&&(a(0,"div",11),h(1,"nz-progress",12),s()),t&2){let e=c(2);l(),m("nzPercent",e.nzPercentage)("nzWidth",e.nzSize==="small"?32:40)("nzFormat",e.nullProcessFormat)("nzStrokeWidth",4)}}function aa(t,o){t&1&&(a(0,"span",5),h(1,"nz-icon",13),s())}function sa(t,o){t&1&&(a(0,"span",5),h(1,"nz-icon",14),s())}function la(t,o){if(t&1&&(a(0,"span",5),p(1),s()),t&2){let e=c(2);l(),me(" ",e.index+1," ")}}function ca(t,o){if(t&1&&(ae(0),h(1,"nz-icon",15),se()),t&2){let e=o.$implicit;l(),m("nzType",e)}}function pa(t,o){if(t&1&&(a(0,"span",5),S(1,ca,2,1,"ng-container",8),s()),t&2){let e=c(2);l(),m("nzStringTemplateOutlet",e.nzIcon)}}function da(t,o){if(t&1&&(T(0,ra,2,4,"div",11),T(1,aa,2,0,"span",5),T(2,sa,2,0,"span",5),T(3,la,2,1,"span",5),T(4,pa,2,1,"span",5)),t&2){let e=c();x(e.showProgress?0:-1),l(),x(e.nzStatus==="finish"&&!e.nzIcon?1:-1),l(),x(e.nzStatus==="error"?2:-1),l(),x((e.nzStatus==="process"||e.nzStatus==="wait")&&!e.nzIcon?3:-1),l(),x(e.nzIcon?4:-1)}}function ma(t,o){t&1&&h(0,"span",17)}function ua(t,o){}function fa(t,o){if(t&1&&(a(0,"span",5),S(1,ma,1,0,"ng-template",null,1,$)(3,ua,0,0,"ng-template",16),s()),t&2){let e=B(2),n=c();l(3),m("ngTemplateOutlet",n.customProcessTemplate||e)("ngTemplateOutletContext",si(2,ia,e,n.nzStatus,n.index))}}function ha(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c();l(),G(e.nzTitle)}}function ga(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c(2);l(),G(e.nzSubtitle)}}function _a(t,o){if(t&1&&(a(0,"div",9),S(1,ga,2,1,"ng-container",8),s()),t&2){let e=c();l(),m("nzStringTemplateOutlet",e.nzSubtitle)}}function Ca(t,o){if(t&1&&(ae(0),p(1),se()),t&2){let e=c();l(),G(e.nzDescription)}}var za=["*"],en=(()=>{class t{cdr=f(We);destroyRef=f(Be);processDotTemplate;itemContainer;nzTitle;nzSubtitle;nzDescription;nzDisabled=!1;nzPercentage=null;nzSize="default";get nzStatus(){return this._status}set nzStatus(e){this._status=e,this.isCustomStatus=!0}isCustomStatus=!1;_status="wait";get nzIcon(){return this._icon}set nzIcon(e){e instanceof it||(this.oldAPIIcon=typeof e=="string"&&e.indexOf("anticon")>-1),this._icon=e}oldAPIIcon=!0;_icon;customProcessTemplate;direction="horizontal";index=0;last=!1;outStatus="process";showProcessDot=!1;clickable=!1;clickOutsideAngular$=new Ge;nullProcessFormat=()=>null;get showProgress(){return this.nzPercentage!==null&&!this.nzIcon&&this.nzStatus==="process"&&this.nzPercentage>=0&&this.nzPercentage<=100}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.isCustomStatus||(this._status=e>this.index?"finish":e===this.index?this.outStatus||"":"wait")}_currentIndex=0;ngOnInit(){ot(this.itemContainer.nativeElement,"click").pipe(et(()=>this.clickable&&this.currentIndex!==this.index&&!this.nzDisabled),te(this.destroyRef)).subscribe(()=>{this.clickOutsideAngular$.next(this.index)})}enable(){this.nzDisabled=!1,this.cdr.markForCheck()}disable(){this.nzDisabled=!0,this.cdr.markForCheck()}markForCheck(){this.cdr.markForCheck()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-step"]],viewQuery:function(n,i){if(n&1&&(de(ta,5),de(na,7)),n&2){let r;V(r=L())&&(i.processDotTemplate=r.first),V(r=L())&&(i.itemContainer=r.first)}},hostAttrs:[1,"ant-steps-item"],hostVars:16,hostBindings:function(n,i){n&2&&K("ant-steps-item-wait",i.nzStatus==="wait")("ant-steps-item-process",i.nzStatus==="process")("ant-steps-item-finish",i.nzStatus==="finish")("ant-steps-item-error",i.nzStatus==="error")("ant-steps-item-active",i.currentIndex===i.index)("ant-steps-item-disabled",i.nzDisabled)("ant-steps-item-custom",!!i.nzIcon)("ant-steps-next-error",i.outStatus==="error"&&i.currentIndex===i.index+1)},inputs:{nzTitle:"nzTitle",nzSubtitle:"nzSubtitle",nzDescription:"nzDescription",nzDisabled:[2,"nzDisabled","nzDisabled",J],nzPercentage:"nzPercentage",nzSize:"nzSize",nzStatus:"nzStatus",nzIcon:"nzIcon"},exportAs:["nzStep"],decls:12,vars:8,consts:[["itemContainer",""],["processDotTemplate",""],[1,"ant-steps-item-container",3,"tabindex"],[1,"ant-steps-item-tail"],[1,"ant-steps-item-icon"],[1,"ant-steps-icon"],[1,"ant-steps-item-content"],[1,"ant-steps-item-title"],[4,"nzStringTemplateOutlet"],[1,"ant-steps-item-subtitle"],[1,"ant-steps-item-description"],[1,"ant-steps-progress-icon"],["nzType","circle",3,"nzPercent","nzWidth","nzFormat","nzStrokeWidth"],["nzType","check"],["nzType","close"],[3,"nzType"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-steps-icon-dot"]],template:function(n,i){n&1&&(a(0,"div",2,0),T(2,oa,1,0,"div",3),a(3,"div",4),T(4,da,5,5),T(5,fa,4,6,"span",5),s(),a(6,"div",6)(7,"div",7),S(8,ha,2,1,"ng-container",8),T(9,_a,2,1,"div",9),s(),a(10,"div",10),S(11,Ca,2,1,"ng-container",8),s()()()),n&2&&(m("tabindex",i.clickable&&!i.nzDisabled?0:null),xe("role",i.clickable&&!i.nzDisabled?"button":null),l(2),x(i.last?-1:2),l(2),x(i.showProcessDot?-1:4),l(),x(i.showProcessDot?5:-1),l(3),m("nzStringTemplateOutlet",i.nzTitle),l(),x(i.nzSubtitle?9:-1),l(2),m("nzStringTemplateOutlet",i.nzDescription))},dependencies:[vo,An,w,E,Le,Ve,De],encapsulation:2,changeDetection:0})}return t})(),To=(()=>{class t{static ngAcceptInputType_nzProgressDot;cdr=f(We);ngZone=f(nt);directionality=f(rt);destroyRef=f(Be);steps;nzCurrent=0;nzDirection="horizontal";nzLabelPlacement="horizontal";nzType="default";nzSize="default";nzStartIndex=0;nzStatus="process";set nzProgressDot(e){e instanceof it?(this.showProcessDot=!0,this.customProcessDotTemplate=e):this.showProcessDot=Ci(e),this.updateChildrenSteps()}nzIndexChange=new k;indexChangeSubscription=Ke.EMPTY;showProcessDot=!1;showProgress=!1;customProcessDotTemplate;dir="ltr";ngOnChanges(e){let{nzStartIndex:n,nzDirection:i,nzStatus:r,nzCurrent:d,nzSize:M}=e;(n||i||r||d||M)&&this.updateChildrenSteps()}ngOnInit(){this.directionality.change?.pipe(te(this.destroyRef)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateChildrenSteps()}ngAfterContentInit(){this.steps&&this.steps.changes.pipe(St(null),te(this.destroyRef)).subscribe(()=>{this.updateHostProgressClass(),this.updateChildrenSteps()})}updateHostProgressClass(){this.steps&&!this.showProcessDot&&(this.showProgress=!!this.steps.toArray().find(e=>e.nzPercentage!==null))}updateChildrenSteps(){if(this.steps){let e=this.steps.length;this.steps.toArray().forEach((n,i)=>{Promise.resolve().then(()=>{n.nzSize=this.nzSize,n.outStatus=this.nzStatus,n.showProcessDot=this.showProcessDot,this.customProcessDotTemplate&&(n.customProcessTemplate=this.customProcessDotTemplate),n.clickable=this.nzIndexChange.observers.length>0,n.direction=this.nzDirection,n.index=i+this.nzStartIndex,n.currentIndex=this.nzCurrent,n.last=e===i+1,n.markForCheck()})}),this.indexChangeSubscription.unsubscribe(),this.indexChangeSubscription=Je(...this.steps.map(n=>n.clickOutsideAngular$)).pipe(te(this.destroyRef)).subscribe(n=>{this.nzIndexChange.observers.length&&this.ngZone.run(()=>this.nzIndexChange.emit(n))})}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=y({type:t,selectors:[["nz-steps"]],contentQueries:function(n,i,r){if(n&1&&Ae(r,en,4),n&2){let d;V(d=L())&&(i.steps=d)}},hostAttrs:[1,"ant-steps"],hostVars:18,hostBindings:function(n,i){n&2&&K("ant-steps-horizontal",i.nzDirection==="horizontal")("ant-steps-vertical",i.nzDirection==="vertical")("ant-steps-label-horizontal",i.nzDirection==="horizontal")("ant-steps-label-vertical",(i.showProcessDot||i.nzLabelPlacement==="vertical")&&i.nzDirection==="horizontal")("ant-steps-dot",i.showProcessDot)("ant-steps-small",i.nzSize==="small")("ant-steps-navigation",i.nzType==="navigation")("ant-steps-rtl",i.dir==="rtl")("ant-steps-with-progress",i.showProgress)},inputs:{nzCurrent:"nzCurrent",nzDirection:"nzDirection",nzLabelPlacement:"nzLabelPlacement",nzType:"nzType",nzSize:"nzSize",nzStartIndex:"nzStartIndex",nzStatus:"nzStatus",nzProgressDot:"nzProgressDot"},outputs:{nzIndexChange:"nzIndexChange"},exportAs:["nzSteps"],features:[Te],ngContentSelectors:za,decls:1,vars:0,template:function(n,i){n&1&&(Mt(),dt(0))},encapsulation:2,changeDetection:0})}return t})(),xo=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[en]})}return t})();var Ta=()=>({padding:"8px"});function xa(t,o){if(t&1){let e=P();a(0,"button",13),v("click",function(){C(e);let i=c();return z(i.copy())}),h(1,"nz-icon",14),s()}if(t&2){let e=c();m("nz-tooltip",e.copyied?"\u5DF2\u590D\u5236":"\u590D\u5236")}}function ya(t,o){if(t&1&&(a(0,"div",9)(1,"nz-tag",15),p(2),s()()),t&2){let e=c();l(2),me("\u63A8\u8350\uFF1A",e.draft.detected==null?null:e.draft.detected.recommendedScript)}}function Sa(t,o){t&1&&(a(0,"div",10),p(1," \u26A0\uFE0F \u8986\u76D6\u5DF2\u5B58\u5728\u76EE\u5F55 "),s())}function Pa(t,o){if(t&1){let e=P();a(0,"button",16),v("click",function(){C(e);let i=c();return z(i.isDrawerOpen=!i.isDrawerOpen)}),h(1,"nz-icon",17),p(2," \u65E5\u5FD7\u8F93\u51FA "),s()}}function Ma(t,o){t&1&&(ae(0),h(1,"app-terminal-view"),se()),t&2&&(l(),Re("height",100,"%"))}var tn=class t{draft;chunk="";clipboard=f(to);term;isDrawerOpen=!1;isCreating=ui(!1);copyied=!1;ngOnChanges(o){o.chunk&&o.chunk.currentValue&&this.term&&this.term.write(this.chunk),o.isCreating&&o.isCreating.currentValue===!0&&(this.isDrawerOpen=!0)}copy(){let o=this.draft.repoUrl||"";this.clipboard.copy(o),this.copyied=!0,setTimeout(()=>{this.copyied=!1},2e3)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-create-summary-aside"]],viewQuery:function(e,n){if(e&1&&de(Nn,5),e&2){let i;V(i=L())&&(n.term=i.first)}},inputs:{draft:"draft",chunk:"chunk",isCreating:[1,"isCreating"]},outputs:{isCreating:"isCreatingChange"},features:[Te],decls:44,vars:16,consts:[["logActions",""],["nzTitle","\u6458\u8981","nzSize","small",3,"nzExtra"],[1,"item"],[1,"k"],[1,"v"],[1,"v","mono"],[1,"v",3,"nz-tooltip"],["nz-button","","nzType","text","nzSize","small",3,"nz-tooltip"],[1,"sep"],[1,"tag"],[1,"warn"],["nzTitle","\u65E5\u5FD7","nzPlacement","right",3,"nzOnClose","nzVisible","nzWidth","nzBodyStyle"],[4,"nzDrawerContent"],["nz-button","","nzType","text","nzSize","small",3,"click","nz-tooltip"],["nzType","copy","nzTheme","outline"],["nzColor","blue"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","desktop","nzTheme","outline"]],template:function(e,n){if(e&1){let i=P();a(0,"nz-card",1)(1,"div",2)(2,"span",3),p(3,"\u540D\u79F0"),s(),a(4,"span",4),p(5),s()(),a(6,"div",2)(7,"span",3),p(8,"\u8DEF\u5F84"),s(),a(9,"span",5),p(10),s()(),a(11,"div",2)(12,"span",3),p(13,"\u5305\u7BA1\u7406\u5668"),s(),a(14,"span",4),p(15),s()(),a(16,"div",2)(17,"span",3),p(18,"Git \u8FDC\u7A0B\u4ED3\u5E93"),s(),a(19,"span",6),p(20),s(),T(21,xa,2,1,"button",7),s(),h(22,"div",8),a(23,"div",2)(24,"span",3),p(25,"\u6846\u67B6"),s(),a(26,"span",4),p(27),s()(),a(28,"div",2)(29,"span",3),p(30,"\u811A\u672C\u547D\u4EE4"),s(),a(31,"span",4),p(32),s()(),a(33,"div",2)(34,"span",3),p(35,"Git"),s(),a(36,"span",4),p(37),s()(),T(38,ya,3,1,"div",9),T(39,Sa,2,0,"div",10),s(),S(40,Pa,3,0,"ng-template",null,0,$),a(42,"nz-drawer",11),v("nzOnClose",function(){return C(i),z(n.isDrawerOpen=!1)}),S(43,Ma,2,2,"ng-container",12),s()}if(e&2){let i=B(41);m("nzExtra",i),l(5),G(n.draft.name||"-"),l(5),G(n.draft.rootPath||"-"),l(5),G(n.draft.packageManager),l(4),m("nz-tooltip",n.draft.repoUrl||""),l(),G(n.draft.repoUrl||"-"),l(),x(n.draft.repoUrl?21:-1),l(6),G((n.draft.detected==null?null:n.draft.detected.framework)||"-"),l(5),G((n.draft.detected==null?null:n.draft.detected.scriptsCount)??"-"),l(5),G(n.draft.detected!=null&&n.draft.detected.hasGit?"Yes":"No"),l(),x(n.draft.detected!=null&&n.draft.detected.recommendedScript?38:-1),l(),x(n.draft.overwriteIfExists?39:-1),l(3),m("nzVisible",n.isDrawerOpen)("nzWidth",720)("nzBodyStyle",ut(15,Ta))}},dependencies:[I,le,Ie,bt,Zt,Qe,He,w,E,H,ne,Z,Nn,Ii,Ni,Di],styles:[".item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px;padding:6px 0;align-items:center}.k[_ngcontent-%COMP%]{opacity:.7;width:90px;font-size:14px}.v[_ngcontent-%COMP%]{text-align:right;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;word-break:break-all}.sep[_ngcontent-%COMP%]{height:1px;background:#0000000f;margin:10px 0}.tag[_ngcontent-%COMP%]{margin-top:8px;text-align:right}.warn[_ngcontent-%COMP%]{margin-top:10px;font-size:12px;color:#d46b08}"],changeDetection:0})};function Ia(t,o){t&1&&h(0,"nz-empty",6)}function Ea(t,o){if(t&1&&(a(0,"nz-tag",17),p(1),li(2,"titlecase"),s()),t&2){let e=c().$implicit,n=ri(4);m("nzColor",n==="angular"?"#dd0031":n==="vue"?"#42b883":"#108ee9"),l(),me(" ",ci(2,2,e.kind)," ")}}function Oa(t,o){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",16),p(3),s(),ii(4),T(5,Ea,3,4,"nz-tag",17),s()()),t&2){let e=o.$implicit;m("nzValue",e.path),l(2),m("nz-tooltip",e.path),l(),G(e.path),l();let n=oi(e.kind);l(),x(n?5:-1)}}function Fa(t,o){if(t&1){let e=P();a(0,"nz-radio-group",13),W("ngModelChange",function(i){C(e);let r=c();return R(r.selectedPath,i)||(r.selectedPath=i),z(i)}),oe(1,Oa,6,5,"div",14,pt),s()}if(t&2){let e=c();A("ngModel",e.selectedPath),l(),re(e.filtered())}}var on=class t{constructor(o){this.modalRef=o}data=f(Vt);keyword=pe("");selectedPath=pe(null);ngOnInit(){let{candidates:o,defaultPicked:e}=this.data,n=e&&o.includes(e)?e:o[0]??"";this.selectedPath.set(n?.path??null)}filtered=ee(()=>{let o=(this.keyword()||"").trim().toLowerCase(),e=this.data.candidates??[];return o?e.filter(n=>n.path.toLowerCase().includes(o)):e});cancel(){this.modalRef.close(null)}ok(){let o=this.selectedPath();o&&this.modalRef.close({pickedRoot:o})}static \u0275fac=function(e){return new(e||t)(Ft(Lt))};static \u0275cmp=y({type:t,selectors:[["app-pick-workspace-modal"]],decls:17,vars:3,consts:[[1,"wrap"],[1,"hint"],[1,"toolbar"],["nz-input","","placeholder","\u8FC7\u6EE4\u8DEF\u5F84\uFF08\u5173\u952E\u5B57\uFF09",3,"ngModelChange","ngModel"],["nzType","search","nzTheme","outline","nzSuffix",""],[1,"list"],["nzNotFoundContent","\u6CA1\u6709\u5339\u914D\u7684\u76EE\u5F55"],["nzSize","large",3,"ngModel"],[1,"actions"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","",1,"item",3,"nzValue"],[1,"path"],["nzTooltipPlacement","top",1,"value",3,"nz-tooltip"],["nzMode","default",3,"nzColor"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1),p(2," \u68C0\u6D4B\u5230\u8BE5\u4ED3\u5E93\u53EF\u80FD\u5305\u542B\u591A\u4E2A\u524D\u7AEF\u5DE5\u4F5C\u533A\uFF08Angular / Vue \u7B49\uFF09\u3002\u8BF7\u9009\u62E9\u4E00\u4E2A\u76EE\u5F55\u7EE7\u7EED\u5BFC\u5165\uFF1A "),s(),a(3,"div",2)(4,"nz-input-wrapper")(5,"input",3),W("ngModelChange",function(r){return R(n.keyword,r)||(n.keyword=r),r}),s(),h(6,"nz-icon",4),s()(),a(7,"div",5),T(8,Ia,1,0,"nz-empty",6)(9,Fa,3,1,"nz-radio-group",7),s(),a(10,"div",8)(11,"button",9),v("click",function(){return n.cancel()}),h(12,"nz-icon",10),p(13," \u53D6\u6D88 "),s(),a(14,"button",11),v("click",function(){return n.ok()}),h(15,"nz-icon",12),p(16," \u9009\u4E2D\u5E76\u7EE7\u7EED "),s()()()),e&2&&(l(5),A("ngModel",n.keyword),l(3),x(n.filtered().length===0?8:9),l(6),m("disabled",!n.selectedPath()))},dependencies:[I,Q,Fe,Ce,ze,Xe,be,je,ht,zt,qt,Yt,H,ne,Z,Ne,w,E,Xt,Qt,bt,Zt,Qe,He,fi],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.hint[_ngcontent-%COMP%]{opacity:.85}.toolbar[_ngcontent-%COMP%]{margin-top:4px}nz-radio-group[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{height:240px;overflow:auto;padding:8px;border:var(--app-border-color);border-radius:8px}.item[_ngcontent-%COMP%]{display:flex;gap:8px;padding:12px;border-radius:8px;margin:0;width:100%}.item[_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.item[_ngcontent-%COMP%] .ant-radio+span{display:flex;gap:12px;align-items:center;flex:1 1 auto;width:0;padding:0}.path[_ngcontent-%COMP%]{display:flex;gap:12px;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;width:0;overflow:hidden}.path[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;width:0;overflow:hidden}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}"]})};function Ba(t,o){t&1&&(a(0,"span",4),p(1,"\u8BE5\u8DEF\u5F84\u5DF2\u5B58\u5728"),s())}function Aa(t,o){if(t&1){let e=P();a(0,"input",15),W("ngModelChange",function(i){C(e);let r=c();return R(r.draft.initialCommitMessage,i)||(r.draft.initialCommitMessage=i),z(i)}),s()}if(t&2){let e=c();A("ngModel",e.draft.initialCommitMessage)}}var sn=class t{draft;draftChange=new k;pathCheck$=new Ge;pathExists=!1;fsApi=f(Ai);ngOnInit(){this.computeRootPath(),this.pathCheck$.pipe($n(200),Qn(),Xn(o=>o?this.fsApi.pathExists(o):xt(!1))).subscribe(o=>{this.emit(),this.pathExists=o})}recalcRoot(){this.computeRootPath(),this.pathCheck$.next(this.draft.rootPath)}computeRootPath(){let o=(this.draft.parentDir??"").replace(/[\\/]+$/,""),e=(this.draft.name??"").trim();this.draft.rootPath=o&&e?`${o}/${e}`.replaceAll("\\","/"):o}emit(){this.draftChange.emit(ve({},this.draft))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-step-basic"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:40,vars:8,consts:[["nzTitle","\u57FA\u7840\u8BBE\u7F6E"],["nz-form","","nzLayout","vertical"],["nz-input","","name","name","placeholder","\u8F93\u5165\u9879\u76EE\u540D",3,"ngModelChange","ngModel"],[1,"hint"],[2,"margin-left","8px","color","#ff4d4f"],["name","pm",3,"ngModelChange","ngModel"],["nzValue","auto","nzLabel","\u9ED8\u8BA4"],["nzValue","npm","nzLabel","npm"],["nzValue","pnpm","nzLabel","pnpm"],["nzValue","yarn","nzLabel","yarn"],[1,"switch-row"],["name","overwrite",3,"ngModelChange","ngModel"],["name","skip",3,"ngModelChange","ngModel"],["name","initGit",3,"ngModelChange","ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(a(0,"nz-card",0)(1,"form",1)(2,"nz-form-item")(3,"nz-form-label"),p(4,"\u9879\u76EE\u6587\u4EF6\u5939"),s(),a(5,"nz-form-control")(6,"input",2),W("ngModelChange",function(r){return R(n.draft.name,r)||(n.draft.name=r),r}),v("ngModelChange",function(){return n.recalcRoot()}),s(),a(7,"div",3),p(8),T(9,Ba,2,0,"span",4),s()()(),a(10,"nz-form-item")(11,"nz-form-label"),p(12,"\u5305\u7BA1\u7406\u5668"),s(),a(13,"nz-form-control")(14,"nz-select",5),W("ngModelChange",function(r){return R(n.draft.packageManager,r)||(n.draft.packageManager=r),r}),h(15,"nz-option",6)(16,"nz-option",7)(17,"nz-option",8)(18,"nz-option",9),s()()(),a(19,"nz-form-item")(20,"nz-form-label"),p(21,"\u66F4\u591A\u9009\u9879"),s(),a(22,"nz-form-control")(23,"div",10)(24,"span"),p(25,"\u82E5\u76EE\u6807\u6587\u4EF6\u5939\u5DF2\u5B58\u5728\u5219\u8986\u76D6"),s(),a(26,"nz-switch",11),W("ngModelChange",function(r){return R(n.draft.overwriteIfExists,r)||(n.draft.overwriteIfExists=r),r}),v("ngModelChange",function(){return n.emit()}),s()(),a(27,"div",10)(28,"span"),p(29,"\u65E0\u65B0\u624B\u6307\u5F15\u7684\u811A\u624B\u67B6\u9879\u76EE"),s(),a(30,"nz-switch",12),W("ngModelChange",function(r){return R(n.draft.skipOnboarding,r)||(n.draft.skipOnboarding=r),r}),s()()()(),a(31,"nz-form-item")(32,"nz-form-label"),p(33,"Git"),s(),a(34,"nz-form-control")(35,"div",10)(36,"span"),p(37,"\u521D\u59CB\u5316 git \u4ED3\u5E93\uFF08\u5EFA\u8BAE\uFF09"),s(),a(38,"nz-switch",13),W("ngModelChange",function(r){return R(n.draft.initGit,r)||(n.draft.initGit=r),r}),s()(),T(39,Aa,1,1,"input",14),s()()()()),e&2&&(l(6),A("ngModel",n.draft.name),l(2),me(" ",n.draft.rootPath," "),l(),x(n.pathExists?9:-1),l(5),A("ngModel",n.draft.packageManager),l(12),A("ngModel",n.draft.overwriteIfExists),l(4),A("ngModel",n.draft.skipOnboarding),l(8),A("ngModel",n.draft.initGit),l(),x(n.draft.initGit?39:-1))},dependencies:[I,Q,Fi,Fe,Ce,Ei,ze,Oi,ao,_e,Ee,io,no,ro,oo,be,je,H,Ut,Xi,Ui,_t,Gt,le,Ie,Qe,w,Xe],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}.switch-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-bottom:4px}.switch-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.emit[_ngcontent-%COMP%]{margin-top:8px}"]})};var ln=class t{draft;draftChange=new k;emit(){this.draftChange.emit(ve({},this.draft))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-step-config"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:12,vars:2,consts:[["nzTitle","\u521B\u5EFA\u540E\u9ED8\u8BA4\u884C\u4E3A"],[1,"row"],[1,"label"],[3,"ngModelChange","ngModel"],[1,"row","col"],["nz-input","","placeholder","\u4F8B\u5982\uFF1Adev / start",3,"ngModelChange","ngModel"],[1,"hint"]],template:function(e,n){e&1&&(a(0,"nz-card",0)(1,"div",1)(2,"div",2),p(3,"\u7F6E\u9876\u6536\u85CF"),s(),a(4,"nz-switch",3),W("ngModelChange",function(r){return R(n.draft.pinFavorite,r)||(n.draft.pinFavorite=r),r}),v("ngModelChange",function(){return n.emit()}),s()(),h(5,"div",4),a(6,"div",4)(7,"div",2),p(8,"\u9ED8\u8BA4\u4EFB\u52A1\uFF08\u53EF\u9009\uFF09"),s(),a(9,"input",5),W("ngModelChange",function(r){return R(n.draft.defaultTaskName,r)||(n.draft.defaultTaskName=r),r}),v("ngModelChange",function(){return n.emit()}),s(),a(10,"div",6),p(11,"\u5EFA\u8BAE\u586B\u8BC6\u522B\u5230\u7684 dev \u6216 start"),s()()()),e&2&&(l(4),A("ngModel",n.draft.pinFavorite),l(5),A("ngModel",n.draft.defaultTaskName))},dependencies:[I,Q,Fe,Ce,ze,le,Ie,zt,_t,Gt,be,je],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.row.col[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:8px}.label[_ngcontent-%COMP%]{font-weight:500}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.7}"]})};var cn=class t{draft;draftChange=new k;emit(){this.draftChange.emit(ve({},this.draft))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-step-features"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:1,vars:0,consts:[["nzTitle","\u529F\u80FD\u5F00\u5173\uFF08Project Scope\uFF09"]],template:function(e,n){e&1&&h(0,"nz-card",0)},dependencies:[I,Q,le,Ie,_t],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.label[_ngcontent-%COMP%]{font-weight:500}"]})};var pn=class t{nzModalData=f(Vt);isModalVisible=!1;isSaving=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-git-import-modal-component"]],decls:8,vars:1,consts:[[1,"modal-body"],[1,"label"],["nz-input","","placeholder","\u8BF7\u8F93\u5165Git\u4ED3\u5E93\u5730\u5740","autofocus","",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","github","nzTheme","outline"],[1,"hint"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"label",1),p(2,"URL"),s(),a(3,"nz-input-wrapper")(4,"input",2),W("ngModelChange",function(r){return R(n.nzModalData.cloneUrl,r)||(n.nzModalData.cloneUrl=r),r}),s(),h(5,"nz-icon",3),s(),a(6,"div",4),p(7," Git \u4ED3\u5E93\u5730\u5740, \u5982 'username/repo'. \u53EF\u4EE5\u4F7F\u7528\u524D\u7F00\u5982 'gitlab:' \u6216 'bitbucket:'. "),s()()),e&2&&(l(4),A("ngModel",n.nzModalData.cloneUrl))},dependencies:[I,Q,Fe,Ce,ze,w,E,Xe,be,je,ht,Rt,Ut,H,Z],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}"]})};function Ra(t,o){if(t&1){let e=P();a(0,"button",10),v("click",function(){C(e);let i=c();return z(i.requestDetect.emit())}),h(1,"nz-icon",11),s()}}var dn=class t{draft;draftChange=new k;requestDetect=new k;modal=f(gt);emit(){this.draftChange.emit(ve({},this.draft))}presetChange(o){if(this.draft.preset=o,o==="git"){this.openImportGitModal();return}else this.draft.repoUrl=void 0,this.emit()}openImportGitModal(){let o=this.modal.create({nzTitle:"\u4ECE Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE",nzMaskClosable:!1,nzContent:pn,nzCentered:!0,nzWidth:"580px",nzClosable:!1,nzData:{cloneUrl:"",isSaving:!1},nzFooter:[{label:"\u53D6\u6D88",type:"default",onClick:()=>{o.close(),this.draft.repoUrl=void 0,this.draft.preset="angular",this.emit()}},{label:"\u5BFC\u5165",type:"primary",onClick:e=>{let n=e.nzModalData.cloneUrl,i=e.nzModalData.isSaving;!n||!n.trim()||i||(e.nzModalData.isSaving=!0,this.draft.repoUrl=n.trim(),e.nzModalData.isSaving=!1,this.emit(),o.close())},disabled:e=>{let n=e?.nzModalData.cloneUrl;return!n||!n.trim()},loading:e=>e?.nzModalData.isSaving===!0}]})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-step-preset"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange",requestDetect:"requestDetect"},decls:19,vars:2,consts:[["reloadExtraTpl",""],["nzTitle","\u9009\u62E9\u4E00\u5957\u9884\u8BBE",3,"nzExtra"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","","nzValue","angular"],["for","angular"],[1,"hint"],["nz-radio","","nzValue","vue3"],["for","vue3"],["nz-radio","","nzValue","git"],["for","git"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","reload","nzTheme","outline"]],template:function(e,n){if(e&1){let i=P();a(0,"nz-card",1),S(1,Ra,2,0,"ng-template",null,0,$),a(3,"nz-radio-group",2),W("ngModelChange",function(d){return C(i),R(n.draft.preset,d)||(n.draft.preset=d),z(d)}),v("ngModelChange",function(d){return C(i),z(n.presetChange(d))}),a(4,"div",3)(5,"label",4),p(6,"Angular"),s(),a(7,"div",5),p(8," \u9002\u7528\u4E8E\u4F7F\u7528 Angular \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Angular CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),s()(),a(9,"div",6)(10,"label",7),p(11,"Vue 3"),s(),a(12,"div",5),p(13," \u9002\u7528\u4E8E\u4F7F\u7528 Vue 3 \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Vite \u548C Vue CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),s()(),a(14,"div",8)(15,"label",9),p(16,"Git\u5BFC\u5165"),s(),a(17,"div",5),p(18," \u4ECE\u73B0\u6709\u7684 Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE\uFF0C\u81EA\u52A8\u8BC6\u522B\u9879\u76EE\u7ED3\u6784\u548C\u914D\u7F6E\u3002 "),s()()()()}if(e&2){let i=B(2);m("nzExtra",i),l(3),A("ngModel",n.draft.preset)}},dependencies:[I,Q,Ce,ze,le,Ie,Zi,H,ne,Z,bt,w,E,zt,qt,Yt],styles:[".kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.k[_ngcontent-%COMP%]{opacity:.7;display:inline-block;width:120px}.opt[_ngcontent-%COMP%]{margin-top:10px}nz-radio-group[_ngcontent-%COMP%]{width:100%}[nz-radio][_ngcontent-%COMP%]{display:block;padding:12px;border-radius:8px;width:100%;margin:0}[nz-radio][_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.hint[_ngcontent-%COMP%]{margin-left:24px;font-size:12px;opacity:.75}"]})};function So(){return{preset:"angular",name:"",parentDir:"",rootPath:"",packageManager:"auto",overwriteIfExists:!1,skipOnboarding:!0,initGit:!0,initialCommitMessage:"",importScriptsAsTasks:!0,importMakefileTasks:!1,importDockerComposeTasks:!1,generateCommonTasks:!0,pinFavorite:!1,defaultTaskName:"",cliFramework:"angular",cliTool:"@angular/cli",cliArgs:[]}}function Wa(t,o){if(t&1){let e=P();a(0,"app-step-basic",15),v("draftChange",function(i){C(e);let r=c();return z(r.setDraft(i))}),s()}if(t&2){let e=c();m("draft",e.draft())}}function Va(t,o){if(t&1){let e=P();a(0,"app-step-preset",16),v("draftChange",function(i){C(e);let r=c();return z(r.setDraft(i))})("requestDetect",function(){C(e);let i=c();return z(i.detectNow())}),s()}if(t&2){let e=c();m("draft",e.draft())}}function La(t,o){if(t&1){let e=P();a(0,"app-step-features",15),v("draftChange",function(i){C(e);let r=c();return z(r.setDraft(i))}),s()}if(t&2){let e=c();m("draft",e.draft())}}function Ga(t,o){if(t&1){let e=P();a(0,"app-step-config",15),v("draftChange",function(i){C(e);let r=c();return z(r.setDraft(i))}),s()}if(t&2){let e=c();m("draft",e.draft())}}function $a(t,o){if(t&1){let e=P();a(0,"button",17),v("click",function(){C(e);let i=c();return z(i.cancel())}),h(1,"nz-icon",18),p(2," \u53D6\u6D88 "),s()}}function Ha(t,o){if(t&1){let e=P();a(0,"button",17),v("click",function(){C(e);let i=c();return z(i.prev())}),h(1,"nz-icon",19),p(2," \u4E0A\u4E00\u6B65 "),s()}}function Qa(t,o){if(t&1){let e=P();a(0,"button",20),v("click",function(){C(e);let i=c();return z(i.create())}),h(1,"nz-icon",21),p(2," \u521B\u5EFA\u9879\u76EE "),s()}if(t&2){let e=c();m("disabled",e.creating())}}function Xa(t,o){if(t&1){let e=P();a(0,"button",20),v("click",function(){C(e);let i=c();return z(i.next())}),p(1," \u4E0B\u4E00\u6B65 "),h(2,"nz-icon",22),s()}if(t&2){let e=c();m("disabled",!e.canNext()||!e.canGoNext())}}var mn=class t{step=pe(0);draft=pe(So());creating=pe(!1);output=pe("");isDrawerOpen=pe(!1);fs=f(Wt);parentDir=this.fs.currentPath();modalRef=f(Lt);api=f(Ht);modal=f(gt);notify=f(Ct);taskStream=f(Hi);projectState=f(Ue);router=f(ft);sub=new Ke;ngOnInit(){let o=this.draft(),e=this.parentDir;this.draft.set(Tn(ve({},o),{rootPath:"",parentDir:e,name:""}))}detectNow(){let o=this.draft();o.rootPath?.trim()&&this.api.detect(o.rootPath).subscribe(e=>{let n=e.scripts??[],i={framework:e.framework??"unknown",hasPackageJson:!!e.hasPackageJson,scriptsCount:n.length,hasGit:!!e.hasGit,lockFile:e.lockFile??"unknown",recommendedScript:n.includes("dev")?"dev":n.includes("start")?"start":"",hasMakefile:!!e.hasMakefile,hasDockerCompose:!!e.hasDockerCompose},r=n.length>0,d=!!e.hasMakefile,M=!!e.hasDockerCompose;this.draft.set(Tn(ve({},o),{detected:i,importScriptsAsTasks:r,importMakefileTasks:d&&o.importMakefileTasks,importDockerComposeTasks:M&&o.importDockerComposeTasks,defaultTaskName:i.recommendedScript||o.defaultTaskName}))})}async create(){let o=this.draft();if(!o.rootPath?.trim()||!o.name?.trim()){this.notify.error("\u8BF7\u5148\u5B8C\u5584\u9879\u76EE\u4FE1\u606F");return}if(this.creating())return;let e="\u786E\u8BA4\u521B\u5EFA\u9879\u76EE\uFF1F",n=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${o.rootPath}\uFF0C\u786E\u5B9A\u8981\u521B\u5EFA\u8BE5\u9879\u76EE\u5417\uFF1F`,i="\u786E\u8BA4\u521B\u5EFA",r=!1;o.overwriteIfExists&&(e="\u786E\u8BA4\u8986\u76D6\u5DF2\u5B58\u5728\u7684\u9879\u76EE\uFF1F",n=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${o.rootPath}\uFF0C\u521B\u5EFA\u65F6\u4F1A\u8986\u76D6\u539F\u6709\u6570\u636E\uFF0C\u4E14\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u5417\uFF1F`,i="\u786E\u8BA4\u8986\u76D6",r=!0);let d=this.modal.confirm({nzTitle:e,nzContent:n,nzOkText:i,nzCancelText:"\u53D6\u6D88",nzOkDanger:r,nzCentered:!0,nzOnOk:async()=>{this.doCreate(o),d.close()}})}async doCreate(o){this.creating.set(!0),this.taskStream.ensureConnected();let e=new Ge;try{let n=o.preset==="git"?this.api.bootstrapByGit(o):this.api.bootstrapByCli(o),{taskId:i}=await yt(n);this.taskStream.subscribeTask(i,3e3),this.sub.add(this.taskStream.output$(i).subscribe(Y=>{let ye=Y.payload.text??"";this.output.set(ye)}));let r=await this.waitForTaskEvent(i,["bootstrapDone","bootstrapFailed","bootstrapNeedPickRoot"],600*1e3,e);if(r.type==="bootstrapDone"){let Y=r.payload;this.notify.success("\u9879\u76EE\u521B\u5EFA\u5B8C\u6210"),this.projectState.getProjects(Y.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"]);return}if(r.type==="bootstrapFailed"){let Y=r.payload;this.notify.error(`\u9879\u76EE\u521B\u5EFA\u5931\u8D25\uFF1A${Y?.reason??"unknown error"}`);return}let M=r.payload?.candidates??[];if(!M.length){this.notify.error("\u9879\u76EE\u5BFC\u5165\u5931\u8D25\uFF1A\u672A\u627E\u5230\u53EF\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55");return}let O=await this.pickWorkspaceRootByModal(M);if(!O){this.modal.info({nzTitle:"\u63D0\u793A",nzContent:"\u60A8\u672A\u9009\u62E9\u4EFB\u4F55\u76EE\u5F55\uFF0C\u9879\u76EE\u5BFC\u5165\u5DF2\u53D6\u6D88\u3002\u53EF\u901A\u8FC7\u201C\u5BFC\u5165\u201D\u529F\u80FD\u91CD\u65B0\u624B\u52A8\u5BFC\u5165\u3002",nzCancelText:null,nzOkText:"\u6211\u77E5\u9053\u4E86",nzOnOk:()=>{this.modalRef.close()}});return}let X=await yt(this.api.bootstrapPickRoot({taskId:i,pickedRoot:O}).pipe(xn(60*1e3),yn(e)));if(!X.ok){this.notify.error(X.reason??"\u9879\u76EE\u5BFC\u5165\u5931\u8D25");return}this.notify.success("\u9879\u76EE\u5BFC\u5165\u5B8C\u6210"),this.projectState.getProjects(X.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"])}catch(n){let i=n?.name==="TimeoutError"?"\u521B\u5EFA\u8D85\u65F6\uFF1A\u811A\u624B\u67B6/\u514B\u9686\u53EF\u80FD\u5361\u4F4F\u4E86\uFF0C\u8BF7\u67E5\u770B\u4EFB\u52A1\u65E5\u5FD7":n?.error?.message||n?.message||"\u521B\u5EFA\u5931\u8D25";console.error("\u521B\u5EFA\u9879\u76EE\u5931\u8D25",n),this.notify.error(i)}finally{e.next(),e.complete(),this.creating.set(!1)}}async waitForTaskEvent(o,e,n,i){let r=new Set(e);return await yt(this.taskStream.events$().pipe(et(d=>d?.payload?.taskId===o),et(d=>r.has(d.type)),Et(),xn(n),yn(i)))}setDraft(o){this.draft.set(o)}canNext(){let o=this.step(),e=this.draft();return o===0?!(!e.name?.trim()||!e.parentDir?.trim()||!e.rootPath?.trim()):o===1?!!e.rootPath?.trim():!0}async next(){let o=this.step();if(o===0&&await this.api.checkPathExists(this.draft().rootPath)&&!this.draft().overwriteIfExists){this.notify.error("\u8BE5\u8DEF\u5F84\u4E0D\u53EF\u7528\u6216\u5DF2\u5B58\u5728\u91CD\u590D\u9879\u76EE");return}let e=Math.min(3,o+1);this.step.set(e)}prev(){this.step.set(Math.max(0,this.step()-1))}canGoNext(){let o=this.step();return o===0?!0:o===1?this.isManual():o===2}isManual(){return this.draft().preset==="manual"}canCreateHere(){let o=this.step();return this.isManual()&&o===3||!this.isManual()&&o===1}cancel(){this.modal.confirm({nzTitle:"\u53D6\u6D88\u521B\u5EFA\u9879\u76EE",nzContent:"\u786E\u5B9A\u8981\u53D6\u6D88\u521B\u5EFA\u5417",nzOkDanger:!0,nzOkText:"\u53D6\u6D88\u521B\u5EFA",nzCancelText:"\u4E0D",nzCentered:!0,nzOnOk:()=>{this.modalRef.close()}})}async pickWorkspaceRootByModal(o){let e=this.modal.create({nzTitle:"\u9009\u62E9\u8981\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55",nzContent:on,nzData:{candidates:o,defaultPicked:o[0]},nzFooter:null,nzCentered:!0,nzMaskClosable:!1,nzClosable:!0,nzWidth:720});return(await yt(e.afterClose))?.pickedRoot??null}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-project-create-modal"]],decls:20,vars:9,consts:[["nz-col","","nzSpan","24",1,"modal-container"],[3,"nzCurrent"],["nzTitle","\u8BE6\u60C5"],["nzTitle","\u9884\u8BBE"],["nzTitle","\u529F\u80FD"],["nzTitle","\u914D\u7F6E"],[1,"content"],["nzTip","\u6B63\u5728\u521B\u5EFA\u9879\u76EE...",3,"nzSpinning"],[1,"main"],[3,"draft"],[1,"actions"],["nz-button",""],["nz-button","","nzType","primary",3,"disabled"],[1,"aside"],[3,"isCreatingChange","draft","isCreating","chunk"],[3,"draftChange","draft"],[3,"draftChange","requestDetect","draft"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nzType","arrow-left","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzType","arrow-right","nzTheme","outline"]],template:function(e,n){if(e&1&&(a(0,"div",0)(1,"nz-steps",1),h(2,"nz-step",2)(3,"nz-step",3)(4,"nz-step",4)(5,"nz-step",5),s(),a(6,"div",6)(7,"nz-spin",7)(8,"div",8),T(9,Wa,1,1,"app-step-basic",9)(10,Va,1,1,"app-step-preset",9)(11,La,1,1,"app-step-features",9)(12,Ga,1,1,"app-step-config",9),a(13,"div",10),T(14,$a,3,0,"button",11),T(15,Ha,3,0,"button",11),T(16,Qa,3,1,"button",12)(17,Xa,3,1,"button",12),s()()(),a(18,"div",13)(19,"app-create-summary-aside",14),W("isCreatingChange",function(r){return R(n.creating,r)||(n.creating=r),r}),s()()()()),e&2){let i;l(),m("nzCurrent",n.step()),l(6),m("nzSpinning",n.creating()),l(2),x((i=n.step())===0?9:i===1?10:i===2?11:i===3?12:-1),l(5),x(n.step()===0?14:-1),l(),x(n.step()>0?15:-1),l(),x(n.canCreateHere()?16:17),l(3),m("draft",n.draft()),A("isCreating",n.creating),m("chunk",n.output())}},dependencies:[I,Q,Xe,le,Oe,_e,xo,To,en,H,ne,Z,Ne,be,w,E,eo,Ji,sn,dn,cn,ln,tn],styles:[".content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 360px;gap:16px;margin-top:16px}.main[_ngcontent-%COMP%]{min-height:420px}.actions[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}.aside[_ngcontent-%COMP%]{position:sticky;top:16px;height:fit-content}"]})};var un=class t{constructor(o){this.modal=o}goCreate(){let o=this.modal.create({nzTitle:"\u521B\u5EFA\u65B0\u9879\u76EE",nzFooter:null,nzMaskClosable:!1,nzClosable:!1,nzContent:mn,nzWidth:"1020px",nzCentered:!0}),e=o.getContentComponent();o.afterClose.subscribe(n=>{n?.ok})}static \u0275fac=function(e){return new(e||t)(Ft(gt))};static \u0275cmp=y({type:t,selectors:[["app-project-create"]],decls:7,vars:0,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar"],["nz-button","","nzType","primary","nzSize","large",3,"click"],["nzType","plus","nzTheme","outline"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1),h(2,"app-fs-explorer"),s(),a(3,"div",2)(4,"button",3),v("click",function(){return n.goCreate()}),h(5,"nz-icon",4),p(6," \u5728\u6B64\u521B\u5EFA\u65B0\u9879\u76EE "),s()()())},dependencies:[I,H,ne,Z,Ne,Oe,_e,Ee,$t,w,E],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var vt=class t{fs=f(Wt);projectApi=f(Ht);projectState=f(Ue);active=pe(!1);checking=pe(!1);result=pe(null);canImport=ee(()=>this.result()?.ok===!0);warnings=ee(()=>this.result()?.warnings??[]);reason=ee(()=>this.result()?.reason??"");currentPath=ee(()=>this.fs.currentPath()||this.fs.path());_seq=0;notify=f(Ct);constructor(){pi(()=>{if(!this.active())return;let o=this.currentPath();o&&this.check(o)})}enter(){this.active.set(!0)}leave(){this.active.set(!1),this.result.set(null)}check(o){let e=++this._seq;this.checking.set(!0),this.result.set(null),this.projectApi.checkImport(o).subscribe({next:n=>{e===this._seq&&this.result.set(n)},error:n=>{e===this._seq&&this.result.set({ok:!1,root:o,reason:n?.message||"check failed"})},complete:()=>{e===this._seq&&this.checking.set(!1)}})}import(o){let e=this.currentPath();if(!e||!this.canImport())return;let n=e.replace(/[\\\/]+$/,"").split(/[\\\/]/).pop()||"New Project";this.projectApi.importByPath({root:e,name:o||n,syncTasks:!0}).subscribe({next:i=>{this.projectState.getProjects(),this.projectState.setCurrentProjectById(i.id),this.check(e),this.notify.success("\u9879\u76EE\u5BFC\u5165\u6210\u529F")}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Yn({token:t,factory:t.\u0275fac,providedIn:"root"})};var fn=class t{importState=f(vt);static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-project-import"]],decls:7,vars:1,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar","center"],["nz-button","","nzSize","large","nzType","primary",3,"click","disabled"],["nzType","import","nzTheme","outline"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1),h(2,"app-fs-explorer"),s(),a(3,"div",2)(4,"button",3),v("click",function(){return n.importState.import()}),h(5,"nz-icon",4),p(6," \u5BFC\u5165\u8FD9\u4E2A\u6587\u4EF6\u5939 "),s()()()),e&2&&(l(4),m("disabled",n.importState.checking()||!n.importState.canImport()))},dependencies:[I,Q,Oe,_e,Ee,H,ne,Z,Ne,w,E,$t],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var Ua=(t,o)=>o.spec.id;function Ya(t,o){if(t&1){let e=P();a(0,"div",8)(1,"div",9),v("click",function(){let i=C(e).$implicit,r=c();return z(r.openTask(i))}),a(2,"div",10),h(3,"nz-icon",11),s(),a(4,"div",12)(5,"div",13)(6,"span"),p(7),s()(),a(8,"div",14)(9,"span"),p(10),s()()()(),a(11,"button",15),v("click",function(i){let r=C(e).$implicit,d=c();return i.stopPropagation(),z(d.toggleTask(r))}),h(12,"nz-icon",16),s()()}if(t&2){let e=o.$implicit,n=c();m("nzTooltipTitle",n.getTaskDescription(e)),l(7),G(e.spec.name),l(3),G(n.getTaskDescription(e)),l(2),m("nzType",n.getTaskActionIcon(e))}}var hn=class t{projectId;projectState=f(Ue);router=f(ft);state=f(Qi);tasks=ee(()=>this.projectId?this.state.rowsViewOf(this.projectId)():[]);async ngOnChanges(){this.projectId&&await this.state.ensureProjectLoaded(this.projectId)}toggleTask(o){o.runtime?.status==="running"?this.state.stopSelected():this.state.startSelected(),this.openTask(o)}async openTask(o){this.state.select(o.spec.id),await this.router.navigate(["/tasks"]),this.projectState.setCurrentProjectById(o.spec.projectId)}getTaskName(o){return o.spec.name||o.spec.id}getTaskDescription(o){let e=o.runtime?.status;return o.runtime?this.computedStatusText(e):o.spec.description||""}getTaskActionIcon(o){let e=o.runtime?.status;return e==="running"||e==="stopping"?"pause-circle":"play-circle"}computedStatusText(o){switch(o){case"running":return"\u8FD0\u884C\u4E2D";case"stopping":return"\u505C\u6B62\u4E2D";case"success":return"\u6210\u529F";case"failed":return"\u9519\u8BEF";case"stopped":return"\u5DF2\u505C\u6B62";default:return"\u7A7A\u95F2"}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-project-item-popover"]],inputs:{projectId:"projectId"},features:[Te],decls:11,vars:0,consts:[[1,"dropdown-content"],[1,"pane-toolbar"],[1,"icon"],["nzType","inbox","nzTheme","outline"],[1,"title"],["nz-button","","type","button","nzType","text"],["nzType","close","nzTheme","outline"],[1,"tasks"],["nz-tooltip","","nzTooltipPlacement","right",1,"task-item",3,"nzTooltipTitle"],[1,"item-content",3,"click"],[1,"item-logo"],["nzType","code","nzTheme","outline"],[1,"list-item-info"],[1,"name"],[1,"description"],["nz-button","","nzType","text","type","button",3,"click"],["nzTheme","outline",3,"nzType"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),h(3,"nz-icon",3),s(),a(4,"div",4),p(5,"\u4EFB\u52A1"),s(),a(6,"button",5),h(7,"nz-icon",6),s()(),a(8,"div",7),oe(9,Ya,13,4,"div",8,Ua),s()()),e&2&&(l(9),re(n.tasks()))},dependencies:[I,w,E,H,ne,Z,Qe,He,wt],styles:[".dropdown-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:6px 6px 6px 16px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:18px;margin-right:6px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%]{width:320px;max-height:360px;overflow:hidden auto}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:row;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]:hover{background:#f5f5f5}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex:100% 1 1;width:0;gap:16px;cursor:pointer}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-logo[_ngcontent-%COMP%]{font-size:42px;margin-right:16px;flex:auto 0 0;display:inline-flex;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:24px}"]})};function qa(t,o){if(t&1){let e=P();a(0,"button",20),v("click",function(){C(e);let i=c();return z(i.openPageUrl(i.project==null?null:i.project.repoPageUrl))}),h(1,"nz-icon",21),s()}}function Za(t,o){if(t&1&&h(0,"app-project-item-popover",22),t&2){let e=c();m("projectId",e.project==null?null:e.project.id)}}var gn=class t{taskRuntime=f($i);notify=f(Ct);project=null;open=!1;selectProject=new k;toggleFavorite=new k;editProject=new k;openInEditor=new k;deleteProject=new k;tasksRunningCount=ee(()=>{let o=this.project?.id?.trim();return o?this.taskRuntime.runningCountSignal(o)():0});hasTasksRunning=ee(()=>this.tasksRunningCount()>0);taskBadgeTip=ee(()=>{let o=this.tasksRunningCount();return o>0?`${o} \u4E2A\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C`:"\u4EFB\u52A1"});del(){if(this.hasTasksRunning()){this.notify.warn("\u5F53\u524D\u9879\u76EE\u6709\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u8FD9\u4E9B\u4EFB\u52A1\u540E\u518D\u5220\u9664\u9879\u76EE\u3002");return}this.deleteProject.emit()}openPageUrl(o){o&&window.open(o,"_blank")}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-project-item"]],inputs:{project:"project",open:"open"},outputs:{selectProject:"selectProject",toggleFavorite:"toggleFavorite",editProject:"editProject",openInEditor:"openInEditor",deleteProject:"deleteProject"},decls:28,vars:10,consts:[["contentTemplate",""],["nz-row","",1,"project-item"],["nz-col","","nzSpan","24",1,"content"],[1,"favorite"],["nz-button","","nzType","primary",3,"click"],["nzType","star",3,"nzTheme"],[1,"info",3,"click"],[1,"list-item-info"],[1,"name"],["nz-popover","","nzPopoverTrigger","click","nzPopoverPlacement","right",1,"task-popover-trigger",3,"click","nzPopoverContent","nzPopoverOverlayClassName"],[3,"nzStatus","nz-tooltip"],[1,"root-path"],[1,"actions"],["nzSize","large"],["nzType","code","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u7F16\u8F91",3,"click"],["nzType","edit","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740"],["nz-button","","nzType","primary","nz-tooltip","\u5220\u9664",3,"click"],["nzType","delete","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740",3,"click"],["nzType","global","nzTheme","outline"],[3,"projectId"]],template:function(e,n){if(e&1){let i=P();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),v("click",function(d){return C(i),d.stopPropagation(),z(n.toggleFavorite.emit())}),h(4,"nz-icon",5),s()(),a(5,"div",6),v("click",function(){return C(i),z(n.selectProject.emit())}),a(6,"div",7)(7,"div",8)(8,"span"),p(9),s(),a(10,"span",9),v("click",function(d){return C(i),z(d.stopPropagation())}),h(11,"nz-badge",10),s()(),a(12,"div",11)(13,"span"),p(14),s()()()(),a(15,"div",12)(16,"nz-space",13)(17,"button",4),v("click",function(){return C(i),z(n.openInEditor.emit())}),h(18,"nz-icon",14),a(19,"span"),p(20,"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00"),s()(),a(21,"button",15),v("click",function(){return C(i),z(n.editProject.emit())}),h(22,"nz-icon",16),s(),T(23,qa,2,0,"button",17),a(24,"button",18),v("click",function(){return C(i),z(n.del())}),h(25,"nz-icon",19),s()()()()(),S(26,Za,1,1,"ng-template",null,0,$)}if(e&2){let i=B(27);K("open",n.open),l(4),m("nzTheme",n.project!=null&&n.project.isFavorite?"fill":"outline"),l(5),G(n.project==null?null:n.project.name),l(),m("nzPopoverContent",i)("nzPopoverOverlayClassName","project-item-popover"),l(),m("nzStatus",n.hasTasksRunning()?"processing":"default")("nz-tooltip",n.taskBadgeTip()),l(3),G(n.project==null?null:n.project.root),l(9),x(n.project!=null&&n.project.repoPageUrl?23:-1)}},dependencies:[I,Q,Oe,_e,Ee,H,ne,Z,Ne,w,E,Bi,ji,qi,Yi,xi,Ti,hn,He],styles:['.project-item[_ngcontent-%COMP%]{border-radius:4px;padding:0;margin:8px 0;transition:all .3s;cursor:pointer}.project-item.open[_ngcontent-%COMP%], .project-item[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001a;background:var(--app-primary-3)}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto;grid-template-areas:"icon info actions";grid-gap:16px;align-items:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .favorite[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{grid-area:info;-webkit-user-select:none;user-select:none}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:auto 0 0}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%]{display:inline-block;margin-left:8px;cursor:pointer}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%] nz-badge[_ngcontent-%COMP%]{font-size:18px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .root-path[_ngcontent-%COMP%]{flex:auto 0 0;opacity:.7;font-size:14px}']})};var Po=t=>({$implicit:t}),Ka=(t,o)=>o.id;function Ja(t,o){t&1&&Sn(0)}function es(t,o){if(t&1&&(a(0,"div",6)(1,"h2"),p(2,"\u6536\u85CF\u7684\u9879\u76EE"),s()(),S(3,Ja,1,0,"ng-container",7)),t&2){let e=c(),n=B(11);l(3),m("ngTemplateOutlet",n)("ngTemplateOutletContext",kt(2,Po,e.projectState.favoriteProjects()))}}function ts(t,o){t&1&&(a(0,"div",6)(1,"h2"),p(2,"\u66F4\u591A\u9879\u76EE"),s()())}function ns(t,o){t&1&&Sn(0)}function is(t,o){t&1&&(a(0,"div",8),h(1,"nz-empty",9),s())}function os(t,o){if(t&1){let e=P();a(0,"app-project-item",12),v("selectProject",function(){let i=C(e).$implicit,r=c(2);return z(r.projectState.selectProject(i))})("toggleFavorite",function(){let i=C(e).$implicit,r=c(2);return z(r.projectState.toggleFavorite(i.id))})("openInEditor",function(){let i=C(e).$implicit,r=c(2);return z(r.projectState.openInEditor(i.id))})("editProject",function(){let i=C(e).$implicit,r=c(2);return z(r.projectState.openEditModal(i))})("deleteProject",function(){let i=C(e).$implicit,r=c(2);return z(r.projectState.deleteProject(i.id))}),s()}if(t&2){let e=o.$implicit,n=c(2);m("project",e)("project",e)("open",n.projectState.isOpen(e))}}function rs(t,o){if(t&1&&(a(0,"div",10),oe(1,os,1,3,"app-project-item",11,Ka),s()),t&2){let e=o.$implicit;l(),re(e)}}var _n=class t{projectState=f(Ue);static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-project-list"]],decls:12,vars:8,consts:[["itemsTpl",""],["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"col"],["nz-col","",1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u9879\u76EE",3,"ngModelChange","ngModel"],[1,"header"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"no-projects"],["nzNotFoundImage","simple","nzNotFoundContent","\u6682\u65E0\u9879\u76EE\uFF0C\u5FEB\u53BB\u521B\u5EFA\u6216\u5BFC\u5165\u7B2C\u4E00\u4E2A\u9879\u76EE\u5427\uFF01"],[1,"content"],[3,"project","open"],[3,"selectProject","toggleFavorite","openInEditor","editProject","deleteProject","project","open"]],template:function(e,n){if(e&1){let i=P();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"nz-input-wrapper"),h(4,"nz-icon",4),a(5,"input",5),v("ngModelChange",function(d){return C(i),z(n.projectState.keyword.set(d))}),s()()(),T(6,es,4,4),T(7,ts,3,0,"div",6),S(8,ns,1,0,"ng-container",7),T(9,is,2,0,"div",8),s(),S(10,rs,3,0,"ng-template",null,0,$),s()}if(e&2){let i=B(11);l(5),m("ngModel",n.projectState.keyword()),l(),x(n.projectState.favoriteProjects().length>0?6:-1),l(),x(n.projectState.favoriteProjects().length>0?7:-1),l(),m("ngTemplateOutlet",i)("ngTemplateOutletContext",kt(6,Po,n.projectState.moreProjects())),l(),x(n.projectState.projects().length===0?9:-1)}},dependencies:[I,De,Q,Fe,Ce,ze,le,Oe,_e,Ee,gn,Xt,Qt,be,je,ht,Rt,w,E],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow:hidden}.page[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;margin-bottom:12px}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:25%;min-width:200px}.page[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header[_ngcontent-%COMP%]{padding:12px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-weight:600}"]})};function as(t,o){t&1&&(h(0,"nz-icon",8),p(1," \u9879\u76EE "))}function ss(t,o){t&1&&h(0,"app-project-list")}function ls(t,o){t&1&&(h(0,"nz-icon",9),p(1," \u521B\u5EFA "))}function cs(t,o){t&1&&h(0,"app-project-create")}function ps(t,o){t&1&&(h(0,"nz-icon",10),p(1," \u5BFC\u5165 "))}function ds(t,o){t&1&&h(0,"app-project-import")}var Cn=class t{importState=f(vt);selectedIndex=0;tabIndexChange(o){o===2?this.importState.active.set(!0):this.importState.active.set(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=y({type:t,selectors:[["app-projects"]],decls:17,vars:4,consts:[["projectTitleTemplate",""],["addTitleTemplate",""],["importTitleTemplate",""],[1,"page"],[1,"header"],["nzCentered","",1,"tabs-container",3,"nzSelectedIndexChange","nzSelectedIndex"],[3,"nzTitle"],["nz-tab",""],["nzType","unordered-list","nzTheme","outline"],["nzType","plus-square","nzTheme","outline"],["nzType","import","nzTheme","outline"]],template:function(e,n){if(e&1){let i=P();a(0,"div",3)(1,"div",4)(2,"h2"),p(3,"\u9879\u76EE\u7BA1\u7406"),s()(),a(4,"nz-tabs",5),W("nzSelectedIndexChange",function(d){return C(i),R(n.selectedIndex,d)||(n.selectedIndex=d),z(d)}),v("nzSelectedIndexChange",function(d){return C(i),z(n.tabIndexChange(d))}),a(5,"nz-tab",6),S(6,as,2,0,"ng-template",null,0,$)(8,ss,1,0,"ng-template",7),s(),a(9,"nz-tab",6),S(10,ls,2,0,"ng-template",null,1,$)(12,cs,1,0,"ng-template",7),s(),a(13,"nz-tab",6),S(14,ps,2,0,"ng-template",null,2,$)(16,ds,1,0,"ng-template",7),s()()()}if(e&2){let i=B(7),r=B(11),d=B(15);l(4),A("nzSelectedIndex",n.selectedIndex),l(),m("nzTitle",i),l(4),m("nzTitle",r),l(4),m("nzTitle",d)}},dependencies:[I,Co,Bn,jn,Fn,w,E,_n,un,fn],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:16px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}nz-tabs.tabs-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content{height:100%}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content .ant-tabs-tabpane{height:100%}.toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.current[_ngcontent-%COMP%]{margin:10px 0;opacity:.75}"]})};var ms=[{path:"",component:Cn}],zn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[wt.forChild(ms),wt]})};var Mo=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=we({type:t});static \u0275inj=ke({imports:[I,zn]})};export{Mo as ProjectsModule};
@@ -1 +1 @@
1
- import{B as n,i as m}from"./chunk-53YRDYLS.js";import{Fb as e,na as t}from"./chunk-SJG2JCPL.js";var p=[{path:"",loadComponent:()=>import("./chunk-R3EVU32P.js").then(o=>o.TasksComponent)}],i=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n.forChild(p),n]})};var s=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,i]})};export{s as TasksModule};
1
+ import{B as n,i as m}from"./chunk-53YRDYLS.js";import{Fb as e,na as t}from"./chunk-SJG2JCPL.js";var p=[{path:"",loadComponent:()=>import("./chunk-C3KAVW4L.js").then(o=>o.TasksComponent)}],i=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n.forChild(p),n]})};var s=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,i]})};export{s as TasksModule};