-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchunk-JFWAWJQZ.js
1 lines (1 loc) · 14.7 KB
/
chunk-JFWAWJQZ.js
1
import{Gb as Fe,Ha as Re,Ib as Pe,Ja as Te,Jb as Ve,Ka as L,La as Ne,M as B,Na as P,Oa as ke,S as b,Ua as Ie,dc as je,fb as Ee,lb as Se,nb as Me,p as be,pb as H,ua as De,va as D,vb as Ae}from"./chunk-O3IWK6WU.js";import{Aa as $,Ac as S,Bc as M,Fa as N,Gc as A,Hc as F,Ib as fe,Ja as k,Jb as ue,Kb as ze,Kd as xe,Mb as Ce,Ob as l,Vb as m,Wb as E,Xb as W,Yb as Z,_b as _e,aa as g,ad as we,cc as p,f as v,ha as oe,hc as h,hd as Y,ia as re,ic as f,jc as ge,ka as se,kc as O,l as w,lc as x,ld as _,m as z,ma as le,mc as ye,na as ce,nc as K,qc as Q,rb as o,sc as s,tb as I,va as de,wa as me,wb as pe,wd as Oe,xb as d,yc as ve,za as j,zb as he,zc as X}from"./chunk-NACBYLXS.js";import{c as ae}from"./chunk-EQDQRRRY.js";var Le=["drawerTemplate"];function He(t,a){if(t&1){let e=K();h(0,"div",9),Q("click",function(){j(e);let C=s(2);return $(C.maskClick())}),f()}if(t&2){let e=s(2);Z(e.nzMaskStyle),m("@drawerMaskMotion",void 0)}}function Ue(t,a){if(t&1&&(O(0),ge(1,"nz-icon",17),x()),t&2){let e=a.$implicit;o(),m("nzType",e)}}function qe(t,a){if(t&1){let e=K();h(0,"button",15),Q("click",function(){j(e);let C=s(3);return $(C.closeClick())}),l(1,Ue,2,1,"ng-container",16),f()}if(t&2){let e=s(3);o(),m("nzStringTemplateOutlet",e.nzCloseIcon)}}function Ge(t,a){if(t&1&&(O(0),A(1),x()),t&2){let e=s(4);o(),F(e.nzTitle)}}function Je(t,a){if(t&1&&(h(0,"div",13),l(1,Ge,2,1,"ng-container",16),f()),t&2){let e=s(3);o(),m("nzStringTemplateOutlet",e.nzTitle)}}function et(t,a){if(t&1&&(O(0),A(1),x()),t&2){let e=s(4);o(),F(e.nzExtra)}}function tt(t,a){if(t&1&&(h(0,"div",14),l(1,et,2,1,"ng-container",16),f()),t&2){let e=s(3);o(),m("nzStringTemplateOutlet",e.nzExtra)}}function nt(t,a){if(t&1&&(h(0,"div",10)(1,"div",11),l(2,qe,2,1,"button",12)(3,Je,2,1,"div",13),f(),l(4,tt,2,1,"div",14),f()),t&2){let e=s(2);W("ant-drawer-header-close-only",!e.nzTitle),o(2),p(e.nzClosable?2:-1),o(),p(e.nzTitle?3:-1),o(),p(e.nzExtra?4:-1)}}function it(t,a){}function at(t,a){t&1&&ye(0)}function ot(t,a){if(t&1&&l(0,at,1,0,"ng-container",18),t&2){let e=s(3);m("ngTemplateOutlet",e.nzContent)("ngTemplateOutletContext",e.templateContext)}}function rt(t,a){if(t&1&&l(0,ot,1,2,"ng-container"),t&2){let e=s(2);p(e.isTemplateRef(e.nzContent)?0:-1)}}function st(t,a){}function lt(t,a){if(t&1&&l(0,st,0,0,"ng-template",19),t&2){let e=s(3);m("ngTemplateOutlet",e.contentFromContentChild)}}function ct(t,a){if(t&1&&l(0,lt,1,1,null,19),t&2){let e=s(2);p(e.contentFromContentChild&&(e.isOpen||e.inAnimation)?0:-1)}}function dt(t,a){if(t&1&&(O(0),A(1),x()),t&2){let e=s(3);o(),F(e.nzFooter)}}function mt(t,a){if(t&1&&(h(0,"div",8),l(1,dt,2,1,"ng-container",16),f()),t&2){let e=s(2);o(),m("nzStringTemplateOutlet",e.nzFooter)}}function pt(t,a){if(t&1&&(h(0,"div",1),l(1,He,1,3,"div",2),h(2,"div")(3,"div",3)(4,"div",4),l(5,nt,5,5,"div",5),h(6,"div",6),l(7,it,0,0,"ng-template",7)(8,rt,1,1)(9,ct,1,1),f(),l(10,mt,2,1,"div",8),f()()()()),t&2){let e=s();E("transform",e.offsetTransform)("transition",e.placementChanging?"none":null)("z-index",e.nzZIndex),W("ant-drawer-rtl",e.dir==="rtl")("ant-drawer-open",e.isOpen)("no-mask",!e.nzMask)("ant-drawer-top",e.nzPlacement==="top")("ant-drawer-bottom",e.nzPlacement==="bottom")("ant-drawer-right",e.nzPlacement==="right")("ant-drawer-left",e.nzPlacement==="left"),m("nzNoAnimation",e.nzNoAnimation),o(),p(e.nzMask&&e.isOpen?1:-1),o(),_e("ant-drawer-content-wrapper ",e.nzWrapClassName,""),E("width",e.width)("height",e.height)("transform",e.transform)("transition",e.placementChanging?"none":null),o(2),E("height",e.isLeftOrRight?"100%":null),o(),p(e.nzTitle||e.nzClosable?5:-1),o(),Z(e.nzBodyStyle),o(2),p(e.nzContent?8:9),o(2),p(e.nzFooter?10:-1)}}var ht=(()=>{class t{templateRef;constructor(e){this.templateRef=e}static \u0275fac=function(c){return new(c||t)(d(I))};static \u0275dir=ze({type:t,selectors:[["","nzDrawerContent",""]],exportAs:["nzDrawerContent"]})}return t})(),$e=378,We=736,ft=new se("NZ_DRAWER_DATA"),V=class{},ut=300,zt="drawer",Ze=(()=>{let t=V,a,e=[],c=[],C,y=[],R=[],G,J=[],ee=[],te,ne=[],ie=[];return class U extends t{static{let i=typeof Symbol=="function"&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[D()],C=[D()],G=[D()],te=[D()],w(null,null,a,{kind:"field",name:"nzMaskClosable",static:!1,private:!1,access:{has:n=>"nzMaskClosable"in n,get:n=>n.nzMaskClosable,set:(n,r)=>{n.nzMaskClosable=r}},metadata:i},e,c),w(null,null,C,{kind:"field",name:"nzMask",static:!1,private:!1,access:{has:n=>"nzMask"in n,get:n=>n.nzMask,set:(n,r)=>{n.nzMask=r}},metadata:i},y,R),w(null,null,G,{kind:"field",name:"nzCloseOnNavigation",static:!1,private:!1,access:{has:n=>"nzCloseOnNavigation"in n,get:n=>n.nzCloseOnNavigation,set:(n,r)=>{n.nzCloseOnNavigation=r}},metadata:i},J,ee),w(null,null,te,{kind:"field",name:"nzDirection",static:!1,private:!1,access:{has:n=>"nzDirection"in n,get:n=>n.nzDirection,set:(n,r)=>{n.nzDirection=r}},metadata:i},ne,ie),i&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}cdr;nzConfigService;renderer;overlay;injector;changeDetectorRef;focusTrapFactory;viewContainerRef;overlayKeyboardDispatcher;directionality;_nzModuleName=zt;nzContent;nzCloseIcon="close";nzClosable=!0;nzMaskClosable=z(this,e,!0);nzMask=(z(this,c),z(this,y,!0));nzCloseOnNavigation=(z(this,R),z(this,J,!0));nzNoAnimation=(z(this,ee),!1);nzKeyboard=!0;nzTitle;nzExtra;nzFooter;nzPlacement="right";nzSize="default";nzMaskStyle={};nzBodyStyle={};nzWrapClassName;nzWidth;nzHeight;nzZIndex=1e3;nzOffsetX=0;nzOffsetY=0;componentInstance=null;componentRef=null;set nzVisible(i){this.isOpen=i}get nzVisible(){return this.isOpen}nzOnViewInit=new k;nzOnClose=new k;nzVisibleChange=new k;drawerTemplate;bodyPortalOutlet;contentFromContentChild;destroy$=new v;previouslyFocusedElement;placementChanging=!1;placementChangeTimeoutId;nzContentParams;nzData;overlayRef;portal;focusTrap;isOpen=!1;inAnimation=!1;templateContext={$implicit:void 0,drawerRef:this};isTemplateRef=B;get offsetTransform(){if(!this.isOpen||this.nzOffsetX+this.nzOffsetY===0)return null;switch(this.nzPlacement){case"left":return`translateX(${this.nzOffsetX}px)`;case"right":return`translateX(-${this.nzOffsetX}px)`;case"top":return`translateY(${this.nzOffsetY}px)`;case"bottom":return`translateY(-${this.nzOffsetY}px)`}}get transform(){if(this.isOpen)return null;switch(this.nzPlacement){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}get width(){if(this.isLeftOrRight){let i=this.nzSize==="large"?We:$e;return this.nzWidth===void 0?b(i):b(this.nzWidth)}return null}get height(){if(!this.isLeftOrRight){let i=this.nzSize==="large"?We:$e;return this.nzHeight===void 0?b(i):b(this.nzHeight)}return null}get isLeftOrRight(){return this.nzPlacement==="left"||this.nzPlacement==="right"}nzAfterOpen=new v;nzAfterClose=new v;get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}get isNzContentTemplateRef(){return B(this.nzContent)}nzDirection=z(this,ne,void 0);dir=(z(this,ie),"ltr");document=ce(Oe);constructor(i,n,r,u,T,Ke,Qe,Xe,Ye,Be){super(),this.cdr=i,this.nzConfigService=n,this.renderer=r,this.overlay=u,this.injector=T,this.changeDetectorRef=Ke,this.focusTrapFactory=Qe,this.viewContainerRef=Xe,this.overlayKeyboardDispatcher=Ye,this.directionality=Be}ngOnInit(){this.directionality.change?.pipe(g(this.destroy$)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.nzDirection||this.directionality.value,this.attachOverlay(),this.updateOverlayStyle(),this.updateBodyOverflow(),this.templateContext={$implicit:this.nzData||this.nzContentParams,drawerRef:this},this.changeDetectorRef.detectChanges()}ngAfterViewInit(){this.attachBodyContent(),this.nzOnViewInit.observers.length&&setTimeout(()=>{this.nzOnViewInit.emit()})}ngOnChanges(i){let{nzPlacement:n,nzVisible:r}=i;r&&(i.nzVisible.currentValue?this.open():this.close()),n&&!n.isFirstChange()&&this.triggerPlacementChangeCycleOnce()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),clearTimeout(this.placementChangeTimeoutId),this.disposeOverlay()}getAnimationDuration(){return this.nzNoAnimation?0:ut}triggerPlacementChangeCycleOnce(){this.nzNoAnimation||(this.placementChanging=!0,this.changeDetectorRef.markForCheck(),clearTimeout(this.placementChangeTimeoutId),this.placementChangeTimeoutId=setTimeout(()=>{this.placementChanging=!1,this.changeDetectorRef.markForCheck()},this.getAnimationDuration()))}close(i){this.isOpen=!1,this.inAnimation=!0,this.nzVisibleChange.emit(!1),this.updateOverlayStyle(),this.overlayKeyboardDispatcher.remove(this.overlayRef),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.updateBodyOverflow(),this.restoreFocus(),this.inAnimation=!1,this.nzAfterClose.next(i),this.nzAfterClose.complete(),this.componentInstance=null,this.componentRef=null},this.getAnimationDuration())}open(){this.attachOverlay(),this.isOpen=!0,this.inAnimation=!0,this.nzVisibleChange.emit(!0),this.overlayKeyboardDispatcher.add(this.overlayRef),this.updateOverlayStyle(),this.updateBodyOverflow(),this.savePreviouslyFocusedElement(),this.trapFocus(),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.inAnimation=!1,this.changeDetectorRef.detectChanges(),this.nzAfterOpen.next()},this.getAnimationDuration())}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}closeClick(){this.nzOnClose.emit()}maskClick(){this.nzMaskClosable&&this.nzMask&&this.nzOnClose.emit()}attachBodyContent(){if(this.bodyPortalOutlet.dispose(),this.nzContent instanceof de){let i=N.create({parent:this.injector,providers:[{provide:V,useValue:this},{provide:ft,useValue:this.nzData}]}),n=new L(this.nzContent,null,i);this.componentRef=this.bodyPortalOutlet.attachComponentPortal(n),this.componentInstance=this.componentRef.instance,Object.assign(this.componentRef.instance,this.nzData||this.nzContentParams),this.componentRef.changeDetectorRef.detectChanges()}}attachOverlay(){this.overlayRef||(this.portal=new Ne(this.drawerTemplate,this.viewContainerRef),this.overlayRef=this.overlay.create(this.getOverlayConfig()),je(this.overlayRef,this.nzZIndex)),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayRef.keydownEvents().pipe(g(this.destroy$)).subscribe(i=>{i.keyCode===27&&this.isOpen&&this.nzKeyboard&&this.nzOnClose.emit()}),this.overlayRef.detachments().pipe(g(this.destroy$)).subscribe(()=>{this.close(),this.disposeOverlay()}))}disposeOverlay(){this.overlayRef?.dispose(),this.overlayRef=null}getOverlayConfig(){return new Se({disposeOnNavigation:this.nzCloseOnNavigation,positionStrategy:this.overlay.position().global(),scrollStrategy:this.overlay.scrollStrategies.block()})}updateOverlayStyle(){this.overlayRef&&this.overlayRef.overlayElement&&this.renderer.setStyle(this.overlayRef.overlayElement,"pointer-events",this.isOpen?"auto":"none")}updateBodyOverflow(){this.overlayRef&&(this.isOpen?this.overlayRef.getConfig().scrollStrategy.enable():this.overlayRef.getConfig().scrollStrategy.disable())}savePreviouslyFocusedElement(){this.document&&!this.previouslyFocusedElement&&(this.previouslyFocusedElement=this.document.activeElement,this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.blur=="function"&&this.previouslyFocusedElement.blur())}trapFocus(){!this.focusTrap&&this.overlayRef&&this.overlayRef.overlayElement&&(this.focusTrap=this.focusTrapFactory.create(this.overlayRef.overlayElement),this.focusTrap.focusInitialElement())}restoreFocus(){this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.focus=="function"&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=void 0),this.focusTrap&&this.focusTrap.destroy()}static \u0275fac=function(n){return new(n||U)(d(Y),d(De),d(pe),d(H),d(N),d(Y),d(Ie),d(he),d(Me),d(be))};static \u0275cmp=fe({type:U,selectors:[["nz-drawer"]],contentQueries:function(n,r,u){if(n&1&&ve(u,ht,7,I),n&2){let T;S(T=M())&&(r.contentFromContentChild=T.first)}},viewQuery:function(n,r){if(n&1&&(X(Le,7),X(P,5)),n&2){let u;S(u=M())&&(r.drawerTemplate=u.first),S(u=M())&&(r.bodyPortalOutlet=u.first)}},inputs:{nzContent:"nzContent",nzCloseIcon:"nzCloseIcon",nzClosable:[2,"nzClosable","nzClosable",_],nzMaskClosable:[2,"nzMaskClosable","nzMaskClosable",_],nzMask:[2,"nzMask","nzMask",_],nzCloseOnNavigation:[2,"nzCloseOnNavigation","nzCloseOnNavigation",_],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",_],nzKeyboard:[2,"nzKeyboard","nzKeyboard",_],nzTitle:"nzTitle",nzExtra:"nzExtra",nzFooter:"nzFooter",nzPlacement:"nzPlacement",nzSize:"nzSize",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzWrapClassName:"nzWrapClassName",nzWidth:"nzWidth",nzHeight:"nzHeight",nzZIndex:"nzZIndex",nzOffsetX:"nzOffsetX",nzOffsetY:"nzOffsetY",nzVisible:[2,"nzVisible","nzVisible",_]},outputs:{nzOnViewInit:"nzOnViewInit",nzOnClose:"nzOnClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzDrawer"],features:[Ce,me],decls:2,vars:0,consts:[["drawerTemplate",""],[1,"ant-drawer",3,"nzNoAnimation"],[1,"ant-drawer-mask",3,"style"],[1,"ant-drawer-content"],[1,"ant-drawer-wrapper-body"],[1,"ant-drawer-header",3,"ant-drawer-header-close-only"],["cdkScrollable","",1,"ant-drawer-body"],["cdkPortalOutlet",""],[1,"ant-drawer-footer"],[1,"ant-drawer-mask",3,"click"],[1,"ant-drawer-header"],[1,"ant-drawer-header-title"],["aria-label","Close",1,"ant-drawer-close"],[1,"ant-drawer-title"],[1,"ant-drawer-extra"],["aria-label","Close",1,"ant-drawer-close",3,"click"],[4,"nzStringTemplateOutlet"],[3,"nzType"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"]],template:function(n,r){n&1&&l(0,pt,11,40,"ng-template",null,0,we)},dependencies:[Fe,Ve,Pe,Te,Re,ke,P,xe,Ee],encapsulation:2,data:{animation:[Ae]},changeDetection:0})}})(),q=class{overlay;options;drawerRef;overlayRef;unsubscribe$=new v;constructor(a,e){this.overlay=a,this.options=e;let y=this.options,{nzOnCancel:c}=y,C=ae(y,["nzOnCancel"]);this.overlayRef=this.overlay.create(),this.drawerRef=this.overlayRef.attach(new L(Ze)).instance,this.updateOptions(C),this.drawerRef.savePreviouslyFocusedElement(),this.drawerRef.nzOnViewInit.pipe(g(this.unsubscribe$)).subscribe(()=>{this.drawerRef.open()}),this.drawerRef.nzOnClose.subscribe(()=>{c?c().then(R=>{R!==!1&&this.drawerRef.close()}):this.drawerRef.close()}),this.drawerRef.afterClose.pipe(g(this.unsubscribe$)).subscribe(()=>{this.overlayRef.dispose(),this.drawerRef=null,this.unsubscribe$.next(),this.unsubscribe$.complete()})}getInstance(){return this.drawerRef}updateOptions(a){Object.assign(this.drawerRef,a)}},Ct=(()=>{class t{overlay;constructor(e){this.overlay=e}create(e){return new q(this.overlay,e).getInstance()}static \u0275fac=function(c){return new(c||t)(le(H))};static \u0275prov=oe({token:t,factory:t.\u0275fac})}return t})(),Ut=(()=>{class t{static \u0275fac=function(c){return new(c||t)};static \u0275mod=ue({type:t});static \u0275inj=re({providers:[Ct],imports:[Ze]})}return t})();export{ht as a,ft as b,V as c,Ze as d,Ct as e,Ut as f};