1 line
52 KiB
JavaScript
Vendored
1 line
52 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4041],{88258:function(e,t,n){var o=n(67294),r=n(53124),a=n(62986);t.Z=function(e){return o.createElement(r.C,null,function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return o.createElement(a.Z,{image:a.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createElement(a.Z,{image:a.Z.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return o.createElement(a.Z,null)}})}},62986:function(e,t,n){n.d(t,{Z:function(){return v}});var o=n(4942),r=n(87462),a=n(94184),l=n.n(a),i=n(67294),u=n(53124),c=n(23715),s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},f=i.createElement(function(){var e=(0,i.useContext(u.E_).getPrefixCls)("empty-img-default");return i.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("g",{transform:"translate(24 31.67)"},i.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),i.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),i.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),i.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),i.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),i.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),i.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},i.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),i.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},null),d=i.createElement(function(){var e=(0,i.useContext(u.E_).getPrefixCls)("empty-img-simple");return i.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},i.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),i.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},i.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),i.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))},null),p=function(e){var t=e.className,n=e.prefixCls,a=e.image,p=void 0===a?f:a,v=e.description,m=e.children,h=e.imageStyle,g=s(e,["className","prefixCls","image","description","children","imageStyle"]),b=i.useContext(u.E_),E=b.getPrefixCls,Z=b.direction;return i.createElement(c.Z,{componentName:"Empty"},function(e){var a,u=E("empty",n),c=void 0!==v?v:e.description,s=null;return s="string"==typeof p?i.createElement("img",{alt:"string"==typeof c?c:"empty",src:p}):p,i.createElement("div",(0,r.Z)({className:l()(u,(a={},(0,o.Z)(a,"".concat(u,"-normal"),p===d),(0,o.Z)(a,"".concat(u,"-rtl"),"rtl"===Z),a),t)},g),i.createElement("div",{className:"".concat(u,"-image"),style:h},s),c&&i.createElement("div",{className:"".concat(u,"-description")},c),m&&i.createElement("div",{className:"".concat(u,"-footer")},m))})};p.PRESENTED_IMAGE_DEFAULT=f,p.PRESENTED_IMAGE_SIMPLE=d;var v=p},34041:function(e,t,n){var o=n(4942),r=n(87462),a=n(94184),l=n.n(a),i=n(7752),u=n(98423),c=n(67294),s=n(53124),f=n(88258),d=n(98866),p=n(97647),v=n(65223),m=n(33603),h=n(9708),g=n(46163),b=n(4173),E=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},Z="SECRET_COMBOBOX_MODE_DO_NOT_USE",w=c.forwardRef(function(e,t){var n,a,w=e.prefixCls,y=e.bordered,C=e.className,S=e.getPopupContainer,x=e.dropdownClassName,M=e.popupClassName,I=e.listHeight,N=e.placement,R=e.listItemHeight,D=e.size,P=e.disabled,T=e.notFoundContent,O=e.status,k=e.showArrow,L=E(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),V=c.useContext(s.E_),H=V.getPopupContainer,_=V.getPrefixCls,A=V.renderEmpty,F=V.direction,z=V.virtual,K=V.dropdownMatchSelectWidth,W=c.useContext(p.Z),j=_("select",w),U=_(),Y=(0,b.ri)(j,F),B=Y.compactSize,G=Y.compactItemClassnames,X=c.useMemo(function(){var e=L.mode;return"combobox"===e?void 0:e===Z?"combobox":e},[L.mode]),Q="multiple"===X||"tags"===X,q=void 0!==k?k:L.loading||!(Q||"combobox"===X),J=(0,c.useContext)(v.aM),$=J.status,ee=J.hasFeedback,et=J.isFormItemInput,en=J.feedbackIcon,eo=(0,h.F)($,O);a=void 0!==T?T:"combobox"===X?null:(A||f.Z)("Select");var er=(0,g.Z)((0,r.Z)((0,r.Z)({},L),{multiple:Q,hasFeedback:ee,feedbackIcon:en,showArrow:q,prefixCls:j})),ea=er.suffixIcon,el=er.itemIcon,ei=er.removeIcon,eu=er.clearIcon,ec=(0,u.Z)(L,["suffixIcon","itemIcon"]),es=l()(M||x,(0,o.Z)({},"".concat(j,"-dropdown-").concat(F),"rtl"===F)),ef=B||D||W,ed=c.useContext(d.Z),ep=l()((n={},(0,o.Z)(n,"".concat(j,"-lg"),"large"===ef),(0,o.Z)(n,"".concat(j,"-sm"),"small"===ef),(0,o.Z)(n,"".concat(j,"-rtl"),"rtl"===F),(0,o.Z)(n,"".concat(j,"-borderless"),!(void 0===y||y)),(0,o.Z)(n,"".concat(j,"-in-form-item"),et),n),(0,h.Z)(j,eo,ee),G,C);return c.createElement(i.ZP,(0,r.Z)({ref:t,virtual:z,dropdownMatchSelectWidth:K},ec,{transitionName:(0,m.mL)(U,(0,m.q0)(N),L.transitionName),listHeight:void 0===I?256:I,listItemHeight:void 0===R?24:R,mode:X,prefixCls:j,placement:void 0!==N?N:"rtl"===F?"bottomRight":"bottomLeft",direction:F,inputIcon:ea,menuItemSelectedIcon:el,removeIcon:ei,clearIcon:eu,notFoundContent:a,className:ep,getPopupContainer:S||H,dropdownClassName:es,showArrow:ee||k,disabled:null!=P?P:ed}))});w.SECRET_COMBOBOX_MODE_DO_NOT_USE=Z,w.Option=i.Wx,w.OptGroup=i.Xo,t.Z=w},46163:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(63606),r=n(4340),a=n(97937),l=n(80882),i=n(50888),u=n(68795),c=n(67294);function s(e){var t=e.suffixIcon,n=e.clearIcon,s=e.menuItemSelectedIcon,f=e.removeIcon,d=e.loading,p=e.multiple,v=e.hasFeedback,m=e.prefixCls,h=e.showArrow,g=e.feedbackIcon,b=null!=n?n:c.createElement(r.Z,null),E=function(e){return c.createElement(c.Fragment,null,!1!==h&&e,v&&g)},Z=null;if(void 0!==t)Z=E(t);else if(d)Z=E(c.createElement(i.Z,{spin:!0}));else{var w="".concat(m,"-suffix");Z=function(e){var t=e.open,n=e.showSearch;return t&&n?E(c.createElement(u.Z,{className:w})):E(c.createElement(l.Z,{className:w}))}}var y=null;return y=void 0!==s?s:p?c.createElement(o.Z,null):null,{clearIcon:b,suffixIcon:Z,itemIcon:y,removeIcon:void 0!==f?f:c.createElement(a.Z,null)}}},88708:function(e,t,n){n.d(t,{ZP:function(){return u}});var o=n(97685),r=n(67294),a=n(98924),l=0,i=(0,a.Z)();function u(e){var t=r.useState(),n=(0,o.Z)(t,2),a=n[0],u=n[1];return r.useEffect(function(){var e;u("rc_select_".concat((i?(e=l,l+=1):e="TEST_OR_SSR",e)))},[]),e||a}},7752:function(e,t,n){n.d(t,{Ac:function(){return Y},Xo:function(){return et},Wx:function(){return eo},ZP:function(){return ev},lk:function(){return Z}});var o=n(87462),r=n(74902),a=n(4942),l=n(1413),i=n(97685),u=n(45987),c=n(71002),s=n(21770),f=n(80334),d=n(67294),p=n(94184),v=n.n(p),m=n(8410),h=n(31131),g=n(15105),b=n(42550),E=d.createContext(null);function Z(){return d.useContext(E)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=d.useRef(null),n=d.useRef(null);return d.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]),[function(){return t.current},function(o){(o||null===t.current)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}]}var y=n(64217),C=n(18523),S=function(e){var t,n=e.className,o=e.customizeIcon,r=e.customizeIconProps,a=e.onMouseDown,l=e.onClick,i=e.children;return t="function"==typeof o?o(r):o,d.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),a&&a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},void 0!==t?t:d.createElement("span",{className:v()(n.split(/\s+/).map(function(e){return"".concat(e,"-icon")}))},i))},x=d.forwardRef(function(e,t){var n,o,r=e.prefixCls,a=e.id,i=e.inputElement,u=e.disabled,c=e.tabIndex,s=e.autoFocus,p=e.autoComplete,m=e.editable,h=e.activeDescendantId,g=e.value,E=e.maxLength,Z=e.onKeyDown,w=e.onMouseDown,y=e.onChange,C=e.onPaste,S=e.onCompositionStart,x=e.onCompositionEnd,M=e.open,I=e.attrs,N=i||d.createElement("input",null),R=N,D=R.ref,P=R.props,T=P.onKeyDown,O=P.onChange,k=P.onMouseDown,L=P.onCompositionStart,V=P.onCompositionEnd,H=P.style;return(0,f.Kp)(!("maxLength"in N.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),N=d.cloneElement(N,(0,l.Z)((0,l.Z)((0,l.Z)({type:"search"},P),{},{id:a,ref:(0,b.sQ)(t,D),disabled:u,tabIndex:c,autoComplete:p||"off",autoFocus:s,className:v()("".concat(r,"-selection-search-input"),null===(n=N)||void 0===n?void 0:null===(o=n.props)||void 0===o?void 0:o.className),role:"combobox","aria-expanded":M,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":h},I),{},{value:m?g:"",maxLength:E,readOnly:!m,unselectable:m?null:"on",style:(0,l.Z)((0,l.Z)({},H),{},{opacity:m?null:0}),onKeyDown:function(e){Z(e),T&&T(e)},onMouseDown:function(e){w(e),k&&k(e)},onChange:function(e){y(e),O&&O(e)},onCompositionStart:function(e){S(e),L&&L(e)},onCompositionEnd:function(e){x(e),V&&V(e)},onPaste:C}))});function M(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}x.displayName="Input";var I="undefined"!=typeof window&&window.document&&window.document.documentElement;function N(e){return["string","number"].includes((0,c.Z)(e))}function R(e){var t=void 0;return e&&(N(e.title)?t=e.title.toString():N(e.label)&&(t=e.label.toString())),t}function D(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var P=function(e){e.preventDefault(),e.stopPropagation()},T=function(e){var t,n,o=e.id,r=e.prefixCls,l=e.values,u=e.open,c=e.searchValue,s=e.autoClearSearchValue,f=e.inputRef,p=e.placeholder,m=e.disabled,h=e.mode,g=e.showSearch,b=e.autoFocus,E=e.autoComplete,Z=e.activeDescendantId,w=e.tabIndex,M=e.removeIcon,N=e.maxTagCount,T=e.maxTagTextLength,O=e.maxTagPlaceholder,k=void 0===O?function(e){return"+ ".concat(e.length," ...")}:O,L=e.tagRender,V=e.onToggleOpen,H=e.onRemove,_=e.onInputChange,A=e.onInputPaste,F=e.onInputKeyDown,z=e.onInputMouseDown,K=e.onInputCompositionStart,W=e.onInputCompositionEnd,j=d.useRef(null),U=(0,d.useState)(0),Y=(0,i.Z)(U,2),B=Y[0],G=Y[1],X=(0,d.useState)(!1),Q=(0,i.Z)(X,2),q=Q[0],J=Q[1],$="".concat(r,"-selection"),ee=u||"multiple"===h&&!1===s||"tags"===h?c:"";function et(e,t,n,o,r){return d.createElement("span",{className:v()("".concat($,"-item"),(0,a.Z)({},"".concat($,"-item-disabled"),n)),title:R(e)},d.createElement("span",{className:"".concat($,"-item-content")},t),o&&d.createElement(S,{className:"".concat($,"-item-remove"),onMouseDown:P,onClick:r,customizeIcon:M},"\xd7"))}t=function(){G(j.current.scrollWidth)},n=[ee],I?d.useLayoutEffect(t,n):d.useEffect(t,n);var en=d.createElement("div",{className:"".concat($,"-search"),style:{width:B},onFocus:function(){J(!0)},onBlur:function(){J(!1)}},d.createElement(x,{ref:f,open:u,prefixCls:r,id:o,inputElement:null,disabled:m,autoFocus:b,autoComplete:E,editable:"tags"===h||"multiple"===h&&!1===s||g&&(u||q),activeDescendantId:Z,value:ee,onKeyDown:F,onMouseDown:z,onChange:_,onPaste:A,onCompositionStart:K,onCompositionEnd:W,tabIndex:w,attrs:(0,y.Z)(e,!0)}),d.createElement("span",{ref:j,className:"".concat($,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),eo=d.createElement(C.Z,{prefixCls:"".concat($,"-overflow"),data:l,renderItem:function(e){var t,n=e.disabled,o=e.label,r=e.value,a=!m&&!n,l=o;if("number"==typeof T&&("string"==typeof o||"number"==typeof o)){var i=String(l);i.length>T&&(l="".concat(i.slice(0,T),"..."))}var c=function(t){t&&t.stopPropagation(),H(e)};return"function"==typeof L?(t=l,d.createElement("span",{onMouseDown:function(e){P(e),V(!u)}},L({label:t,value:r,disabled:n,closable:a,onClose:c}))):et(e,l,n,a,c)},renderRest:function(e){var t="function"==typeof k?k(e):k;return et({title:t},t,!1)},suffix:en,itemKey:D,maxCount:N});return d.createElement(d.Fragment,null,eo,!l.length&&!ee&&d.createElement("span",{className:"".concat($,"-placeholder")},p))},O=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,r=e.inputRef,a=e.disabled,l=e.autoFocus,u=e.autoComplete,c=e.activeDescendantId,s=e.mode,f=e.open,p=e.values,v=e.placeholder,m=e.tabIndex,h=e.showSearch,g=e.searchValue,b=e.activeValue,E=e.maxLength,Z=e.onInputKeyDown,w=e.onInputMouseDown,C=e.onInputChange,S=e.onInputPaste,M=e.onInputCompositionStart,I=e.onInputCompositionEnd,N=d.useState(!1),D=(0,i.Z)(N,2),P=D[0],T=D[1],O="combobox"===s,k=p[0],L=g||"";O&&b&&!P&&(L=b),d.useEffect(function(){O&&T(!1)},[O,b]);var V=("combobox"===s||!!f||!!h)&&!!L,H=R(k);return d.createElement(d.Fragment,null,d.createElement("span",{className:"".concat(n,"-selection-search")},d.createElement(x,{ref:r,prefixCls:n,id:o,open:f,inputElement:t,disabled:a,autoFocus:l,autoComplete:u,editable:O||h,activeDescendantId:c,value:L,onKeyDown:Z,onMouseDown:w,onChange:function(e){T(!0),C(e)},onPaste:S,onCompositionStart:M,onCompositionEnd:I,tabIndex:m,attrs:(0,y.Z)(e,!0),maxLength:O?E:void 0})),!O&&k?d.createElement("span",{className:"".concat(n,"-selection-item"),title:H,style:V?{visibility:"hidden"}:void 0},k.label):null,k?null:d.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:V?{visibility:"hidden"}:void 0},v))},k=d.forwardRef(function(e,t){var n=(0,d.useRef)(null),r=(0,d.useRef)(!1),a=e.prefixCls,l=e.open,u=e.mode,c=e.showSearch,s=e.tokenWithEnter,f=e.autoClearSearchValue,p=e.onSearch,v=e.onSearchSubmit,m=e.onToggleOpen,h=e.onInputKeyDown,b=e.domRef;d.useImperativeHandle(t,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var E=w(0),Z=(0,i.Z)(E,2),y=Z[0],C=Z[1],S=(0,d.useRef)(null),x=function(e){!1!==p(e,!0,r.current)&&m(!0)},M={inputRef:n,onInputKeyDown:function(e){var t=e.which;(t===g.Z.UP||t===g.Z.DOWN)&&e.preventDefault(),h&&h(e),t!==g.Z.ENTER||"tags"!==u||r.current||l||null==v||v(e.target.value),[g.Z.ESC,g.Z.SHIFT,g.Z.BACKSPACE,g.Z.TAB,g.Z.WIN_KEY,g.Z.ALT,g.Z.META,g.Z.WIN_KEY_RIGHT,g.Z.CTRL,g.Z.SEMICOLON,g.Z.EQUALS,g.Z.CAPS_LOCK,g.Z.CONTEXT_MENU,g.Z.F1,g.Z.F2,g.Z.F3,g.Z.F4,g.Z.F5,g.Z.F6,g.Z.F7,g.Z.F8,g.Z.F9,g.Z.F10,g.Z.F11,g.Z.F12].includes(t)||m(!0)},onInputMouseDown:function(){C(!0)},onInputChange:function(e){var t=e.target.value;if(s&&S.current&&/[\r\n]/.test(S.current)){var n=S.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,S.current)}S.current=null,x(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");S.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==u&&x(e.target.value)}},I="multiple"===u||"tags"===u?d.createElement(T,(0,o.Z)({},e,M)):d.createElement(O,(0,o.Z)({},e,M));return d.createElement("div",{ref:b,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout(function(){n.current.focus()}):n.current.focus())},onMouseDown:function(e){var t=y();e.target===n.current||t||"combobox"===u||e.preventDefault(),("combobox"===u||c&&t)&&l||(l&&!1!==f&&p("",!0,!1),m())}},I)});k.displayName="Selector";var L=n(81263),V=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],H=function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},_=d.forwardRef(function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),i=e.children,c=e.popupElement,s=e.containerWidth,f=e.animation,p=e.transitionName,m=e.dropdownStyle,h=e.dropdownClassName,g=e.direction,b=e.placement,E=e.dropdownMatchSelectWidth,Z=e.dropdownRender,w=e.dropdownAlign,y=e.getPopupContainer,C=e.empty,S=e.getTriggerDOMNode,x=e.onPopupVisibleChange,M=e.onPopupMouseEnter,I=(0,u.Z)(e,V),N="".concat(n,"-dropdown"),R=c;Z&&(R=Z(c));var D=d.useMemo(function(){return H(E)},[E]),P=f?"".concat(N,"-").concat(f):p,T=d.useRef(null);d.useImperativeHandle(t,function(){return{getPopupElement:function(){return T.current}}});var O=(0,l.Z)({minWidth:s},m);return"number"==typeof E?O.width=E:E&&(O.width=s),d.createElement(L.Z,(0,o.Z)({},I,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:b||("rtl"===(void 0===g?"ltr":g)?"bottomRight":"bottomLeft"),builtinPlacements:D,prefixCls:N,popupTransitionName:P,popup:d.createElement("div",{ref:T,onMouseEnter:M},R),popupAlign:w,popupVisible:r,getPopupContainer:y,popupClassName:v()(h,(0,a.Z)({},"".concat(N,"-empty"),C)),popupStyle:O,getTriggerDOMNode:S,onPopupVisibleChange:x}),i)});_.displayName="SelectTrigger";var A=n(84506);function F(e,t){var n,o=e.key;return("value"in e&&(n=e.value),null!=o)?o:void 0!==n?n:"rc-index-key-".concat(t)}function z(e,t){var n=e||{};return{label:n.label||(t?"children":"label"),value:n.value||"value",options:n.options||"options"}}function K(e){var t=(0,l.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,f.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var W=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],j=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function U(e){return"tags"===e||"multiple"===e}var Y=d.forwardRef(function(e,t){var n,f,p,Z,y,C,x,M,I=e.id,N=e.prefixCls,R=e.className,D=e.showSearch,P=e.tagRender,T=e.direction,O=e.omitDomProps,L=e.displayValues,V=e.onDisplayValuesChange,H=e.emptyOptions,F=e.notFoundContent,z=void 0===F?"Not Found":F,K=e.onClear,Y=e.mode,B=e.disabled,G=e.loading,X=e.getInputElement,Q=e.getRawInputElement,q=e.open,J=e.defaultOpen,$=e.onDropdownVisibleChange,ee=e.activeValue,et=e.onActiveValueChange,en=e.activeDescendantId,eo=e.searchValue,er=e.autoClearSearchValue,ea=e.onSearch,el=e.onSearchSplit,ei=e.tokenSeparators,eu=e.allowClear,ec=e.showArrow,es=e.inputIcon,ef=e.clearIcon,ed=e.OptionList,ep=e.animation,ev=e.transitionName,em=e.dropdownStyle,eh=e.dropdownClassName,eg=e.dropdownMatchSelectWidth,eb=e.dropdownRender,eE=e.dropdownAlign,eZ=e.placement,ew=e.getPopupContainer,ey=e.showAction,eC=void 0===ey?[]:ey,eS=e.onFocus,ex=e.onBlur,eM=e.onKeyUp,eI=e.onKeyDown,eN=e.onMouseDown,eR=(0,u.Z)(e,W),eD=U(Y),eP=(void 0!==D?D:eD)||"combobox"===Y,eT=(0,l.Z)({},eR);j.forEach(function(e){delete eT[e]}),null==O||O.forEach(function(e){delete eT[e]});var eO=d.useState(!1),ek=(0,i.Z)(eO,2),eL=ek[0],eV=ek[1];d.useEffect(function(){eV((0,h.Z)())},[]);var eH=d.useRef(null),e_=d.useRef(null),eA=d.useRef(null),eF=d.useRef(null),ez=d.useRef(null),eK=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=d.useState(!1),n=(0,i.Z)(t,2),o=n[0],r=n[1],a=d.useRef(null),l=function(){window.clearTimeout(a.current)};return d.useEffect(function(){return l},[]),[o,function(t,n){l(),a.current=window.setTimeout(function(){r(t),n&&n()},e)},l]}(),eW=(0,i.Z)(eK,3),ej=eW[0],eU=eW[1],eY=eW[2];d.useImperativeHandle(t,function(){var e,t;return{focus:null===(e=eF.current)||void 0===e?void 0:e.focus,blur:null===(t=eF.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=ez.current)||void 0===t?void 0:t.scrollTo(e)}}});var eB=d.useMemo(function(){if("combobox"!==Y)return eo;var e,t=null===(e=L[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""},[eo,Y,L]),eG="combobox"===Y&&"function"==typeof X&&X()||null,eX="function"==typeof Q&&Q(),eQ=(0,b.x1)(e_,null==eX?void 0:null===(p=eX.props)||void 0===p?void 0:p.ref),eq=(0,s.Z)(void 0,{defaultValue:J,value:q}),eJ=(0,i.Z)(eq,2),e$=eJ[0],e0=eJ[1],e1=e$,e2=!z&&H;(B||e2&&e1&&"combobox"===Y)&&(e1=!1);var e4=!e2&&e1,e3=d.useCallback(function(e){var t=void 0!==e?e:!e1;B||(e0(t),e1!==t&&(null==$||$(t)))},[B,e1,e0,$]),e7=d.useMemo(function(){return(ei||[]).some(function(e){return["\n","\r\n"].includes(e)})},[ei]),e5=function(e,t,n){var o=!0,a=e;null==et||et(null);var l=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,o=function e(t,o){var a=(0,A.Z)(o),l=a[0],i=a.slice(1);if(!l)return[t];var u=t.split(l);return n=n||u.length>1,u.reduce(function(t,n){return[].concat((0,r.Z)(t),(0,r.Z)(e(n,i)))},[]).filter(function(e){return e})}(e,t);return n?o:null}(e,ei);return"combobox"!==Y&&l&&(a="",null==el||el(l),e3(!1),o=!1),ea&&eB!==a&&ea(a,{source:t?"typing":"effect"}),o};d.useEffect(function(){e1||eD||"combobox"===Y||e5("",!1,!1)},[e1]),d.useEffect(function(){e$&&B&&e0(!1),B&&eU(!1)},[B]);var e6=w(),e9=(0,i.Z)(e6,2),e8=e9[0],te=e9[1],tt=d.useRef(!1),tn=[];d.useEffect(function(){return function(){tn.forEach(function(e){return clearTimeout(e)}),tn.splice(0,tn.length)}},[]);var to=d.useState(null),tr=(0,i.Z)(to,2),ta=tr[0],tl=tr[1],ti=d.useState({}),tu=(0,i.Z)(ti,2)[1];(0,m.Z)(function(){if(e4){var e,t=Math.ceil(null===(e=eH.current)||void 0===e?void 0:e.offsetWidth);ta===t||Number.isNaN(t)||tl(t)}},[e4]),eX&&(y=function(e){e3(e)}),n=function(){var e;return[eH.current,null===(e=eA.current)||void 0===e?void 0:e.getPopupElement()]},(f=d.useRef(null)).current={open:e4,triggerOpen:e3,customizedTrigger:!!eX},d.useEffect(function(){function e(e){if(null===(t=f.current)||void 0===t||!t.customizedTrigger){var t,o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o),f.current.open&&n().filter(function(e){return e}).every(function(e){return!e.contains(o)&&e!==o})&&f.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}},[]);var tc=d.useMemo(function(){return(0,l.Z)((0,l.Z)({},e),{},{notFoundContent:z,open:e1,triggerOpen:e4,id:I,showSearch:eP,multiple:eD,toggleOpen:e3})},[e,z,e4,e1,I,eP,eD,e3]),ts=void 0!==ec?ec:G||!eD&&"combobox"!==Y;ts&&(C=d.createElement(S,{className:v()("".concat(N,"-arrow"),(0,a.Z)({},"".concat(N,"-arrow-loading"),G)),customizeIcon:es,customizeIconProps:{loading:G,searchValue:eB,open:e1,focused:ej,showSearch:eP}})),!B&&eu&&(L.length||eB)&&!("combobox"===Y&&""===eB)&&(x=d.createElement(S,{className:"".concat(N,"-clear"),onMouseDown:function(){var e;null==K||K(),null===(e=eF.current)||void 0===e||e.focus(),V([],{type:"clear",values:L}),e5("",!1,!1)},customizeIcon:ef},"\xd7"));var tf=d.createElement(ed,{ref:ez}),td=v()(N,R,(Z={},(0,a.Z)(Z,"".concat(N,"-focused"),ej),(0,a.Z)(Z,"".concat(N,"-multiple"),eD),(0,a.Z)(Z,"".concat(N,"-single"),!eD),(0,a.Z)(Z,"".concat(N,"-allow-clear"),eu),(0,a.Z)(Z,"".concat(N,"-show-arrow"),ts),(0,a.Z)(Z,"".concat(N,"-disabled"),B),(0,a.Z)(Z,"".concat(N,"-loading"),G),(0,a.Z)(Z,"".concat(N,"-open"),e1),(0,a.Z)(Z,"".concat(N,"-customize-input"),eG),(0,a.Z)(Z,"".concat(N,"-show-search"),eP),Z)),tp=d.createElement(_,{ref:eA,disabled:B,prefixCls:N,visible:e4,popupElement:tf,containerWidth:ta,animation:ep,transitionName:ev,dropdownStyle:em,dropdownClassName:eh,direction:T,dropdownMatchSelectWidth:eg,dropdownRender:eb,dropdownAlign:eE,placement:eZ,getPopupContainer:ew,empty:H,getTriggerDOMNode:function(){return e_.current},onPopupVisibleChange:y,onPopupMouseEnter:function(){tu({})}},eX?d.cloneElement(eX,{ref:eQ}):d.createElement(k,(0,o.Z)({},e,{domRef:e_,prefixCls:N,inputElement:eG,ref:eF,id:I,showSearch:eP,autoClearSearchValue:er,mode:Y,activeDescendantId:en,tagRender:P,values:L,open:e1,onToggleOpen:e3,activeValue:ee,searchValue:eB,onSearch:e5,onSearchSubmit:function(e){e&&e.trim()&&ea(e,{source:"submit"})},onRemove:function(e){V(L.filter(function(t){return t!==e}),{type:"remove",values:[e]})},tokenWithEnter:e7})));return M=eX?tp:d.createElement("div",(0,o.Z)({className:td},eT,{ref:eH,onMouseDown:function(e){var t,n=e.target,o=null===(t=eA.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var r=setTimeout(function(){var e,t=tn.indexOf(r);-1!==t&&tn.splice(t,1),eY(),eL||o.contains(document.activeElement)||null===(e=eF.current)||void 0===e||e.focus()});tn.push(r)}for(var a=arguments.length,l=Array(a>1?a-1:0),i=1;i<a;i++)l[i-1]=arguments[i];null==eN||eN.apply(void 0,[e].concat(l))},onKeyDown:function(e){var t,n=e8(),o=e.which;if(o!==g.Z.ENTER||("combobox"!==Y&&e.preventDefault(),e1||e3(!0)),te(!!eB),o===g.Z.BACKSPACE&&!n&&eD&&!eB&&L.length){for(var a=(0,r.Z)(L),l=null,i=a.length-1;i>=0;i-=1){var u=a[i];if(!u.disabled){a.splice(i,1),l=u;break}}l&&V(a,{type:"remove",values:[l]})}for(var c=arguments.length,s=Array(c>1?c-1:0),f=1;f<c;f++)s[f-1]=arguments[f];e1&&ez.current&&(t=ez.current).onKeyDown.apply(t,[e].concat(s)),null==eI||eI.apply(void 0,[e].concat(s))},onKeyUp:function(e){for(var t,n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e1&&ez.current&&(t=ez.current).onKeyUp.apply(t,[e].concat(o)),null==eM||eM.apply(void 0,[e].concat(o))},onFocus:function(){eU(!0),!B&&(eS&&!tt.current&&eS.apply(void 0,arguments),eC.includes("focus")&&e3(!0)),tt.current=!0},onBlur:function(){eU(!1,function(){tt.current=!1,e3(!1)}),!B&&(eB&&("tags"===Y?ea(eB,{source:"submit"}):"multiple"===Y&&ea("",{source:"blur"})),ex&&ex.apply(void 0,arguments))}}),ej&&!e1&&d.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(L.map(function(e){var t=e.label,n=e.value;return["number","string"].includes((0,c.Z)(t))?t:n}).join(", "))),tp,C,x),d.createElement(E.Provider,{value:tc},M)}),B=function(e,t){var n=d.useRef({values:new Map,options:new Map});return[d.useMemo(function(){var o=n.current,r=o.values,a=o.options,i=e.map(function(e){if(void 0===e.label){var t;return(0,l.Z)((0,l.Z)({},e),{},{label:null===(t=r.get(e.value))||void 0===t?void 0:t.label})}return e}),u=new Map,c=new Map;return i.forEach(function(e){u.set(e.value,e),c.set(e.value,t.get(e.value)||a.get(e.value))}),n.current.values=u,n.current.options=c,i},[e,t]),d.useCallback(function(e){return t.get(e)||n.current.options.get(e)},[t])]};function G(e,t){return M(e).join("").toUpperCase().includes(t)}var X=n(88708),Q=n(50344),q=["children","value"],J=["children"];function $(e){var t=d.useRef();return t.current=e,d.useCallback(function(){return t.current.apply(t,arguments)},[])}var ee=function(){return null};ee.isSelectOptGroup=!0;var et=ee,en=function(){return null};en.isSelectOption=!0;var eo=en,er=n(98423),ea=n(56982),el=n(73453),ei=d.createContext(null),eu=["disabled","title","children","style","className"];function ec(e){return"string"==typeof e||"number"==typeof e}var es=d.forwardRef(function(e,t){var n=Z(),l=n.prefixCls,c=n.id,s=n.open,f=n.multiple,p=n.mode,m=n.searchValue,h=n.toggleOpen,b=n.notFoundContent,E=n.onPopupScroll,w=d.useContext(ei),C=w.flattenOptions,x=w.onActiveValue,M=w.defaultActiveFirstOption,I=w.onSelect,N=w.menuItemSelectedIcon,R=w.rawValues,D=w.fieldNames,P=w.virtual,T=w.listHeight,O=w.listItemHeight,k="".concat(l,"-item"),L=(0,ea.Z)(function(){return C},[s,C],function(e,t){return t[0]&&e[1]!==t[1]}),V=d.useRef(null),H=function(e){e.preventDefault()},_=function(e){V.current&&V.current.scrollTo("number"==typeof e?{index:e}:e)},A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=L.length,o=0;o<n;o+=1){var r=(e+o*t+n)%n,a=L[r],l=a.group,i=a.data;if(!l&&!i.disabled)return r}return -1},F=d.useState(function(){return A(0)}),z=(0,i.Z)(F,2),K=z[0],W=z[1],j=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];W(e);var n={source:t?"keyboard":"mouse"},o=L[e];if(!o){x(null,-1,n);return}x(o.value,e,n)};(0,d.useEffect)(function(){j(!1!==M?A(0):-1)},[L.length,m]);var U=d.useCallback(function(e){return R.has(e)&&"combobox"!==p},[p,(0,r.Z)(R).toString(),R.size]);(0,d.useEffect)(function(){var e,t=setTimeout(function(){if(!f&&s&&1===R.size){var e=Array.from(R)[0],t=L.findIndex(function(t){return t.data.value===e});-1!==t&&(j(t),_(t))}});return s&&(null===(e=V.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}},[s,m]);var Y=function(e){void 0!==e&&I(e,{selected:!R.has(e)}),f||h(!1)};if(d.useImperativeHandle(t,function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case g.Z.N:case g.Z.P:case g.Z.UP:case g.Z.DOWN:var o=0;if(t===g.Z.UP?o=-1:t===g.Z.DOWN?o=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===g.Z.N?o=1:t===g.Z.P&&(o=-1)),0!==o){var r=A(K+o,o);_(r),j(r,!0)}break;case g.Z.ENTER:var a=L[K];a&&!a.data.disabled?Y(a.value):Y(void 0),s&&e.preventDefault();break;case g.Z.ESC:h(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){_(e)}}}),0===L.length)return d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(k,"-empty"),onMouseDown:H},b);var B=Object.keys(D).map(function(e){return D[e]}),G=function(e){return e.label},X=function(e){var t=L[e];if(!t)return null;var n=t.data||{},r=n.value,a=t.group,l=(0,y.Z)(n,!0),i=G(t);return t?d.createElement("div",(0,o.Z)({"aria-label":"string"!=typeof i||a?null:i},l,{key:e,role:a?"presentation":"option",id:"".concat(c,"_list_").concat(e),"aria-selected":U(r)}),r):null};return d.createElement(d.Fragment,null,d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),style:{height:0,width:0,overflow:"hidden"}},X(K-1),X(K),X(K+1)),d.createElement(el.Z,{itemKey:"key",ref:V,data:L,height:T,itemHeight:O,fullHeight:!1,onMouseDown:H,onScroll:E,virtual:P},function(e,t){var n=e.group,r=e.groupOption,l=e.data,i=e.label,c=e.value,s=l.key;if(n){var f,p,m=null!==(p=l.title)&&void 0!==p?p:ec(i)?i.toString():void 0;return d.createElement("div",{className:v()(k,"".concat(k,"-group")),title:m},void 0!==i?i:s)}var h=l.disabled,g=l.title,b=(l.children,l.style),E=l.className,Z=(0,u.Z)(l,eu),w=(0,er.Z)(Z,B),C=U(c),x="".concat(k,"-option"),M=v()(k,x,E,(f={},(0,a.Z)(f,"".concat(x,"-grouped"),r),(0,a.Z)(f,"".concat(x,"-active"),K===t&&!h),(0,a.Z)(f,"".concat(x,"-disabled"),h),(0,a.Z)(f,"".concat(x,"-selected"),C),f)),I=G(e),R="number"==typeof I?I:I||c,D=ec(R)?R.toString():void 0;return void 0!==g&&(D=g),d.createElement("div",(0,o.Z)({},(0,y.Z)(w),{"aria-selected":C,className:M,title:D,onMouseMove:function(){K===t||h||j(t)},onClick:function(){h||Y(c)},style:b}),d.createElement("div",{className:"".concat(x,"-content")},R),d.isValidElement(N)||C,(!N||"function"==typeof N||C)&&d.createElement(S,{className:"".concat(k,"-option-state"),customizeIcon:N,customizeIconProps:{isSelected:C}},C?"✓":null))}))});es.displayName="OptionList";var ef=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],ed=["inputValue"],ep=d.forwardRef(function(e,t){var n,f=e.id,p=e.mode,v=e.prefixCls,m=e.backfill,h=e.fieldNames,g=e.inputValue,b=e.searchValue,E=e.onSearch,Z=e.autoClearSearchValue,w=void 0===Z||Z,y=e.onSelect,C=e.onDeselect,S=e.dropdownMatchSelectWidth,x=void 0===S||S,I=e.filterOption,N=e.filterSort,R=e.optionFilterProp,D=e.optionLabelProp,P=e.options,T=e.children,O=e.defaultActiveFirstOption,k=e.menuItemSelectedIcon,L=e.virtual,V=e.listHeight,H=void 0===V?200:V,_=e.listItemHeight,A=void 0===_?20:_,W=e.value,j=e.defaultValue,ee=e.labelInValue,et=e.onChange,en=(0,u.Z)(e,ef),eo=(0,X.ZP)(f),er=U(p),ea=!!(!P&&T),el=d.useMemo(function(){return(void 0!==I||"combobox"!==p)&&I},[I,p]),eu=d.useMemo(function(){return z(h,ea)},[JSON.stringify(h),ea]),ec=(0,s.Z)("",{value:void 0!==b?b:g,postState:function(e){return e||""}}),ep=(0,i.Z)(ec,2),ev=ep[0],em=ep[1],eh=d.useMemo(function(){var e=P;P||(e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,Q.Z)(t).map(function(t,o){if(!d.isValidElement(t)||!t.type)return null;var r,a,i,c,s,f=t.type.isSelectOptGroup,p=t.key,v=t.props,m=v.children,h=(0,u.Z)(v,J);return n||!f?(r=t.key,i=(a=t.props).children,c=a.value,s=(0,u.Z)(a,q),(0,l.Z)({key:r,value:void 0!==c?c:r,children:i},s)):(0,l.Z)((0,l.Z)({key:"__RC_SELECT_GRP__".concat(null===p?o:p,"__"),label:p},h),{},{options:e(m)})}).filter(function(e){return e})}(T));var t=new Map,n=new Map,o=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(r){for(var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=0;l<r.length;l+=1){var i=r[l];!i[eu.options]||a?(t.set(i[eu.value],i),o(n,i,eu.label),o(n,i,R),o(n,i,D)):e(i[eu.options],!0)}}(e),{options:e,valueOptions:t,labelOptions:n}},[P,T,eu,R,D]),eg=eh.valueOptions,eb=eh.labelOptions,eE=eh.options,eZ=d.useCallback(function(e){return M(e).map(function(e){e&&"object"===(0,c.Z)(e)?(o=e.key,n=e.label,t=null!==(l=e.value)&&void 0!==l?l:o):t=e;var t,n,o,r,a,l,i,u=eg.get(t);return u&&(void 0===n&&(n=null==u?void 0:u[D||eu.label]),void 0===o&&(o=null!==(i=null==u?void 0:u.key)&&void 0!==i?i:t),r=null==u?void 0:u.disabled,a=null==u?void 0:u.title),{label:n,value:t,key:o,disabled:r,title:a}})},[eu,D,eg]),ew=(0,s.Z)(j,{value:W}),ey=(0,i.Z)(ew,2),eC=ey[0],eS=ey[1],ex=B(d.useMemo(function(){var e,t=eZ(eC);return"combobox"!==p||null!==(e=t[0])&&void 0!==e&&e.value?t:[]},[eC,eZ,p]),eg),eM=(0,i.Z)(ex,2),eI=eM[0],eN=eM[1],eR=d.useMemo(function(){if(!p&&1===eI.length){var e=eI[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return eI.map(function(e){var t;return(0,l.Z)((0,l.Z)({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})})},[p,eI]),eD=d.useMemo(function(){return new Set(eI.map(function(e){return e.value}))},[eI]);d.useEffect(function(){if("combobox"===p){var e,t=null===(e=eI[0])||void 0===e?void 0:e.value;em(null!=t?String(t):"")}},[eI]);var eP=$(function(e,t){var n;return n={},(0,a.Z)(n,eu.value,e),(0,a.Z)(n,eu.label,null!=t?t:e),n}),eT=(n=d.useMemo(function(){if("tags"!==p)return eE;var e=(0,r.Z)(eE);return(0,r.Z)(eI).sort(function(e,t){return e.value<t.value?-1:1}).forEach(function(t){var n=t.value;eg.has(n)||e.push(eP(n,t.label))}),e},[eP,eE,eg,eI,p]),d.useMemo(function(){if(!ev||!1===el)return n;var e=eu.options,t=eu.label,o=eu.value,r=[],i="function"==typeof el,u=ev.toUpperCase(),c=i?el:function(n,r){return R?G(r[R],u):r[e]?G(r["children"!==t?t:"label"],u):G(r[o],u)},s=i?function(e){return K(e)}:function(e){return e};return n.forEach(function(t){if(t[e]){if(c(ev,s(t)))r.push(t);else{var n=t[e].filter(function(e){return c(ev,s(e))});n.length&&r.push((0,l.Z)((0,l.Z)({},t),{},(0,a.Z)({},e,n)))}return}c(ev,s(t))&&r.push(t)}),r},[n,el,R,ev,eu])),eO=d.useMemo(function(){return"tags"!==p||!ev||eT.some(function(e){return e[R||"value"]===ev})?eT:[eP(ev)].concat((0,r.Z)(eT))},[eP,R,p,eT,ev]),ek=d.useMemo(function(){return N?(0,r.Z)(eO).sort(function(e,t){return N(e,t)}):eO},[eO,N]),eL=d.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,o=t.childrenAsData,r=[],a=z(n,!1),l=a.label,i=a.value,u=a.options;return!function e(t,n){t.forEach(function(t){var a=t[l];if(!n&&u in t){var c=a;void 0===c&&o&&(c=t.label),r.push({key:F(t,r.length),group:!0,data:t,label:c}),e(t[u],!0)}else{var s=t[i];r.push({key:F(t,r.length),groupOption:n,data:t,label:a,value:s})}})}(e,!1),r}(ek,{fieldNames:eu,childrenAsData:ea})},[ek,eu,ea]),eV=function(e){var t=eZ(e);if(eS(t),et&&(t.length!==eI.length||t.some(function(e,t){var n;return(null===(n=eI[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)}))){var n=ee?t:t.map(function(e){return e.value}),o=t.map(function(e){return K(eN(e.value))});et(er?n:n[0],er?o:o[0])}},eH=d.useState(null),e_=(0,i.Z)(eH,2),eA=e_[0],eF=e_[1],ez=d.useState(0),eK=(0,i.Z)(ez,2),eW=eK[0],ej=eK[1],eU=void 0!==O?O:"combobox"!==p,eY=d.useCallback(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.source;ej(t),m&&"combobox"===p&&null!==e&&"keyboard"===(void 0===o?"keyboard":o)&&eF(String(e))},[m,p]),eB=function(e,t,n){var o=function(){var t,n=eN(e);return[ee?{label:null==n?void 0:n[eu.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,K(n)]};if(t&&y){var r=o(),a=(0,i.Z)(r,2);y(a[0],a[1])}else if(!t&&C&&"clear"!==n){var l=o(),u=(0,i.Z)(l,2);C(u[0],u[1])}},eG=$(function(e,t){var n=!er||t.selected;eV(n?er?[].concat((0,r.Z)(eI),[e]):[e]:eI.filter(function(t){return t.value!==e})),eB(e,n),"combobox"===p?eF(""):(!U||w)&&(em(""),eF(""))}),eX=d.useMemo(function(){return(0,l.Z)((0,l.Z)({},eh),{},{flattenOptions:eL,onActiveValue:eY,defaultActiveFirstOption:eU,onSelect:eG,menuItemSelectedIcon:k,rawValues:eD,fieldNames:eu,virtual:!1!==L&&!1!==x,listHeight:H,listItemHeight:A,childrenAsData:ea})},[eh,eL,eY,eU,eG,k,eD,eu,L,x,H,A,ea]);return d.createElement(ei.Provider,{value:eX},d.createElement(Y,(0,o.Z)({},en,{id:eo,prefixCls:void 0===v?"rc-select":v,ref:t,omitDomProps:ed,mode:p,displayValues:eR,onDisplayValuesChange:function(e,t){eV(e);var n=t.type,o=t.values;("remove"===n||"clear"===n)&&o.forEach(function(e){eB(e.value,!1,n)})},searchValue:ev,onSearch:function(e,t){if(em(e),eF(null),"submit"===t.source){var n=(e||"").trim();n&&(eV(Array.from(new Set([].concat((0,r.Z)(eD),[n])))),eB(n,!0),em(""));return}"blur"!==t.source&&("combobox"===p&&eV(e),null==E||E(e))},autoClearSearchValue:w,onSearchSplit:function(e){var t=e;"tags"!==p&&(t=e.map(function(e){var t=eb.get(e);return null==t?void 0:t.value}).filter(function(e){return void 0!==e}));var n=Array.from(new Set([].concat((0,r.Z)(eD),(0,r.Z)(t))));eV(n),n.forEach(function(e){eB(e,!0)})},dropdownMatchSelectWidth:x,OptionList:es,emptyOptions:!eL.length,activeValue:eA,activeDescendantId:"".concat(eo,"_list_").concat(eW)})))});ep.Option=eo,ep.OptGroup=et;var ev=ep},73453:function(e,t,n){n.d(t,{Z:function(){return T}});var o=n(87462),r=n(4942),a=n(1413),l=n(97685),i=n(45987),u=n(67294),c=n(94184),s=n.n(c),f=n(48555),d=u.forwardRef(function(e,t){var n=e.height,l=e.offset,i=e.children,c=e.prefixCls,d=e.onInnerResize,p=e.innerProps,v={},m={display:"flex",flexDirection:"column"};return void 0!==l&&(v={height:n,position:"relative",overflow:"hidden"},m=(0,a.Z)((0,a.Z)({},m),{},{transform:"translateY(".concat(l,"px)"),position:"absolute",left:0,right:0,top:0})),u.createElement("div",{style:v},u.createElement(f.default,{onResize:function(e){e.offsetHeight&&d&&d()}},u.createElement("div",(0,o.Z)({style:m,className:s()((0,r.Z)({},"".concat(c,"-holder-inner"),c)),ref:t},p),i)))});d.displayName="Filler";var p=n(15671),v=n(43144),m=n(32531),h=n(73568),g=n(75164);function b(e){return"touches"in e?e.touches[0].pageY:e.pageY}var E=function(e){(0,m.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;(0,p.Z)(this,n);for(var o=arguments.length,r=Array(o),a=0;a<o;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))).moveRaf=null,e.scrollbarRef=u.createRef(),e.thumbRef=u.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout(function(){e.setState({visible:!1})},2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){var t;window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),null===(t=e.scrollbarRef.current)||void 0===t||t.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current&&(e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp)),g.Z.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:b(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,o=n.dragging,r=n.pageY,a=n.startTop,l=e.props.onScroll;if(g.Z.cancel(e.moveRaf),o){var i=b(t)-r,u=e.getEnableScrollRange(),c=e.getEnableHeightRange(),s=Math.ceil((c?(a+i)/c:0)*u);e.moveRaf=(0,g.Z)(function(){l(s)})}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,o=n/t.count*10;return Math.floor(o=Math.min(o=Math.max(o,20),n/2))},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),o=e.getEnableHeightRange();return 0===t||0===n?0:t/n*o},e.showScroll=function(){var t=e.props,n=t.height;return t.scrollHeight>n},e}return(0,v.Z)(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.visible,o=this.props.prefixCls,a=this.getSpinHeight(),l=this.getTop(),i=this.showScroll();return u.createElement("div",{ref:this.scrollbarRef,className:s()("".concat(o,"-scrollbar"),(0,r.Z)({},"".concat(o,"-scrollbar-show"),i)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:i&&n?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},u.createElement("div",{ref:this.thumbRef,className:s()("".concat(o,"-scrollbar-thumb"),(0,r.Z)({},"".concat(o,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:a,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),n}(u.Component);function Z(e){var t=e.children,n=e.setRef,o=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:o})}var w=n(34203),y=function(){function e(){(0,p.Z)(this,e),this.maps=void 0,this.maps=Object.create(null)}return(0,v.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),C=n(71002),S=("undefined"==typeof navigator?"undefined":(0,C.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),x=function(e,t){var n=(0,u.useRef)(!1),o=(0,u.useRef)(null),r=(0,u.useRef)({top:e,bottom:t});return r.current.top=e,r.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e<0&&r.current.top||e>0&&r.current.bottom;return t&&a?(clearTimeout(o.current),n.current=!1):(!a||n.current)&&(clearTimeout(o.current),n.current=!0,o.current=setTimeout(function(){n.current=!1},50)),!n.current&&a}},M=n(8410),I=14/15,N=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],R=[],D={overflowY:"auto",overflowAnchor:"none"},P=u.forwardRef(function(e,t){var n,c,f,p,v,m,h,b,P,T,O,k,L,V,H,_,A,F,z,K,W,j,U,Y,B,G,X=e.prefixCls,Q=void 0===X?"rc-virtual-list":X,q=e.className,J=e.height,$=e.itemHeight,ee=e.fullHeight,et=e.style,en=e.data,eo=e.children,er=e.itemKey,ea=e.virtual,el=e.component,ei=e.onScroll,eu=e.onVisibleChange,ec=e.innerProps,es=(0,i.Z)(e,N),ef=!!(!1!==ea&&J&&$),ed=ef&&en&&$*en.length>J,ep=(0,u.useState)(0),ev=(0,l.Z)(ep,2),em=ev[0],eh=ev[1],eg=(0,u.useState)(!1),eb=(0,l.Z)(eg,2),eE=eb[0],eZ=eb[1],ew=s()(Q,q),ey=en||R,eC=(0,u.useRef)(),eS=(0,u.useRef)(),ex=(0,u.useRef)(),eM=u.useCallback(function(e){return"function"==typeof er?er(e):null==e?void 0:e[er]},[er]);function eI(e){eh(function(t){var n,o=(n="function"==typeof e?e(t):e,Number.isNaN(ej.current)||(n=Math.min(n,ej.current)),n=Math.max(n,0));return eC.current.scrollTop=o,o})}var eN=(0,u.useRef)({start:0,end:ey.length}),eR=(0,u.useRef)(),eD=(c=u.useState(ey),p=(f=(0,l.Z)(c,2))[0],v=f[1],m=u.useState(null),b=(h=(0,l.Z)(m,2))[0],P=h[1],u.useEffect(function(){var e=function(e,t,n){var o,r,a=e.length,l=t.length;if(0===a&&0===l)return null;a<l?(o=e,r=t):(o=t,r=e);var i={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):i}for(var c=null,s=1!==Math.abs(a-l),f=0;f<r.length;f+=1){var d=u(o[f]);if(d!==u(r[f])){c=f,s=s||d!==u(r[f+1]);break}}return null===c?null:{index:c,multiple:s}}(p||[],ey||[],eM);(null==e?void 0:e.index)!==void 0&&(null==n||n(e.index),P(ey[e.index])),v(ey)},[ey]),[b]),eP=(0,l.Z)(eD,1)[0];eR.current=eP;var eT=function(e,t,n){var o=u.useState(0),r=(0,l.Z)(o,2),a=r[0],i=r[1],c=(0,u.useRef)(new Map),s=(0,u.useRef)(new y),f=(0,u.useRef)();function d(){g.Z.cancel(f.current)}function p(){d(),f.current=(0,g.Z)(function(){c.current.forEach(function(e,t){if(e&&e.offsetParent){var n=(0,w.Z)(e),o=n.offsetHeight;s.current.get(t)!==o&&s.current.set(t,n.offsetHeight)}}),i(function(e){return e+1})})}return(0,u.useEffect)(function(){return d},[]),[function(o,r){var a=e(o),l=c.current.get(a);r?(c.current.set(a,r),p()):c.current.delete(a),!l!=!r&&(r?null==t||t(o):null==n||n(o))},p,s.current,a]}(eM,null,null),eO=(0,l.Z)(eT,4),ek=eO[0],eL=eO[1],eV=eO[2],eH=eO[3],e_=u.useMemo(function(){if(!ef)return{scrollHeight:void 0,start:0,end:ey.length-1,offset:void 0};if(!ed)return{scrollHeight:(null===(e=eS.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:ey.length-1,offset:void 0};for(var e,t,n,o,r=0,a=ey.length,l=0;l<a;l+=1){var i=eM(ey[l]),u=eV.get(i),c=r+(void 0===u?$:u);c>=em&&void 0===t&&(t=l,n=r),c>em+J&&void 0===o&&(o=l),r=c}return void 0===t&&(t=0,n=0,o=Math.ceil(J/$)),void 0===o&&(o=ey.length-1),{scrollHeight:r,start:t,end:o=Math.min(o+1,ey.length),offset:n}},[ed,ef,em,ey,eH,J]),eA=e_.scrollHeight,eF=e_.start,ez=e_.end,eK=e_.offset;eN.current.start=eF,eN.current.end=ez;var eW=eA-J,ej=(0,u.useRef)(eW);ej.current=eW;var eU=em<=0,eY=em>=eW,eB=x(eU,eY),eG=(T=function(e){eI(function(t){return t+e})},O=(0,u.useRef)(0),k=(0,u.useRef)(null),L=(0,u.useRef)(null),V=(0,u.useRef)(!1),H=x(eU,eY),[function(e){if(ef){g.Z.cancel(k.current);var t=e.deltaY;O.current+=t,L.current=t,H(t)||(S||e.preventDefault(),k.current=(0,g.Z)(function(){var e=V.current?10:1;T(O.current*e),O.current=0}))}},function(e){ef&&(V.current=e.detail===L.current)}]),eX=(0,l.Z)(eG,2),eQ=eX[0],eq=eX[1];_=function(e,t){return!eB(e,t)&&(eQ({preventDefault:function(){},deltaY:e}),!0)},F=(0,u.useRef)(!1),z=(0,u.useRef)(0),K=(0,u.useRef)(null),W=(0,u.useRef)(null),j=function(e){if(F.current){var t=Math.ceil(e.touches[0].pageY),n=z.current-t;z.current=t,_(n)&&e.preventDefault(),clearInterval(W.current),W.current=setInterval(function(){(!_(n*=I,!0)||.1>=Math.abs(n))&&clearInterval(W.current)},16)}},U=function(){F.current=!1,A()},Y=function(e){A(),1!==e.touches.length||F.current||(F.current=!0,z.current=Math.ceil(e.touches[0].pageY),K.current=e.target,K.current.addEventListener("touchmove",j),K.current.addEventListener("touchend",U))},A=function(){K.current&&(K.current.removeEventListener("touchmove",j),K.current.removeEventListener("touchend",U))},(0,M.Z)(function(){return ef&&eC.current.addEventListener("touchstart",Y),function(){var e;null===(e=eC.current)||void 0===e||e.removeEventListener("touchstart",Y),A(),clearInterval(W.current)}},[ef]),(0,M.Z)(function(){function e(e){ef&&e.preventDefault()}return eC.current.addEventListener("wheel",eQ),eC.current.addEventListener("DOMMouseScroll",eq),eC.current.addEventListener("MozMousePixelScroll",e),function(){eC.current&&(eC.current.removeEventListener("wheel",eQ),eC.current.removeEventListener("DOMMouseScroll",eq),eC.current.removeEventListener("MozMousePixelScroll",e))}},[ef]);var eJ=(B=function(){var e;null===(e=ex.current)||void 0===e||e.delayHidden()},G=u.useRef(),function(e){if(null==e){B();return}if(g.Z.cancel(G.current),"number"==typeof e)eI(e);else if(e&&"object"===(0,C.Z)(e)){var t,n=e.align;t="index"in e?e.index:ey.findIndex(function(t){return eM(t)===e.key});var o=e.offset,r=void 0===o?0:o;!function e(o,a){if(!(o<0)&&eC.current){var l=eC.current.clientHeight,i=!1,u=a;if(l){for(var c=0,s=0,f=0,d=Math.min(ey.length,t),p=0;p<=d;p+=1){var v=eM(ey[p]);s=c;var m=eV.get(v);c=f=s+(void 0===m?$:m),p===t&&void 0===m&&(i=!0)}var h=null;switch(a||n){case"top":h=s-r;break;case"bottom":h=f-l+r;break;default:var b=eC.current.scrollTop;s<b?u="top":f>b+l&&(u="bottom")}null!==h&&h!==eC.current.scrollTop&&eI(h)}G.current=(0,g.Z)(function(){i&&eL(),e(o-1,u)},2)}}(3)}});u.useImperativeHandle(t,function(){return{scrollTo:eJ}}),(0,M.Z)(function(){eu&&eu(ey.slice(eF,ez+1),ey)},[eF,ez,ey]);var e$=ey.slice(eF,ez+1).map(function(e,t){var n=eo(e,eF+t,{}),o=eM(e);return u.createElement(Z,{key:o,setRef:function(t){return ek(e,t)}},n)}),e0=null;return J&&(e0=(0,a.Z)((0,r.Z)({},void 0===ee||ee?"height":"maxHeight",J),D),ef&&(e0.overflowY="hidden",eE&&(e0.pointerEvents="none"))),u.createElement("div",(0,o.Z)({style:(0,a.Z)((0,a.Z)({},et),{},{position:"relative"}),className:ew},es),u.createElement(void 0===el?"div":el,{className:"".concat(Q,"-holder"),style:e0,ref:eC,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==em&&eI(t),null==ei||ei(e)}},u.createElement(d,{prefixCls:Q,height:eA,offset:eK,onInnerResize:eL,ref:eS,innerProps:ec},e$)),ef&&u.createElement(E,{ref:ex,prefixCls:Q,scrollTop:em,height:J,scrollHeight:eA,count:ey.length,onScroll:function(e){eI(e)},onStartMove:function(){eZ(!0)},onStopMove:function(){eZ(!1)}}))});P.displayName="List";var T=P}}]); |