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

2 line
61 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2323],{45747:function(){},54680:function(Lt,ze,o){"use strict";o.d(ze,{Z:function(){return Te}});var ge=o(22122),V=o(96156),He=o(94184),Ne=o.n(He),Ie=o(85061),De=o(28991),re=o(28481),ve=o(81253),de=o(90484),c=o(67294),E=o(74484),B=o(17341),ye=o(88708),Ke=o(21770),se=o(15105),ke=o(56982),ae=o(93549),b=c.createContext(null),s=b,C=c.createContext(null),f=C;function p(n){return Array.isArray(n)?n:n!==void 0?[n]:[]}function h(n){var u=n||{},K=u.label,m=u.value,x=u.children,I=m||"value";return{_title:K?[K]:["title","label"],value:I,key:I,children:x||"children"}}function $(n){return!n||n.disabled||n.disableCheckbox||n.checkable===!1}function T(n,u){var K=[];function m(x){x.forEach(function(I){var L=I[u.children];L&&(K.push(I[u.value]),m(L))})}return m(n),K}function Z(n){return n==null}var G={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},t=function(u,K){var m=(0,E.lk)(),x=m.prefixCls,I=m.multiple,L=m.searchValue,w=m.toggleOpen,R=m.open,q=m.notFoundContent,te=c.useContext(f),$e=te.virtual,Se=te.listHeight,Oe=te.listItemHeight,we=te.treeData,Le=te.fieldNames,Ye=te.onSelect,Je=te.dropdownMatchSelectWidth,tt=te.treeExpandAction,ce=c.useContext(s),Ae=ce.checkable,Ve=ce.checkedKeys,Qe=ce.halfCheckedKeys,nt=ce.treeExpandedKeys,St=ce.treeDefaultExpandAll,Mt=ce.treeDefaultExpandedKeys,mt=ce.onTreeExpand,$t=ce.treeIcon,Pt=ce.showTreeIcon,gt=ce.switcherIcon,Et=ce.treeLine,Ct=ce.treeNodeFilterProp,rt=ce.loadData,me=ce.treeLoadedKeys,We=ce.treeMotion,at=ce.onTreeLoad,Xe=ce.keyEntities,Be=c.useRef(),_e=(0,ke.Z)(function(){return we},[R,we],function(ue,je){return je[0]&&ue[1]!==je[1]}),yt=c.useMemo(function(){return Ae?{checked:Ve,halfChecked:Qe}:null},[Ae,Ve,Qe]);c.useEffect(function(){if(R&&!I&&Ve.length){var ue;(ue=Be.current)===null||ue===void 0||ue.scrollTo({key:Ve[0]})}},[R]);var Me=String(L).toLowerCase(),pt=function(je){return Me?String(je[Ct]).toLowerCase().includes(Me):!1},Kt=c.useState(Mt),It=(0,re.Z)(Kt,2),Zt=It[0],Bt=It[1],jt=c.useState(null),At=(0,re.Z)(jt,2),Ht=At[0],xt=At[1],Gt=c.useMemo(function(){return nt?(0,Ie.Z)(nt):L?Ht:Zt},[Zt,Ht,nt,L]);c.useEffect(function(){L&&xt(T(we,Le))},[L]);var Ft=function(je){Bt(je),xt(je),mt&&mt(je)},bt=function(je){je.preventDefault()},Nt=function(je,Dt){var ht=Dt.node;Ae&&$(ht)||(Ye(ht.key,{selected:!Ve.includes(ht.key)}),I||w(!1))},zt=c.useState(null),ot=(0,re.Z)(zt,2),Wt=ot[0],Yt=ot[1],ut=Xe[Wt];if(c.useImperativeHandle(K,function(){var ue;return{scrollTo:(ue=Be.current)===null||ue===void 0?void 0:ue.scrollTo,onKeyDown:function(Dt){var ht,Xt=Dt.which;switch(Xt){case se.Z.UP:case se.Z.DOWN:case se.Z.LEFT:case se.Z.RIGHT:(ht=Be.current)===null||ht===void 0||ht.onKeyDown(Dt);break;case se.Z.ENTER:{if(ut){var Jt=(ut==null?void 0:ut.node)||{},Ot=Jt.selectable,Qt=Jt.value;Ot!==!1&&Nt(null,{node:{key:Wt},selected:!Ve.includes(Qt)})}break}case se.Z.ESC:w(!1)}},onKeyUp:function(){}}}),_e.length===0)return c.createElement("div",{role:"listbox",className:"".concat(x,"-empty"),onMouseDown:bt},q);var Tt={fieldNames:Le};return me&&(Tt.loadedKeys=me),Gt&&(Tt.expandedKeys=Gt),c.createElement("div",{onMouseDown:bt},ut&&R&&c.createElement("span",{style:G,"aria-live":"assertive"},ut.node.value),c.createElement(ae.Z,(0,ge.Z)({ref:Be,focusable:!1,prefixCls:"".concat(x,"-tree"),treeData:_e,height:Se,itemHeight:Oe,virtual:$e!==!1&&Je!==!1,multiple:I,icon:$t,showIcon:Pt,switcherIcon:gt,showLine:Et,loadData:L?null:rt,motion:We,activeKey:Wt,checkable:Ae,checkStrictly:!0,checkedKeys:yt,selectedKeys:Ae?[]:Ve,defaultExpandAll:St},Tt,{onActiveChange:Yt,onSelect:Nt,onCheck:Nt,onExpand:Ft,onLoad:at,filterTreeNode:pt,expandAction:tt})))},O=c.forwardRef(t);O.displayName="OptionList";var M=O,z=function(){return null},d=z,l="SHOW_ALL",k="SHOW_PARENT",N="SHOW_CHILD";function J(n,u,K,m){var x=new Set(n);return u===N?n.filter(function(I){var L=K[I];return!(L&&L.children&&L.children.some(function(w){var R=w.node;return x.has(R[m.value])})&&L.children.every(function(w){var R=w.node;return $(R)||x.has(R[m.value])}))}):u===k?n.filter(function(I){var L=K[I],w=L?L.parent:null;return!(w&&!$(w.node)&&x.has(w.key))}):n}var xe=o(50344),oe=o(80334),ne=["children","value"];function pe(n){return(0,xe.Z)(n).map(function(u){if(!c.isValidElement(u)||!u.type)return null;var K=u,m=K.key,x=K.props,I=x.children,L=x.value,w=(0,ve.Z)(x,ne),R=(0,De.Z)({key:m,value:L},w),q=pe(I);return q.length&&(R.children=q),R}).filter(function(u){return u})}function Ze(n){if(!n)return n;var u=(0,De.Z)({},n);return"props"in u||Object.defineProperty(u,"props",{get:function(){return(0,oe.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),u}}),u}function et(n,u,K,m,x,I){var L=null,w=null;function R(){function q(te){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return te.map(function(Oe,we){var Le="".concat($e,"-").concat(we),Ye=Oe[I.value],Je=K.includes(Ye),tt=q(Oe[I.children]||[],Le,Je),ce=c.createElement(d,Oe,tt.map(function(Ve){return Ve.node}));if(u===Ye&&(L=ce),Je){var Ae={pos:Le,node:ce,children:tt};return Se||w.push(Ae),Ae}return null}).filter(function(Oe){return Oe})}w||(w=[],q(m),w.sort(function(te,$e){var Se=te.node.props.value,Oe=$e.node.props.value,we=K.indexOf(Se),Le=K.indexOf(Oe);return we-Le}))}Object.defineProperty(n,"triggerNode",{get:function(){return(0,oe.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),R(),L}}),Object.defineProperty(n,"allCheckedNodes",{get:function(){return(0,oe.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),R(),x?w:w.map(function(te){var $e=te.node;return $e})}})}function dt(n,u){var K=u.id,m=u.pId,x=u.rootPId,I={},L=[],w=n.map(function(R){var q=(0,De.Z)({},R),te=q[K];return I[te]=q,q.key=q.key||te,q});return w.forEach(function(R){var q=R[m],te=I[q];te&&(te.children=te.children||[],te.children.push(R)),(q===x||!te&&x===null)&&L.push(R)}),L}function lt(n,u,K){return c.useMemo(function(){return n?K?dt(n,(0,De.Z)({id:"id",pId:"pId",rootPId:null},K!==!0?K:{})):n:pe(u)},[u,K,n])}var st=function(n){var u=c.useRef({valueLabels:new Map});return c.useMemo(function(){var K=u.current.valueLabels,m=new Map,x=n.map(function(I){var L,w=I.value,R=(L=I.label)!==null&&L!==void 0?L:K.get(w);return m.set(w,R),(0,De.Z)((0,De.Z)({},I),{},{label:R})});return u.current.valueLabels=m,[x]},[n])};function Ue(n){var u=c.useRef();u.current=n;var K=c.useCallback(function(){return u.current.apply(u,arguments)},[]);return K}var ct=o(1089),vt=function(n,u){return c.useMemo(function(){var K=(0,ct.I8)(n,{fieldNames:u,initWrapper:function(x){return(0,De.Z)((0,De.Z)({},x),{},{valueEntities:new Map})},processEntity:function(x,I){var L=x.node[u.value];if(!1)var w;I.valueEntities.set(L,x)}});return K},[n,u])},Fe=function(n,u,K,m){return c.useMemo(function(){var x=n.map(function(R){var q=R.value;return q}),I=u.map(function(R){var q=R.value;return q}),L=x.filter(function(R){return!m[R]});if(K){var w=(0,B.S)(x,!0,m);x=w.checkedKeys,I=w.halfCheckedKeys}return[Array.from(new Set([].concat((0,Ie.Z)(L),(0,Ie.Z)(x)))),I]},[n,u,K,m])},g=function(n,u,K){var m=K.treeNodeFilterProp,x=K.filterTreeNode,I=K.fieldNames,L=I.children;return c.useMemo(function(){if(!u||x===!1)return n;var w;if(typeof x=="function")w=x;else{var R=u.toUpperCase();w=function($e,Se){var Oe=Se[m];return String(Oe).toUpperCase().includes(R)}}function q(te){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return te.map(function(Se){var Oe=Se[L],we=$e||w(u,Ze(Se)),Le=q(Oe||[],we);return we||Le.length?(0,De.Z)((0,De.Z)({},Se),{},(0,V.Z)({isLeaf:void 0},L,Le)):null}).filter(function(Se){return Se})}return q(n)},[n,u,L,m,x])};function A(n){var u=n.searchPlaceholder,K=n.treeCheckStrictly,m=n.treeCheckable,x=n.labelInValue,I=n.value,L=n.multiple;warning(!u,"`searchPlaceholder` has been removed."),K&&x===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(x||K)&&warning(toArray(I).every(function(w){return w&&_typeof(w)==="object"&&"value"in w}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),K||L||m?warning(!I||Array.isArray(I),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(I),"`value` should not be array when `TreeSelect` is single mode.")}var W=null,e=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function D(n){return!n||(0,de.Z)(n)!=="object"}var ie=c.forwardRef(function(n,u){var K=n.id,m=n.prefixCls,x=m===void 0?"rc-tree-select":m,I=n.value,L=n.defaultValue,w=n.onChange,R=n.onSelect,q=n.onDeselect,te=n.searchValue,$e=n.inputValue,Se=n.onSearch,Oe=n.autoClearSearchValue,we=Oe===void 0?!0:Oe,Le=n.filterTreeNode,Ye=n.treeNodeFilterProp,Je=Ye===void 0?"value":Ye,tt=n.showCheckedStrategy,ce=tt===void 0?N:tt,Ae=n.treeNodeLabelProp,Ve=n.multiple,Qe=n.treeCheckable,nt=n.treeCheckStrictly,St=n.labelInValue,Mt=n.fieldNames,mt=n.treeDataSimpleMode,$t=n.treeData,Pt=n.children,gt=n.loadData,Et=n.treeLoadedKeys,Ct=n.onTreeLoad,rt=n.treeDefaultExpandAll,me=n.treeExpandedKeys,We=n.treeDefaultExpandedKeys,at=n.onTreeExpand,Xe=n.treeExpandAction,Be=n.virtual,_e=n.listHeight,yt=_e===void 0?200:_e,Me=n.listItemHeight,pt=Me===void 0?20:Me,Kt=n.onDropdownVisibleChange,It=n.dropdownMatchSelectWidth,Zt=It===void 0?!0:It,Bt=n.treeLine,jt=n.treeIcon,At=n.showTreeIcon,Ht=n.switcherIcon,xt=n.treeMotion,Gt=(0,ve.Z)(n,e),Ft=(0,ye.ZP)(K),bt=Qe&&!nt,Nt=Qe||nt,zt=nt||St,ot=Nt||Ve,Wt=(0,Ke.Z)(L,{value:I}),Yt=(0,re.Z)(Wt,2),ut=Yt[0],Tt=Yt[1],ue=c.useMemo(function(){return h(Mt)},[JSON.stringify(Mt)]),je=(0,Ke.Z)("",{value:te!==void 0?te:$e,postState:function(fe){return fe||""}}),Dt=(0,re.Z)(je,2),ht=Dt[0],Xt=Dt[1],Jt=function(fe){Xt(fe),Se==null||Se(fe)},Ot=lt($t,Pt,mt),Qt=vt(Ot,ue),it=Qt.keyEntities,Ut=Qt.valueEntities,cn=c.useCallback(function(he){var fe=[],Ee=[];return he.forEach(function(Pe){Ut.has(Pe)?Ee.push(Pe):fe.push(Pe)}),{missingRawValues:fe,existRawValues:Ee}},[Ut]),un=g(Ot,ht,{fieldNames:ue,treeNodeFilterProp:Je,filterTreeNode:Le}),fn=c.useCallback(function(he){if(he){if(Ae)return he[Ae];for(var fe=ue._title,Ee=0;Ee<fe.length;Ee+=1){var Pe=he[fe[Ee]];if(Pe!==void 0)return Pe}}},[ue,Ae]),tn=c.useCallback(function(he){var fe=p(he);return fe.map(function(Ee){return D(Ee)?{value:Ee}:Ee})},[]),an=c.useCallback(function(he){var fe=tn(he);return fe.map(function(Ee){var Pe=Ee.label,ft=Ee.value,Ge=Ee.halfChecked,be,Re=Ut.get(ft);if(Re){var qe;Pe=(qe=Pe)!==null&&qe!==void 0?qe:fn(Re.node),be=Re.node.disabled}else if(Pe===void 0){var wt=tn(ut).find(function(nn){return nn.value===ft});Pe=wt.label}return{label:Pe,value:ft,halfChecked:Ge,disabled:be}})},[Ut,fn,tn,ut]),vn=c.useMemo(function(){return tn(ut)},[tn,ut]),mn=c.useMemo(function(){var he=[],fe=[];return vn.forEach(function(Ee){Ee.halfChecked?fe.push(Ee):he.push(Ee)}),[he,fe]},[vn]),pn=(0,re.Z)(mn,2),_t=pn[0],hn=pn[1],gn=c.useMemo(function(){return _t.map(function(he){return he.value})},[_t]),En=Fe(_t,hn,bt,it),yn=(0,re.Z)(En,2),qt=yn[0],on=yn[1],Cn=c.useMemo(function(){var he=J(qt,ce,it,ue),fe=he.map(function(Ge){var be,Re,qe;return(be=(Re=it[Ge])===null||Re===void 0||(qe=Re.node)===null||qe===void 0?void 0:qe[ue.value])!==null&&be!==void 0?be:Ge}),Ee=fe.map(function(Ge){var be=_t.find(function(Re){return Re.value===Ge});return{value:Ge,label:be==null?void 0:be.label}}),Pe=an(Ee),ft=Pe[0];return!ot&&ft&&Z(ft.value)&&Z(ft.label)?[]:Pe.map(function(Ge){var be;return(0,De.Z)((0,De.Z)({},Ge),{},{label:(be=Ge.label)!==null&&be!==void 0?be:Ge.value})})},[ue,ot,qt,_t,an,ce,it]),Kn=st(Cn),xn=(0,re.Z)(Kn,1),Nn=xn[0],dn=Ue(function(he,fe,Ee){var Pe=an(he);if(Tt(Pe),we&&Xt(""),w){var ft=he;if(bt){var Ge=J(he,ce,it,ue);ft=Ge.map(function(kt){var Rt=Ut.get(kt);return Rt?Rt.node[ue.value]:kt})}var be=fe||{triggerValue:void 0,selected:void 0},Re=be.triggerValue,qe=be.selected,wt=ft;if(nt){var nn=hn.filter(function(kt){return!ft.includes(kt.value)});wt=[].concat((0,Ie.Z)(wt),(0,Ie.Z)(nn))}var rn=an(wt),Vt={preValue:_t,triggerValue:Re},en=!0;(nt||Ee==="selection"&&!qe)&&(en=!1),et(Vt,Re,he,Ot,en,ue),Nt?Vt.checked=qe:Vt.selected=qe;var ln=zt?rn:rn.map(function(kt){return kt.value});w(ot?ln:ln[0],zt?null:rn.map(function(kt){return kt.label}),Vt)}}),sn=c.useCallback(function(he,fe){var Ee,Pe=fe.selected,ft=fe.source,Ge=it[he],be=Ge==null?void 0:Ge.node,Re=(Ee=be==null?void 0:be[ue.value])!==null&&Ee!==void 0?Ee:he;if(!ot)dn([Re],{selected:!0,triggerValue:Re},"option");else{var qe=Pe?[].concat((0,Ie.Z)(gn),[Re]):qt.filter(function(Rt){return Rt!==Re});if(bt){var wt=cn(qe),nn=wt.missingRawValues,rn=wt.existRawValues,Vt=rn.map(function(Rt){return Ut.get(Rt).key}),en;if(Pe){var ln=(0,B.S)(Vt,!0,it);en=ln.checkedKeys}else{var kt=(0,B.S)(Vt,{checked:!1,halfCheckedKeys:on},it);en=kt.checkedKeys}qe=[].concat((0,Ie.Z)(nn),(0,Ie.Z)(en.map(function(Rt){return it[Rt].node[ue.value]})))}dn(qe,{selected:Pe,triggerValue:Re},ft||"option")}Pe||!ot?R==null||R(Re,Ze(be)):q==null||q(Re,Ze(be))},[cn,Ut,it,ue,ot,gn,dn,bt,R,q,qt,on]),Dn=c.useCallback(function(he){if(Kt){var fe={};Object.defineProperty(fe,"documentClickClose",{get:function(){return(0,oe.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Kt(he,fe)}},[Kt]),kn=Ue(function(he,fe){var Ee=he.map(function(Pe){return Pe.value});if(fe.type==="clear"){dn(Ee,{},"selection");return}fe.values.length&&sn(fe.values[0].value,{selected:!1,source:"selection"})}),Sn=c.useMemo(function(){return{virtual:Be,dropdownMatchSelectWidth:Zt,listHeight:yt,listItemHeight:pt,treeData:un,fieldNames:ue,onSelect:sn,treeExpandAction:Xe}},[Be,Zt,yt,pt,un,ue,sn,Xe]),Pn=c.useMemo(function(){return{checkable:Nt,loadData:gt,treeLoadedKeys:Et,onTreeLoad:Ct,checkedKeys:qt,halfCheckedKeys:on,treeDefaultExpandAll:rt,treeExpandedKeys:me,treeDefaultExpandedKeys:We,onTreeExpand:at,treeIcon:jt,treeMotion:xt,showTreeIcon:At,switcherIcon:Ht,treeLine:Bt,treeNodeFilterProp:Je,keyEntities:it}},[Nt,gt,Et,Ct,qt,on,rt,me,We,at,jt,xt,At,Ht,Bt,Je,it]);return c.createElement(f.Provider,{value:Sn},c.createElement(s.Provider,{value:Pn},c.createElement(E.Ac,(0,ge.Z)({ref:u},Gt,{id:Ft,prefixCls:x,mode:ot?"multiple":void 0,displayValues:Nn,onDisplayValuesChange:kn,searchValue:ht,onSearch:Jt,OptionList:M,emptyOptions:!Ot.length,onDropdownVisibleChange:Dn,dropdownMatchSelectWidth:Zt}))))}),Y=ie;Y.TreeNode=d,Y.SHOW_ALL=l,Y.SHOW_PARENT=k,Y.SHOW_CHILD=N;var r=Y,i=r,a=o(98423),y=o(53124),S=o(88258),H=o(98866),P=o(97647),F=o(65223),j=o(46163),X=o(61639),v=o(33603),Q=o(9708),_=o(4173),U=function(n,u){var K={};for(var m in n)Object.prototype.hasOwnProperty.call(n,m)&&u.indexOf(m)<0&&(K[m]=n[m]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,m=Object.getOwnPropertySymbols(n);x<m.length;x++)u.indexOf(m[x])<0&&Object.prototype.propertyIsEnumerable.call(n,m[x])&&(K[m[x]]=n[m[x]]);return K},ee=function(u,K){var m,x=u.prefixCls,I=u.size,L=u.disabled,w=u.bordered,R=w===void 0?!0:w,q=u.className,te=u.treeCheckable,$e=u.multiple,Se=u.listHeight,Oe=Se===void 0?256:Se,we=u.listItemHeight,Le=we===void 0?26:we,Ye=u.placement,Je=u.notFoundContent,tt=u.switcherIcon,ce=u.treeLine,Ae=u.getPopupContainer,Ve=u.dropdownClassName,Qe=u.popupClassName,nt=u.treeIcon,St=nt===void 0?!1:nt,Mt=u.transitionName,mt=u.choiceTransitionName,$t=mt===void 0?"":mt,Pt=u.status,gt=u.showArrow,Et=u.treeExpandAction,Ct=U(u,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),rt=c.useContext(y.E_),me=rt.getPopupContainer,We=rt.getPrefixCls,at=rt.renderEmpty,Xe=rt.direction,Be=rt.virtual,_e=rt.dropdownMatchSelectWidth,yt=c.useContext(P.Z),Me=We("select",x),pt=We("select-tree",x),Kt=We("tree-select",x),It=(0,_.ri)(Me,Xe),Zt=It.compactSize,Bt=It.compactItemClassnames,jt=Ne()(Qe||Ve,"".concat(Kt,"-dropdown"),(0,V.Z)({},"".concat(Kt,"-dropdown-rtl"),Xe==="rtl")),At=!!(te||$e),Ht=gt!==void 0?gt:Ct.loading||!At,xt=(0,c.useContext)(F.aM),Gt=xt.status,Ft=xt.hasFeedback,bt=xt.isFormItemInput,Nt=xt.feedbackIcon,zt=(0,Q.F)(Gt,Pt),ot=(0,j.Z)((0,ge.Z)((0,ge.Z)({},Ct),{multiple:At,showArrow:Ht,hasFeedback:Ft,feedbackIcon:Nt,prefixCls:Me})),Wt=ot.suffixIcon,Yt=ot.removeIcon,ut=ot.clearIcon,Tt;Je!==void 0?Tt=Je:Tt=(at||S.Z)("Select");var ue=(0,a.Z)(Ct,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),je=function(){return Ye!==void 0?Ye:Xe==="rtl"?"bottomRight":"bottomLeft"},Dt=Zt||I||yt,ht=c.useContext(H.Z),Xt=L!=null?L:ht,Jt=Ne()(!x&&Kt,(m={},(0,V.Z)(m,"".concat(Me,"-lg"),Dt==="large"),(0,V.Z)(m,"".concat(Me,"-sm"),Dt==="small"),(0,V.Z)(m,"".concat(Me,"-rtl"),Xe==="rtl"),(0,V.Z)(m,"".concat(Me,"-borderless"),!R),(0,V.Z)(m,"".concat(Me,"-in-form-item"),bt),m),(0,Q.Z)(Me,zt,Ft),Bt,q),Ot=We();return c.createElement(i,(0,ge.Z)({virtual:Be,dropdownMatchSelectWidth:_e,disabled:Xt},ue,{ref:K,prefixCls:Me,className:Jt,listHeight:Oe,listItemHeight:Le,treeCheckable:te&&c.createElement("span",{className:"".concat(Me,"-tree-checkbox-inner")}),treeLine:!!ce,inputIcon:Wt,multiple:$e,placement:je(),removeIcon:Yt,clearIcon:ut,switcherIcon:function(it){return(0,X.Z)(pt,tt,ce,it)},showTreeIcon:St,notFoundContent:Tt,getPopupContainer:Ae||me,treeMotion:null,dropdownClassName:jt,choiceTransitionName:(0,v.mL)(Ot,"",$t),transitionName:(0,v.mL)(Ot,(0,v.q0)(Ye),Mt),showArrow:Ft||gt,treeExpandAction:Et}))},le=c.forwardRef(ee),Ce=le;Ce.TreeNode=d,Ce.SHOW_ALL=l,Ce.SHOW_PARENT=k,Ce.SHOW_CHILD=N;var Te=Ce},62999:function(Lt,ze,o){"use strict";var ge=o(38663),V=o.n(ge),He=o(45747),Ne=o.n(He),Ie=o(13254),De=o(43358)},61639:function(Lt,ze,o){"use strict";o.d(ze,{Z:function(){return E}});var ge=o(90484),V=o(44378),He=o(86504),Ne=o(7085),Ie=o(18095),De=o(18267),re=o(94184),ve=o.n(re),de=o(67294),c=o(96159);function E(B,ye,Ke,se){var ke=se.isLeaf,ae=se.expanded,b=se.loading;if(b)return de.createElement(Ne.Z,{className:"".concat(B,"-switcher-loading-icon")});var s;if(Ke&&(0,ge.Z)(Ke)==="object"&&(s=Ke.showLeafIcon),ke){if(!Ke)return null;if(typeof s!="boolean"&&!!s){var C=typeof s=="function"?s(se):s,f="".concat(B,"-switcher-line-custom-icon");return(0,c.l$)(C)?(0,c.Tm)(C,{className:ve()(C.props.className||"",f)}):C}return s?de.createElement(He.Z,{className:"".concat(B,"-switcher-line-icon")}):de.createElement("span",{className:"".concat(B,"-switcher-leaf-line")})}var p="".concat(B,"-switcher-icon"),h=typeof ye=="function"?ye(se):ye;return(0,c.l$)(h)?(0,c.Tm)(h,{className:ve()(h.props.className||"",p)}):h||(Ke?ae?de.createElement(Ie.Z,{className:"".concat(B,"-switcher-line-icon")}):de.createElement(De.Z,{className:"".concat(B,"-switcher-line-icon")}):de.createElement(V.Z,{className:p}))}},4258:function(Lt,ze,o){"use strict";o.d(ze,{Z:function(){return $}});var ge=o(22122),V=o(96156),He=o(81253),Ne=o(28991),Ie=o(6610),De=o(5991),re=o(63349),ve=o(10379),de=o(44144),c=o(67294),E=o(94184),B=o.n(E),ye=o(64217),Ke=o(27822),se=function(Z){for(var G=Z.prefixCls,t=Z.level,O=Z.isStart,M=Z.isEnd,z="".concat(G,"-indent-unit"),d=[],l=0;l<t;l+=1){var k;d.push(c.createElement("span",{key:l,className:B()(z,(k={},(0,V.Z)(k,"".concat(z,"-start"),O[l]),(0,V.Z)(k,"".concat(z,"-end"),M[l]),k))}))}return c.createElement("span",{"aria-hidden":"true",className:"".concat(G,"-indent")},d)},ke=c.memo(se),ae=o(1089),b=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],s="open",C="close",f="---",p=function(T){(0,ve.Z)(G,T);var Z=(0,de.Z)(G);function G(){var t;(0,Ie.Z)(this,G);for(var O=arguments.length,M=new Array(O),z=0;z<O;z++)M[z]=arguments[z];return t=Z.call.apply(Z,[this].concat(M)),t.state={dragNodeHighlight:!1},t.selectHandle=void 0,t.onSelectorClick=function(d){var l=t.props.context.onNodeClick;l(d,(0,ae.F)(t.props)),t.isSelectable()?t.onSelect(d):t.onCheck(d)},t.onSelectorDoubleClick=function(d){var l=t.props.context.onNodeDoubleClick;l(d,(0,ae.F)(t.props))},t.onSelect=function(d){if(!t.isDisabled()){var l=t.props.context.onNodeSelect;d.preventDefault(),l(d,(0,ae.F)(t.props))}},t.onCheck=function(d){if(!t.isDisabled()){var l=t.props,k=l.disableCheckbox,N=l.checked,J=t.props.context.onNodeCheck;if(!(!t.isCheckable()||k)){d.preventDefault();var xe=!N;J(d,(0,ae.F)(t.props),xe)}}},t.onMouseEnter=function(d){var l=t.props.context.onNodeMouseEnter;l(d,(0,ae.F)(t.props))},t.onMouseLeave=function(d){var l=t.props.context.onNodeMouseLeave;l(d,(0,ae.F)(t.props))},t.onContextMenu=function(d){var l=t.props.context.onNodeContextMenu;l(d,(0,ae.F)(t.props))},t.onDragStart=function(d){var l=t.props.context.onNodeDragStart;d.stopPropagation(),t.setState({dragNodeHighlight:!0}),l(d,(0,re.Z)(t));try{d.dataTransfer.setData("text/plain","")}catch(k){}},t.onDragEnter=function(d){var l=t.props.context.onNodeDragEnter;d.preventDefault(),d.stopPropagation(),l(d,(0,re.Z)(t))},t.onDragOver=function(d){var l=t.props.context.onNodeDragOver;d.preventDefault(),d.stopPropagation(),l(d,(0,re.Z)(t))},t.onDragLeave=function(d){var l=t.props.context.onNodeDragLeave;d.stopPropagation(),l(d,(0,re.Z)(t))},t.onDragEnd=function(d){var l=t.props.context.onNodeDragEnd;d.stopPropagation(),t.setState({dragNodeHighlight:!1}),l(d,(0,re.Z)(t))},t.onDrop=function(d){var l=t.props.context.onNodeDrop;d.preventDefault(),d.stopPropagation(),t.setState({dragNodeHighlight:!1}),l(d,(0,re.Z)(t))},t.onExpand=function(d){var l=t.props,k=l.loading,N=l.context.onNodeExpand;k||N(d,(0,ae.F)(t.props))},t.setSelectHandle=function(d){t.selectHandle=d},t.getNodeState=function(){var d=t.props.expanded;return t.isLeaf()?null:d?s:C},t.hasChildren=function(){var d=t.props.eventKey,l=t.props.context.keyEntities,k=l[d]||{},N=k.children;return!!(N||[]).length},t.isLeaf=function(){var d=t.props,l=d.isLeaf,k=d.loaded,N=t.props.context.loadData,J=t.hasChildren();return l===!1?!1:l||!N&&!J||N&&k&&!J},t.isDisabled=function(){var d=t.props.disabled,l=t.props.context.disabled;return!!(l||d)},t.isCheckable=function(){var d=t.props.checkable,l=t.props.context.checkable;return!l||d===!1?!1:l},t.syncLoadData=function(d){var l=d.expanded,k=d.loading,N=d.loaded,J=t.props.context,xe=J.loadData,oe=J.onNodeLoad;k||xe&&l&&!t.isLeaf()&&!t.hasChildren()&&!N&&oe((0,ae.F)(t.props))},t.isDraggable=function(){var d=t.props,l=d.data,k=d.context.draggable;return!!(k&&(!k.nodeDraggable||k.nodeDraggable(l)))},t.renderDragHandler=function(){var d=t.props.context,l=d.draggable,k=d.prefixCls;return(l==null?void 0:l.icon)?c.createElement("span",{className:"".concat(k,"-draggable-icon")},l.icon):null},t.renderSwitcherIconDom=function(d){var l=t.props.switcherIcon,k=t.props.context.switcherIcon,N=l||k;return typeof N=="function"?N((0,Ne.Z)((0,Ne.Z)({},t.props),{},{isLeaf:d})):N},t.renderSwitcher=function(){var d=t.props.expanded,l=t.props.context.prefixCls;if(t.isLeaf()){var k=t.renderSwitcherIconDom(!0);return k!==!1?c.createElement("span",{className:B()("".concat(l,"-switcher"),"".concat(l,"-switcher-noop"))},k):null}var N=B()("".concat(l,"-switcher"),"".concat(l,"-switcher_").concat(d?s:C)),J=t.renderSwitcherIconDom(!1);return J!==!1?c.createElement("span",{onClick:t.onExpand,className:N},J):null},t.renderCheckbox=function(){var d=t.props,l=d.checked,k=d.halfChecked,N=d.disableCheckbox,J=t.props.context.prefixCls,xe=t.isDisabled(),oe=t.isCheckable();if(!oe)return null;var ne=typeof oe!="boolean"?oe:null;return c.createElement("span",{className:B()("".concat(J,"-checkbox"),l&&"".concat(J,"-checkbox-checked"),!l&&k&&"".concat(J,"-checkbox-indeterminate"),(xe||N)&&"".concat(J,"-checkbox-disabled")),onClick:t.onCheck},ne)},t.renderIcon=function(){var d=t.props.loading,l=t.props.context.prefixCls;return c.createElement("span",{className:B()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(t.getNodeState()||"docu"),d&&"".concat(l,"-icon_loading"))})},t.renderSelector=function(){var d=t.state.dragNodeHighlight,l=t.props,k=l.title,N=k===void 0?f:k,J=l.selected,xe=l.icon,oe=l.loading,ne=l.data,pe=t.props.context,Ze=pe.prefixCls,et=pe.showIcon,dt=pe.icon,lt=pe.loadData,st=pe.titleRender,Ue=t.isDisabled(),ct="".concat(Ze,"-node-content-wrapper"),vt;if(et){var Fe=xe||dt;vt=Fe?c.createElement("span",{className:B()("".concat(Ze,"-iconEle"),"".concat(Ze,"-icon__customize"))},typeof Fe=="function"?Fe(t.props):Fe):t.renderIcon()}else lt&&oe&&(vt=t.renderIcon());var g;typeof N=="function"?g=N(ne):st?g=st(ne):g=N;var A=c.createElement("span",{className:"".concat(Ze,"-title")},g);return c.createElement("span",{ref:t.setSelectHandle,title:typeof N=="string"?N:"",className:B()("".concat(ct),"".concat(ct,"-").concat(t.getNodeState()||"normal"),!Ue&&(J||d)&&"".concat(Ze,"-node-selected")),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick},vt,A,t.renderDropIndicator())},t.renderDropIndicator=function(){var d=t.props,l=d.disabled,k=d.eventKey,N=t.props.context,J=N.draggable,xe=N.dropLevelOffset,oe=N.dropPosition,ne=N.prefixCls,pe=N.indent,Ze=N.dropIndicatorRender,et=N.dragOverNodeKey,dt=N.direction,lt=!!J,st=!l&&lt&&et===k;return st?Ze({dropPosition:oe,dropLevelOffset:xe,indent:pe,prefixCls:ne,direction:dt}):null},t}return(0,De.Z)(G,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var O=this.props.selectable,M=this.props.context.selectable;return typeof O=="boolean"?O:M}},{key:"render",value:function(){var O,M=this.props,z=M.eventKey,d=M.className,l=M.style,k=M.dragOver,N=M.dragOverGapTop,J=M.dragOverGapBottom,xe=M.isLeaf,oe=M.isStart,ne=M.isEnd,pe=M.expanded,Ze=M.selected,et=M.checked,dt=M.halfChecked,lt=M.loading,st=M.domRef,Ue=M.active,ct=M.data,vt=M.onMouseMove,Fe=M.selectable,g=(0,He.Z)(M,b),A=this.props.context,W=A.prefixCls,e=A.filterTreeNode,D=A.keyEntities,ie=A.dropContainerKey,Y=A.dropTargetKey,r=A.draggingNodeKey,i=this.isDisabled(),a=(0,ye.Z)(g,{aria:!0,data:!0}),y=D[z]||{},S=y.level,H=ne[ne.length-1],P=this.isDraggable(),F=!i&&P,j=r===z,X=Fe!==void 0?{"aria-selected":!!Fe}:void 0;return c.createElement("div",(0,ge.Z)({ref:st,className:B()(d,"".concat(W,"-treenode"),(O={},(0,V.Z)(O,"".concat(W,"-treenode-disabled"),i),(0,V.Z)(O,"".concat(W,"-treenode-switcher-").concat(pe?"open":"close"),!xe),(0,V.Z)(O,"".concat(W,"-treenode-checkbox-checked"),et),(0,V.Z)(O,"".concat(W,"-treenode-checkbox-indeterminate"),dt),(0,V.Z)(O,"".concat(W,"-treenode-selected"),Ze),(0,V.Z)(O,"".concat(W,"-treenode-loading"),lt),(0,V.Z)(O,"".concat(W,"-treenode-active"),Ue),(0,V.Z)(O,"".concat(W,"-treenode-leaf-last"),H),(0,V.Z)(O,"".concat(W,"-treenode-draggable"),P),(0,V.Z)(O,"dragging",j),(0,V.Z)(O,"drop-target",Y===z),(0,V.Z)(O,"drop-container",ie===z),(0,V.Z)(O,"drag-over",!i&&k),(0,V.Z)(O,"drag-over-gap-top",!i&&N),(0,V.Z)(O,"drag-over-gap-bottom",!i&&J),(0,V.Z)(O,"filter-node",e&&e((0,ae.F)(this.props))),O)),style:l,draggable:F,"aria-grabbed":j,onDragStart:F?this.onDragStart:void 0,onDragEnter:P?this.onDragEnter:void 0,onDragOver:P?this.onDragOver:void 0,onDragLeave:P?this.onDragLeave:void 0,onDrop:P?this.onDrop:void 0,onDragEnd:P?this.onDragEnd:void 0,onMouseMove:vt},X,a),c.createElement(ke,{prefixCls:W,level:S,isStart:oe,isEnd:ne}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),G}(c.Component),h=function(Z){return c.createElement(Ke.k.Consumer,null,function(G){return c.createElement(p,(0,ge.Z)({},Z,{context:G}))})};h.displayName="TreeNode",h.isTreeNode=1;var $=h},27822:function(Lt,ze,o){"use strict";o.d(ze,{k:function(){return V}});var ge=o(67294),V=ge.createContext(null)},93549:function(Lt,ze,o){"use strict";o.d(ze,{O:function(){return T.Z},Z:function(){return Fe}});var ge=o(22122),V=o(96156),He=o(90484),Ne=o(28991),Ie=o(85061),De=o(6610),re=o(5991),ve=o(63349),de=o(10379),c=o(44144),E=o(67294),B=o(15105),ye=o(80334),Ke=o(64217),se=o(94184),ke=o.n(se),ae=o(27822),b=o(10225),s=o(1089);function C(g){if(g==null)throw new TypeError("Cannot destructure "+g)}var f=o(28481),p=o(81253),h=o(7606),$=o(63441),T=o(4258),Z=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],G=function(A,W){var e=A.className,D=A.style,ie=A.motion,Y=A.motionNodes,r=A.motionType,i=A.onMotionStart,a=A.onMotionEnd,y=A.active,S=A.treeNodeRequiredProps,H=(0,p.Z)(A,Z),P=E.useState(!0),F=(0,f.Z)(P,2),j=F[0],X=F[1],v=E.useContext(ae.k),Q=v.prefixCls,_=E.useRef(!1),U=function(){_.current||a(),_.current=!0};return(0,E.useEffect)(function(){Y&&r==="hide"&&j&&X(!1)},[Y]),(0,E.useEffect)(function(){return Y&&i(),function(){Y&&U()}},[]),Y?E.createElement($.Z,(0,ge.Z)({ref:W,visible:j},ie,{motionAppear:r==="show",onAppearEnd:U,onLeaveEnd:U}),function(ee,le){var Ce=ee.className,Te=ee.style;return E.createElement("div",{ref:le,className:ke()("".concat(Q,"-treenode-motion"),Ce),style:Te},Y.map(function(n){var u=(0,ge.Z)({},(C(n.data),n.data)),K=n.title,m=n.key,x=n.isStart,I=n.isEnd;delete u.children;var L=(0,s.H8)(m,S);return E.createElement(T.Z,(0,ge.Z)({},u,L,{title:K,active:y,data:n.data,key:m,isStart:x,isEnd:I}))}))}):E.createElement(T.Z,(0,ge.Z)({domRef:W,className:e,style:D},H,{active:y}))};G.displayName="MotionTreeNode";var t=E.forwardRef(G),O=t;function M(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],W=g.length,e=A.length;if(Math.abs(W-e)!==1)return{add:!1,key:null};function D(ie,Y){var r=new Map;ie.forEach(function(a){r.set(a,!0)});var i=Y.filter(function(a){return!r.has(a)});return i.length===1?i[0]:null}return W<e?{add:!0,key:D(g,A)}:{add:!1,key:D(A,g)}}function z(g,A,W){var e=g.findIndex(function(r){return r.key===W}),D=g[e+1],ie=A.findIndex(function(r){return r.key===W});if(D){var Y=A.findIndex(function(r){return r.key===D.key});return A.slice(ie+1,Y)}return A.slice(ie+1)}var d=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],l={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},k=function(){},N="RC_TREE_MOTION_".concat(Math.random()),J={key:N},xe={key:N,level:0,index:0,pos:"0",node:J,nodes:[J]},oe={parent:null,children:[],pos:xe.pos,data:J,title:null,key:N,isStart:[],isEnd:[]};function ne(g,A,W,e){return A===!1||!W?g:g.slice(0,Math.ceil(W/e)+1)}function pe(g){var A=g.key,W=g.pos;return(0,s.km)(A,W)}function Ze(g){for(var A=String(g.data.key),W=g;W.parent;)W=W.parent,A="".concat(W.data.key," > ").concat(A);return A}var et=E.forwardRef(function(g,A){var W=g.prefixCls,e=g.data,D=g.selectable,ie=g.checkable,Y=g.expandedKeys,r=g.selectedKeys,i=g.checkedKeys,a=g.loadedKeys,y=g.loadingKeys,S=g.halfCheckedKeys,H=g.keyEntities,P=g.disabled,F=g.dragging,j=g.dragOverNodeKey,X=g.dropPosition,v=g.motion,Q=g.height,_=g.itemHeight,U=g.virtual,ee=g.focusable,le=g.activeItem,Ce=g.focused,Te=g.tabIndex,n=g.onKeyDown,u=g.onFocus,K=g.onBlur,m=g.onActiveChange,x=g.onListChangeStart,I=g.onListChangeEnd,L=(0,p.Z)(g,d),w=E.useRef(null),R=E.useRef(null);E.useImperativeHandle(A,function(){return{scrollTo:function(We){w.current.scrollTo(We)},getIndentWidth:function(){return R.current.offsetWidth}}});var q=E.useState(Y),te=(0,f.Z)(q,2),$e=te[0],Se=te[1],Oe=E.useState(e),we=(0,f.Z)(Oe,2),Le=we[0],Ye=we[1],Je=E.useState(e),tt=(0,f.Z)(Je,2),ce=tt[0],Ae=tt[1],Ve=E.useState([]),Qe=(0,f.Z)(Ve,2),nt=Qe[0],St=Qe[1],Mt=E.useState(null),mt=(0,f.Z)(Mt,2),$t=mt[0],Pt=mt[1],gt=E.useRef(e);gt.current=e;function Et(){var me=gt.current;Ye(me),Ae(me),St([]),Pt(null),I()}E.useEffect(function(){Se(Y);var me=M($e,Y);if(me.key!==null)if(me.add){var We=Le.findIndex(function(Me){var pt=Me.key;return pt===me.key}),at=ne(z(Le,e,me.key),U,Q,_),Xe=Le.slice();Xe.splice(We+1,0,oe),Ae(Xe),St(at),Pt("show")}else{var Be=e.findIndex(function(Me){var pt=Me.key;return pt===me.key}),_e=ne(z(e,Le,me.key),U,Q,_),yt=e.slice();yt.splice(Be+1,0,oe),Ae(yt),St(_e),Pt("hide")}else Le!==e&&(Ye(e),Ae(e))},[Y,e]),E.useEffect(function(){F||Et()},[F]);var Ct=v?ce:e,rt={expandedKeys:Y,selectedKeys:r,loadedKeys:a,loadingKeys:y,checkedKeys:i,halfCheckedKeys:S,dragOverNodeKey:j,dropPosition:X,keyEntities:H};return E.createElement(E.Fragment,null,Ce&&le&&E.createElement("span",{style:l,"aria-live":"assertive"},Ze(le)),E.createElement("div",null,E.createElement("input",{style:l,disabled:ee===!1||P,tabIndex:ee!==!1?Te:null,onKeyDown:n,onFocus:u,onBlur:K,value:"",onChange:k,"aria-label":"for screen reader"})),E.createElement("div",{className:"".concat(W,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},E.createElement("div",{className:"".concat(W,"-indent")},E.createElement("div",{ref:R,className:"".concat(W,"-indent-unit")}))),E.createElement(h.Z,(0,ge.Z)({},L,{data:Ct,itemKey:pe,height:Q,fullHeight:!1,virtual:U,itemHeight:_,prefixCls:"".concat(W,"-list"),ref:w,onVisibleChange:function(We,at){var Xe=new Set(We),Be=at.filter(function(_e){return!Xe.has(_e)});Be.some(function(_e){return pe(_e)===N})&&Et()}}),function(me){var We=me.pos,at=(0,ge.Z)({},(C(me.data),me.data)),Xe=me.title,Be=me.key,_e=me.isStart,yt=me.isEnd,Me=(0,s.km)(Be,We);delete at.key,delete at.children;var pt=(0,s.H8)(Me,rt);return E.createElement(O,(0,ge.Z)({},at,pt,{title:Xe,active:!!le&&Be===le.key,pos:We,data:me.data,isStart:_e,isEnd:yt,motion:v,motionNodes:Be===N?nt:null,motionType:$t,onMotionStart:x,onMotionEnd:Et,treeNodeRequiredProps:rt,onMouseMove:function(){m(null)}}))}))});et.displayName="NodeList";var dt=et,lt=o(17341);function st(g){var A=g.dropPosition,W=g.dropLevelOffset,e=g.indent,D={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(A){case-1:D.top=0,D.left=-W*e;break;case 1:D.bottom=0,D.left=-W*e;break;case 0:D.bottom=0,D.left=e;break}return E.createElement("div",{style:D})}var Ue=10,ct=function(g){(0,de.Z)(W,g);var A=(0,c.Z)(W);function W(){var e;(0,De.Z)(this,W);for(var D=arguments.length,ie=new Array(D),Y=0;Y<D;Y++)ie[Y]=arguments[Y];return e=A.call.apply(A,[this].concat(ie)),e.destroyed=!1,e.delayedDragEnterLogic=void 0,e.loadingRetryTimes={},e.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,s.w$)()},e.dragStartMousePosition=null,e.dragNode=void 0,e.currentMouseOverDroppableNodeKey=null,e.listRef=E.createRef(),e.onNodeDragStart=function(r,i){var a=e.state,y=a.expandedKeys,S=a.keyEntities,H=e.props.onDragStart,P=i.props.eventKey;e.dragNode=i,e.dragStartMousePosition={x:r.clientX,y:r.clientY};var F=(0,b._5)(y,P);e.setState({draggingNodeKey:P,dragChildrenKeys:(0,b.wA)(P,S),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(F),window.addEventListener("dragend",e.onWindowDragEnd),H==null||H({event:r,node:(0,s.F)(i.props)})},e.onNodeDragEnter=function(r,i){var a=e.state,y=a.expandedKeys,S=a.keyEntities,H=a.dragChildrenKeys,P=a.flattenNodes,F=a.indent,j=e.props,X=j.onDragEnter,v=j.onExpand,Q=j.allowDrop,_=j.direction,U=i.props,ee=U.pos,le=U.eventKey,Ce=(0,ve.Z)(e),Te=Ce.dragNode;if(e.currentMouseOverDroppableNodeKey!==le&&(e.currentMouseOverDroppableNodeKey=le),!Te){e.resetDragState();return}var n=(0,b.OM)(r,Te,i,F,e.dragStartMousePosition,Q,P,S,y,_),u=n.dropPosition,K=n.dropLevelOffset,m=n.dropTargetKey,x=n.dropContainerKey,I=n.dropTargetPos,L=n.dropAllowed,w=n.dragOverNodeKey;if(H.indexOf(m)!==-1||!L){e.resetDragState();return}if(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(R){clearTimeout(e.delayedDragEnterLogic[R])}),Te.props.eventKey!==i.props.eventKey&&(r.persist(),e.delayedDragEnterLogic[ee]=window.setTimeout(function(){if(e.state.draggingNodeKey!==null){var R=(0,Ie.Z)(y),q=S[i.props.eventKey];q&&(q.children||[]).length&&(R=(0,b.L0)(y,i.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(R),v==null||v(R,{node:(0,s.F)(i.props),expanded:!0,nativeEvent:r.nativeEvent})}},800)),Te.props.eventKey===m&&K===0){e.resetDragState();return}e.setState({dragOverNodeKey:w,dropPosition:u,dropLevelOffset:K,dropTargetKey:m,dropContainerKey:x,dropTargetPos:I,dropAllowed:L}),X==null||X({event:r,node:(0,s.F)(i.props),expandedKeys:y})},e.onNodeDragOver=function(r,i){var a=e.state,y=a.dragChildrenKeys,S=a.flattenNodes,H=a.keyEntities,P=a.expandedKeys,F=a.indent,j=e.props,X=j.onDragOver,v=j.allowDrop,Q=j.direction,_=(0,ve.Z)(e),U=_.dragNode;if(!!U){var ee=(0,b.OM)(r,U,i,F,e.dragStartMousePosition,v,S,H,P,Q),le=ee.dropPosition,Ce=ee.dropLevelOffset,Te=ee.dropTargetKey,n=ee.dropContainerKey,u=ee.dropAllowed,K=ee.dropTargetPos,m=ee.dragOverNodeKey;y.indexOf(Te)!==-1||!u||(U.props.eventKey===Te&&Ce===0?e.state.dropPosition===null&&e.state.dropLevelOffset===null&&e.state.dropTargetKey===null&&e.state.dropContainerKey===null&&e.state.dropTargetPos===null&&e.state.dropAllowed===!1&&e.state.dragOverNodeKey===null||e.resetDragState():le===e.state.dropPosition&&Ce===e.state.dropLevelOffset&&Te===e.state.dropTargetKey&&n===e.state.dropContainerKey&&K===e.state.dropTargetPos&&u===e.state.dropAllowed&&m===e.state.dragOverNodeKey||e.setState({dropPosition:le,dropLevelOffset:Ce,dropTargetKey:Te,dropContainerKey:n,dropTargetPos:K,dropAllowed:u,dragOverNodeKey:m}),X==null||X({event:r,node:(0,s.F)(i.props)}))}},e.onNodeDragLeave=function(r,i){e.currentMouseOverDroppableNodeKey===i.props.eventKey&&!r.currentTarget.contains(r.relatedTarget)&&(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var a=e.props.onDragLeave;a==null||a({event:r,node:(0,s.F)(i.props)})},e.onWindowDragEnd=function(r){e.onNodeDragEnd(r,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDragEnd=function(r,i){var a=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),a==null||a({event:r,node:(0,s.F)(i.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDrop=function(r,i){var a,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.state,H=S.dragChildrenKeys,P=S.dropPosition,F=S.dropTargetKey,j=S.dropTargetPos,X=S.dropAllowed;if(!!X){var v=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),F!==null){var Q=(0,Ne.Z)((0,Ne.Z)({},(0,s.H8)(F,e.getTreeNodeRequiredProps())),{},{active:((a=e.getActiveItem())===null||a===void 0?void 0:a.key)===F,data:e.state.keyEntities[F].node}),_=H.indexOf(F)!==-1;(0,ye.ZP)(!_,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var U=(0,b.yx)(j),ee={event:r,node:(0,s.F)(Q),dragNode:e.dragNode?(0,s.F)(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(H),dropToGap:P!==0,dropPosition:P+Number(U[U.length-1])};y||v==null||v(ee),e.dragNode=null}}},e.cleanDragState=function(){var r=e.state.draggingNodeKey;r!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null},e.triggerExpandActionExpand=function(r,i){var a=e.state,y=a.expandedKeys,S=a.flattenNodes,H=i.expanded,P=i.key,F=i.isLeaf;if(!(F||r.shiftKey||r.metaKey||r.ctrlKey)){var j=S.filter(function(v){return v.key===P})[0],X=(0,s.F)((0,Ne.Z)((0,Ne.Z)({},(0,s.H8)(P,e.getTreeNodeRequiredProps())),{},{data:j.data}));e.setExpandedKeys(H?(0,b._5)(y,P):(0,b.L0)(y,P)),e.onNodeExpand(r,X)}},e.onNodeClick=function(r,i){var a=e.props,y=a.onClick,S=a.expandAction;S==="click"&&e.triggerExpandActionExpand(r,i),y==null||y(r,i)},e.onNodeDoubleClick=function(r,i){var a=e.props,y=a.onDoubleClick,S=a.expandAction;S==="doubleClick"&&e.triggerExpandActionExpand(r,i),y==null||y(r,i)},e.onNodeSelect=function(r,i){var a=e.state.selectedKeys,y=e.state,S=y.keyEntities,H=y.fieldNames,P=e.props,F=P.onSelect,j=P.multiple,X=i.selected,v=i[H.key],Q=!X;Q?j?a=(0,b.L0)(a,v):a=[v]:a=(0,b._5)(a,v);var _=a.map(function(U){var ee=S[U];return ee?ee.node:null}).filter(function(U){return U});e.setUncontrolledState({selectedKeys:a}),F==null||F(a,{event:"select",selected:Q,node:i,selectedNodes:_,nativeEvent:r.nativeEvent})},e.onNodeCheck=function(r,i,a){var y=e.state,S=y.keyEntities,H=y.checkedKeys,P=y.halfCheckedKeys,F=e.props,j=F.checkStrictly,X=F.onCheck,v=i.key,Q,_={event:"check",node:i,checked:a,nativeEvent:r.nativeEvent};if(j){var U=a?(0,b.L0)(H,v):(0,b._5)(H,v),ee=(0,b._5)(P,v);Q={checked:U,halfChecked:ee},_.checkedNodes=U.map(function(K){return S[K]}).filter(function(K){return K}).map(function(K){return K.node}),e.setUncontrolledState({checkedKeys:U})}else{var le=(0,lt.S)([].concat((0,Ie.Z)(H),[v]),!0,S),Ce=le.checkedKeys,Te=le.halfCheckedKeys;if(!a){var n=new Set(Ce);n.delete(v);var u=(0,lt.S)(Array.from(n),{checked:!1,halfCheckedKeys:Te},S);Ce=u.checkedKeys,Te=u.halfCheckedKeys}Q=Ce,_.checkedNodes=[],_.checkedNodesPositions=[],_.halfCheckedKeys=Te,Ce.forEach(function(K){var m=S[K];if(!!m){var x=m.node,I=m.pos;_.checkedNodes.push(x),_.checkedNodesPositions.push({node:x,pos:I})}}),e.setUncontrolledState({checkedKeys:Ce},!1,{halfCheckedKeys:Te})}X==null||X(Q,_)},e.onNodeLoad=function(r){var i=r.key,a=new Promise(function(y,S){e.setState(function(H){var P=H.loadedKeys,F=P===void 0?[]:P,j=H.loadingKeys,X=j===void 0?[]:j,v=e.props,Q=v.loadData,_=v.onLoad;if(!Q||F.indexOf(i)!==-1||X.indexOf(i)!==-1)return null;var U=Q(r);return U.then(function(){var ee=e.state.loadedKeys,le=(0,b.L0)(ee,i);_==null||_(le,{event:"load",node:r}),e.setUncontrolledState({loadedKeys:le}),e.setState(function(Ce){return{loadingKeys:(0,b._5)(Ce.loadingKeys,i)}}),y()}).catch(function(ee){if(e.setState(function(Ce){return{loadingKeys:(0,b._5)(Ce.loadingKeys,i)}}),e.loadingRetryTimes[i]=(e.loadingRetryTimes[i]||0)+1,e.loadingRetryTimes[i]>=Ue){var le=e.state.loadedKeys;(0,ye.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,b.L0)(le,i)}),y()}S(ee)}),{loadingKeys:(0,b.L0)(X,i)}})});return a.catch(function(){}),a},e.onNodeMouseEnter=function(r,i){var a=e.props.onMouseEnter;a==null||a({event:r,node:i})},e.onNodeMouseLeave=function(r,i){var a=e.props.onMouseLeave;a==null||a({event:r,node:i})},e.onNodeContextMenu=function(r,i){var a=e.props.onRightClick;a&&(r.preventDefault(),a({event:r,node:i}))},e.onFocus=function(){var r=e.props.onFocus;e.setState({focused:!0});for(var i=arguments.length,a=new Array(i),y=0;y<i;y++)a[y]=arguments[y];r==null||r.apply(void 0,a)},e.onBlur=function(){var r=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var i=arguments.length,a=new Array(i),y=0;y<i;y++)a[y]=arguments[y];r==null||r.apply(void 0,a)},e.getTreeNodeRequiredProps=function(){var r=e.state,i=r.expandedKeys,a=r.selectedKeys,y=r.loadedKeys,S=r.loadingKeys,H=r.checkedKeys,P=r.halfCheckedKeys,F=r.dragOverNodeKey,j=r.dropPosition,X=r.keyEntities;return{expandedKeys:i||[],selectedKeys:a||[],loadedKeys:y||[],loadingKeys:S||[],checkedKeys:H||[],halfCheckedKeys:P||[],dragOverNodeKey:F,dropPosition:j,keyEntities:X}},e.setExpandedKeys=function(r){var i=e.state,a=i.treeData,y=i.fieldNames,S=(0,s.oH)(a,r,y);e.setUncontrolledState({expandedKeys:r,flattenNodes:S},!0)},e.onNodeExpand=function(r,i){var a=e.state.expandedKeys,y=e.state,S=y.listChanging,H=y.fieldNames,P=e.props,F=P.onExpand,j=P.loadData,X=i.expanded,v=i[H.key];if(!S){var Q=a.indexOf(v),_=!X;if((0,ye.ZP)(X&&Q!==-1||!X&&Q===-1,"Expand state not sync with index check"),_?a=(0,b.L0)(a,v):a=(0,b._5)(a,v),e.setExpandedKeys(a),F==null||F(a,{node:i,expanded:_,nativeEvent:r.nativeEvent}),_&&j){var U=e.onNodeLoad(i);U&&U.then(function(){var ee=(0,s.oH)(e.state.treeData,a,H);e.setUncontrolledState({flattenNodes:ee})}).catch(function(){var ee=e.state.expandedKeys,le=(0,b._5)(ee,v);e.setExpandedKeys(le)})}}},e.onListChangeStart=function(){e.setUncontrolledState({listChanging:!0})},e.onListChangeEnd=function(){setTimeout(function(){e.setUncontrolledState({listChanging:!1})})},e.onActiveChange=function(r){var i=e.state.activeKey,a=e.props.onActiveChange;i!==r&&(e.setState({activeKey:r}),r!==null&&e.scrollTo({key:r}),a==null||a(r))},e.getActiveItem=function(){var r=e.state,i=r.activeKey,a=r.flattenNodes;return i===null?null:a.find(function(y){var S=y.key;return S===i})||null},e.offsetActiveKey=function(r){var i=e.state,a=i.flattenNodes,y=i.activeKey,S=a.findIndex(function(F){var j=F.key;return j===y});S===-1&&r<0&&(S=a.length),S=(S+r+a.length)%a.length;var H=a[S];if(H){var P=H.key;e.onActiveChange(P)}else e.onActiveChange(null)},e.onKeyDown=function(r){var i=e.state,a=i.activeKey,y=i.expandedKeys,S=i.checkedKeys,H=i.fieldNames,P=e.props,F=P.onKeyDown,j=P.checkable,X=P.selectable;switch(r.which){case B.Z.UP:{e.offsetActiveKey(-1),r.preventDefault();break}case B.Z.DOWN:{e.offsetActiveKey(1),r.preventDefault();break}}var v=e.getActiveItem();if(v&&v.data){var Q=e.getTreeNodeRequiredProps(),_=v.data.isLeaf===!1||!!(v.data[H.children]||[]).length,U=(0,s.F)((0,Ne.Z)((0,Ne.Z)({},(0,s.H8)(a,Q)),{},{data:v.data,active:!0}));switch(r.which){case B.Z.LEFT:{_&&y.includes(a)?e.onNodeExpand({},U):v.parent&&e.onActiveChange(v.parent.key),r.preventDefault();break}case B.Z.RIGHT:{_&&!y.includes(a)?e.onNodeExpand({},U):v.children&&v.children.length&&e.onActiveChange(v.children[0].key),r.preventDefault();break}case B.Z.ENTER:case B.Z.SPACE:{j&&!U.disabled&&U.checkable!==!1&&!U.disableCheckbox?e.onNodeCheck({},U,!S.includes(a)):!j&&X&&!U.disabled&&U.selectable!==!1&&e.onNodeSelect({},U);break}}}F==null||F(r)},e.setUncontrolledState=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var y=!1,S=!0,H={};Object.keys(r).forEach(function(P){if(P in e.props){S=!1;return}y=!0,H[P]=r[P]}),y&&(!i||S)&&e.setState((0,Ne.Z)((0,Ne.Z)({},H),a))}},e.scrollTo=function(r){e.listRef.current.scrollTo(r)},e}return(0,re.Z)(W,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var D=this.props.activeKey;D!==void 0&&D!==this.state.activeKey&&(this.setState({activeKey:D}),D!==null&&this.scrollTo({key:D}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var D,ie=this.state,Y=ie.focused,r=ie.flattenNodes,i=ie.keyEntities,a=ie.draggingNodeKey,y=ie.activeKey,S=ie.dropLevelOffset,H=ie.dropContainerKey,P=ie.dropTargetKey,F=ie.dropPosition,j=ie.dragOverNodeKey,X=ie.indent,v=this.props,Q=v.prefixCls,_=v.className,U=v.style,ee=v.showLine,le=v.focusable,Ce=v.tabIndex,Te=Ce===void 0?0:Ce,n=v.selectable,u=v.showIcon,K=v.icon,m=v.switcherIcon,x=v.draggable,I=v.checkable,L=v.checkStrictly,w=v.disabled,R=v.motion,q=v.loadData,te=v.filterTreeNode,$e=v.height,Se=v.itemHeight,Oe=v.virtual,we=v.titleRender,Le=v.dropIndicatorRender,Ye=v.onContextMenu,Je=v.onScroll,tt=v.direction,ce=v.rootClassName,Ae=v.rootStyle,Ve=(0,Ke.Z)(this.props,{aria:!0,data:!0}),Qe;return x&&((0,He.Z)(x)==="object"?Qe=x:typeof x=="function"?Qe={nodeDraggable:x}:Qe={}),E.createElement(ae.k.Provider,{value:{prefixCls:Q,selectable:n,showIcon:u,icon:K,switcherIcon:m,draggable:Qe,draggingNodeKey:a,checkable:I,checkStrictly:L,disabled:w,keyEntities:i,dropLevelOffset:S,dropContainerKey:H,dropTargetKey:P,dropPosition:F,dragOverNodeKey:j,indent:X,direction:tt,dropIndicatorRender:Le,loadData:q,filterTreeNode:te,titleRender:we,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},E.createElement("div",{role:"tree",className:ke()(Q,_,ce,(D={},(0,V.Z)(D,"".concat(Q,"-show-line"),ee),(0,V.Z)(D,"".concat(Q,"-focused"),Y),(0,V.Z)(D,"".concat(Q,"-active-focused"),y!==null),D)),style:Ae},E.createElement(dt,(0,ge.Z)({ref:this.listRef,prefixCls:Q,style:U,data:r,disabled:w,selectable:n,checkable:!!I,motion:R,dragging:a!==null,height:$e,itemHeight:Se,virtual:Oe,focusable:le,focused:Y,tabIndex:Te,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ye,onScroll:Je},this.getTreeNodeRequiredProps(),Ve))))}}],[{key:"getDerivedStateFromProps",value:function(D,ie){var Y=ie.prevProps,r={prevProps:D};function i(le){return!Y&&le in D||Y&&Y[le]!==D[le]}var a,y=ie.fieldNames;if(i("fieldNames")&&(y=(0,s.w$)(D.fieldNames),r.fieldNames=y),i("treeData")?a=D.treeData:i("children")&&((0,ye.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=(0,s.zn)(D.children)),a){r.treeData=a;var S=(0,s.I8)(a,{fieldNames:y});r.keyEntities=(0,Ne.Z)((0,V.Z)({},N,xe),S.keyEntities)}var H=r.keyEntities||ie.keyEntities;if(i("expandedKeys")||Y&&i("autoExpandParent"))r.expandedKeys=D.autoExpandParent||!Y&&D.defaultExpandParent?(0,b.r7)(D.expandedKeys,H):D.expandedKeys;else if(!Y&&D.defaultExpandAll){var P=(0,Ne.Z)({},H);delete P[N],r.expandedKeys=Object.keys(P).map(function(le){return P[le].key})}else!Y&&D.defaultExpandedKeys&&(r.expandedKeys=D.autoExpandParent||D.defaultExpandParent?(0,b.r7)(D.defaultExpandedKeys,H):D.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,a||r.expandedKeys){var F=(0,s.oH)(a||ie.treeData,r.expandedKeys||ie.expandedKeys,y);r.flattenNodes=F}if(D.selectable&&(i("selectedKeys")?r.selectedKeys=(0,b.BT)(D.selectedKeys,D):!Y&&D.defaultSelectedKeys&&(r.selectedKeys=(0,b.BT)(D.defaultSelectedKeys,D))),D.checkable){var j;if(i("checkedKeys")?j=(0,b.E6)(D.checkedKeys)||{}:!Y&&D.defaultCheckedKeys?j=(0,b.E6)(D.defaultCheckedKeys)||{}:a&&(j=(0,b.E6)(D.checkedKeys)||{checkedKeys:ie.checkedKeys,halfCheckedKeys:ie.halfCheckedKeys}),j){var X=j,v=X.checkedKeys,Q=v===void 0?[]:v,_=X.halfCheckedKeys,U=_===void 0?[]:_;if(!D.checkStrictly){var ee=(0,lt.S)(Q,!0,H);Q=ee.checkedKeys,U=ee.halfCheckedKeys}r.checkedKeys=Q,r.halfCheckedKeys=U}}return i("loadedKeys")&&(r.loadedKeys=D.loadedKeys),r}}]),W}(E.Component);ct.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:st,allowDrop:function(){return!0},expandAction:!1},ct.TreeNode=T.Z;var vt=ct,Fe=vt},10225:function(Lt,ze,o){"use strict";o.d(ze,{_5:function(){return re},L0:function(){return ve},yx:function(){return de},bt:function(){return c},Ds:function(){return E},wA:function(){return B},OM:function(){return se},BT:function(){return ke},E6:function(){return s},r7:function(){return C}});var ge=o(85061),V=o(90484),He=o(67294),Ne=o(80334),Ie=o(4258),De=null;function re(f,p){if(!f)return[];var h=f.slice(),$=h.indexOf(p);return $>=0&&h.splice($,1),h}function ve(f,p){var h=(f||[]).slice();return h.indexOf(p)===-1&&h.push(p),h}function de(f){return f.split("-")}function c(f,p){return"".concat(f,"-").concat(p)}function E(f){return f&&f.type&&f.type.isTreeNode}function B(f,p){var h=[],$=p[f];function T(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Z.forEach(function(G){var t=G.key,O=G.children;h.push(t),T(O)})}return T($.children),h}function ye(f){if(f.parent){var p=de(f.pos);return Number(p[p.length-1])===f.parent.children.length-1}return!1}function Ke(f){var p=de(f.pos);return Number(p[p.length-1])===0}function se(f,p,h,$,T,Z,G,t,O,M){var z,d=f.clientX,l=f.clientY,k=f.target.getBoundingClientRect(),N=k.top,J=k.height,xe=(M==="rtl"?-1:1)*(((T==null?void 0:T.x)||0)-d),oe=(xe-12)/$,ne=t[h.props.eventKey];if(l<N+J/2){var pe=G.findIndex(function(W){return W.key===ne.key}),Ze=pe<=0?0:pe-1,et=G[Ze].key;ne=t[et]}var dt=ne.key,lt=ne,st=ne.key,Ue=0,ct=0;if(!O.includes(dt))for(var vt=0;vt<oe&&ye(ne);vt+=1)ne=ne.parent,ct+=1;var Fe=p.props.data,g=ne.node,A=!0;return Ke(ne)&&ne.level===0&&l<N+J/2&&Z({dragNode:Fe,dropNode:g,dropPosition:-1})&&ne.key===h.props.eventKey?Ue=-1:(lt.children||[]).length&&O.includes(st)?Z({dragNode:Fe,dropNode:g,dropPosition:0})?Ue=0:A=!1:ct===0?oe>-1.5?Z({dragNode:Fe,dropNode:g,dropPosition:1})?Ue=1:A=!1:Z({dragNode:Fe,dropNode:g,dropPosition:0})?Ue=0:Z({dragNode:Fe,dropNode:g,dropPosition:1})?Ue=1:A=!1:Z({dragNode:Fe,dropNode:g,dropPosition:1})?Ue=1:A=!1,{dropPosition:Ue,dropLevelOffset:ct,dropTargetKey:ne.key,dropTargetPos:ne.pos,dragOverNodeKey:st,dropContainerKey:Ue===0?null:((z=ne.parent)===null||z===void 0?void 0:z.key)||null,dropAllowed:A}}function ke(f,p){if(!!f){var h=p.multiple;return h?f.slice():f.length?[f[0]]:f}}var ae=function(p){return p};function b(f,p){if(!f)return[];var h=p||{},$=h.processProps,T=$===void 0?ae:$,Z=Array.isArray(f)?f:[f];return Z.map(function(G){var t=G.children,O=_objectWithoutProperties(G,De),M=b(t,p);return React.createElement(TreeNode,_extends({key:O.key},T(O)),M)})}function s(f){if(!f)return null;var p;if(Array.isArray(f))p={checkedKeys:f,halfCheckedKeys:void 0};else if((0,V.Z)(f)==="object")p={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return(0,Ne.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return p}function C(f,p){var h=new Set;function $(T){if(!h.has(T)){var Z=p[T];if(!!Z){h.add(T);var G=Z.parent,t=Z.node;t.disabled||G&&$(G.key)}}}return(f||[]).forEach(function(T){$(T)}),(0,ge.Z)(h)}},17341:function(Lt,ze,o){"use strict";o.d(ze,{S:function(){return De}});var ge=o(80334);function V(re,ve){var de=new Set;return re.forEach(function(c){ve.has(c)||de.add(c)}),de}function He(re){var ve=re||{},de=ve.disabled,c=ve.disableCheckbox,E=ve.checkable;return!!(de||c)||E===!1}function Ne(re,ve,de,c){for(var E=new Set(re),B=new Set,ye=0;ye<=de;ye+=1){var Ke=ve.get(ye)||new Set;Ke.forEach(function(b){var s=b.key,C=b.node,f=b.children,p=f===void 0?[]:f;E.has(s)&&!c(C)&&p.filter(function(h){return!c(h.node)}).forEach(function(h){E.add(h.key)})})}for(var se=new Set,ke=de;ke>=0;ke-=1){var ae=ve.get(ke)||new Set;ae.forEach(function(b){var s=b.parent,C=b.node;if(!(c(C)||!b.parent||se.has(b.parent.key))){if(c(b.parent.node)){se.add(s.key);return}var f=!0,p=!1;(s.children||[]).filter(function(h){return!c(h.node)}).forEach(function(h){var $=h.key,T=E.has($);f&&!T&&(f=!1),!p&&(T||B.has($))&&(p=!0)}),f&&E.add(s.key),p&&B.add(s.key),se.add(s.key)}})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(V(B,E))}}function Ie(re,ve,de,c,E){for(var B=new Set(re),ye=new Set(ve),Ke=0;Ke<=c;Ke+=1){var se=de.get(Ke)||new Set;se.forEach(function(s){var C=s.key,f=s.node,p=s.children,h=p===void 0?[]:p;!B.has(C)&&!ye.has(C)&&!E(f)&&h.filter(function($){return!E($.node)}).forEach(function($){B.delete($.key)})})}ye=new Set;for(var ke=new Set,ae=c;ae>=0;ae-=1){var b=de.get(ae)||new Set;b.forEach(function(s){var C=s.parent,f=s.node;if(!(E(f)||!s.parent||ke.has(s.parent.key))){if(E(s.parent.node)){ke.add(C.key);return}var p=!0,h=!1;(C.children||[]).filter(function($){return!E($.node)}).forEach(function($){var T=$.key,Z=B.has(T);p&&!Z&&(p=!1),!h&&(Z||ye.has(T))&&(h=!0)}),p||B.delete(C.key),h&&ye.add(C.key),ke.add(C.key)}})}return{checkedKeys:Array.from(B),halfCheckedKeys:Array.from(V(ye,B))}}function De(re,ve,de,c){var E=[],B;c?B=c:B=He;var ye=new Set(re.filter(function(ae){var b=!!de[ae];return b||E.push(ae),b})),Ke=new Map,se=0;Object.keys(de).forEach(function(ae){var b=de[ae],s=b.level,C=Ke.get(s);C||(C=new Set,Ke.set(s,C)),C.add(b),se=Math.max(se,s)}),(0,ge.ZP)(!E.length,"Tree missing follow keys: ".concat(E.slice(0,100).map(function(ae){return"'".concat(ae,"'")}).join(", ")));var ke;return ve===!0?ke=Ne(ye,Ke,se,B):ke=Ie(ye,ve.halfCheckedKeys,Ke,se,B),ke}},1089:function(Lt,ze,o){"use strict";o.d(ze,{km:function(){return c},w$:function(){return E},zn:function(){return ye},oH:function(){return Ke},I8:function(){return ke},H8:function(){return ae},F:function(){return b}});var ge=o(90484),V=o(85061),He=o(28991),Ne=o(81253),Ie=o(98423),De=o(50344),re=o(80334),ve=o(10225),de=["children"];function c(s,C){return s!=null?s:C}function E(s){var C=s||{},f=C.title,p=C._title,h=C.key,$=C.children,T=f||"title";return{title:T,_title:p||[T],key:h||"key",children:$||"children"}}function B(s,C){var f=new Map;function p(h){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(h||[]).forEach(function(T){var Z=T[C.key],G=T[C.children];warning(Z!=null,"Tree node must have a certain key: [".concat($).concat(Z,"]"));var t=String(Z);warning(!f.has(t)||Z===null||Z===void 0,"Same 'key' exist in the Tree: ".concat(t)),f.set(t,!0),p(G,"".concat($).concat(t," > "))})}p(s)}function ye(s){function C(f){var p=(0,De.Z)(f);return p.map(function(h){if(!(0,ve.Ds)(h))return(0,re.ZP)(!h,"Tree/TreeNode can only accept TreeNode as children."),null;var $=h.key,T=h.props,Z=T.children,G=(0,Ne.Z)(T,de),t=(0,He.Z)({key:$},G),O=C(Z);return O.length&&(t.children=O),t}).filter(function(h){return h})}return C(s)}function Ke(s,C,f){var p=E(f),h=p._title,$=p.key,T=p.children,Z=new Set(C===!0?[]:C),G=[];function t(O){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return O.map(function(z,d){for(var l=(0,ve.bt)(M?M.pos:"0",d),k=c(z[$],l),N,J=0;J<h.length;J+=1){var xe=h[J];if(z[xe]!==void 0){N=z[xe];break}}var oe=(0,He.Z)((0,He.Z)({},(0,Ie.Z)(z,[].concat((0,V.Z)(h),[$,T]))),{},{title:N,key:k,parent:M,pos:l,children:null,data:z,isStart:[].concat((0,V.Z)(M?M.isStart:[]),[d===0]),isEnd:[].concat((0,V.Z)(M?M.isEnd:[]),[d===O.length-1])});return G.push(oe),C===!0||Z.has(k)?oe.children=t(z[T]||[],oe):oe.children=[],oe})}return t(s),G}function se(s,C,f){var p={};(0,ge.Z)(f)==="object"?p=f:p={externalGetKey:f},p=p||{};var h=p,$=h.childrenPropName,T=h.externalGetKey,Z=h.fieldNames,G=E(Z),t=G.key,O=G.children,M=$||O,z;T?typeof T=="string"?z=function(k){return k[T]}:typeof T=="function"&&(z=function(k){return T(k)}):z=function(k,N){return c(k[t],N)};function d(l,k,N,J){var xe=l?l[M]:s,oe=l?(0,ve.bt)(N.pos,k):"0",ne=l?[].concat((0,V.Z)(J),[l]):[];if(l){var pe=z(l,oe),Ze={node:l,index:k,pos:oe,key:pe,parentPos:N.node?N.pos:null,level:N.level+1,nodes:ne};C(Ze)}xe&&xe.forEach(function(et,dt){d(et,dt,{node:l,pos:oe,level:N?N.level+1:-1},ne)})}d(null)}function ke(s){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=C.initWrapper,p=C.processEntity,h=C.onProcessFinished,$=C.externalGetKey,T=C.childrenPropName,Z=C.fieldNames,G=arguments.length>2?arguments[2]:void 0,t=$||G,O={},M={},z={posEntities:O,keyEntities:M};return f&&(z=f(z)||z),se(s,function(d){var l=d.node,k=d.index,N=d.pos,J=d.key,xe=d.parentPos,oe=d.level,ne=d.nodes,pe={node:l,nodes:ne,index:k,key:J,pos:N,level:oe},Ze=c(J,N);O[N]=pe,M[Ze]=pe,pe.parent=O[xe],pe.parent&&(pe.parent.children=pe.parent.children||[],pe.parent.children.push(pe)),p&&p(pe,z)},{externalGetKey:t,childrenPropName:T,fieldNames:Z}),h&&h(z),z}function ae(s,C){var f=C.expandedKeys,p=C.selectedKeys,h=C.loadedKeys,$=C.loadingKeys,T=C.checkedKeys,Z=C.halfCheckedKeys,G=C.dragOverNodeKey,t=C.dropPosition,O=C.keyEntities,M=O[s],z={eventKey:s,expanded:f.indexOf(s)!==-1,selected:p.indexOf(s)!==-1,loaded:h.indexOf(s)!==-1,loading:$.indexOf(s)!==-1,checked:T.indexOf(s)!==-1,halfChecked:Z.indexOf(s)!==-1,pos:String(M?M.pos:""),dragOver:G===s&&t===0,dragOverGapTop:G===s&&t===-1,dragOverGapBottom:G===s&&t===1};return z}function b(s){var C=s.data,f=s.expanded,p=s.selected,h=s.checked,$=s.loaded,T=s.loading,Z=s.halfChecked,G=s.dragOver,t=s.dragOverGapTop,O=s.dragOverGapBottom,M=s.pos,z=s.active,d=s.eventKey,l=(0,He.Z)((0,He.Z)({},C),{},{expanded:f,selected:p,checked:h,loaded:$,loading:T,halfChecked:Z,dragOver:G,dragOverGapTop:t,dragOverGapBottom:O,pos:M,active:z,key:d});return"props"in l||Object.defineProperty(l,"props",{get:function(){return(0,re.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),l}}}]);