PageSourceSearch

https://preview-9105-ng-zorro-antd.surge.sh/chunk-THWBHVZF.js

js preview-9105-ng-zorro-antd.surge.sh collected 2026-10-03 14:59:22 UTC 17,440 bytes, 1 lines download raw bytes

1import{d as We,e as He}from"./chunk-XNNSOCK7.js";import{Eb as Fe,Hb as Me,Ib as Oe,Na as A,Oa as F,Pb as Ze,S as R,_a as xe,ab as Ne,bb as Te,gb as Re,lc as G,n as Ee,p as oe,va as j}from"./chunk-BS5JWHVW.js";import{$ as he,Aa as D,Ac as ee,Bc as te,E as O,Fa as W,Gc as be,Ib as Q,Ja as U,Jb as ze,Jc as ke,Ka as fe,Kb as we,N as me,Oa as ue,Ob as H,Rc as De,Ub as ye,Vb as Y,Wb as $,Xb as T,aa as d,cc as L,ec as K,f as E,fc as q,gc as X,ha as pe,hc as g,hd as ie,ia as de,ic as S,jc as C,l as x,ld as Pe,m as u,ma as N,na as Z,nb as ve,nc as V,pc as Se,qc as b,rb as v,rc as Ce,sc as z,tc as _e,uc as Ie,wa as ge,wd as ne,xb as h,z as B,za as k,zc as J}from"./chunk-NACBYLXS.js";import{a as I}from"./chunk-EQDQRRRY.js";var Ue=["*"],Qe=["imgRef"],Ye=["imagePreviewWrapper"];function Ke(i,r){if(i&1){let e=V();g(0,"div",13),b("click",function(t){k(e);let o=z();return D(o.onSwitchLeft(t))}),C(1,"nz-icon",14),S(),g(2,"div",15),b("click",function(t){k(e);let o=z();return D(o.onSwitchRight(t))}),C(3,"nz-icon",16),S()}if(i&2){let e=z();T("ant-image-preview-switch-left-disabled",e.index<=0),v(2),T("ant-image-preview-switch-right-disabled",e.index>=e.images.length-1)}}function qe(i,r){if(i&1&&(g(0,"li",5),be(1),S()),i&2){let e=z();v(),ke("",e.index+1," / ",e.images.length,"")}}function Xe(i,r){if(i&1){let e=V();g(0,"li",17),b("click",function(){let t=k(e).$implicit;return D(t.onClick())}),C(1,"nz-icon",18),S()}if(i&2){let e,n=r.$implicit,t=z();T("ant-image-preview-operations-operation-disabled",t.zoomOutDisabled&&n.type==="zoomOut"),v(),Y("nzType",n.icon)("nzRotate",(e=n.rotate)!==null&&e!==void 0?e:0)}}function Je(i,r){if(i&1&&C(0,"img",20,1),i&2){let e=z().$implicit,n=z();$("width",e.width)("height",e.height)("transform",n.previewImageTransform),ye("src",n.sanitizerResourceUrl(e.src),ve)("srcset",e.srcset)("alt",e.alt)}}function et(i,r){if(i&1&&H(0,Je,2,9,"img",19),i&2){let e=r.$index,n=z();L(e===n.index?0:-1)}}var tt=(()=>{class i{nzScaleStep=null;images=[];addImage(e){this.images.push(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Q({type:i,selectors:[["nz-image-group"]],inputs:{nzScaleStep:"nzScaleStep"},exportAs:["nzImageGroup"],ngContentSelectors:Ue,decls:1,vars:0,template:function(n,t){n&1&&(_e(),Ie(0))},encapsulation:2,changeDetection:0})}return i})(),Ae="image";function it(i){let r={};return i.width<=i.clientWidth&&i.height<=i.clientHeight&&(r={x:0,y:0}),(i.width>i.clientWidth||i.height>i.clientHeight)&&(r={x:Ve(i.left,i.width,i.clientWidth),y:Ve(i.top,i.height,i.clientHeight)}),r}function nt(i){let r=i.getBoundingClientRect(),e=document.documentElement;return{left:r.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||document.body.clientTop||0)}}function ot(){let i=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:r}}function Ve(i,r,e){let n=i+r,t=(r-e)/2,o=null;return r>e?(i>0&&(o=t),i<0&&n<e&&(o=-t)):(i<0||n>e)&&(o=i<0?t:-t),o}var M=class{nzKeyboard=!0;nzNoAnimation=!1;nzMaskClosable=!0;nzCloseOnNavigation=!0;nzZIndex;nzZoom;nzRotate;nzFlipHorizontally;nzFlipVertically;nzScaleStep;nzDirection},je={x:0,y:0},re=.5,at=1,rt=0,Ge=(()=>{class i{ngZone;cdr;nzConfigService;config;destroy$;sanitizer;_defaultNzZoom=at;_defaultNzScaleStep=re;_defaultNzRotate=rt;images=[];index=0;isDragging=!1;visible=!0;animationStateChanged=new U;scaleStepMap=new Map;previewImageTransform="";previewImageWrapperTransform="";operations=[{icon:"close",onClick:()=>{this.onClose()},type:"close"},{icon:"zoom-in",onClick:()=>{this.onZoomIn()},type:"zoomIn"},{icon:"zoom-out",onClick:()=>{this.onZoomOut()},type:"zoomOut"},{icon:"rotate-right",onClick:()=>{this.onRotateRight()},type:"rotateRight"},{icon:"rotate-left",onClick:()=>{this.onRotateLeft()},type:"rotateLeft"},{icon:"swap",onClick:()=>{this.onHorizontalFlip()},type:"flipHorizontally"},{icon:"swap",onClick:()=>{this.onVerticalFlip()},type:"flipVertically",rotate:90}];zoomOutDisabled=!1;position=I({},je);previewRef;closeClick=new U;imageRef;imagePreviewWrapper;document=Z(ne);zoom;rotate;scaleStep;flipHorizontally;flipVertically;get animationDisabled(){return this.config.nzNoAnimation??!1}get maskClosable(){let e=this.nzConfigService.getConfigForComponent(Ae)||{};return this.config.nzMaskClosable??e.nzMaskClosable??!0}constructor(e,n,t,o,c,l){this.ngZone=e,this.cdr=n,this.nzConfigService=t,this.config=o,this.destroy$=c,this.sanitizer=l,this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.flipHorizontally=this.config.nzFlipHorizontally??!1,this.flipVertically=this.config.nzFlipVertically??!1,this.updateZoomOutDisabled(),this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform()}ngOnInit(){j(this.imagePreviewWrapper.nativeElement,"mousedown").pipe(d(this.destroy$)).subscribe(()=>{this.isDragging=!0}),j(this.imagePreviewWrapper.nativeElement,"wheel").pipe(d(this.destroy$)).subscribe(e=>{this.ngZone.run(()=>this.wheelZoomEventHandler(e))}),j(this.document,"keydown").pipe(O(e=>e.keyCode===27),d(this.destroy$)).subscribe(()=>{this.ngZone.run(()=>{this.onClose(),this.markForCheck()})})}setImages(e,n){n&&(this.scaleStepMap=n),this.images=e,this.markForCheck()}switchTo(e){this.index=e,this.markForCheck()}next(){this.index<this.images.length-1&&(this.reset(),this.index++,this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform(),this.updateZoomOutDisabled(),this.markForCheck())}prev(){this.index>0&&(this.reset(),this.index--,this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform(),this.updateZoomOutDisabled(),this.markForCheck())}markForCheck(){this.cdr.markForCheck()}onClose(){this.visible=!1,this.closeClick.emit()}onZoomIn(){let e=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom+=e,this.updatePreviewImageTransform(),this.updateZoomOutDisabled()}
1onZoomOut(){if(this.zoom>1){let e=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom-=e,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.zoom<=1&&this.reCenterImage()}}onRotateRight(){this.rotate+=90,this.updatePreviewImageTransform()}onRotateLeft(){this.rotate-=90,this.updatePreviewImageTransform()}onSwitchLeft(e){e.preventDefault(),e.stopPropagation(),this.prev()}onSwitchRight(e){e.preventDefault(),e.stopPropagation(),this.next()}onHorizontalFlip(){this.flipHorizontally=!this.flipHorizontally,this.updatePreviewImageTransform()}onVerticalFlip(){this.flipVertically=!this.flipVertically,this.updatePreviewImageTransform()}wheelZoomEventHandler(e){e.preventDefault(),e.stopPropagation(),this.handlerImageTransformationWhileZoomingWithMouse(e,e.deltaY),this.handleImageScaleWhileZoomingWithMouse(e.deltaY),this.updatePreviewImageWrapperTransform(),this.updatePreviewImageTransform(),this.markForCheck()}onAnimationStart(e){this.animationStateChanged.emit(e)}onAnimationDone(e){this.animationStateChanged.emit(e)}onDragEnd(e){this.isDragging=!1;let n=this.imageRef.nativeElement.offsetWidth*this.zoom,t=this.imageRef.nativeElement.offsetHeight*this.zoom,{left
1:o,top:c}=nt(this.imageRef.nativeElement),{width:l,height:f}=ot(),_=this.rotate%180!==0,y=it({width:_?t:n,height:_?n:t,left:o,top:c,clientWidth:l,clientHeight:f});R(y.x)||R(y.y)?this.position=I(I({},this.position),y):!R(y.x)&&!R(y.y)&&(this.position={x:e.source.getFreeDragPosition().x,y:e.source.getFreeDragPosition().y})}sanitizerResourceUrl(e){return this.sanitizer.bypassSecurityTrustResourceUrl(e)}updatePreviewImageTransform(){this.previewImageTransform=`scale3d(${this.zoom*(this.flipHorizontally?-1:1)}, ${this.zoom*(this.flipVertically?-1:1)}, 1) rotate(${this.rotate}deg)`}updatePreviewImageWrapperTransform(){this.previewImageWrapperTransform=`translate3d(${this.position.x}px, ${this.position.y}px, 0)`}updateZoomOutDisabled(){this.zoomOutDisabled=this.zoom<=1}handlerImageTransformationWhileZoomingWithMouse(e,n){let t,o=this.imageRef.nativeElement,l=getComputedStyle(o).transform.match(/matrix.*\((.+)\)/);l?t=+l[1].split(", ")[0]:t=this.zoom;let f=(e.clientX-o.getBoundingClientRect().x)/t,_=(e.clientY-o.getBoundingClientRect().y)/t,w=n<0?this.scaleStep/2:-this.scaleStep/2;this.position.x+=-f*w*2+o.offsetWidth*w,this.position.y+=-_*w*2+o.offsetHeight*w}handleImageScaleWhileZoomingWithMouse(e){this.isZoomedInWithMouseWheel(e)?this.onZoomIn():this.onZoomOut(),this.zoom<=1&&this.reCenterImage()}isZoomedInWithMouseWheel(e){return e<0}reset(){this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.flipHorizontally=!1,this.flipVertically=!1,this.reCenterImage()}reCenterImage(){this.position=I({},je)}static \u0275fac=function(n){return new(n||i)(h(fe),h(ie),h(A),h(M),h(G),h(Ee))};static \u0275cmp=Q({type:i,selectors:[["nz-image-preview"]],viewQuery:function(n,t){if(n&1&&(J(Qe,5),J(Ye,7)),n&2){let o;ee(o=te())&&(t.imageRef=o.first),ee(o=te())&&(t.imagePreviewWrapper=o.first)}},hostAttrs:[1,"ant-image-preview-root"],hostVars:6,hostBindings:function(n,t){n&1&&Ce("@fadeMotion.start",function(c){return t.onAnimationStart(c)})("@fadeMotion.done",function(c){return t.onAnimationDone(c)}),n&2&&(Se("@.disabled",t.config.nzNoAnimation)("@fadeMotion",t.visible?"enter":"leave"),$("z-index",t.config.nzZIndex),T("ant-image-preview-moving",t.isDragging))},exportAs:["nzImagePreview"],features:[De([G])],decls:17,vars:5,consts:[["imagePreviewWrapper",""],["imgRef",""],[1,"ant-image-preview-mask"],[1,"ant-image-preview-operations-wrapper"],[1,"ant-image-preview-operations"],[1,"ant-image-preview-operations-progress"],[1,"ant-image-preview-operations-operation",3,"ant-image-preview-operations-operation-disabled"],["tabindex","-1",1,"ant-image-preview-wrap",3,"click"],["role","dialog","aria-modal","true",1,"ant-image-preview"],["tabindex","0","aria-hidden","true",1,"ant-image-preview-focus-trap"],[1,"ant-image-preview-content"],[1,"ant-image-preview-body"],["cdkDrag","",1,"ant-image-preview-img-wrapper",3,"cdkDragEnded","cdkDragFreeDragPosition"],[1,"ant-image-preview-switch-left",3,"click"],["nzType","left","nzTheme","outline"],[1,"ant-image-preview-switch-right",3,"click"],["nzType","right","nzTheme","outline"],[1,"ant-image-preview-operations-operation",3,"click"],["nzTheme","outline",1,"ant-image-preview-operations-icon",3,"nzType","nzRotate"],["cdkDragHandle","",1,"ant-image-preview-img",3,"width","height","transform"],["cdkDragHandle","",1,"ant-image-preview-img"]],template:function(n,t){if(n&1){let o=V();C(0,"div",2),g(1,"div",3),H(2,Ke,4,4),g(3,"ul",4),H(4,qe,2,2,"li",5),q(5,Xe,2,4,"li",6,K),S()(),g(7,"div",7),b("click",function(l){return k(o),D(t.maskClosable&&l.target===l.currentTarget&&t.onClose())}),g(8,"div",8),C(9,"div",9),g(10,"div",10)(11,"div",11)(12,"div",12,0),b("cdkDragEnded",function(l){return k(o),D(t.onDragEnd(l))}),q(14,et,1,1,null,null,K),S()()(),C(16,"div",9),S()()}n&2&&(v(2),L(t.images.length>1?2:-1),v(2),L(t.images.length>1?4:-1),v(),X(t.operations),v(7),$("transform",t.previewImageWrapperTransform),Y("cdkDragFreeDragPosition",t.position),v(2),X(t.images))},dependencies:[Ne,xe,We,He],encapsulation:2,data:{animation:[Ze]},changeDetection:0})}return i})(),se=class{previewInstance;config;overlayRef;destroy$=new E;constructor(r,e,n){this.previewInstance=r,this.config=e,this.overlayRef=n,n.keydownEvents().pipe(O(t=>this.config.nzKeyboard&&(t.keyCode===27||t.keyCode===37||t.keyCode===39)&&!Re(t))).subscribe(t=>{t.preventDefault(),t.keyCode===27&&r.onClose(),t.keyCode===37&&this.prev(),t.keyCode===39&&this.next()}),n.detachments().subscribe(()=>{this.overlayRef.dispose()}),r.closeClick.pipe(me(1),he(()=>r.animationStateChanged),O(t=>t.phaseName==="done"),d(this.destroy$)).subscribe(()=>{this.close()})}switchTo(r){this.previewInstance.switchTo(r)}
1next(){this.previewInstance.next()}prev(){this.previewInstance.prev()}close(){this.destroy$.next(),this.overlayRef.dispose()}},Be=(()=>{class i{overlay;injector;nzConfigService;directionality;constructor(e,n,t,o){this.overlay=e,this.injector=n,this.nzConfigService=t,this.directionality=o}preview(e,n,t){return this.display(e,n,t)}display(e,n,t){let o=I(I({},new M),n??{}),c=this.createOverlay(o),l=this.attachPreviewComponent(c,o);l.setImages(e,t);let f=new se(l,o,c);return l.previewRef=f,f}attachPreviewComponent(e,n){let t=W.create({parent:this.injector,providers:[{provide:Me,useValue:e},{provide:M,useValue:n}]}),o=new Te(Ge,null,t);return e.attach(o).instance}createOverlay(e){let n=this.nzConfigService.getConfigForComponent(Ae)||{},t=new Fe({scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:e.nzCloseOnNavigation??n.nzCloseOnNavigation??!0,direction:e.nzDirection||n.nzDirection||this.directionality.value});return this.overlay.create(t)}static \u0275fac=function(n){return new(n||i)(N(Oe),N(W),N(A),N(oe))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),st="image",Zt=(()=>{let i,r=[],e=[],n,t=[],o=[],c,l=[],f=[],_,w=[],y=[];return class le{static{let s=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[F()],n=[F()],c=[F()],_=[F()],x(null,null,i,{kind:"field",name:"nzDisablePreview",static:!1,private:!1,access:{has:a=>"nzDisablePreview"in a,get:a=>a.nzDisablePreview,set:(a,m)=>{a.nzDisablePreview=m}},metadata:s},r,e),x(null,null,n,{kind:"field",name:"nzFallback",static:!1,private:!1,access:{has:a=>"nzFallback"in a,get:a=>a.nzFallback,set:(a,m)=>{a.nzFallback=m}},metadata:s},t,o),x(null,null,c,{kind:"field",name:"nzPlaceholder",static:!1,private:!1,access:{has:a=>"nzPlaceholder"in a,get:a=>a.nzPlaceholder,set:(a,m)=>{a.nzPlaceholder=m}},metadata:s},l,f),x(null,null,_,{kind:"field",name:"nzScaleStep",static:!1,private:!1,access:{has:a=>"nzScaleStep"in a,get:a=>a.nzScaleStep,set:(a,m)=>{a.nzScaleStep=m}},metadata:s},w,y),s&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})}nzConfigService;elementRef;nzImageService;cdr;directionality;_nzModuleName=st;nzSrc="";nzSrcset="";nzDisablePreview=u(this,r,!1);nzFallback=(u(this,e),u(this,t,null));nzPlaceholder=(u(this,o),u(this,l,null));nzScaleStep=(u(this,f),u(this,w,null));dir=u(this,y);backLoadImage;status="normal";backLoadDestroy$=new E;destroy$=new E;document=Z(ne);parentGroup=Z(tt,{optional:!0});get previewable(){return!this.nzDisablePreview&&this.status!=="error"}constructor(s,a,m,P,ce){this.nzConfigService=s,this.elementRef=a,this.nzImageService=m,this.cdr=P,this.directionality=ce}ngOnInit(){this.backLoad(),this.parentGroup&&this.parentGroup.addImage(this),this.directionality&&(this.directionality.change?.pipe(d(this.destroy$)).subscribe(s=>{this.dir=s,this.cdr.detectChanges()}),this.dir=this.directionality.value)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onPreview(){if(this.previewable)if(this.parentGroup){let s=this.parentGroup.images.filter(p=>p.previewable),a=s.map(p=>({src:p.nzSrc,srcset:p.nzSrcset})),m=s.findIndex(p=>this===p),P=new Map;s.forEach(p=>{P.set(p.nzSrc??p.nzSrcset,p.nzScaleStep??this.parentGroup.nzScaleStep??this.nzScaleStep??re)}),this.nzImageService.preview(a,{nzDirection:this.dir},P).switchTo(m)}else{let s=[{src:this.nzSrc,srcset:this.nzSrcset}];this.nzImageService.preview(s,{nzDirection:this.dir,nzScaleStep:this.nzScaleStep??re})}}getElement(){return this.elementRef}ngOnChanges(s){let{nzSrc:a}=s;a&&(this.getElement().nativeElement.src=a.currentValue,this.backLoad())}backLoad(){this.backLoadImage=this.document.createElement("img"),this.backLoadImage.src=this.nzSrc,this.backLoadImage.srcset=this.nzSrcset,this.status="loading",this.backLoadDestroy$.next(),this.backLoadDestroy$.complete(),this.backLoadDestroy$=new E,this.backLoadImage.complete?(this.status="normal",this.getElement().nativeElement.src=this.nzSrc,this.getElement().nativeElement.srcset=this.nzSrcset):(this.nzPlaceholder?(this.getElement().nativeElement.src=this.nzPlaceholder,this.getElement().nativeElement.srcset=""):(this.getElement().nativeElement.src=this.nzSrc,this.getElement().nativeElement.srcset=this.nzSrcset),B(this.backLoadImage,"load").pipe(d(this.backLoadDestroy$),d(this.destroy$)).subscribe(()=>{this.status="normal",this.getElement().nativeElement.src=this.nzSrc,this.getElement().nativeElement.srcset=this.nzSrcset}),B(this.backLoadImage,"error").pipe(d(this.backLoadDestroy$),d(this.destroy$)).subscribe(()=>{this.status="error",this.nzFallback&&(this.getElement().nativeElement.src=this.nzFallback,this.getElement().nativeElement.srcset="")}))}static \u0275fac=function(a){return new(a||le)(h(A),h(ue),h(Be),h(ie),h(oe))};static \u0275dir=we({type:le,selectors:[["img","nz-image",""]],hostBindings:function(a,m){a&1&&b("click",function(){return m.onPreview()})},inputs:{nzSrc:"nzSrc",nzSrcset:"nzSrcset",nzDisablePreview:[2,"nzDisablePreview","nzDisablePreview",Pe],nzFallback:"nzFallback",nzPlaceholder:"nzPlaceholder",nzScaleStep:"nzScaleStep"},exportAs:["nzImage"],features:[ge]})}})(),Wt=(()=>
1{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ze({type:i});static \u0275inj=de({providers:[Be],imports:[Ge]})}return i})();export{tt as a,Be as b,Zt as c,Wt as d};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.