@yinuo-ngm/server 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/LICENSE +15 -0
  2. package/lib/plugins/api-client.plugin.js +1 -2
  3. package/lib/plugins/error-handler.plugin.js +2 -0
  4. package/lib/routes/api-client/collection.routes.js +18 -2
  5. package/lib/routes/dashboard.routes.js +5 -1
  6. package/package.json +2 -2
  7. package/www/browser/{chunk-V6LX42JA.js → chunk-37KQ3UTB.js} +1 -1
  8. package/www/browser/chunk-3LDMO67C.js +1 -0
  9. package/www/browser/{chunk-FL6BUQ4M.js → chunk-3MAJTMXX.js} +1 -1
  10. package/www/browser/{chunk-PYGKDDJK.js → chunk-3PWCJ3D5.js} +1 -1
  11. package/www/browser/{chunk-UWKUE7CZ.js → chunk-AZV6AWGC.js} +1 -1
  12. package/www/browser/{chunk-DV7BEQJD.js → chunk-CO7S3LZV.js} +1 -1
  13. package/www/browser/{chunk-DUC7XBYN.js → chunk-DJJC6FPO.js} +1 -1
  14. package/www/browser/{chunk-FPDGZ3ZC.js → chunk-EP45FT55.js} +3 -3
  15. package/www/browser/{chunk-7U5ZOE34.js → chunk-FNLA2MNI.js} +1 -1
  16. package/www/browser/{chunk-IXHH6ENJ.js → chunk-G73D24UX.js} +1 -1
  17. package/www/browser/{chunk-5IUYSJVD.js → chunk-GCKL62DR.js} +1 -1
  18. package/www/browser/{chunk-MN4WB67T.js → chunk-HCBKQAGF.js} +1 -1
  19. package/www/browser/{chunk-EAYGWAZB.js → chunk-IMQG3SAE.js} +1 -1
  20. package/www/browser/{chunk-3N7T4ZJF.js → chunk-J2JNFWJN.js} +1 -1
  21. package/www/browser/{chunk-TLFV3T3W.js → chunk-MD6RDGU4.js} +1 -1
  22. package/www/browser/{chunk-5MHC25IS.js → chunk-OUE23ZE4.js} +1 -1
  23. package/www/browser/{chunk-A2SBXP7A.js → chunk-W6TCGG53.js} +1 -1
  24. package/www/browser/{chunk-KKLLU6U7.js → chunk-XN5C33GH.js} +1 -1
  25. package/www/browser/chunk-YVSVIACA.js +4 -0
  26. package/www/browser/index.html +1 -1
  27. package/www/browser/main-V3VSEZ7K.js +29 -0
  28. package/www/browser/chunk-2PBA7FNM.js +0 -4
  29. package/www/browser/chunk-U7FBNFSB.js +0 -1
  30. package/www/browser/main-IIW5QQA5.js +0 -29
