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="string"==typeof c?c:"empty",f=null;return f="string"==typeof p?i.createElement("img",{alt:s,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},f),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=void 0===y||y,S=e.className,x=e.getPopupContainer,M=e.dropdownClassName,I=e.popupClassName,N=e.listHeight,R=e.placement,D=e.listItemHeight,P=e.size,T=e.disabled,O=e.notFoundContent,k=e.status,L=e.showArrow,V=E(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),H=c.useContext(s.E_),_=H.getPopupContainer,A=H.getPrefixCls,F=H.renderEmpty,z=H.direction,K=H.virtual,W=H.dropdownMatchSelectWidth,j=c.useContext(p.Z),U=A("select",w),Y=A(),B=(0,b.ri)(U,z),G=B.compactSize,X=B.compactItemClassnames,Q=c.useMemo(function(){var e=V.mode;return"combobox"===e?void 0:e===Z?"combobox":e},[V.mode]),q="multiple"===Q||"tags"===Q,J=void 0!==L?L:V.loading||!(q||"combobox"===Q),$=(0,c.useContext)(v.aM),ee=$.status,et=$.hasFeedback,en=$.isFormItemInput,eo=$.feedbackIcon,er=(0,h.F)(ee,k);a=void 0!==O?O:"combobox"===Q?null:(F||f.Z)("Select");var ea=(0,g.Z)((0,r.Z)((0,r.Z)({},V),{multiple:q,hasFeedback:et,feedbackIcon:eo,showArrow:J,prefixCls:U})),el=ea.suffixIcon,ei=ea.itemIcon,eu=ea.removeIcon,ec=ea.clearIcon,es=(0,u.Z)(V,["suffixIcon","itemIcon"]),ef=l()(I||M,(0,o.Z)({},"".concat(U,"-dropdown-").concat(z),"rtl"===z)),ed=G||P||j,ep=c.useContext(d.Z),ev=l()((n={},(0,o.Z)(n,"".concat(U,"-lg"),"large"===ed),(0,o.Z)(n,"".concat(U,"-sm"),"small"===ed),(0,o.Z)(n,"".concat(U,"-rtl"),"rtl"===z),(0,o.Z)(n,"".concat(U,"-borderless"),!C),(0,o.Z)(n,"".concat(U,"-in-form-item"),en),n),(0,h.Z)(U,er,et),X,S);return c.createElement(i.ZP,(0,r.Z)({ref:t,virtual:K,dropdownMatchSelectWidth:W},es,{transitionName:(0,m.mL)(Y,(0,m.q0)(R),V.transitionName),listHeight:void 0===N?256:N,listItemHeight:void 0===D?24:D,mode:Q,prefixCls:U,placement:void 0!==R?R:"rtl"===z?"bottomRight":"bottomLeft",direction:z,inputIcon:el,menuItemSelectedIcon:ei,removeIcon:eu,clearIcon:ec,notFoundContent:a,className:ev,getPopupContainer:x||_,dropdownClassName:ef,showArrow:et||L,disabled:null!=T?T:ep}))});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:"",et="tags"===h||"multiple"===h&&!1===s||g&&(u||q);function en(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 eo=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:et,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")),er=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}))):en(e,l,n,a,c)},renderRest:function(e){var t="function"==typeof k?k(e):k;return en({title:t},t,!1)},suffix:eo,itemKey:D,maxCount:N});return d.createElement(d.Fragment,null,er,!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=O||h,L=p[0],V=g||"";O&&b&&!P&&(V=b),d.useEffect(function(){O&&T(!1)},[O,b]);var H=("combobox"===s||!!f||!!h)&&!!V,_=R(L);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:k,activeDescendantId:c,value:V,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&&L?d.createElement("span",{className:"".concat(n,"-selection-item"),title:_,style:H?{visibility:"hidden"}:void 0},L.label):null,L?null:d.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:H?{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,N=e.id,R=e.prefixCls,D=e.className,P=e.showSearch,T=e.tagRender,O=e.direction,L=e.omitDomProps,V=e.displayValues,H=e.onDisplayValuesChange,F=e.emptyOptions,z=e.notFoundContent,K=void 0===z?"Not Found":z,Y=e.onClear,B=e.mode,G=e.disabled,X=e.loading,Q=e.getInputElement,q=e.getRawInputElement,J=e.open,$=e.defaultOpen,ee=e.onDropdownVisibleChange,et=e.activeValue,en=e.onActiveValueChange,eo=e.activeDescendantId,er=e.searchValue,ea=e.autoClearSearchValue,el=e.onSearch,ei=e.onSearchSplit,eu=e.tokenSeparators,ec=e.allowClear,es=e.showArrow,ef=e.inputIcon,ed=e.clearIcon,ep=e.OptionList,ev=e.animation,em=e.transitionName,eh=e.dropdownStyle,eg=e.dropdownClassName,eb=e.dropdownMatchSelectWidth,eE=e.dropdownRender,eZ=e.dropdownAlign,ew=e.placement,ey=e.getPopupContainer,eC=e.showAction,eS=void 0===eC?[]:eC,ex=e.onFocus,eM=e.onBlur,eI=e.onKeyUp,eN=e.onKeyDown,eR=e.onMouseDown,eD=(0,u.Z)(e,W),eP=U(B),eT=(void 0!==P?P:eP)||"combobox"===B,eO=(0,l.Z)({},eD);j.forEach(function(e){delete eO[e]}),null==L||L.forEach(function(e){delete eO[e]});var ek=d.useState(!1),eL=(0,i.Z)(ek,2),eV=eL[0],eH=eL[1];d.useEffect(function(){eH((0,h.Z)())},[]);var e_=d.useRef(null),eA=d.useRef(null),eF=d.useRef(null),ez=d.useRef(null),eK=d.useRef(null),eW=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]}(),ej=(0,i.Z)(eW,3),eU=ej[0],eY=ej[1],eB=ej[2];d.useImperativeHandle(t,function(){var e,t;return{focus:null===(e=ez.current)||void 0===e?void 0:e.focus,blur:null===(t=ez.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=eK.current)||void 0===t?void 0:t.scrollTo(e)}}});var eG=d.useMemo(function(){if("combobox"!==B)return er;var e,t=null===(e=V[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""},[er,B,V]),eX="combobox"===B&&"function"==typeof Q&&Q()||null,eQ="function"==typeof q&&q(),eq=(0,b.x1)(eA,null==eQ?void 0:null===(Z=eQ.props)||void 0===Z?void 0:Z.ref),eJ=(0,s.Z)(void 0,{defaultValue:$,value:J}),e$=(0,i.Z)(eJ,2),e0=e$[0],e1=e$[1],e2=e0,e4=!K&&F;(G||e4&&e2&&"combobox"===B)&&(e2=!1);var e3=!e4&&e2,e7=d.useCallback(function(e){var t=void 0!==e?e:!e2;G||(e1(t),e2!==t&&(null==ee||ee(t)))},[G,e2,e1,ee]),e5=d.useMemo(function(){return(eu||[]).some(function(e){return["\n","\r\n"].includes(e)})},[eu]),e6=function(e,t,n){var o=!0,a=e;null==en||en(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,eu);return"combobox"!==B&&l&&(a="",null==ei||ei(l),e7(!1),o=!1),el&&eG!==a&&el(a,{source:t?"typing":"effect"}),o};d.useEffect(function(){e2||eP||"combobox"===B||e6("",!1,!1)},[e2]),d.useEffect(function(){e0&&G&&e1(!1),G&&eY(!1)},[G]);var e9=w(),e8=(0,i.Z)(e9,2),te=e8[0],tt=e8[1],tn=d.useRef(!1),to=[];d.useEffect(function(){return function(){to.forEach(function(e){return clearTimeout(e)}),to.splice(0,to.length)}},[]);var tr=d.useState(null),ta=(0,i.Z)(tr,2),tl=ta[0],ti=ta[1],tu=d.useState({}),tc=(0,i.Z)(tu,2)[1];(0,m.Z)(function(){if(e3){var e,t=Math.ceil(null===(e=e_.current)||void 0===e?void 0:e.offsetWidth);tl===t||Number.isNaN(t)||ti(t)}},[e3]),eQ&&(C=function(e){e7(e)}),n=function(){var e;return[e_.current,null===(e=eF.current)||void 0===e?void 0:e.getPopupElement()]},f=!!eQ,(p=d.useRef(null)).current={open:e3,triggerOpen:e7,customizedTrigger:f},d.useEffect(function(){function e(e){if(null===(t=p.current)||void 0===t||!t.customizedTrigger){var t,o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o),p.current.open&&n().filter(function(e){return e}).every(function(e){return!e.contains(o)&&e!==o})&&p.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}},[]);var ts=d.useMemo(function(){return(0,l.Z)((0,l.Z)({},e),{},{notFoundContent:K,open:e2,triggerOpen:e3,id:N,showSearch:eT,multiple:eP,toggleOpen:e7})},[e,K,e3,e2,N,eT,eP,e7]),tf=void 0!==es?es:X||!eP&&"combobox"!==B;tf&&(x=d.createElement(S,{className:v()("".concat(R,"-arrow"),(0,a.Z)({},"".concat(R,"-arrow-loading"),X)),customizeIcon:ef,customizeIconProps:{loading:X,searchValue:eG,open:e2,focused:eU,showSearch:eT}})),!G&&ec&&(V.length||eG)&&!("combobox"===B&&""===eG)&&(M=d.createElement(S,{className:"".concat(R,"-clear"),onMouseDown:function(){var e;null==Y||Y(),null===(e=ez.current)||void 0===e||e.focus(),H([],{type:"clear",values:V}),e6("",!1,!1)},customizeIcon:ed},"\xd7"));var td=d.createElement(ep,{ref:eK}),tp=v()(R,D,(y={},(0,a.Z)(y,"".concat(R,"-focused"),eU),(0,a.Z)(y,"".concat(R,"-multiple"),eP),(0,a.Z)(y,"".concat(R,"-single"),!eP),(0,a.Z)(y,"".concat(R,"-allow-clear"),ec),(0,a.Z)(y,"".concat(R,"-show-arrow"),tf),(0,a.Z)(y,"".concat(R,"-disabled"),G),(0,a.Z)(y,"".concat(R,"-loading"),X),(0,a.Z)(y,"".concat(R,"-open"),e2),(0,a.Z)(y,"".concat(R,"-customize-input"),eX),(0,a.Z)(y,"".concat(R,"-show-search"),eT),y)),tv=d.createElement(_,{ref:eF,disabled:G,prefixCls:R,visible:e3,popupElement:td,containerWidth:tl,animation:ev,transitionName:em,dropdownStyle:eh,dropdownClassName:eg,direction:O,dropdownMatchSelectWidth:eb,dropdownRender:eE,dropdownAlign:eZ,placement:ew,getPopupContainer:ey,empty:F,getTriggerDOMNode:function(){return eA.current},onPopupVisibleChange:C,onPopupMouseEnter:function(){tc({})}},eQ?d.cloneElement(eQ,{ref:eq}):d.createElement(k,(0,o.Z)({},e,{domRef:eA,prefixCls:R,inputElement:eX,ref:ez,id:N,showSearch:eT,autoClearSearchValue:ea,mode:B,activeDescendantId:eo,tagRender:T,values:V,open:e2,onToggleOpen:e7,activeValue:et,searchValue:eG,onSearch:e6,onSearchSubmit:function(e){e&&e.trim()&&el(e,{source:"submit"})},onRemove:function(e){H(V.filter(function(t){return t!==e}),{type:"remove",values:[e]})},tokenWithEnter:e5})));return I=eQ?tv:d.createElement("div",(0,o.Z)({className:tp},eO,{ref:e_,onMouseDown:function(e){var t,n=e.target,o=null===(t=eF.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var r=setTimeout(function(){var e,t=to.indexOf(r);-1!==t&&to.splice(t,1),eB(),eV||o.contains(document.activeElement)||null===(e=ez.current)||void 0===e||e.focus()});to.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==eR||eR.apply(void 0,[e].concat(l))},onKeyDown:function(e){var t,n=te(),o=e.which;if(o!==g.Z.ENTER||("combobox"!==B&&e.preventDefault(),e2||e7(!0)),tt(!!eG),o===g.Z.BACKSPACE&&!n&&eP&&!eG&&V.length){for(var a=(0,r.Z)(V),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&&H(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];e2&&eK.current&&(t=eK.current).onKeyDown.apply(t,[e].concat(s)),null==eN||eN.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];e2&&eK.current&&(t=eK.current).onKeyUp.apply(t,[e].concat(o)),null==eI||eI.apply(void 0,[e].concat(o))},onFocus:function(){eY(!0),!G&&(ex&&!tn.current&&ex.apply(void 0,arguments),eS.includes("focus")&&e7(!0)),tn.current=!0},onBlur:function(){eY(!1,function(){tn.current=!1,e7(!1)}),!G&&(eG&&("tags"===B?el(eG,{source:"submit"}):"multiple"===B&&el("",{source:"blur"})),eM&&eM.apply(void 0,arguments))}}),eU&&!e2&&d.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(V.map(function(e){var t=e.label,n=e.value;return["number","string"].includes((0,c.Z)(t))?t:n}).join(", "))),tv,x,M),d.createElement(E.Provider,{value:ts},I)}),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=!N||"function"==typeof N||C,D="number"==typeof I?I:I||c,P=ec(D)?D.toString():void 0;return void 0!==g&&(P=g),d.createElement("div",(0,o.Z)({},(0,y.Z)(w),{"aria-selected":C,className:M,title:P,onMouseMove:function(){K===t||h||j(t)},onClick:function(){h||Y(c)},style:b}),d.createElement("div",{className:"".concat(x,"-content")},D),d.isValidElement(N)||C,R&&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,o=null!=t?t:e;return n={},(0,a.Z)(n,eu.value,e),(0,a.Z)(n,eu.label,o),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(){var e=!1!==L&&!1!==x;return(0,l.Z)((0,l.Z)({},eh),{},{flattenOptions:eL,onActiveValue:eY,defaultActiveFirstOption:eU,onSelect:eG,menuItemSelectedIcon:k,rawValues:eD,fieldNames:eu,virtual:e,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(1413),a=n(4942),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,r.Z)((0,r.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,a.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,l=o.prefixCls,i=o.direction,c=this.getSpinHeight(),f=this.getTop(),d=this.showScroll(),p=d&&n;return u.createElement("div",{ref:this.scrollbarRef,className:s()("".concat(l,"-scrollbar"),(0,a.Z)({},"".concat(l,"-scrollbar-show"),d)),style:(0,r.Z)((0,r.Z)({width:8,top:0,bottom:0},"rtl"===i?{left:0}:{right:0}),{},{position:"absolute",display:p?null:"none"}),onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},u.createElement("div",{ref:this.thumbRef,className:s()("".concat(l,"-scrollbar-thumb"),(0,a.Z)({},"".concat(l,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:c,top:f,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","direction","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.direction,ei=e.component,eu=void 0===ei?"div":ei,ec=e.onScroll,es=e.onVisibleChange,ef=e.innerProps,ed=(0,i.Z)(e,N),ep=!!(!1!==ea&&J&&$),ev=ep&&en&&$*en.length>J,em=(0,u.useState)(0),eh=(0,l.Z)(em,2),eg=eh[0],eb=eh[1],eE=(0,u.useState)(!1),eZ=(0,l.Z)(eE,2),ew=eZ[0],ey=eZ[1],eC=s()(Q,(0,a.Z)({},"".concat(Q,"-rtl"),"rtl"===el),q),eS=en||R,ex=(0,u.useRef)(),eM=(0,u.useRef)(),eI=(0,u.useRef)(),eN=u.useCallback(function(e){return"function"==typeof er?er(e):null==e?void 0:e[er]},[er]);function eR(e){eb(function(t){var n,o=(n="function"==typeof e?e(t):e,Number.isNaN(eY.current)||(n=Math.min(n,eY.current)),n=Math.max(n,0));return ex.current.scrollTop=o,o})}var eD=(0,u.useRef)({start:0,end:eS.length}),eP=(0,u.useRef)(),eT=(c=u.useState(eS),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||[],eS||[],eN);(null==e?void 0:e.index)!==void 0&&(null==n||n(e.index),P(eS[e.index])),v(eS)},[eS]),[b]),eO=(0,l.Z)(eT,1)[0];eP.current=eO;var ek=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]}(eN,null,null),eL=(0,l.Z)(ek,4),eV=eL[0],eH=eL[1],e_=eL[2],eA=eL[3],eF=u.useMemo(function(){if(!ep)return{scrollHeight:void 0,start:0,end:eS.length-1,offset:void 0};if(!ev)return{scrollHeight:(null===(e=eM.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:eS.length-1,offset:void 0};for(var e,t,n,o,r=0,a=eS.length,l=0;l<a;l+=1){var i=eN(eS[l]),u=e_.get(i),c=r+(void 0===u?$:u);c>=eg&&void 0===t&&(t=l,n=r),c>eg+J&&void 0===o&&(o=l),r=c}return void 0===t&&(t=0,n=0,o=Math.ceil(J/$)),void 0===o&&(o=eS.length-1),{scrollHeight:r,start:t,end:o=Math.min(o+1,eS.length),offset:n}},[ev,ep,eg,eS,eA,J]),ez=eF.scrollHeight,eK=eF.start,eW=eF.end,ej=eF.offset;eD.current.start=eK,eD.current.end=eW;var eU=ez-J,eY=(0,u.useRef)(eU);eY.current=eU;var eB=eg<=0,eG=eg>=eU,eX=x(eB,eG),eQ=(T=function(e){eR(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(eB,eG),[function(e){if(ep){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){ep&&(V.current=e.detail===L.current)}]),eq=(0,l.Z)(eQ,2),eJ=eq[0],e$=eq[1];_=function(e,t){return!eX(e,t)&&(eJ({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 ep&&ex.current.addEventListener("touchstart",Y),function(){var e;null===(e=ex.current)||void 0===e||e.removeEventListener("touchstart",Y),A(),clearInterval(W.current)}},[ep]),(0,M.Z)(function(){function e(e){ep&&e.preventDefault()}return ex.current.addEventListener("wheel",eJ),ex.current.addEventListener("DOMMouseScroll",e$),ex.current.addEventListener("MozMousePixelScroll",e),function(){ex.current&&(ex.current.removeEventListener("wheel",eJ),ex.current.removeEventListener("DOMMouseScroll",e$),ex.current.removeEventListener("MozMousePixelScroll",e))}},[ep]);var e0=(B=function(){var e;null===(e=eI.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)eR(e);else if(e&&"object"===(0,C.Z)(e)){var t,n=e.align;t="index"in e?e.index:eS.findIndex(function(t){return eN(t)===e.key});var o=e.offset,r=void 0===o?0:o;!function e(o,a){if(!(o<0)&&ex.current){var l=ex.current.clientHeight,i=!1,u=a;if(l){for(var c=0,s=0,f=0,d=Math.min(eS.length,t),p=0;p<=d;p+=1){var v=eN(eS[p]);s=c;var m=e_.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=ex.current.scrollTop;s<b?u="top":f>b+l&&(u="bottom")}null!==h&&h!==ex.current.scrollTop&&eR(h)}G.current=(0,g.Z)(function(){i&&eH(),e(o-1,u)},2)}}(3)}});u.useImperativeHandle(t,function(){return{scrollTo:e0}}),(0,M.Z)(function(){es&&es(eS.slice(eK,eW+1),eS)},[eK,eW,eS]);var e1=eS.slice(eK,eW+1).map(function(e,t){var n=eo(e,eK+t,{}),o=eN(e);return u.createElement(Z,{key:o,setRef:function(t){return eV(e,t)}},n)}),e2=null;return J&&(e2=(0,r.Z)((0,a.Z)({},void 0===ee||ee?"height":"maxHeight",J),D),ep&&(e2.overflowY="hidden",ew&&(e2.pointerEvents="none"))),u.createElement("div",(0,o.Z)({style:(0,r.Z)((0,r.Z)({},et),{},{position:"relative"}),className:eC},ed),u.createElement(eu,{className:"".concat(Q,"-holder"),style:e2,ref:ex,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eg&&eR(t),null==ec||ec(e)}},u.createElement(d,{prefixCls:Q,height:ez,offset:ej,onInnerResize:eH,ref:eM,innerProps:ef},e1)),ep&&u.createElement(E,{ref:eI,prefixCls:Q,scrollTop:eg,height:J,scrollHeight:ez,count:eS.length,direction:el,onScroll:function(e){eR(e)},onStartMove:function(){ey(!0)},onStopMove:function(){ey(!1)}}))});P.displayName="List";var T=P}}]); |