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
23 KiB
1 line
23 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[74234,13488],{25032:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var o=n(74932),i=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},a=n(1393),s=function(e,t){return i.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:r}))};var l=i.forwardRef(s)},77578:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const o=e=>e?"function"==typeof e?e():e:null},27666:function(e,t,n){"use strict";var o=n(82986),i=n(71783);t.Z=function(e){let t;const n=n=>()=>{t=null,e.apply(void 0,(0,o.Z)(n))},r=function(){if(null==t){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];t=(0,i.Z)(n(o))}};return r.cancel=()=>{i.Z.cancel(t),t=null},r}},81228:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var o=n(98550),i=n(50906),r=n(18258),a=n(43089),s=n(59301),l=n(92310),c=n.n(l),d=n(28647),u=n(55405),p=n(27666),h=n(36355),f=n(83116),g=n(37613);const m=e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}};var v=(0,f.Z)("Affix",(e=>{const t=(0,g.TS)(e,{zIndexPopup:e.zIndexBase+10});return[m(t)]}));function b(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function y(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function w(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n){return n+(window.innerHeight-t.bottom)}}const S=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function x(){return"undefined"!=typeof window?window:null}var $;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}($||($={}));let C=function(e){(0,r.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;return(0,o.Z)(this,n),(e=t.apply(this,arguments)).state={status:$.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,s.createRef)(),e.fixedNodeRef=(0,s.createRef)(),e.addListeners=()=>{const t=e.getTargetFunc(),n=null==t?void 0:t(),{prevTarget:o}=e.state;o!==n&&(S.forEach((t=>{null==o||o.removeEventListener(t,e.lazyUpdatePosition),null==n||n.addEventListener(t,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:n}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:t}=e.state,n=e.getTargetFunc(),o=null==n?void 0:n();S.forEach((n=>{null==o||o.removeEventListener(n,e.lazyUpdatePosition),null==t||t.removeEventListener(n,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:t,offsetTop:n}=e.props;return void 0===t&&void 0===n?0:n},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:t,lastAffix:n}=e.state,{onChange:o}=e.props,i=e.getTargetFunc();if(t!==$.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!i)return;const r=e.getOffsetTop(),a=e.getOffsetBottom(),s=i();if(s){const t={status:$.None},i=b(e.placeholderNodeRef.current);if(0===i.top&&0===i.left&&0===i.width&&0===i.height)return;const l=b(s),c=y(i,l,r),d=w(i,l,a);void 0!==c?(t.affixStyle={position:"fixed",top:c,width:i.width,height:i.height},t.placeholderStyle={width:i.width,height:i.height}):void 0!==d&&(t.affixStyle={position:"fixed",bottom:d,width:i.width,height:i.height},t.placeholderStyle={width:i.width,height:i.height}),t.lastAffix=!!t.affixStyle,o&&n!==t.lastAffix&&o(t.lastAffix),e.setState(t)}},e.prepareMeasure=()=>{e.setState({status:$.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,p.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,p.Z)((()=>{const t=e.getTargetFunc(),{affixStyle:n}=e.state;if(t&&n){const o=e.getOffsetTop(),i=e.getOffsetBottom(),r=t();if(r&&e.placeholderNodeRef.current){const t=b(r),a=b(e.placeholderNodeRef.current),s=y(a,t,o),l=w(a,t,i);if(void 0!==s&&n.top===s||void 0!==l&&n.bottom===l)return}}e.prepareMeasure()})),e}return(0,i.Z)(n,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:t}=this.props;return void 0!==t?t:null!=e?e:x}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:t}=this.state,{affixPrefixCls:n,rootClassName:o,children:i}=this.props,r=c()(e&&o,{[n]:!!e});let a=(0,u.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return s.createElement(d.Z,{onResize:this.updatePosition},s.createElement("div",Object.assign({},a,{ref:this.placeholderNodeRef}),e&&s.createElement("div",{style:t,"aria-hidden":"true"}),s.createElement("div",{className:r,ref:this.fixedNodeRef,style:e},s.createElement(d.Z,{onResize:this.updatePosition},i))))}}]),n}(s.Component);C.contextType=h.E_;var k=(0,s.forwardRef)(((e,t)=>{const{prefixCls:n,rootClassName:o}=e,{getPrefixCls:i}=(0,s.useContext)(h.E_),r=i("affix",n),[a,l]=v(r),d=Object.assign(Object.assign({},e),{affixPrefixCls:r,rootClassName:c()(o,l)});return a(s.createElement(C,Object.assign({},d,{ref:t})))}))},39722:function(e,t,n){"use strict";n.d(t,{t5:function(){return u}});var o=n(92310),i=n.n(o),r=n(55477),a=n(59301),s=n(36355),l=n(77578),c=n(17356),d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const u=e=>{const{hashId:t,prefixCls:n,className:o,style:s,placement:c="top",title:d,content:u,children:p}=e;return a.createElement("div",{className:i()(t,n,`${n}-pure`,`${n}-placement-${c}`,o),style:s},a.createElement("div",{className:`${n}-arrow`}),a.createElement(r.G,Object.assign({},e,{className:t,prefixCls:n}),p||((e,t,n)=>{if(t||n)return a.createElement(a.Fragment,null,t&&a.createElement("div",{className:`${e}-title`},(0,l.Z)(t)),a.createElement("div",{className:`${e}-inner-content`},(0,l.Z)(n)))})(n,d,u)))};t.ZP=e=>{const{prefixCls:t}=e,n=d(e,["prefixCls"]),{getPrefixCls:o}=a.useContext(s.E_),i=o("popover",t),[r,l]=(0,c.Z)(i);return r(a.createElement(u,Object.assign({},n,{prefixCls:i,hashId:l})))}},60324:function(e,t,n){"use strict";var o=n(92310),i=n.n(o),r=n(59301),a=n(77578),s=n(62892),l=n(36355),c=n(6848),d=n(39722),u=n(17356),p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const h=e=>{let{title:t,content:n,prefixCls:o}=e;return r.createElement(r.Fragment,null,t&&r.createElement("div",{className:`${o}-title`},(0,a.Z)(t)),r.createElement("div",{className:`${o}-inner-content`},(0,a.Z)(n)))},f=r.forwardRef(((e,t)=>{const{prefixCls:n,title:o,content:a,overlayClassName:d,placement:f="top",trigger:g="hover",mouseEnterDelay:m=.1,mouseLeaveDelay:v=.1,overlayStyle:b={}}=e,y=p(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:w}=r.useContext(l.E_),S=w("popover",n),[x,$]=(0,u.Z)(S),C=w(),k=i()(d,$);return x(r.createElement(c.Z,Object.assign({placement:f,trigger:g,mouseEnterDelay:m,mouseLeaveDelay:v,overlayStyle:b},y,{prefixCls:S,overlayClassName:k,ref:t,overlay:o||a?r.createElement(h,{prefixCls:S,title:o,content:a}):null,transitionName:(0,s.m)(C,"zoom-big",y.transitionName),"data-popover-inject":!0})))}));f._InternalPanelDoNotUseOrYouWillBeFired=d.ZP,t.Z=f},17356:function(e,t,n){"use strict";var o=n(17313),i=n(29878),r=n(19447),a=n(33166),s=n(83116),l=n(37613);const c=e=>{const{componentCls:t,popoverColor:n,minWidth:i,fontWeightStrong:a,popoverPadding:s,boxShadowSecondary:l,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:u,marginXS:p,colorBgElevated:h,popoverBg:f}=e;return[{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":h,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:d,boxShadow:l,padding:s},[`${t}-title`]:{minWidth:i,marginBottom:p,color:c,fontWeight:a},[`${t}-inner-content`]:{color:n}})},(0,r.ZP)(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},d=e=>{const{componentCls:t}=e;return{[t]:a.i.map((n=>{const o=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}}))}},u=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorSplit:i,paddingSM:r,controlHeight:a,fontSize:s,lineHeight:l,padding:c}=e,d=a-Math.round(s*l);return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d/2}px ${c}px ${d/2-n}px`,borderBottom:`${n}px ${o} ${i}`},[`${t}-inner-content`]:{padding:`${r}px ${c}px`}}}};t.Z=(0,s.Z)("Popover",(e=>{const{colorBgElevated:t,colorText:n,wireframe:o}=e,r=(0,l.TS)(e,{popoverPadding:12,popoverBg:t,popoverColor:n});return[c(r),d(r),o&&u(r),(0,i._y)(r,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},78673:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var o=n(42857),i=n(92310),r=n.n(i),a=n(74932),s=n(53646),l=n(33297),c=n(82468),d=n(59301),u=n(71366),p=n(20287),h=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],f=d.forwardRef((function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-switch":o,f=e.className,g=e.checked,m=e.defaultChecked,v=e.disabled,b=e.loadingIcon,y=e.checkedChildren,w=e.unCheckedChildren,S=e.onClick,x=e.onChange,$=e.onKeyDown,C=(0,c.Z)(e,h),k=(0,u.Z)(!1,{value:g,defaultValue:m}),E=(0,l.Z)(k,2),P=E[0],O=E[1];function I(e,t){var n=P;return v||(O(n=e),null==x||x(n,t)),n}var L=r()(i,f,(n={},(0,s.Z)(n,"".concat(i,"-checked"),P),(0,s.Z)(n,"".concat(i,"-disabled"),v),n));return d.createElement("button",(0,a.Z)({},C,{type:"button",role:"switch","aria-checked":P,disabled:v,className:L,ref:t,onKeyDown:function(e){e.which===p.Z.LEFT?I(!1,e):e.which===p.Z.RIGHT&&I(!0,e),null==$||$(e)},onClick:function(e){var t=I(!P,e);null==S||S(t,e)}}),b,d.createElement("span",{className:"".concat(i,"-inner")},d.createElement("span",{className:"".concat(i,"-inner-checked")},y),d.createElement("span",{className:"".concat(i,"-inner-unchecked")},w)))}));f.displayName="Switch";var g=f,m=n(14088),v=n(36355),b=n(1684),y=n(19716),w=n(64993),S=n(17313),x=n(83116),$=n(37613);const C=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:o,trackMinWidthSM:i,innerMinMarginSM:r,innerMaxMarginSM:a,handleSizeSM:s}=e,l=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:`${n}px`,[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:r,[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${s+2*o}px - ${2*a}px)`,marginInlineEnd:`calc(100% - ${s+2*o}px + ${2*a}px)`},[`${l}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:(s-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:r,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${s+2*o}px + ${2*a}px)`,marginInlineEnd:`calc(-100% + ${s+2*o}px - ${2*a}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${s+o}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},k=e=>{const{componentCls:t,handleSize:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(n-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},E=e=>{const{componentCls:t,motion:n,trackPadding:o,handleBg:i,handleShadow:r,handleSize:a}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:o,insetInlineStart:o,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:a/2,boxShadow:r,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${a+o}px)`},[`&:not(${t}-disabled):active`]:n?{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}:{}}}},P=e=>{const{componentCls:t,trackHeight:n,trackPadding:o,innerMinMargin:i,innerMaxMargin:r,handleSize:a}=e,s=`${t}-inner`;return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${a+2*o}px - ${2*r}px)`,marginInlineEnd:`calc(100% - ${a+2*o}px + ${2*r}px)`},[`${s}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:r,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${a+2*o}px + ${2*r}px)`,marginInlineEnd:`calc(-100% + ${a+2*o}px - ${2*r}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:2*o,marginInlineEnd:2*-o}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:2*-o,marginInlineEnd:2*o}}}}}},O=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:o}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,S.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:o,height:n,lineHeight:`${n}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,S.Qy)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}};var I=(0,x.Z)("Switch",(e=>{const t=(0,$.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:.75*e.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[O(t),P(t),E(t),k(t),C(t)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:o,colorWhite:i}=e,r=t*n,a=o/2,s=r-4,l=a-4;return{trackHeight:r,trackHeightSM:a,trackMinWidth:2*s+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new w.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}})),L=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const M=d.forwardRef(((e,t)=>{const{prefixCls:n,size:i,disabled:a,loading:s,className:l,rootClassName:c,style:u}=e,p=L(e,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:h,direction:f,switch:w}=d.useContext(v.E_),S=d.useContext(b.Z),x=(null!=a?a:S)||s,$=h("switch",n),C=d.createElement("div",{className:`${$}-handle`},s&&d.createElement(o.Z,{className:`${$}-loading-icon`})),[k,E]=I($),P=(0,y.Z)(i),O=r()(null==w?void 0:w.className,{[`${$}-small`]:"small"===P,[`${$}-loading`]:s,[`${$}-rtl`]:"rtl"===f},l,c,E),M=Object.assign(Object.assign({},null==w?void 0:w.style),u);return k(d.createElement(m.Z,{component:"Switch"},d.createElement(g,Object.assign({},p,{prefixCls:$,className:O,style:M,disabled:x,ref:t,loadingIcon:C}))))}));M.__ANT_SWITCH=!0;var N=M},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(59301),r=s(i),a=s(n(12708));function s(e){return e&&e.__esModule?e:{default:e}}var l=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 n=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 n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}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),o(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,n=this.getParentElement(e),o=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;o=this.props.isReverse?r:this.calculateOffset(e,r)}else o=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;o<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.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),n=t.children,o=t.element,i=t.hasMore,a=(t.initialLoad,t.isReverse),s=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var d=[n];return i&&(s?a?d.unshift(s):d.push(s):this.defaultLoader&&(a?d.unshift(this.defaultLoader):d.push(this.defaultLoader))),r.default.createElement(o,c,d)}}]),t}(i.Component);l.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},l.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=l,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]); |