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.
1 line
13 KiB
1 line
13 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[98292],{44e3:function(e,t,o){"use strict";var n=o(84966),r=o(42745);const i=n.ZP;i.Header=n.h4,i.Footer=n.$_,i.Content=n.VY,i.Sider=r.Z,t.Z=i},57809:function(e,t,o){"use strict";var n=o(92310),r=o.n(n),i=o(77861),s=o(62805),l=o(59301),a=o(53487),u=o(62892),c=o(19080),p=o(36355),f=o(1684),d=o(93891),h=o(19716),m=o(32441),v=o(33234),b=o(14154),g=o(58582),w=o(84443),C=o(66339),y=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const O="SECRET_COMBOBOX_MODE_DO_NOT_USE",L=(e,t)=>{var o,{prefixCls:n,bordered:a=!0,className:L,rootClassName:S,getPopupContainer:P,popupClassName:E,dropdownClassName:M,listHeight:k=256,placement:N,listItemHeight:x=24,size:R,disabled:_,notFoundContent:T,status:I,builtinPlacements:Z,dropdownMatchSelectWidth:W,popupMatchSelectWidth:j,direction:H,style:F,allowClear:A}=e,D=y(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Y,getPrefixCls:$,renderEmpty:B,direction:U,virtual:V,popupMatchSelectWidth:z,popupOverflow:X,select:q}=l.useContext(p.E_),Q=$("select",n),G=$(),J=null!=H?H:U,{compactSize:K,compactItemClassnames:ee}=(0,v.ri)(Q,J),[te,oe]=(0,b.Z)(Q),ne=l.useMemo((()=>{const{mode:e}=D;if("combobox"!==e)return e===O?"combobox":e}),[D.mode]),re="multiple"===ne||"tags"===ne,ie=(0,w.Z)(D.suffixIcon,D.showArrow),se=null!==(o=null!=j?j:W)&&void 0!==o?o:z,{status:le,hasFeedback:ae,isFormItemInput:ue,feedbackIcon:ce}=l.useContext(m.aM),pe=(0,c.F)(le,I);let fe;fe=void 0!==T?T:"combobox"===ne?null:(null==B?void 0:B("Select"))||l.createElement(d.Z,{componentName:"Select"});const{suffixIcon:de,itemIcon:he,removeIcon:me,clearIcon:ve}=(0,C.Z)(Object.assign(Object.assign({},D),{multiple:re,hasFeedback:ae,feedbackIcon:ce,showSuffixIcon:ie,prefixCls:Q,showArrow:D.showArrow,componentName:"Select"})),be=!0===A?{clearIcon:ve}:A,ge=(0,s.Z)(D,["suffixIcon","itemIcon"]),we=r()(E||M,{[`${Q}-dropdown-${J}`]:"rtl"===J},S,oe),Ce=(0,h.Z)((e=>{var t;return null!==(t=null!=R?R:K)&&void 0!==t?t:e})),ye=l.useContext(f.Z),Oe=null!=_?_:ye,Le=r()({[`${Q}-lg`]:"large"===Ce,[`${Q}-sm`]:"small"===Ce,[`${Q}-rtl`]:"rtl"===J,[`${Q}-borderless`]:!a,[`${Q}-in-form-item`]:ue},(0,c.Z)(Q,pe,ae),ee,null==q?void 0:q.className,L,S,oe),Se=l.useMemo((()=>void 0!==N?N:"rtl"===J?"bottomRight":"bottomLeft"),[N,J]),Pe=(0,g.Z)(Z,X);return te(l.createElement(i.ZP,Object.assign({ref:t,virtual:V,showSearch:null==q?void 0:q.showSearch},ge,{style:Object.assign(Object.assign({},null==q?void 0:q.style),F),dropdownMatchSelectWidth:se,builtinPlacements:Pe,transitionName:(0,u.m)(G,"slide-up",D.transitionName),listHeight:k,listItemHeight:x,mode:ne,prefixCls:Q,placement:Se,direction:J,suffixIcon:de,menuItemSelectedIcon:he,removeIcon:me,allowClear:be,notFoundContent:fe,className:Le,getPopupContainer:P||Y,dropdownClassName:we,disabled:Oe})))};const S=l.forwardRef(L),P=(0,a.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=O,S.Option=i.Wx,S.OptGroup=i.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=P,t.default=S},31561:function(e,t,o){"use strict";o.d(t,{Z:function(){return O}});var n=o(1565),r=o(22386),i=o(88703),s=o(52167),l=o(35593),a=o(92310),u=o.n(a),c=o(76466),p=o(59301),f=o(81331),d=o(91659),h=f.Z.ESC,m=f.Z.TAB;var v=(0,p.forwardRef)((function(e,t){var o=e.overlay,n=e.arrow,r=e.prefixCls,i=(0,p.useMemo)((function(){return"function"==typeof o?o():o}),[o]),s=(0,c.sQ)(t,null==i?void 0:i.ref);return p.createElement(p.Fragment,null,n&&p.createElement("div",{className:"".concat(r,"-arrow")}),p.cloneElement(i,{ref:(0,c.Yr)(i)?s:void 0}))})),b={adjustX:1,adjustY:1},g=[0,0],w={topLeft:{points:["bl","tl"],overflow:b,offset:[0,-4],targetOffset:g},top:{points:["bc","tc"],overflow:b,offset:[0,-4],targetOffset:g},topRight:{points:["br","tr"],overflow:b,offset:[0,-4],targetOffset:g},bottomLeft:{points:["tl","bl"],overflow:b,offset:[0,4],targetOffset:g},bottom:{points:["tc","bc"],overflow:b,offset:[0,4],targetOffset:g},bottomRight:{points:["tr","br"],overflow:b,offset:[0,4],targetOffset:g}},C=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function y(e,t){var o,a=e.arrow,f=void 0!==a&&a,b=e.prefixCls,g=void 0===b?"rc-dropdown":b,y=e.transitionName,O=e.animation,L=e.align,S=e.placement,P=void 0===S?"bottomLeft":S,E=e.placements,M=void 0===E?w:E,k=e.getPopupContainer,N=e.showAction,x=e.hideAction,R=e.overlayClassName,_=e.overlayStyle,T=e.visible,I=e.trigger,Z=void 0===I?["hover"]:I,W=e.autoFocus,j=e.overlay,H=e.children,F=e.onVisibleChange,A=(0,s.Z)(e,C),D=p.useState(),Y=(0,i.Z)(D,2),$=Y[0],B=Y[1],U="visible"in e?T:$,V=p.useRef(null),z=p.useRef(null),X=p.useRef(null);p.useImperativeHandle(t,(function(){return V.current}));var q=function(e){B(e),null==F||F(e)};!function(e){var t=e.visible,o=e.triggerRef,n=e.onVisibleChange,r=e.autoFocus,i=e.overlayRef,s=p.useRef(!1),l=function(){var e,r;t&&(null===(e=o.current)||void 0===e||null===(r=e.focus)||void 0===r||r.call(e),null==n||n(!1))},a=function(){var e;return!(null===(e=i.current)||void 0===e||!e.focus||(i.current.focus(),s.current=!0,0))},u=function(e){switch(e.keyCode){case h:l();break;case m:var t=!1;s.current||(t=a()),t?e.preventDefault():l()}};p.useEffect((function(){return t?(window.addEventListener("keydown",u),r&&(0,d.Z)(a,3),function(){window.removeEventListener("keydown",u),s.current=!1}):function(){s.current=!1}}),[t])}({visible:U,triggerRef:X,onVisibleChange:q,autoFocus:W,overlayRef:z});var Q,G,J,K=function(){return p.createElement(v,{ref:z,overlay:j,prefixCls:g,arrow:f})},ee=p.cloneElement(H,{className:u()(null===(o=H.props)||void 0===o?void 0:o.className,U&&(Q=e.openClassName,void 0!==Q?Q:"".concat(g,"-open"))),ref:(0,c.Yr)(H)?(0,c.sQ)(X,H.ref):void 0}),te=x;return te||-1===Z.indexOf("contextMenu")||(te=["click"]),p.createElement(l.Z,(0,n.Z)({builtinPlacements:M},A,{prefixCls:g,ref:V,popupClassName:u()(R,(0,r.Z)({},"".concat(g,"-show-arrow"),f)),popupStyle:_,action:Z,showAction:N,hideAction:te,popupPlacement:P,popupAlign:L,popupTransitionName:y,popupAnimation:O,popupVisible:U,stretch:(G=e.minOverlayWidthMatchTrigger,J=e.alignPoint,("minOverlayWidthMatchTrigger"in e?G:!J)?"minWidth":""),popup:"function"==typeof j?K:K(),onPopupVisibleChange:q,onPopupClick:function(t){var o=e.onOverlayClick;B(!1),o&&o(t)},getPopupContainer:k}),ee)}var O=p.forwardRef(y)},43236:function(e,t,o){"use strict";o.d(t,{Z:function(){return r}});var n=o(4676);function r(e,t,o,r){var i=n.unstable_batchedUpdates?function(e){n.unstable_batchedUpdates(o,e)}:o;return null!=e&&e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,i,r)}}}},13962:function(e,t,o){"use strict";o.d(t,{g1:function(){return n},os:function(){return r}});function n(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function r(e){var t=e.getBoundingClientRect(),o=document.documentElement;return{left:t.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}},51581:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=o(59301),i=l(r),s=l(o(12708));function l(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.scrollListener=o.scrollListener.bind(o),o.eventListenerOptions=o.eventListenerOptions.bind(o),o.mousewheelListener=o.mousewheelListener.bind(o),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,o=this.getParentElement(e),n=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;n=this.props.isReverse?i:this.calculateOffset(e,i)}else n=this.props.isReverse?o.scrollTop:e.scrollHeight-o.scrollTop-o.clientHeight;n<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=o.scrollHeight,this.beforeScrollTop=o.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),o=t.children,n=t.element,r=t.hasMore,s=(t.initialLoad,t.isReverse),l=t.loader,a=(t.loadMore,t.pageStart,t.ref),u=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var o={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));u.ref=function(t){e.scrollComponent=t,a&&a(t)};var c=[o];return r&&(l?s?c.unshift(l):c.push(l):this.defaultLoader&&(s?c.unshift(this.defaultLoader):c.push(this.defaultLoader))),i.default.createElement(n,u,c)}}]),t}(r.Component);a.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},a.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=a,e.exports=t.default},26724:function(e,t,o){e.exports=o(51581)}}]); |