-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchunk-DSZ5P5VQ.js
1 lines (1 loc) · 4.96 KB
/
chunk-DSZ5P5VQ.js
1
import{a as pe,e as ue}from"./chunk-FPTJTSUI.js";import{Ca as ae,Ea as ce,Fa as se,Gb as me,Hb as le,p as ne,r as re,s as ie,u as R,z as oe}from"./chunk-YWVGY2C2.js";import{$ as S,Ba as M,Ca as w,E as N,Gc as x,Ha as A,Hc as y,Hd as te,Ib as h,Ic as H,Jb as L,Jc as J,Ob as k,Pb as p,Pc as K,Qa as E,Vb as G,Wb as d,_c as Q,ba as v,dc as C,ed as Z,f as B,gc as U,ha as j,hc as V,ic as f,id as ee,ja as F,jc as b,kc as P,lc as Y,mb as O,mc as W,oc as X,rb as a,rc as q,sb as s,tc as m,uc as z,vc as _,xb as $}from"./chunk-GBKJFEQZ.js";var T=["*"];function be(e,i){}function he(e,i){if(e&1&&(f(0,"span",1),p(1,be,0,0,"ng-template",2),P(2,"nz-icon",3),b()),e&2){let t=m(),n=x(4);d("nzDropdownMenu",t.nzOverlay),a(),d("ngTemplateOutlet",n)}}function Ce(e,i){}function ze(e,i){if(e&1&&p(0,Ce,0,0,"ng-template",2),e&2){m();let t=x(4);d("ngTemplateOutlet",t)}}function _e(e,i){if(e&1&&(Y(0),y(1),W()),e&2){let t=m(2);a(),J(" ",t.nzBreadCrumbComponent.nzSeparator," ")}}function ge(e,i){if(e&1&&(f(0,"nz-breadcrumb-separator"),p(1,_e,2,1,"ng-container",4),b()),e&2){let t=m();a(),d("nzStringTemplateOutlet",t.nzBreadCrumbComponent.nzSeparator)}}function ve(e,i){e&1&&(f(0,"span",5),_(1),b())}var xe=(e,i)=>i.url;function ye(e,i){if(e&1){let t=X();f(0,"nz-breadcrumb-item")(1,"a",0),q("click",function(r){let l=M(t).$implicit,o=m(2);return w(o.navigate(l.url,r))}),y(2),b()()}if(e&2){let t=i.$implicit;a(),G("href",t.url,O),a(),H(t.label)}}function Re(e,i){if(e&1&&U(0,ye,3,2,"nz-breadcrumb-item",null,xe),e&2){let t=m();V(t.breadcrumbs)}}var Te=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=h({type:e,selectors:[["nz-breadcrumb-separator"]],hostAttrs:[1,"ant-breadcrumb-separator"],exportAs:["nzBreadcrumbSeparator"],ngContentSelectors:T,decls:1,vars:0,template:function(n,r){n&1&&(z(),_(0))},encapsulation:2})}}return e})(),g=class{},de=(()=>{class e{constructor(t){this.nzBreadCrumbComponent=t}static{this.\u0275fac=function(n){return new(n||e)(s(g))}}static{this.\u0275cmp=h({type:e,selectors:[["nz-breadcrumb-item"]],inputs:{nzOverlay:"nzOverlay"},exportAs:["nzBreadcrumbItem"],ngContentSelectors:T,decls:5,vars:2,consts:[["noMenuTpl",""],["nz-dropdown","",1,"ant-breadcrumb-overlay-link",3,"nzDropdownMenu"],[3,"ngTemplateOutlet"],["nzType","down"],[4,"nzStringTemplateOutlet"],[1,"ant-breadcrumb-link"]],template:function(n,r){n&1&&(z(),p(0,he,3,2,"span",1)(1,ze,1,1,null,2)(2,ge,2,1,"nz-breadcrumb-separator")(3,ve,2,0,"ng-template",null,0,Q)),n&2&&(C(r.nzOverlay?0:1),a(2),C(r.nzBreadCrumbComponent.nzSeparator?2:-1))},dependencies:[te,Te,ue,pe,ce,ae,le,me],encapsulation:2,changeDetection:0})}}return e})(),De=(()=>{class e{constructor(t,n,r,l,o){this.injector=t,this.cdr=n,this.elementRef=r,this.renderer=l,this.directionality=o,this.nzAutoGenerate=!1,this.nzSeparator="/",this.nzRouteLabel="breadcrumb",this.nzRouteLabelFn=c=>c,this.nzRouteFn=c=>c,this.breadcrumbs=[],this.dir="ltr",this.destroy$=new B}ngOnInit(){this.nzAutoGenerate&&this.registerRouterChange(),this.directionality.change?.pipe(v(this.destroy$)).subscribe(t=>{this.dir=t,this.prepareComponentForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareComponentForRtl()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}navigate(t,n){n.preventDefault(),this.injector.get(R).navigateByUrl(t)}registerRouterChange(){try{let t=this.injector.get(R),n=this.injector.get(ie);t.events.pipe(N(r=>r instanceof re),v(this.destroy$),S(!0)).subscribe(()=>{this.breadcrumbs=this.getBreadcrumbs(n.root),this.cdr.markForCheck()})}catch{throw new Error(`${oe} You should import RouterModule if you want to use 'NzAutoGenerate'.`)}}getBreadcrumbs(t,n="",r=[]){let l=t.children;if(l.length===0)return r;for(let o of l)if(o.outlet===ne){let c=o.snapshot.url.map(u=>u.path).filter(u=>u).join("/"),D=c?`${n}/${c}`:n,I=this.nzRouteLabelFn(o.snapshot.data[this.nzRouteLabel]),fe=this.nzRouteFn(D);if(c&&I){let u={label:I,params:o.snapshot.params,url:fe};r.push(u)}return this.getBreadcrumbs(o,D,r)}return r}prepareComponentForRtl(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl")}static{this.\u0275fac=function(n){return new(n||e)(s(A),s(Z),s(E),s($),s(se))}}static{this.\u0275cmp=h({type:e,selectors:[["nz-breadcrumb"]],hostAttrs:[1,"ant-breadcrumb"],inputs:{nzAutoGenerate:[2,"nzAutoGenerate","nzAutoGenerate",ee],nzSeparator:"nzSeparator",nzRouteLabel:"nzRouteLabel",nzRouteLabelFn:"nzRouteLabelFn",nzRouteFn:"nzRouteFn"},exportAs:["nzBreadcrumb"],features:[K([{provide:g,useExisting:j(()=>e)}]),k],ngContentSelectors:T,decls:2,vars:1,consts:[[3,"click"]],template:function(n,r){n&1&&(z(),_(0),p(1,Re,2,0)),n&2&&(a(),C(r.nzAutoGenerate&&r.breadcrumbs.length?1:-1))},dependencies:[de],encapsulation:2,changeDetection:0})}}return e})(),We=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=L({type:e})}static{this.\u0275inj=F({imports:[De,de]})}}return e})();export{Te as a,de as b,De as c,We as d};