Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2 wiersze
24 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3373],{53469:function(){},27904:function(bt,et,l){"use strict";l.d(et,{Z:function(){return rt}});var N=l(22122),j=l(90484),u=l(95357),J=l(28991),G=l(96156),p=l(28481),me=l(81253),i=l(67294),tt=l(94184),Q=l.n(tt),De=l(27678),ie=l(21770),ft=l(57315),q=l(64019),$e=l(15105),Te=l(80334),nt=l(75164);function M(f){var n=i.useRef(null),g=i.useState(f),o=(0,p.Z)(g,2),m=o[0],y=o[1],x=i.useRef([]),P=function(U){n.current===null&&(x.current=[],n.current=(0,nt.Z)(function(){y(function(Z){var R=Z;return x.current.forEach(function(O){R=(0,J.Z)((0,J.Z)({},R),O)}),n.current=null,R})})),x.current.push(U)};return i.useEffect(function(){return function(){return n.current&&nt.Z.cancel(n.current)}},[]),[m,P]}function Ee(f,n,g,o){var m=n+g,y=(g-o)/2;if(g>o){if(n>0)return(0,G.Z)({},f,y);if(n<0&&m<o)return(0,G.Z)({},f,-y)}else if(n<0||m>o)return(0,G.Z)({},f,n<0?y:-y);return{}}function Ue(f,n,g,o){var m=(0,De.g1)(),y=m.width,x=m.height,P=null;return f<=y&&n<=x?P={x:0,y:0}:(f>y||n>x)&&(P=(0,J.Z)((0,J.Z)({},Ee("x",g,f,y)),Ee("y",o,n,x))),P}var We=["visible","onVisibleChange","getContainer","current","countRender"],Ne=i.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),K=Ne.Provider,ge=function(n){var g=n.previewPrefixCls,o=g===void 0?"rc-image-preview":g,m=n.children,y=n.icons,x=y===void 0?{}:y,P=n.preview,S=(0,j.Z)(P)==="object"?P:{},U=S.visible,Z=U===void 0?void 0:U,R=S.onVisibleChange,O=R===void 0?void 0:R,V=S.getContainer,_=V===void 0?void 0:V,re=S.current,ee=re===void 0?0:re,Oe=S.countRender,I=Oe===void 0?void 0:Oe,B=(0,me.Z)(S,We),ot=(0,i.useState)(new Map),at=(0,p.Z)(ot,2),Ie=at[0],X=at[1],ke=(0,i.useState)(),it=(0,p.Z)(ke,2),je=it[0],Me=it[1],Ge=(0,ie.Z)(!!Z,{value:Z,onChange:O}),st=(0,p.Z)(Ge,2),ye=st[0],F=st[1],oe=(0,i.useState)(null),$=(0,p.Z)(oe,2),te=$[0],Ke=$[1],Pe=Z!==void 0,Se=Array.from(Ie.keys()),Ze=Se[ee],ve=new Map(Array.from(Ie).filter(function(fe){var L=(0,p.Z)(fe,2),W=L[1].canPreview;return!!W}).map(function(fe){var L=(0,p.Z)(fe,2),W=L[0],A=L[1].url;return[W,A]})),He=function(L,W){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,k=function(){X(function(ae){var Be=new Map(ae),Xe=Be.delete(L);return Xe?Be:ae})};return X(function(lt){return new Map(lt).set(L,{url:W,canPreview:A})}),k},Ye=function(L){L.stopPropagation(),F(!1),Ke(null)};return i.useEffect(function(){Me(Ze)},[Ze]),i.useEffect(function(){!ye&&Pe&&Me(Ze)},[Ze,Pe,ye]),i.createElement(K,{value:{isPreviewGroup:!0,previewUrls:ve,setPreviewUrls:X,current:je,setCurrent:Me,setShowPreview:F,setMousePosition:Ke,registerImage:He}},m,i.createElement(t,(0,N.Z)({"aria-hidden":!ye,visible:ye,prefixCls:o,onClose:Ye,mousePosition:te,src:ve.get(je),icons:x,getContainer:_,countRender:I},B)))},dt=ge,xe=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","countRender"],z=i.useState,Ae=i.useEffect,mt=i.useCallback,D=i.useRef,e=i.useContext,a={x:0,y:0},r=function(n){var g,o=n.prefixCls,m=n.src,y=n.alt,x=n.onClose,P=n.afterClose,S=n.visible,U=n.icons,Z=U===void 0?{}:U,R=n.rootClassName,O=n.countRender,V=(0,me.Z)(n,xe),_=Z.rotateLeft,re=Z.rotateRight,ee=Z.zoomIn,Oe=Z.zoomOut,I=Z.close,B=Z.left,ot=Z.right,at=z(1),Ie=(0,p.Z)(at,2),X=Ie[0],ke=Ie[1],it=z(0),je=(0,p.Z)(it,2),Me=je[0],Ge=je[1],st=M(a),ye=(0,p.Z)(st,2),F=ye[0],oe=ye[1],$=D(),te=D({originX:0,originY:0,deltaX:0,deltaY:0}),Ke=z(!1),Pe=(0,p.Z)(Ke,2),Se=Pe[0],Ze=Pe[1],ve=e(Ne),He=ve.previewUrls,Ye=ve.current,fe=ve.isPreviewGroup,L=ve.setCurrent,W=He.size,A=Array.from(He.keys()),k=A.indexOf(Ye),lt=fe?He.get(Ye):m,ae=fe&&W>1,Be=z({wheelDirection:0}),Xe=(0,p.Z)(Be,2),pt=Xe[0],wt=Xe[1],gt=function(){ke(1),Ge(0),oe(a)},Fe=function(){ke(function(d){return d+1}),oe(a)},yt=function(){X>1&&ke(function(d){return d-1}),oe(a)},Pt=function(){Ge(function(d){return d+90})},Rt=function(){Ge(function(d){return d-90})},St=function(d){d.preventDefault(),d.stopPropagation(),k>0&&L(A[k-1])},Je=function(d){d.preventDefault(),d.stopPropagation(),k<W-1&&L(A[k+1])},Qe=Q()((0,G.Z)({},"".concat(o,"-moving"),Se)),Ct="".concat(o,"-operations-operation"),Ot="".concat(o,"-operations-icon"),It=[{icon:I,onClick:x,type:"close"},{icon:ee,onClick:Fe,type:"zoomIn"},{icon:Oe,onClick:yt,type:"zoomOut",disabled:X===1},{icon:re,onClick:Pt,type:"rotateRight"},{icon:_,onClick:Rt,type:"rotateLeft"}],Zt=function(){if(S&&Se){var d=$.current.offsetWidth*X,de=$.current.offsetHeight*X,Le=$.current.getBoundingClientRect(),_e=Le.left,ht=Le.top,ut=Me%180!=0;Ze(!1);var xt=Ue(ut?de:d,ut?d:de,_e,ht);xt&&oe((0,J.Z)({},xt))}},Et=function(d){d.button===0&&(d.preventDefault(),d.stopPropagation(),te.current.deltaX=d.pageX-F.x,te.current.deltaY=d.pageY-F.y,te.current.originX=F.x,te.current.originY=F.y,Ze(!0))},Nt=function(d){S&&Se&&oe({x:d.pageX-te.current.deltaX,y:d.pageY-te.current.deltaY})},kt=function(d){if(!!S){d.preventDefault();var de=d.deltaY;wt({wheelDirection:de})}},ct=mt(function(w){!S||!ae||(w.preventDefault(),w.keyCode===$e.Z.LEFT?k>0&&L(A[k-1]):w.keyCode===$e.Z.RIGHT&&k<W-1&&L(A[k+1]))},[k,W,A,L,ae,S]),qe=function(){S&&(X!==1&&ke(1),(F.x!==a.x||F.y!==a.y)&&oe(a))};return Ae(function(){var w=pt.wheelDirection;w>0?yt():w<0&&Fe()},[pt]),Ae(function(){var w,d,de=(0,q.Z)(window,"mouseup",Zt,!1),Le=(0,q.Z)(window,"mousemove",Nt,!1),_e=(0,q.Z)(window,"wheel",kt,{passive:!1}),ht=(0,q.Z)(window,"keydown",ct,!1);try{window.top!==window.self&&(w=(0,q.Z)(window.top,"mouseup",Zt,!1),d=(0,q.Z)(window.top,"mousemove",Nt,!1))}catch(ut){(0,Te.Kp)(!1,"[rc-image] ".concat(ut))}return function(){de.remove(),Le.remove(),_e.remove(),ht.remove(),w&&w.remove(),d&&d.remove()}},[S,Se,ct]),i.createElement(ft.Z,(0,N.Z)({transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:o,onClose:x,afterClose:gt,visible:S,wrapClassName:Qe,rootClassName:R},V),i.createElement("ul",{className:"".concat(o,"-operations")},ae&&i.createElement("li",{className:"".concat(o,"-operations-progress")},(g=O==null?void 0:O(k+1,W))!==null&&g!==void 0?g:"".concat(k+1," / ").concat(W)),It.map(function(w){var d=w.icon,de=w.onClick,Le=w.type,_e=w.disabled;return i.createElement("li",{className:Q()(Ct,(0,G.Z)({},"".concat(o,"-operations-operation-disabled"),!!_e)),onClick:de,key:Le},i.isValidElement(d)?i.cloneElement(d,{className:Ot}):d)})),i.createElement("div",{className:"".concat(o,"-img-wrapper"),style:{transform:"translate3d(".concat(F.x,"px, ").concat(F.y,"px, 0)")}},i.createElement("img",{width:n.width,height:n.height,onMouseDown:Et,onDoubleClick:qe,ref:$,className:"".concat(o,"-img"),src:lt,alt:y,style:{transform:"scale3d(".concat(X,", ").concat(X,", 1) rotate(").concat(Me,"deg)")}})),ae&&i.createElement("div",{className:Q()("".concat(o,"-switch-left"),(0,G.Z)({},"".concat(o,"-switch-left-disabled"),k===0)),onClick:St},B),ae&&i.createElement("div",{className:Q()("".concat(o,"-switch-right"),(0,G.Z)({},"".concat(o,"-switch-right-disabled"),k===W-1)),onClick:Je},ot))},t=r,s=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap","draggable"],c=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons"],h=0,v=function(n){var g,o=n.src,m=n.alt,y=n.onPreviewClose,x=n.prefixCls,P=x===void 0?"rc-image":x,S=n.previewPrefixCls,U=S===void 0?"".concat(P,"-preview"):S,Z=n.placeholder,R=n.fallback,O=n.width,V=n.height,_=n.style,re=n.preview,ee=re===void 0?!0:re,Oe=n.className,I=n.onClick,B=n.onError,ot=n.wrapperClassName,at=n.wrapperStyle,Ie=n.rootClassName,X=n.crossOrigin,ke=n.decoding,it=n.loading,je=n.referrerPolicy,Me=n.sizes,Ge=n.srcSet,st=n.useMap,ye=n.draggable,F=(0,me.Z)(n,s),oe=Z&&Z!==!0,$=(0,j.Z)(ee)==="object"?ee:{},te=$.src,Ke=$.visible,Pe=Ke===void 0?void 0:Ke,Se=$.onVisibleChange,Ze=Se===void 0?y:Se,ve=$.getContainer,He=ve===void 0?void 0:ve,Ye=$.mask,fe=$.maskClassName,L=$.icons,W=(0,me.Z)($,c),A=te!=null?te:o,k=Pe!==void 0,lt=(0,ie.Z)(!!Pe,{value:Pe,onChange:Ze}),ae=(0,p.Z)(lt,2),Be=ae[0],Xe=ae[1],pt=(0,i.useState)(oe?"loading":"normal"),wt=(0,p.Z)(pt,2),gt=wt[0],Fe=wt[1],yt=(0,i.useState)(null),Pt=(0,p.Z)(yt,2),Rt=Pt[0],St=Pt[1],Je=gt==="error",Qe=i.useContext(Ne),Ct=Qe.isPreviewGroup,Ot=Qe.setCurrent,It=Qe.setShowPreview,Zt=Qe.setMousePosition,Et=Qe.registerImage,Nt=i.useState(function(){return h+=1,h}),kt=(0,p.Z)(Nt,1),ct=kt[0],qe=ee&&!Je,w=i.useRef(!1),d=function(){Fe("normal")},de=function(ne){B&&B(ne),Fe("error")},Le=function(ne){if(!k){var Lt=(0,De.os)(ne.target),Dt=Lt.left,$t=Lt.top;Ct?(Ot(ct),Zt({x:Dt,y:$t})):St({x:Dt,y:$t})}Ct?It(!0):Xe(!0),I&&I(ne)},_e=function(ne){ne.stopPropagation(),Xe(!1),k||St(null)},ht=function(ne){w.current=!1,gt==="loading"&&(ne==null?void 0:ne.complete)&&(ne.naturalWidth||ne.naturalHeight)&&(w.current=!0,d())};i.useEffect(function(){var vt=Et(ct,A);return vt},[]),i.useEffect(function(){Et(ct,A,qe)},[A,qe]),i.useEffect(function(){Je&&Fe("normal"),oe&&!w.current&&Fe("loading")},[o]);var ut=Q()(P,ot,Ie,(0,G.Z)({},"".concat(P,"-error"),Je)),xt=Je&&R?R:A,Mt={crossOrigin:X,decoding:ke,draggable:ye,loading:it,referrerPolicy:je,sizes:Me,srcSet:Ge,useMap:st,alt:m,className:Q()("".concat(P,"-img"),(0,G.Z)({},"".concat(P,"-img-placeholder"),Z===!0),Oe),style:(0,J.Z)({height:V},_)};return i.createElement(i.Fragment,null,i.createElement("div",(0,N.Z)({},F,{className:ut,onClick:qe?Le:I,style:(0,J.Z)({width:O,height:V},at)}),i.createElement("img",(0,N.Z)({},Mt,{ref:ht},Je&&R?{src:R}:{onLoad:d,onError:de,src:o},{width:O,height:V})),gt==="loading"&&i.createElement("div",{"aria-hidden":"true",className:"".concat(P,"-placeholder")},Z),Ye&&qe&&i.createElement("div",{className:Q()("".concat(P,"-mask"),fe),style:{display:((g=Mt.style)===null||g===void 0?void 0:g.display)==="none"?"none":void 0}},Ye)),!Ct&&qe&&i.createElement(t,(0,N.Z)({"aria-hidden":!Be,visible:Be,prefixCls:U,onClose:_e,mousePosition:Rt,src:xt,alt:m,getContainer:He,icons:L,rootClassName:Ie},W)))};v.PreviewGroup=dt,v.displayName="Image";var C=v,E=C,b=l(53124),H=l(40378),T=l(33603),Ce=l(54549),se=l(67724),le=l(8812),be=l(17582),ze=l(3035),he=l(72504),Re=l(16130),Y=function(f,n){var g={};for(var o in f)Object.prototype.hasOwnProperty.call(f,o)&&n.indexOf(o)<0&&(g[o]=f[o]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,o=Object.getOwnPropertySymbols(f);m<o.length;m++)n.indexOf(o[m])<0&&Object.prototype.propertyIsEnumerable.call(f,o[m])&&(g[o[m]]=f[o[m]]);return g},ce={rotateLeft:i.createElement(be.Z,null),rotateRight:i.createElement(ze.Z,null),zoomIn:i.createElement(he.Z,null),zoomOut:i.createElement(Re.Z,null),close:i.createElement(Ce.Z,null),left:i.createElement(se.Z,null),right:i.createElement(le.Z,null)},ue=function(n){var g=n.previewPrefixCls,o=n.preview,m=Y(n,["previewPrefixCls","preview"]),y=i.useContext(b.E_),x=y.getPrefixCls,P=x("image-preview",g),S=x(),U=i.useMemo(function(){if(o===!1)return o;var Z=(0,j.Z)(o)==="object"?o:{};return(0,N.Z)((0,N.Z)({},Z),{transitionName:(0,T.mL)(S,"zoom",Z.transitionName),maskTransitionName:(0,T.mL)(S,"fade",Z.maskTransitionName)})},[o]);return i.createElement(E.PreviewGroup,(0,N.Z)({preview:U,previewPrefixCls:P,icons:ce},m))},pe=ue,we=function(f,n){var g={};for(var o in f)Object.prototype.hasOwnProperty.call(f,o)&&n.indexOf(o)<0&&(g[o]=f[o]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,o=Object.getOwnPropertySymbols(f);m<o.length;m++)n.indexOf(o[m])<0&&Object.prototype.propertyIsEnumerable.call(f,o[m])&&(g[o[m]]=f[o[m]]);return g},Ve=function(n){var g=n.prefixCls,o=n.preview,m=we(n,["prefixCls","preview"]),y=(0,i.useContext)(b.E_),x=y.getPrefixCls,P=y.locale,S=P===void 0?H.Z:P,U=y.getPopupContainer,Z=x("image",g),R=x(),O=S.Image||H.Z.Image,V=i.useMemo(function(){if(o===!1)return o;var _=(0,j.Z)(o)==="object"?o:{},re=_.getContainer,ee=we(_,["getContainer"]);return(0,N.Z)((0,N.Z)({mask:i.createElement("div",{className:"".concat(Z,"-mask-info")},i.createElement(u.Z,null),O==null?void 0:O.preview),icons:ce},ee),{getContainer:re||U,transitionName:(0,T.mL)(R,"zoom",_.transitionName),maskTransitionName:(0,T.mL)(R,"fade",_.maskTransitionName)})},[o,O]);return i.createElement(E,(0,N.Z)({prefixCls:Z,preview:V},m))};Ve.PreviewGroup=pe;var rt=Ve},12968:function(bt,et,l){"use strict";var N=l(38663),j=l.n(N),u=l(53469),J=l.n(u)},57315:function(bt,et,l){"use strict";l.d(et,{Z:function(){return D}});var N=l(22122),j=l(28481),u=l(67294),J=l.t(u,2),G=l(2016),p=l(28991),me=l(94184),i=l.n(me),tt=l(15105);function Q(){var e=(0,p.Z)({},J);return e.useId}var De=0;function ie(){}function ft(e){var a=u.useState("ssr-id"),r=(0,j.Z)(a,2),t=r[0],s=r[1],c=Q(),h=c==null?void 0:c();return u.useEffect(function(){if(!c){var v=De;De+=1,s("rc_unique_".concat(v))}},[]),e||h||t}var q=l(94999),$e=l(64217),Te=l(63441);function nt(e){var a=e.prefixCls,r=e.style,t=e.visible,s=e.maskProps,c=e.motionName;return u.createElement(Te.Z,{key:"mask",visible:t,motionName:c,leavedClassName:"".concat(a,"-mask-hidden")},function(h){var v=h.className,C=h.style;return u.createElement("div",(0,N.Z)({style:(0,p.Z)((0,p.Z)({},C),r),className:i()("".concat(a,"-mask"),v)},s))})}function M(e,a,r){var t=a;return!t&&r&&(t="".concat(e,"-").concat(r)),t}function Ee(e,a){var r=e["page".concat(a?"Y":"X","Offset")],t="scroll".concat(a?"Top":"Left");if(typeof r!="number"){var s=e.document;r=s.documentElement[t],typeof r!="number"&&(r=s.body[t])}return r}function Ue(e){var a=e.getBoundingClientRect(),r={left:a.left,top:a.top},t=e.ownerDocument,s=t.defaultView||t.parentWindow;return r.left+=Ee(s),r.top+=Ee(s,!0),r}var We=u.memo(function(e){var a=e.children;return a},function(e,a){var r=a.shouldUpdate;return!r}),Ne={width:0,height:0,overflow:"hidden",outline:"none"},K=u.forwardRef(function(e,a){var r=e.prefixCls,t=e.className,s=e.style,c=e.title,h=e.ariaId,v=e.footer,C=e.closable,E=e.closeIcon,b=e.onClose,H=e.children,T=e.bodyStyle,Ce=e.bodyProps,se=e.modalRender,le=e.onMouseDown,be=e.onMouseUp,ze=e.holderRef,he=e.visible,Re=e.forceRender,Y=e.width,ce=e.height,ue=(0,u.useRef)(),pe=(0,u.useRef)();u.useImperativeHandle(a,function(){return{focus:function(){var o;(o=ue.current)===null||o===void 0||o.focus()},changeActive:function(o){var m=document,y=m.activeElement;o&&y===pe.current?ue.current.focus():!o&&y===ue.current&&pe.current.focus()}}});var we={};Y!==void 0&&(we.width=Y),ce!==void 0&&(we.height=ce);var Ve;v&&(Ve=u.createElement("div",{className:"".concat(r,"-footer")},v));var rt;c&&(rt=u.createElement("div",{className:"".concat(r,"-header")},u.createElement("div",{className:"".concat(r,"-title"),id:h},c)));var f;C&&(f=u.createElement("button",{type:"button",onClick:b,"aria-label":"Close",className:"".concat(r,"-close")},E||u.createElement("span",{className:"".concat(r,"-close-x")})));var n=u.createElement("div",{className:"".concat(r,"-content")},f,rt,u.createElement("div",(0,N.Z)({className:"".concat(r,"-body"),style:T},Ce),H),Ve);return u.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":c?h:null,"aria-modal":"true",ref:ze,style:(0,p.Z)((0,p.Z)({},s),we),className:i()(r,t),onMouseDown:le,onMouseUp:be},u.createElement("div",{tabIndex:0,ref:ue,style:Ne,"aria-hidden":"true"}),u.createElement(We,{shouldUpdate:he||Re},se?se(n):n),u.createElement("div",{tabIndex:0,ref:pe,style:Ne,"aria-hidden":"true"}))}),ge=K,dt=u.forwardRef(function(e,a){var r=e.prefixCls,t=e.title,s=e.style,c=e.className,h=e.visible,v=e.forceRender,C=e.destroyOnClose,E=e.motionName,b=e.ariaId,H=e.onVisibleChanged,T=e.mousePosition,Ce=(0,u.useRef)(),se=u.useState(),le=(0,j.Z)(se,2),be=le[0],ze=le[1],he={};be&&(he.transformOrigin=be);function Re(){var Y=Ue(Ce.current);ze(T?"".concat(T.x-Y.left,"px ").concat(T.y-Y.top,"px"):"")}return u.createElement(Te.Z,{visible:h,onVisibleChanged:H,onAppearPrepare:Re,onEnterPrepare:Re,forceRender:v,motionName:E,removeOnLeave:C,ref:Ce},function(Y,ce){var ue=Y.className,pe=Y.style;return u.createElement(ge,(0,N.Z)({},e,{ref:a,title:t,ariaId:b,prefixCls:r,holderRef:ce,style:(0,p.Z)((0,p.Z)((0,p.Z)({},pe),s),he),className:i()(c,ue)}))})});dt.displayName="Content";var xe=dt;function z(e){var a=e.prefixCls,r=a===void 0?"rc-dialog":a,t=e.zIndex,s=e.visible,c=s===void 0?!1:s,h=e.keyboard,v=h===void 0?!0:h,C=e.focusTriggerAfterClose,E=C===void 0?!0:C,b=e.scrollLocker,H=e.wrapStyle,T=e.wrapClassName,Ce=e.wrapProps,se=e.onClose,le=e.afterClose,be=e.transitionName,ze=e.animation,he=e.closable,Re=he===void 0?!0:he,Y=e.mask,ce=Y===void 0?!0:Y,ue=e.maskTransitionName,pe=e.maskAnimation,we=e.maskClosable,Ve=we===void 0?!0:we,rt=e.maskStyle,f=e.maskProps,n=e.rootClassName,g=(0,u.useRef)(),o=(0,u.useRef)(),m=(0,u.useRef)(),y=u.useState(c),x=(0,j.Z)(y,2),P=x[0],S=x[1],U=ft();function Z(I){if(I){if(!(0,q.Z)(o.current,document.activeElement)){var B;g.current=document.activeElement,(B=m.current)===null||B===void 0||B.focus()}}else{if(S(!1),ce&&g.current&&E){try{g.current.focus({preventScroll:!0})}catch(ot){}g.current=null}P&&(le==null||le())}}function R(I){se==null||se(I)}var O=(0,u.useRef)(!1),V=(0,u.useRef)(),_=function(){clearTimeout(V.current),O.current=!0},re=function(){V.current=setTimeout(function(){O.current=!1})},ee=null;Ve&&(ee=function(B){O.current?O.current=!1:o.current===B.target&&R(B)});function Oe(I){if(v&&I.keyCode===tt.Z.ESC){I.stopPropagation(),R(I);return}c&&I.keyCode===tt.Z.TAB&&m.current.changeActive(!I.shiftKey)}return(0,u.useEffect)(function(){return c&&S(!0),function(){}},[c]),(0,u.useEffect)(function(){return function(){clearTimeout(V.current)}},[]),(0,u.useEffect)(function(){return P?(b==null||b.lock(),b==null?void 0:b.unLock):function(){}},[P,b]),u.createElement("div",(0,N.Z)({className:i()("".concat(r,"-root"),n)},(0,$e.Z)(e,{data:!0})),u.createElement(nt,{prefixCls:r,visible:ce&&c,motionName:M(r,ue,pe),style:(0,p.Z)({zIndex:t},rt),maskProps:f}),u.createElement("div",(0,N.Z)({tabIndex:-1,onKeyDown:Oe,className:i()("".concat(r,"-wrap"),T),ref:o,onClick:ee,style:(0,p.Z)((0,p.Z)({zIndex:t},H),{},{display:P?null:"none"})},Ce),u.createElement(xe,(0,N.Z)({},e,{onMouseDown:_,onMouseUp:re,ref:m,closable:Re,ariaId:U,prefixCls:r,visible:c,onClose:R,onVisibleChanged:Z,motionName:M(r,be,ze)}))))}var Ae=function(a){var r=a.visible,t=a.getContainer,s=a.forceRender,c=a.destroyOnClose,h=c===void 0?!1:c,v=a.afterClose,C=u.useState(r),E=(0,j.Z)(C,2),b=E[0],H=E[1];return u.useEffect(function(){r&&H(!0)},[r]),t===!1?u.createElement(z,(0,N.Z)({},a,{getOpenCount:function(){return 2}})):!s&&h&&!b?null:u.createElement(G.Z,{visible:r,forceRender:s,getContainer:t},function(T){return u.createElement(z,(0,N.Z)({},a,{destroyOnClose:h,afterClose:function(){v==null||v(),H(!1)}},T))})};Ae.displayName="Dialog";var mt=Ae,D=mt},2016:function(bt,et,l){"use strict";l.d(et,{Z:function(){return mt}});var N=l(6610),j=l(5991),u=l(10379),J=l(54070),G=l(90484),p=l(67294),me=l(75164),i=l(59015),tt=l(98924),Q=l(74204);function De(D){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!D)return{};var a=e.element,r=a===void 0?document.body:a,t={},s=Object.keys(D);return s.forEach(function(c){t[c]=r.style[c]}),s.forEach(function(c){r.style[c]=D[c]}),t}var ie=De;function ft(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var q={},$e=function(D){if(!(!ft()&&!D)){var e="ant-scrolling-effect",a=new RegExp("".concat(e),"g"),r=document.body.className;if(D){if(!a.test(r))return;ie(q),q={},document.body.className=r.replace(a,"").trim();return}var t=(0,Q.Z)();if(t&&(q=ie({position:"relative",width:"calc(100% - ".concat(t,"px)")}),!a.test(r))){var s="".concat(r," ").concat(e);document.body.className=s.trim()}}},Te=l(85061),nt=0,M=[],Ee="ant-scrolling-effect",Ue=new RegExp("".concat(Ee),"g"),We=new Map,Ne=(0,j.Z)(function D(e){var a=this;(0,N.Z)(this,D),this.lockTarget=void 0,this.options=void 0,this.getContainer=function(){var r;return(r=a.options)===null||r===void 0?void 0:r.container},this.reLock=function(r){var t=M.find(function(s){var c=s.target;return c===a.lockTarget});t&&a.unLock(),a.options=r,t&&(t.options=r,a.lock())},this.lock=function(){var r;if(!M.some(function(v){var C=v.target;return C===a.lockTarget})){if(M.some(function(v){var C,E=v.options;return(E==null?void 0:E.container)===((C=a.options)===null||C===void 0?void 0:C.container)})){M=[].concat((0,Te.Z)(M),[{target:a.lockTarget,options:a.options}]);return}var t=0,s=((r=a.options)===null||r===void 0?void 0:r.container)||document.body;(s===document.body&&window.innerWidth-document.documentElement.clientWidth>0||s.scrollHeight>s.clientHeight)&&(t=(0,Q.Z)());var c=s.className;if(M.filter(function(v){var C,E=v.options;return(E==null?void 0:E.container)===((C=a.options)===null||C===void 0?void 0:C.container)}).length===0&&We.set(s,ie({width:t!==0?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:s})),!Ue.test(c)){var h="".concat(c," ").concat(Ee);s.className=h.trim()}M=[].concat((0,Te.Z)(M),[{target:a.lockTarget,options:a.options}])}},this.unLock=function(){var r,t=M.find(function(h){var v=h.target;return v===a.lockTarget});if(M=M.filter(function(h){var v=h.target;return v!==a.lockTarget}),!(!t||M.some(function(h){var v,C=h.options;return(C==null?void 0:C.container)===((v=t.options)===null||v===void 0?void 0:v.container)}))){var s=((r=a.options)===null||r===void 0?void 0:r.container)||document.body,c=s.className;!Ue.test(c)||(ie(We.get(s),{element:s}),We.delete(s),s.className=s.className.replace(Ue,"").trim())}},this.lockTarget=nt++,this.options=e}),K=0,ge=(0,tt.Z)();function dt(){return 0}var xe={},z=function(e){if(!ge)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if((0,G.Z)(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body},Ae=function(D){(0,u.Z)(a,D);var e=(0,J.Z)(a);function a(r){var t;return(0,N.Z)(this,a),t=e.call(this,r),t.container=void 0,t.componentRef=p.createRef(),t.rafId=void 0,t.scrollLocker=void 0,t.renderComponent=void 0,t.updateScrollLocker=function(s){var c=s||{},h=c.visible,v=t.props,C=v.getContainer,E=v.visible;E&&E!==h&&ge&&z(C)!==t.scrollLocker.getContainer()&&t.scrollLocker.reLock({container:z(C)})},t.updateOpenCount=function(s){var c=s||{},h=c.visible,v=c.getContainer,C=t.props,E=C.visible,b=C.getContainer;E!==h&&ge&&z(b)===document.body&&(E&&!h?K+=1:s&&(K-=1));var H=typeof b=="function"&&typeof v=="function";(H?b.toString()!==v.toString():b!==v)&&t.removeCurrentContainer()},t.attachToParent=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(s||t.container&&!t.container.parentNode){var c=z(t.props.getContainer);return c?(c.appendChild(t.container),!0):!1}return!0},t.getContainer=function(){return ge?(t.container||(t.container=document.createElement("div"),t.attachToParent(!0)),t.setWrapperClassName(),t.container):null},t.setWrapperClassName=function(){var s=t.props.wrapperClassName;t.container&&s&&s!==t.container.className&&(t.container.className=s)},t.removeCurrentContainer=function(){var s,c;(s=t.container)===null||s===void 0||(c=s.parentNode)===null||c===void 0||c.removeChild(t.container)},t.switchScrollingEffect=function(){K===1&&!Object.keys(xe).length?($e(),xe=ie({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):K||(ie(xe),xe={},$e(!0))},t.scrollLocker=new Ne({container:z(r.getContainer)}),t}return(0,j.Z)(a,[{key:"componentDidMount",value:function(){var t=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=(0,me.Z)(function(){t.forceUpdate()}))}},{key:"componentDidUpdate",value:function(t){this.updateOpenCount(t),this.updateScrollLocker(t),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var t=this.props,s=t.visible,c=t.getContainer;ge&&z(c)===document.body&&(K=s&&K?K-1:K),this.removeCurrentContainer(),me.Z.cancel(this.rafId)}},{key:"render",value:function(){var t=this.props,s=t.children,c=t.forceRender,h=t.visible,v=null,C={getOpenCount:function(){return K},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(c||h||this.componentRef.current)&&(v=p.createElement(i.Z,{getContainer:this.getContainer,ref:this.componentRef},s(C))),v}}]),a}(p.Component),mt=Ae}}]);