@@ -1 +1 @@
1
- import{c as Te}from"./chunk-35COW2FA.js";import{l as ue,n as fe,q as be,r as ze,t as _e}from"./chunk-FPDGZ3ZC.js";import{F as re,H as K,M as mt,Ma as pe,N as pt,O as J,P as tt,Xa as ut,a as kt,b as oe,ba as le,c as Dt,ga as de,ha as ce,ia as he,la as me,u as se,w as U,x as At,z as L}from"./chunk-PTMJ422K.js";import{d as ht,v as ne,y as ie,z as ae}from"./chunk-53YRDYLS.js";import{$b as st,Ac as Zt,Ca as et,Cc as Ut,Dc as Z,Eb as O,Ec as xt,Fb as qt,Fc as M,Gb as W,Gc as Kt,Ic as It,Kb as S,Kc as St,L as X,Lb as Gt,M as Ft,N as Pt,Oa as vt,Ra as P,Sa as nt,T as Ht,Tb as q,Uc as Jt,Vb as N,Vc as lt,W as Vt,Xa as Yt,Xb as k,Zb as at,_b as ot,ac as u,ad as dt,bc as g,ca as Ct,cc as C,dc as V,f as _t,fd as wt,g as Tt,hc as G,ic as j,jd as te,kc as B,l as Lt,la as $t,ld as Nt,mb as f,mc as jt,na as Qt,o as Ot,od as ee,p as Wt,pa as Xt,qc as A,r as Q,ra as h,rb as z,rd as ct,s as R,sb as Y,tc as c,u as gt,uc as yt,vb as it,vc as rt,vd as y,wc as H,xa as _,xc as F,ya as T,yc as x,zc as I}from"./chunk-SJG2JCPL.js";function Me(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Le=["nz-tab-body",""];function Oe(e,d){}function We(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Fe=()=>({minWidth:"46px"}),Pe=()=>({visible:!1});function He(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.tab.label," ")}}function Ve(e,d){if(e&1){let t=B();g(0,"li",7),A("click",function(){let i=_(t).$implicit,a=c(2);return T(a.onSelect(i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.onContextmenu(a,i))}),S(1,He,2,1,"ng-container",8),C()}if(e&2){let t=d.$implicit;M("ant-tabs-dropdown-menu-item-disabled",t.disabled),u("nzSelected",t.active)("nzDisabled",t.disabled),f(),u("nzStringTemplateOutlet",t.tab.label)("nzStringTemplateOutletContext",lt(6,Pe))}}function $e(e,d){if(e&1&&(g(0,"ul",4),ot(1,Ve,2,7,"li",6,at),C()),e&2){let t=c();f(),st(t.items)}}function Qe(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon)}}var Xe=["navWrap"],Ye=["navList"],qe=["*"];function Ge(e,d){}function je(e,d){if(e&1&&(g(0,"div",2),S(1,Ge,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.startExtraContent().templateRef)}}function Ze(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon),q("tabindex",-1)}}function Ue(e,d){}function Ke(e,d){if(e&1&&(g(0,"div",2),S(1,Ue,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.endExtraContent().templateRef)}}function Je(e,d){}function tn(e,d){if(e&1&&(g(0,"div",2),S(1,Je,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.extraTemplate)}}var en=["contentTemplate"],nn=[[["","nz-tab-link",""]],"*"],an=["[nz-tab-link]","*"];function on(e,d){e&1&&rt(0)}function sn(e,d){e&1&&rt(0,1)}var rn=()=>({visible:!0});function ln(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.label," ")}}function dn(e,d){if(e&1){let t=B();g(0,"button",10),A("click",function(i){_(t);let a=c().$index,l=c(2);return T(l.onClose(a,i))}),C()}if(e&2){let t=c().$implicit;u("closeIcon",t.nzCloseIcon)}}function cn(e,d){if(e&1){let t=B();g(0,"div",6),A("click",function(i){let a=_(t),l=a.$implicit,p=a.$index,b=c(2);return T(b.clickNavItem(l,p,i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.contextmenuNavItem(a,i))}),g(1,"button",7),S(2,ln,2,1,"ng-container",8),N(3,dn,1,1,"button",9),C()()}if(e&2){let t=d.$implicit,n=d.$index,i=c(2);xt("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),M("ant-tabs-tab-active",i.nzSelectedIndex===n)("ant-tabs-tab-disabled",t.nzDisabled),f(),u("id",i.getTabContentId(n))("disabled",t.nzDisabled)("tab",t)("active",i.nzSelectedIndex===n),q("tabIndex",i.getTabIndex(t,n))("aria-disabled",t.nzDisabled)("aria-selected",i.nzSelectedIndex===n&&!i.nzHideAll)("aria-controls",i.getTabContentId(n)),f(),u("nzStringTemplateOutlet",t.label)("nzStringTemplateOutletContext",lt(19,rn)),f(),k(t.nzClosable&&i.closable&&!t.nzDisabled?3:-1)}}function hn(e,d){if(e&1){let t=B();g(0,"nz-tabs-nav",4),A("tabScroll",function(i){_(t);let a=c();return T(a.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){_(t);let a=c();return T(a.setSelectedIndex(i))})("addClicked",function(){_(t);let i=c();return T(i.onAdd())}),ot(1,cn,4,20,"div",5,at),C()}if(e&2){let t=c();Kt(t.nzTabBarStyle),u("selectedIndex",t.nzSelectedIndex||0)("inkBarAnimated",t.inkBarAnimated)("addable",t.addable)("addIcon",t.nzAddIcon)("hideBar",t.nzHideAll)("position",t.position)("extraTemplate",t.nzTabBarExtraContent)("extraContents",t.extraContents()),f(),st(t.tabs)}}function mn(e,d){}function pn(e,d){if(e&1&&S(0,mn,0,0,"ng-template",11),e&2){c();let t=Z(4);u("ngTemplateOutlet",t)}}function un(e,d){}function fn(e,d){if(e&1&&S(0,un,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function bn(e,d){if(e&1&&N(0,fn,1,1,null,11),e&2){let t=c().$index,n=c(2);k(n.nzSelectedIndex===t?0:-1)}}function zn(e,d){}function _n(e,d){if(e&1&&S(0,zn,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function Tn(e,d){if(e&1&&N(0,_n,1,1,null,11),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);k(a.nzSelectedIndex===i||n.hasBeenActive?0:-1)}}function gn(e,d){if(e&1&&V(0,"div",12),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);u("id",a.getTabContentId(i))("active",a.nzSelectedIndex===i)("content",n.content)("animated",a.tabPaneAnimated),q("aria-labelledby",a.getTabContentId(i))}}function Cn(e,d){if(e&1&&(N(0,pn,1,1,null,11)(1,bn,1,1)(2,Tn,1,1),S(3,gn,1,5,"ng-template",null,0,dt)),e&2){let t=d.$implicit,n=c(2);k(t.nzForceRender?0:n.nzDestroyInactiveTabPane?1:2)}}function vn(e,d){if(e&1&&ot(0,Cn,5,1,null,null,at),e&2){let t=c();st(t.tabs)}}var Et=class{index;tab},bt=(()=>{class e{addIcon="plus";element=h(P).nativeElement;getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,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,Me,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.addIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),ge=(()=>{class e{position=Nt("end",{alias:"nzTabBarExtraContent"});templateRef=h(it);static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabBarExtraContent","",5,"nz-tabset",5,"nz-tabs"]],inputs:{position:[1,"nzTabBarExtraContent","position"]}})}return e})(),yn=(()=>{class e{content=null;active=!1;animated=!0;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:10,hostBindings:function(n,i){n&2&&(jt("@tabSwitchMotion",i.active?"enter":"leave")("@.disabled",!i.animated),q("tabindex",i.active?0:-1)("aria-hidden",!i.active),xt("overflow-y",i.animated?i.active?null:"none":null),M("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:Le,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(n,i){n&1&&S(0,Oe,0,0,"ng-template",0),n&2&&u("ngTemplateOutlet",i.content)},dependencies:[ht],encapsulation:2,data:{animation:[pe]},changeDetection:0})}return e})(),Ie=(()=>{class e{closeIcon="close";static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,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,We,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.closeIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),xn=(()=>{class e{templateRef=h(it,{host:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]})}return e})(),Se=(()=>{class e{elementRef=h(P);routerLink=h(ae,{self:!0,optional:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]})}return e})(),we=(()=>{class e{disabled=!1;tab;active=!1;elementRef=h(P);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||e)};static \u0275dir=W({type:e,selectors:[["","nzTabNavItem",""]],inputs:{disabled:[2,"disabled","disabled",y],tab:"tab",active:[2,"active","active",y]}})}return e})(),Rt=(()=>{class e{items=[];addable=!1;addIcon="plus";addClicked=new z;selected=new z;closeAnimationWaitTimeoutId;menuOpened=!1;cdr=h(ct);element=h(P).nativeElement;onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,n){t.disabled||t.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(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||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-nav-operations-hidden",i.items.length===0)},inputs:{items:"items",addable:[2,"addable","addable",y],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 a=B();g(0,"button",2,0),A("nzVisibleChange",function(p){return _(a),T(i.menuVisChange(p))})("mouseenter",function(){return _(a),T(i.showItems())}),V(2,"nz-icon",3),C(),g(3,"nz-dropdown-menu",null,1),N(5,$e,3,0,"ul",4),C(),N(6,Qe,1,1,"button",5)}if(n&2){let a=Z(4);u("nzDropdownMenu",a)("nzOverlayStyle",lt(5,Fe))("nzMatchWidthElement",null),f(5),k(i.menuOpened?5:-1),f(),k(i.addable?6:-1)}},dependencies:[pt,mt,tt,J,bt,_e,be,fe,ue,ze],encapsulation:2,changeDetection:0})}return e})(),In=.1,Ce=.01,ft=20,ve=.995**ft,Sn=(()=>{class e{ngZone=h(Y);destroyRef=h(et);el=h(P).nativeElement;lastWheelDirection=null;lastWheelTimestamp=0;lastTimestamp=0;lastTimeDiff=0;lastMixedWheel=0;lastWheelPrevent=!1;touchPosition=null;lastOffset=null;motion=-1;offsetChange=new z;tabScroll=new z;ngOnInit(){let t=U(this.el,"wheel"),n=U(this.el,"touchstart"),i=U(this.el,"touchmove"),a=U(this.el,"touchend");this.subscribeWrap("wheel",t,this.onWheel),this.subscribeWrap("touchstart",n,this.onTouchStart),this.subscribeWrap("touchmove",i,this.onTouchMove),this.subscribeWrap("touchend",a,this.onTouchEnd)}subscribeWrap(t,n,i){return n.pipe(L(this.destroyRef)).subscribe(a=>{this.tabScroll.emit({type:t,event:a}),a.defaultPrevented||i(a)})}onTouchEnd=t=>{if(!this.touchPosition)return;let n=this.lastOffset,i=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,n){let a=n.x/i,l=n.y/i,p=Math.abs(a),b=Math.abs(l);if(Math.max(p,b)<In)return;let w=a,E=l;this.motion=window.setInterval(()=>{if(Math.abs(w)<Ce&&Math.abs(E)<Ce){window.clearInterval(this.motion);return}w*=ve,E*=ve,this.onOffset(w*ft,E*ft,t)},ft)}};onTouchMove=t=>{if(!this.touchPosition)return;t.preventDefault();let{screenX:n,screenY:i}=t.touches[0],a=n-this.touchPosition.x,l=i-this.touchPosition.y;this.onOffset(a,l,t);let p=Date.now();this.lastTimeDiff=p-this.lastTimestamp,this.lastTimestamp=p,this.lastOffset={x:a,y:l},this.touchPosition={x:n,y:i}};onTouchStart=t=>{let{screenX:n,screenY:i}=t.touches[0];this.touchPosition={x:n,y:i},window.clearInterval(this.motion)};onWheel=t=>{let{deltaX:n,deltaY:i}=t,a,l=Math.abs(n),p=Math.abs(i);l===p?a=this.lastWheelDirection==="x"?n:i:l>p?(a=n,this.lastWheelDirection="x"):(a=i,this.lastWheelDirection="y");let b=Date.now(),w=Math.abs(a);(b-this.lastWheelTimestamp>100||w-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-a,-a,t),(t.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=b,this.lastMixedWheel=w};onOffset(t,n,i){this.offsetChange.observers.length&&this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:n,event:i})})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}})}return e})(),ye=(()=>{class e{ngZone=h(Y);el=h(P).nativeElement;position="horizontal";animated=!0;animationMode=h(Yt,{optional:!0});get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}alignToElement(t){this.ngZone.runOutsideAngular(()=>{ut(()=>this.setStyles(t))})}setStyles(t){this.position==="horizontal"?(this.el.style.top="",this.el.style.height="",this.el.style.left=this.getLeftPosition(t),this.el.style.width=this.getElementWidth(t)):(this.el.style.left="",this.el.style.width="",this.el.style.top=this.getTopPosition(t),this.el.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-ink-bar-animated",i._animated)},inputs:{position:"position",animated:"animated"}})}return e})(),wn=typeof ut<"u"?Wt:Ot,xe=150,Bt=(()=>{class e{cdr=h(ct);ngZone=h(Y);viewportRuler=h(me);nzResizeObserver=h(Te);dir=h(At);destroyRef=h(et);indexFocused=new z;selectFocusedIndex=new z;addClicked=new z;tabScroll=new z;position="horizontal";addable=!1;hideBar=!1;addIcon="plus";inkBarAnimated=!0;extraTemplate;extraContents=Nt.required();startExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="start"));endExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="end"));get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let n=Dt(t);this._selectedIndex!==n&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}navWrapRef;navListRef;operationRef;addBtnRef;inkBar;items;get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}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 t=this.dir?this.dir.change.asObservable():gt(null),n=this.viewportRuler.change(150),i=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new he(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),ut(i),X(this.nzResizeObserver.observe(this.navWrapRef),this.nzResizeObserver.observe(this.navListRef)).pipe(L(this.destroyRef),Pt(16,wn)).subscribe(()=>{i()}),X(t,n,this.items.changes).pipe(L(this.destroyRef)).subscribe(()=>{Promise.resolve().then(i),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(L(this.destroyRef)).subscribe(a=>{this.indexFocused.emit(a),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}onSelectedFromMenu(t){let n=this.items.toArray().findIndex(i=>i===t);n!==-1&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if(this.position==="horizontal"){if(!this.lockAnimationTimeoutId&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(!this.lockAnimationTimeoutId&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){let n=this.navWrapRef.nativeElement.contains(t.target);if(!(ce(t)||!n))switch(t.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(t);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;let n=this.items?this.items.toArray()[t]:null;return!!n&&!n.disabled}scrollToTab(t){if(!this.items.find(i=>i===t))return;let n=this.items.toArray();if(this.position==="horizontal"){let i=this.transformX;if(this.getLayoutDirection()==="rtl"){let a=n[0].left+n[0].width-t.left-t.width;a<this.transformX?i=a:a+t.width>this.transformX+this.wrapperWidth&&(i=a+t.width-this.wrapperWidth)}else t.left<-this.transformX?i=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(i=-(t.left+t.width-this.wrapperWidth));this.transformX=i,this.transformY=0,this.setTransform(i,0)}else{let i=this.transformY;t.top<-this.transformY?i=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(i=-(t.top+t.height-this.wrapperHeight)),this.transformY=i,this.transformX=0,this.setTransform(0,i)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},xe)}lockAnimation(){this.lockAnimationTimeoutId||this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=void 0},xe)})}setTransform(t,n){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${n}px)`}clampTransformX(t){let n=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(n,t),0):Math.min(Math.max(n,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),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 t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){let t={top:!1,right:!1,bottom:!1,left:!1},n=this.navWrapRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth<this.scrollListWidth):(t.left=this.transformX<0,t.right=-this.transformX+this.wrapperWidth<this.scrollListWidth):(t.top=this.transformY<0,t.bottom=-this.transformY+this.wrapperHeight<this.scrollListHeight),Object.keys(t).forEach(i=>{let a=`ant-tabs-nav-wrap-ping-${i}`;t[i]?n.classList.add(a):n.classList.remove(a)})}setVisibleRange(){let t,n,i,a,l,p,b=this.items.toArray(),w={width:0,height:0,left:0,top:0,right:0},E=m=>{let D,zt=b[m]||w;return n==="right"?D=b[0].left+b[0].width-b[m].left-b[m].width:D=zt[n],D};this.position==="horizontal"?(t="width",a=this.wrapperWidth,l=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),p=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")):(t="height",a=this.wrapperHeight,l=this.scrollListHeight-(this.hiddenItems.length?this.operationHeight:0),p=this.addButtonHeight,n="top",i=-this.transformY,this.pingTop=this.transformY<0,this.pingBottom=-this.transformY+this.wrapperHeight<this.scrollListHeight);let $=a;if(l+p>a&&($=a-p),!b.length){this.hiddenItems=[],this.cdr.markForCheck();return}let v=b.length,Mt=v;for(let m=0;m<v;m+=1){let D=E(m),zt=b[m]||w;if(D+zt[t]>i+$){Mt=m-1;break}}let s=0;for(let m=v-1;m>=0;m-=1)if(E(m)<i){s=m+1;break}let o=b.slice(0,s),r=b.slice(Mt+1);this.hiddenItems=[...o,...r],this.cdr.markForCheck()}getLayoutDirection(){return this.dir&&this.dir.value==="rtl"?"rtl":"ltr"}ngOnChanges(t){let{position:n}=t;n&&!n.isFirstChange()&&(this.alignInkBarToSelectedTab(),this.lockAnimation(),this.updateScrollListPosition())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tabs-nav"]],contentQueries:function(n,i,a){if(n&1&&H(a,we,5),n&2){let l;x(l=I())&&(i.items=l)}},viewQuery:function(n,i){if(n&1&&(F(Xe,7),F(Ye,7),F(Rt,7),F(bt,5),F(ye,7)),n&2){let a;x(a=I())&&(i.navWrapRef=a.first),x(a=I())&&(i.navListRef=a.first),x(a=I())&&(i.operationRef=a.first),x(a=I())&&(i.addBtnRef=a.first),x(a=I())&&(i.inkBar=a.first)}},hostAttrs:[1,"ant-tabs-nav"],hostBindings:function(n,i){n&1&&A("keydown",function(l){return i.handleKeydown(l)})},inputs:{position:"position",addable:[2,"addable","addable",y],hideBar:[2,"hideBar","hideBar",y],addIcon:"addIcon",inkBarAnimated:"inkBarAnimated",extraTemplate:"extraTemplate",extraContents:[1,"extraContents"],selectedIndex:"selectedIndex"},outputs:{indexFocused:"indexFocused",selectFocusedIndex:"selectFocusedIndex",addClicked:"addClicked",tabScroll:"tabScroll"},exportAs:["nzTabsNav"],features:[vt],ngContentSelectors:qe,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 a=B();yt(),N(0,je,2,1,"div",2),g(1,"div",3,0)(3,"div",4,1),A("offsetChange",function(p){return _(a),T(i.onOffsetChange(p))})("tabScroll",function(p){return _(a),T(i.tabScroll.emit(p))}),rt(5),N(6,Ze,1,2,"button",5),V(7,"div",6),C()(),g(8,"nz-tab-nav-operation",7),A("addClicked",function(){return _(a),T(i.addClicked.emit())})("selected",function(p){return _(a),T(i.onSelectedFromMenu(p))}),C(),N(9,Ke,2,1,"div",2)(10,tn,2,1,"div",2)}n&2&&(k(i.startExtraContent()?0:-1),f(),M("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),f(5),k(i.showAddButton?6:-1),f(),u("hidden",i.hideBar)("position",i.position)("animated",i.inkBarAnimated),f(),u("addIcon",i.addIcon)("addable",i.addable)("items",i.hiddenItems),f(),k(i.endExtraContent()?9:i.extraTemplate?10:-1))},dependencies:[Sn,bt,ye,Rt,ht],encapsulation:2,changeDetection:0})}return e})(),Nn=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nz-tab",""]],exportAs:["nzTab"]})}return e})(),Ne=new Xt(""),kn=(()=>{class e{nzTitle="";nzClosable=!1;nzCloseIcon="close";nzDisabled=!1;nzForceRender=!1;nzSelect=new z;nzDeselect=new z;nzClick=new z;nzContextmenu=new z;nzTabLinkTemplateDirective;template=null;linkDirective;contentTemplate;isActive=!1;hasBeenActive=!1;position=null;origin=null;closestTabSet=h(Ne);stateChanges=new Lt;get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}ngOnChanges(t){let{nzTitle:n,nzDisabled:i,nzForceRender:a}=t;(n||i||a)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}setActive(t){this.isActive=t,t&&(this.hasBeenActive=!0)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab"]],contentQueries:function(n,i,a){if(n&1&&(H(a,xn,5),H(a,Nn,5,it),H(a,Se,5)),n&2){let l;x(l=I())&&(i.nzTabLinkTemplateDirective=l.first),x(l=I())&&(i.template=l.first),x(l=I())&&(i.linkDirective=l.first)}},viewQuery:function(n,i){if(n&1&&F(en,7),n&2){let a;x(a=I())&&(i.contentTemplate=a.first)}},inputs:{nzTitle:"nzTitle",nzClosable:[2,"nzClosable","nzClosable",y],nzCloseIcon:"nzCloseIcon",nzDisabled:[2,"nzDisabled","nzDisabled",y],nzForceRender:[2,"nzForceRender","nzForceRender",y]},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[vt],ngContentSelectors:an,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(n,i){n&1&&(yt(nn),Gt(0,on,1,0,"ng-template",null,0,dt)(2,sn,1,0,"ng-template",null,1,dt))},encapsulation:2,changeDetection:0})}return e})(),Dn="tabs",An=0,En=(()=>{var v;let e,d=[],t=[],n,i=[],a=[],l,p=[],b=[],w,E=[],$=[];return v=class{_nzModuleName=Dn;nzConfigService=h(re);ngZone=h(Y);cdr=h(ct);directionality=h(At);destroyRef=h(et);get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(s){this.indexToSelect=Dt(s,null)}nzTabPosition="top";nzTabBarExtraContent;nzCanDeactivate=null;nzAddIcon="plus";nzTabBarStyle=null;nzType=R(this,d,"line");nzSize=(R(this,t),R(this,i,"default"));nzAnimated=(R(this,a),R(this,p,!0));nzTabBarGutter=(R(this,b),R(this,E,void 0));nzHideAdd=(R(this,$),!1);nzCentered=!1;nzHideAll=!1;nzLinkRouter=!1;nzLinkExact=!0;nzDestroyInactiveTabPane=!1;nzSelectChange=new z(!0);nzSelectedIndexChange=new z;nzTabListScroll=new z;nzClose=new z;nzAdd=new z;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 nt;tabLinks=new nt;tabNavBarRef;tabs=new nt;extraContents=ee(ge);dir="ltr";tabSetId;indexToSelect=0;selectedIndex=null;tabLabelSubscription=Tt.EMPTY;canDeactivateSubscription=Tt.EMPTY;router=h(ie,{optional:!0});constructor(){this.tabSetId=An++,h(te)==="nz-tabset"&&oe(`${kt} <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(L(this.destroyRef)).subscribe(s=>{this.dir=s,this.cdr.detectChanges()})}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabs.changes.pipe(L(this.destroyRef)).subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let o=this.tabs.toArray();for(let r=0;r<o.length;r++)if(o[r].isActive){this.indexToSelect=this.selectedIndex=r;break}}this.subscribeToTabLabels(),this.cdr.markForCheck()})}ngAfterContentChecked(){let s=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this.selectedIndex!==s){let o=this.selectedIndex==null;o||this.nzSelectChange.emit(this.createChangeEvent(s)),Promise.resolve().then(()=>{this.tabs.forEach((r,m)=>r.setActive(m===s)),o||this.nzSelectedIndexChange.emit(s)})}this.tabs.forEach((o,r)=>{o.position=r-s,this.selectedIndex!=null&&o.position===0&&!o.origin&&(o.origin=s-this.selectedIndex)}),this.selectedIndex!==s&&(this.selectedIndex=s,this.cdr.markForCheck())}onClose(s,o){o.preventDefault(),o.stopPropagation(),this.nzClose.emit({index:s})}onAdd(){this.nzAdd.emit()}clampTabIndex(s){return Math.min(this.tabs.length-1,Math.max(s||0,0))}createChangeEvent(s){let o=new Et;return o.index=s,this.tabs&&this.tabs.length&&(o.tab=this.tabs.toArray()[s],this.tabs.forEach((r,m)=>{m!==s&&r.nzDeselect.emit()}),o.tab.nzSelect.emit()),o}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=X(...this.tabs.map(s=>s.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(Ct(this.allTabs)).subscribe(s=>{this.tabs.reset(s.filter(o=>o.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(s,o){return typeof this.nzCanDeactivate=="function"?se(this.nzCanDeactivate(s,o)).pipe(Vt(),L(this.destroyRef)):gt(!0)}clickNavItem(s,o,r){s.nzDisabled||(s.nzClick.emit(),this.isRouterLinkClickEvent(o,r)||this.setSelectedIndex(o))}isRouterLinkClickEvent(s,o){let r=o.target;return this.nzLinkRouter?!!this.tabs.toArray()[s]?.linkDirective?.elementRef.nativeElement.contains(r):!1}contextmenuNavItem(s,o){s.nzDisabled||s.nzContextmenu.emit(o)}setSelectedIndex(s){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,s).subscribe(o=>{o&&(this.nzSelectedIndex=s,this.tabNavBarRef.focusIndex=s,this.cdr.markForCheck())})}getTabIndex(s,o){return s.nzDisabled?null:this.selectedIndex===o?0:-1}getTabContentId(s){return`nz-tabs-${this.tabSetId}-tab-${s}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${kt} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);X(this.router.events.pipe(Ft(s=>s instanceof ne)),this.tabLinks.changes).pipe(Ct(!0),Ht(0),L(this.destroyRef)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router?.navigated){let s=this.findShouldActiveTabIndex();s!==this.selectedIndex&&this.setSelectedIndex(s),Promise.resolve().then(()=>this.nzHideAll=s===-1)}}findShouldActiveTabIndex(){let s=this.tabs.toArray(),o=this.isLinkActive(this.router);return s.findIndex(r=>{let m=r.linkDirective;return m?o(m.routerLink):!1})}isLinkActive(s){return o=>o?!!s?.isActive(o.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}},(()=>{let s=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],n=[K()],l=[K()],w=[K()],Q(null,null,e,{kind:"field",name:"nzType",static:!1,private:!1,access:{has:o=>"nzType"in o,get:o=>o.nzType,set:(o,r)=>{o.nzType=r}},metadata:s},d,t),Q(null,null,n,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:o=>"nzSize"in o,get:o=>o.nzSize,set:(o,r)=>{o.nzSize=r}},metadata:s},i,a),Q(null,null,l,{kind:"field",name:"nzAnimated",static:!1,private:!1,access:{has:o=>"nzAnimated"in o,get:o=>o.nzAnimated,set:(o,r)=>{o.nzAnimated=r}},metadata:s},p,b),Q(null,null,w,{kind:"field",name:"nzTabBarGutter",static:!1,private:!1,access:{has:o=>"nzTabBarGutter"in o,get:o=>o.nzTabBarGutter,set:(o,r)=>{o.nzTabBarGutter=r}},metadata:s},E,$),s&&Object.defineProperty(v,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),_t(v,"\u0275fac",function(o){return new(o||v)}),_t(v,"\u0275cmp",O({type:v,selectors:[["nz-tabs"],["nz-tabset"]],contentQueries:function(o,r,m){if(o&1&&(Zt(m,r.extraContents,ge,4),H(m,kn,5),H(m,Se,5)),o&2){Ut();let D;x(D=I())&&(r.allTabs=D),x(D=I())&&(r.tabLinks=D)}},viewQuery:function(o,r){if(o&1&&F(Bt,5),o&2){let m;x(m=I())&&(r.tabNavBarRef=m.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(o,r){o&2&&M("ant-tabs-card",r.nzType==="card"||r.nzType==="editable-card")("ant-tabs-editable",r.nzType==="editable-card")("ant-tabs-editable-card",r.nzType==="editable-card")("ant-tabs-centered",r.nzCentered)("ant-tabs-rtl",r.dir==="rtl")("ant-tabs-top",r.nzTabPosition==="top")("ant-tabs-bottom",r.nzTabPosition==="bottom")("ant-tabs-left",r.nzTabPosition==="left")("ant-tabs-right",r.nzTabPosition==="right")("ant-tabs-default",r.nzSize==="default")("ant-tabs-small",r.nzSize==="small")("ant-tabs-large",r.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",y],nzCentered:[2,"nzCentered","nzCentered",y],nzHideAll:[2,"nzHideAll","nzHideAll",y],nzLinkRouter:[2,"nzLinkRouter","nzLinkRouter",y],nzLinkExact:[2,"nzLinkExact","nzLinkExact",y],nzDestroyInactiveTabPane:[2,"nzDestroyInactiveTabPane","nzDestroyInactiveTabPane",y]},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabs"],features:[Jt([{provide:Ne,useExisting:$t(()=>v)}])],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(o,r){o&1&&(N(0,hn,3,10,"nz-tabs-nav",1),g(1,"div",2)(2,"div",3),N(3,vn,2,0),C()()),o&2&&(k(r.tabs.length||r.addable?0:-1),f(2),M("ant-tabs-content-top",r.nzTabPosition==="top")("ant-tabs-content-bottom",r.nzTabPosition==="bottom")("ant-tabs-content-left",r.nzTabPosition==="left")("ant-tabs-content-right",r.nzTabPosition==="right")("ant-tabs-content-animated",r.tabPaneAnimated),f(),k(r.nzHideAll?-1:3))},dependencies:[Bt,ht,we,de,le,tt,J,Ie,yn],encapsulation:2})),v})();var bi=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=qt({type:e});static \u0275inj=Qt({imports:[En,Bt,Rt,bt,Ie]})}return e})();export{Nn as a,kn as b,En as c,bi as d};
1
+ import{c as Te}from"./chunk-35COW2FA.js";import{j as ue,l as fe,o as be,p as ze,r as _e}from"./chunk-EP45FT55.js";import{F as re,H as K,M as mt,Ma as pe,N as pt,O as J,P as tt,Xa as ut,a as kt,b as oe,ba as le,c as Dt,ga as de,ha as ce,ia as he,la as me,u as se,w as U,x as At,z as L}from"./chunk-PTMJ422K.js";import{d as ht,v as ne,y as ie,z as ae}from"./chunk-53YRDYLS.js";import{$b as st,Ac as Zt,Ca as et,Cc as Ut,Dc as Z,Eb as O,Ec as xt,Fb as qt,Fc as M,Gb as W,Gc as Kt,Ic as It,Kb as S,Kc as St,L as X,Lb as Gt,M as Ft,N as Pt,Oa as vt,Ra as P,Sa as nt,T as Ht,Tb as q,Uc as Jt,Vb as N,Vc as lt,W as Vt,Xa as Yt,Xb as k,Zb as at,_b as ot,ac as u,ad as dt,bc as g,ca as Ct,cc as C,dc as V,f as _t,fd as wt,g as Tt,hc as G,ic as j,jd as te,kc as B,l as Lt,la as $t,ld as Nt,mb as f,mc as jt,na as Qt,o as Ot,od as ee,p as Wt,pa as Xt,qc as A,r as Q,ra as h,rb as z,rd as ct,s as R,sb as Y,tc as c,u as gt,uc as yt,vb as it,vc as rt,vd as y,wc as H,xa as _,xc as F,ya as T,yc as x,zc as I}from"./chunk-SJG2JCPL.js";function Me(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Le=["nz-tab-body",""];function Oe(e,d){}function We(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Fe=()=>({minWidth:"46px"}),Pe=()=>({visible:!1});function He(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.tab.label," ")}}function Ve(e,d){if(e&1){let t=B();g(0,"li",7),A("click",function(){let i=_(t).$implicit,a=c(2);return T(a.onSelect(i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.onContextmenu(a,i))}),S(1,He,2,1,"ng-container",8),C()}if(e&2){let t=d.$implicit;M("ant-tabs-dropdown-menu-item-disabled",t.disabled),u("nzSelected",t.active)("nzDisabled",t.disabled),f(),u("nzStringTemplateOutlet",t.tab.label)("nzStringTemplateOutletContext",lt(6,Pe))}}function $e(e,d){if(e&1&&(g(0,"ul",4),ot(1,Ve,2,7,"li",6,at),C()),e&2){let t=c();f(),st(t.items)}}function Qe(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon)}}var Xe=["navWrap"],Ye=["navList"],qe=["*"];function Ge(e,d){}function je(e,d){if(e&1&&(g(0,"div",2),S(1,Ge,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.startExtraContent().templateRef)}}function Ze(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon),q("tabindex",-1)}}function Ue(e,d){}function Ke(e,d){if(e&1&&(g(0,"div",2),S(1,Ue,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.endExtraContent().templateRef)}}function Je(e,d){}function tn(e,d){if(e&1&&(g(0,"div",2),S(1,Je,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.extraTemplate)}}var en=["contentTemplate"],nn=[[["","nz-tab-link",""]],"*"],an=["[nz-tab-link]","*"];function on(e,d){e&1&&rt(0)}function sn(e,d){e&1&&rt(0,1)}var rn=()=>({visible:!0});function ln(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.label," ")}}function dn(e,d){if(e&1){let t=B();g(0,"button",10),A("click",function(i){_(t);let a=c().$index,l=c(2);return T(l.onClose(a,i))}),C()}if(e&2){let t=c().$implicit;u("closeIcon",t.nzCloseIcon)}}function cn(e,d){if(e&1){let t=B();g(0,"div",6),A("click",function(i){let a=_(t),l=a.$implicit,p=a.$index,b=c(2);return T(b.clickNavItem(l,p,i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.contextmenuNavItem(a,i))}),g(1,"button",7),S(2,ln,2,1,"ng-container",8),N(3,dn,1,1,"button",9),C()()}if(e&2){let t=d.$implicit,n=d.$index,i=c(2);xt("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),M("ant-tabs-tab-active",i.nzSelectedIndex===n)("ant-tabs-tab-disabled",t.nzDisabled),f(),u("id",i.getTabContentId(n))("disabled",t.nzDisabled)("tab",t)("active",i.nzSelectedIndex===n),q("tabIndex",i.getTabIndex(t,n))("aria-disabled",t.nzDisabled)("aria-selected",i.nzSelectedIndex===n&&!i.nzHideAll)("aria-controls",i.getTabContentId(n)),f(),u("nzStringTemplateOutlet",t.label)("nzStringTemplateOutletContext",lt(19,rn)),f(),k(t.nzClosable&&i.closable&&!t.nzDisabled?3:-1)}}function hn(e,d){if(e&1){let t=B();g(0,"nz-tabs-nav",4),A("tabScroll",function(i){_(t);let a=c();return T(a.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){_(t);let a=c();return T(a.setSelectedIndex(i))})("addClicked",function(){_(t);let i=c();return T(i.onAdd())}),ot(1,cn,4,20,"div",5,at),C()}if(e&2){let t=c();Kt(t.nzTabBarStyle),u("selectedIndex",t.nzSelectedIndex||0)("inkBarAnimated",t.inkBarAnimated)("addable",t.addable)("addIcon",t.nzAddIcon)("hideBar",t.nzHideAll)("position",t.position)("extraTemplate",t.nzTabBarExtraContent)("extraContents",t.extraContents()),f(),st(t.tabs)}}function mn(e,d){}function pn(e,d){if(e&1&&S(0,mn,0,0,"ng-template",11),e&2){c();let t=Z(4);u("ngTemplateOutlet",t)}}function un(e,d){}function fn(e,d){if(e&1&&S(0,un,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function bn(e,d){if(e&1&&N(0,fn,1,1,null,11),e&2){let t=c().$index,n=c(2);k(n.nzSelectedIndex===t?0:-1)}}function zn(e,d){}function _n(e,d){if(e&1&&S(0,zn,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function Tn(e,d){if(e&1&&N(0,_n,1,1,null,11),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);k(a.nzSelectedIndex===i||n.hasBeenActive?0:-1)}}function gn(e,d){if(e&1&&V(0,"div",12),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);u("id",a.getTabContentId(i))("active",a.nzSelectedIndex===i)("content",n.content)("animated",a.tabPaneAnimated),q("aria-labelledby",a.getTabContentId(i))}}function Cn(e,d){if(e&1&&(N(0,pn,1,1,null,11)(1,bn,1,1)(2,Tn,1,1),S(3,gn,1,5,"ng-template",null,0,dt)),e&2){let t=d.$implicit,n=c(2);k(t.nzForceRender?0:n.nzDestroyInactiveTabPane?1:2)}}function vn(e,d){if(e&1&&ot(0,Cn,5,1,null,null,at),e&2){let t=c();st(t.tabs)}}var Et=class{index;tab},bt=(()=>{class e{addIcon="plus";element=h(P).nativeElement;getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,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,Me,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.addIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),ge=(()=>{class e{position=Nt("end",{alias:"nzTabBarExtraContent"});templateRef=h(it);static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabBarExtraContent","",5,"nz-tabset",5,"nz-tabs"]],inputs:{position:[1,"nzTabBarExtraContent","position"]}})}return e})(),yn=(()=>{class e{content=null;active=!1;animated=!0;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:10,hostBindings:function(n,i){n&2&&(jt("@tabSwitchMotion",i.active?"enter":"leave")("@.disabled",!i.animated),q("tabindex",i.active?0:-1)("aria-hidden",!i.active),xt("overflow-y",i.animated?i.active?null:"none":null),M("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:Le,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(n,i){n&1&&S(0,Oe,0,0,"ng-template",0),n&2&&u("ngTemplateOutlet",i.content)},dependencies:[ht],encapsulation:2,data:{animation:[pe]},changeDetection:0})}return e})(),Ie=(()=>{class e{closeIcon="close";static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,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,We,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.closeIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),xn=(()=>{class e{templateRef=h(it,{host:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]})}return e})(),Se=(()=>{class e{elementRef=h(P);routerLink=h(ae,{self:!0,optional:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]})}return e})(),we=(()=>{class e{disabled=!1;tab;active=!1;elementRef=h(P);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||e)};static \u0275dir=W({type:e,selectors:[["","nzTabNavItem",""]],inputs:{disabled:[2,"disabled","disabled",y],tab:"tab",active:[2,"active","active",y]}})}return e})(),Rt=(()=>{class e{items=[];addable=!1;addIcon="plus";addClicked=new z;selected=new z;closeAnimationWaitTimeoutId;menuOpened=!1;cdr=h(ct);element=h(P).nativeElement;onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,n){t.disabled||t.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(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||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-nav-operations-hidden",i.items.length===0)},inputs:{items:"items",addable:[2,"addable","addable",y],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 a=B();g(0,"button",2,0),A("nzVisibleChange",function(p){return _(a),T(i.menuVisChange(p))})("mouseenter",function(){return _(a),T(i.showItems())}),V(2,"nz-icon",3),C(),g(3,"nz-dropdown-menu",null,1),N(5,$e,3,0,"ul",4),C(),N(6,Qe,1,1,"button",5)}if(n&2){let a=Z(4);u("nzDropdownMenu",a)("nzOverlayStyle",lt(5,Fe))("nzMatchWidthElement",null),f(5),k(i.menuOpened?5:-1),f(),k(i.addable?6:-1)}},dependencies:[pt,mt,tt,J,bt,_e,be,fe,ue,ze],encapsulation:2,changeDetection:0})}return e})(),In=.1,Ce=.01,ft=20,ve=.995**ft,Sn=(()=>{class e{ngZone=h(Y);destroyRef=h(et);el=h(P).nativeElement;lastWheelDirection=null;lastWheelTimestamp=0;lastTimestamp=0;lastTimeDiff=0;lastMixedWheel=0;lastWheelPrevent=!1;touchPosition=null;lastOffset=null;motion=-1;offsetChange=new z;tabScroll=new z;ngOnInit(){let t=U(this.el,"wheel"),n=U(this.el,"touchstart"),i=U(this.el,"touchmove"),a=U(this.el,"touchend");this.subscribeWrap("wheel",t,this.onWheel),this.subscribeWrap("touchstart",n,this.onTouchStart),this.subscribeWrap("touchmove",i,this.onTouchMove),this.subscribeWrap("touchend",a,this.onTouchEnd)}subscribeWrap(t,n,i){return n.pipe(L(this.destroyRef)).subscribe(a=>{this.tabScroll.emit({type:t,event:a}),a.defaultPrevented||i(a)})}onTouchEnd=t=>{if(!this.touchPosition)return;let n=this.lastOffset,i=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,n){let a=n.x/i,l=n.y/i,p=Math.abs(a),b=Math.abs(l);if(Math.max(p,b)<In)return;let w=a,E=l;this.motion=window.setInterval(()=>{if(Math.abs(w)<Ce&&Math.abs(E)<Ce){window.clearInterval(this.motion);return}w*=ve,E*=ve,this.onOffset(w*ft,E*ft,t)},ft)}};onTouchMove=t=>{if(!this.touchPosition)return;t.preventDefault();let{screenX:n,screenY:i}=t.touches[0],a=n-this.touchPosition.x,l=i-this.touchPosition.y;this.onOffset(a,l,t);let p=Date.now();this.lastTimeDiff=p-this.lastTimestamp,this.lastTimestamp=p,this.lastOffset={x:a,y:l},this.touchPosition={x:n,y:i}};onTouchStart=t=>{let{screenX:n,screenY:i}=t.touches[0];this.touchPosition={x:n,y:i},window.clearInterval(this.motion)};onWheel=t=>{let{deltaX:n,deltaY:i}=t,a,l=Math.abs(n),p=Math.abs(i);l===p?a=this.lastWheelDirection==="x"?n:i:l>p?(a=n,this.lastWheelDirection="x"):(a=i,this.lastWheelDirection="y");let b=Date.now(),w=Math.abs(a);(b-this.lastWheelTimestamp>100||w-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-a,-a,t),(t.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=b,this.lastMixedWheel=w};onOffset(t,n,i){this.offsetChange.observers.length&&this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:n,event:i})})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}})}return e})(),ye=(()=>{class e{ngZone=h(Y);el=h(P).nativeElement;position="horizontal";animated=!0;animationMode=h(Yt,{optional:!0});get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}alignToElement(t){this.ngZone.runOutsideAngular(()=>{ut(()=>this.setStyles(t))})}setStyles(t){this.position==="horizontal"?(this.el.style.top="",this.el.style.height="",this.el.style.left=this.getLeftPosition(t),this.el.style.width=this.getElementWidth(t)):(this.el.style.left="",this.el.style.width="",this.el.style.top=this.getTopPosition(t),this.el.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-ink-bar-animated",i._animated)},inputs:{position:"position",animated:"animated"}})}return e})(),wn=typeof ut<"u"?Wt:Ot,xe=150,Bt=(()=>{class e{cdr=h(ct);ngZone=h(Y);viewportRuler=h(me);nzResizeObserver=h(Te);dir=h(At);destroyRef=h(et);indexFocused=new z;selectFocusedIndex=new z;addClicked=new z;tabScroll=new z;position="horizontal";addable=!1;hideBar=!1;addIcon="plus";inkBarAnimated=!0;extraTemplate;extraContents=Nt.required();startExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="start"));endExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="end"));get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let n=Dt(t);this._selectedIndex!==n&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}navWrapRef;navListRef;operationRef;addBtnRef;inkBar;items;get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}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 t=this.dir?this.dir.change.asObservable():gt(null),n=this.viewportRuler.change(150),i=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new he(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),ut(i),X(this.nzResizeObserver.observe(this.navWrapRef),this.nzResizeObserver.observe(this.navListRef)).pipe(L(this.destroyRef),Pt(16,wn)).subscribe(()=>{i()}),X(t,n,this.items.changes).pipe(L(this.destroyRef)).subscribe(()=>{Promise.resolve().then(i),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(L(this.destroyRef)).subscribe(a=>{this.indexFocused.emit(a),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}onSelectedFromMenu(t){let n=this.items.toArray().findIndex(i=>i===t);n!==-1&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if(this.position==="horizontal"){if(!this.lockAnimationTimeoutId&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(!this.lockAnimationTimeoutId&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){let n=this.navWrapRef.nativeElement.contains(t.target);if(!(ce(t)||!n))switch(t.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(t);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;let n=this.items?this.items.toArray()[t]:null;return!!n&&!n.disabled}scrollToTab(t){if(!this.items.find(i=>i===t))return;let n=this.items.toArray();if(this.position==="horizontal"){let i=this.transformX;if(this.getLayoutDirection()==="rtl"){let a=n[0].left+n[0].width-t.left-t.width;a<this.transformX?i=a:a+t.width>this.transformX+this.wrapperWidth&&(i=a+t.width-this.wrapperWidth)}else t.left<-this.transformX?i=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(i=-(t.left+t.width-this.wrapperWidth));this.transformX=i,this.transformY=0,this.setTransform(i,0)}else{let i=this.transformY;t.top<-this.transformY?i=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(i=-(t.top+t.height-this.wrapperHeight)),this.transformY=i,this.transformX=0,this.setTransform(0,i)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},xe)}lockAnimation(){this.lockAnimationTimeoutId||this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=void 0},xe)})}setTransform(t,n){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${n}px)`}clampTransformX(t){let n=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(n,t),0):Math.min(Math.max(n,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),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 t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){let t={top:!1,right:!1,bottom:!1,left:!1},n=this.navWrapRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth<this.scrollListWidth):(t.left=this.transformX<0,t.right=-this.transformX+this.wrapperWidth<this.scrollListWidth):(t.top=this.transformY<0,t.bottom=-this.transformY+this.wrapperHeight<this.scrollListHeight),Object.keys(t).forEach(i=>{let a=`ant-tabs-nav-wrap-ping-${i}`;t[i]?n.classList.add(a):n.classList.remove(a)})}setVisibleRange(){let t,n,i,a,l,p,b=this.items.toArray(),w={width:0,height:0,left:0,top:0,right:0},E=m=>{let D,zt=b[m]||w;return n==="right"?D=b[0].left+b[0].width-b[m].left-b[m].width:D=zt[n],D};this.position==="horizontal"?(t="width",a=this.wrapperWidth,l=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),p=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")):(t="height",a=this.wrapperHeight,l=this.scrollListHeight-(this.hiddenItems.length?this.operationHeight:0),p=this.addButtonHeight,n="top",i=-this.transformY,this.pingTop=this.transformY<0,this.pingBottom=-this.transformY+this.wrapperHeight<this.scrollListHeight);let $=a;if(l+p>a&&($=a-p),!b.length){this.hiddenItems=[],this.cdr.markForCheck();return}let v=b.length,Mt=v;for(let m=0;m<v;m+=1){let D=E(m),zt=b[m]||w;if(D+zt[t]>i+$){Mt=m-1;break}}let s=0;for(let m=v-1;m>=0;m-=1)if(E(m)<i){s=m+1;break}let o=b.slice(0,s),r=b.slice(Mt+1);this.hiddenItems=[...o,...r],this.cdr.markForCheck()}getLayoutDirection(){return this.dir&&this.dir.value==="rtl"?"rtl":"ltr"}ngOnChanges(t){let{position:n}=t;n&&!n.isFirstChange()&&(this.alignInkBarToSelectedTab(),this.lockAnimation(),this.updateScrollListPosition())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tabs-nav"]],contentQueries:function(n,i,a){if(n&1&&H(a,we,5),n&2){let l;x(l=I())&&(i.items=l)}},viewQuery:function(n,i){if(n&1&&(F(Xe,7),F(Ye,7),F(Rt,7),F(bt,5),F(ye,7)),n&2){let a;x(a=I())&&(i.navWrapRef=a.first),x(a=I())&&(i.navListRef=a.first),x(a=I())&&(i.operationRef=a.first),x(a=I())&&(i.addBtnRef=a.first),x(a=I())&&(i.inkBar=a.first)}},hostAttrs:[1,"ant-tabs-nav"],hostBindings:function(n,i){n&1&&A("keydown",function(l){return i.handleKeydown(l)})},inputs:{position:"position",addable:[2,"addable","addable",y],hideBar:[2,"hideBar","hideBar",y],addIcon:"addIcon",inkBarAnimated:"inkBarAnimated",extraTemplate:"extraTemplate",extraContents:[1,"extraContents"],selectedIndex:"selectedIndex"},outputs:{indexFocused:"indexFocused",selectFocusedIndex:"selectFocusedIndex",addClicked:"addClicked",tabScroll:"tabScroll"},exportAs:["nzTabsNav"],features:[vt],ngContentSelectors:qe,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 a=B();yt(),N(0,je,2,1,"div",2),g(1,"div",3,0)(3,"div",4,1),A("offsetChange",function(p){return _(a),T(i.onOffsetChange(p))})("tabScroll",function(p){return _(a),T(i.tabScroll.emit(p))}),rt(5),N(6,Ze,1,2,"button",5),V(7,"div",6),C()(),g(8,"nz-tab-nav-operation",7),A("addClicked",function(){return _(a),T(i.addClicked.emit())})("selected",function(p){return _(a),T(i.onSelectedFromMenu(p))}),C(),N(9,Ke,2,1,"div",2)(10,tn,2,1,"div",2)}n&2&&(k(i.startExtraContent()?0:-1),f(),M("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),f(5),k(i.showAddButton?6:-1),f(),u("hidden",i.hideBar)("position",i.position)("animated",i.inkBarAnimated),f(),u("addIcon",i.addIcon)("addable",i.addable)("items",i.hiddenItems),f(),k(i.endExtraContent()?9:i.extraTemplate?10:-1))},dependencies:[Sn,bt,ye,Rt,ht],encapsulation:2,changeDetection:0})}return e})(),Nn=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nz-tab",""]],exportAs:["nzTab"]})}return e})(),Ne=new Xt(""),kn=(()=>{class e{nzTitle="";nzClosable=!1;nzCloseIcon="close";nzDisabled=!1;nzForceRender=!1;nzSelect=new z;nzDeselect=new z;nzClick=new z;nzContextmenu=new z;nzTabLinkTemplateDirective;template=null;linkDirective;contentTemplate;isActive=!1;hasBeenActive=!1;position=null;origin=null;closestTabSet=h(Ne);stateChanges=new Lt;get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}ngOnChanges(t){let{nzTitle:n,nzDisabled:i,nzForceRender:a}=t;(n||i||a)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}setActive(t){this.isActive=t,t&&(this.hasBeenActive=!0)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab"]],contentQueries:function(n,i,a){if(n&1&&(H(a,xn,5),H(a,Nn,5,it),H(a,Se,5)),n&2){let l;x(l=I())&&(i.nzTabLinkTemplateDirective=l.first),x(l=I())&&(i.template=l.first),x(l=I())&&(i.linkDirective=l.first)}},viewQuery:function(n,i){if(n&1&&F(en,7),n&2){let a;x(a=I())&&(i.contentTemplate=a.first)}},inputs:{nzTitle:"nzTitle",nzClosable:[2,"nzClosable","nzClosable",y],nzCloseIcon:"nzCloseIcon",nzDisabled:[2,"nzDisabled","nzDisabled",y],nzForceRender:[2,"nzForceRender","nzForceRender",y]},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[vt],ngContentSelectors:an,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(n,i){n&1&&(yt(nn),Gt(0,on,1,0,"ng-template",null,0,dt)(2,sn,1,0,"ng-template",null,1,dt))},encapsulation:2,changeDetection:0})}return e})(),Dn="tabs",An=0,En=(()=>{var v;let e,d=[],t=[],n,i=[],a=[],l,p=[],b=[],w,E=[],$=[];return v=class{_nzModuleName=Dn;nzConfigService=h(re);ngZone=h(Y);cdr=h(ct);directionality=h(At);destroyRef=h(et);get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(s){this.indexToSelect=Dt(s,null)}nzTabPosition="top";nzTabBarExtraContent;nzCanDeactivate=null;nzAddIcon="plus";nzTabBarStyle=null;nzType=R(this,d,"line");nzSize=(R(this,t),R(this,i,"default"));nzAnimated=(R(this,a),R(this,p,!0));nzTabBarGutter=(R(this,b),R(this,E,void 0));nzHideAdd=(R(this,$),!1);nzCentered=!1;nzHideAll=!1;nzLinkRouter=!1;nzLinkExact=!0;nzDestroyInactiveTabPane=!1;nzSelectChange=new z(!0);nzSelectedIndexChange=new z;nzTabListScroll=new z;nzClose=new z;nzAdd=new z;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 nt;tabLinks=new nt;tabNavBarRef;tabs=new nt;extraContents=ee(ge);dir="ltr";tabSetId;indexToSelect=0;selectedIndex=null;tabLabelSubscription=Tt.EMPTY;canDeactivateSubscription=Tt.EMPTY;router=h(ie,{optional:!0});constructor(){this.tabSetId=An++,h(te)==="nz-tabset"&&oe(`${kt} <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(L(this.destroyRef)).subscribe(s=>{this.dir=s,this.cdr.detectChanges()})}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabs.changes.pipe(L(this.destroyRef)).subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let o=this.tabs.toArray();for(let r=0;r<o.length;r++)if(o[r].isActive){this.indexToSelect=this.selectedIndex=r;break}}this.subscribeToTabLabels(),this.cdr.markForCheck()})}ngAfterContentChecked(){let s=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this.selectedIndex!==s){let o=this.selectedIndex==null;o||this.nzSelectChange.emit(this.createChangeEvent(s)),Promise.resolve().then(()=>{this.tabs.forEach((r,m)=>r.setActive(m===s)),o||this.nzSelectedIndexChange.emit(s)})}this.tabs.forEach((o,r)=>{o.position=r-s,this.selectedIndex!=null&&o.position===0&&!o.origin&&(o.origin=s-this.selectedIndex)}),this.selectedIndex!==s&&(this.selectedIndex=s,this.cdr.markForCheck())}onClose(s,o){o.preventDefault(),o.stopPropagation(),this.nzClose.emit({index:s})}onAdd(){this.nzAdd.emit()}clampTabIndex(s){return Math.min(this.tabs.length-1,Math.max(s||0,0))}createChangeEvent(s){let o=new Et;return o.index=s,this.tabs&&this.tabs.length&&(o.tab=this.tabs.toArray()[s],this.tabs.forEach((r,m)=>{m!==s&&r.nzDeselect.emit()}),o.tab.nzSelect.emit()),o}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=X(...this.tabs.map(s=>s.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(Ct(this.allTabs)).subscribe(s=>{this.tabs.reset(s.filter(o=>o.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(s,o){return typeof this.nzCanDeactivate=="function"?se(this.nzCanDeactivate(s,o)).pipe(Vt(),L(this.destroyRef)):gt(!0)}clickNavItem(s,o,r){s.nzDisabled||(s.nzClick.emit(),this.isRouterLinkClickEvent(o,r)||this.setSelectedIndex(o))}isRouterLinkClickEvent(s,o){let r=o.target;return this.nzLinkRouter?!!this.tabs.toArray()[s]?.linkDirective?.elementRef.nativeElement.contains(r):!1}contextmenuNavItem(s,o){s.nzDisabled||s.nzContextmenu.emit(o)}setSelectedIndex(s){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,s).subscribe(o=>{o&&(this.nzSelectedIndex=s,this.tabNavBarRef.focusIndex=s,this.cdr.markForCheck())})}getTabIndex(s,o){return s.nzDisabled?null:this.selectedIndex===o?0:-1}getTabContentId(s){return`nz-tabs-${this.tabSetId}-tab-${s}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${kt} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);X(this.router.events.pipe(Ft(s=>s instanceof ne)),this.tabLinks.changes).pipe(Ct(!0),Ht(0),L(this.destroyRef)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router?.navigated){let s=this.findShouldActiveTabIndex();s!==this.selectedIndex&&this.setSelectedIndex(s),Promise.resolve().then(()=>this.nzHideAll=s===-1)}}findShouldActiveTabIndex(){let s=this.tabs.toArray(),o=this.isLinkActive(this.router);return s.findIndex(r=>{let m=r.linkDirective;return m?o(m.routerLink):!1})}isLinkActive(s){return o=>o?!!s?.isActive(o.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}},(()=>{let s=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],n=[K()],l=[K()],w=[K()],Q(null,null,e,{kind:"field",name:"nzType",static:!1,private:!1,access:{has:o=>"nzType"in o,get:o=>o.nzType,set:(o,r)=>{o.nzType=r}},metadata:s},d,t),Q(null,null,n,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:o=>"nzSize"in o,get:o=>o.nzSize,set:(o,r)=>{o.nzSize=r}},metadata:s},i,a),Q(null,null,l,{kind:"field",name:"nzAnimated",static:!1,private:!1,access:{has:o=>"nzAnimated"in o,get:o=>o.nzAnimated,set:(o,r)=>{o.nzAnimated=r}},metadata:s},p,b),Q(null,null,w,{kind:"field",name:"nzTabBarGutter",static:!1,private:!1,access:{has:o=>"nzTabBarGutter"in o,get:o=>o.nzTabBarGutter,set:(o,r)=>{o.nzTabBarGutter=r}},metadata:s},E,$),s&&Object.defineProperty(v,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),_t(v,"\u0275fac",function(o){return new(o||v)}),_t(v,"\u0275cmp",O({type:v,selectors:[["nz-tabs"],["nz-tabset"]],contentQueries:function(o,r,m){if(o&1&&(Zt(m,r.extraContents,ge,4),H(m,kn,5),H(m,Se,5)),o&2){Ut();let D;x(D=I())&&(r.allTabs=D),x(D=I())&&(r.tabLinks=D)}},viewQuery:function(o,r){if(o&1&&F(Bt,5),o&2){let m;x(m=I())&&(r.tabNavBarRef=m.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(o,r){o&2&&M("ant-tabs-card",r.nzType==="card"||r.nzType==="editable-card")("ant-tabs-editable",r.nzType==="editable-card")("ant-tabs-editable-card",r.nzType==="editable-card")("ant-tabs-centered",r.nzCentered)("ant-tabs-rtl",r.dir==="rtl")("ant-tabs-top",r.nzTabPosition==="top")("ant-tabs-bottom",r.nzTabPosition==="bottom")("ant-tabs-left",r.nzTabPosition==="left")("ant-tabs-right",r.nzTabPosition==="right")("ant-tabs-default",r.nzSize==="default")("ant-tabs-small",r.nzSize==="small")("ant-tabs-large",r.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",y],nzCentered:[2,"nzCentered","nzCentered",y],nzHideAll:[2,"nzHideAll","nzHideAll",y],nzLinkRouter:[2,"nzLinkRouter","nzLinkRouter",y],nzLinkExact:[2,"nzLinkExact","nzLinkExact",y],nzDestroyInactiveTabPane:[2,"nzDestroyInactiveTabPane","nzDestroyInactiveTabPane",y]},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabs"],features:[Jt([{provide:Ne,useExisting:$t(()=>v)}])],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(o,r){o&1&&(N(0,hn,3,10,"nz-tabs-nav",1),g(1,"div",2)(2,"div",3),N(3,vn,2,0),C()()),o&2&&(k(r.tabs.length||r.addable?0:-1),f(2),M("ant-tabs-content-top",r.nzTabPosition==="top")("ant-tabs-content-bottom",r.nzTabPosition==="bottom")("ant-tabs-content-left",r.nzTabPosition==="left")("ant-tabs-content-right",r.nzTabPosition==="right")("ant-tabs-content-animated",r.tabPaneAnimated),f(),k(r.nzHideAll?-1:3))},dependencies:[Bt,ht,we,de,le,tt,J,Ie,yn],encapsulation:2})),v})();var bi=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=qt({type:e});static \u0275inj=Qt({imports:[En,Bt,Rt,bt,Ie]})}return e})();export{Nn as a,kn as b,En as c,bi as d};
@@ -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-TLFV3T3W.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-MD6RDGU4.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 +1 @@
1
- import{a as Z}from"./chunk-HZ73CM45.js";import{a as T}from"./chunk-SNCDDYQR.js";import{H as x,f as w}from"./chunk-FPDGZ3ZC.js";import{B as J,C as k,D as H,E as b,M as W,N as X,x as K,z as B}from"./chunk-PTMJ422K.js";import{p as V}from"./chunk-53YRDYLS.js";import{Ca as r,Eb as F,Ec as z,Fb as g,Fc as G,O as D,Oa as m,Ra as L,Vb as p,Xb as U,bc as v,cc as h,e as Q,kc as f,ma as A,mb as c,na as R,qc as l,ra as a,rb as o,rd as M,tc as u,uc as P,v as N,vc as d,vd as i,xa as S,xb as C,ya as E}from"./chunk-SJG2JCPL.js";var q=["*"];function y(_,O){if(_&1){let t=f();v(0,"nz-icon",1),l("click",function(e){S(t);let n=u();return E(n.closeTag(e))}),h()}}var ee=(()=>{class _{cdr=a(M);renderer=a(C);el=a(L).nativeElement;directionality=a(K);destroyRef=a(r);nzMode="default";nzColor;nzChecked=!1;nzBordered=!0;nzOnClose=new o;nzCheckedChange=new o;dir="ltr";isPresetColor=!1;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el)}clearPresetColor(){let t=new RegExp(`(ant-tag-(?:${[...k,...J].join("|")}))`,"g"),s=this.el.classList.toString(),e=[],n=t.exec(s);for(;n!==null;)e.push(n[1]),n=t.exec(s);this.el.classList.remove(...e)}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=H(this.nzColor)||b(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(B(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:s}=t;s&&this.setPresetColor()}static \u0275fac=function(s){return new(s||_)};static \u0275cmp=F({type:_,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(s,e){s&1&&l("click",function(){return e.updateCheckedStatus()}),s&2&&(z("background-color",e.isPresetColor?"":e.nzColor),G("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir==="rtl")("ant-tag-borderless",!e.nzBordered))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",i],nzBordered:[2,"nzBordered","nzBordered",i]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[m],ngContentSelectors:q,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(s,e){s&1&&(P(),d(0),p(1,y,1,0,"nz-icon",0)),s&2&&(c(),U(e.nzMode==="closeable"?1:-1))},dependencies:[X,W],encapsulation:2,changeDetection:0})}return _})(),De=(()=>{class _{static \u0275fac=function(s){return new(s||_)};static \u0275mod=g({type:_});static \u0275inj=R({imports:[ee]})}return _})();var Y={TASK_NOT_FOUND:{level:"silent"},TASK_ALREADY_RUNNING:{level:"toast",message:"\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C\u4E2D"},PROCESS_SPAWN_FAILED:{level:"toast",message:"\u4EFB\u52A1\u542F\u52A8\u5931\u8D25"},TASK_SPEC_NOT_FOUND:{level:"toast",message:"\u4EFB\u52A1\u89C4\u683C\u672A\u627E\u5230"},TASK_NOT_RUNNABLE:{level:"toast",message:"\u4EFB\u52A1\u4E0D\u53EF\u8FD0\u884C"},RUN_NOT_FOUND:{level:"toast",message:"\u8FD0\u884C\u5B9E\u4F8B\u672A\u627E\u5230"},TASK_ID_REQUIRED:{level:"toast",message:"\u4EFB\u52A1 ID \u4E3A\u5FC5\u586B\u9879"},COMMAND_NOT_FOUND:{level:"toast",message:"\u547D\u4EE4\u672A\u627E\u5230\uFF0C\u8BF7\u786E\u4FDD\u5DF2\u6B63\u786E\u5B89\u88C5\u6240\u9700\u8F6F\u4EF6"},PROJECT_NOT_FOUND:{level:"toast",message:"\u9879\u76EE\u4E0D\u5B58\u5728"},PROJECT_ROOT_INVALID:{level:"toast",message:"\u9879\u76EE\u6839\u76EE\u5F55\u65E0\u6548"},PROJECT_ALREADY_EXISTS:{level:"toast",message:"\u9879\u76EE\u5DF2\u5B58\u5728"},INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u9879\u76EE\u540D\u79F0"},TARGET_EXISTS:{level:"toast",message:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728"},INVALID_REPO_URL:{level:"toast",message:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740"},GIT_CHECKOUT_FAILED:{level:"toast",message:"Git \u68C0\u51FA\u5931\u8D25"},BOOTSTRAP_NOT_IN_PICK_STATE:{level:"toast",message:"\u5F53\u524D\u4E0D\u5904\u4E8E\u9009\u62E9\u6839\u76EE\u5F55\u72B6\u6001"},BOOTSTRAP_CTX_NOT_FOUND:{level:"toast",message:"\u5F15\u5BFC\u4E0A\u4E0B\u6587\u672A\u627E\u5230"},BOOTSTRAP_INVALID_PICKED_ROOT:{level:"toast",message:"\u9009\u62E9\u7684\u6839\u76EE\u5F55\u65E0\u6548"},BOOTSTRAP_NOT_WAITING_PICK:{level:"toast",message:"\u5F15\u5BFC\u672A\u5904\u4E8E\u7B49\u5F85\u9009\u62E9\u72B6\u6001"},PROJECT_ANGULAR_JSON_INVALID:{level:"toast",message:"angular.json \u65E0\u6548"},PROJECT_ANGULAR_JSON_NOT_FOUND:{level:"toast",message:"angular.json \u672A\u627E\u5230"},PROJECT_VITE_CONFIG_INVALID:{level:"toast",message:"vite \u914D\u7F6E\u65E0\u6548"},PROJECT_VUE_CONFIG_NOT_FOUND:{level:"toast",message:"vite \u914D\u7F6E\u672A\u627E\u5230"},CONFIG_BACKUP_NOT_FOUND:{level:"toast",message:"\u914D\u7F6E\u5907\u4EFD\u672A\u627E\u5230"},CONFIG_READ_FAILED:{level:"toast",message:"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u635F\u574F"},CONFIG_CONFLICT:{level:"toast",message:"\u914D\u7F6E\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},FS_ALREADY_EXISTS:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u5DF2\u5B58\u5728"},FS_PATH_NOT_FOUND:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u672A\u627E\u5230"},FS_PERMISSION_DENIED:{level:"toast",message:"\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u88AB\u62D2\u7EDD"},FS_EXISTS_FAILED:{level:"toast",message:"\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519"},FS_INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u540D\u79F0"},FS_MKDIR_FAILED:{level:"toast",message:"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"},INTERNAL_ERROR:{level:"toast",message:"\u7CFB\u7EDF\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},CONNECTION_LOST:{level:"banner",message:"\u4E0E\u672C\u5730\u670D\u52A1\u7684\u8FDE\u63A5\u5DF2\u65AD\u5F00",action:{retry:!0}},HTTP_ERROR:{level:"toast",message:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5"},UNAUTHORIZED:{level:"banner",message:"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",action:{reload:!0}},UNKNOWN_ERROR:{level:"toast",message:"\u53D1\u751F\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},WS_ERROR:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5F02\u5E38",action:{retry:!0}},WS_CLOSED:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED",action:{retry:!0}},BAD_JSON:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684 JSON \u6570\u636E"},BAD_MSG:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684\u6D88\u606F\u683C\u5F0F"},OP_NOT_SUPPORTED:{level:"toast",message:"\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301"},HANDLER_FAILED:{level:"toast",message:"\u6D88\u606F\u5904\u7406\u5931\u8D25"},TOPIC_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u6D88\u606F\u4E3B\u9898"},OP_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u64CD\u4F5C\u7C7B\u578B"},DEP_INSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5B89\u88C5\u5931\u8D25"},DEP_UNINSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5378\u8F7D\u5931\u8D25"},DEP_NOT_FOUND:{level:"toast",message:"\u4F9D\u8D56\u672A\u627E\u5230"},DASHBOARD_CONFLICT:{level:"toast",message:"\u4EEA\u8868\u76D8\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},WIDGET_NOT_FOUND:{level:"toast",message:"\u90E8\u4EF6\u672A\u627E\u5230"},WIDGET_LOCKED:{level:"toast",message:"\u90E8\u4EF6\u88AB\u9501\u5B9A\uFF0C\u65E0\u6CD5\u4FEE\u6539"},RSS_FETCH_FAILED:{level:"toast",message:"RSS \u6E90\u83B7\u53D6\u5931\u8D25"},INVALID_RSS_URL:{level:"toast",message:"\u65E0\u6548\u7684 RSS \u6E90\u5730\u5740"},COLLECTION_NOT_EMPTY:{level:"toast",message:"\u96C6\u5408\u4E0D\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u5220\u9664"},INVALID_JSON:{level:"dev-only"},INVALID_MSG:{level:"dev-only"}};var I=class _{ui=a(x);dispatch(O,t,s){let e=Y[O];if(!e){this.ui.error(t??"\u672A\u77E5\u9519\u8BEF");return}let n=typeof e.message=="function"?e.message(s):e.message??t;switch(e.level){case"silent":return;case"toast":this.ui.error(n??"\u64CD\u4F5C\u5931\u8D25");return;case"banner":this.ui.banner?.(n??"\u7CFB\u7EDF\u5F02\u5E38",e.action);return;case"dev-only":T.production||console.warn("[DEV ERROR]",O,s);return}}static \u0275fac=function(t){return new(t||_)};static \u0275prov=A({token:_,factory:_.\u0275fac,providedIn:"root"})};var j=Q(Z()),Me=(_,O)=>{let t=a(I),s=j.uniqueId("req-");return _=_.clone({setHeaders:{"X-Request-Id":s}}),O(_).pipe(D(e=>{if(T.production||console.error(`[HTTP][${s}] Error:`,e),e instanceof w)return t.dispatch(e.code,e.message,e.details),N(()=>e);if(e instanceof V){let n=e.error?.error?.code??"HTTP_ERROR";return t.dispatch(n,e.message,e.error),N(()=>e)}return t.dispatch("INTERNAL_ERROR"),N(()=>e)}))};export{ee as a,De as b,Me as c};
1
+ import{a as Z}from"./chunk-HZ73CM45.js";import{a as T}from"./chunk-SNCDDYQR.js";import{F as x,f as w}from"./chunk-EP45FT55.js";import{B as J,C as k,D as H,E as b,M as W,N as X,x as M,z as B}from"./chunk-PTMJ422K.js";import{p as K}from"./chunk-53YRDYLS.js";import{Ca as L,Eb as C,Ec as z,Fb as g,Fc as G,O as D,Oa as r,Ra as m,Vb as p,Xb as U,bc as v,cc as h,e as Q,kc as f,ma as A,mb as F,na as R,qc as l,ra as O,rb as o,rd as V,tc as u,uc as P,v as N,vc as d,vd as i,xa as S,xb as c,ya as E}from"./chunk-SJG2JCPL.js";var q=["*"];function y(_,a){if(_&1){let t=f();v(0,"nz-icon",1),l("click",function(e){S(t);let n=u();return E(n.closeTag(e))}),h()}}var ee=(()=>{class _{cdr=O(V);renderer=O(c);el=O(m).nativeElement;directionality=O(M);destroyRef=O(L);nzMode="default";nzColor;nzChecked=!1;nzBordered=!0;nzOnClose=new o;nzCheckedChange=new o;dir="ltr";isPresetColor=!1;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el)}clearPresetColor(){let t=new RegExp(`(ant-tag-(?:${[...k,...J].join("|")}))`,"g"),s=this.el.classList.toString(),e=[],n=t.exec(s);for(;n!==null;)e.push(n[1]),n=t.exec(s);this.el.classList.remove(...e)}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=H(this.nzColor)||b(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(B(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:s}=t;s&&this.setPresetColor()}static \u0275fac=function(s){return new(s||_)};static \u0275cmp=C({type:_,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(s,e){s&1&&l("click",function(){return e.updateCheckedStatus()}),s&2&&(z("background-color",e.isPresetColor?"":e.nzColor),G("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir==="rtl")("ant-tag-borderless",!e.nzBordered))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",i],nzBordered:[2,"nzBordered","nzBordered",i]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[r],ngContentSelectors:q,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(s,e){s&1&&(P(),d(0),p(1,y,1,0,"nz-icon",0)),s&2&&(F(),U(e.nzMode==="closeable"?1:-1))},dependencies:[X,W],encapsulation:2,changeDetection:0})}return _})(),De=(()=>{class _{static \u0275fac=function(s){return new(s||_)};static \u0275mod=g({type:_});static \u0275inj=R({imports:[ee]})}return _})();var Y={TASK_NOT_FOUND:{level:"silent"},TASK_ALREADY_RUNNING:{level:"toast",message:"\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C\u4E2D"},PROCESS_SPAWN_FAILED:{level:"toast",message:"\u4EFB\u52A1\u542F\u52A8\u5931\u8D25"},TASK_SPEC_NOT_FOUND:{level:"toast",message:"\u4EFB\u52A1\u89C4\u683C\u672A\u627E\u5230"},TASK_NOT_RUNNABLE:{level:"toast",message:"\u4EFB\u52A1\u4E0D\u53EF\u8FD0\u884C"},RUN_NOT_FOUND:{level:"toast",message:"\u8FD0\u884C\u5B9E\u4F8B\u672A\u627E\u5230"},TASK_ID_REQUIRED:{level:"toast",message:"\u4EFB\u52A1 ID \u4E3A\u5FC5\u586B\u9879"},COMMAND_NOT_FOUND:{level:"toast",message:"\u547D\u4EE4\u672A\u627E\u5230\uFF0C\u8BF7\u786E\u4FDD\u5DF2\u6B63\u786E\u5B89\u88C5\u6240\u9700\u8F6F\u4EF6"},PROJECT_NOT_FOUND:{level:"toast",message:"\u9879\u76EE\u4E0D\u5B58\u5728"},PROJECT_ROOT_INVALID:{level:"toast",message:"\u9879\u76EE\u6839\u76EE\u5F55\u65E0\u6548"},PROJECT_ALREADY_EXISTS:{level:"toast",message:"\u9879\u76EE\u5DF2\u5B58\u5728"},INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u9879\u76EE\u540D\u79F0"},TARGET_EXISTS:{level:"toast",message:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728"},INVALID_REPO_URL:{level:"toast",message:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740"},GIT_CHECKOUT_FAILED:{level:"toast",message:"Git \u68C0\u51FA\u5931\u8D25"},BOOTSTRAP_NOT_IN_PICK_STATE:{level:"toast",message:"\u5F53\u524D\u4E0D\u5904\u4E8E\u9009\u62E9\u6839\u76EE\u5F55\u72B6\u6001"},BOOTSTRAP_CTX_NOT_FOUND:{level:"toast",message:"\u5F15\u5BFC\u4E0A\u4E0B\u6587\u672A\u627E\u5230"},BOOTSTRAP_INVALID_PICKED_ROOT:{level:"toast",message:"\u9009\u62E9\u7684\u6839\u76EE\u5F55\u65E0\u6548"},BOOTSTRAP_NOT_WAITING_PICK:{level:"toast",message:"\u5F15\u5BFC\u672A\u5904\u4E8E\u7B49\u5F85\u9009\u62E9\u72B6\u6001"},PROJECT_ANGULAR_JSON_INVALID:{level:"toast",message:"angular.json \u65E0\u6548"},PROJECT_ANGULAR_JSON_NOT_FOUND:{level:"toast",message:"angular.json \u672A\u627E\u5230"},PROJECT_VITE_CONFIG_INVALID:{level:"toast",message:"vite \u914D\u7F6E\u65E0\u6548"},PROJECT_VUE_CONFIG_NOT_FOUND:{level:"toast",message:"vite \u914D\u7F6E\u672A\u627E\u5230"},CONFIG_BACKUP_NOT_FOUND:{level:"toast",message:"\u914D\u7F6E\u5907\u4EFD\u672A\u627E\u5230"},CONFIG_READ_FAILED:{level:"toast",message:"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u635F\u574F"},CONFIG_CONFLICT:{level:"toast",message:"\u914D\u7F6E\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},FS_ALREADY_EXISTS:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u5DF2\u5B58\u5728"},FS_PATH_NOT_FOUND:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u672A\u627E\u5230"},FS_PERMISSION_DENIED:{level:"toast",message:"\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u88AB\u62D2\u7EDD"},FS_EXISTS_FAILED:{level:"toast",message:"\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519"},FS_INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u540D\u79F0"},FS_MKDIR_FAILED:{level:"toast",message:"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"},INTERNAL_ERROR:{level:"toast",message:"\u7CFB\u7EDF\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},CONNECTION_LOST:{level:"banner",message:"\u4E0E\u672C\u5730\u670D\u52A1\u7684\u8FDE\u63A5\u5DF2\u65AD\u5F00",action:{retry:!0}},HTTP_ERROR:{level:"toast",message:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5"},UNAUTHORIZED:{level:"banner",message:"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",action:{reload:!0}},UNKNOWN_ERROR:{level:"toast",message:"\u53D1\u751F\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},WS_ERROR:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5F02\u5E38",action:{retry:!0}},WS_CLOSED:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED",action:{retry:!0}},BAD_JSON:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684 JSON \u6570\u636E"},BAD_MSG:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684\u6D88\u606F\u683C\u5F0F"},OP_NOT_SUPPORTED:{level:"toast",message:"\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301"},HANDLER_FAILED:{level:"toast",message:"\u6D88\u606F\u5904\u7406\u5931\u8D25"},TOPIC_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u6D88\u606F\u4E3B\u9898"},OP_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u64CD\u4F5C\u7C7B\u578B"},DEP_INSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5B89\u88C5\u5931\u8D25"},DEP_UNINSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5378\u8F7D\u5931\u8D25"},DEP_NOT_FOUND:{level:"toast",message:"\u4F9D\u8D56\u672A\u627E\u5230"},DASHBOARD_CONFLICT:{level:"toast",message:"\u4EEA\u8868\u76D8\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},WIDGET_NOT_FOUND:{level:"toast",message:"\u90E8\u4EF6\u672A\u627E\u5230"},WIDGET_LOCKED:{level:"toast",message:"\u90E8\u4EF6\u88AB\u9501\u5B9A\uFF0C\u65E0\u6CD5\u4FEE\u6539"},RSS_FETCH_FAILED:{level:"toast",message:"RSS \u6E90\u83B7\u53D6\u5931\u8D25"},INVALID_RSS_URL:{level:"toast",message:"\u65E0\u6548\u7684 RSS \u6E90\u5730\u5740"},KILL_PORT_FAILED:{level:"toast",message:"\u7AEF\u53E3\u91CA\u653E\u5931\u8D25"},INVALID_PORT:{level:"toast",message:"\u65E0\u6548\u7684\u7AEF\u53E3\u53F7"},COLLECTION_NOT_EMPTY:{level:"toast",message:"\u96C6\u5408\u4E0D\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u5220\u9664"},INVALID_JSON:{level:"dev-only"},INVALID_MSG:{level:"dev-only"}};var I=class _{ui=O(x);dispatch(a,t,s){let e=Y[a];if(!e){this.ui.error(t??"\u672A\u77E5\u9519\u8BEF");return}let n=typeof e.message=="function"?e.message(s):e.message??t;switch(e.level){case"silent":return;case"toast":this.ui.error(n??"\u64CD\u4F5C\u5931\u8D25");return;case"banner":this.ui.banner?.(n??"\u7CFB\u7EDF\u5F02\u5E38",e.action);return;case"dev-only":T.production||console.warn("[DEV ERROR]",a,s);return}}static \u0275fac=function(t){return new(t||_)};static \u0275prov=A({token:_,factory:_.\u0275fac,providedIn:"root"})};var j=Q(Z()),Ve=(_,a)=>{let t=O(I),s=j.uniqueId("req-");return _=_.clone({setHeaders:{"X-Request-Id":s}}),a(_).pipe(D(e=>{if(T.production||console.error(`[HTTP][${s}] Error:`,e),e instanceof w)return t.dispatch(e.code,e.message,e.details),N(()=>e);if(e instanceof K){let n=e.error?.error?.code??"HTTP_ERROR";return t.dispatch(n,e.message,e.error),N(()=>e)}return t.dispatch("INTERNAL_ERROR"),N(()=>e)}))};export{ee as a,De as b,Ve as c};
@@ -1 +1 @@
1
- import{a as Me}from"./chunk-7U5ZOE34.js";import{a as xe,e as ke,f as ve}from"./chunk-DV7BEQJD.js";import{a as he}from"./chunk-PYGKDDJK.js";import"./chunk-5IUYSJVD.js";import"./chunk-CJISJEP3.js";import{d as be,e as ye}from"./chunk-35COW2FA.js";import"./chunk-SIVPP74B.js";import"./chunk-POZS3PD3.js";import{b as ze}from"./chunk-3N7T4ZJF.js";import"./chunk-HZ73CM45.js";import{b as S,c as ge,d as E}from"./chunk-5MHC25IS.js";import{f as F}from"./chunk-DUC7XBYN.js";import{a as A,e as de}from"./chunk-ROB7EMN5.js";import{c as _e,d as Ce}from"./chunk-A2SBXP7A.js";import"./chunk-SNCDDYQR.js";import{H as ue,I as fe}from"./chunk-FPDGZ3ZC.js";import{Ab as ce,Bb as me,Cb as N,Fb as I,Hb as D,M as h,N as f,T as oe,U as x,V as P,W as ae,Y as O,Z as k,jb as se,lb as re,pb as le,vb as v,yb as pe,z as ie}from"./chunk-PTMJ422K.js";import"./chunk-HFZLJHYR.js";import{i as C}from"./chunk-53YRDYLS.js";import{$b as K,Ca as G,Eb as u,Fc as te,Ic as d,Jc as M,Kc as z,Q as H,U as Q,Vb as T,Xb as w,_b as J,ac as c,bc as o,cc as a,dc as l,g as b,gd as ne,kc as X,l as U,mb as r,qc as m,ra as g,tc as _,xa as W,xc as Y,ya as q,yb as y,yc as Z,zc as ee}from"./chunk-SJG2JCPL.js";var L=class n{constructor(t,e,i){this.stream=t;this.clipboard=e;this.notify=i;this.resizeSub.add(this.resize$.pipe(H(350),Q((s,p)=>s.cols===p.cols&&s.rows===p.rows),ie(this.destroyRef)).subscribe(s=>{this._taskId&&this.stream.resize(this._taskId,s.cols,s.rows)}))}_taskId="";destroyRef=g(G);set taskId(t){let e=(t??"").trim();e&&e!==this._taskId&&(this._taskId&&(this.stream.unsubscribeTask(this._taskId),this.term?.clear()),this._taskId=e,this.bind(e))}get taskId(){return this._taskId}tail=200;follow=!0;status={status:"idle"};term;sub=new b;resizeSub=new b;resize$=new U;bind(t){this.stream.subscribeTask(t,this.tail),this.sub.unsubscribe(),this.sub=new b,this.sub.add(this.stream.output$(t).subscribe(e=>{this.term&&(this.term.follow=this.follow,this.term.write(e.payload.text))})),this.sub.add(this.stream.status$(t).subscribe(e=>this.status=e))}ngOnDestroy(){this._taskId&&this.stream.unsubscribeTask(this._taskId),this.sub.unsubscribe(),this.resizeSub.unsubscribe()}toggleFollow(){this.follow=!this.follow,this.follow&&this.term?.scrollToBottom()}clear(){this.term?.clear()}toBottom(){this.term?.scrollToBottom()}async copy(){let t=this.term?.copyAll()??"";if(!t)return;this.clipboard.copy(t)?this.notify.success("Console output copied to clipboard."):this.notify.error("Failed to copy console output.")}onTermResized(t){this.resize$.next(t)}static \u0275fac=function(e){return new(e||n)(y(ge),y(be),y(ue))};static \u0275cmp=u({type:n,selectors:[["app-task-console"]],viewQuery:function(e,i){if(e&1&&Y(A,5),e&2){let s;Z(s=ee())&&(i.term=s.first)}},inputs:{taskId:"taskId",tail:"tail"},decls:16,vars:1,consts:[[1,"console-card"],[1,"header"],[1,"title"],["nzType","desktop","nzTheme","outline"],[1,"id"],[1,"actions"],["nzAlign","center"],["nz-button","","nz-tooltip","\u6E05\u7A7A\u65E5\u5FD7",3,"click"],["nzType","clear","nzTheme","outline"],["nz-button","","nz-tooltip","\u590D\u5236\u65E5\u5FD7",3,"click"],["nzType","copy","nzTheme","outline"],["nz-button","","nz-tooltip","\u6EDA\u52A8\u5230\u5E95\u90E8",3,"click"],["nzType","vertical-align-bottom","nzTheme","outline"],[1,"viewport"],[3,"resized","follow"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"nz-icon",3),o(4,"div",4),d(5,"\u8F93\u51FA"),a()(),o(6,"div",5)(7,"nz-space",6)(8,"button",7),m("click",function(){return i.clear()}),l(9,"nz-icon",8),a(),o(10,"button",9),m("click",function(){return i.copy()}),l(11,"nz-icon",10),a(),o(12,"button",11),m("click",function(){return i.toBottom()}),l(13,"nz-icon",12),a()()()(),o(14,"div",13)(15,"app-terminal-view",14),m("resized",function(p){return i.onTermResized(p)}),a()()()),e&2&&(r(15),c("follow",i.follow))},dependencies:[v,k,O,P,ae,x,oe,f,h,D,I,A,ye],styles:[".console-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.08);border-radius:8px;overflow:hidden;min-height:0}.header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:8px 12px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{margin-left:8px;font-size:12px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{opacity:.9}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .stopped[_ngcontent-%COMP%]{opacity:.8}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .idle[_ngcontent-%COMP%]{opacity:.6}.viewport[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;padding:8px;background:#000;border-radius:8px}"]})};var j=class n{name;description;command;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-task-header"]],inputs:{name:"name",description:"description",command:"command"},decls:7,vars:3,consts:[[1,"name"],["nzType","appstore"],[1,"description"],[1,"command"]],template:function(e,i){e&1&&(o(0,"div",0),l(1,"nz-icon",1),d(2),a(),o(3,"div",2),d(4),a(),o(5,"div",3),d(6),a()),e&2&&(r(2),z(" ",i.name||"\u672A\u9009\u62E9\u4EFB\u52A1"),r(2),M(i.description||"-"),r(2),M(i.command||"-"))},dependencies:[C,f,h],styles:["[_nghost-%COMP%]{padding:0 16px;display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .name[_ngcontent-%COMP%]{font-size:22px;position:relative;top:-1px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{flex:1;color:var(--app-text-secondary);font-size:15px;margin:0 16px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .command[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:13px;background:var(--app-primary-3);height:32px;line-height:32px;padding:0 12px;border-radius:3px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}"]})};var Ne=(n,t)=>t.spec.id;function Ie(n,t){n&1&&(o(0,"div",7),d(1,"Loading..."),a())}function De(n,t){if(n&1&&(o(0,"div",7),d(1),a()),n&2){let e=_(2);r(),z("No tasks for project: ",e.projectId())}}function Ee(n,t){n&1&&l(0,"nz-badge",14)}function Fe(n,t){n&1&&l(0,"nz-badge",15)}function Le(n,t){n&1&&l(0,"nz-badge",16)}function je(n,t){if(n&1){let e=X();o(0,"div",10),m("click",function(){let s=W(e).$implicit,p=_(3);return q(p.state.select(s.spec.id))}),o(1,"div",11)(2,"div",12),l(3,"nz-icon",13),T(4,Ee,1,0,"nz-badge",14)(5,Fe,1,0,"nz-badge",15)(6,Le,1,0,"nz-badge",16),a(),o(7,"div",17)(8,"div",18),d(9),a(),o(10,"div",19),d(11),a()()()()}if(n&2){let e=t.$implicit,i=_(3);te("active",e.spec.id===i.selectedId()),r(),c("nz-tooltip",e.spec.description||""),r(3),w((e==null||e.runtime==null?null:e.runtime.status)==="running"?4:(e==null||e.runtime==null?null:e.runtime.status)==="stopping"?5:6),r(4),c("title",e.spec.name),r(),M(e.spec.name),r(2),z(" ",(e.runtime==null?null:e.runtime.status)==="running"?"\u8FD0\u884C\u4E2D":(e.runtime==null?null:e.runtime.status)==="stopping"?"\u505C\u6B62\u4E2D":(e.runtime==null?null:e.runtime.status)==="stopped"?"\u5DF2\u505C\u6B62":e.spec.description||"\u7A7A\u95F2\u4E2D"," ")}}function Be(n,t){if(n&1&&(o(0,"div",8),J(1,je,12,7,"div",9,Ne),a()),n&2){let e=_(2);r(),K(e.list())}}function Re(n,t){if(n&1&&T(0,De,2,1,"div",7)(1,Be,3,0,"div",8),n&2){let e=_();w(e.list().length===0?0:1)}}var B=class n{state=g(E);keyword=this.state.keyword;loading=this.state.loading;list=this.state.rowsViewFiltered;selectedId=this.state.selectedTaskId;projectId=this.state.projectId;badge(t){return t??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-task-list"]],decls:10,vars:2,consts:[[1,"wrap"],[1,"header"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u4EFB\u52A1",3,"ngModelChange","ngModel"],["nz-button","","nzType","text",3,"click"],["nz-icon","","nzType","reload"],[1,"body"],[1,"hint"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],["nzTooltipPlacement","right",1,"row",3,"nz-tooltip"],[1,"icon"],["nzType","codepen-circle","nzTheme","outline"],["nzStatus","processing"],["nzStatus","warning"],["nzStatus","default"],[1,"info"],[1,"name",3,"title"],[1,"description"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),l(3,"nz-icon",2),o(4,"input",3),m("ngModelChange",function(p){return i.keyword.set(p)}),a()(),o(5,"button",4),m("click",function(){return i.state.refresh()}),l(6,"span",5),a()(),o(7,"div",6),T(8,Ie,2,0,"div",7)(9,Re,2,1),a()()),e&2&&(r(4),c("ngModel",i.keyword()),r(4),w(i.loading()?8:9))},dependencies:[C,v,se,re,le,k,O,P,f,h,S,x,F,N,ce,me,pe,D,I,Ce,_e],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:320px;flex:0 0 320px}.wrap[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:hidden}.header[_ngcontent-%COMP%]{width:100%;padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.12);flex:0 0 auto}.header[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.body[_ngcontent-%COMP%]{flex:1 1 auto;height:0;display:flex;flex-direction:column}.error[_ngcontent-%COMP%]{padding:10px 12px;color:#b42318;flex:0 0 auto}.hint[_ngcontent-%COMP%]{padding:12px;opacity:.7;flex:0 0 auto}.items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding:8px;display:flex;flex-direction:column;gap:8px;height:100%;overflow-x:hidden;overflow-y:auto}.item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.item[_ngcontent-%COMP%]:hover, .item.active[_ngcontent-%COMP%]{background:var(--app-primary-3)}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.item[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.2);opacity:.85}.item[_ngcontent-%COMP%] .badge[data-status=running][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .badge[data-status=stopped][_ngcontent-%COMP%]{opacity:.7}.item[_ngcontent-%COMP%] .badge[data-status=failed][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.75;display:flex;align-items:center;gap:6px}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .sep[_ngcontent-%COMP%]{opacity:.5}"]})};var we=class n{projectState=g(fe);taskState=g(E);selectedTask=this.taskState.selectedRow;constructor(){ne(async()=>{let t=this.projectState.currentProjectId();t&&await this.taskState.setProject(t)})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-tasks"]],decls:7,vars:9,consts:[[3,"title","isFullscreen"],[1,"page"],[1,"content"],[3,"name","description","command"],[3,"toggle","isStopping","isRunning","isStopped"],[3,"taskId"]],template:function(e,i){if(e&1&&(o(0,"app-page-layout",0)(1,"nz-layout",1),l(2,"app-task-list"),o(3,"nz-content",2),l(4,"app-task-header",3),o(5,"app-task-actions",4),m("toggle",function(){return i.taskState.toggleTask()}),a(),l(6,"app-task-console",5),a()()()),e&2){let s,p,R;c("title","\u4EFB\u52A1")("isFullscreen",!0),r(4),c("name",(s=i.selectedTask())==null||s.spec==null?null:s.spec.name)("description",(p=i.selectedTask())==null||p.spec==null?null:p.spec.description)("command",(R=i.selectedTask())==null||R.spec==null?null:R.spec.command),r(),c("isStopping",i.taskState.isStopping())("isRunning",i.taskState.isRunning())("isStopped",i.taskState.isStopped()),r(),c("taskId",i.taskState.selectedTaskId())}},dependencies:[C,v,x,F,k,N,Me,S,ze,f,ve,ke,xe,L,B,he,j,de],styles:[".page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:row;overflow:hidden;gap:16px;padding:0 16px}.content[_ngcontent-%COMP%]{flex:1 1 auto;width:0;display:flex;flex-direction:column;gap:16px;height:100%;overflow:hidden}app-task-header[_ngcontent-%COMP%], app-task-actions[_ngcontent-%COMP%]{flex:0 0 auto}app-task-console[_ngcontent-%COMP%]{flex:1 1 auto;display:block;height:0}"]})};export{we as TasksComponent};
1
+ import{a as Me}from"./chunk-FNLA2MNI.js";import{a as xe,e as ke,f as ve}from"./chunk-CO7S3LZV.js";import{a as he}from"./chunk-3PWCJ3D5.js";import"./chunk-GCKL62DR.js";import"./chunk-CJISJEP3.js";import{d as be,e as ye}from"./chunk-35COW2FA.js";import"./chunk-SIVPP74B.js";import"./chunk-POZS3PD3.js";import{b as ze}from"./chunk-J2JNFWJN.js";import"./chunk-HZ73CM45.js";import{b as S,c as ge,d as E}from"./chunk-OUE23ZE4.js";import{f as F}from"./chunk-DJJC6FPO.js";import{a as A,e as de}from"./chunk-ROB7EMN5.js";import{c as _e,d as Ce}from"./chunk-W6TCGG53.js";import"./chunk-SNCDDYQR.js";import{F as ue,G as fe}from"./chunk-EP45FT55.js";import{Ab as ce,Bb as me,Cb as N,Fb as I,Hb as D,M as h,N as f,T as oe,U as x,V as P,W as ae,Y as O,Z as k,jb as se,lb as re,pb as le,vb as v,yb as pe,z as ie}from"./chunk-PTMJ422K.js";import"./chunk-HFZLJHYR.js";import{i as C}from"./chunk-53YRDYLS.js";import{$b as K,Ca as G,Eb as u,Fc as te,Ic as d,Jc as M,Kc as z,Q as H,U as Q,Vb as T,Xb as w,_b as J,ac as c,bc as o,cc as a,dc as l,g as b,gd as ne,kc as X,l as U,mb as r,qc as m,ra as g,tc as _,xa as W,xc as Y,ya as q,yb as y,yc as Z,zc as ee}from"./chunk-SJG2JCPL.js";var L=class n{constructor(t,e,i){this.stream=t;this.clipboard=e;this.notify=i;this.resizeSub.add(this.resize$.pipe(H(350),Q((s,p)=>s.cols===p.cols&&s.rows===p.rows),ie(this.destroyRef)).subscribe(s=>{this._taskId&&this.stream.resize(this._taskId,s.cols,s.rows)}))}_taskId="";destroyRef=g(G);set taskId(t){let e=(t??"").trim();e&&e!==this._taskId&&(this._taskId&&(this.stream.unsubscribeTask(this._taskId),this.term?.clear()),this._taskId=e,this.bind(e))}get taskId(){return this._taskId}tail=200;follow=!0;status={status:"idle"};term;sub=new b;resizeSub=new b;resize$=new U;bind(t){this.stream.subscribeTask(t,this.tail),this.sub.unsubscribe(),this.sub=new b,this.sub.add(this.stream.output$(t).subscribe(e=>{this.term&&(this.term.follow=this.follow,this.term.write(e.payload.text))})),this.sub.add(this.stream.status$(t).subscribe(e=>this.status=e))}ngOnDestroy(){this._taskId&&this.stream.unsubscribeTask(this._taskId),this.sub.unsubscribe(),this.resizeSub.unsubscribe()}toggleFollow(){this.follow=!this.follow,this.follow&&this.term?.scrollToBottom()}clear(){this.term?.clear()}toBottom(){this.term?.scrollToBottom()}async copy(){let t=this.term?.copyAll()??"";if(!t)return;this.clipboard.copy(t)?this.notify.success("Console output copied to clipboard."):this.notify.error("Failed to copy console output.")}onTermResized(t){this.resize$.next(t)}static \u0275fac=function(e){return new(e||n)(y(ge),y(be),y(ue))};static \u0275cmp=u({type:n,selectors:[["app-task-console"]],viewQuery:function(e,i){if(e&1&&Y(A,5),e&2){let s;Z(s=ee())&&(i.term=s.first)}},inputs:{taskId:"taskId",tail:"tail"},decls:16,vars:1,consts:[[1,"console-card"],[1,"header"],[1,"title"],["nzType","desktop","nzTheme","outline"],[1,"id"],[1,"actions"],["nzAlign","center"],["nz-button","","nz-tooltip","\u6E05\u7A7A\u65E5\u5FD7",3,"click"],["nzType","clear","nzTheme","outline"],["nz-button","","nz-tooltip","\u590D\u5236\u65E5\u5FD7",3,"click"],["nzType","copy","nzTheme","outline"],["nz-button","","nz-tooltip","\u6EDA\u52A8\u5230\u5E95\u90E8",3,"click"],["nzType","vertical-align-bottom","nzTheme","outline"],[1,"viewport"],[3,"resized","follow"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"nz-icon",3),o(4,"div",4),d(5,"\u8F93\u51FA"),a()(),o(6,"div",5)(7,"nz-space",6)(8,"button",7),m("click",function(){return i.clear()}),l(9,"nz-icon",8),a(),o(10,"button",9),m("click",function(){return i.copy()}),l(11,"nz-icon",10),a(),o(12,"button",11),m("click",function(){return i.toBottom()}),l(13,"nz-icon",12),a()()()(),o(14,"div",13)(15,"app-terminal-view",14),m("resized",function(p){return i.onTermResized(p)}),a()()()),e&2&&(r(15),c("follow",i.follow))},dependencies:[v,k,O,P,ae,x,oe,f,h,D,I,A,ye],styles:[".console-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.08);border-radius:8px;overflow:hidden;min-height:0}.header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:8px 12px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{margin-left:8px;font-size:12px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{opacity:.9}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .stopped[_ngcontent-%COMP%]{opacity:.8}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .idle[_ngcontent-%COMP%]{opacity:.6}.viewport[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;padding:8px;background:#000;border-radius:8px}"]})};var j=class n{name;description;command;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-task-header"]],inputs:{name:"name",description:"description",command:"command"},decls:7,vars:3,consts:[[1,"name"],["nzType","appstore"],[1,"description"],[1,"command"]],template:function(e,i){e&1&&(o(0,"div",0),l(1,"nz-icon",1),d(2),a(),o(3,"div",2),d(4),a(),o(5,"div",3),d(6),a()),e&2&&(r(2),z(" ",i.name||"\u672A\u9009\u62E9\u4EFB\u52A1"),r(2),M(i.description||"-"),r(2),M(i.command||"-"))},dependencies:[C,f,h],styles:["[_nghost-%COMP%]{padding:0 16px;display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .name[_ngcontent-%COMP%]{font-size:22px;position:relative;top:-1px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{flex:1;color:var(--app-text-secondary);font-size:15px;margin:0 16px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .command[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:13px;background:var(--app-primary-3);height:32px;line-height:32px;padding:0 12px;border-radius:3px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}"]})};var Ne=(n,t)=>t.spec.id;function Ie(n,t){n&1&&(o(0,"div",7),d(1,"Loading..."),a())}function De(n,t){if(n&1&&(o(0,"div",7),d(1),a()),n&2){let e=_(2);r(),z("No tasks for project: ",e.projectId())}}function Ee(n,t){n&1&&l(0,"nz-badge",14)}function Fe(n,t){n&1&&l(0,"nz-badge",15)}function Le(n,t){n&1&&l(0,"nz-badge",16)}function je(n,t){if(n&1){let e=X();o(0,"div",10),m("click",function(){let s=W(e).$implicit,p=_(3);return q(p.state.select(s.spec.id))}),o(1,"div",11)(2,"div",12),l(3,"nz-icon",13),T(4,Ee,1,0,"nz-badge",14)(5,Fe,1,0,"nz-badge",15)(6,Le,1,0,"nz-badge",16),a(),o(7,"div",17)(8,"div",18),d(9),a(),o(10,"div",19),d(11),a()()()()}if(n&2){let e=t.$implicit,i=_(3);te("active",e.spec.id===i.selectedId()),r(),c("nz-tooltip",e.spec.description||""),r(3),w((e==null||e.runtime==null?null:e.runtime.status)==="running"?4:(e==null||e.runtime==null?null:e.runtime.status)==="stopping"?5:6),r(4),c("title",e.spec.name),r(),M(e.spec.name),r(2),z(" ",(e.runtime==null?null:e.runtime.status)==="running"?"\u8FD0\u884C\u4E2D":(e.runtime==null?null:e.runtime.status)==="stopping"?"\u505C\u6B62\u4E2D":(e.runtime==null?null:e.runtime.status)==="stopped"?"\u5DF2\u505C\u6B62":e.spec.description||"\u7A7A\u95F2\u4E2D"," ")}}function Be(n,t){if(n&1&&(o(0,"div",8),J(1,je,12,7,"div",9,Ne),a()),n&2){let e=_(2);r(),K(e.list())}}function Re(n,t){if(n&1&&T(0,De,2,1,"div",7)(1,Be,3,0,"div",8),n&2){let e=_();w(e.list().length===0?0:1)}}var B=class n{state=g(E);keyword=this.state.keyword;loading=this.state.loading;list=this.state.rowsViewFiltered;selectedId=this.state.selectedTaskId;projectId=this.state.projectId;badge(t){return t??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-task-list"]],decls:10,vars:2,consts:[[1,"wrap"],[1,"header"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u4EFB\u52A1",3,"ngModelChange","ngModel"],["nz-button","","nzType","text",3,"click"],["nz-icon","","nzType","reload"],[1,"body"],[1,"hint"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],["nzTooltipPlacement","right",1,"row",3,"nz-tooltip"],[1,"icon"],["nzType","codepen-circle","nzTheme","outline"],["nzStatus","processing"],["nzStatus","warning"],["nzStatus","default"],[1,"info"],[1,"name",3,"title"],[1,"description"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),l(3,"nz-icon",2),o(4,"input",3),m("ngModelChange",function(p){return i.keyword.set(p)}),a()(),o(5,"button",4),m("click",function(){return i.state.refresh()}),l(6,"span",5),a()(),o(7,"div",6),T(8,Ie,2,0,"div",7)(9,Re,2,1),a()()),e&2&&(r(4),c("ngModel",i.keyword()),r(4),w(i.loading()?8:9))},dependencies:[C,v,se,re,le,k,O,P,f,h,S,x,F,N,ce,me,pe,D,I,Ce,_e],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:320px;flex:0 0 320px}.wrap[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:hidden}.header[_ngcontent-%COMP%]{width:100%;padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.12);flex:0 0 auto}.header[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.body[_ngcontent-%COMP%]{flex:1 1 auto;height:0;display:flex;flex-direction:column}.error[_ngcontent-%COMP%]{padding:10px 12px;color:#b42318;flex:0 0 auto}.hint[_ngcontent-%COMP%]{padding:12px;opacity:.7;flex:0 0 auto}.items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding:8px;display:flex;flex-direction:column;gap:8px;height:100%;overflow-x:hidden;overflow-y:auto}.item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.item[_ngcontent-%COMP%]:hover, .item.active[_ngcontent-%COMP%]{background:var(--app-primary-3)}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.item[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.2);opacity:.85}.item[_ngcontent-%COMP%] .badge[data-status=running][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .badge[data-status=stopped][_ngcontent-%COMP%]{opacity:.7}.item[_ngcontent-%COMP%] .badge[data-status=failed][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.75;display:flex;align-items:center;gap:6px}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .sep[_ngcontent-%COMP%]{opacity:.5}"]})};var we=class n{projectState=g(fe);taskState=g(E);selectedTask=this.taskState.selectedRow;constructor(){ne(async()=>{let t=this.projectState.currentProjectId();t&&await this.taskState.setProject(t)})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-tasks"]],decls:7,vars:9,consts:[[3,"title","isFullscreen"],[1,"page"],[1,"content"],[3,"name","description","command"],[3,"toggle","isStopping","isRunning","isStopped"],[3,"taskId"]],template:function(e,i){if(e&1&&(o(0,"app-page-layout",0)(1,"nz-layout",1),l(2,"app-task-list"),o(3,"nz-content",2),l(4,"app-task-header",3),o(5,"app-task-actions",4),m("toggle",function(){return i.taskState.toggleTask()}),a(),l(6,"app-task-console",5),a()()()),e&2){let s,p,R;c("title","\u4EFB\u52A1")("isFullscreen",!0),r(4),c("name",(s=i.selectedTask())==null||s.spec==null?null:s.spec.name)("description",(p=i.selectedTask())==null||p.spec==null?null:p.spec.description)("command",(R=i.selectedTask())==null||R.spec==null?null:R.spec.command),r(),c("isStopping",i.taskState.isStopping())("isRunning",i.taskState.isRunning())("isStopped",i.taskState.isStopped()),r(),c("taskId",i.taskState.selectedTaskId())}},dependencies:[C,v,x,F,k,N,Me,S,ze,f,ve,ke,xe,L,B,he,j,de],styles:[".page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:row;overflow:hidden;gap:16px;padding:0 16px}.content[_ngcontent-%COMP%]{flex:1 1 auto;width:0;display:flex;flex-direction:column;gap:16px;height:100%;overflow:hidden}app-task-header[_ngcontent-%COMP%], app-task-actions[_ngcontent-%COMP%]{flex:0 0 auto}app-task-console[_ngcontent-%COMP%]{flex:1 1 auto;display:block;height:0}"]})};export{we as TasksComponent};
@@ -1,2 +1,2 @@
1
- import{a as X,b as D}from"./chunk-A2SBXP7A.js";import{b as bt}from"./chunk-SNCDDYQR.js";import{G as wt,H as J,O as lt,P as dt,l as _t,x as St,y as Tt,z as kt}from"./chunk-PTMJ422K.js";import{d as st}from"./chunk-53YRDYLS.js";import{$b as Q,Ca as ut,Eb as N,Ec as E,Fb as V,Fc as P,Gb as W,Gc as K,Ha as x,Ic as O,Jc as L,Kb as k,Lb as zt,Oa as ot,Vb as z,Vc as vt,Xb as f,Yb as ft,Zb as gt,_b as $,a as c,ac as _,b as h,bc as C,cc as g,dc as A,f as nt,fd as y,gc as ht,gd as yt,hc as j,ic as I,l as it,ma as M,mb as s,na as q,qa as at,r as H,ra as v,rd as Z,s as b,tc as u,uc as B,vb as mt,vc as R,vd as T,wc as rt,xc as Ct,yc as G,z as pt,zc as U}from"./chunk-SJG2JCPL.js";var Dt=["nzType","avatar"];var jt=["*"];function It(e,n){if(e&1&&(C(0,"div",0),A(1,"nz-skeleton-element",4),g()),e&2){let t=u(2);s(),_("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle")}}function Bt(e,n){if(e&1&&A(0,"h3",5),e&2){let t=u(2);E("width",t.toCSSUnit(t.title.width))}}function Rt(e,n){if(e&1&&A(0,"li"),e&2){let t=n.$index,i=u(3);E("width",i.toCSSUnit(i.widthList[t]))}}function Et(e,n){if(e&1&&(C(0,"ul",3),$(1,Rt,1,2,"li",6,gt),g()),e&2){let t=u(2);s(),Q(t.rowsList)}}function Ot(e,n){if(e&1&&(z(0,It,2,2,"div",0),C(1,"div",1),z(2,Bt,1,2,"h3",2),z(3,Et,3,0,"ul",3),g()),e&2){let t=u();f(t.nzAvatar?0:-1),s(2),f(t.nzTitle?2:-1),s(),f(t.nzParagraph?3:-1)}}function Lt(e,n){e&1&&R(0)}var Ft=(()=>{class e{nzActive=!1;nzType;nzBlock=!1;static \u0275fac=function(i){return new(i||e)};static \u0275dir=W({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(i,a){i&2&&P("ant-skeleton-active",a.nzActive)("ant-skeleton-block",a.nzBlock)},inputs:{nzActive:[2,"nzActive","nzActive",T],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",T]}})}return e})();var Ht=(()=>{class e{nzShape="circle";nzSize="default";styleMap={};ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let i=`${this.nzSize}px`;this.styleMap={width:i,height:i,"line-height":i}}else this.styleMap={}}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},features:[ot],attrs:Dt,decls:1,vars:10,consts:[[1,"ant-skeleton-avatar"]],template:function(i,a){i&1&&ht(0,"span",0),i&2&&(K(a.styleMap),P("ant-skeleton-avatar-square",a.nzShape==="square")("ant-skeleton-avatar-circle",a.nzShape==="circle")("ant-skeleton-avatar-lg",a.nzSize==="large")("ant-skeleton-avatar-sm",a.nzSize==="small"))},encapsulation:2,changeDetection:0})}return e})();var xt=(()=>{class e{cdr=v(Z);nzActive=!1;nzLoading=!0;nzRound=!1;nzTitle=!0;nzAvatar=!1;nzParagraph=!0;title;avatar;paragraph;rowsList=[];widthList=[];toCSSUnit(t=""){return _t(t)}getTitleProps(){let t=!!this.nzAvatar,i=!!this.nzParagraph,a="";return!t&&i?a="38%":t&&i&&(a="50%"),c({width:a},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return c({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,i=!!this.nzTitle,a={};return(!t||!i)&&(a.width="61%"),!t&&i?a.rows=3:a.rows=2,c(c({},a),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:i}=this.paragraph,a=[];return t&&Array.isArray(t)?a=t:t&&!Array.isArray(t)&&(a=[],a[i-1]=t),a}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck()}ngOnInit(){this.updateProps()}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(i,a){i&2&&P("ant-skeleton-with-avatar",!!a.nzAvatar)("ant-skeleton-active",a.nzActive)("ant-skeleton-round",a.nzRound)},inputs:{nzActive:[2,"nzActive","nzActive",T],nzLoading:[2,"nzLoading","nzLoading",T],nzRound:[2,"nzRound","nzRound",T],nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],features:[ot],ngContentSelectors:jt,decls:2,vars:1,consts:[[1,"ant-skeleton-header"],[1,"ant-skeleton-content"],[1,"ant-skeleton-title",3,"width"],[1,"ant-skeleton-paragraph"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[3,"width"]],template:function(i,a){i&1&&(B(),z(0,Ot,4,3)(1,Lt,1,0)),i&2&&f(a.nzLoading?0:1)},dependencies:[Ft,Ht],encapsulation:2,changeDetection:0})}return e})(),Nt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=V({type:e});static \u0275inj=q({})}return e})();function Vt(e,n){}function Wt(e,n){if(e&1&&(C(0,"div",0),k(1,Vt,0,0,"ng-template",2),g()),e&2){let t=u();s(),_("ngTemplateOutlet",t.nzAvatar)}}function $t(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzTitle)}}function Qt(e,n){if(e&1&&(C(0,"div",3),k(1,$t,2,1,"ng-container",5),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzTitle)}}function Gt(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzDescription)}}function Ut(e,n){if(e&1&&(C(0,"div",4),k(1,Gt,2,1,"ng-container",5),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzDescription)}}function Kt(e,n){if(e&1&&(C(0,"div",1),z(1,Qt,2,1,"div",3),z(2,Ut,2,1,"div",4),g()),e&2){let t=u();s(),f(t.nzTitle?1:-1),s(),f(t.nzDescription?2:-1)}}var Mt=["*"];function Zt(e,n){e&1&&R(0)}var Jt=()=>({rows:4});function Xt(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzTitle)}}function Yt(e,n){if(e&1&&(C(0,"div",6),k(1,Xt,2,1,"ng-container",9),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzTitle)}}function te(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzExtra)}}function ee(e,n){if(e&1&&(C(0,"div",7),k(1,te,2,1,"ng-container",9),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzExtra)}}function ne(e,n){}function ie(e,n){if(e&1&&k(0,ne,0,0,"ng-template",8),e&2){let t=u(2);_("ngTemplateOutlet",t.listOfNzCardTabComponent.template)}}function ae(e,n){if(e&1&&(C(0,"div",0)(1,"div",5),z(2,Yt,2,1,"div",6),z(3,ee,2,1,"div",7),g(),z(4,ie,1,1,null,8),g()),e&2){let t=u();s(2),f(t.nzTitle?2:-1),s(),f(t.nzExtra?3:-1),s(),f(t.listOfNzCardTabComponent?4:-1)}}function oe(e,n){}function re(e,n){if(e&1&&(C(0,"div",1),k(1,oe,0,0,"ng-template",8),g()),e&2){let t=u();s(),_("ngTemplateOutlet",t.nzCover)}}function se(e,n){e&1&&A(0,"nz-skeleton",3),e&2&&_("nzActive",!0)("nzTitle",!1)("nzParagraph",vt(3,Jt))}function le(e,n){e&1&&R(0)}function de(e,n){}function ce(e,n){if(e&1&&(C(0,"li")(1,"span"),k(2,de,0,0,"ng-template",8),g()()),e&2){let t=n.$implicit,i=u(2);E("width",100/i.nzActions.length,"%"),s(2),_("ngTemplateOutlet",t)}}function pe(e,n){if(e&1&&(C(0,"ul",4),$(1,ce,3,3,"li",10,ft),g()),e&2){let t=u();s(),Q(t.nzActions)}}var ue=(()=>{class e{nzHoverable=!0;static \u0275fac=function(i){return new(i||e)};static \u0275dir=W({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(i,a){i&2&&P("ant-card-hoverable",a.nzHoverable)},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",T]},exportAs:["nzCardGrid"]})}return e})(),me=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],decls:2,vars:2,consts:[[1,"ant-card-meta-avatar"],[1,"ant-card-meta-detail"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-title"],[1,"ant-card-meta-description"],[4,"nzStringTemplateOutlet"]],template:function(i,a){i&1&&(z(0,Wt,2,1,"div",0),z(1,Kt,3,2,"div",1)),i&2&&(f(a.nzAvatar?0:-1),s(),f(a.nzTitle||a.nzDescription?1:-1))},dependencies:[st,dt,lt],encapsulation:2,changeDetection:0})}return e})(),ze=(()=>{class e{template;static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-card-tab"]],viewQuery:function(i,a){if(i&1&&Ct(mt,7),i&2){let p;G(p=U())&&(a.template=p.first)}},exportAs:["nzCardTab"],ngContentSelectors:Mt,decls:1,vars:0,template:function(i,a){i&1&&(B(),zt(0,Zt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return e})(),Pt="card",fe=(()=>{var r;let e,n=[],t=[],i,a=[],p=[],o,m=[],w=[];return r=class{cdr=v(Z);directionality=v(St);destroyRef=v(ut);_nzModuleName=Pt;nzBordered=b(this,n,!0);nzLoading=(b(this,t),!1);nzHoverable=b(this,a,!1);nzBodyStyle=(b(this,p),null);nzCover;nzActions=[];nzType=null;nzSize=b(this,m,"default");nzTitle=b(this,w);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;dir="ltr";constructor(){wt(Pt,()=>this.cdr.markForCheck())}ngOnInit(){this.directionality.change?.pipe(kt(this.destroyRef)).subscribe(S=>{this.dir=S,this.cdr.detectChanges()}),this.dir=this.directionality.value}},(()=>{let S=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[J()],i=[J()],o=[J()],H(null,null,e,{kind:"field",name:"nzBordered",static:!1,private:!1,access:{has:l=>"nzBordered"in l,get:l=>l.nzBordered,set:(l,d)=>{l.nzBordered=d}},metadata:S},n,t),H(null,null,i,{kind:"field",name:"nzHoverable",static:!1,private:!1,access:{has:l=>"nzHoverable"in l,get:l=>l.nzHoverable,set:(l,d)=>{l.nzHoverable=d}},metadata:S},a,p),H(null,null,o,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:l=>"nzSize"in l,get:l=>l.nzSize,set:(l,d)=>{l.nzSize=d}},metadata:S},m,w),S&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:S})})(),nt(r,"\u0275fac",function(l){return new(l||r)}),nt(r,"\u0275cmp",N({type:r,selectors:[["nz-card"]],contentQueries:function(l,d,ct){if(l&1&&(rt(ct,ze,5),rt(ct,ue,4)),l&2){let F;G(F=U())&&(d.listOfNzCardTabComponent=F.first),G(F=U())&&(d.listOfNzCardGridDirective=F)}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(l,d){l&2&&P("ant-card-loading",d.nzLoading)("ant-card-bordered",d.nzBordered)("ant-card-hoverable",d.nzHoverable)("ant-card-small",d.nzSize==="small")("ant-card-contain-grid",d.listOfNzCardGridDirective&&d.listOfNzCardGridDirective.length)("ant-card-type-inner",d.nzType==="inner")("ant-card-contain-tabs",!!d.listOfNzCardTabComponent)("ant-card-rtl",d.dir==="rtl")},inputs:{nzBordered:[2,"nzBordered","nzBordered",T],nzLoading:[2,"nzLoading","nzLoading",T],nzHoverable:[2,"nzHoverable","nzHoverable",T],nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:Mt,decls:6,vars:6,consts:[[1,"ant-card-head"],[1,"ant-card-cover"],[1,"ant-card-body"],[3,"nzActive","nzTitle","nzParagraph"],[1,"ant-card-actions"],[1,"ant-card-head-wrapper"],[1,"ant-card-head-title"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[4,"nzStringTemplateOutlet"],[3,"width"]],template:function(l,d){l&1&&(B(),z(0,ae,5,3,"div",0),z(1,re,2,1,"div",1),C(2,"div",2),z(3,se,1,4,"nz-skeleton",3)(4,le,1,0),g(),z(5,pe,3,0,"ul",4)),l&2&&(f(d.nzTitle||d.nzExtra||d.listOfNzCardTabComponent?0:-1),s(),f(d.nzCover?1:-1),s(),K(d.nzBodyStyle),s(),f(d.nzLoading?3:4),s(2),f(d.nzActions.length?5:-1))},dependencies:[dt,lt,st,Nt,xt],encapsulation:2,changeDetection:0})),r})(),Qe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=V({type:e});static \u0275inj=q({imports:[fe,me,Tt]})}return e})();var tt=class e{constructor(n,t){this.ws=n;this.runtimeStore=t;this.ws.messages().subscribe(i=>this.onMessage(i)),this.ws.stateChanges().subscribe(i=>{i==="open"&&this.lastWsState!=="open"&&this.replaySubs(),this.lastWsState=i})}outputByTaskId=new Map;event$=new it;subs=new Map;lastWsState="idle";ensureConnected(){this.ws.connect()}subscribeTask(n,t=200){let i=n.trim();if(!i)return;let a=Math.max(0,Math.min(5e3,t|0));this.subs.get(i)!==a&&(this.subs.set(i,a),this.ws.isOpen()&&this.ws.send({op:"sub",topic:"task",taskId:i,tail:a}))}unsubscribeTask(n){let t=n.trim();this.subs.has(t)&&(this.subs.delete(t),this.ws.isOpen()&&this.ws.send({op:"unsub",topic:"task",taskId:t}))}resize(n,t,i){let a=String(n??"").trim();a&&this.ws.isOpen()&&this.ws.send({op:"resize",topic:"task",taskId:a,cols:t,rows:i})}output$(n){return this.ensureOutput(n).asObservable()}events$(){return this.event$.asObservable()}status$(n){return this.runtimeStore.status$(n)}replaySubs(){for(let[n,t]of this.subs.entries())this.ws.send({op:"sub",topic:"task",taskId:n,tail:t})}onMessage(n){let t=n?.op;if(t==="task.output"){let i=n.payload,a=String(i.taskId??"").trim();if(!a)return;this.ensureOutput(a).next(n);return}if(t==="task.event"){let i=n.payload,a=n.type,p=String(i.taskId??"").trim();if(!p)return;this.event$.next(n);let o=this.applyEventToRuntime(a,i);if(o&&this.runtimeStore.setRuntime(o),(a==="exited"||a==="failed")&&setTimeout(()=>this.outputByTaskId.delete(p),300*1e3),a==="failed"){let m=i,w=`[failed] ${m?.error??""}`.trim(),r={runId:m.runId,taskId:p,stream:"stderr",text:w+`
1
+ import{a as X,b as D}from"./chunk-W6TCGG53.js";import{b as bt}from"./chunk-SNCDDYQR.js";import{G as wt,H as J,O as lt,P as dt,l as _t,x as St,y as Tt,z as kt}from"./chunk-PTMJ422K.js";import{d as st}from"./chunk-53YRDYLS.js";import{$b as Q,Ca as ut,Eb as N,Ec as E,Fb as V,Fc as P,Gb as W,Gc as K,Ha as x,Ic as O,Jc as L,Kb as k,Lb as zt,Oa as ot,Vb as z,Vc as vt,Xb as f,Yb as ft,Zb as gt,_b as $,a as c,ac as _,b as h,bc as C,cc as g,dc as A,f as nt,fd as y,gc as ht,gd as yt,hc as j,ic as I,l as it,ma as M,mb as s,na as q,qa as at,r as H,ra as v,rd as Z,s as b,tc as u,uc as B,vb as mt,vc as R,vd as T,wc as rt,xc as Ct,yc as G,z as pt,zc as U}from"./chunk-SJG2JCPL.js";var Dt=["nzType","avatar"];var jt=["*"];function It(e,n){if(e&1&&(C(0,"div",0),A(1,"nz-skeleton-element",4),g()),e&2){let t=u(2);s(),_("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle")}}function Bt(e,n){if(e&1&&A(0,"h3",5),e&2){let t=u(2);E("width",t.toCSSUnit(t.title.width))}}function Rt(e,n){if(e&1&&A(0,"li"),e&2){let t=n.$index,i=u(3);E("width",i.toCSSUnit(i.widthList[t]))}}function Et(e,n){if(e&1&&(C(0,"ul",3),$(1,Rt,1,2,"li",6,gt),g()),e&2){let t=u(2);s(),Q(t.rowsList)}}function Ot(e,n){if(e&1&&(z(0,It,2,2,"div",0),C(1,"div",1),z(2,Bt,1,2,"h3",2),z(3,Et,3,0,"ul",3),g()),e&2){let t=u();f(t.nzAvatar?0:-1),s(2),f(t.nzTitle?2:-1),s(),f(t.nzParagraph?3:-1)}}function Lt(e,n){e&1&&R(0)}var Ft=(()=>{class e{nzActive=!1;nzType;nzBlock=!1;static \u0275fac=function(i){return new(i||e)};static \u0275dir=W({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(i,a){i&2&&P("ant-skeleton-active",a.nzActive)("ant-skeleton-block",a.nzBlock)},inputs:{nzActive:[2,"nzActive","nzActive",T],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",T]}})}return e})();var Ht=(()=>{class e{nzShape="circle";nzSize="default";styleMap={};ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let i=`${this.nzSize}px`;this.styleMap={width:i,height:i,"line-height":i}}else this.styleMap={}}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},features:[ot],attrs:Dt,decls:1,vars:10,consts:[[1,"ant-skeleton-avatar"]],template:function(i,a){i&1&&ht(0,"span",0),i&2&&(K(a.styleMap),P("ant-skeleton-avatar-square",a.nzShape==="square")("ant-skeleton-avatar-circle",a.nzShape==="circle")("ant-skeleton-avatar-lg",a.nzSize==="large")("ant-skeleton-avatar-sm",a.nzSize==="small"))},encapsulation:2,changeDetection:0})}return e})();var xt=(()=>{class e{cdr=v(Z);nzActive=!1;nzLoading=!0;nzRound=!1;nzTitle=!0;nzAvatar=!1;nzParagraph=!0;title;avatar;paragraph;rowsList=[];widthList=[];toCSSUnit(t=""){return _t(t)}getTitleProps(){let t=!!this.nzAvatar,i=!!this.nzParagraph,a="";return!t&&i?a="38%":t&&i&&(a="50%"),c({width:a},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return c({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,i=!!this.nzTitle,a={};return(!t||!i)&&(a.width="61%"),!t&&i?a.rows=3:a.rows=2,c(c({},a),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:i}=this.paragraph,a=[];return t&&Array.isArray(t)?a=t:t&&!Array.isArray(t)&&(a=[],a[i-1]=t),a}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck()}ngOnInit(){this.updateProps()}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(i,a){i&2&&P("ant-skeleton-with-avatar",!!a.nzAvatar)("ant-skeleton-active",a.nzActive)("ant-skeleton-round",a.nzRound)},inputs:{nzActive:[2,"nzActive","nzActive",T],nzLoading:[2,"nzLoading","nzLoading",T],nzRound:[2,"nzRound","nzRound",T],nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],features:[ot],ngContentSelectors:jt,decls:2,vars:1,consts:[[1,"ant-skeleton-header"],[1,"ant-skeleton-content"],[1,"ant-skeleton-title",3,"width"],[1,"ant-skeleton-paragraph"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[3,"width"]],template:function(i,a){i&1&&(B(),z(0,Ot,4,3)(1,Lt,1,0)),i&2&&f(a.nzLoading?0:1)},dependencies:[Ft,Ht],encapsulation:2,changeDetection:0})}return e})(),Nt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=V({type:e});static \u0275inj=q({})}return e})();function Vt(e,n){}function Wt(e,n){if(e&1&&(C(0,"div",0),k(1,Vt,0,0,"ng-template",2),g()),e&2){let t=u();s(),_("ngTemplateOutlet",t.nzAvatar)}}function $t(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzTitle)}}function Qt(e,n){if(e&1&&(C(0,"div",3),k(1,$t,2,1,"ng-container",5),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzTitle)}}function Gt(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzDescription)}}function Ut(e,n){if(e&1&&(C(0,"div",4),k(1,Gt,2,1,"ng-container",5),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzDescription)}}function Kt(e,n){if(e&1&&(C(0,"div",1),z(1,Qt,2,1,"div",3),z(2,Ut,2,1,"div",4),g()),e&2){let t=u();s(),f(t.nzTitle?1:-1),s(),f(t.nzDescription?2:-1)}}var Mt=["*"];function Zt(e,n){e&1&&R(0)}var Jt=()=>({rows:4});function Xt(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzTitle)}}function Yt(e,n){if(e&1&&(C(0,"div",6),k(1,Xt,2,1,"ng-container",9),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzTitle)}}function te(e,n){if(e&1&&(j(0),O(1),I()),e&2){let t=u(3);s(),L(t.nzExtra)}}function ee(e,n){if(e&1&&(C(0,"div",7),k(1,te,2,1,"ng-container",9),g()),e&2){let t=u(2);s(),_("nzStringTemplateOutlet",t.nzExtra)}}function ne(e,n){}function ie(e,n){if(e&1&&k(0,ne,0,0,"ng-template",8),e&2){let t=u(2);_("ngTemplateOutlet",t.listOfNzCardTabComponent.template)}}function ae(e,n){if(e&1&&(C(0,"div",0)(1,"div",5),z(2,Yt,2,1,"div",6),z(3,ee,2,1,"div",7),g(),z(4,ie,1,1,null,8),g()),e&2){let t=u();s(2),f(t.nzTitle?2:-1),s(),f(t.nzExtra?3:-1),s(),f(t.listOfNzCardTabComponent?4:-1)}}function oe(e,n){}function re(e,n){if(e&1&&(C(0,"div",1),k(1,oe,0,0,"ng-template",8),g()),e&2){let t=u();s(),_("ngTemplateOutlet",t.nzCover)}}function se(e,n){e&1&&A(0,"nz-skeleton",3),e&2&&_("nzActive",!0)("nzTitle",!1)("nzParagraph",vt(3,Jt))}function le(e,n){e&1&&R(0)}function de(e,n){}function ce(e,n){if(e&1&&(C(0,"li")(1,"span"),k(2,de,0,0,"ng-template",8),g()()),e&2){let t=n.$implicit,i=u(2);E("width",100/i.nzActions.length,"%"),s(2),_("ngTemplateOutlet",t)}}function pe(e,n){if(e&1&&(C(0,"ul",4),$(1,ce,3,3,"li",10,ft),g()),e&2){let t=u();s(),Q(t.nzActions)}}var ue=(()=>{class e{nzHoverable=!0;static \u0275fac=function(i){return new(i||e)};static \u0275dir=W({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(i,a){i&2&&P("ant-card-hoverable",a.nzHoverable)},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",T]},exportAs:["nzCardGrid"]})}return e})(),me=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],decls:2,vars:2,consts:[[1,"ant-card-meta-avatar"],[1,"ant-card-meta-detail"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-title"],[1,"ant-card-meta-description"],[4,"nzStringTemplateOutlet"]],template:function(i,a){i&1&&(z(0,Wt,2,1,"div",0),z(1,Kt,3,2,"div",1)),i&2&&(f(a.nzAvatar?0:-1),s(),f(a.nzTitle||a.nzDescription?1:-1))},dependencies:[st,dt,lt],encapsulation:2,changeDetection:0})}return e})(),ze=(()=>{class e{template;static \u0275fac=function(i){return new(i||e)};static \u0275cmp=N({type:e,selectors:[["nz-card-tab"]],viewQuery:function(i,a){if(i&1&&Ct(mt,7),i&2){let p;G(p=U())&&(a.template=p.first)}},exportAs:["nzCardTab"],ngContentSelectors:Mt,decls:1,vars:0,template:function(i,a){i&1&&(B(),zt(0,Zt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return e})(),Pt="card",fe=(()=>{var r;let e,n=[],t=[],i,a=[],p=[],o,m=[],w=[];return r=class{cdr=v(Z);directionality=v(St);destroyRef=v(ut);_nzModuleName=Pt;nzBordered=b(this,n,!0);nzLoading=(b(this,t),!1);nzHoverable=b(this,a,!1);nzBodyStyle=(b(this,p),null);nzCover;nzActions=[];nzType=null;nzSize=b(this,m,"default");nzTitle=b(this,w);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;dir="ltr";constructor(){wt(Pt,()=>this.cdr.markForCheck())}ngOnInit(){this.directionality.change?.pipe(kt(this.destroyRef)).subscribe(S=>{this.dir=S,this.cdr.detectChanges()}),this.dir=this.directionality.value}},(()=>{let S=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[J()],i=[J()],o=[J()],H(null,null,e,{kind:"field",name:"nzBordered",static:!1,private:!1,access:{has:l=>"nzBordered"in l,get:l=>l.nzBordered,set:(l,d)=>{l.nzBordered=d}},metadata:S},n,t),H(null,null,i,{kind:"field",name:"nzHoverable",static:!1,private:!1,access:{has:l=>"nzHoverable"in l,get:l=>l.nzHoverable,set:(l,d)=>{l.nzHoverable=d}},metadata:S},a,p),H(null,null,o,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:l=>"nzSize"in l,get:l=>l.nzSize,set:(l,d)=>{l.nzSize=d}},metadata:S},m,w),S&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:S})})(),nt(r,"\u0275fac",function(l){return new(l||r)}),nt(r,"\u0275cmp",N({type:r,selectors:[["nz-card"]],contentQueries:function(l,d,ct){if(l&1&&(rt(ct,ze,5),rt(ct,ue,4)),l&2){let F;G(F=U())&&(d.listOfNzCardTabComponent=F.first),G(F=U())&&(d.listOfNzCardGridDirective=F)}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(l,d){l&2&&P("ant-card-loading",d.nzLoading)("ant-card-bordered",d.nzBordered)("ant-card-hoverable",d.nzHoverable)("ant-card-small",d.nzSize==="small")("ant-card-contain-grid",d.listOfNzCardGridDirective&&d.listOfNzCardGridDirective.length)("ant-card-type-inner",d.nzType==="inner")("ant-card-contain-tabs",!!d.listOfNzCardTabComponent)("ant-card-rtl",d.dir==="rtl")},inputs:{nzBordered:[2,"nzBordered","nzBordered",T],nzLoading:[2,"nzLoading","nzLoading",T],nzHoverable:[2,"nzHoverable","nzHoverable",T],nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:Mt,decls:6,vars:6,consts:[[1,"ant-card-head"],[1,"ant-card-cover"],[1,"ant-card-body"],[3,"nzActive","nzTitle","nzParagraph"],[1,"ant-card-actions"],[1,"ant-card-head-wrapper"],[1,"ant-card-head-title"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[4,"nzStringTemplateOutlet"],[3,"width"]],template:function(l,d){l&1&&(B(),z(0,ae,5,3,"div",0),z(1,re,2,1,"div",1),C(2,"div",2),z(3,se,1,4,"nz-skeleton",3)(4,le,1,0),g(),z(5,pe,3,0,"ul",4)),l&2&&(f(d.nzTitle||d.nzExtra||d.listOfNzCardTabComponent?0:-1),s(),f(d.nzCover?1:-1),s(),K(d.nzBodyStyle),s(),f(d.nzLoading?3:4),s(2),f(d.nzActions.length?5:-1))},dependencies:[dt,lt,st,Nt,xt],encapsulation:2,changeDetection:0})),r})(),Qe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=V({type:e});static \u0275inj=q({imports:[fe,me,Tt]})}return e})();var tt=class e{constructor(n,t){this.ws=n;this.runtimeStore=t;this.ws.messages().subscribe(i=>this.onMessage(i)),this.ws.stateChanges().subscribe(i=>{i==="open"&&this.lastWsState!=="open"&&this.replaySubs(),this.lastWsState=i})}outputByTaskId=new Map;event$=new it;subs=new Map;lastWsState="idle";ensureConnected(){this.ws.connect()}subscribeTask(n,t=200){let i=n.trim();if(!i)return;let a=Math.max(0,Math.min(5e3,t|0));this.subs.get(i)!==a&&(this.subs.set(i,a),this.ws.isOpen()&&this.ws.send({op:"sub",topic:"task",taskId:i,tail:a}))}unsubscribeTask(n){let t=n.trim();this.subs.has(t)&&(this.subs.delete(t),this.ws.isOpen()&&this.ws.send({op:"unsub",topic:"task",taskId:t}))}resize(n,t,i){let a=String(n??"").trim();a&&this.ws.isOpen()&&this.ws.send({op:"resize",topic:"task",taskId:a,cols:t,rows:i})}output$(n){return this.ensureOutput(n).asObservable()}events$(){return this.event$.asObservable()}status$(n){return this.runtimeStore.status$(n)}replaySubs(){for(let[n,t]of this.subs.entries())this.ws.send({op:"sub",topic:"task",taskId:n,tail:t})}onMessage(n){let t=n?.op;if(t==="task.output"){let i=n.payload,a=String(i.taskId??"").trim();if(!a)return;this.ensureOutput(a).next(n);return}if(t==="task.event"){let i=n.payload,a=n.type,p=String(i.taskId??"").trim();if(!p)return;this.event$.next(n);let o=this.applyEventToRuntime(a,i);if(o&&this.runtimeStore.setRuntime(o),(a==="exited"||a==="failed")&&setTimeout(()=>this.outputByTaskId.delete(p),300*1e3),a==="failed"){let m=i,w=`[failed] ${m?.error??""}`.trim(),r={runId:m.runId,taskId:p,stream:"stderr",text:w+`
2
2
  `};this.ensureOutput(p).next({op:"task.output",payload:r,ts:n.ts})}}}ensureOutput(n){let t=String(n??"").trim();return this.outputByTaskId.has(t)||this.outputByTaskId.set(t,new it),this.outputByTaskId.get(t)}applyEventToRuntime(n,t){let i=String(t?.taskId??"").trim(),a=String(t?.runId??"").trim();if(!i||!a)return null;let p=this.runtimeStore.runtimeSignal(i)(),o=p&&p.runId===a?c({},p):{taskId:i,runId:a,projectId:String(t?.projectId??p?.projectId??"").trim(),status:"idle"};switch(n){case"snapshot":let m=t;return o.projectId=String(m?.projectId??o.projectId??"").trim(),o.status=m.status,o.startedAt=m.startedAt,o.stoppedAt=m.stoppedAt,o.pid=m.pid,o.exitCode=m.exitCode,o.signal=m.signal,o;case"started":return o.projectId=String(t?.projectId??o.projectId??"").trim(),o.status="running",o.pid=t?.pid??o.pid,o.startedAt=t?.startedAt??o.startedAt??Date.now(),o.stoppedAt=void 0,o.exitCode=void 0,o.signal=void 0,o;case"stopRequested":return o.status="stopping",o;case"exited":return o.status="stopped",o.exitCode=t?.exitCode??null,o.signal=t?.signal??null,o.stoppedAt=t?.stoppedAt??Date.now(),o;case"failed":return o.status="failed",o.stoppedAt=o.stoppedAt??Date.now(),o.exitCode=o.exitCode??null,o.signal=o.signal??null,o;default:return null}}static \u0275fac=function(t){return new(t||e)(at(bt),at(D))};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};var et=class e{api=v(X);runtimeStore=v(D);state=x({rowsByProject:{},loadingByProject:{},loadedAtByProject:{}});rowsOf(n){let t=(n??"").trim();return y(()=>this.state().rowsByProject[t]??[])}isLoading(n){let t=(n??"").trim();return y(()=>!!this.state().loadingByProject[t])}isLoaded(n){let t=(n??"").trim();return y(()=>this.state().loadedAtByProject[t]!=null)}async ensureLoaded(n,t){let i=(n??"").trim();if(!i)return;let a=this.state(),p=a.loadedAtByProject[i]!=null,o=!!a.loadingByProject[i];if(!(!t?.force&&(p||o))){this.state.update(m=>h(c({},m),{loadingByProject:h(c({},m.loadingByProject),{[i]:!0})}));try{let w=(await pt(this.api.getViews(i))??[]).map(r=>({spec:r.spec,runtime:r.runtime?{taskId:r.runtime.taskId,projectId:r.runtime.projectId,runId:r.runtime.runId,status:r.runtime.status,pid:r.runtime.pid,startedAt:r.runtime.startedAt,stoppedAt:r.runtime.stoppedAt,exitCode:r.runtime.exitCode,signal:r.runtime.signal}:void 0}));for(let r of w)r.runtime&&this.runtimeStore.setRuntime(r.runtime);this.state.update(r=>h(c({},r),{rowsByProject:h(c({},r.rowsByProject),{[i]:w}),loadedAtByProject:h(c({},r.loadedAtByProject),{[i]:Date.now()})}))}finally{this.state.update(m=>h(c({},m),{loadingByProject:h(c({},m.loadingByProject),{[i]:!1})}))}}}setRows(n,t){let i=(n??"").trim();if(i){for(let a of t??[])a.runtime&&this.runtimeStore.setRuntime(a.runtime);this.state.update(a=>h(c({},a),{rowsByProject:h(c({},a.rowsByProject),{[i]:t??[]}),loadedAtByProject:h(c({},a.loadedAtByProject),{[i]:Date.now()})}))}}clear(n){let t=(n??"").trim();t&&this.state.update(i=>{let a=c({},i.rowsByProject),p=c({},i.loadingByProject),o=c({},i.loadedAtByProject);return delete a[t],delete p[t],delete o[t],{rowsByProject:a,loadingByProject:p,loadedAtByProject:o}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};var At=class e{api=v(X);stream=v(tt);runtimeStore=v(D);catalog=v(et);projectId=x("");keyword=x("");loading=x(!1);selectedTaskId=x("");rows=y(()=>{let n=this.projectId();return n?this.catalog.rowsOf(n)():[]});rowsView=y(()=>this.rows().map(t=>{let i=t.spec.id,a=this.getRuntimeSignal(i);return h(c({},t),{runtime:a??t.runtime})}));rowsViewFiltered=y(()=>{let n=this.keyword().trim().toLowerCase(),t=this.rowsView();return n?t.filter(i=>i.spec.name?.toLowerCase().includes(n)):t});selectedRow=y(()=>{let n=this.selectedTaskId();return this.rowsView().find(t=>t.spec.id===n)??null});selectedRuntimeStatus=y(()=>{let n=this.selectedTaskId();return n?this.getRuntime(n):{status:"idle"}});isRunning=y(()=>this.selectedRuntimeStatus().status==="running");isStopping=y(()=>this.selectedRuntimeStatus().status==="stopping");isStopped=y(()=>{let n=this.selectedRuntimeStatus().status;return n==="idle"||n==="stopped"||n==="failed"||n==="success"});constructor(){yt(n=>{let t=this.selectedTaskId();if(!t)return;this.stream.ensureConnected(),this.stream.subscribeTask(t,200);let i=this.runtimeStore.status$(t).subscribe();n(()=>{i.unsubscribe(),this.stream.unsubscribeTask(t)})})}getRuntime(n){return this.runtimeStore.statusSignal(n)()}getRuntimeSignal(n){return this.runtimeStore.runtimeSignal(n)()}async setProject(n){let t=n?.trim();if(!t||this.projectId()===t)return;this.projectId.set(t),this.selectedTaskId.set(""),this.keyword.set(""),await this.catalog.ensureLoaded(t);let i=this.rows()[0];i&&this.select(i.spec.id)}refresh(){let n=this.projectId();n&&(this.loading.set(!0),this.api.refresh(n).subscribe({next:t=>{this.catalog.setRows(n,t??[]),this.loading.set(!1)},error:t=>{this.loading.set(!1)}}))}select(n){this.selectedTaskId.set(n)}toggleTask(){this.isRunning()?this.stopSelected():this.isStopped()&&this.startSelected()}startSelected(n){n=n?.trim()||this.selectedRow()?.spec?.id,n&&this.api.start(n).subscribe()}stopSelected(n){if(n=n?.trim()||this.selectedTaskId(),!n)return;let t=this.getRuntimeSignal(n);t&&this.runtimeStore.setRuntime(h(c({},t),{status:"stopping"})),this.api.stop(n).subscribe({next:()=>{},error:()=>{t&&t.status==="running"&&this.runtimeStore.setRuntime(t)}})}rowsViewOf(n){return y(()=>{let t=n?.trim();return t?this.catalog.rowsOf(t)().map(a=>{let p=a.spec.id,o=this.getRuntime(p);return h(c({},a),{runtime:h(c({},a.runtime??{}),{status:o.status})})}):[]})}ensureProjectLoaded(n){return this.catalog.ensureLoaded(n)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};export{fe as a,Qe as b,tt as c,At as d};
@@ -1 +1 @@
1
- import{g as it}from"./chunk-FPDGZ3ZC.js";import{F as ot,H as V,O as H,Oa as G,P as L,Pa as U,x as et}from"./chunk-PTMJ422K.js";import{o as Z}from"./chunk-53YRDYLS.js";import{$b as j,Eb as k,Ec as y,Fb as Q,Fc as v,Gc as $,Ha as S,Hc as N,Ic as T,Jc as E,Kb as w,Kc as W,Oa as O,Tb as X,Vb as h,Xb as b,Zb as M,_b as P,a as q,ac as z,bc as d,cc as g,dc as x,f as D,hc as A,ic as B,m as J,ma as _,mb as p,mc as tt,na as K,r as R,ra as m,s as C,tc as u,uc as I,vc as F,vd as f,wd as nt}from"./chunk-SJG2JCPL.js";var at=class e{api=m(it);refresh(n){return this.api.post(`/api/tasks/refresh/${n}`,{})}getViews(n){return this.api.get(`/api/tasks/list/${n}`)}getStatus(n){return this.api.get(`/api/tasks/status/${n}`)}start(n){return this.api.post("/api/tasks/start",{taskId:n})}stop(n){return this.api.post("/api/tasks/stop",{taskId:n})}active(){return this.api.get("/api/tasks/active")}getRunLog(n,t=200){let i=new Z().set("tail",t.toString());return this.api.get(`/api/tasks/log/run/${n}`,i)}getSyslog(n=200){let t=new Z().set("tail",n.toString());return this.api.get("/api/tasks/syslog",t)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})};var rt=class e{statusByTask=new Map;sigByTask=new Map;runtimeByTask=new Map;runningCountByProject=new Map;totalRunningCount=S(0);totalRunningCountSignal(){return this.totalRunningCount}setRuntime(n){let t=this.norm(n.taskId),i=this.norm(n.projectId);if(!t||!i)return;let o=this.ensureTaskSignal(t)(),c=this.isBusy(o.status),r=this.isBusy(n.status),Y=this.toStatus(n);if(this.ensureTaskSubject(t).next(Y),this.ensureTaskSignal(t).set(Y),this.ensureRuntimeSignal(t).set(n),c!==r){let l=this.ensureProjectCount(i),a=l();l.set(c?Math.max(0,a-1):a+1);let s=this.totalRunningCount();this.totalRunningCount.set(c?Math.max(0,s-1):s+1)}}status$(n){return this.ensureTaskSubject(n).asObservable()}statusSignal(n){return this.ensureTaskSignal(n)}runtimeSignal(n){return this.ensureRuntimeSignal(n)}hasRunning(n){return this.ensureProjectCount(n)()>0}runningCountSignal(n){return this.ensureProjectCount(n)}snapshot(n){return this.ensureTaskSignal(n)()}toStatus(n){switch(n.status){case"idle":return{status:"idle"};case"running":return{status:"running",pid:n.pid,startedAt:n.startedAt};case"stopping":return{status:"stopping"};case"failed":return{status:"failed",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};case"success":return{status:"success",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};case"stopped":return{status:"stopped",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};default:return{status:"idle"}}}isBusy(n){return n==="running"||n==="stopping"}norm(n){return(n??"").trim()}ensureTaskSubject(n){let t=this.norm(n);return this.statusByTask.has(t)||this.statusByTask.set(t,new J({status:"idle"})),this.statusByTask.get(t)}ensureTaskSignal(n){let t=this.norm(n);return this.sigByTask.has(t)||this.sigByTask.set(t,S({status:"idle"})),this.sigByTask.get(t)}ensureProjectCount(n){let t=this.norm(n);return this.runningCountByProject.has(t)||this.runningCountByProject.set(t,S(0)),this.runningCountByProject.get(t)}ensureRuntimeSignal(n){let t=this.norm(n);return this.runtimeByTask.has(t)||this.runtimeByTask.set(t,S(void 0)),this.runtimeByTask.get(t)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})};function zt(e,n){if(e&1&&(d(0,"p",3),T(1),g()),e&2){let t=n.$implicit,i=u(2).$index,o=u(2);v("current",t===o.countArray[i]),p(),W(" ",t," ")}}function dt(e,n){if(e&1&&P(0,zt,2,3,"p",2,M),e&2){let t=u(3);j(t.countSingleArray)}}function gt(e,n){if(e&1&&(d(0,"span",1),h(1,dt,2,0),g()),e&2){let t=n.$index,i=u(2);y("transform","translateY("+-i.countArray[t]*100+"%)"),z("nzNoAnimation",i.noAnimation),p(),b(!i.nzDot&&i.countArray[t]!==void 0?1:-1)}}function ft(e,n){if(e&1&&P(0,gt,2,4,"span",0,M),e&2){let t=u();j(t.maxNumberArray)}}function Ct(e,n){if(e&1&&T(0),e&2){let t=u();W(" ",t.nzOverflowCount,"+ ")}}var lt=["*"];function St(e,n){if(e&1&&(A(0),T(1),B()),e&2){let t=u(2);p(),E(t.nzText)}}function ht(e,n){if(e&1&&(x(0,"span",1),d(1,"span",2),w(2,St,2,1,"ng-container",0),g()),e&2){let t=u();$(t.mergedStyle),N((t.nzStatus||t.presetColor)&&"ant-badge-status-"+(t.nzStatus||t.presetColor)),p(2),z("nzStringTemplateOutlet",t.nzText)}}function bt(e,n){if(e&1&&x(0,"nz-badge-sup",3),e&2){let t=u(2);z("isPresetColor",t.nzStatus||t.presetColor)("nzColor",t.nzStatus||t.presetColor||t.nzColor)("nzOffset",t.nzOffset)("nzSize",t.nzSize)("nzTitle",t.nzTitle)("nzStyle",t.mergedStyle)("nzDot",t.nzDot)("nzCount",t.nzCount)("nzOverflowCount",t.nzOverflowCount)("disableAnimation",!!(t.nzStandalone||t.nzStatus||t.presetColor||t.noAnimation!=null&&t.noAnimation.nzNoAnimation))("noAnimation",!!(t.noAnimation!=null&&t.noAnimation.nzNoAnimation))}}function yt(e,n){if(e&1&&(A(0),h(1,bt,1,11,"nz-badge-sup",3),B()),e&2){let t=u();p(),b(t.showSup?1:-1)}}function vt(e,n){if(e&1&&(A(0),d(1,"span",3),T(2),g(),B()),e&2){let t=u();p(2),E(t.nzText)}}var Tt=(()=>{class e{nzOffset;nzTitle;nzStyle=null;nzDot=!1;nzOverflowCount=99;disableAnimation=!1;nzCount;noAnimation=!1;nzSize="default";isPresetColor=!1;nzColor;maxNumberArray=[];countArray=[];count=0;countSingleArray=[0,1,2,3,4,5,6,7,8,9];generateMaxNumberArray(){this.maxNumberArray=this.nzOverflowCount.toString().split("").map((t,i)=>`${t}-${i}`)}ngOnInit(){this.generateMaxNumberArray()}ngOnChanges(t){let{nzOverflowCount:i,nzCount:o}=t;o&&typeof o.currentValue=="number"&&(this.count=Math.max(0,o.currentValue),this.countArray=this.count.toString().split("").map(c=>+c)),i&&this.generateMaxNumberArray()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["nz-badge-sup"]],hostAttrs:[1,"ant-scroll-number"],hostVars:19,hostBindings:function(i,o){i&2&&(tt("@.disabled",o.disableAnimation)("@zoomBadgeMotion",void 0),X("title",o.nzTitle===null?"":o.nzTitle||o.nzCount),$(o.nzStyle),N(o.isPresetColor?"ant-badge-status-"+o.nzColor:""),y("right",o.nzOffset&&o.nzOffset[0]?-o.nzOffset[0]:null,"px")("margin-top",o.nzOffset&&o.nzOffset[1]?o.nzOffset[1]:null,"px"),v("ant-badge-count",!o.nzDot)("ant-badge-count-sm",o.nzSize==="small")("ant-badge-dot",o.nzDot)("ant-badge-multiple-words",o.countArray.length>=2))},inputs:{nzOffset:"nzOffset",nzTitle:"nzTitle",nzStyle:"nzStyle",nzDot:"nzDot",nzOverflowCount:[2,"nzOverflowCount","nzOverflowCount",nt],disableAnimation:"disableAnimation",nzCount:"nzCount",noAnimation:"noAnimation",nzSize:"nzSize",isPresetColor:[2,"isPresetColor","isPresetColor",f],nzColor:"nzColor"},exportAs:["nzBadgeSup"],features:[O],decls:2,vars:1,consts:[[1,"ant-scroll-number-only",3,"nzNoAnimation","transform"],[1,"ant-scroll-number-only",3,"nzNoAnimation"],[1,"ant-scroll-number-only-unit",3,"current"],[1,"ant-scroll-number-only-unit"]],template:function(i,o){i&1&&h(0,ft,2,0)(1,Ct,1,1),i&2&&b(o.count<=o.nzOverflowCount?0:1)},dependencies:[U],encapsulation:2,data:{animation:[G]},changeDetection:0})}return e})(),ut=["pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"],_t="badge",Ot=(()=>{var r;let e,n=[],t=[],i,o=[],c=[];return r=class{nzConfigService=m(ot);dir=m(et).valueSignal;noAnimation=m(U,{host:!0,optional:!0});_nzModuleName=_t;showSup=!1;presetColor=null;nzShowZero=!1;nzShowDot=!0;nzStandalone=!1;nzDot=!1;nzOverflowCount=C(this,n,99);nzColor=(C(this,t),C(this,o,void 0));nzStyle=(C(this,c),null);nzText=null;nzTitle;nzStatus;nzCount;nzOffset;nzSize="default";get mergedStyle(){return q({backgroundColor:!this.presetColor&&this.nzColor},this.nzStyle??{})}ngOnChanges(l){let{nzColor:a,nzShowDot:s,nzDot:pt,nzCount:ct,nzShowZero:mt}=l;a&&(this.presetColor=this.nzColor&&ut.indexOf(this.nzColor)!==-1?this.nzColor:null),(s||pt||ct||mt)&&(this.showSup=this.nzShowDot&&this.nzDot||typeof this.nzCount=="number"&&(this.nzCount>0||this.nzShowZero))}},(()=>{let l=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[V()],i=[V()],R(null,null,e,{kind:"field",name:"nzOverflowCount",static:!1,private:!1,access:{has:a=>"nzOverflowCount"in a,get:a=>a.nzOverflowCount,set:(a,s)=>{a.nzOverflowCount=s}},metadata:l},n,t),R(null,null,i,{kind:"field",name:"nzColor",static:!1,private:!1,access:{has:a=>"nzColor"in a,get:a=>a.nzColor,set:(a,s)=>{a.nzColor=s}},metadata:l},o,c),l&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),D(r,"\u0275fac",function(a){return new(a||r)}),D(r,"\u0275cmp",k({type:r,selectors:[["nz-badge"]],hostAttrs:[1,"ant-badge"],hostVars:6,hostBindings:function(a,s){a&2&&v("ant-badge-status",s.nzStatus)("ant-badge-not-a-wrapper",!!(s.nzStandalone||(s.nzStatus||s.nzColor)&&!s.showSup&&!s.nzCount))("ant-badge-rtl",s.dir()==="rtl")},inputs:{nzShowZero:[2,"nzShowZero","nzShowZero",f],nzShowDot:[2,"nzShowDot","nzShowDot",f],nzStandalone:[2,"nzStandalone","nzStandalone",f],nzDot:[2,"nzDot","nzDot",f],nzOverflowCount:"nzOverflowCount",nzColor:"nzColor",nzStyle:"nzStyle",nzText:"nzText",nzTitle:"nzTitle",nzStatus:"nzStatus",nzCount:"nzCount",nzOffset:"nzOffset",nzSize:"nzSize"},exportAs:["nzBadge"],features:[O],ngContentSelectors:lt,decls:3,vars:2,consts:[[4,"nzStringTemplateOutlet"],[1,"ant-badge-status-dot"],[1,"ant-badge-status-text"],[3,"isPresetColor","nzColor","nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzCount","nzOverflowCount","disableAnimation","noAnimation"]],template:function(a,s){a&1&&(I(),h(0,ht,3,5),F(1),w(2,yt,2,1,"ng-container",0)),a&2&&(b((s.nzStatus||s.nzColor)&&!s.showSup&&!s.nzCount?0:-1),p(2),z("nzStringTemplateOutlet",s.nzCount))},dependencies:[Tt,L,H],encapsulation:2,data:{animation:[G]},changeDetection:0})),r})(),kt=(()=>{class e{nzColor;nzPlacement="end";nzText=null;presetColor=null;ngOnChanges(t){let{nzColor:i}=t;i&&(this.presetColor=this.nzColor&&ut.indexOf(this.nzColor)!==-1?this.nzColor:null)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["nz-ribbon"]],hostAttrs:[1,"ant-ribbon-wrapper"],inputs:{nzColor:"nzColor",nzPlacement:"nzPlacement",nzText:"nzText"},exportAs:["nzRibbon"],features:[O],ngContentSelectors:lt,decls:4,vars:11,consts:[[1,"ant-ribbon"],[4,"nzStringTemplateOutlet"],[1,"ant-ribbon-corner"],[1,"ant-ribbon-text"]],template:function(i,o){i&1&&(I(),F(0),d(1,"div",0),w(2,vt,3,1,"ng-container",1),x(3,"div",2),g()),i&2&&(p(),N(o.presetColor&&"ant-ribbon-color-"+o.presetColor),y("background-color",!o.presetColor&&o.nzColor),v("ant-ribbon-placement-end",o.nzPlacement==="end")("ant-ribbon-placement-start",o.nzPlacement==="start"),p(),z("nzStringTemplateOutlet",o.nzText),p(),y("color",!o.presetColor&&o.nzColor))},dependencies:[L,H],encapsulation:2,changeDetection:0})}return e})(),Kt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Q({type:e});static \u0275inj=K({imports:[Ot,kt]})}return e})();export{at as a,rt as b,Ot as c,Kt as d};
1
+ import{g as it}from"./chunk-EP45FT55.js";import{F as ot,H as V,O as H,Oa as G,P as L,Pa as U,x as et}from"./chunk-PTMJ422K.js";import{o as Z}from"./chunk-53YRDYLS.js";import{$b as j,Eb as k,Ec as y,Fb as Q,Fc as v,Gc as $,Ha as S,Hc as N,Ic as T,Jc as E,Kb as w,Kc as W,Oa as O,Tb as X,Vb as h,Xb as b,Zb as M,_b as P,a as q,ac as z,bc as d,cc as g,dc as x,f as D,hc as A,ic as B,m as J,ma as _,mb as p,mc as tt,na as K,r as R,ra as m,s as C,tc as u,uc as I,vc as F,vd as f,wd as nt}from"./chunk-SJG2JCPL.js";var at=class e{api=m(it);refresh(n){return this.api.post(`/api/tasks/refresh/${n}`,{})}getViews(n){return this.api.get(`/api/tasks/list/${n}`)}getStatus(n){return this.api.get(`/api/tasks/status/${n}`)}start(n){return this.api.post("/api/tasks/start",{taskId:n})}stop(n){return this.api.post("/api/tasks/stop",{taskId:n})}active(){return this.api.get("/api/tasks/active")}getRunLog(n,t=200){let i=new Z().set("tail",t.toString());return this.api.get(`/api/tasks/log/run/${n}`,i)}getSyslog(n=200){let t=new Z().set("tail",n.toString());return this.api.get("/api/tasks/syslog",t)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})};var rt=class e{statusByTask=new Map;sigByTask=new Map;runtimeByTask=new Map;runningCountByProject=new Map;totalRunningCount=S(0);totalRunningCountSignal(){return this.totalRunningCount}setRuntime(n){let t=this.norm(n.taskId),i=this.norm(n.projectId);if(!t||!i)return;let o=this.ensureTaskSignal(t)(),c=this.isBusy(o.status),r=this.isBusy(n.status),Y=this.toStatus(n);if(this.ensureTaskSubject(t).next(Y),this.ensureTaskSignal(t).set(Y),this.ensureRuntimeSignal(t).set(n),c!==r){let l=this.ensureProjectCount(i),a=l();l.set(c?Math.max(0,a-1):a+1);let s=this.totalRunningCount();this.totalRunningCount.set(c?Math.max(0,s-1):s+1)}}status$(n){return this.ensureTaskSubject(n).asObservable()}statusSignal(n){return this.ensureTaskSignal(n)}runtimeSignal(n){return this.ensureRuntimeSignal(n)}hasRunning(n){return this.ensureProjectCount(n)()>0}runningCountSignal(n){return this.ensureProjectCount(n)}snapshot(n){return this.ensureTaskSignal(n)()}toStatus(n){switch(n.status){case"idle":return{status:"idle"};case"running":return{status:"running",pid:n.pid,startedAt:n.startedAt};case"stopping":return{status:"stopping"};case"failed":return{status:"failed",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};case"success":return{status:"success",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};case"stopped":return{status:"stopped",exitCode:n.exitCode??null,signal:n.signal??null,stoppedAt:n.stoppedAt};default:return{status:"idle"}}}isBusy(n){return n==="running"||n==="stopping"}norm(n){return(n??"").trim()}ensureTaskSubject(n){let t=this.norm(n);return this.statusByTask.has(t)||this.statusByTask.set(t,new J({status:"idle"})),this.statusByTask.get(t)}ensureTaskSignal(n){let t=this.norm(n);return this.sigByTask.has(t)||this.sigByTask.set(t,S({status:"idle"})),this.sigByTask.get(t)}ensureProjectCount(n){let t=this.norm(n);return this.runningCountByProject.has(t)||this.runningCountByProject.set(t,S(0)),this.runningCountByProject.get(t)}ensureRuntimeSignal(n){let t=this.norm(n);return this.runtimeByTask.has(t)||this.runtimeByTask.set(t,S(void 0)),this.runtimeByTask.get(t)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=_({token:e,factory:e.\u0275fac,providedIn:"root"})};function zt(e,n){if(e&1&&(d(0,"p",3),T(1),g()),e&2){let t=n.$implicit,i=u(2).$index,o=u(2);v("current",t===o.countArray[i]),p(),W(" ",t," ")}}function dt(e,n){if(e&1&&P(0,zt,2,3,"p",2,M),e&2){let t=u(3);j(t.countSingleArray)}}function gt(e,n){if(e&1&&(d(0,"span",1),h(1,dt,2,0),g()),e&2){let t=n.$index,i=u(2);y("transform","translateY("+-i.countArray[t]*100+"%)"),z("nzNoAnimation",i.noAnimation),p(),b(!i.nzDot&&i.countArray[t]!==void 0?1:-1)}}function ft(e,n){if(e&1&&P(0,gt,2,4,"span",0,M),e&2){let t=u();j(t.maxNumberArray)}}function Ct(e,n){if(e&1&&T(0),e&2){let t=u();W(" ",t.nzOverflowCount,"+ ")}}var lt=["*"];function St(e,n){if(e&1&&(A(0),T(1),B()),e&2){let t=u(2);p(),E(t.nzText)}}function ht(e,n){if(e&1&&(x(0,"span",1),d(1,"span",2),w(2,St,2,1,"ng-container",0),g()),e&2){let t=u();$(t.mergedStyle),N((t.nzStatus||t.presetColor)&&"ant-badge-status-"+(t.nzStatus||t.presetColor)),p(2),z("nzStringTemplateOutlet",t.nzText)}}function bt(e,n){if(e&1&&x(0,"nz-badge-sup",3),e&2){let t=u(2);z("isPresetColor",t.nzStatus||t.presetColor)("nzColor",t.nzStatus||t.presetColor||t.nzColor)("nzOffset",t.nzOffset)("nzSize",t.nzSize)("nzTitle",t.nzTitle)("nzStyle",t.mergedStyle)("nzDot",t.nzDot)("nzCount",t.nzCount)("nzOverflowCount",t.nzOverflowCount)("disableAnimation",!!(t.nzStandalone||t.nzStatus||t.presetColor||t.noAnimation!=null&&t.noAnimation.nzNoAnimation))("noAnimation",!!(t.noAnimation!=null&&t.noAnimation.nzNoAnimation))}}function yt(e,n){if(e&1&&(A(0),h(1,bt,1,11,"nz-badge-sup",3),B()),e&2){let t=u();p(),b(t.showSup?1:-1)}}function vt(e,n){if(e&1&&(A(0),d(1,"span",3),T(2),g(),B()),e&2){let t=u();p(2),E(t.nzText)}}var Tt=(()=>{class e{nzOffset;nzTitle;nzStyle=null;nzDot=!1;nzOverflowCount=99;disableAnimation=!1;nzCount;noAnimation=!1;nzSize="default";isPresetColor=!1;nzColor;maxNumberArray=[];countArray=[];count=0;countSingleArray=[0,1,2,3,4,5,6,7,8,9];generateMaxNumberArray(){this.maxNumberArray=this.nzOverflowCount.toString().split("").map((t,i)=>`${t}-${i}`)}ngOnInit(){this.generateMaxNumberArray()}ngOnChanges(t){let{nzOverflowCount:i,nzCount:o}=t;o&&typeof o.currentValue=="number"&&(this.count=Math.max(0,o.currentValue),this.countArray=this.count.toString().split("").map(c=>+c)),i&&this.generateMaxNumberArray()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["nz-badge-sup"]],hostAttrs:[1,"ant-scroll-number"],hostVars:19,hostBindings:function(i,o){i&2&&(tt("@.disabled",o.disableAnimation)("@zoomBadgeMotion",void 0),X("title",o.nzTitle===null?"":o.nzTitle||o.nzCount),$(o.nzStyle),N(o.isPresetColor?"ant-badge-status-"+o.nzColor:""),y("right",o.nzOffset&&o.nzOffset[0]?-o.nzOffset[0]:null,"px")("margin-top",o.nzOffset&&o.nzOffset[1]?o.nzOffset[1]:null,"px"),v("ant-badge-count",!o.nzDot)("ant-badge-count-sm",o.nzSize==="small")("ant-badge-dot",o.nzDot)("ant-badge-multiple-words",o.countArray.length>=2))},inputs:{nzOffset:"nzOffset",nzTitle:"nzTitle",nzStyle:"nzStyle",nzDot:"nzDot",nzOverflowCount:[2,"nzOverflowCount","nzOverflowCount",nt],disableAnimation:"disableAnimation",nzCount:"nzCount",noAnimation:"noAnimation",nzSize:"nzSize",isPresetColor:[2,"isPresetColor","isPresetColor",f],nzColor:"nzColor"},exportAs:["nzBadgeSup"],features:[O],decls:2,vars:1,consts:[[1,"ant-scroll-number-only",3,"nzNoAnimation","transform"],[1,"ant-scroll-number-only",3,"nzNoAnimation"],[1,"ant-scroll-number-only-unit",3,"current"],[1,"ant-scroll-number-only-unit"]],template:function(i,o){i&1&&h(0,ft,2,0)(1,Ct,1,1),i&2&&b(o.count<=o.nzOverflowCount?0:1)},dependencies:[U],encapsulation:2,data:{animation:[G]},changeDetection:0})}return e})(),ut=["pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"],_t="badge",Ot=(()=>{var r;let e,n=[],t=[],i,o=[],c=[];return r=class{nzConfigService=m(ot);dir=m(et).valueSignal;noAnimation=m(U,{host:!0,optional:!0});_nzModuleName=_t;showSup=!1;presetColor=null;nzShowZero=!1;nzShowDot=!0;nzStandalone=!1;nzDot=!1;nzOverflowCount=C(this,n,99);nzColor=(C(this,t),C(this,o,void 0));nzStyle=(C(this,c),null);nzText=null;nzTitle;nzStatus;nzCount;nzOffset;nzSize="default";get mergedStyle(){return q({backgroundColor:!this.presetColor&&this.nzColor},this.nzStyle??{})}ngOnChanges(l){let{nzColor:a,nzShowDot:s,nzDot:pt,nzCount:ct,nzShowZero:mt}=l;a&&(this.presetColor=this.nzColor&&ut.indexOf(this.nzColor)!==-1?this.nzColor:null),(s||pt||ct||mt)&&(this.showSup=this.nzShowDot&&this.nzDot||typeof this.nzCount=="number"&&(this.nzCount>0||this.nzShowZero))}},(()=>{let l=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[V()],i=[V()],R(null,null,e,{kind:"field",name:"nzOverflowCount",static:!1,private:!1,access:{has:a=>"nzOverflowCount"in a,get:a=>a.nzOverflowCount,set:(a,s)=>{a.nzOverflowCount=s}},metadata:l},n,t),R(null,null,i,{kind:"field",name:"nzColor",static:!1,private:!1,access:{has:a=>"nzColor"in a,get:a=>a.nzColor,set:(a,s)=>{a.nzColor=s}},metadata:l},o,c),l&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),D(r,"\u0275fac",function(a){return new(a||r)}),D(r,"\u0275cmp",k({type:r,selectors:[["nz-badge"]],hostAttrs:[1,"ant-badge"],hostVars:6,hostBindings:function(a,s){a&2&&v("ant-badge-status",s.nzStatus)("ant-badge-not-a-wrapper",!!(s.nzStandalone||(s.nzStatus||s.nzColor)&&!s.showSup&&!s.nzCount))("ant-badge-rtl",s.dir()==="rtl")},inputs:{nzShowZero:[2,"nzShowZero","nzShowZero",f],nzShowDot:[2,"nzShowDot","nzShowDot",f],nzStandalone:[2,"nzStandalone","nzStandalone",f],nzDot:[2,"nzDot","nzDot",f],nzOverflowCount:"nzOverflowCount",nzColor:"nzColor",nzStyle:"nzStyle",nzText:"nzText",nzTitle:"nzTitle",nzStatus:"nzStatus",nzCount:"nzCount",nzOffset:"nzOffset",nzSize:"nzSize"},exportAs:["nzBadge"],features:[O],ngContentSelectors:lt,decls:3,vars:2,consts:[[4,"nzStringTemplateOutlet"],[1,"ant-badge-status-dot"],[1,"ant-badge-status-text"],[3,"isPresetColor","nzColor","nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzCount","nzOverflowCount","disableAnimation","noAnimation"]],template:function(a,s){a&1&&(I(),h(0,ht,3,5),F(1),w(2,yt,2,1,"ng-container",0)),a&2&&(b((s.nzStatus||s.nzColor)&&!s.showSup&&!s.nzCount?0:-1),p(2),z("nzStringTemplateOutlet",s.nzCount))},dependencies:[Tt,L,H],encapsulation:2,data:{animation:[G]},changeDetection:0})),r})(),kt=(()=>{class e{nzColor;nzPlacement="end";nzText=null;presetColor=null;ngOnChanges(t){let{nzColor:i}=t;i&&(this.presetColor=this.nzColor&&ut.indexOf(this.nzColor)!==-1?this.nzColor:null)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["nz-ribbon"]],hostAttrs:[1,"ant-ribbon-wrapper"],inputs:{nzColor:"nzColor",nzPlacement:"nzPlacement",nzText:"nzText"},exportAs:["nzRibbon"],features:[O],ngContentSelectors:lt,decls:4,vars:11,consts:[[1,"ant-ribbon"],[4,"nzStringTemplateOutlet"],[1,"ant-ribbon-corner"],[1,"ant-ribbon-text"]],template:function(i,o){i&1&&(I(),F(0),d(1,"div",0),w(2,vt,3,1,"ng-container",1),x(3,"div",2),g()),i&2&&(p(),N(o.presetColor&&"ant-ribbon-color-"+o.presetColor),y("background-color",!o.presetColor&&o.nzColor),v("ant-ribbon-placement-end",o.nzPlacement==="end")("ant-ribbon-placement-start",o.nzPlacement==="start"),p(),z("nzStringTemplateOutlet",o.nzText),p(),y("color",!o.presetColor&&o.nzColor))},dependencies:[L,H],encapsulation:2,changeDetection:0})}return e})(),Kt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Q({type:e});static \u0275inj=K({imports:[Ot,kt]})}return e})();export{at as a,rt as b,Ot as c,Kt as d};