You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

4 rivejä
14 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7921],{78164:function(Me,p,r){"use strict";var l=r(57106),M=r(6129),x=r(6610),Z=r(5991),T=r(10379),S=r(60446),E=r(85893),t=r(67294),J=function(ue){(0,T.Z)(O,ue);var q=(0,S.Z)(O);function O(){var I;(0,x.Z)(this,O);for(var K=arguments.length,y=new Array(K),z=0;z<K;z++)y[z]=arguments[z];return I=q.call.apply(q,[this].concat(y)),I.state={hasError:!1,errorInfo:""},I}return(0,Z.Z)(O,[{key:"componentDidCatch",value:function(K,y){console.log(K,y)}},{key:"render",value:function(){return this.state.hasError?(0,E.jsx)(M.ZP,{status:"error",title:"Something went wrong.",extra:this.state.errorInfo}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(K){return{hasError:!0,errorInfo:K.message}}}]),O}(t.Component);p.Z=J},12044:function(Me,p,r){"use strict";var l=r(34155),M=typeof l!="undefined"&&l.versions!=null&&l.versions.node!=null,x=function(){return typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.matchMedia!="undefined"&&!M};p.Z=x},50061:function(){},273:function(Me,p,r){"use strict";r.d(p,{Z:function(){return Be}});var l=r(22122),M=r(96156),x=r(28481),Z=r(54549),T=r(94184),S=r.n(T),E=r(28991),t=r(67294),J=r(38475),ue=r(8410),q=r(5461),O=r(15105),I=r(64217),K=t.createContext(null),y=K,z=function(o){var m=o.prefixCls,c=o.className,f=o.style,A=o.children,v=o.containerRef,g=o.id,_=o.onMouseEnter,F=o.onMouseOver,R=o.onMouseLeave,H=o.onClick,V=o.onKeyDown,ee=o.onKeyUp,X={onMouseEnter:_,onMouseOver:F,onMouseLeave:R,onClick:H,onKeyDown:V,onKeyUp:ee};return t.createElement(t.Fragment,null,t.createElement("div",(0,l.Z)({id:g,className:S()("".concat(m,"-content"),c),style:(0,E.Z)({},f),"aria-modal":"true",role:"dialog",ref:v},X),A))},Ne=z,Ze=r(80334);function n(e){return typeof e=="string"&&String(Number(e))===e?((0,Ze.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}function i(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 a={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function s(e,o){var m,c,f,A,v=e.prefixCls,g=e.open,_=e.placement,F=e.inline,R=e.push,H=e.forceRender,V=e.autoFocus,ee=e.keyboard,X=e.rootClassName,ce=e.rootStyle,te=e.zIndex,ne=e.className,de=e.id,fe=e.style,k=e.motion,be=e.width,me=e.height,ve=e.children,_e=e.contentWrapperStyle,Se=e.mask,he=e.maskClosable,ae=e.maskMotion,re=e.maskClassName,Q=e.maskStyle,j=e.afterOpenChange,$=e.onClose,ye=e.onMouseEnter,Ce=e.onMouseOver,Oe=e.onMouseLeave,h=e.onClick,L=e.onKeyDown,Ee=e.onKeyUp,W=t.useRef(),oe=t.useRef(),ie=t.useRef();t.useImperativeHandle(o,function(){return W.current});var Pe=function(w){var ge=w.keyCode,we=w.shiftKey;switch(ge){case O.Z.TAB:{if(ge===O.Z.TAB){if(!we&&document.activeElement===ie.current){var Ae;(Ae=oe.current)===null||Ae===void 0||Ae.focus({preventScroll:!0})}else if(we&&document.activeElement===oe.current){var pe;(pe=ie.current)===null||pe===void 0||pe.focus({preventScroll:!0})}}break}case O.Z.ESC:{$&&ee&&(w.stopPropagation(),$(w));break}}};t.useEffect(function(){if(g&&V){var d;(d=W.current)===null||d===void 0||d.focus({preventScroll:!0})}},[g]);var ke=t.useState(!1),Y=(0,x.Z)(ke,2),le=Y[0],N=Y[1],u=t.useContext(y),De;R===!1?De={distance:0}:R===!0?De={}:De=R||{};var G=(m=(c=(f=De)===null||f===void 0?void 0:f.distance)!==null&&c!==void 0?c:u==null?void 0:u.pushDistance)!==null&&m!==void 0?m:180,je=t.useMemo(function(){return{pushDistance:G,push:function(){N(!0)},pull:function(){N(!1)}}},[G]);t.useEffect(function(){if(g){var d;u==null||(d=u.push)===null||d===void 0||d.call(u)}else{var w;u==null||(w=u.pull)===null||w===void 0||w.call(u)}},[g]),t.useEffect(function(){return function(){var d;u==null||(d=u.pull)===null||d===void 0||d.call(u)}},[]);var $e=Se&&t.createElement(q.ZP,(0,l.Z)({key:"mask"},ae,{visible:g}),function(d,w){var ge=d.className,we=d.style;return t.createElement("div",{className:S()("".concat(v,"-mask"),ge,re),style:(0,E.Z)((0,E.Z)({},we),Q),onClick:he&&g?$:void 0,ref:w})}),ze=typeof k=="function"?k(_):k,se={};if(le&&G)switch(_){case"top":se.transform="translateY(".concat(G,"px)");break;case"bottom":se.transform="translateY(".concat(-G,"px)");break;case"left":se.transform="translateX(".concat(G,"px)");break;default:se.transform="translateX(".concat(-G,"px)");break}_==="left"||_==="right"?se.width=n(be):se.height=n(me);var Fe={onMouseEnter:ye,onMouseOver:Ce,onMouseLeave:Oe,onClick:h,onKeyDown:L,onKeyUp:Ee},He=t.createElement(q.ZP,(0,l.Z)({key:"panel"},ze,{visible:g,forceRender:H,onVisibleChanged:function(w){j==null||j(w)},removeOnLeave:!1,leavedClassName:"".concat(v,"-content-wrapper-hidden")}),function(d,w){var ge=d.className,we=d.style;return t.createElement("div",(0,l.Z)({className:S()("".concat(v,"-content-wrapper"),ge),style:(0,E.Z)((0,E.Z)((0,E.Z)({},se),we),_e)},(0,I.Z)(e,{data:!0})),t.createElement(Ne,(0,l.Z)({id:de,containerRef:w,prefixCls:v,className:ne,style:fe},Fe),ve))}),Ke=(0,E.Z)({},ce);return te&&(Ke.zIndex=te),t.createElement(y.Provider,{value:je},t.createElement("div",{className:S()(v,"".concat(v,"-").concat(_),X,(A={},(0,M.Z)(A,"".concat(v,"-open"),g),(0,M.Z)(A,"".concat(v,"-inline"),F),A)),style:Ke,tabIndex:-1,ref:W,onKeyDown:Pe},$e,t.createElement("div",{tabIndex:0,ref:oe,style:a,"aria-hidden":"true","data-sentinel":"start"}),He,t.createElement("div",{tabIndex:0,ref:ie,style:a,"aria-hidden":"true","data-sentinel":"end"})))}var C=t.forwardRef(s),P=C,b=function(o){var m=o.open,c=m===void 0?!1:m,f=o.prefixCls,A=f===void 0?"rc-drawer":f,v=o.placement,g=v===void 0?"right":v,_=o.autoFocus,F=_===void 0?!0:_,R=o.keyboard,H=R===void 0?!0:R,V=o.width,ee=V===void 0?378:V,X=o.mask,ce=X===void 0?!0:X,te=o.maskClosable,ne=te===void 0?!0:te,de=o.getContainer,fe=o.forceRender,k=o.afterOpenChange,be=o.destroyOnClose,me=o.onMouseEnter,ve=o.onMouseOver,_e=o.onMouseLeave,Se=o.onClick,he=o.onKeyDown,ae=o.onKeyUp,re=t.useState(!1),Q=(0,x.Z)(re,2),j=Q[0],$=Q[1],ye=t.useState(!1),Ce=(0,x.Z)(ye,2),Oe=Ce[0],h=Ce[1];(0,ue.Z)(function(){h(!0)},[]);var L=Oe?c:!1,Ee=t.useRef(),W=t.useRef();(0,ue.Z)(function(){L&&(W.current=document.activeElement)},[L]);var oe=function(Y){var le;if($(Y),k==null||k(Y),!Y&&W.current&&!((le=Ee.current)===null||le===void 0?void 0:le.contains(W.current))){var N;(N=W.current)===null||N===void 0||N.focus({preventScroll:!0})}};if(!fe&&!j&&!L&&be)return null;var ie={onMouseEnter:me,onMouseOver:ve,onMouseLeave:_e,onClick:Se,onKeyDown:he,onKeyUp:ae},Pe=(0,E.Z)((0,E.Z)({},o),{},{open:L,prefixCls:A,placement:g,autoFocus:F,keyboard:H,width:ee,mask:ce,maskClosable:ne,inline:de===!1,afterOpenChange:oe,ref:Ee},ie);return t.createElement(J.Z,{open:L||fe||j,autoDestroy:!1,getContainer:de,autoLock:ce&&(L||j)},t.createElement(P,Pe))},D=b,U=D,xe=r(53124),B=r(65223),Ie=r(33603),Re=r(93355),Le=r(4173),We=function(e,o){var m={};for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&o.indexOf(c)<0&&(m[c]=e[c]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,c=Object.getOwnPropertySymbols(e);f<c.length;f++)o.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(e,c[f])&&(m[c[f]]=e[c[f]]);return m},Ve=(0,Re.b)("default","large"),Te={distance:180};function Ue(e){var o=e.width,m=e.height,c=e.size,f=c===void 0?"default":c,A=e.closable,v=A===void 0?!0:A,g=e.mask,_=g===void 0?!0:g,F=e.push,R=F===void 0?Te:F,H=e.closeIcon,V=H===void 0?t.createElement(Z.Z,null):H,ee=e.bodyStyle,X=e.drawerStyle,ce=e.className,te=e.visible,ne=e.open,de=e.children,fe=e.style,k=e.title,be=e.headerStyle,me=e.onClose,ve=e.footer,_e=e.footerStyle,Se=e.prefixCls,he=e.getContainer,ae=e.extra,re=e.afterVisibleChange,Q=e.afterOpenChange,j=We(e,["width","height","size","closable","mask","push","closeIcon","bodyStyle","drawerStyle","className","visible","open","children","style","title","headerStyle","onClose","footer","footerStyle","prefixCls","getContainer","extra","afterVisibleChange","afterOpenChange"]),$=t.useContext(xe.E_),ye=$.getPopupContainer,Ce=$.getPrefixCls,Oe=$.direction,h=Ce("drawer",Se),L=he===void 0&&ye?function(){return ye(document.body)}:he,Ee=v&&t.createElement("button",{type:"button",onClick:me,"aria-label":"Close",className:"".concat(h,"-close")},V);[["visible","open"],["afterVisibleChange","afterOpenChange"]].forEach(function(N){var u=(0,x.Z)(N,2),De=u[0],G=u[1]});function W(){return!k&&!v?null:t.createElement("div",{className:S()("".concat(h,"-header"),(0,M.Z)({},"".concat(h,"-header-close-only"),v&&!k&&!ae)),style:be},t.createElement("div",{className:"".concat(h,"-header-title")},Ee,k&&t.createElement("div",{className:"".concat(h,"-title")},k)),ae&&t.createElement("div",{className:"".concat(h,"-extra")},ae))}function oe(){if(!ve)return null;var N="".concat(h,"-footer");return t.createElement("div",{className:N,style:_e},ve)}var ie=S()((0,M.Z)({"no-mask":!_},"".concat(h,"-rtl"),Oe==="rtl"),ce),Pe=t.useMemo(function(){return o!=null?o:f==="large"?736:378},[o,f]),ke=t.useMemo(function(){return m!=null?m:f==="large"?736:378},[m,f]),Y={motionName:(0,Ie.mL)(h,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},le=function(u){return{motionName:(0,Ie.mL)(h,"panel-motion-".concat(u)),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}};return t.createElement(Le.BR,null,t.createElement(B.Ux,{status:!0,override:!0},t.createElement(U,(0,l.Z)({prefixCls:h,onClose:me},j,{open:ne!=null?ne:te,mask:_,push:R,width:Pe,height:ke,rootClassName:ie,getContainer:L,afterOpenChange:function(u){Q==null||Q(u),re==null||re(u)},maskMotion:Y,motion:le,rootStyle:fe}),t.createElement("div",{className:"".concat(h,"-wrapper-body"),style:(0,l.Z)({},X)},W(),t.createElement("div",{className:"".concat(h,"-body"),style:ee},de),oe()))))}var Be=Ue},57338:function(Me,p,r){"use strict";var l=r(38663),M=r.n(l),x=r(50061),Z=r.n(x)},57186:function(Me,p,r){"use strict";r.d(p,{f:function(){return M}});var l=r(67294);function M(Z){var T=l.createContext(null);function S(t){var J=Z(t.initialState);return l.createElement(T.Provider,{value:J},t.children)}function E(){var t=l.useContext(T);if(t===null)throw new Error("Component must be wrapped with <Container.Provider>");return t}return{Provider:S,useContainer:E}}function x(Z){return Z.useContainer()}},38069:function(Me,p,r){"use strict";r.d(p,{ZP:function(){return Ze}});var l=r(67294);function M(n,i){return E(n)||S(n,i)||Z(n,i)||x()}function x(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  2. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z(n,i){if(!!n){if(typeof n=="string")return T(n,i);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return T(n,i)}}function T(n,i){(i==null||i>n.length)&&(i=n.length);for(var a=0,s=new Array(i);a<i;a++)s[a]=n[a];return s}function S(n,i){var a=n&&(typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"]);if(a!=null){var s=[],C=!0,P=!1,b,D;try{for(a=a.call(n);!(C=(b=a.next()).done)&&(s.push(b.value),!(i&&s.length===i));C=!0);}catch(U){P=!0,D=U}finally{try{!C&&a.return!=null&&a.return()}finally{if(P)throw D}}return s}}function E(n){if(Array.isArray(n))return n}function t(n){var i=typeof window=="undefined",a=(0,l.useState)(function(){return i?!1:window.matchMedia(n).matches}),s=M(a,2),C=s[0],P=s[1];return(0,l.useLayoutEffect)(function(){if(!i){var b=window.matchMedia(n),D=function(xe){return P(xe.matches)};return b.addListener(D),function(){return b.removeListener(D)}}},[n]),C}function J(n,i){return K(n)||I(n,i)||q(n,i)||ue()}function ue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  3. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q(n,i){if(!!n){if(typeof n=="string")return O(n,i);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return O(n,i)}}function O(n,i){(i==null||i>n.length)&&(i=n.length);for(var a=0,s=new Array(i);a<i;a++)s[a]=n[a];return s}function I(n,i){var a=n&&(typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"]);if(a!=null){var s=[],C=!0,P=!1,b,D;try{for(a=a.call(n);!(C=(b=a.next()).done)&&(s.push(b.value),!(i&&s.length===i));C=!0);}catch(U){P=!0,D=U}finally{try{!C&&a.return!=null&&a.return()}finally{if(P)throw D}}return s}}function K(n){if(Array.isArray(n))return n}var y={xs:{maxWidth:575,matchMedia:"(max-width: 575px)"},sm:{minWidth:576,maxWidth:767,matchMedia:"(min-width: 576px) and (max-width: 767px)"},md:{minWidth:768,maxWidth:991,matchMedia:"(min-width: 768px) and (max-width: 991px)"},lg:{minWidth:992,maxWidth:1199,matchMedia:"(min-width: 992px) and (max-width: 1199px)"},xl:{minWidth:1200,maxWidth:1599,matchMedia:"(min-width: 1200px) and (max-width: 1599px)"},xxl:{minWidth:1600,matchMedia:"(min-width: 1600px)"}},z=function(){var i="md";if(typeof window=="undefined")return i;var a=Object.keys(y).find(function(s){var C=y[s].matchMedia;return!!window.matchMedia(C).matches});return i=a,i},Ne=function(){var i=t(y.md.matchMedia),a=t(y.lg.matchMedia),s=t(y.xxl.matchMedia),C=t(y.xl.matchMedia),P=t(y.sm.matchMedia),b=t(y.xs.matchMedia),D=(0,l.useState)(z()),U=J(D,2),xe=U[0],B=U[1];return(0,l.useEffect)(function(){if(s){B("xxl");return}if(C){B("xl");return}if(a){B("lg");return}if(i){B("md");return}if(P){B("sm");return}if(b){B("xs");return}B("md")},[i,a,s,C,P,b]),xe},Ze=Ne}}]);