-
Notifications
You must be signed in to change notification settings - Fork 0
/
42880.8b1d10a7.async.js
1 lines (1 loc) · 7.64 KB
/
42880.8b1d10a7.async.js
1
"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[42880],{303840:function(me,D,a){Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;const r=P(a(554434));function P(R){return R&&R.__esModule?R:{default:R}}const T=r;D.default=T,me.exports=T},763199:function(me,D,a){a.d(D,{b:function(){return z}});var r=a(667294),P=a(908410),T=a(242550),R=a(34203),t=a(366680),ye=a(215671),ee=a(143144),ne=a(132531),te=a(973568),L=function(f){(0,ne.Z)(l,f);var h=(0,te.Z)(l);function l(){return(0,ye.Z)(this,l),h.apply(this,arguments)}return(0,ee.Z)(l,[{key:"render",value:function(){return this.props.children}}]),l}(r.Component),xe=null,O=a(998924),ae={subtree:!0,childList:!0,attributeFilter:["style","class"]};function z(f,h){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae;r.useEffect(function(){if(!(!(0,O.Z)()||!f)){var k,S=Array.isArray(f)?f:[f];return"MutationObserver"in window&&(k=new MutationObserver(h),S.forEach(function(C){k.observe(C,l)})),function(){var C,N;(C=k)===null||C===void 0||C.takeRecords(),(N=k)===null||N===void 0||N.disconnect()}}},[l,f])}var Ke=function(h){var l=h.children,k=h.options,S=h.onMutate,C=S===void 0?function(){}:S,N=useEvent(C),oe=React.useRef(null),re=React.useRef(null),le=React.isValidElement(l)&&supportRef(l),he=useComposeRef(re,le?l.ref:null),e=React.useState(null),n=_slicedToArray(e,2),m=n[0],M=n[1];return useMutateObserver(m,N,k),useLayoutEffect(function(){M(findDOMNode(re.current)||findDOMNode(oe.current))}),l?React.createElement(DomWrapper,{ref:oe},le?React.cloneElement(l,{ref:he}):l):null},Pe=null,Le=null},650010:function(me,D,a){a.d(D,{Z:function(){return he}});var r=a(601413),P=a(297685),T=a(602788),R=a(908410),t=a(667294),ye=t.createContext(null),ee=t.createContext({}),ne=ye,te=a(204942),L=a(487462),xe=a(294184),O=a.n(xe),ae=a(82225),z=a(915105),Ke=a(64217),Pe=a(656790),Le=function(n){var m=n.prefixCls,M=n.className,g=n.style,w=n.children,v=n.containerRef,d=n.id,y=n.onMouseEnter,V=n.onMouseOver,E=n.onMouseLeave,B=n.onClick,p=n.onKeyDown,X=n.onKeyUp,i={onMouseEnter:y,onMouseOver:V,onMouseLeave:E,onClick:B,onKeyDown:p,onKeyUp:X},U=t.useContext(ee),A=U.panel,$=(0,Pe.x1)(A,v);return t.createElement(t.Fragment,null,t.createElement("div",(0,L.Z)({id:d,className:O()("".concat(m,"-content"),M),style:(0,r.Z)({},g),"aria-modal":"true",role:"dialog",ref:$},i),w))},f=Le,h=a(580334);function l(e){return typeof e=="string"&&String(Number(e))===e?((0,h.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}function k(e){warning(!("wrapperClassName"in e),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!e.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var S={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function C(e,n){var m,M,g,w,v=e.prefixCls,d=e.open,y=e.placement,V=e.inline,E=e.push,B=e.forceRender,p=e.autoFocus,X=e.keyboard,i=e.classNames,U=e.rootClassName,A=e.rootStyle,$=e.zIndex,se=e.className,ie=e.id,Y=e.style,Q=e.motion,Ce=e.width,Me=e.height,Re=e.children,ke=e.contentWrapperStyle,ge=e.mask,we=e.maskClosable,ue=e.maskMotion,Ee=e.maskClassName,ce=e.maskStyle,b=e.afterOpenChange,G=e.onClose,Ze=e.onMouseEnter,ve=e.onMouseOver,De=e.onMouseLeave,Oe=e.onClick,Z=e.onKeyDown,de=e.onKeyUp,u=e.styles,J=t.useRef(),j=t.useRef(),q=t.useRef();t.useImperativeHandle(n,function(){return J.current});var Se=function(c){var W=c.keyCode,H=c.shiftKey;switch(W){case z.Z.TAB:{if(W===z.Z.TAB){if(!H&&document.activeElement===q.current){var Ne;(Ne=j.current)===null||Ne===void 0||Ne.focus({preventScroll:!0})}else if(H&&document.activeElement===j.current){var be;(be=q.current)===null||be===void 0||be.focus({preventScroll:!0})}}break}case z.Z.ESC:{G&&X&&(c.stopPropagation(),G(c));break}}};t.useEffect(function(){if(d&&p){var o;(o=J.current)===null||o===void 0||o.focus({preventScroll:!0})}},[d]);var pe=t.useState(!1),F=(0,P.Z)(pe,2),_=F[0],I=F[1],s=t.useContext(ne),fe;E===!1?fe={distance:0}:E===!0?fe={}:fe=E||{};var x=(m=(M=(g=fe)===null||g===void 0?void 0:g.distance)!==null&&M!==void 0?M:s==null?void 0:s.pushDistance)!==null&&m!==void 0?m:180,Ae=t.useMemo(function(){return{pushDistance:x,push:function(){I(!0)},pull:function(){I(!1)}}},[x]);t.useEffect(function(){if(d){var o;s==null||(o=s.push)===null||o===void 0||o.call(s)}else{var c;s==null||(c=s.pull)===null||c===void 0||c.call(s)}},[d]),t.useEffect(function(){return function(){var o;s==null||(o=s.pull)===null||o===void 0||o.call(s)}},[]);var $e=ge&&t.createElement(ae.ZP,(0,L.Z)({key:"mask"},ue,{visible:d}),function(o,c){var W=o.className,H=o.style;return t.createElement("div",{className:O()("".concat(v,"-mask"),W,i==null?void 0:i.mask,Ee),style:(0,r.Z)((0,r.Z)((0,r.Z)({},H),ce),u==null?void 0:u.mask),onClick:we&&d?G:void 0,ref:c})}),Fe=typeof Q=="function"?Q(y):Q,K={};if(_&&x)switch(y){case"top":K.transform="translateY(".concat(x,"px)");break;case"bottom":K.transform="translateY(".concat(-x,"px)");break;case"left":K.transform="translateX(".concat(x,"px)");break;default:K.transform="translateX(".concat(-x,"px)");break}y==="left"||y==="right"?K.width=l(Ce):K.height=l(Me);var Ie={onMouseEnter:Ze,onMouseOver:ve,onMouseLeave:De,onClick:Oe,onKeyDown:Z,onKeyUp:de},We=t.createElement(ae.ZP,(0,L.Z)({key:"panel"},Fe,{visible:d,forceRender:B,onVisibleChanged:function(c){b==null||b(c)},removeOnLeave:!1,leavedClassName:"".concat(v,"-content-wrapper-hidden")}),function(o,c){var W=o.className,H=o.style;return t.createElement("div",(0,L.Z)({className:O()("".concat(v,"-content-wrapper"),i==null?void 0:i.wrapper,W),style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},K),H),ke),u==null?void 0:u.wrapper)},(0,Ke.Z)(e,{data:!0})),t.createElement(f,(0,L.Z)({id:ie,containerRef:c,prefixCls:v,className:O()(se,i==null?void 0:i.content),style:(0,r.Z)((0,r.Z)({},Y),u==null?void 0:u.content)},Ie),Re))}),Ue=(0,r.Z)({},A);return $&&(Ue.zIndex=$),t.createElement(ne.Provider,{value:Ae},t.createElement("div",{className:O()(v,"".concat(v,"-").concat(y),U,(w={},(0,te.Z)(w,"".concat(v,"-open"),d),(0,te.Z)(w,"".concat(v,"-inline"),V),w)),style:Ue,tabIndex:-1,ref:J,onKeyDown:Se},$e,t.createElement("div",{tabIndex:0,ref:j,style:S,"aria-hidden":"true","data-sentinel":"start"}),We,t.createElement("div",{tabIndex:0,ref:q,style:S,"aria-hidden":"true","data-sentinel":"end"})))}var N=t.forwardRef(C),oe=N,re=function(n){var m=n.open,M=m===void 0?!1:m,g=n.prefixCls,w=g===void 0?"rc-drawer":g,v=n.placement,d=v===void 0?"right":v,y=n.autoFocus,V=y===void 0?!0:y,E=n.keyboard,B=E===void 0?!0:E,p=n.width,X=p===void 0?378:p,i=n.mask,U=i===void 0?!0:i,A=n.maskClosable,$=A===void 0?!0:A,se=n.getContainer,ie=n.forceRender,Y=n.afterOpenChange,Q=n.destroyOnClose,Ce=n.onMouseEnter,Me=n.onMouseOver,Re=n.onMouseLeave,ke=n.onClick,ge=n.onKeyDown,we=n.onKeyUp,ue=n.panelRef,Ee=t.useState(!1),ce=(0,P.Z)(Ee,2),b=ce[0],G=ce[1],Ze=t.useState(!1),ve=(0,P.Z)(Ze,2),De=ve[0],Oe=ve[1];(0,R.Z)(function(){Oe(!0)},[]);var Z=De?M:!1,de=t.useRef(),u=t.useRef();(0,R.Z)(function(){Z&&(u.current=document.activeElement)},[Z]);var J=function(F){var _;if(G(F),Y==null||Y(F),!F&&u.current&&!((_=de.current)!==null&&_!==void 0&&_.contains(u.current))){var I;(I=u.current)===null||I===void 0||I.focus({preventScroll:!0})}},j=t.useMemo(function(){return{panel:ue}},[ue]);if(!ie&&!b&&!Z&&Q)return null;var q={onMouseEnter:Ce,onMouseOver:Me,onMouseLeave:Re,onClick:ke,onKeyDown:ge,onKeyUp:we},Se=(0,r.Z)((0,r.Z)({},n),{},{open:Z,prefixCls:w,placement:d,autoFocus:V,keyboard:B,width:X,mask:U,maskClosable:$,inline:se===!1,afterOpenChange:J,ref:de},q);return t.createElement(ee.Provider,{value:j},t.createElement(T.Z,{open:Z||ie||b,autoDestroy:!1,getContainer:se,autoLock:U&&(Z||b)},t.createElement(oe,Se)))},le=re,he=le}}]);