@kdcloudjs/kdesign 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +7 -7
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/package.json +2 -2
package/dist/kdesign.min.css
CHANGED
package/dist/kdesign.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.3.
|
|
3
|
+
* @kdcloudjs/kdesign v1.3.5
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -199,5 +199,5 @@ e.exports=function(){"use strict";function r(t,e){var n=Object.keys(t);if(Object
|
|
|
199
199
|
* onComplete(cssText, styleNode, cssVariables, benchmark) {},
|
|
200
200
|
* onFinally(hasChanged, hasNativeSupport, benchmark)
|
|
201
201
|
* });
|
|
202
|
-
*/function Lv(){var i,n,r,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a="cssVars(): ",p=fv({},Pv,o);function h(e,t,n,r){!p.silent&&window.console&&console.error("".concat(a).concat(e,"\n"),t),p.onError(e,t,n,r)}function m(e){!p.silent&&window.console&&console.warn("".concat(a).concat(e)),p.onWarning(e)}function c(e){p.onFinally(Boolean(e),Sv,Fv()-p.__benchmark)}if(kv){if(p.watch)return p.watch=Pv.watch,i=p,window.MutationObserver&&(Mv&&(Mv.disconnect(),Mv=null),(Mv=new MutationObserver(function(e){e.some(function(e){return function(e){var t=!1;{var n,r,o,a;"attributes"===e.type&&s(e.target)&&!l(e.target)&&(n="disabled"===e.attributeName,r="href"===e.attributeName,o="skip"===e.target.getAttribute("data-cssvars"),a="src"===e.target.getAttribute("data-cssvars"),n?t=!o&&!a:r&&(o?e.target.setAttribute("data-cssvars",""):a&&zv(i.rootElement,!0),t=!0))}return t}(e)||function(e){var t=!1;{var n;"childList"===e.type&&(n=u(e.target),e="out"===e.target.getAttribute("data-cssvars"),t=n&&!e)}return t}(e)||function(e){var t=!1;"childList"===e.type&&(t=[].slice.call(e.addedNodes).some(function(e){var t=1===e.nodeType&&e.hasAttribute("data-cssvars"),n=u(e)&&Nv.cssVars.test(e.textContent);return!t&&(s(e)||n)&&!l(e)}));return t}(e)||function(e){var t=!1;"childList"===e.type&&(t=[].slice.call(e.removedNodes).some(function(e){var t=1===e.nodeType,n=t&&"out"===e.getAttribute("data-cssvars"),r=t&&"src"===e.getAttribute("data-cssvars"),t=r;return(r||n)&&(e=e.getAttribute("data-cssvars-group"),e=i.rootElement.querySelector('[data-cssvars-group="'.concat(e,'"]')),r&&zv(i.rootElement,!0),e&&e.parentNode.removeChild(e)),t}));return t}(e)})&&Lv(i)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})),void Lv(p);if(!1===p.watch&&Mv&&(Mv.disconnect(),Mv=null),!p.__benchmark){if(Tv===p.rootElement)return void function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(Rv),Rv=setTimeout(function(){e.__benchmark=null,Lv(e)},t)}(o);var e=[].slice.call(p.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));p.__benchmark=Fv(),p.exclude=[Mv?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",p.exclude].filter(function(e){return e}).join(","),p.variables=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=/^-{2}/;return Object.keys(n).reduce(function(e,t){return e[r.test(t)?t:"--".concat(t.replace(/^-+/,""))]=n[t],e},{})}(p.variables),e.forEach(function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,n=t&&e.textContent!==e.__cssVars.text;t&&n&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))}),Mv||([].slice.call(p.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var t=e.getAttribute("data-cssvars-group");(t?p.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]')):null)||e.parentNode.removeChild(e)}),Av&&e.length<Av&&(Av=e.length,Dv.dom={}))}"loading"!==document.readyState?Sv&&p.onlyLegacy?(n=!1,p.updateDOM&&(r=p.rootElement.host||(p.rootElement===document?document.documentElement:p.rootElement),Object.keys(p.variables).forEach(function(e){var t=p.variables[e];n=n||t!==getComputedStyle(r).getPropertyValue(e),r.style.setProperty(e,t)})),c(n)):!Iv&&(p.shadowDOM||p.rootElement.shadowRoot||p.rootElement.host)?pv({rootElement:Pv.rootElement,include:Pv.include,exclude:p.exclude,skipDisabled:!1,onSuccess:function(e,t,n){return(!(t.sheet||{}).disabled||t.__cssVars)&&(e=((e=e.replace(Nv.cssComments,"").replace(Nv.cssMediaQueries,"")).match(Nv.cssVarDeclRules)||[]).join(""))||!1},onComplete:function(e,t,n){wv(e,{store:Dv.dom,onWarning:m}),Iv=!0,Lv(p)}}):(Tv=p.rootElement,pv({rootElement:p.rootElement,include:p.include,exclude:p.exclude,skipDisabled:!1,onBeforeSend:p.onBeforeSend,onError:function(e,t,n){var r=e.responseURL||_v(n,location.href),n=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");h("CSS XHR Error: ".concat(r," ").concat(e.status," ").concat(n),t,e,r)},onSuccess:function(e,t,n){if((t.sheet||{}).disabled&&!t.__cssVars)return!1;var r,o,a="link"===t.nodeName.toLowerCase(),i="style"===t.nodeName.toLowerCase()&&e!==t.textContent,t=p.onSuccess(e,t,n);return e=void 0!==t&&!1===Boolean(t)?"":t||e,p.updateURLs&&(a||i)&&(o=n,((r=e).replace(Nv.cssComments,"").match(Nv.cssUrls)||[]).forEach(function(e){var t=e.replace(Nv.cssUrls,"$1"),n=_v(t,o);r=r.replace(e,e.replace(t,n))}),e=r),e},onComplete:function(e,s){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],n=fv({},Dv.dom,Dv.user);if(Dv.job={},t.forEach(function(t,e){e=s[e];if(t.__cssVars=t.__cssVars||{},t.__cssVars.text=e,Nv.cssVars.test(e))try{var n=bv(e,{preserveStatic:p.preserveStatic,removeComments:!0});wv(n,{parseHost:Boolean(p.rootElement.host),store:Dv.dom,onWarning:m}),t.__cssVars.tree=n}catch(e){h(e.message,t)}}),fv(Dv.job,Dv.dom),p.updateDOM?(fv(Dv.user,p.variables),fv(Dv.job,Dv.user)):(fv(Dv.job,Dv.user,p.variables),fv(n,p.variables)),0<jv.job&&Boolean(Object.keys(Dv.job).length>Object.keys(n).length||Boolean(Object.keys(n).length&&Object.keys(Dv.job).some(function(e){return Dv.job[e]!==n[e]}))))zv(p.rootElement),Lv(p);else{var u=[],f=[],d=!1;if(p.updateDOM&&jv.job++,t.forEach(function(t,e){var n=!t.__cssVars.tree;if(t.__cssVars.tree)try{Cv(t.__cssVars.tree,fv({},p,{variables:Dv.job,onWarning:m}));var r,o,a,i,c,l=xv(t.__cssVars.tree);p.updateDOM?(r=s[e],o=Nv.cssVarFunc.test(r),t.getAttribute("data-cssvars")||t.setAttribute("data-cssvars","src"),l.length&&o&&(a=t.getAttribute("data-cssvars-group")||++jv.group,i=l.replace(/\s/g,""),c=p.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(a,'"]'))||document.createElement("style"),d=d||Nv.cssKeyframes.test(l),p.preserveStatic&&t.sheet&&(t.sheet.disabled=!0),c.hasAttribute("data-cssvars")||c.setAttribute("data-cssvars","out"),i===t.textContent.replace(/\s/g,"")?(n=!0,c&&c.parentNode&&(t.removeAttribute("data-cssvars-group"),c.parentNode.removeChild(c))):i!==c.textContent.replace(/\s/g,"")&&([t,c].forEach(function(e){e.setAttribute("data-cssvars-job",jv.job),e.setAttribute("data-cssvars-group",a)}),c.textContent=l,u.push(l),f.push(c),c.parentNode||t.parentNode.insertBefore(c,t.nextSibling)))):t.textContent.replace(/\s/g,"")!==l&&u.push(l)}catch(e){h(e.message,t)}n&&t.setAttribute("data-cssvars","skip"),t.hasAttribute("data-cssvars-job")||t.setAttribute("data-cssvars-job",jv.job)}),Av=p.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,p.shadowDOM)for(var r,o=[].concat(p.rootElement).concat([].slice.call(p.rootElement.querySelectorAll("*"))),a=0;r=o[a];++a)r.shadowRoot&&r.shadowRoot.querySelector("style")&&Lv(fv({},p,{rootElement:r.shadowRoot}));p.updateDOM&&d&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(t){for(var n=e.getElementsByTagName("*"),r=[],o="__CSSVARSPONYFILL-KEYFRAMES__",a=0,i=n.length;a<i;a++){var c=n[a];"none"!==getComputedStyle(c)[t]&&(c.style[t]+=o,r.push(c))}document.body.offsetHeight;for(var l=0,s=r.length;l<s;l++){var u=r[l].style;u[t]=u[t].replace(o,"")}}}(p.rootElement),Tv=!1,p.onComplete(u.join(""),f,JSON.parse(JSON.stringify(Dv.job)),Fv()-p.__benchmark),c(f.length)}}})):document.addEventListener("DOMContentLoaded",function e(t){Lv(o),document.removeEventListener("DOMContentLoaded",e)})}function l(e){var t=s(e)&&e.hasAttribute("disabled"),e=(e.sheet||{}).disabled;return t||e}function s(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function u(e){return"style"===e.nodeName.toLowerCase()}}function _v(e,t){var n=1<arguments.length&&void 0!==t?t:location.href,r=document.implementation.createHTMLDocument(""),o=r.createElement("base"),t=r.createElement("a");return r.head.appendChild(o),r.body.appendChild(t),o.href=n,t.href=e,t.href}function Fv(){return kv&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function zv(e,t){t=1<arguments.length&&void 0!==t&&t;[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach(function(e){return e.setAttribute("data-cssvars","")}),t&&(Dv.dom={})}Lv.reset=function(){for(var e in jv.job=0,jv.group=0,Tv=!1,Mv&&(Mv.disconnect(),Mv=null),Av=0,Rv=null,Iv=!1,Dv)Dv[e]={}};var Bv=Lv,Hv=new Bd.a;function Vv(e){var a=Object(Qe.useRef)(null),t=e.row,i=e.rowIndex,n=e.domHelper,e=e.renderDetail,c=n.artTable;return Object(Qe.useEffect)(function(){function e(e){return Fd()(e=Fd()(e=".".concat(e," .")).call(e,Eh.tableRow,'[data-rowindex="')).call(e,i,'"]')}var t=a.current&&a.current.getBoundingClientRect(),n=c.querySelector(e(Eh.tableBody)),r=c.querySelector(e(Eh.fixedLeft)),o=c.querySelector(e(Eh.fixedRight));t.height&&(n&&(n.style.height=t.height+"px"),r&&(r.style.height=t.height+"px"),o&&(o.style.height=t.height+"px"))},[]),Object(Qe.useEffect)(function(){var e=n.getRowTop(i)||0;a.current.style.transform="translateY(".concat(e+"px",")")}),Ze.a.createElement("div",{ref:a,className:Eh.rowDetailItem},e(t,i))}function Wv(e){return Hv.get(e)}function Uv(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qv(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yv(n){var r=function(){if("undefined"==typeof Reflect||!Mh.a)return!1;if(Mh.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mh()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ih()(n);return t=r?(e=Ih()(this).constructor,Mh()(t,arguments,e)):t.apply(this,arguments),Rh()(this,t)}}$p.isIE&&(Hv.set("header",function(e,t){var n=t.stickyTop,r=t.hasHeader,o=_d()(e),a=e.nested,i=e.visible,c=e.hasLockColumn,l=o.left,s=o.right,t=a.left,o=a.right,a=Cm(a.full)+1;return Ze.a.createElement("div",{className:Je()(Eh.tableHeader)},Ze.a.createElement("div",{className:Je()(Eh.tableHeaderMain,"no-scrollbar"),style:{top:0===n?void 0:n,display:r?void 0:"none"}},Ze.a.createElement(Tm,{info:e,theaderPosition:c?"center":void 0})),0<l.length?Ze.a.createElement("div",{className:Eh.fixedLeft},Ze.a.createElement(Tm,{info:Ed()(Ed()({},e),{flat:{center:l,full:l,left:[],right:[]},nested:{center:t,full:t,left:[],right:[]},visible:jd()(i).call(i,0,l.length),horizontalRenderRange:{leftIndex:0,leftBlank:0,rightIndex:l.length,rightBlank:0}}),theaderPosition:"left",rowCount:a})):null,0<s.length?Ze.a.createElement("div",{className:Eh.fixedRight},Ze.a.createElement(Tm,{info:Ed()(Ed()({},e),{flat:{center:s,full:s,left:[],right:[]},nested:{center:o,full:o,left:[],right:[]},visible:jd()(i).call(i,i.length-s.length),horizontalRenderRange:{leftIndex:0,leftBlank:0,rightIndex:s.length,rightBlank:0}}),theaderPosition:"right",rowCount:a})):null)}),Hv.set("body",function(e,t,n){var r=t.dataSource,o=t.getRowProps,a=t.primaryKey,i=(p=e.verticalRenderRange).topIndex,c=p.bottomBlank,l=p.topBlank,s=p.bottomIndex,u=_d()(e),f=e.visible,d=e.hasLockColumn,t=u.left,p=u.right,u={first:0,offset:i,limit:s,last:r.length-1},i={getRowProps:uh(o,n.rowProps),primaryKey:a,data:jd()(r).call(r,i,s)},s={right:-(n.hasScrollY?ch().width:0)};return Ze.a.createElement("div",{className:Je()(Eh.tableBody,Eh.horizontalScrollContainer)},Ze.a.createElement("div",{className:Eh.virtual},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:d?"center":void 0,horizontalRenderInfo:e,verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})),0<t.length?Ze.a.createElement("div",{className:Eh.fixedLeft},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:"left",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:t,full:t,left:[],right:[]},visible:jd()(f).call(f,0,t.length)}),verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})):null,0<p.length?Ze.a.createElement("div",{className:Eh.fixedRight,style:s},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:"right",hasScrollY:n.hasScrollY,horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:p,full:p,left:[],right:[]},visible:jd()(f).call(f,f.length-p.length)}),verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})):null,Ze.a.createElement("div",{className:Eh.rowDetailContainer}))}),Hv.set("footer",function(e,t,n){var r=void 0===(l=t.footerDataSource)?[]:l,o=t.getRowProps,a=t.primaryKey,i=t.stickyBottom,c=uh(o,n.rowProps),l=_d()(e),t=e.visible,o=e.hasLockColumn,n=l.left,l=l.right,r={data:r,getRowProps:c,primaryKey:a,verticalRenderInfo:{offset:0,first:0,last:r.length-1,limit:1/0}};return Ze.a.createElement("div",{className:Je()(Eh.tableFooter),style:{bottom:0===i?void 0:i}},Ze.a.createElement("div",{className:Je()(Eh.tableFooterMain,Eh.horizontalScrollContainer)},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:o?"center":void 0,horizontalRenderInfo:e}))),0<n.length?Ze.a.createElement("div",{className:Eh.fixedLeft},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:"left",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:n,full:n,left:[],right:[]},visible:jd()(t).call(t,0,n.length)})}))):null,0<l.length?Ze.a.createElement("div",{className:Eh.fixedRight},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:"right",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:l,full:l,left:[],right:[]},visible:jd()(t).call(t,t.length-l.length)})}))):null)}),Hv.set("rowDetail",function(e){var t=e.domHelper;if(t){t=t.artTable,t=t&&t.querySelector(".".concat(Eh.rowDetailContainer));return X.a.createPortal(Ze.a.createElement(Vv,Ed()({},e)),t)}}));var Kv=!1;var Gv=function(e){Ah()(n,e);var t=Yv(n);function n(e){var d;return Cd()(this,n),(d=t.call(this,e)).rowHeightManager=nv(d.props.dataSource.length,d.props.estimatedRowHeight),d.artTableWrapperRef=Ze.a.createRef(),d.rootSubscription=new op,d.hasScrollY=!1,d.resizeSubject=new Hp,d.getRowNodeListByEvent=function(e){var t,n,r=null,o=e.currentTarget.dataset.rowindex;return void 0!==o&&(t=(n=d.domHelper).tableBody,n=n.tableFooter,r=(t.contains(e.currentTarget)?t:n).querySelectorAll('tr[data-rowindex="'.concat(o,'"]'))),r},d.handleRowMouseEnter=function(e){e=d.getRowNodeListByEvent(e);e&&e.forEach(function(e){e.classList.add("row-hover")})},d.handleRowMouseLeave=function(e){e=d.getRowNodeListByEvent(e);e&&e.forEach(function(e){e.classList.remove("row-hover")})},d.renderTableBody=function(e){var t=d.props,n=t.dataSource,r=t.getRowProps,o=t.primaryKey,a=t.isLoading,i=t.emptyCellHeight,c=(t.footerDataSource,Je()(Eh.tableBody,Eh.horizontalScrollContainer)),t=$p.isIE||$p.isEdge?{overflow:"hidden"}:{};if(0===n.length){var l=d.props,s=l.components,u=l.emptyContent,f=s.EmptyContent;return null==f&&null!=u&&(Kv||(Kv=!0,Hd.warn("BaseTable props.emptyContent 已经过时,请使用 props.components.EmptyContent 来自定义数据为空时的表格表现")),f=function(){return u}),Ze.a.createElement("div",{className:Je()(c,"empty")},Ze.a.createElement("div",{className:Eh.virtual,style:t},Ze.a.createElement(xm,{descriptors:e.visible,isLoading:a,EmptyContent:f,emptyCellHeight:i})))}l=e.verticalRenderRange,s=l.topIndex,a=l.bottomBlank,f=l.topBlank,i=l.bottomIndex,l=Wv("body");return"function"==typeof l?l(e,d.props,{rowProps:{onMouseEnter:d.handleRowMouseEnter,onMouseLeave:d.handleRowMouseLeave},hasScrollY:d.hasScrollY}):Ze.a.createElement("div",{className:c},Ze.a.createElement("div",{className:Eh.virtual,style:t},0<f&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:f}}),Ze.a.createElement(cv,{tbodyHtmlTag:"tbody",getRowProps:r,primaryKey:o,data:jd()(n).call(n,s,i),hasScrollY:d.hasScrollY,horizontalRenderInfo:e,verticalRenderInfo:{first:0,offset:s,limit:i,last:n.length-1}}),0<a&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:a}})))},d.state={hasScroll:!0,hasScrollY:!0,needRenderLock:!0,offsetY:0,offsetX:0,maxRenderHeight:600,maxRenderWidth:800},d}return kd()(n,[{key:"getDoms",value:function(){return Hd.warn("[kd-table] BaseTable.getDoms() 已经过时"),this.domHelper}},{key:"updateStickyScroll",value:function(){var e,t,n,r=this.domHelper,o=r.stickyScroll,a=r.artTable,i=r.stickyScrollItem,c=this.hasScrollY;a&&(n=this.domHelper.getTableBodyHtmlTable().offsetWidth,r=a.offsetWidth,a="auto"===(a=this.props.stickyScrollHeight)?ch().height:a,o.style.height="".concat(a,"px"),n<=r?this.state.hasScroll&&this.setState({hasScroll:!1}):!this.state.hasScroll&&5<a&&this.setState({hasScroll:!0}),this.domHelper.virtual.offsetHeight>this.domHelper.tableBody.offsetHeight?this.hasScrollY=!0:(o.style.paddingRight="".concat(a,"px"),this.hasScrollY=!1),c!==this.hasScrollY&&null!==(t=(e=this.props).setTableWidth)&&void 0!==t&&t.call(e,this.domHelper.tableBody.clientWidth),i.style.width="".concat(n,"px"))}},{key:"renderTableHeader",value:function(e){var t=this.props,n=t.stickyTop,r=t.hasHeader,t=Wv("header");return"function"==typeof t?t(e,this.props):Ze.a.createElement("div",{className:Je()(Eh.tableHeader,"no-scrollbar"),style:{top:0===n?void 0:n,display:r?void 0:"none"}},Ze.a.createElement(Tm,{info:e}),Ze.a.createElement("div",{className:Eh.verticalScrollPlaceholder,style:this.hasScrollY?{width:ch().width}:void 0}))}},{key:"updateOffsetX",value:function(e){this.lastInfo.useVirtual.horizontal&&Math.abs(e-this.state.offsetX)>=eh/2&&this.setState({offsetX:e})}},{key:"syncHorizontalScrollFromTableBody",value:function(){this.syncHorizontalScroll(this.domHelper.virtual.scrollLeft)}},{key:"syncHorizontalScroll",value:function(e){this.updateOffsetX(e);var t=_d()(this.lastInfo),n=this.domHelper.getLeftLockShadow();n&&(0<t.left.length&&this.state.needRenderLock&&0<e?n.classList.add("show-shadow"):n.classList.remove("show-shadow"));n=this.domHelper.getRightLockShadow();n&&(0<t.right.length&&this.state.needRenderLock&&e<this.domHelper.virtual.scrollWidth-this.domHelper.virtual.clientWidth?n.classList.add("show-shadow"):n.classList.remove("show-shadow"))}},{key:"getVerticalRenderRange",value:function(e){var t=this.props.dataSource,n=this.state,r=n.offsetY,n=n.maxRenderHeight,t=t.length;return e.vertical?this.rowHeightManager.getRenderRange(r,n,t):{topIndex:0,topBlank:0,bottomIndex:t,bottomBlank:0}}},{key:"renderTableFooter",value:function(e){var t=this.props,n=t.footerDataSource,r=void 0===n?[]:n,o=t.getRowProps,a=t.primaryKey,n=t.stickyBottom,t=Wv("footer");return"function"==typeof t?t(e,this.props,{rowProps:{onMouseEnter:this.handleRowMouseEnter,onMouseLeave:this.handleRowMouseLeave}}):Ze.a.createElement("div",{className:Je()(Eh.tableFooter,Eh.horizontalScrollContainer),style:{bottom:0===n?void 0:n}},Ze.a.createElement(cv,{tbodyHtmlTag:"tfoot",data:r,horizontalRenderInfo:e,getRowProps:o,primaryKey:a,verticalRenderInfo:{offset:0,first:0,last:r.length-1,limit:1/0}}),Ze.a.createElement("div",{className:Eh.verticalScrollPlaceholder,style:this.hasScrollY?{width:ch().width,visibility:"initial"}:void 0}))}},{key:"renderLockShadows",value:function(e){return Ze.a.createElement(Ze.a.Fragment,null,Ze.a.createElement("div",{className:Eh.lockShadowMask,style:{left:0,width:e.leftLockTotalWidth+20}},Ze.a.createElement("div",{className:Je()(Eh.lockShadow,Eh.leftLockShadow)})),Ze.a.createElement("div",{className:Eh.lockShadowMask,style:{right:0,width:e.rightLockTotalWidth+20}},Ze.a.createElement("div",{className:Je()(Eh.lockShadow,Eh.rightLockShadow)})))}},{key:"renderStickyScroll",value:function(e){var t=this.props,n=t.hasStickyScroll,r=t.stickyBottom,t=this.state.hasScroll;return Ze.a.createElement("div",{className:Je()(Eh.stickyScroll,Eh.horizontalScrollContainer),style:{display:n&&t?"block":"none",bottom:r}},Ze.a.createElement("div",{className:Eh.stickyScrollItem}))}},{key:"render",value:function(){var e=yh(this);this.lastInfo=e;var t=this.props,n=t.dataSource,r=t.className,o=t.style,a=t.hasHeader,i=t.useOuterBorder,c=t.isStickyHead,l=t.isStickyHeader,s=t.isStickyFooter,u=t.isLoading,f=t.getTableProps,d=t.footerDataSource,t=t.components,r=Je()(Eh.artTableWrapper,{"use-outer-border":i,empty:0===n.length,lock:e.hasLockColumn,"has-header":a,"sticky-header":null!=l?l:c,"has-footer":0<d.length,"sticky-footer":s,"ie-polyfill-wrapper":$p.isIE},r),o=Od()({className:r,style:o},Jp,this.artTableWrapperRef);return Ze.a.createElement(Sh,Ed()({},o),Ze.a.createElement(uv,{visible:u,LoadingIcon:t.LoadingIcon,LoadingContentWrapper:t.LoadingContentWrapper},Ze.a.createElement("div",Ed()({className:Eh.artTable},f()),this.renderTableHeader(e),this.renderTableBody(e),this.renderTableFooter(e),this.renderLockShadows(e)),this.renderStickyScroll(e)))}},{key:"componentDidMount",value:function(){this.updateDOMHelper(),this.props$=new Wp(this.props),this.initSubscriptions(),this.didMountOrUpdate();var e=this.props,t=e.cssVariables,e=e.enableCSSVariables;e=(t={variables:t||{},enableCSSVariables:e}).variables,!1!==t.enableCSSVariables&&Bv({include:"style[data-styled]",variables:Ed()({},kh,e),watch:!0,silent:!0}),null!==(e=(t=this.props).setTableWidth)&&void 0!==e&&e.call(t,this.domHelper.tableBody.clientWidth),null!==(t=(e=this.props).setTableDomHelper)&&void 0!==t&&t.call(e,this.domHelper)}},{key:"componentDidUpdate",value:function(e,t){this.updateDOMHelper(),this.props$.next(this.props),this.didMountOrUpdate(e,t)}},{key:"didMountOrUpdate",value:function(e,t){this.syncHorizontalScrollFromTableBody(),this.updateStickyScroll(),this.adjustNeedRenderLock(),this.updateRowHeightManager(),this.updateScrollLeftWhenLayoutChanged(e,t)}},{key:"updateScrollLeftWhenLayoutChanged",value:function(e,t){null!=t&&!t.hasScroll&&this.state.hasScroll&&(this.domHelper.stickyScroll.scrollLeft=0),null!=e&&(t=0<e.footerDataSource.length,e=0<this.props.footerDataSource.length,!t&&e&&(fh(this.domHelper).scrollLeft=this.domHelper.tableBody.scrollLeft))}},{key:"initSubscriptions",value:function(){var t,n,r=this,e=this.domHelper,o=e.virtual,a=e.stickyScroll;this.rootSubscription.add(oh.subscribe(function(){r.updateStickyScroll(),r.adjustNeedRenderLock()})),this.resizeSubject.pipe((t=100,void 0===n&&(n=_p),function(e){return e.lift(new Wh(t,n))})).subscribe(function(){var e,t;null!==(t=(e=r.props).setTableWidth)&&void 0!==t&&t.call(e,r.domHelper.tableBody.clientWidth)});this.resizeObserver=ah(this.domHelper.artTableWrapper,function(){r.resizeSubject.next()}),this.rootSubscription.add(lh([(e=this.domHelper,$p.isIE?e.tableHeaderMain:e.tableHeader),o,fh(this.domHelper),a],function(e){r.syncHorizontalScroll(e)}));var i,c,a=ev(this.domHelper.virtual,this.props$.pipe((c=1,function(e){return e.lift(new Yh(c))}),(i="structure-may-change",function(e){return e.lift(new Gh(i))})),this.props.virtualDebugLabel).pipe(om());this.rootSubscription.add(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return Lh(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),Fh(e=1===e.length&&tp(e[0])?e[0]:e,r).lift(new Bh(n))}([a.pipe(Pp(function(e){return e.clipRect}),am(sh)),this.props$.pipe(pm(null),function(e){return e.lift(new hm)},vm(function(e){var t=xd()(e,2),e=t[0],t=t[1];return null==e||!e.isLoading&&t.isLoading}))]).subscribe(function(e){var t=xd()(e,1)[0],e=r.domHelper.getLoadingIndicator();e&&(t=t.bottom-t.top,e.style.top="".concat(t/2,"px"),e.style.marginTop="".concat(t/2,"px"))})),this.rootSubscription.add(a.pipe(vm(function(){var e=r.lastInfo.useVirtual,t=e.horizontal,e=e.vertical;return t||e}),Pp(function(e){var t=e.clipRect,e=e.offsetY;return{maxRenderHeight:t.bottom-t.top,maxRenderWidth:t.right-t.left,offsetY:e}}),am(function(e,t){return Math.abs(e.maxRenderWidth-t.maxRenderWidth)<eh/2&&Math.abs(e.maxRenderHeight-t.maxRenderHeight)<eh/2&&Math.abs(e.offsetY-t.offsetY)<eh/2})).subscribe(function(e){r.setState(e)}))}},{key:"componentWillUnmount",value:function(){var e;null!==(e=this.resizeObserver)&&void 0!==e&&e.disconnect(),this.rootSubscription.unsubscribe(),this.resizeSubject.unsubscribe()}},{key:"updateDOMHelper",value:function(){this.domHelper=new rv(this.artTableWrapperRef.current)}},{key:"updateRowHeightManager",value:function(){var e,t=this.domHelper.getVirtualTop(),n=null!==(t=null==t?void 0:t.clientHeight)&&void 0!==t?t:0,r=-1,o=-1,a=0,i=Uv(this.domHelper.getTableRows());try{for(i.s();!(e=i.n()).done;){var c,l,s=e.value,u=Number(s.dataset.rowindex);isNaN(u)||(r=Math.max(r,u),c=s.offsetTop+n,0===(l=s.offsetHeight)&&(a+=1),o=Math.max(o,c+l),this.rowHeightManager.updateRow(u,c,l))}}catch(e){i.e(e)}finally{i.f()}-1!==r&&0===a&&o<this.state.offsetY+this.state.maxRenderHeight&&this.getVerticalRenderRange(this.lastInfo.useVirtual).bottomIndex-1>r&&this.forceUpdate()}},{key:"adjustNeedRenderLock",value:function(){var e=this.state.needRenderLock,t=this.lastInfo,n=_d()(t);t.hasLockColumn?e!==(n=th(Sd()(n=n.full).call(n,function(e){return e.width}))>this.domHelper.artTable.clientWidth)&&this.setState({needRenderLock:n}):e&&this.setState({needRenderLock:!1})}}]),n}(Ze.a.Component);Gv.defaultProps={hasHeader:!0,isStickyHeader:!0,stickyTop:0,footerDataSource:[],isStickyFooter:!0,stickyBottom:0,hasStickyScroll:!0,stickyScrollHeight:"auto",useVirtual:"auto",estimatedRowHeight:48,isLoading:!1,components:{},getTableProps:Vh,getRowProps:Vh,dataSource:[],useOuterBorder:!0};n(825);function Xv(e,t){return e===t}function $v(){return function(e){var m=e.getDataSource();return e.mapColumns(xh(function(e,t){var n=t.startIndex,r=t.endIndex;if(null===(t=e.features)||void 0===t||!t.autoRowSpan)return e;if(!Vd(e))return e;for(var o="function"==typeof e.features.autoRowSpan?e.features.autoRowSpan:Xv,a=[],i=0,c=null,l=null,s=0;s<m.length;s++){var u=m[s],f=av.safeGetValue(e,u,s);if(0===s||!o(c,f,l,u)){for(var d={top:i,bottom:s,left:n,right:r},p=i;p<s;p++)a.push(d);i=s}c=f,l=u}for(var h=i;h<m.length;h++)a.push({top:i,bottom:m.length,left:n,right:r});return Ed()(Ed()({},e),{getSpanRect:function(e,t,n){return a[n]}})}))}}var H=n(229),Qv=n.n(H);function Zv(n,r){var o=[];return n.forEach(function(e,t){o.push.apply(o,Ld()(r(e,t,n)))}),o}var Jv={diff:function(e,t){var n=new Yd.a(t);return zd()(e).call(e,function(e){return!n.has(e)})},merge:function(e,t){var n=new Yd.a(e);return Fd()(e).call(e,zd()(t).call(t,function(e){return!n.has(e)}))}};function e0(e){return function(){return e}}function t0(e,t){for(var n=0,r=e.length,o=[];n<r||o.length;){var a,i=e[n++]||o.pop();if(t(i,n))return i;i.children&&Md()(o).apply(o,Fd()(a=[0,0]).call(a,Ld()(i.children)))}return null}function n0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function r0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o0(e,t,n){function r(e){if(a.has(e))return a.get(e);var t={id:e,parent:null,item:null,children:[]};return a.set(e,t),t}var o,a=new Bd.a,i=n0(n);try{for(i.s();!(o=i.n()).done;){var c=o.value,l=r(c[t]),s=r(c[e]);(s.parent=l).children.push(s),s.item=c}}catch(e){i.e(e)}finally{i.f()}return function e(t){var n=[];var r,o=n0(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;0===a.children.length?n.push(a.item):n.push(Ed()(Ed()({},a.item),{children:e(a.children)}))}}catch(e){o.e(e)}finally{o.f()}return n}(Zv(zd()(n=Ad()(Qv()(a).call(a))).call(n,function(e){return null==e.parent}),function(e){return e.children}))}function a0(t,n){return function(e){return e.mapDataSource(function(e){return o0(t,n,e)})}}function i0(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="columnHover";return function(n){function i(e){var t;n.setStateAtKey(o,e),null!==(t=r.onChangeHoverColIndex)&&void 0!==t&&t.call(r,e)}var e,c=null!==(e=r.hoverColor)&&void 0!==e?e:"var(--hover-bgcolor)",l=null!==(e=null!==(e=null!==(e=r.hoverColIndex)&&void 0!==e?e:n.getStateAtKey(o))&&void 0!==e?e:r.defaultHoverColIndex)&&void 0!==e?e:-1;return n.mapColumns(xh(function(e,t){var r={start:t.startIndex,end:t.endIndex};if(!Vd(e))return e;var o=r.start<=l&&l<r.end,a=e.getCellProps;return Ed()(Ed()({},e),{getCellProps:function(e,t,n){return Dd(null==a?void 0:a(e,t,n),{style:{"--bgcolor":o?c:void 0},onMouseEnter:function(){i(r.start)},onMouseLeave:function(){i(-1)}})}})}))}}var c0={start:-1,end:-1};function l0(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="columnHover";return function(n){function i(e){var t;n.setStateAtKey(o,e),null!==(t=r.onChangeHoverRange)&&void 0!==t&&t.call(r,e)}var e,c=null!==(e=null!==(e=null!==(e=r.hoverRange)&&void 0!==e?e:n.getStateAtKey(o))&&void 0!==e?e:r.defaultHoverRange)&&void 0!==e?e:c0,l=null!==(e=r.hoverColor)&&void 0!==e?e:"var(--hover-bgcolor)",s=null!==(e=r.headerHoverColor)&&void 0!==e?e:"var(--header-hover-bgcolor)";return n.mapColumns(xh(function(e,t){var r={start:t.startIndex,end:t.endIndex},o=r.end>c.start&&c.end>r.start;if(!Vd(e))return null==s?e:Ed()(Ed()({},e),{headerCellProps:Dd(e.headerCellProps,{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--header-bgcolor":o?s:void 0}})});var a=e.getCellProps;return Ed()(Ed()({},e),{headerCellProps:Dd(e.headerCellProps,{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--header-bgcolor":o?s:void 0}}),getCellProps:function(e,t,n){return Dd(null==a?void 0:a(e,t,n),{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--bgcolor":o?l:void 0}})}})}))}}function s0(){var y=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(a){var i="multiSelect",c=a.ctx.components.Checkbox;if(null==c)throw new Error("使用 multiSelect 之前需要设置 pipeline.ctx.components.Checkbox");var l=a.ensurePrimaryKey("multiSelect"),s=null!==(r=y.isDisabled)&&void 0!==r?r:e0(!1),u=null!==(r=y.clickArea)&&void 0!==r?r:"checkbox",f=null!==(n=null!==(r=null!==(r=y.value)&&void 0!==r?r:null===(n=a.getStateAtKey(i))||void 0===n?void 0:n.value)&&void 0!==r?r:y.defaultValue)&&void 0!==n?n:[],d=null!==(r=null!==(n=null!==(r=y.lastKey)&&void 0!==r?r:null===(e=a.getStateAtKey(i))||void 0===e?void 0:e.lastKey)&&void 0!==n?n:y.defaultLastKey)&&void 0!==r?r:"",p=function(e,t,n,r){var o;null!==(o=y.onChange)&&void 0!==o&&o.call(y,e,t,n,r),a.setStateAtKey(i,{value:e,lastKey:t},{keys:n,action:r})},e=a.getDataSource(),h=new Yd.a,m=[];e.forEach(function(e,t){var n=av.safeGetRowKey(l,e,t);h.add(n),s(e,t)||m.push(n)});var t,n,r,v=new Yd.a(f);return y.checkboxColumn&&!0===y.checkboxColumn.hidden||(t=0<m.length&&m.every(function(e){return v.has(e)}),n=m.some(function(e){return v.has(e)}),r=Ze.a.createElement(c,{checked:t,indeterminate:!t&&n,onChange:function(e){t?p(Jv.diff(f,m),"",m,"uncheck-all"):p(Jv.merge(f,m),"",m,"check-all")}}),e=Ed()(Ed()({name:"是否选中",title:r,width:50,align:"center"},y.checkboxColumn),{getCellProps:function(e,t,n){var r,o,a,i=av.safeGetRowKey(l,t,n),c={},e=null===(o=null===(r=y.checkboxColumn)||void 0===r?void 0:r.getCellProps)||void 0===o?void 0:o.call(r,e,t,n);return h.has(i)&&"cell"===u&&(a=v.has(i),c={style:{cursor:(n=s(t,n))?"not-allowed":"pointer"},onClick:n?void 0:function(e){y.stopClickEventPropagation&&e.stopPropagation(),g(a,i,e.shiftKey)}}),Dd(e,c)},render:function(e,t,n){var r=av.safeGetRowKey(l,t,n),o=v.has(r);return Ze.a.createElement(c,{checked:o,disabled:s(t,n),onChange:"checkbox"===u?function(e,t){e=null!==(t=null==t?void 0:t.nativeEvent)&&void 0!==t?t:e.nativeEvent;e&&(y.stopClickEventPropagation&&e.stopPropagation(),g(o,r,e.shiftKey))}:void 0})}}),r=jd()(n=a.getColumns()).call(n),"start"===(null!==(n=y.checkboxPlacement)&&void 0!==n?n:"start")?r.unshift(e):r.push(e),a.columns(r)),a.appendRowPropsGetter(function(e,t){var n=av.safeGetRowKey(l,e,t);if(h.has(n)){var r,o,a={},i=v.has(n);return y.highlightRowWhenSelected&&i&&(r="highlight"),"row"===u&&(s(e,t)||(a.cursor="pointer",o=function(e){y.stopClickEventPropagation&&e.stopPropagation(),g(i,n,e.shiftKey)})),{className:r,style:a,onClick:o}}}),a;function g(e,t,n){var r,o=[t];n&&d&&(n=(r=m.indexOf(d))<(n=m.indexOf(t))?[r,n]:[n,r],n=(r=xd()(n,2))[0],r=r[1],o=jd()(m).call(m,n,r+1)),e?p(Jv.diff(f,o),t,o,"uncheck"):p(Jv.merge(f,o),t,o,"check")}}}var H=n(141),u0=n.n(H),H=n(100),f0=n.n(H),d0=E.c.div(b()(["\n display: inline-flex;\n align-items: center;\n"])),p0=Object(E.c)(d0)(b()(["\n &."," {\n cursor: default;\n }\n\n .expansion-icon {\n fill: #999;\n flex: 0 0 16px;\n transition: transform 200ms;\n\n &."," {\n transform-origin: center center;\n transform: rotate(90deg);\n }\n }\n"]),Eh.leaf,Eh.expanded);var h0={Loading:function(e){return Ze.a.createElement("svg",Ed()({width:"16",height:"16",fill:"currentColor",viewBox:"0 0 1024 1024"},e),Ze.a.createElement("path",{d:"M512 74.667c-17.067 0-32 14.933-32 32V256c0 17.067 14.933 32 32 32s32-14.933 32-32V106.667c0-17.067-14.933-32-32-32zm181.333 288c8.534 0 17.067-2.134 23.467-8.534L821.333 249.6c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L672 309.333c-12.8 12.8-12.8 32 0 44.8 4.267 6.4 12.8 8.534 21.333 8.534zm224 117.333H768c-17.067 0-32 14.933-32 32s14.933 32 32 32h149.333c17.067 0 32-14.933 32-32s-14.933-32-32-32zM714.667 669.867c-12.8-12.8-32-12.8-44.8 0s-12.8 32 0 44.8L774.4 819.2c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L714.667 669.867zM512 736c-17.067 0-32 14.933-32 32v149.333c0 17.067 14.933 32 32 32s32-14.933 32-32V768c0-17.067-14.933-32-32-32zm-202.667-66.133L204.8 774.4c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533l104.534-104.533c12.8-12.8 12.8-32 0-44.8s-36.267-12.8-46.934 0zM288 512c0-17.067-14.933-32-32-32H106.667c-17.067 0-32 14.933-32 32s14.933 32 32 32H256c17.067 0 32-14.933 32-32zm-40.533-309.333c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8L307.2 352c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L247.467 202.667z"}))},CaretDown:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 32 32"},e),Ze.a.createElement("path",{d:"M24 12L16 22 8 12z"}))},CaretRight:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 32 32"},e),Ze.a.createElement("path",{d:"M12 8L22 16 12 24z"}))},Info:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 16 16"},e),Ze.a.createElement("path",{d:"M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"}),Ze.a.createElement("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}))}},m0=E.c.div(b()(["\n &.","{\n border: 1px solid #e9ecf1;\n border-radius: 2px;\n background-color: #Fff;\n box-shadow: 0px 0px 5px 0px rgb(154 154 154 / 50%);\n cursor: default;\n font-size: 13px;\n position:absolute;\n z-index: 1050;\n width:120px;\n }\n\n .","{\n width:100%;\n display: table;\n }\n\n ."," .","{\n display: table-row;\n color: #666666;\n }\n\n ."," .","{\n background-color: #f5f5f5;\n }\n\n ."," ."," .","{\n display: table-cell;\n padding: 5px 8px;\n }\n ."," .",".","{\n opacity: .5;\n }\n\n"]),Ch.menu,Ch.menuList,Ch.menuList,Ch.menuOption,Ch.menuList,Ch.menuOptionActive,Ch.menuList,Ch.menuOption,Ch.menuOptionText,Ch.menuList,Ch.menuOption,Ch.menuOptionDisable),v0=Rd()("row-detail"),g0=function(){return Ze.a.createElement("div",{style:{margin:"8px 24px"}},Ze.a.createElement("b",{style:{color:"indianred"}},"设置 ",Ze.a.createElement("code",null,"rowDetail.renderDetail")," 来自定义详情内容"))};function y0(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(s){function n(e,t,n){var r;null!==(r=b.onChangeOpenKeys)&&void 0!==r&&r.call(b,e,t,n),s.setStateAtKey("rowDetail",e,{key:t,action:n})}var e,t,u=null!==(e=b.rowDetailMetaKey)&&void 0!==e?e:v0,f=s.ensurePrimaryKey("rowDetail"),d=s.ctx.indents,p=d.iconIndent+d.iconWidth+d.iconGap,h=null!==(e=b.clickArea)&&void 0!==e?e:"cell",r=null!==(e=b.getDetailKey)&&void 0!==e?e:function(e,t){return av.safeGetRowKey(f,e,t)+"_detail"},m=null!==(e=b.renderDetail)&&void 0!==e?e:g0,v=null!==(e=b.hasDetail)&&void 0!==e?e:e0(!0),o=null!==(t=null!==(e=null!==(e=b.openKeys)&&void 0!==e?e:s.getStateAtKey("rowDetail"))&&void 0!==e?e:b.defaultOpenAll?Sd()(t=zd()(t=s.getDataSource()).call(t,v)).call(t,function(e,t){return av.safeGetRowKey(f,e,t)}):b.defaultOpenKeys)&&void 0!==t?t:[],g=new Yd.a(o),y=function(t){var e;g.has(t)?n(zd()(o).call(o,function(e){return e!==t}),t,"collapse"):n(Fd()(e=[]).call(e,Ld()(o),[t]),t,"expand")},a="string"==typeof f?f:u.toString()+"PrimaryKey";return s.dataSource(Zv(s.getDataSource(),function(e,t){return g.has(av.safeGetRowKey(f,e,t))?[e,Ed()(Ed()(Od()({},u,!0),e),Od()({},a,r(e,t)))]:[e]})).columns(function(e){if(0===e.length)return e;var c=0;if(b.expandColumnCode&&(c=f0()(e).call(e,function(e){return e.code===b.expandColumnCode}))<0)return Hd.warn("没找到可展开的列,请检查设置的展开列code"),e;var l=e[c],t=Ld()(e),e=u0()(t),o=e[0];jd()(e).call(e,1);return t[0]=Ed()(Ed()({},o),{render:function(e,t,n){if(t[u]){var r=Wv("rowDetail");return"function"==typeof r?r({row:t,rowIndex:n,domHelper:s.ref.current.domHelper,renderDetail:m}):m(t,n)}return av.safeRender(o,t,n)},getSpanRect:function(e,t,n){if(t[u])return{top:n,bottom:n+1,left:0,right:qd(s.getColumns(),"leaf-only").length}}}),t[c]=Ed()(Ed()({},l),{title:Ze.a.createElement("div",{style:{display:"inline-block",marginLeft:p}},av.safeRenderHeader(l)),render:function(e,t,n){if(t[u]){if(0!==c)return;var r=Wv("rowDetail");return"function"==typeof r?r({row:t,rowIndex:n,domHelper:s.ref.current.domHelper,renderDetail:m}):m(t,n)}var o=av.safeRender(l,t,n);if(!v(t,n))return Ze.a.createElement(d0,{style:{marginLeft:p}},o);function a(e){b.stopClickEventPropagation&&e.stopPropagation(),y(i)}var i=av.safeGetRowKey(f,t,n),r=g.has(i),t=r?Eh.expanded:Eh.collapsed,n=b.expandIcon;return Ze.a.createElement(p0,{className:Je()("expansion-cell",t),style:{cursor:"content"===h?"pointer":void 0},onClick:"content"===h?a:void 0},b.expandIcon?Ze.a.createElement(n,{expanded:r,onClick:"icon"===h?a:void 0}):Ze.a.createElement(h0.CaretRight,{style:{cursor:"icon"===h?"pointer":void 0,marginLeft:d.iconIndent,marginRight:d.iconGap},className:Je()("expansion-icon",t),onClick:"icon"===h?a:void 0}),o)},getCellProps:"cell"===h?function(e,t,n){var r;if(t[u])return{style:Ed()({"--cell-padding":"0",overflow:"hidden"},b.detailCellStyle)};e=null===(r=l.getCellProps)||void 0===r?void 0:r.call(l,e,t,n);return v(t,n)?Dd(e,{onClick:function(e){b.stopClickEventPropagation&&e.stopPropagation(),y(av.safeGetRowKey(f,t,n))},style:{cursor:"pointer"}}):e}:l.getCellProps,getSpanRect:function(e,t,n){if(t[u])return{top:n,bottom:n+1,left:0,right:qd(s.getColumns(),"leaf-only").length}}}),t}(s.getColumns())).appendRowPropsGetter(function(e){if(e[u])return{className:"no-hover","data-row-detail-key":e[a]}})}}var b0=Rd()("row-grouping-meta");function w0(e){return null==e[b0]?{isGroupHeader:!1,expandable:!1}:{isGroupHeader:!0,expandable:e[b0].expandable}}function x0(e){if(w0(e).isGroupHeader)return{className:"alternative"}}function O0(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(o){var e,t,a="rowGrouping",i=o.ctx.indents,c=i.iconIndent+i.iconWidth+i.iconGap,s=o.ensurePrimaryKey("rowGrouping");if("string"!=typeof s)throw new Error("rowGrouping 仅支持字符串作为 primaryKey");var u=null!==(t=null!==(e=null!==(e=p.openKeys)&&void 0!==e?e:o.getStateAtKey(a))&&void 0!==e?e:p.defaultOpenAll?Sd()(t=o.getDataSource()).call(t,function(e){return e[s]}):p.defaultOpenKeys)&&void 0!==t?t:[],f=new Yd.a(u),d=function(e,t,n){var r;null!==(r=p.onChangeOpenKeys)&&void 0!==r&&r.call(p,e,t,n),o.setStateAtKey(a,e,{key:t,action:n})};return o.mapDataSource(function(e){return Zv(e,function(e){var t=[(t=e,Ed()(Od()({},b0,{expandable:!Vd(t)}),t))];return t=f.has(e[s])&&Array.isArray(e.children)?Fd()(t).call(t,e.children):t})}).mapColumns(function(e){if(0===e.length)return e;var r=qd(e,"leaf-only").length,t=u0()(e),l=t[0],e=jd()(t).call(t,1);return Fd()(t=[Ed()(Ed()({},l),{title:Ze.a.createElement("div",{style:{display:"inline-block",marginLeft:c}},av.safeRenderHeader(l)),render:function(e,t,n){var r=av.safeRender(l,t,n),o=w0(t);if(!o.isGroupHeader||!o.expandable){n=c+(o.isGroupHeader?0:i.indentSize);return Ze.a.createElement(d0,{style:{marginLeft:n}},o.isGroupHeader&&null!==(a=t.groupTitle)&&void 0!==a?a:r)}var a=f.has(t[s])?Eh.expanded:Eh.collapsed;return Ze.a.createElement(p0,{className:Je()("expansion-cell",a)},Ze.a.createElement(h0.CaretRight,{className:Je()("expansion-icon",a),style:{marginLeft:i.iconIndent,marginRight:i.iconGap}}),null!==(t=t.groupTitle)&&void 0!==t?t:r)},getCellProps:function(e,t,n){var r=w0(t);if(r.isGroupHeader){var o,a=r.expandable,i=t[s],c=f.has(i);return a&&(o=function(e){p.stopClickEventPropagation&&e.stopPropagation(),c?d(zd()(u).call(u,function(e){return e!==i}),i,"collapse"):d(Fd()(e=[]).call(e,Ld()(u),[i]),i,"expand")}),Dd(null===(r=l.getCellProps)||void 0===r?void 0:r.call(l,e,t,n),{onClick:o,style:{cursor:a?"pointer":void 0}})}},getSpanRect:function(e,t,n){if(w0(t).isGroupHeader)return{top:n,bottom:n+1,left:0,right:r}}})]).call(t,Ld()(e))}).appendRowPropsGetter(x0)}}function E0(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(n){var e,o=n.ctx.components.Radio;if(null==o)throw new Error("使用 singleSelect 之前需要通过 pipeline context 设置 components.Radio");function i(e){var t;null!==(t=f.onChange)&&void 0!==t&&t.call(f,e),n.setStateAtKey(r,e)}var r="singleSelect",c=null!==(a=f.clickArea)&&void 0!==a?a:"radio",l=null!==(t=f.isDisabled)&&void 0!==t?t:e0(!1),s=n.ensurePrimaryKey("singleSelect"),u=null!==(a=null!==(e=f.value)&&void 0!==e?e:n.getStateAtKey(r))&&void 0!==a?a:f.defaultValue,t=Ed()(Ed()({name:"",width:50,align:"center"},f.radioColumn),{getCellProps:function(e,t,n){var r,o,e=null===(o=null===(r=f.radioColumn)||void 0===r?void 0:r.getCellProps)||void 0===o?void 0:o.call(r,e,t,n);if("cell"!==c)return e;var a=av.safeGetRowKey(s,t,n),n=l(t,n);return Dd(e,{style:{cursor:n?"not-allowed":"pointer"},onClick:n?void 0:function(e){f.stopClickEventPropagation&&e.stopPropagation(),i(a)}})},render:function(e,t,n){var r=av.safeGetRowKey(s,t,n);return Ze.a.createElement(o,{checked:u===r,disabled:l(t,n),onChange:"radio"===c?function(e,t){e=null!==(t=null==t?void 0:t.nativeEvent)&&void 0!==t?t:null==e?void 0:e.nativeEvent;e&&f.stopClickEventPropagation&&e.stopPropagation(),i(r)}:void 0})}}),a=jd()(e=n.getColumns()).call(e);return"start"===(null!==(e=f.radioPlacement)&&void 0!==e?e:"start")?a.unshift(t):a.push(t),n.columns(a),n.appendRowPropsGetter(function(e,t){var n,r,o=av.safeGetRowKey(s,e,t),a={};return f.highlightRowWhenSelected&&u===o&&(n="highlight"),"row"!==c||l(e,t)||(a.cursor="pointer",r=function(e){f.stopClickEventPropagation&&e.stopPropagation(),i(o)}),{className:n,style:a,onClick:r}}),n}}var H=n(417),C0=n.n(H);function k0(n,r){return function t(e){if(!Array.isArray(n))return n;return C0()(e=Sd()(e).call(e,function(e){return Vd(e)?e:Ed()(Ed()({},e),{children:t(e.children)})})).call(e,r)}(n)}function S0(e,t){if(null==e)return 1;if(null==t)return-1;if("number"==typeof e&&"number"==typeof t)return e-t;if("string"==typeof e&&"string"==typeof t)return e<t?-1:t<e?1:0;if(Array.isArray(e)&&Array.isArray(t)){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=S0(e[r],t[r]);if(0!==o)return o}return e.length-t.length}return 0}function j0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return P0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function P0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N0(e){var t=e.size,n=void 0===t?32:t,r=e.style,t=e.className,e=e.order;return Ze.a.createElement("svg",{style:r,className:t,focusable:"false",preserveAspectRatio:"xMidYMid meet",width:n,height:n,viewBox:"0 0 32 32","aria-hidden":"true",fill:"currentColor"},Ze.a.createElement("path",{fill:"asc"===e?"currentColor":"#bfbfbf",transform:"translate(0, 4)",d:"M8 8L16 0 24 8z"}),Ze.a.createElement("path",{fill:"desc"===e?"currentColor":"#bfbfbf",transform:"translate(0, -4)",d:"M24 24L16 32 8 24z "}))}function D0(e){var t=e.children,n=e.column,r=e.onToggle,o=e.sortOrder,a=e.sortIndex,e=e.sortOptions,n="right"===n.align?"flex-end":"center"===n.align?"center":"flex-start";return Ze.a.createElement(T0,{onClick:r,style:{justifyContent:n}},t,Ze.a.createElement(N0,{style:{userSelect:"none",marginLeft:2,flexShrink:0},className:Je()((t={},Od()(t,Eh.tableSortIcon,!0),Od()(t,"active","desc"===o||"asc"===o),t)),size:16,order:o}),"multiple"===e.mode&&-1!==a&&Ze.a.createElement("div",{style:{userSelect:"none",marginLeft:2,color:"#666",flex:"0 0 auto",fontSize:10,fontFamily:"monospace"}},a+1))}var T0=E.c.div(b()(["\n cursor: pointer;\n display: flex;\n align-items: center;\n // flex: auto;\n"])),M0="sort";function A0(){var v=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(r){function o(e,t){var n;null!==(n=v.onChangeSorts)&&void 0!==n&&n.call(v,e,t),r.setStateAtKey(M0,e)}var e=v.orders,a=void 0===e?["desc","asc","none"]:e,t=v.mode,n=void 0===t?"multiple":t,e=v.SortHeaderCell,c=void 0===e?D0:e,i=v.keepDataSource,l=v.highlightColumnWhenActive,s=v.stopClickEventPropagation,t=v.sortIconHoverShow,e=null!==(e=null!==(e=null!==(e=v.sorts)&&void 0!==e?e:r.getStateAtKey(M0))&&void 0!==e?e:v.defaultSorts)&&void 0!==e?e:[],e=zd()(e).call(e,function(e){return"none"!==e.order}),f="multiple"===n?e:jd()(e).call(e,0,1),u="multiple"===n?o:function(e,t){var n=e.length;o(jd()(e).call(e,n-1),t)},d={sorts:f,onChangeSorts:u,orders:a,mode:n,keepDataSource:i,highlightColumnWhenActive:l,stopClickEventPropagation:s,sortIconHoverShow:t},p=new Bd.a(Sd()(f).call(f,function(e,t){return[e.code,Ed()({index:t},e)]})),t=r.getDataSource(),h=r.getColumns();return r.dataSource(function(e){var t;if(i)return e;var u=new Bd.a(Sd()(t=zd()(t=qd(h,"leaf-only")).call(t,function(e){var t;return!1!==(null===(t=e.features)||void 0===t?void 0:t.sortable)&&null!=(null===(e=e.features)||void 0===e?void 0:e.sortable)})).call(t,function(e){return[e.code,e]}));return k0(e,function(e,t){var n,r=j0(f);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=o.code,i=o.order,c=u.get(a);if(null!=c){var l=c.features.sortable,s=("function"==typeof l?l:S0)(av.safeGetValue(c,e,-1),av.safeGetValue(c,t,-1),e,t);if(0!==s)return s*("asc"===i?1:-1)}}}catch(e){r.e(e)}finally{r.f()}return 0})}(t)),r.columns((t=h,Sd()(t).call(t,function e(r){var t=Ed()({},r);var n=r.code&&((null===(a=r.features)||void 0===a?void 0:a.sortable)||p.has(r.code));var o=n&&p.has(r.code);{var a;n&&(i=-1,a="none",o&&(n=p.get(r.code),o=n.order,n=n.index,a=o,i=n,l&&(t.headerCellProps=Dd(r.headerCellProps,{style:{background:"var(--header-highlight-bgcolor)"}}),t.getCellProps=function(e,t,n){n=av.safeGetCellProps(r,t,n);return Dd(n,{style:{background:"var(--highlight-bgcolor)"}})})),i=Ze.a.createElement(c,{onToggle:function(e){s&&e.stopPropagation(),m(r.code)},sortOrder:a,column:r,sortIndex:i,sortOptions:d},av.safeRenderHeader(Ed()(Ed()({},r),{title:r.title&&r.title[0]?r.title[0]:r.title}))),t.title&&t.title[0]?t.title[0]=i:t.title=i)}{var i;Vd(r)||(t.children=Sd()(i=r.children).call(i,e))}return t}))),r;function m(t){var e,n,r,o=p.get(t);null==o?(r={code:t,order:a[0]},u(Fd()(f).call(f,[r]),r)):(e=f0()(f).call(f,function(e){return e.code===t}),n=jd()(f).call(f,0,e+1),o=function(e){e=a.indexOf(e);return a[e===a.length-1?0:e+1]}(o.order),r={code:t,order:o},"none"===o?n.pop():n[e]=Ed()(Ed()({},n[e]),{order:o}),u(n,r))}}}var R0=E.c.div(b()(["\n display: flex;\n align-items: center;\n\n .tip-icon-wrapper {\n margin-left: 2px;\n }\n\n .tip-icon {\n display: flex;\n fill: currentColor;\n }\n"]));function I0(){return function(e){var n=e.ctx.components.Balloon,r=e.ctx.components.Tooltip;if(null==n&&null==r)throw new Error("使用 tips 之前需要通过 pipeline context 设置 components.Balloon / components.Tooltip");return e.mapColumns(xh(function(e){if(null===(t=e.features)||void 0===t||!t.tips)return e;var t="right"===e.align?"flex-end":"center"===e.align?"center":"flex-start";return Ed()(Ed()({},e),{title:Ze.a.createElement(R0,{style:{justifyContent:t}},av.safeRenderHeader(e),n?Ze.a.createElement(n,{closable:!1,trigger:Ze.a.createElement("div",{className:"tip-icon-wrapper"},Ze.a.createElement(h0.Info,{className:"tip-icon"}))},e.features.tips):Ze.a.createElement(r,{title:e.features.tips},Ze.a.createElement("div",{className:"tip-icon-wrapper"},Ze.a.createElement(h0.Info,{className:"tip-icon"}))))})}))}}function L0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function _0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F0=Rd()("treeMetaSymbol");function z0(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(o){var e,t=o.ctx,f=o.ensurePrimaryKey("treeMode");if("string"!=typeof f)throw new Error("treeMode 仅支持字符串作为 primaryKey");function n(e,t,n){var r;null!==(r=a.onChangeOpenKeys)&&void 0!==r&&r.call(a,e,t,n),o.setStateAtKey("treeMode",e,{key:t,action:n})}var r=null!==(e=null!==(e=null!==(e=a.openKeys)&&void 0!==e?e:o.getStateAtKey("treeMode"))&&void 0!==e?e:a.defaultOpenKeys)&&void 0!==e?e:[],d=new Yd.a(r),l=function(t){var e;d.has(t)?n(zd()(r).call(r,function(e){return e!==t}),t,"collapse"):n(Fd()(e=[]).call(e,Ld()(r),[t]),t,"expand")},p=null!==(e=a.isLeafNode)&&void 0!==e?e:Vd,s=null!==(e=a.clickArea)&&void 0!==e?e:"cell",h=null!==(e=a.treeMetaKey)&&void 0!==e?e:F0,u=Boolean(a.stopClickEventPropagation),m=t.indents.iconWidth,v=null!==(e=a.iconIndent)&&void 0!==e?e:t.indents.iconIndent,g=null!==(e=a.iconGap)&&void 0!==e?e:t.indents.iconGap,y=null!==(e=a.indentSize)&&void 0!==e?e:t.indents.indentSize,b=a.icon;return o.mapDataSource(function(e){var u=[];return function e(t,n){if(null!=t){var r,o=L0(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,i=a[f],c=d.has(i),l=p(a,{depth:n,expanded:c,rowKey:i}),s={depth:n,isLeaf:l,expanded:c,rowKey:i};u.push(Ed()(Od()({},h,s),a)),!l&&c&&e(a.children,n+1)}}catch(e){o.e(e)}finally{o.f()}}}(e,0),u}).mapColumns(function(e){if(0===e.length)return e;var t=u0()(e),c=t[0],e=jd()(t).call(t,1);return Fd()(t=[Ed()(Ed()({},c),{title:Ze.a.createElement("span",{style:{marginLeft:v+m+g}},av.safeRenderHeader(c)),render:function(e,t,n){var r=av.safeRender(c,t,n);if(null==t[h])return r;var o=t[h],a=o.rowKey,n=o.depth,t=o.isLeaf,o=o.expanded,n=v+n*y;if(t)return Ze.a.createElement(d0,{className:Je()("expansion-cell",Eh.leaf)},Ze.a.createElement("span",{style:{marginLeft:n+m+g}},r));function i(e){u&&e.stopPropagation(),l(a)}t=o?Eh.expanded:Eh.collapsed;return Ze.a.createElement(p0,{className:Je()("expansion-cell",t),style:{cursor:"content"===s?"pointer":void 0},onClick:"content"===s?i:void 0},b?Ze.a.createElement(b,{expanded:o,style:{cursor:"icon"===s?"pointer":void 0,marginLeft:n,marginRight:g,width:m},onClick:"icon"===s?i:void 0}):Ze.a.createElement(h0.CaretRight,{className:Je()("expansion-icon",t),style:{cursor:"icon"===s?"pointer":void 0,marginLeft:n,marginRight:g},onClick:"icon"===s?i:void 0}),r)},getCellProps:"cell"===s?function(e,t,n){var r=av.safeGetCellProps(c,t,n);if(null==t[h])return r;var n=t[h],t=n.isLeaf,o=n.rowKey;return t?r:Dd(r,{onClick:function(e){u&&e.stopPropagation(),l(o)},style:{cursor:"pointer"}})}:c.getCellProps})]).call(t,Ld()(e))})}}function B0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return H0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function H0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V0=kd()(function e(t){Cd()(this,e),Ed()(this,t)}),W0=function(){function t(e){Cd()(this,t),this.opts=e,this.valueSet=new Yd.a(e.value),this.initWrapperTree()}return kd()(t,[{key:"initWrapperTree",value:function(){var c=this,l=this.opts.getNodeValue;this.rootWrapper=new V0({root:!0,children:[]}),this.wrapperMap=new Bd.a,function e(t,n){var r,o=B0(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,i=new V0({parent:t,node:a,checked:c.valueSet.has(l(a))});c.wrapperMap.set(l(a),i),t.children.push(i),Vd(a)||(i.children=[],e(i,a.children))}}catch(e){o.e(e)}finally{o.f()}}(this.rootWrapper,this.opts.tree)}},{key:"value",get:function(){return this.opts.value}},{key:"isIndeterminate",value:function(e){return!1}},{key:"isChecked",value:function(e){return this.valueSet.has(e)}},{key:"getValueAfterCheck",value:function(e){return this.isChecked(e)?this.value:Jv.merge(this.value,[e])}},{key:"getValueAfterUncheck",value:function(e){return this.isChecked(e)?Jv.diff(this.value,[e]):this.value}},{key:"getValueAfterToggle",value:function(e){return this.isChecked(e)?this.getValueAfterUncheck(e):this.getValueAfterCheck(e)}},{key:"getNode",value:function(e){return null===(e=this.wrapperMap.get(e))||void 0===e?void 0:e.node}},{key:"getCleanValue",value:function(){return this.value}}]),t}();function U0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return q0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function q0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Y0=kd()(function e(t){Cd()(this,e),Ed()(this,t)}),K0=function(){function o(e){var r=this;Cd()(this,o),this.isDetached=function(e){var t,n;return null!==(e=null===(n=(t=r.opts).isDetached)||void 0===n?void 0:n.call(t,e))&&void 0!==e&&e},this.opts=e,this.valueSet=new Yd.a(e.value),this.initWrapperTree()}return kd()(o,[{key:"value",get:function(){return this.opts.value}},{key:"initWrapperTree",value:function(){var m=new Yd.a(this.value);this.rootWrapper=new Y0({root:!0,children:[]}),this.wrapperMap=new Bd.a;var v=this.opts.getNodeValue,g=this.isDetached,y=this.wrapperMap;!function e(t,n,r){t.allChildrenChecked=!0;0;var o,a=U0(n);try{for(a.s();!(o=a.n()).done;){var i=o.value,c=g(i),l=m.has(v(i));l&&!c&&(t.anyDescendentsChecked=!0);var s=!c&&r,u=l||s,f=new Y0({parent:t,node:i,checked:u,exactChecked:l,parentChecked:s,anyDescendentsChecked:u,detached:c});if(y.set(v(i),f),t.children.push(f),!Vd(i)&&(f.children=[],e(f,i.children,u),f.anyDescendentsChecked&&!c&&(t.anyDescendentsChecked=!0),f.allChildrenChecked)){f.checked=!0;var d,p=U0(f.children);try{for(p.s();!(d=p.n()).done;){var h=d.value;h.detached||(h.parentChecked=!0)}}catch(e){p.e(e)}finally{p.f()}}f.checked||c||(t.allChildrenChecked=!1)}}catch(e){a.e(e)}finally{a.f()}}(this.rootWrapper,this.opts.tree,!1)}},{key:"isIndeterminate",value:function(e){e=this.wrapperMap.get(e);return!e.checked&&e.anyDescendentsChecked}},{key:"isChecked",value:function(e){return this.wrapperMap.get(e).checked}},{key:"getValueAfterCheck",value:function(e){if(this.isChecked(e))return this.getCleanValue();e=Jv.merge(this.value,[e]);return new o(Ed()(Ed()({},this.opts),{value:e})).getCleanValue()}},{key:"getValueAfterUncheck",value:function(e){if(!this.isChecked(e))return this.getCleanValue();var t=this.wrapperMap.get(e),i=this.opts.getNodeValue,n=function(e){var t=[],n=e;for(;n.parentChecked&&!n.detached;){var r,o=U0(n.parent.children);try{for(o.s();!(r=o.n()).done;){var a=r.value;a===n||a.exactChecked||a.detached||t.push(i(a.node))}}catch(e){o.e(e)}finally{o.f()}n=n.parent}return t}(t),e=function(e){var a=new Yd.a,t=e;for(;;){if(a.add(i(t.node)),t.detached||!t.parentChecked)break;t=t.parent}return function e(t){if(null!=t){var n,r=U0(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;!o.detached&&o.checked&&(a.add(i(o.node)),!Vd(o)&&o.anyDescendentsChecked&&e(o.children))}}catch(e){r.e(e)}finally{r.f()}}}(e.children),a}(t),e=Jv.diff(Fd()(t=this.value).call(t,n),e);return new o(Ed()(Ed()({},this.opts),{value:e})).getCleanValue()}},{key:"getValueAfterToggle",value:function(e){return this.isChecked(e)?this.getValueAfterUncheck(e):this.getValueAfterCheck(e)}},{key:"getNode",value:function(e){return null===(e=this.wrapperMap.get(e))||void 0===e?void 0:e.node}},{key:"getCleanValue",value:function(){var t=this,e=this.opts,a=e.checkedStrategy,i=e.getNodeValue,c=zd()(e=this.value).call(e,function(e){return!t.wrapperMap.has(e)});return function e(t){var n,r=U0(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.checked&&("all"===a?c.push(i(o.node)):"parent"===a?o.parentChecked||c.push(i(o.node)):Vd(o)&&c.push(i(o.node))),Vd(o)||e(o.children)}}catch(e){r.e(e)}finally{r.f()}}(this.rootWrapper.children),c}}]),o}(),G0="treeSelect";function X0(p){return function(n){var r=n.ctx.components.Checkbox;if(null==r)throw new Error("使用 treeSelect 之前需要通过 pipeline context 设置 components.Checkbox");var o=n.ensurePrimaryKey("treeSelect");if("string"!=typeof o)throw new Error("treeSelect 仅支持字符串作为 primaryKey");function e(e){return e[o]}function a(e,t,n){return Ze.a.createElement(r,{checked:u.isChecked(e),indeterminate:u.isIndeterminate(e),disabled:!t&&c(n),onChange:"checkbox"===i||t?function(){return f(e)}:void 0})}var i=null!==(l=p.clickArea)&&void 0!==l?l:"checkbox",c=null!==(t=p.isDisabled)&&void 0!==t?t:e0(!1),t=null!==(l=p.idDetached)&&void 0!==l?l:e0(!1),l=null!==(l=null!==(l=null!==(l=p.value)&&void 0!==l?l:n.getStateAtKey(G0))&&void 0!==l?l:p.defaultValue)&&void 0!==l?l:[],s=null!=p.rootKey?[(s={},Od()(s,o,p.rootKey),Od()(s,"children",p.tree),s)]:p.tree,u=p.checkStrictly?new W0({value:l,getNodeValue:e,tree:s}):new K0({value:l,getNodeValue:e,isDetached:t,tree:s,checkedStrategy:null!==(d=p.checkedStrategy)&&void 0!==d?d:"parent"}),f=function(e){var t=u.getValueAfterToggle(e);n.setStateAtKey(G0,t),null!==(e=p.onChange)&&void 0!==e&&e.call(p,t)},t=Ed()(Ed()({name:"",width:50,align:"center",title:null!=p.rootKey?a(p.rootKey,!0):void 0},p.checkboxColumn),{render:function(e,t){return a(t[o],!1,t)},getCellProps:function(e,t){var n=t[o];if("cell"===i)return c(t)?{style:{cursor:"not-allowed"}}:{style:{cursor:"pointer"},onClick:function(e){p.stopClickEventPropagation&&e.stopPropagation(),f(n)}}}}),d=jd()(s=n.getColumns()).call(s);return"start"===(null!==(s=p.checkboxPlacement)&&void 0!==s?s:"start")?d.unshift(t):d.push(t),n.columns(d),"row"===i&&n.appendRowPropsGetter(function(t){if(!c(t))return{style:{cursor:"pointer"},onClick:function(e){p.stopClickEventPropagation&&e.stopPropagation(),f(t[o])}}}),p.highlightRowWhenSelected&&n.appendRowPropsGetter(function(e){if(u.isChecked(e[o]))return{className:"highlight"}}),n}}var $0="columnDrag",Q0=30;function Z0(e){e.stopPropagation()}function J0(){var u=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(P){var n=P.getStateAtKey($0,{}).cloumnsTranslateData,e=P.getColumns(),a=P.ref.current.domHelper&&P.ref.current.domHelper.tableBody;return P.columns(zd()(e).call(e,function(e){return e})),P.mapColumns(xh(function(j,e){var t=e.path,e=e.isLeaf,r=n?{transition:".3s",transform:"translate3d(".concat(n[j.code],"px, 0px, 0px)")}:{},o=j.getCellProps;return j.lock||!j.code?j:Ed()(Ed()({},j),{getCellProps:function(e,t,n){return Dd(null==o?void 0:o(e,t,n),{style:r})},headerCellProps:Dd(j.headerCellProps,{onMouseDown:!e||1<t.length?void 0:function(e){var g,y,b,s,w,x,O,E,n,C,k,S;function r(e){var t={clientX:e.clientX,clientY:e.clientY},n=P.ref.current.domHelper.virtual.scrollLeft-C,r=x-n;if(k(t),!(e.clientX-r<20)){!1===S&&(S=!0,w.addEventListener("click",Z0)),e.stopPropagation(),document.body.style.userSelect="none",w.style.cursor="move",b={},E.forEach(function(e){b[e.code]=0});for(var o,a=0,i=tg(y[a]);i<e.clientX-r&&a<y.length-1;)i+=tg(y[++a]);y.forEach(function(e,t){e.code===j.code&&(o=t)});var c=y[o],l=a;if(a<o)for(;l<o;){var s=y[l],u=s.code,f=s.lock,d=s.width,s=s.children;eg({code:u,lock:f})&&(b[u]+=c.width,Vd(y[l])?b[c.code]-=d:(b[c.code]-=tg(y[l]),ng(s,b,c.width)),g=!0),l++}else if(o<a)for(;o<l;){var p=y[l],h=p.code,m=p.lock,v=p.width,p=p.children;eg({code:h,lock:m})&&(b[h]-=c.width,Vd(y[l])?b[c.code]+=v:(b[c.code]+=tg(y[l]),ng(p,b,c.width,!0)),g=!0),l--}window.requestAnimationFrame(function(){P.setStateAtKey($0,{cloumnsTranslateData:b}),O=[o,a]})}}0===e.button&&(g=!1,y=P.getColumns(),b=P.getStateAtKey($0,{}).cloumnsTranslateData,s={},y.forEach(function(e,t){s[e.code]=t}),w=e.currentTarget,x=e.currentTarget.parentElement.getClientRects()[0].left,O=[],E=qd(y),n=a.getBoundingClientRect(),C=P.ref.current.domHelper.virtual.scrollLeft,S=!(k=function(e){var t=e.clientX,e=n.left;e+n.width<=t+Q0&&(P.ref.current.domHelper.virtual.scrollLeft+=Q0),t-Q0<=e&&(P.ref.current.domHelper.virtual.scrollLeft-=Q0)}),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",function e(t){t.stopPropagation(),document.body.removeEventListener("mousemove",r),document.body.removeEventListener("mouseup",e),window.requestAnimationFrame(function(){w.removeEventListener("click",Z0),S=!1,w=null;var e=O,t=xd()(e,2),n=t[0],e=t[1],r=y[n],o=e;if(e<n)for(;o<n;){var a=y[o],i=a.code;eg({code:i,lock:a.lock})&&(s[i]+=1,--s[r.code],g=!0),o++}else if(n<e)for(;n<o;){var c=y[o],l=c.code;eg({code:l,lock:c.lock})&&(--s[l],s[r.code]+=1,g=!0),o--}(t=u.onColumnDragStopped)&&(e=zd()(e=function(e,t){for(var n=new Array(e.length),r=Ld()(e);e.length;){var o=e.pop();n[t[o.code]]=o}return zd()(n).call(n,Boolean).length!==r.length?r:n}(y,s)).call(e,function(e){return e.code!==Ph}),t(g,e)),P.setStateAtKey($0,{cloumnsTranslateData:null})}),document.body.style.userSelect="",w.style.opacity="",w.style.cursor=""}),document.body.onselectstart=function(){return!1})},style:r})})}))}}function eg(e){var t=e.lock,e=e.code;return e&&e!==Ph&&!t}function tg(e){return e.children?e.children.reduce(function(e,t){return e+tg(t)},0):e.width}function ng(e,o,a,i){e.forEach(function(e){var t=e.code,n=e.children,r=null!==(r=o[t])&&void 0!==r?r:0;o[t]=r+(i?-a:a),Vd(e)||ng(n,o,a)})}function rg(t){return function(e){return e.lift(new og(t))}}var og=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new ag(e),e=qp(this.notifier,new Up(n));return e&&!n.seenValue?(n.add(e),t.subscribe(n)):n},e}(),ag=function(t){function e(e){e=t.call(this,e)||this;return e.seenValue=!1,e}return Xd(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(f);var ig=E.c.div(b()(['\n position: absolute;\n top: 0;\n right: -5px;\n height: 100%;\n width: 10px;\n cursor: ew-resize;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index:1;\n\n &:after {\n content: "";\n position: absolute;\n display: block;\n left: calc(50% - 1px);\n width: 1px;\n height: calc(100% - 14px);\n top: 7px;\n background-color: var(--border-color);\n }\n'])),cg=Object(E.c)(ig)(b()(["\n &:after {\n height: 100%;\n top: 0;\n }\n"]));function lg(e,t,n){return Math.max(e,Math.min(n,t))}function sg(e){e.preventDefault()}function ug(){var e,l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r="columnResize",p=null!==(e=l.minSize)&&void 0!==e?e:60,s=null!==(e=l.fallbackSize)&&void 0!==e?e:150,h=null!==(e=l.maxSize)&&void 0!==e?e:1e3;return function(n){var e,d=null!==(e=null!==(e=l.columnSize)&&void 0!==e?e:n.getStateAtKey(r))&&void 0!==e?e:{};qd(n.getColumns(),"leaf-only").forEach(function(e){var t=e.code,e=e.width;void 0===d[t]&&(d[t]="number"==typeof e?e:s)}),n.getStateAtKey(r)&&(null===(t=n.ref)||void 0===t?void 0:t.current.lastOptColumnSize)===l.columnSize||n.setStateAtKey(r,d),n.ref&&(n.ref.current.lastOptColumnSize=l.columnSize);function a(e,t){null!=l&&l.doubleClickCallback(e,t)}function i(e,t){window.addEventListener("selectstart",sg);var s={},n=e.clientX,r=t.children,u=t.code,f=d;e.stopPropagation(),Tp(window,"mousemove").pipe(rg(Tp(window,"mouseup")),Pp(function(e){var o,a,e=e.clientX,i=Ed()({},d),c=e-n,l=c;return 0<(null==r?void 0:r.length)?(o=qd(r,"leaf-only"),a=o.reduce(function(e,t){t=t.code;return e+d[t]},0),o.forEach(function(e,t){var n=e.code,r=d[n],e=Math.round(c*r/a);t<o.length-1?(i[n]=lg(p,r+e,h),s[n]=i[n],l-=e):(i[n]=lg(p,r+l,h),s[n]=i[n])})):(e=d[u],i[u]=lg(p,e+c,h),s[u]=i[u]),f=i})).subscribe({next:o,complete:function(){var e,t=Sd()(e=Nd()(s)).call(e,function(e){return{code:e,width:s[e]}});window.requestAnimationFrame(function(){var e;null!==(e=null==l?void 0:l.afterChangeSize)&&void 0!==e&&e.call(l,f,t)}),window.removeEventListener("selectstart",sg)}})}var t,o=function(t){window.requestAnimationFrame(function(){var e;n.setStateAtKey(r,t),null!==(e=null==l?void 0:l.onChangeSize)&&void 0!==e&&e.call(l,t),l.columnSize&&n.ref&&(n.ref.current.lastOptColumnSize=t)})},c=(t=n.getColumns(),-1<f0()(t).call(t,function(e){return e.children&&0<e.children.length}));return n.mapColumns(xh(function(t){var e=av.safeRenderHeader(t),n=t.code,r=t.features,o=t.width;return Ed()(Ed()({},t),{width:null!==(n=d[n])&&void 0!==n?n:o,title:Ze.a.createElement(Ze.a.Fragment,null,e,!1!==(null==r?void 0:r.resizeable)&&(c?Ze.a.createElement(cg,{className:Eh.tableHeaderCellResize,onDoubleClick:function(e){return a(e,t)},onMouseDown:function(e){return i(e,t)}}):Ze.a.createElement(ig,{className:Eh.tableHeaderCellResize,onDoubleClick:function(e){return a(e,t)},onMouseDown:function(e){return i(e,t)}}))),headerCellProps:Dd(t.headerCellProps,{className:"resizeable"})})}))}}function fg(e){return e.deepPath?e.deepPath():e.path||(e.composedPath?e.composedPath():function(e){var t=[],n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}(e))}function dg(e,t){return!(!e||!t)&&0<=fg(t).indexOf(e)}function pg(e,t){for(var n,r=0;!n&&r<e.length;){var o=e[r];t(o)&&(n=o),r++}return n}function hg(e,t,n){e=e.getBoundingClientRect(),t=(t===document.body?document.documentElement:t).getBoundingClientRect();return{x:e.left-t.left-(n?n.x:0),y:e.top-t.top-(n?n.y:0)}}function mg(e,t,n,r,o){var a,i=e.getBoundingClientRect(),c=document.documentElement,l=c.getBoundingClientRect(),s=t.getBoundingClientRect(),u=i.width,t=i.height,e=e===document.body;return e&&(u=l.width-Math.abs(l.left-i.left),t=l.height+c.scrollTop-Math.abs(l.top-i.top)),n&&(l=s.width,u=(i={x:n,maxX:u-l,width:l,isPerfectX:o}).x,a=i.maxX,l=i.width,n=(i=i.isPerfectX)&&Math.max(u,0)>Math.abs(a)&&l<=u?u-l:Math.min(Math.max(u,0),Math.abs(a))),r&&(a=s.height,s={y:r,maxY:t-a,height:a,scrollTop:c.scrollTop,isBody:e,isPerfectY:o},t=s.y,a=s.maxY,c=s.height,e=s.scrollTop,o=s.isBody,r=(s=s.isPerfectY)&&Math.max(t,0)>Math.abs(a)&&c<=(o?t-e:t)?t-c:Math.min(Math.max(t,0),Math.abs(a))),{x:n,y:r}}var vg=function(t){return function(e){e.value=t,e.select(),e.focus(),document.execCommand("copy"),document.body.removeChild(e)}};function gg(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(i){function c(e){var t=document.createElement("div");function n(e){(function(e,t){if(!e||!t)return!1;if(dg(t,e))return!0;return!1})(e,t)||r||(r=!0,l.removeChild(t),o.forEach(function(e){window.removeEventListener(e,n,!0)}))}t.setAttribute("class","kd-table-popup"),l.appendChild(t);var r=!1,o=["mousedown","contextmenu"];return X.a.render(e,t,function(){setTimeout(function(){o.forEach(function(e){window.addEventListener(e,n,!0)})},0)}),n}var l=p.popupParent||document.body,s=new wg;i.addTableProps({onContextMenu:function(e){!function(e){var t=fg(e.nativeEvent),n=0;for(;n<t.length;){var r=t[n];if(r.classList.contains(Eh.tableBody)||r.classList.contains(Eh.tableFooter))return!1;n++}return!0}(e)&&(e.preventDefault(),t(e))}});function u(e,t,n,r){var o,a=[];return t&&a.push((o=n,{name:"复制",action:function(){!function(e){var t=document.createElement("textarea");t.style.width="1px",t.style.height="1px",t.style.top="0px",t.style.left="0px",t.style.position="absolute",t.style.opacity="0.0",document.body.appendChild(t);try{e(t)}catch(e){Hd.warn("Browser does not support document.execCommand('copy') for clipboard operations")}}(vg(o))}})),p.getContextMenuItems?p.getContextMenuItems({record:e,column:t,value:n,event:r}):a}function f(){s.destroy()}function d(){return l}var t=function(e){var t,n=fg(e),r=pg(n,function(e){return e&&"table-cell"===e.getAttribute("data-role")}),n=((r?(t=r.getAttribute("data-code"),a=r.getAttribute("data-rowindex"),xg(r)):(a=null==(o=pg(n,function(e){return e&&"table-row"===e.getAttribute("data-role")}))?void 0:o.getAttribute("data-rowindex"),xg(o)))?i.getFooterDataSource()||[]:i.getDataSource())[a],o=void 0!==t&&t0(i.getColumns(),function(e){return e.code===t}),a=o&&n&&av.safeGetValue(o,n,a),a=u(n,o,a,e);0!==a.length?(e=function(e,t,n){var r=function(e,t){var n=t.getBoundingClientRect(),r=document.documentElement.getBoundingClientRect();return{x:e.clientX-(t===document.body?r:n).left,y:e.clientY-(t===document.body?r:n).top}}(e,t),e=r.x,t=r.y;n&&(r=n.offsetX,n=n.offsetY,r&&(e-=r),n&&(t-=n));return{x:e,y:t}}(e,l),e=c(Ze.a.createElement(yg,{options:a,hideContextMenu:f,position:e,getPopupParent:d})),s.init(e)):Hd.warn("context menu options is empty")};return i}}function yg(e){var t=e.options,t=void 0===t?[]:t,n=e.hideContextMenu,r=e.position,o=e.getPopupParent,a=Object(Qe.useRef)();return Object(Qe.useEffect)(function(){var e,t,n;a.current&&(e=o(),n=r.x,t=r.y,t=(n=function(e,t,n,r){var o=e.getBoundingClientRect(),a=document.documentElement,i=a.getBoundingClientRect(),c=t.getBoundingClientRect(),l=o.width,s=o.height;e===document.body&&(l=i.width,l-=Math.abs(i.left-o.left),s=i.height+a.scrollTop,s-=Math.abs(i.top-o.top));n&&(o=Math.min(c.width,120),t.style.minWidth=o+"px",o=l-o,n=Math.min(Math.max(n,0),Math.abs(o)));r&&(c=Math.min(c.height,180),c=s-c,r=Math.min(Math.max(r,0),Math.abs(c)));return{x:n,y:r}}(e,a.current,n,t)).x,n=n.y,a.current.style.left=t+"px",a.current.style.top=n+"px")},[r]),Ze.a.createElement(m0,{className:Ch.menu,ref:a,style:{left:r.x,top:r.y}},Ze.a.createElement("div",{className:Ch.menuList},Sd()(t).call(t,function(e,t){return Ze.a.createElement(bg,{key:e.key||function(e){var t=e.name,n=e.index;if(t){var r=0;t+="";for(var o=0;o<t.length;o++)r+=t.charCodeAt(t[o]);return Fd()(e="".concat(r,"_")).call(e,n)}return n}({name:e.name,index:t}),name:e.name,action:e.action,disabled:e.disabled,hideContextMenu:n})})))}function bg(e){var t=e.name,n=e.action,r=e.disabled,o=e.hideContextMenu,a=Object(Qe.useRef)();return Ze.a.createElement("div",{className:Je()(Ch.menuOption,Od()({},Ch.menuOptionDisable,r)),ref:a,onClick:function(){r||(o(),"function"==typeof n&&n())},onMouseEnter:function(e){var t;r||(t=a.current)&&t.classList.add(Ch.menuOptionActive)},onMouseLeave:function(e){var t;r||(t=a.current)&&setTimeout(function(){t.classList.remove(Ch.menuOptionActive)},10)}},Ze.a.createElement("span",{className:Ch.menuOptionText},t))}var wg=kd()(function e(){var t=this;Cd()(this,e),this.init=function(e){t.hidePopup=e},this.destroy=function(){t.hidePopup&&t.hidePopup(),t.hidePopup=null}});function xg(e){for(var t=e;t;){if("TFOOT"===t.tagName)return!0;if("TABLE"===t.tagName||"TBODY"===t.tagName)return!1;t=t.parentElement}return!1}var Og=E.c.div(b()(["\n display: flex;\n flex-direction: column;\n max-height: 450px;\n min-width: 160px;\n border-radius: 2px;\n background-color: #fff;\n box-shadow: 0 0 5px 0 rgba(154,154,154,.5);\n cursor: default;\n\n .popup-header {\n display: flex;\n background-color: #ebedf1;\n\n .popup-header-icon {\n color:#666;\n background-color: #fff;\n padding: 6px 16px 6px 16px;\n display: inline-block;\n border-right: 1px solid transparent;\n border-left: 1px solid transparent;\n border-top: 1px solid transparent;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n }\n }\n\n .popup-body {\n display: flex;\n }\n"]));var Eg=function(e){var t,n,r=e.style,o=e.children,a=e.position,i=e.filterIcon,c=e.onClose,l=Object(Qe.useState)(a),s=xd()(l,2),e=s[0],u=s[1],l=Object(Qe.useState)(!1),l=(s=xd()(l,2))[0],f=s[1],d=Ze.a.useRef(null);return Object(Qe.useEffect)(function(){u(mg(document.body,d.current,a.x,a.y,!0)),f(!0)},[a]),t=function(e){return!dg(d.current,e)&&c()},n=["mousedown"],Ze.a.useEffect(function(){return n.forEach(function(e){return window.addEventListener(e,t,!0)}),function(){return n.forEach(function(e){return window.removeEventListener(e,t,!0)})}},[n,t]),Ze.a.createElement(Og,{style:Ed()(Ed()({},r),{left:e.x,top:e.y,opacity:l?1:0}),ref:d},Ze.a.createElement("div",{className:"popup-header"},Ze.a.createElement("span",{className:"popup-header-icon"},i||Ze.a.createElement("svg",{width:14,height:14,viewBox:"64 64 896 896",focusable:"false","data-icon":"filter",fill:"currentColor","aria-hidden":"true"},Ze.a.createElement("path",{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3\n 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5\n 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"})))),Ze.a.createElement("div",{className:"popup-body"},o))},Cg=[{title:"包含",key:"contain",filter:function(t){return function(e){return null!=e&&("number"==typeof e&&(e+=""),Mm()(e).call(e,t))}}},{title:"不包含",key:"notContain",filter:function(t){return function(e){return null==e||("number"==typeof e&&(e+=""),!Mm()(e).call(e,t))}}},{title:"等于",key:"equal",filter:function(t){return function(e){return t!==e}}},{title:"不等于",key:"notEqual",filter:function(t){return function(e){return t!==e}}},{title:"为空",key:"isNull",filter:function(){return function(e){return!e}}},{title:"不为空",key:"notIsNull",filter:function(){return function(e){return!!e}}}],kg=E.c.div(b()(["\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n border-radius: 2px;\n width: 100%;\n\n ","\n .filter-option-list {\n display: flex;\n flex-direction: column;\n margin-top: 8px;\n ul {\n margin: 0;\n padding: 0;\n li {\n display: flex;\n position: relative;\n flex-shrink: 0;\n height: 32px;\n align-items: center;\n border-radius: 2px;\n font-size: 12px;\n color: var(--color);\n padding: 0 12px;\n overflow: hidden;\n cursor: pointer;\n &:hover{\n background-color: var(--primary-color-level1);\n }\n }\n li.active{\n background-color: var(--primary-color-level1);\n }\n }\n }\n\n .filter-search {\n display: flex;\n padding: 6px 12px;\n\n .filter-search-inner {\n width: 100%;\n font-size: 12px;\n color: #333333;\n height: 28px;\n line-height: 28px;\n padding: 0 8px;\n outline: none;\n background-color: #FAFAFA;\n border-radius: 2px;\n border: 1px solid var(--strong-border-color);\n &:hover{\n border-color: var(--primary-color)\n } \n &:focus{\n border-color: var(--primary-color)\n } \n }\n }\n\n .filter-footer {\n display: flex;\n flex-direction: row;\n padding: 8px 12px;\n justify-content: space-between;\n\n .filter-btn {\n text-align: center;\n font-size: 12px;\n width: 60px;\n height: 24px;\n line-height: 24px;\n }\n \n }\n"]),l);function Sg(e){var t=e.setFilterModel,n=e.filterModel,r=e.hidePanel,e=Ze.a.useState((null==n?void 0:n.filterCondition)||"contain"),o=(e=xd()(e,2))[0],a=e[1],e=Ze.a.useState((null==n?void 0:zd()(n))||""),i=(e=xd()(e,2))[0],c=e[1],l=Ze.a.useCallback(function(e){a(e.key)},[]);return Object(Qe.useEffect)(function(){a((null==n?void 0:n.filterCondition)||"contain"),c((null==n?void 0:zd()(n))||"")},[n]),Ze.a.createElement(kg,null,Ze.a.createElement("div",{className:"filter-option-list"},Ze.a.createElement("ul",null,Sd()(Cg).call(Cg,function(e,t){return Ze.a.createElement("li",{key:t,className:e.key===o?"active":"",onClick:function(){return l(e)}},e.title)}))),"notIsNull"!==o&&"isNull"!==o&&Ze.a.createElement("div",{className:"filter-search"},Ze.a.createElement("input",{className:"filter-search-inner",value:i,onChange:function(e){c(e.target.value)}})),Ze.a.createElement("div",{className:"filter-footer"},Ze.a.createElement("button",{className:Je()(Od()({"filter-btn":!0},Eh.button,!0)),onClick:function(){r(),t()}},"重置"),Ze.a.createElement("button",{className:Je()((e={"filter-btn":!0},Od()(e,Eh.button,!0),Od()(e,Eh.buttonPrimary,!0),e)),onClick:function(){r(),t({filter:[i],filterCondition:o})}},"确定")))}var jg=7,Pg=17,Ng=E.c.span(b()(["\n // position: absolute;\n // right: 4px;\n // cursor: pointer;\n // transform: translateY(-50%);\n // top: 50%;\n // height: 12px; \n"]));function Dg(e){function t(e){l(hg(n,document.body,{x:Pg,y:jg}))}var n=e.ele,r=e.filterIcon,o=e.hidePanel,a=e.renderPanelContent,i=Ze.a.useRef(null),c=Ze.a.useState(hg(n,document.body,{x:Pg,y:jg})),e=xd()(c,2),c=e[0],l=e[1];return Object(Qe.useEffect)(function(){var e=ah(i.current.children[0],t);return function(){e&&e.disconnect()}},[]),Ze.a.createElement("div",{ref:i},Ze.a.createElement(Eg,{style:{position:"absolute",zIndex:1050},onClose:o,position:c,filterIcon:r},a()))}var Tg=function(e){function t(){return p(!1)}var n=void 0===(h=e.size)?12:h,r=e.style,o=e.className,a=e.FilterPanelContent,i=e.filterIcon,c=e.setFilter,l=e.setFilterModel,s=e.filterModel,u=e.isFilterActive,f=e.stopClickEventPropagation,d=Ze.a.useState(!1),e=(h=xd()(d,2))[0],p=h[1],d=Ze.a.useRef(null),h=Je()((h={},Od()(h,o,!0),Od()(h,"filter-panel-open",e),h));return Ze.a.createElement(Ng,{style:r,className:h,onMouseDown:function(e){e.stopPropagation()},ref:d},Ze.a.createElement("span",{className:Eh.filterIcon,onClick:function(e){f&&e.stopPropagation(),p(!0)}},i||Ze.a.createElement("svg",{width:n,height:n,viewBox:"64 64 896 896",focusable:"false","data-icon":"filter",fill:"currentColor","aria-hidden":"true"},Ze.a.createElement("path",{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3\n 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5\n 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}))),e&&Object(k.createPortal)(Ze.a.createElement(Dg,{ele:d.current,filterIcon:i,hidePanel:t,renderPanelContent:function(){return a?Ze.a.createElement(a,{setFilter:c,filterModel:s,isFilterActive:u,hidePanel:t}):Ze.a.createElement(Sg,{setFilterModel:l,filterModel:s,isFilterActive:u,hidePanel:t})}}),document.body))},Mg="filter";function Ag(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(l){var e=l.getDataSource(),t=l.getColumns(),n=o.filters,r=o.defaultFilters,s=o.onChangeFilters,i=o.keepDataSource,u=o.mode,f=o.filterIcon,d=o.stopClickEventPropagation,r=null!==(r=null!==(n=null!=n?n:l.getStateAtKey(Mg))&&void 0!==n?n:r)&&void 0!==r?r:[],r="single"===u?jd()(r).call(r,0,1):r,p=new Bd.a(Sd()(r).call(r,function(e){return[e.code,Ed()({},e)]}));return l.dataSource(function(e){var n=[];if(p.forEach(function(e,t){n.push(t)}),i||n.length<=0)return e;var t=l.getColumns(),o=new Bd.a(Sd()(t=zd()(t=qd(t,"leaf-only")).call(t,function(e){var t;return!1!==(null===(t=e.features)||void 0===t?void 0:t.filterable)&&null!=(null===(e=e.features)||void 0===e?void 0:e.filterable)})).call(t,function(e){return[e.code,e]})),a=new Bd.a(Sd()(Cg).call(Cg,function(e){return[e.key,Ed()({},e)]}));return e.reduce(function(e,t){return r=t,n.some(function(e){var t=p.get(e),n=null===(n=null===(n=o.get(e))||void 0===n?void 0:n.features)||void 0===n?void 0:n.filterable,n="function"==typeof n?n:a.get(t.filterCondition)?zd()(a.get(t.filterCondition)):(console.warn("列[".concat(e,"]未配置筛选函数,请设置 column.features.filterable 来作为该列的筛选函数, 目前使用默认包含筛选函数")),zd()(a.get("contain")));return!n(zd()(t))(r[e])})?e:Fd()(e).call(e,[t]);var r},[])}(e)),l.columns((t=t,Sd()(t).call(t,function e(r){var t=Ed()({},r);var n=r.code&&(null===(n=r.features)||void 0===n?void 0:n.filterable);var o=n&&0<(null===(a=null===(o=null==p?void 0:p.get(r.code))||void 0===o?void 0:zd()(o))||void 0===a?void 0:a.length);{var a,i;n&&(i=function(e){var t=new Bd.a(p),n=Ed()({code:r.code},e);null==e?t.delete(r.code):("single"===u&&t.clear(),t.set(r.code,n));t=Ad()(Qv()(t).call(t));null!=s&&s(t,n),l.setStateAtKey(Mg,t)},c=function(e,t){i(e?{code:r.code,filter:e,filterCondition:t}:void 0)},n=null===(a=r.features)||void 0===a?void 0:a.filterPanel,t.title=Fd()(a=[]).call(a,Ld()(Fd()(a=[]).call(a,null!==(a=t.title)&&void 0!==a?a:[av.safeRenderHeader(Ed()(Ed()({},r),{title:null}))])),[Ze.a.createElement(Tg,{key:"filter",FilterPanelContent:n,filterIcon:f,filterModel:p.get(r.code),setFilterModel:i,setFilter:c,isFilterActive:o,className:Je()((c={},Od()(c,Eh.tableFilterTrigger,!0),Od()(c,"active",o),c)),stopClickEventPropagation:d})]))}{var c;Vd(r)||(t.children=Sd()(c=r.children).call(c,e))}return t}))),l}}var Rg="rangeSelection",Ig="lastClickCell";function Lg(a){return function(u){var l=30,n=u.ref.current.domHelper&&u.ref.current.domHelper.tableBody;if(!n)return u;var s=u.getColumns(),c=function(e){var t;u.setStateAtKey(Rg,e),null!==(t=null==a?void 0:a.rangeSelectedChange)&&void 0!==t&&t.call(a,e)},r=function(e,t){var n,r,o,a,i;e&&t&&(i=t,(a=e).rowIndex!==i.rowIndex||a.code!==i.code)&&(n=e,r=t,a=qd(o=s,"leaf-only"),i=f0()(a).call(a,function(e){return e.code===n.code}),o=f0()(a).call(a,function(e){return e.code===r.code}),o=i<o?jd()(a).call(a,i,o+1):jd()(a).call(a,o,i+1),e={startRow:(i=e.rowIndex<=t.rowIndex)?e.rowIndex:e.rowIndex+e.rowSpan-1,endRow:i?t.rowIndex+t.rowSpan-1:t.rowIndex,columns:o,startColumn:e.column},c(e))},o=function(e){var t=_g(e.target,s);t&&(e.shiftKey?(e=u.getStateAtKey(Ig))?r(e,t):u.setStateAtKey(Ig,t):(u.setStateAtKey(Ig,t),c(null)))};return u.addTableProps({onMouseDown:function(e){var i,t,c;0===e.button&&dg(n,e.nativeEvent)&&(o(e),i=_g(e.target,s),t=Tp(window,"mousemove"),e=Tp(window,"mouseup"),c=n.getBoundingClientRect(),t.pipe(Pp(function(e){var t,n,r,o=_g(e.target||e.srcElement,s),a={clientX:e.clientX,clientY:e.clientY};return n=(t=a).clientX,r=a.clientY,e=c.left,a=c.top,t=c.height,e+c.width<=n+l&&(u.ref.current.domHelper.virtual.scrollLeft+=l),n-l<=e&&(u.ref.current.domHelper.virtual.scrollLeft-=l),a+t<=r+l&&(u.ref.current.domHelper.tableBody.scrollTop+=l),r+l<=a&&(u.ref.current.domHelper.tableBody.scrollTop-=l),{startDragCell:i,draggingCell:o}}),rg(e)).subscribe(function(e){var t=e.startDragCell,e=e.draggingCell;r(t,e)}))},onKeyDown:function(e){var t;(e.ctrlKey||e.metaKey)&&"a"===e.key&&(t=u.getDataSource().length,s.length&&t&&(!1!==a.preventkDefaultOfKeyDownEvent&&e.preventDefault(),c({startRow:0,endRow:t-1,columns:s,startColumn:s[0]})))},tabIndex:-1}),u.mapColumns(xh(function(c){var e,l=u.getStateAtKey(Rg);if(!l||-1===f0()(e=l.columns).call(e,function(e){return e.code===c.code}))return c;var s=c.getCellProps;return Ed()(Ed()({},c),{getCellProps:function(e,t,n){var r=null==s?void 0:s(e,t,n),o=l.startRow,a=l.endRow,i=l.columns,e=o<a?o:a,t=o<a?a:o,a=i[0],o=i[i.length-1],i=e<=n&&n<=t;return Dd(r,{className:Je()((r={},Od()(r,Eh.tableCellRangeSelected,i),Od()(r,Eh.tableCellRangeTop,n===e),Od()(r,Eh.tableCellRangeLeft,c.code===a.code&&i),Od()(r,Eh.tableCellRangeBottom,n===t),Od()(r,Eh.tableCellRangeRight,c.code===o.code&&i),r))})}})}))}}function _g(t,r){for(;t;){if("table-cell"===t.getAttribute("data-role")){var e=function(){var n=t.getAttribute("data-code"),e=t0(r,function(e,t){return e.code===n});return e?{v:{rowIndex:parseInt(t.getAttribute("data-rowindex")),rowSpan:parseInt(t.getAttribute("rowspan")||1),code:n,column:e}}:{v:null}}();if("object"===Pd()(e))return e.v}t=t.parentElement}return null}var Fg=["column","fixed","onChange","value","defaultValue","clickArea"],zg=["column","fixed","onChange","clickArea"];function Bg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Hg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Vg=function(e,t){var n,r,o,a,i,c,l,s;t&&("radio"===t.type?(n=t.column,i=t.fixed,r=t.onChange,o=t.value,a=t.defaultValue,c=t.clickArea,s=ee()(t,Fg),e.use(u.singleSelect(Hg({defaultValue:null==a?void 0:a[0],value:o?0===o.length?"":o[0]:void 0,radioColumn:n,radioPlacement:i,onChange:function(e){return null==r?void 0:r([e])},clickArea:"self"===c?"radio":c},s)))):(i=t.column,c=t.fixed,l=t.onChange,s=t.clickArea,t=ee()(t,zg),e.use(u.multiSelect(Hg({checkboxColumn:i,checkboxPlacement:c,onChange:function(e,t,n,r){return null==l?void 0:l(e,t,n,r)},clickArea:"self"===s?"checkbox":s},t)))))};function Wg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Ug=function(e,t){t&&e.use(u.rowDetail(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};function qg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Yg=function(e,t){t&&e.use(u.filter(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};function Kg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Gg=function(e,t){t&&e.use(u.sort(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var Xg=function(e,t){t&&e.use(u.autoRowSpan())};function $g(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Qg=function(e,t){t&&e.use(u.treeMode(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$g(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var Zg=function(e,t){t&&e.use(u.columnResize(!0===t?{}:t))};var Jg=function(e,t){t&&e.use(u.columnDrag(!0===t?{}:t))};var ey=function(e,t){t&&e.use(u.contextMenu(!0===t?{}:t))};function ty(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var ny=function(e,t){t&&e.use(u.rangeSelection(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ty(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var ry=function(e){var t,n=e.columns,r=e.dataSource,o=e.columnDrag,a=e.columnResize,i=e.primaryKey,c=e.rowSelection,l=e.rowDetail,s=e.filter,u=e.sort,f=e.autoRowSpan,d=e.treeMode,p=e.prefixCls,h=e.className,m=e.style,v=e.components,g=e.isLoading,y=e.footerDataSource,b=e.useVirtual,w=e.estimatedRowHeight,x=e.emptyCellHeight,O=e.hasHeader,E=e.useOuterBorder,C=e.defaultColumnWidth,k=e.getRowProps,S=e.getTableProps,j=e.contextMenu,P=e.rangeSelection,N=e.cssVariables,D=(0,(t=Object(Qe.useContext)(tt)).getPrefixCls)(t.prefixCls,p),e=Je()(D,h),r=(t={components:{Checkbox:(null==v?void 0:v.Checkbox)||Ce,Radio:(null==v?void 0:v.Radio)||gs}},p=Object(Qe.useState)({}),D=xd()(p,2),h=D[0],p=D[1],(D=Object(Qe.useRef)({})).current.featureOptions={},new Th({state:h,setState:p,ctx:t,ref:D}).primaryKey(void 0===i?"":i).input({columns:n,dataSource:r}));return y&&r.footerDataSource(y),Vg(r,c),Ug(r,l),Yg(r,s),Gg(r,u),Xg(r,f),Qg(r,d),Zg(r,a),Jg(r,o),ey(r,j),ny(r,P),"function"==typeof k?r.appendRowPropsGetter(k):se(!0,"table","parameter 'getRowProps' should be a function but here it is ".concat(k)),"function"==typeof S?(k=S(),r.addTableProps(k)):se(!0,"table","parameter 'getTableProps' should be a function but here it is ".concat(S)),Ze.a.createElement(Gv,Ge()({},r.getProps(),{className:e,style:m,isLoading:g,components:{LoadingIcon:(null==v?void 0:v.LoadingIcon)||function(){return Ze.a.createElement(Fa,{type:"container"})},EmptyContent:(null==v?void 0:v.EmptyContent)||function(){return Ze.a.createElement(lt,null)}},useVirtual:b,estimatedRowHeight:w,emptyCellHeight:x,hasHeader:O,useOuterBorder:E,defaultColumnWidth:C,cssVariables:N}))},b=(C("embed","base"),Ze.a.forwardRef(function(r,e){var t=Object(Qe.useContext)(tt),n=t.compDefaultProps,o=t.getPrefixCls,a=t.prefixCls,i=et("Stepper",n,r),c=i.prefixCls,l=i.onChange,s=i.step,u=i.type,f=i.stepBtnClassName,d=i.max,p=i.min,t=i.value,n=i.defaultValue,h=o(a,"inputNumber",c);se("number"!=typeof s,"stepper","step必须为一个数值");function m(){var e=k("embed"),t=Je()("".concat(h,"-embedStep-plus"),(n={},Xe()(n,f,f),Xe()(n,"".concat(h,"-embedStep-disabled"),b),n)),n=Je()("".concat(h,"-embedStep-minus"),(n={},Xe()(n,f,f),Xe()(n,"".concat(h,"-embedStep-disabled"),x),n));return Ze.a.createElement("span",{className:e},Ze.a.createElement("span",{className:t,onMouseDown:function(){P("plus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"arrow-up"})),Ze.a.createElement("span",{className:n,onMouseDown:function(){P("minus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"arrow-down"})))}var c=Object(Qe.useRef)(),v=Object(Qe.useRef)(),e=e||c,g=Object(Qe.useRef)(null),y=Object(Qe.useRef)(null),c=Object(Qe.useState)(!1),c=$e()(c,2),b=c[0],w=c[1],c=Object(Qe.useState)(!1),c=$e()(c,2),x=c[0],O=c[1],n=nt(void 0,{value:t,defaultValue:n}),n=$e()(n,2),E=n[0],C=n[1],k=function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Je()((n={},Xe()(n,"".concat(h,"-").concat(e,"Step"),!0),Xe()(n,"".concat(h,"-").concat(e,"Step-disabled"),r),Xe()(n,"".concat(h,"-").concat(e,"Step-").concat(t),t),Xe()(n,"".concat(h,"-").concat(e,"Step-small"),"small"===i.size),Xe()(n,"".concat(h,"-").concat(e,"Step-middle"),"middle"===i.size),Xe()(n,"".concat(h,"-").concat(e,"Step-large"),"large"===i.size),Xe()(n,f,"base"===e&&f),n))},S=function(e){var t=parseFloat(s);if("number"!=typeof t)return!1;var n=parseFloat(v.current.value)||parseFloat(i.min)||0,t=new Ji.a(n)[e](t).valueOf(),t=v.current.verifiValue(t);return!1!==t&&(!("number"==typeof d&&(Number(t)+s>d?w(!0):w(!1),Number(t)>d))&&(!("number"==typeof p&&(Number(t)-s<p?O(!0):O(!1),Number(t)<p))&&(void 0===(null==r?void 0:r.value)&&C(t),void(l&&l({target:{value:t}})))))},j=function(e){y.current=setInterval(function(){S(e)},300)},P=function(e){return S(e),g.current=setTimeout(function(){j(e)},300),document.addEventListener("mouseup",N,!0),!1},N=Object(Qe.useCallback)(function(){return g.current&&clearTimeout(g.current),y.current&&clearInterval(y.current),document.removeEventListener("mouseup",N),!1},[g,y]);return Ze.a.createElement(mc,Ge()({},Ec(i,["step","type","stepBtnClassName","value","defaultValue"]),{ref:e,stepperrref:v,value:E,prefix:function(){if("embed"===u)return null;var e=k("base","decrease",x);return Ze.a.createElement("span",{className:e,onMouseDown:function(){P("minus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"reduce"}))}(),suffix:(e=k("base","increase",b),"embed"===u?m():Ze.a.createElement("span",{className:e,onMouseDown:function(){P("plus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"add"}))),onChange:function(e){var t,n=parseFloat(e.target.value);String(E).length&&(null===(t=e.target.value)||void 0===t?void 0:t.length)>=String(E).length&&""!==e.target.value&&void 0!==(null==r?void 0:r.value)&&(d&&d<n||p&&n<p)||(void 0===(null==r?void 0:r.value)&&C(e.target.value),void 0===(null==r?void 0:r.value)&&v.current.setValue(e.target.value),l&&l(e))}}))}));b.displayName="Stepper";var oy=b;function ay(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function iy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ay(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}b=Ze.a.forwardRef(function(t,e){var n=Object(Qe.useContext)(tt),r=n.getPrefixCls,o=n.prefixCls,a=n.compDefaultProps,i=n.locale.getLangMsg,c=et("BaseData",a,t),l=c.prefixCls,s=c.className,u=c.mode,f=c.disabled,d=c.delimiter,p=void 0===d?",":d,h=c.placeholder,n=void 0===h?i("global","selectholder"):h,a=c.showDetailIcon,m=c.showFrequent,v=c.showCollectIcon,g=c.columns,d=c.options,y=void 0===d?[]:d,b=c.value,w=c.optionLabelProp,x=c.size,i=c.style,O=c.dropdownFooterRender,h=c.collectList,E=void 0===h?[]:h,d=c.historyList,C=void 0===d?[]:d,k=c.loading,S=c.searchField,j=c.dropdownStyle,P=c.onChange,N=c.onSearch,D=c.onSelect,T=c.onShowDetail,M=c.onCollect,A=c.onShowMore,R=c.onVisibleChange,I="multiple"===u,h=Object(Qe.useState)([]),d=$e()(h,2),L=d[0],_=d[1],u=Object(Qe.useState)(""),h=$e()(u,2),F=h[0],z=h[1],d=Object(Qe.useState)([]),u=$e()(d,2),B=u[0],H=u[1],h=Object(Qe.useState)(!1),d=$e()(h,2),u=d[0],V=d[1],h=Object(Qe.useState)(!1),d=$e()(h,2),W=d[0],U=d[1],h=Object(Qe.useState)(!!t.visible),d=$e()(h,2),h=d[0],q=d[1],d=Object(Qe.useRef)(),Y=e||d,K=Object(Qe.useRef)(),G=Object(Qe.useRef)({previousInputValue:"",searchIndex:0,editOptions:[],selectionStart:0,previousEditValue:"",deleteEndIndx:0}),X=r(o,"baseData",l),s=Je()(X,s,Xe()({},"".concat(X,"-disabled"),f));Object(Qe.useEffect)(function(){G.current.searchIndex=L.length,G.current.editOptions=L},[L]);var $=Object(Qe.useCallback)(function(){var n=[];return F.split(p).reduce(function(e,t){return n.push({start:e,end:e+t.length}),e+t.length+1},0),n},[p,F]);Object(Qe.useEffect)(function(){var e=$();H(e)},[$]),Object(Qe.useEffect)(function(){var e=[];I&&Array.isArray(b)&&(e=b),_(e=!I&&b?[b]:e),G.current.editOptions=ke()(e)},[b,I]),Object(Qe.useEffect)(function(){var e,t,n,r,o;G.current.previousEditValue&&(n=$(),r=Q(G.current.previousEditValue,p),e=Q(F,p),o=(null===(t=K.current)||void 0===t?void 0:t.selectionStart)||0,t=de(o,n),G.current.searchIndex=t,n=ke()(G.current.editOptions||[]),e.length-r.length==1&&(G.current.deleteEndIndx=t,n.splice(t,0,null)),e.length<r.length&&(r=G.current.previousEditValue,r=I?r.length-F.length+o:0,r=(o=pe(o,r,B)).start,o=o.end,null!=n&&n.splice(r,o-r+1)),G.current.editOptions=n,G.current.previousEditValue=F)},[p,F,I,$]);var Q=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").split(1<arguments.length?arguments[1]:void 0).filter(function(e){return e})};Object(Qe.useLayoutEffect)(function(){K.current&&(0<K.current.scrollWidth-K.current.offsetWidth?V(!0):V(!1))},[K,F]);var Z=Object(Qe.useCallback)(function(){var e=L.reduce(function(e,t,n,r){return"".concat(e).concat(t[w]).concat(n!==r.length-1?p:"")},"");G.current.previousInputValue=e,z(e),G.current.previousEditValue="".concat(e).concat(p)},[p,w,L]);Object(Qe.useEffect)(function(){Z()},[Z]);function J(e){q(!0);var t,n,r=e.target.value,o=r;I&&K.current&&r&&r.length>F.length&&(t=K.current.selectionStart||0,n=1===(G.current.selectionStart=t)&&r[1]!==p&&1!==r.length,e=t!==r.length&&r[t-2]===p&&r[t]!==p,(n||e)&&(K.current.value=o=r.substring(0,t)+p+r.substring(t,r.length),ue(K.current,t))),z(o),se(o)}function ee(e){if(!I)return e;if(K.current&&e){if(e.indexOf(p)<0)return e;var t=K.current.selectionStart||0,n=e.slice(0,t).lastIndexOf(p)+1,r=-1===(r=e.slice(t).indexOf(p))?e.length:t+r;return e=e.slice(n,r)}return e}function te(){f||(U(!0),I&&L.length&&z("".concat(F).concat(p)))}function ne(){var e;f||(U(!1),z(G.current.previousInputValue),G.current.previousEditValue="".concat(G.current.previousInputValue).concat(p),e=(G.current.editOptions||[]).filter(function(e){return e})||[],JSON.stringify(e)!==JSON.stringify(L)&&null!=P&&P(e.filter(function(e){return e}).map(function(e){return e.value}),e.filter(function(e){return e})),void 0===b&&_(e))}function re(){var e;f||K.current&&(e=K.current.scrollWidth-K.current.offsetWidth,K.current.scrollLeft=e,setTimeout(function(){ue(K.current,F.length+1)},0))}function oe(e){e.stopPropagation(),null!=T&&T(L)}function ae(e){e.stopPropagation(),null!=A&&A()}function ie(){var e=(t=fe((null===(t=K.current)||void 0===t?void 0:t.selectionStart)||0,(null===(e=K.current)||void 0===e?void 0:e.selectionEnd)||0)).start,t=t.end;he(K.current,e,t)}function ce(e){var t=void 0===(o=G.current.searchValue)?"":o,n=e.indexOf(t),r=e.substr(0,n),o=e.substr(n+t.length);return-1<n?Ze.a.createElement("span",null,r,Ze.a.createElement("span",{className:"".concat(X,"-dropdown-options-item-search")},t),o):Ze.a.createElement("span",null,e)}function le(){return m?Ze.a.createElement(iu,{defaultActiveKey:"history"},Ze.a.createElement(iu.TabPane,{key:"history",tab:"历史记录"},be(C,g)),Ze.a.createElement(iu.TabPane,{key:"collect",tab:"我的收藏"},be(E,g))):null}var se=function(e){e=ee(e);G.current.searchValue=e,null!=N&&N(e)},ue=function(e,t){e.setSelectionRange?(e.focus(),window.setTimeout(e.setSelectionRange(t,t),0)):e.createTextRange&&((e=e.createTextRange).collapse(!0),e.moveEnd("character",t),e.moveStart("character",t),e.select())},fe=function(e,t){for(var n=0;n<B.length;n++){var r=B[n];if(r.start<=e&&r.end>=t)return r}return{}},de=function(e,t){for(var n=0,r=0;r<t.length;r++){var o=t[r];o.start<=e&&o.end>=e&&(n=r)}return n},pe=function(e,t,n){for(var r={start:null,end:null},o=0;o<n.length;o++){var a=n[o];a.start>=e&&null===r.start&&(r.start=o),a.end<=t&&(r.end=o)}return r},he=function(e,t,n){e.setSelectionRange(t,n)},me=function(e){e=e.target.checked?y:[];P(e.map(function(e){return e.value}),e),void 0===b&&_(e)},ve=Object(Qe.useCallback)(function(e,t){null!=M&&M(t,e)},[M]),a=a&&!I&&!W,ge=Object(Qe.useCallback)(function(e){return 0<e.length&&e.length<y.length},[y]),ye=function(e){return y.length&&e.length===y.length},be=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=t&&Array.isArray(t)?t:e&&Array.isArray(e)&&e.length?Object.keys(e[0]).map(function(e){return{key:e}}):[],a=ge(L),i=ye(L);return Ze.a.createElement(Ze.a.Fragment,null,t&&Array.isArray(t)&&Ze.a.createElement("div",{className:"".concat(X,"-dropdown-columns")},o.map(function(e,t){return Ze.a.createElement("span",{key:e.key,className:"".concat(X,"-dropdown-columns-item"),title:e.title},I&&0===t&&r&&Ze.a.createElement(Ce,{style:{marginRight:5},checked:i,indeterminate:a,onChange:me}),e.title)})),k?Ze.a.createElement("div",{className:"".concat(X,"-dropdown-loading")},Ze.a.createElement(Fa,null)):e.length?xe(e,o,r):Oe(),n&&O&&Ze.a.createElement("div",{className:"".concat(X,"-dropdown-footer")},O))},we=Object(Qe.useCallback)(function(t){return Ze.a.createElement("span",{className:"".concat(X,"-dropdown-options-item-collect"),onMouseDown:function(e){return e.stopPropagation()}},-1===E.findIndex(function(e){return e.value===t.value})?Ze.a.createElement(Ee,{className:"".concat(X,"-dropdown-options-item-collect-not-icon"),type:"collect",onClick:function(){return ve(t,!0)}}):Ze.a.createElement(Ee,{className:"".concat(X,"-dropdown-options-item-collect-icon"),type:"star",onClick:function(){return ve(t,!1)},style:{visibility:"visible"}}))},[X,E,ve]),xe=function(e,o){var a=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Ze.a.createElement(Ze.a.Fragment,null,e.map(function(r,e){return x<e+1?null:Ze.a.createElement("div",{key:r.value,className:Je()("".concat(X,"-dropdown-options"),{selected:L.some(function(e){return e.value===r.value})}),onMouseDown:function(){return function(t){if(G.current.searchValue=void 0,-1!==L.findIndex(function(e){return e.value===t.value})){var e=L.filter(function(e){return e.value!==t.value});return I&&void 0===b&&_(e),void(null!=P&&P(e.filter(function(e){return e}).map(function(e){return e.value}),e.filter(function(e){return e})))}e=ke()(G.current.editOptions||[]);null!=e&&e.splice(G.current.searchIndex||0,1,t),I?null!=P&&P((e||[]).filter(function(e){return e}).map(function(e){return e.value}),(e||[]).filter(function(e){return e})):null!=P&&P(t.value,t),null!=D&&D(t.value,t),void 0===b&&(G.current.editOptions=e,_((e||[]).filter(function(e){return e})))}(r)}},o.map(function(e,t){return Ze.a.createElement("span",{key:e.key,className:"".concat(X,"-dropdown-options-item"),title:r[e.key]},I&&a&&0===t&&Ze.a.createElement(Ce,{style:{marginRight:5},value:r.value,checked:L.some(function(e){return e.value===r.value})}),(n=r,e=e,"all"===S||S===e.key?ce(n[e.key]):n[e.key]),v&&o.length-1===t&&we(r));var n}))}))},Oe=Object(Qe.useCallback)(function(){return Ze.a.createElement("div",{className:"".concat(X,"-dropdown-empty")},Ze.a.createElement(lt,null))},[X]),h=iy(iy({popperStyle:function(){if(null!=Y&&Y.current)return{width:(null==j?void 0:j.width)||330,zIndex:1050}}(),placement:"bottomLeft"},c),{},{defaultVisible:h,visible:h,prefixCls:"".concat(X,"-dropdown-wrapper"),onVisibleChange:function(e){null!=R&&R(e),void 0!==t.visible||e&&!W||q(e)}});return rt(Ze.a.createElement("div",{className:s,ref:Y,style:i},Ze.a.createElement(qe,{ref:K,borderType:"none",disabled:f,onChange:J,placeholder:n,value:F,onDoubleClick:ie,onFocus:te,onBlur:ne}),u&&!W&&I&&Ze.a.createElement("span",{className:"".concat(X,"-total"),onClick:re},"共".concat(L.length,"项")),a&&!f&&Ze.a.createElement("span",{className:"".concat(X,"-detail"),onClick:oe},Ze.a.createElement(Ee,{type:"material"})),!f&&Ze.a.createElement("span",{className:"".concat(X,"-suffix"),onClick:ae},Ze.a.createElement(Ee,{type:"search"}))),Ze.a.createElement("div",{className:"".concat(X,"-dropdown")},G.current.searchValue?be(y,g,!0,!0):le()),h)});b.displayName="BaseData";var cy=b,ly=["size","style","className","target","href","underscore","children","prefix","suffix","disabled","onClick","prefixCls"],b=(C("large","middle","small"),Ze.a.forwardRef(function(e,t){var n=Object(Qe.useContext)(tt),r=n.getPrefixCls,o=n.prefixCls,a=n.compDefaultProps,i=et("Link",a,e),c=i.size,l=i.style,s=i.className,u=i.target,f=i.href,n=i.underscore,a=i.children,d=i.prefix,p=i.suffix,h=i.disabled,m=i.onClick,e=i.prefixCls,i=ee()(i,ly),t=t||Ze.a.createRef(),v=r(o,"link",e),c=Je()((e={},Xe()(e,"".concat(v),!0),Xe()(e,"".concat(v,"-size-").concat(c),c),e)),s=Je()(s,(e={},Xe()(e,"".concat(v,"-text"),!0),Xe()(e,"".concat(v,"-underscore"),n),Xe()(e,"".concat(v,"-disabled"),h),e)),n=Object(Qe.useMemo)(function(){return d?Ze.a.createElement("span",{className:"".concat(v,"-prefix")},d):null},[d,v]),e=Object(Qe.useMemo)(function(){return p?Ze.a.createElement("span",{className:"".concat(v,"-suffix")},p):null},[p,v]);return Ze.a.createElement("div",{style:l,className:c},n,Ze.a.createElement("a",Ge()({ref:t,target:u,disabled:h,href:f,className:s,onClick:function(e){h&&e.preventDefault(),m&&null!=m&&m(e)}},i),a),e)}));b.displayName="Link";var sy=b}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=433);function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var a,i});
|
|
202
|
+
*/function Lv(){var i,n,r,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a="cssVars(): ",p=fv({},Pv,o);function h(e,t,n,r){!p.silent&&window.console&&console.error("".concat(a).concat(e,"\n"),t),p.onError(e,t,n,r)}function m(e){!p.silent&&window.console&&console.warn("".concat(a).concat(e)),p.onWarning(e)}function c(e){p.onFinally(Boolean(e),Sv,Fv()-p.__benchmark)}if(kv){if(p.watch)return p.watch=Pv.watch,i=p,window.MutationObserver&&(Mv&&(Mv.disconnect(),Mv=null),(Mv=new MutationObserver(function(e){e.some(function(e){return function(e){var t=!1;{var n,r,o,a;"attributes"===e.type&&s(e.target)&&!l(e.target)&&(n="disabled"===e.attributeName,r="href"===e.attributeName,o="skip"===e.target.getAttribute("data-cssvars"),a="src"===e.target.getAttribute("data-cssvars"),n?t=!o&&!a:r&&(o?e.target.setAttribute("data-cssvars",""):a&&zv(i.rootElement,!0),t=!0))}return t}(e)||function(e){var t=!1;{var n;"childList"===e.type&&(n=u(e.target),e="out"===e.target.getAttribute("data-cssvars"),t=n&&!e)}return t}(e)||function(e){var t=!1;"childList"===e.type&&(t=[].slice.call(e.addedNodes).some(function(e){var t=1===e.nodeType&&e.hasAttribute("data-cssvars"),n=u(e)&&Nv.cssVars.test(e.textContent);return!t&&(s(e)||n)&&!l(e)}));return t}(e)||function(e){var t=!1;"childList"===e.type&&(t=[].slice.call(e.removedNodes).some(function(e){var t=1===e.nodeType,n=t&&"out"===e.getAttribute("data-cssvars"),r=t&&"src"===e.getAttribute("data-cssvars"),t=r;return(r||n)&&(e=e.getAttribute("data-cssvars-group"),e=i.rootElement.querySelector('[data-cssvars-group="'.concat(e,'"]')),r&&zv(i.rootElement,!0),e&&e.parentNode.removeChild(e)),t}));return t}(e)})&&Lv(i)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})),void Lv(p);if(!1===p.watch&&Mv&&(Mv.disconnect(),Mv=null),!p.__benchmark){if(Tv===p.rootElement)return void function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(Rv),Rv=setTimeout(function(){e.__benchmark=null,Lv(e)},t)}(o);var e=[].slice.call(p.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));p.__benchmark=Fv(),p.exclude=[Mv?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",p.exclude].filter(function(e){return e}).join(","),p.variables=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=/^-{2}/;return Object.keys(n).reduce(function(e,t){return e[r.test(t)?t:"--".concat(t.replace(/^-+/,""))]=n[t],e},{})}(p.variables),e.forEach(function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,n=t&&e.textContent!==e.__cssVars.text;t&&n&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))}),Mv||([].slice.call(p.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var t=e.getAttribute("data-cssvars-group");(t?p.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]')):null)||e.parentNode.removeChild(e)}),Av&&e.length<Av&&(Av=e.length,Dv.dom={}))}"loading"!==document.readyState?Sv&&p.onlyLegacy?(n=!1,p.updateDOM&&(r=p.rootElement.host||(p.rootElement===document?document.documentElement:p.rootElement),Object.keys(p.variables).forEach(function(e){var t=p.variables[e];n=n||t!==getComputedStyle(r).getPropertyValue(e),r.style.setProperty(e,t)})),c(n)):!Iv&&(p.shadowDOM||p.rootElement.shadowRoot||p.rootElement.host)?pv({rootElement:Pv.rootElement,include:Pv.include,exclude:p.exclude,skipDisabled:!1,onSuccess:function(e,t,n){return(!(t.sheet||{}).disabled||t.__cssVars)&&(e=((e=e.replace(Nv.cssComments,"").replace(Nv.cssMediaQueries,"")).match(Nv.cssVarDeclRules)||[]).join(""))||!1},onComplete:function(e,t,n){wv(e,{store:Dv.dom,onWarning:m}),Iv=!0,Lv(p)}}):(Tv=p.rootElement,pv({rootElement:p.rootElement,include:p.include,exclude:p.exclude,skipDisabled:!1,onBeforeSend:p.onBeforeSend,onError:function(e,t,n){var r=e.responseURL||_v(n,location.href),n=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");h("CSS XHR Error: ".concat(r," ").concat(e.status," ").concat(n),t,e,r)},onSuccess:function(e,t,n){if((t.sheet||{}).disabled&&!t.__cssVars)return!1;var r,o,a="link"===t.nodeName.toLowerCase(),i="style"===t.nodeName.toLowerCase()&&e!==t.textContent,t=p.onSuccess(e,t,n);return e=void 0!==t&&!1===Boolean(t)?"":t||e,p.updateURLs&&(a||i)&&(o=n,((r=e).replace(Nv.cssComments,"").match(Nv.cssUrls)||[]).forEach(function(e){var t=e.replace(Nv.cssUrls,"$1"),n=_v(t,o);r=r.replace(e,e.replace(t,n))}),e=r),e},onComplete:function(e,s){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],n=fv({},Dv.dom,Dv.user);if(Dv.job={},t.forEach(function(t,e){e=s[e];if(t.__cssVars=t.__cssVars||{},t.__cssVars.text=e,Nv.cssVars.test(e))try{var n=bv(e,{preserveStatic:p.preserveStatic,removeComments:!0});wv(n,{parseHost:Boolean(p.rootElement.host),store:Dv.dom,onWarning:m}),t.__cssVars.tree=n}catch(e){h(e.message,t)}}),fv(Dv.job,Dv.dom),p.updateDOM?(fv(Dv.user,p.variables),fv(Dv.job,Dv.user)):(fv(Dv.job,Dv.user,p.variables),fv(n,p.variables)),0<jv.job&&Boolean(Object.keys(Dv.job).length>Object.keys(n).length||Boolean(Object.keys(n).length&&Object.keys(Dv.job).some(function(e){return Dv.job[e]!==n[e]}))))zv(p.rootElement),Lv(p);else{var u=[],f=[],d=!1;if(p.updateDOM&&jv.job++,t.forEach(function(t,e){var n=!t.__cssVars.tree;if(t.__cssVars.tree)try{Cv(t.__cssVars.tree,fv({},p,{variables:Dv.job,onWarning:m}));var r,o,a,i,c,l=xv(t.__cssVars.tree);p.updateDOM?(r=s[e],o=Nv.cssVarFunc.test(r),t.getAttribute("data-cssvars")||t.setAttribute("data-cssvars","src"),l.length&&o&&(a=t.getAttribute("data-cssvars-group")||++jv.group,i=l.replace(/\s/g,""),c=p.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(a,'"]'))||document.createElement("style"),d=d||Nv.cssKeyframes.test(l),p.preserveStatic&&t.sheet&&(t.sheet.disabled=!0),c.hasAttribute("data-cssvars")||c.setAttribute("data-cssvars","out"),i===t.textContent.replace(/\s/g,"")?(n=!0,c&&c.parentNode&&(t.removeAttribute("data-cssvars-group"),c.parentNode.removeChild(c))):i!==c.textContent.replace(/\s/g,"")&&([t,c].forEach(function(e){e.setAttribute("data-cssvars-job",jv.job),e.setAttribute("data-cssvars-group",a)}),c.textContent=l,u.push(l),f.push(c),c.parentNode||t.parentNode.insertBefore(c,t.nextSibling)))):t.textContent.replace(/\s/g,"")!==l&&u.push(l)}catch(e){h(e.message,t)}n&&t.setAttribute("data-cssvars","skip"),t.hasAttribute("data-cssvars-job")||t.setAttribute("data-cssvars-job",jv.job)}),Av=p.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,p.shadowDOM)for(var r,o=[].concat(p.rootElement).concat([].slice.call(p.rootElement.querySelectorAll("*"))),a=0;r=o[a];++a)r.shadowRoot&&r.shadowRoot.querySelector("style")&&Lv(fv({},p,{rootElement:r.shadowRoot}));p.updateDOM&&d&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(t){for(var n=e.getElementsByTagName("*"),r=[],o="__CSSVARSPONYFILL-KEYFRAMES__",a=0,i=n.length;a<i;a++){var c=n[a];"none"!==getComputedStyle(c)[t]&&(c.style[t]+=o,r.push(c))}document.body.offsetHeight;for(var l=0,s=r.length;l<s;l++){var u=r[l].style;u[t]=u[t].replace(o,"")}}}(p.rootElement),Tv=!1,p.onComplete(u.join(""),f,JSON.parse(JSON.stringify(Dv.job)),Fv()-p.__benchmark),c(f.length)}}})):document.addEventListener("DOMContentLoaded",function e(t){Lv(o),document.removeEventListener("DOMContentLoaded",e)})}function l(e){var t=s(e)&&e.hasAttribute("disabled"),e=(e.sheet||{}).disabled;return t||e}function s(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function u(e){return"style"===e.nodeName.toLowerCase()}}function _v(e,t){var n=1<arguments.length&&void 0!==t?t:location.href,r=document.implementation.createHTMLDocument(""),o=r.createElement("base"),t=r.createElement("a");return r.head.appendChild(o),r.body.appendChild(t),o.href=n,t.href=e,t.href}function Fv(){return kv&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function zv(e,t){t=1<arguments.length&&void 0!==t&&t;[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach(function(e){return e.setAttribute("data-cssvars","")}),t&&(Dv.dom={})}Lv.reset=function(){for(var e in jv.job=0,jv.group=0,Tv=!1,Mv&&(Mv.disconnect(),Mv=null),Av=0,Rv=null,Iv=!1,Dv)Dv[e]={}};var Bv=Lv,Hv=new Bd.a;function Vv(e){var a=Object(Qe.useRef)(null),t=e.row,i=e.rowIndex,n=e.domHelper,e=e.renderDetail,c=n.artTable;return Object(Qe.useEffect)(function(){function e(e){return Fd()(e=Fd()(e=".".concat(e," .")).call(e,Eh.tableRow,'[data-rowindex="')).call(e,i,'"]')}var t=a.current&&a.current.getBoundingClientRect(),n=c.querySelector(e(Eh.tableBody)),r=c.querySelector(e(Eh.fixedLeft)),o=c.querySelector(e(Eh.fixedRight));t.height&&(n&&(n.style.height=t.height+"px"),r&&(r.style.height=t.height+"px"),o&&(o.style.height=t.height+"px"))},[]),Object(Qe.useEffect)(function(){var e=n.getRowTop(i)||0;a.current.style.transform="translateY(".concat(e+"px",")")}),Ze.a.createElement("div",{ref:a,className:Eh.rowDetailItem},e(t,i))}function Wv(e){return Hv.get(e)}function Uv(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qv(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yv(n){var r=function(){if("undefined"==typeof Reflect||!Mh.a)return!1;if(Mh.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Mh()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=Ih()(n);return t=r?(e=Ih()(this).constructor,Mh()(t,arguments,e)):t.apply(this,arguments),Rh()(this,t)}}$p.isIE&&(Hv.set("header",function(e,t){var n=t.stickyTop,r=t.hasHeader,o=_d()(e),a=e.nested,i=e.visible,c=e.hasLockColumn,l=o.left,s=o.right,t=a.left,o=a.right,a=Cm(a.full)+1;return Ze.a.createElement("div",{className:Je()(Eh.tableHeader)},Ze.a.createElement("div",{className:Je()(Eh.tableHeaderMain,"no-scrollbar"),style:{top:0===n?void 0:n,display:r?void 0:"none"}},Ze.a.createElement(Tm,{info:e,theaderPosition:c?"center":void 0})),0<l.length?Ze.a.createElement("div",{className:Eh.fixedLeft},Ze.a.createElement(Tm,{info:Ed()(Ed()({},e),{flat:{center:l,full:l,left:[],right:[]},nested:{center:t,full:t,left:[],right:[]},visible:jd()(i).call(i,0,l.length),horizontalRenderRange:{leftIndex:0,leftBlank:0,rightIndex:l.length,rightBlank:0}}),theaderPosition:"left",rowCount:a})):null,0<s.length?Ze.a.createElement("div",{className:Eh.fixedRight},Ze.a.createElement(Tm,{info:Ed()(Ed()({},e),{flat:{center:s,full:s,left:[],right:[]},nested:{center:o,full:o,left:[],right:[]},visible:jd()(i).call(i,i.length-s.length),horizontalRenderRange:{leftIndex:0,leftBlank:0,rightIndex:s.length,rightBlank:0}}),theaderPosition:"right",rowCount:a})):null)}),Hv.set("body",function(e,t,n){var r=t.dataSource,o=t.getRowProps,a=t.primaryKey,i=(p=e.verticalRenderRange).topIndex,c=p.bottomBlank,l=p.topBlank,s=p.bottomIndex,u=_d()(e),f=e.visible,d=e.hasLockColumn,t=u.left,p=u.right,u={first:0,offset:i,limit:s,last:r.length-1},i={getRowProps:uh(o,n.rowProps),primaryKey:a,data:jd()(r).call(r,i,s)},s={right:-(n.hasScrollY?ch().width:0)};return Ze.a.createElement("div",{className:Je()(Eh.tableBody,Eh.horizontalScrollContainer)},Ze.a.createElement("div",{className:Eh.virtual},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:d?"center":void 0,horizontalRenderInfo:e,verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})),0<t.length?Ze.a.createElement("div",{className:Eh.fixedLeft},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:"left",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:t,full:t,left:[],right:[]},visible:jd()(f).call(f,0,t.length)}),verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})):null,0<p.length?Ze.a.createElement("div",{className:Eh.fixedRight,style:s},0<l&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:l}}),Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tbody"},i,{tbodyPosition:"right",hasScrollY:n.hasScrollY,horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:p,full:p,left:[],right:[]},visible:jd()(f).call(f,f.length-p.length)}),verticalRenderInfo:u})),0<c&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:c}})):null,Ze.a.createElement("div",{className:Eh.rowDetailContainer}))}),Hv.set("footer",function(e,t,n){var r=void 0===(l=t.footerDataSource)?[]:l,o=t.getRowProps,a=t.primaryKey,i=t.stickyBottom,c=uh(o,n.rowProps),l=_d()(e),t=e.visible,o=e.hasLockColumn,n=l.left,l=l.right,r={data:r,getRowProps:c,primaryKey:a,verticalRenderInfo:{offset:0,first:0,last:r.length-1,limit:1/0}};return Ze.a.createElement("div",{className:Je()(Eh.tableFooter),style:{bottom:0===i?void 0:i}},Ze.a.createElement("div",{className:Je()(Eh.tableFooterMain,Eh.horizontalScrollContainer)},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:o?"center":void 0,horizontalRenderInfo:e}))),0<n.length?Ze.a.createElement("div",{className:Eh.fixedLeft},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:"left",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:n,full:n,left:[],right:[]},visible:jd()(t).call(t,0,n.length)})}))):null,0<l.length?Ze.a.createElement("div",{className:Eh.fixedRight},Ze.a.createElement(cv,Ed()({tbodyHtmlTag:"tfoot"},r,{tbodyPosition:"right",horizontalRenderInfo:Ed()(Ed()({},e),{flat:{center:l,full:l,left:[],right:[]},visible:jd()(t).call(t,t.length-l.length)})}))):null)}),Hv.set("rowDetail",function(e){var t=e.domHelper;if(t){t=t.artTable,t=t&&t.querySelector(".".concat(Eh.rowDetailContainer));return X.a.createPortal(Ze.a.createElement(Vv,Ed()({},e)),t)}}));var Kv=!1;var Gv=function(e){Ah()(n,e);var t=Yv(n);function n(e){var d;return Cd()(this,n),(d=t.call(this,e)).rowHeightManager=nv(d.props.dataSource.length,d.props.estimatedRowHeight),d.artTableWrapperRef=Ze.a.createRef(),d.rootSubscription=new op,d.hasScrollY=!1,d.resizeSubject=new Hp,d.getRowNodeListByEvent=function(e){var t,n,r=null,o=e.currentTarget.dataset.rowindex;return void 0!==o&&(t=(n=d.domHelper).tableBody,n=n.tableFooter,r=(t.contains(e.currentTarget)?t:n).querySelectorAll('tr[data-rowindex="'.concat(o,'"]'))),r},d.handleRowMouseEnter=function(e){e=d.getRowNodeListByEvent(e);e&&e.forEach(function(e){e.classList.add("row-hover")})},d.handleRowMouseLeave=function(e){e=d.getRowNodeListByEvent(e);e&&e.forEach(function(e){e.classList.remove("row-hover")})},d.renderTableBody=function(e){var t=d.props,n=t.dataSource,r=t.getRowProps,o=t.primaryKey,a=t.isLoading,i=t.emptyCellHeight,c=(t.footerDataSource,Je()(Eh.tableBody,Eh.horizontalScrollContainer)),t=$p.isIE||$p.isEdge?{overflow:"hidden"}:{};if(0===n.length){var l=d.props,s=l.components,u=l.emptyContent,f=s.EmptyContent;return null==f&&null!=u&&(Kv||(Kv=!0,Hd.warn("BaseTable props.emptyContent 已经过时,请使用 props.components.EmptyContent 来自定义数据为空时的表格表现")),f=function(){return u}),Ze.a.createElement("div",{className:Je()(c,"empty")},Ze.a.createElement("div",{className:Eh.virtual,style:t},Ze.a.createElement(xm,{descriptors:e.visible,isLoading:a,EmptyContent:f,emptyCellHeight:i})))}l=e.verticalRenderRange,s=l.topIndex,a=l.bottomBlank,f=l.topBlank,i=l.bottomIndex,l=Wv("body");return"function"==typeof l?l(e,d.props,{rowProps:{onMouseEnter:d.handleRowMouseEnter,onMouseLeave:d.handleRowMouseLeave},hasScrollY:d.hasScrollY}):Ze.a.createElement("div",{className:c},Ze.a.createElement("div",{className:Eh.virtual,style:t},0<f&&Ze.a.createElement("div",{key:"top-blank",className:Je()(Eh.virtualBlank,"top"),style:{height:f}}),Ze.a.createElement(cv,{tbodyHtmlTag:"tbody",getRowProps:r,primaryKey:o,data:jd()(n).call(n,s,i),hasScrollY:d.hasScrollY,horizontalRenderInfo:e,verticalRenderInfo:{first:0,offset:s,limit:i,last:n.length-1}}),0<a&&Ze.a.createElement("div",{key:"bottom-blank",className:Je()(Eh.virtualBlank,"bottom"),style:{height:a}})))},d.state={hasScroll:!0,hasScrollY:!0,needRenderLock:!0,offsetY:0,offsetX:0,maxRenderHeight:600,maxRenderWidth:800},d}return kd()(n,[{key:"getDoms",value:function(){return Hd.warn("[kd-table] BaseTable.getDoms() 已经过时"),this.domHelper}},{key:"updateStickyScroll",value:function(){var e,t,n,r=this.domHelper,o=r.stickyScroll,a=r.artTable,i=r.stickyScrollItem,c=this.hasScrollY;a&&(n=this.domHelper.getTableBodyHtmlTable().offsetWidth,r=a.offsetWidth,a="auto"===(a=this.props.stickyScrollHeight)?ch().height:a,o.style.height="".concat(a,"px"),n<=r?this.state.hasScroll&&this.setState({hasScroll:!1}):!this.state.hasScroll&&5<a&&this.setState({hasScroll:!0}),this.domHelper.virtual.offsetHeight>this.domHelper.tableBody.offsetHeight?this.hasScrollY=!0:(o.style.paddingRight="".concat(a,"px"),this.hasScrollY=!1),c!==this.hasScrollY&&null!==(t=(e=this.props).setTableWidth)&&void 0!==t&&t.call(e,this.domHelper.tableBody.clientWidth),i.style.width="".concat(n,"px"))}},{key:"renderTableHeader",value:function(e){var t=this.props,n=t.stickyTop,r=t.hasHeader,t=Wv("header");return"function"==typeof t?t(e,this.props):Ze.a.createElement("div",{className:Je()(Eh.tableHeader,"no-scrollbar"),style:{top:0===n?void 0:n,display:r?void 0:"none"}},Ze.a.createElement(Tm,{info:e}),Ze.a.createElement("div",{className:Eh.verticalScrollPlaceholder,style:this.hasScrollY?{width:ch().width}:void 0}))}},{key:"updateOffsetX",value:function(e){this.lastInfo.useVirtual.horizontal&&Math.abs(e-this.state.offsetX)>=eh/2&&this.setState({offsetX:e})}},{key:"syncHorizontalScrollFromTableBody",value:function(){this.syncHorizontalScroll(this.domHelper.virtual.scrollLeft)}},{key:"syncHorizontalScroll",value:function(e){this.updateOffsetX(e);var t=_d()(this.lastInfo),n=this.domHelper.getLeftLockShadow();n&&(0<t.left.length&&this.state.needRenderLock&&0<e?n.classList.add("show-shadow"):n.classList.remove("show-shadow"));n=this.domHelper.getRightLockShadow();n&&(0<t.right.length&&this.state.needRenderLock&&e<this.domHelper.virtual.scrollWidth-this.domHelper.virtual.clientWidth?n.classList.add("show-shadow"):n.classList.remove("show-shadow"))}},{key:"getVerticalRenderRange",value:function(e){var t=this.props.dataSource,n=this.state,r=n.offsetY,n=n.maxRenderHeight,t=t.length;return e.vertical?this.rowHeightManager.getRenderRange(r,n,t):{topIndex:0,topBlank:0,bottomIndex:t,bottomBlank:0}}},{key:"renderTableFooter",value:function(e){var t=this.props,n=t.footerDataSource,r=void 0===n?[]:n,o=t.getRowProps,a=t.primaryKey,n=t.stickyBottom,t=Wv("footer");return"function"==typeof t?t(e,this.props,{rowProps:{onMouseEnter:this.handleRowMouseEnter,onMouseLeave:this.handleRowMouseLeave}}):Ze.a.createElement("div",{className:Je()(Eh.tableFooter,Eh.horizontalScrollContainer),style:{bottom:0===n?void 0:n}},Ze.a.createElement(cv,{tbodyHtmlTag:"tfoot",data:r,horizontalRenderInfo:e,getRowProps:o,primaryKey:a,verticalRenderInfo:{offset:0,first:0,last:r.length-1,limit:1/0}}),Ze.a.createElement("div",{className:Eh.verticalScrollPlaceholder,style:this.hasScrollY?{width:ch().width,visibility:"initial"}:void 0}))}},{key:"renderLockShadows",value:function(e){return Ze.a.createElement(Ze.a.Fragment,null,Ze.a.createElement("div",{className:Eh.lockShadowMask,style:{left:0,width:e.leftLockTotalWidth+20}},Ze.a.createElement("div",{className:Je()(Eh.lockShadow,Eh.leftLockShadow)})),Ze.a.createElement("div",{className:Eh.lockShadowMask,style:{right:0,width:e.rightLockTotalWidth+20}},Ze.a.createElement("div",{className:Je()(Eh.lockShadow,Eh.rightLockShadow)})))}},{key:"renderStickyScroll",value:function(e){var t=this.props,n=t.hasStickyScroll,r=t.stickyBottom,t=this.state.hasScroll;return Ze.a.createElement("div",{className:Je()(Eh.stickyScroll,Eh.horizontalScrollContainer),style:{display:n&&t?"block":"none",bottom:r}},Ze.a.createElement("div",{className:Eh.stickyScrollItem}))}},{key:"render",value:function(){var e=yh(this);this.lastInfo=e;var t=this.props,n=t.dataSource,r=t.className,o=t.style,a=t.hasHeader,i=t.useOuterBorder,c=t.isStickyHead,l=t.isStickyHeader,s=t.isStickyFooter,u=t.isLoading,f=t.getTableProps,d=t.footerDataSource,t=t.components,r=Je()(Eh.artTableWrapper,{"use-outer-border":i,empty:0===n.length,lock:e.hasLockColumn,"has-header":a,"sticky-header":null!=l?l:c,"has-footer":0<d.length,"sticky-footer":s,"ie-polyfill-wrapper":$p.isIE},r),o=Od()({className:r,style:o},Jp,this.artTableWrapperRef);return Ze.a.createElement(Sh,Ed()({},o),Ze.a.createElement(uv,{visible:u,LoadingIcon:t.LoadingIcon,LoadingContentWrapper:t.LoadingContentWrapper},Ze.a.createElement("div",Ed()({className:Eh.artTable},f()),this.renderTableHeader(e),this.renderTableBody(e),this.renderTableFooter(e),this.renderLockShadows(e)),this.renderStickyScroll(e)))}},{key:"componentDidMount",value:function(){this.updateDOMHelper(),this.props$=new Wp(this.props),this.initSubscriptions(),this.didMountOrUpdate();var e=this.props,t=e.cssVariables,e=e.enableCSSVariables;e=(t={variables:t||{},enableCSSVariables:e}).variables,!1!==t.enableCSSVariables&&Bv({include:"style[data-styled]",variables:Ed()({},kh,e),watch:!0,silent:!0}),null!==(e=(t=this.props).setTableWidth)&&void 0!==e&&e.call(t,this.domHelper.tableBody.clientWidth),null!==(t=(e=this.props).setTableDomHelper)&&void 0!==t&&t.call(e,this.domHelper)}},{key:"componentDidUpdate",value:function(e,t){this.updateDOMHelper(),this.props$.next(this.props),this.didMountOrUpdate(e,t)}},{key:"didMountOrUpdate",value:function(e,t){this.syncHorizontalScrollFromTableBody(),this.updateStickyScroll(),this.adjustNeedRenderLock(),this.updateRowHeightManager(),this.updateScrollLeftWhenLayoutChanged(e,t)}},{key:"updateScrollLeftWhenLayoutChanged",value:function(e,t){null!=t&&!t.hasScroll&&this.state.hasScroll&&(this.domHelper.stickyScroll.scrollLeft=0),null!=e&&(t=0<e.footerDataSource.length,e=0<this.props.footerDataSource.length,!t&&e&&(fh(this.domHelper).scrollLeft=this.domHelper.tableBody.scrollLeft))}},{key:"initSubscriptions",value:function(){var t,n,r=this,e=this.domHelper,o=e.virtual,a=e.stickyScroll;this.rootSubscription.add(oh.subscribe(function(){r.updateStickyScroll(),r.adjustNeedRenderLock()})),this.resizeSubject.pipe((t=100,void 0===n&&(n=_p),function(e){return e.lift(new Wh(t,n))})).subscribe(function(){var e,t;null!==(t=(e=r.props).setTableWidth)&&void 0!==t&&t.call(e,r.domHelper.tableBody.clientWidth)});this.resizeObserver=ah(this.domHelper.artTableWrapper,function(){r.resizeSubject.next()}),this.rootSubscription.add(lh([(e=this.domHelper,$p.isIE?e.tableHeaderMain:e.tableHeader),o,fh(this.domHelper),a],function(e){r.syncHorizontalScroll(e)}));var i,c,a=ev(this.domHelper.virtual,this.props$.pipe((c=1,function(e){return e.lift(new Yh(c))}),(i="structure-may-change",function(e){return e.lift(new Gh(i))})),this.props.virtualDebugLabel).pipe(om());this.rootSubscription.add(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return Lh(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),Fh(e=1===e.length&&tp(e[0])?e[0]:e,r).lift(new Bh(n))}([a.pipe(Pp(function(e){return e.clipRect}),am(sh)),this.props$.pipe(pm(null),function(e){return e.lift(new hm)},vm(function(e){var t=xd()(e,2),e=t[0],t=t[1];return null==e||!e.isLoading&&t.isLoading}))]).subscribe(function(e){var t=xd()(e,1)[0],e=r.domHelper.getLoadingIndicator();e&&(t=t.bottom-t.top,e.style.top="".concat(t/2,"px"),e.style.marginTop="".concat(t/2,"px"))})),this.rootSubscription.add(a.pipe(vm(function(){var e=r.lastInfo.useVirtual,t=e.horizontal,e=e.vertical;return t||e}),Pp(function(e){var t=e.clipRect,e=e.offsetY;return{maxRenderHeight:t.bottom-t.top,maxRenderWidth:t.right-t.left,offsetY:e}}),am(function(e,t){return Math.abs(e.maxRenderWidth-t.maxRenderWidth)<eh/2&&Math.abs(e.maxRenderHeight-t.maxRenderHeight)<eh/2&&Math.abs(e.offsetY-t.offsetY)<eh/2})).subscribe(function(e){r.setState(e)}))}},{key:"componentWillUnmount",value:function(){var e;null!==(e=this.resizeObserver)&&void 0!==e&&e.disconnect(),this.rootSubscription.unsubscribe(),this.resizeSubject.unsubscribe()}},{key:"updateDOMHelper",value:function(){this.domHelper=new rv(this.artTableWrapperRef.current)}},{key:"updateRowHeightManager",value:function(){var e,t=this.domHelper.getVirtualTop(),n=null!==(t=null==t?void 0:t.clientHeight)&&void 0!==t?t:0,r=-1,o=-1,a=0,i=Uv(this.domHelper.getTableRows());try{for(i.s();!(e=i.n()).done;){var c,l,s=e.value,u=Number(s.dataset.rowindex);isNaN(u)||(r=Math.max(r,u),c=s.offsetTop+n,0===(l=s.offsetHeight)&&(a+=1),o=Math.max(o,c+l),this.rowHeightManager.updateRow(u,c,l))}}catch(e){i.e(e)}finally{i.f()}-1!==r&&0===a&&o<this.state.offsetY+this.state.maxRenderHeight&&this.getVerticalRenderRange(this.lastInfo.useVirtual).bottomIndex-1>r&&this.forceUpdate()}},{key:"adjustNeedRenderLock",value:function(){var e=this.state.needRenderLock,t=this.lastInfo,n=_d()(t);t.hasLockColumn?e!==(n=th(Sd()(n=n.full).call(n,function(e){return e.width}))>this.domHelper.artTable.clientWidth)&&this.setState({needRenderLock:n}):e&&this.setState({needRenderLock:!1})}}]),n}(Ze.a.Component);Gv.defaultProps={hasHeader:!0,isStickyHeader:!0,stickyTop:0,footerDataSource:[],isStickyFooter:!0,stickyBottom:0,hasStickyScroll:!0,stickyScrollHeight:"auto",useVirtual:"auto",estimatedRowHeight:48,isLoading:!1,components:{},getTableProps:Vh,getRowProps:Vh,dataSource:[],useOuterBorder:!0};n(825);function Xv(e,t){return e===t}function $v(){return function(e){var m=e.getDataSource();return e.mapColumns(xh(function(e,t){var n=t.startIndex,r=t.endIndex;if(null===(t=e.features)||void 0===t||!t.autoRowSpan)return e;if(!Vd(e))return e;for(var o="function"==typeof e.features.autoRowSpan?e.features.autoRowSpan:Xv,a=[],i=0,c=null,l=null,s=0;s<m.length;s++){var u=m[s],f=av.safeGetValue(e,u,s);if(0===s||!o(c,f,l,u)){for(var d={top:i,bottom:s,left:n,right:r},p=i;p<s;p++)a.push(d);i=s}c=f,l=u}for(var h=i;h<m.length;h++)a.push({top:i,bottom:m.length,left:n,right:r});return Ed()(Ed()({},e),{getSpanRect:function(e,t,n){return a[n]}})}))}}var H=n(229),Qv=n.n(H);function Zv(n,r){var o=[];return n.forEach(function(e,t){o.push.apply(o,Ld()(r(e,t,n)))}),o}var Jv={diff:function(e,t){var n=new Yd.a(t);return zd()(e).call(e,function(e){return!n.has(e)})},merge:function(e,t){var n=new Yd.a(e);return Fd()(e).call(e,zd()(t).call(t,function(e){return!n.has(e)}))}};function e0(e){return function(){return e}}function t0(e,t){for(var n=0,r=e.length,o=[];n<r||o.length;){var a,i=e[n++]||o.pop();if(t(i,n))return i;i.children&&Md()(o).apply(o,Fd()(a=[0,0]).call(a,Ld()(i.children)))}return null}function n0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function r0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o0(e,t,n){function r(e){if(a.has(e))return a.get(e);var t={id:e,parent:null,item:null,children:[]};return a.set(e,t),t}var o,a=new Bd.a,i=n0(n);try{for(i.s();!(o=i.n()).done;){var c=o.value,l=r(c[t]),s=r(c[e]);(s.parent=l).children.push(s),s.item=c}}catch(e){i.e(e)}finally{i.f()}return function e(t){var n=[];var r,o=n0(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;0===a.children.length?n.push(a.item):n.push(Ed()(Ed()({},a.item),{children:e(a.children)}))}}catch(e){o.e(e)}finally{o.f()}return n}(Zv(zd()(n=Ad()(Qv()(a).call(a))).call(n,function(e){return null==e.parent}),function(e){return e.children}))}function a0(t,n){return function(e){return e.mapDataSource(function(e){return o0(t,n,e)})}}function i0(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="columnHover";return function(n){function i(e){var t;n.setStateAtKey(o,e),null!==(t=r.onChangeHoverColIndex)&&void 0!==t&&t.call(r,e)}var e,c=null!==(e=r.hoverColor)&&void 0!==e?e:"var(--hover-bgcolor)",l=null!==(e=null!==(e=null!==(e=r.hoverColIndex)&&void 0!==e?e:n.getStateAtKey(o))&&void 0!==e?e:r.defaultHoverColIndex)&&void 0!==e?e:-1;return n.mapColumns(xh(function(e,t){var r={start:t.startIndex,end:t.endIndex};if(!Vd(e))return e;var o=r.start<=l&&l<r.end,a=e.getCellProps;return Ed()(Ed()({},e),{getCellProps:function(e,t,n){return Dd(null==a?void 0:a(e,t,n),{style:{"--bgcolor":o?c:void 0},onMouseEnter:function(){i(r.start)},onMouseLeave:function(){i(-1)}})}})}))}}var c0={start:-1,end:-1};function l0(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="columnHover";return function(n){function i(e){var t;n.setStateAtKey(o,e),null!==(t=r.onChangeHoverRange)&&void 0!==t&&t.call(r,e)}var e,c=null!==(e=null!==(e=null!==(e=r.hoverRange)&&void 0!==e?e:n.getStateAtKey(o))&&void 0!==e?e:r.defaultHoverRange)&&void 0!==e?e:c0,l=null!==(e=r.hoverColor)&&void 0!==e?e:"var(--hover-bgcolor)",s=null!==(e=r.headerHoverColor)&&void 0!==e?e:"var(--header-hover-bgcolor)";return n.mapColumns(xh(function(e,t){var r={start:t.startIndex,end:t.endIndex},o=r.end>c.start&&c.end>r.start;if(!Vd(e))return null==s?e:Ed()(Ed()({},e),{headerCellProps:Dd(e.headerCellProps,{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--header-bgcolor":o?s:void 0}})});var a=e.getCellProps;return Ed()(Ed()({},e),{headerCellProps:Dd(e.headerCellProps,{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--header-bgcolor":o?s:void 0}}),getCellProps:function(e,t,n){return Dd(null==a?void 0:a(e,t,n),{onMouseEnter:function(){i(r)},onMouseLeave:function(){i(c0)},style:{"--bgcolor":o?l:void 0}})}})}))}}function s0(){var y=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(a){var i="multiSelect",c=a.ctx.components.Checkbox;if(null==c)throw new Error("使用 multiSelect 之前需要设置 pipeline.ctx.components.Checkbox");var l=a.ensurePrimaryKey("multiSelect"),s=null!==(r=y.isDisabled)&&void 0!==r?r:e0(!1),u=null!==(r=y.clickArea)&&void 0!==r?r:"checkbox",f=null!==(n=null!==(r=null!==(r=y.value)&&void 0!==r?r:null===(n=a.getStateAtKey(i))||void 0===n?void 0:n.value)&&void 0!==r?r:y.defaultValue)&&void 0!==n?n:[],d=null!==(r=null!==(n=null!==(r=y.lastKey)&&void 0!==r?r:null===(e=a.getStateAtKey(i))||void 0===e?void 0:e.lastKey)&&void 0!==n?n:y.defaultLastKey)&&void 0!==r?r:"",p=function(e,t,n,r){var o;null!==(o=y.onChange)&&void 0!==o&&o.call(y,e,t,n,r),a.setStateAtKey(i,{value:e,lastKey:t},{keys:n,action:r})},e=a.getDataSource(),h=new Yd.a,m=[];e.forEach(function(e,t){var n=av.safeGetRowKey(l,e,t);h.add(n),s(e,t)||m.push(n)});var t,n,r,v=new Yd.a(f);return y.checkboxColumn&&!0===y.checkboxColumn.hidden||(t=0<m.length&&m.every(function(e){return v.has(e)}),n=m.some(function(e){return v.has(e)}),r=Ze.a.createElement(c,{checked:t,indeterminate:!t&&n,onChange:function(e){t?p(Jv.diff(f,m),"",m,"uncheck-all"):p(Jv.merge(f,m),"",m,"check-all")}}),e=Ed()(Ed()({name:"是否选中",title:r,width:50,align:"center"},y.checkboxColumn),{getCellProps:function(e,t,n){var r,o,a,i=av.safeGetRowKey(l,t,n),c={},e=null===(o=null===(r=y.checkboxColumn)||void 0===r?void 0:r.getCellProps)||void 0===o?void 0:o.call(r,e,t,n);return h.has(i)&&"cell"===u&&(a=v.has(i),c={style:{cursor:(n=s(t,n))?"not-allowed":"pointer"},onClick:n?void 0:function(e){y.stopClickEventPropagation&&e.stopPropagation(),g(a,i,e.shiftKey)}}),Dd(e,c)},render:function(e,t,n){var r=av.safeGetRowKey(l,t,n),o=v.has(r);return Ze.a.createElement(c,{checked:o,disabled:s(t,n),onChange:"checkbox"===u?function(e,t){e=null!==(t=null==t?void 0:t.nativeEvent)&&void 0!==t?t:e.nativeEvent;e&&(y.stopClickEventPropagation&&e.stopPropagation(),g(o,r,e.shiftKey))}:void 0})}}),r=jd()(n=a.getColumns()).call(n),"start"===(null!==(n=y.checkboxPlacement)&&void 0!==n?n:"start")?r.unshift(e):r.push(e),a.columns(r)),a.appendRowPropsGetter(function(e,t){var n=av.safeGetRowKey(l,e,t);if(h.has(n)){var r,o,a={},i=v.has(n);return y.highlightRowWhenSelected&&i&&(r="highlight"),"row"===u&&(s(e,t)||(a.cursor="pointer",o=function(e){y.stopClickEventPropagation&&e.stopPropagation(),g(i,n,e.shiftKey)})),{className:r,style:a,onClick:o}}}),a;function g(e,t,n){var r,o=[t];n&&d&&(n=(r=m.indexOf(d))<(n=m.indexOf(t))?[r,n]:[n,r],n=(r=xd()(n,2))[0],r=r[1],o=jd()(m).call(m,n,r+1)),e?p(Jv.diff(f,o),t,o,"uncheck"):p(Jv.merge(f,o),t,o,"check")}}}var H=n(141),u0=n.n(H),H=n(100),f0=n.n(H),d0=E.c.div(b()(["\n display: inline-flex;\n align-items: center;\n"])),p0=Object(E.c)(d0)(b()(["\n &."," {\n cursor: default;\n }\n\n .expansion-icon {\n fill: #999;\n flex: 0 0 16px;\n transition: transform 200ms;\n\n &."," {\n transform-origin: center center;\n transform: rotate(90deg);\n }\n }\n"]),Eh.leaf,Eh.expanded);var h0={Loading:function(e){return Ze.a.createElement("svg",Ed()({width:"16",height:"16",fill:"currentColor",viewBox:"0 0 1024 1024"},e),Ze.a.createElement("path",{d:"M512 74.667c-17.067 0-32 14.933-32 32V256c0 17.067 14.933 32 32 32s32-14.933 32-32V106.667c0-17.067-14.933-32-32-32zm181.333 288c8.534 0 17.067-2.134 23.467-8.534L821.333 249.6c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L672 309.333c-12.8 12.8-12.8 32 0 44.8 4.267 6.4 12.8 8.534 21.333 8.534zm224 117.333H768c-17.067 0-32 14.933-32 32s14.933 32 32 32h149.333c17.067 0 32-14.933 32-32s-14.933-32-32-32zM714.667 669.867c-12.8-12.8-32-12.8-44.8 0s-12.8 32 0 44.8L774.4 819.2c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L714.667 669.867zM512 736c-17.067 0-32 14.933-32 32v149.333c0 17.067 14.933 32 32 32s32-14.933 32-32V768c0-17.067-14.933-32-32-32zm-202.667-66.133L204.8 774.4c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533l104.534-104.533c12.8-12.8 12.8-32 0-44.8s-36.267-12.8-46.934 0zM288 512c0-17.067-14.933-32-32-32H106.667c-17.067 0-32 14.933-32 32s14.933 32 32 32H256c17.067 0 32-14.933 32-32zm-40.533-309.333c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8L307.2 352c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L247.467 202.667z"}))},CaretDown:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 32 32"},e),Ze.a.createElement("path",{d:"M24 12L16 22 8 12z"}))},CaretRight:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 32 32"},e),Ze.a.createElement("path",{d:"M12 8L22 16 12 24z"}))},Info:function(e){return Ze.a.createElement("svg",Ed()({focusable:"false",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 16 16"},e),Ze.a.createElement("path",{d:"M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"}),Ze.a.createElement("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}))}},m0=E.c.div(b()(["\n &.","{\n border: 1px solid #e9ecf1;\n border-radius: 2px;\n background-color: #Fff;\n box-shadow: 0px 0px 5px 0px rgb(154 154 154 / 50%);\n cursor: default;\n font-size: 13px;\n position:absolute;\n z-index: 1050;\n width:120px;\n }\n\n .","{\n width:100%;\n display: table;\n }\n\n ."," .","{\n display: table-row;\n color: #666666;\n }\n\n ."," .","{\n background-color: #f5f5f5;\n }\n\n ."," ."," .","{\n display: table-cell;\n padding: 5px 8px;\n }\n ."," .",".","{\n opacity: .5;\n }\n\n"]),Ch.menu,Ch.menuList,Ch.menuList,Ch.menuOption,Ch.menuList,Ch.menuOptionActive,Ch.menuList,Ch.menuOption,Ch.menuOptionText,Ch.menuList,Ch.menuOption,Ch.menuOptionDisable),v0=Rd()("row-detail"),g0=function(){return Ze.a.createElement("div",{style:{margin:"8px 24px"}},Ze.a.createElement("b",{style:{color:"indianred"}},"设置 ",Ze.a.createElement("code",null,"rowDetail.renderDetail")," 来自定义详情内容"))};function y0(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(s){function n(e,t,n){var r;null!==(r=b.onChangeOpenKeys)&&void 0!==r&&r.call(b,e,t,n),s.setStateAtKey("rowDetail",e,{key:t,action:n})}var e,t,u=null!==(e=b.rowDetailMetaKey)&&void 0!==e?e:v0,f=s.ensurePrimaryKey("rowDetail"),d=s.ctx.indents,p=d.iconIndent+d.iconWidth+d.iconGap,h=null!==(e=b.clickArea)&&void 0!==e?e:"cell",r=null!==(e=b.getDetailKey)&&void 0!==e?e:function(e,t){return av.safeGetRowKey(f,e,t)+"_detail"},m=null!==(e=b.renderDetail)&&void 0!==e?e:g0,v=null!==(e=b.hasDetail)&&void 0!==e?e:e0(!0),o=null!==(t=null!==(e=null!==(e=b.openKeys)&&void 0!==e?e:s.getStateAtKey("rowDetail"))&&void 0!==e?e:b.defaultOpenAll?Sd()(t=zd()(t=s.getDataSource()).call(t,v)).call(t,function(e,t){return av.safeGetRowKey(f,e,t)}):b.defaultOpenKeys)&&void 0!==t?t:[],g=new Yd.a(o),y=function(t){var e;g.has(t)?n(zd()(o).call(o,function(e){return e!==t}),t,"collapse"):n(Fd()(e=[]).call(e,Ld()(o),[t]),t,"expand")},a="string"==typeof f?f:u.toString()+"PrimaryKey";return s.dataSource(Zv(s.getDataSource(),function(e,t){return g.has(av.safeGetRowKey(f,e,t))?[e,Ed()(Ed()(Od()({},u,!0),e),Od()({},a,r(e,t)))]:[e]})).columns(function(e){if(0===e.length)return e;var c=0;if(b.expandColumnCode&&(c=f0()(e).call(e,function(e){return e.code===b.expandColumnCode}))<0)return Hd.warn("没找到可展开的列,请检查设置的展开列code"),e;var l=e[c],t=Ld()(e),e=u0()(t),o=e[0];jd()(e).call(e,1);return t[0]=Ed()(Ed()({},o),{render:function(e,t,n){if(t[u]){var r=Wv("rowDetail");return"function"==typeof r?r({row:t,rowIndex:n,domHelper:s.ref.current.domHelper,renderDetail:m}):m(t,n)}return av.safeRender(o,t,n)},getSpanRect:function(e,t,n){if(t[u])return{top:n,bottom:n+1,left:0,right:qd(s.getColumns(),"leaf-only").length}}}),t[c]=Ed()(Ed()({},l),{title:Ze.a.createElement("div",{style:{display:"inline-block",marginLeft:p}},av.safeRenderHeader(l)),render:function(e,t,n){if(t[u]){if(0!==c)return;var r=Wv("rowDetail");return"function"==typeof r?r({row:t,rowIndex:n,domHelper:s.ref.current.domHelper,renderDetail:m}):m(t,n)}var o=av.safeRender(l,t,n);if(!v(t,n))return Ze.a.createElement(d0,{style:{marginLeft:p}},o);function a(e){b.stopClickEventPropagation&&e.stopPropagation(),y(i)}var i=av.safeGetRowKey(f,t,n),r=g.has(i),t=r?Eh.expanded:Eh.collapsed,n=b.expandIcon;return Ze.a.createElement(p0,{className:Je()("expansion-cell",t),style:{cursor:"content"===h?"pointer":void 0},onClick:"content"===h?a:void 0},b.expandIcon?Ze.a.createElement(n,{expanded:r,onClick:"icon"===h?a:void 0}):Ze.a.createElement(h0.CaretRight,{style:{cursor:"icon"===h?"pointer":void 0,marginLeft:d.iconIndent,marginRight:d.iconGap},className:Je()("expansion-icon",t),onClick:"icon"===h?a:void 0}),o)},getCellProps:"cell"===h?function(e,t,n){var r;if(t[u])return{style:Ed()({"--cell-padding":"0",overflow:"hidden"},b.detailCellStyle)};e=null===(r=l.getCellProps)||void 0===r?void 0:r.call(l,e,t,n);return v(t,n)?Dd(e,{onClick:function(e){b.stopClickEventPropagation&&e.stopPropagation(),y(av.safeGetRowKey(f,t,n))},style:{cursor:"pointer"}}):e}:l.getCellProps,getSpanRect:function(e,t,n){if(t[u])return{top:n,bottom:n+1,left:0,right:qd(s.getColumns(),"leaf-only").length}}}),t}(s.getColumns())).appendRowPropsGetter(function(e){if(e[u])return{className:"no-hover","data-row-detail-key":e[a]}})}}var b0=Rd()("row-grouping-meta");function w0(e){return null==e[b0]?{isGroupHeader:!1,expandable:!1}:{isGroupHeader:!0,expandable:e[b0].expandable}}function x0(e){if(w0(e).isGroupHeader)return{className:"alternative"}}function O0(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(o){var e,t,a="rowGrouping",i=o.ctx.indents,c=i.iconIndent+i.iconWidth+i.iconGap,s=o.ensurePrimaryKey("rowGrouping");if("string"!=typeof s)throw new Error("rowGrouping 仅支持字符串作为 primaryKey");var u=null!==(t=null!==(e=null!==(e=p.openKeys)&&void 0!==e?e:o.getStateAtKey(a))&&void 0!==e?e:p.defaultOpenAll?Sd()(t=o.getDataSource()).call(t,function(e){return e[s]}):p.defaultOpenKeys)&&void 0!==t?t:[],f=new Yd.a(u),d=function(e,t,n){var r;null!==(r=p.onChangeOpenKeys)&&void 0!==r&&r.call(p,e,t,n),o.setStateAtKey(a,e,{key:t,action:n})};return o.mapDataSource(function(e){return Zv(e,function(e){var t=[(t=e,Ed()(Od()({},b0,{expandable:!Vd(t)}),t))];return t=f.has(e[s])&&Array.isArray(e.children)?Fd()(t).call(t,e.children):t})}).mapColumns(function(e){if(0===e.length)return e;var r=qd(e,"leaf-only").length,t=u0()(e),l=t[0],e=jd()(t).call(t,1);return Fd()(t=[Ed()(Ed()({},l),{title:Ze.a.createElement("div",{style:{display:"inline-block",marginLeft:c}},av.safeRenderHeader(l)),render:function(e,t,n){var r=av.safeRender(l,t,n),o=w0(t);if(!o.isGroupHeader||!o.expandable){n=c+(o.isGroupHeader?0:i.indentSize);return Ze.a.createElement(d0,{style:{marginLeft:n}},o.isGroupHeader&&null!==(a=t.groupTitle)&&void 0!==a?a:r)}var a=f.has(t[s])?Eh.expanded:Eh.collapsed;return Ze.a.createElement(p0,{className:Je()("expansion-cell",a)},Ze.a.createElement(h0.CaretRight,{className:Je()("expansion-icon",a),style:{marginLeft:i.iconIndent,marginRight:i.iconGap}}),null!==(t=t.groupTitle)&&void 0!==t?t:r)},getCellProps:function(e,t,n){var r=w0(t);if(r.isGroupHeader){var o,a=r.expandable,i=t[s],c=f.has(i);return a&&(o=function(e){p.stopClickEventPropagation&&e.stopPropagation(),c?d(zd()(u).call(u,function(e){return e!==i}),i,"collapse"):d(Fd()(e=[]).call(e,Ld()(u),[i]),i,"expand")}),Dd(null===(r=l.getCellProps)||void 0===r?void 0:r.call(l,e,t,n),{onClick:o,style:{cursor:a?"pointer":void 0}})}},getSpanRect:function(e,t,n){if(w0(t).isGroupHeader)return{top:n,bottom:n+1,left:0,right:r}}})]).call(t,Ld()(e))}).appendRowPropsGetter(x0)}}function E0(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(n){var e,o=n.ctx.components.Radio;if(null==o)throw new Error("使用 singleSelect 之前需要通过 pipeline context 设置 components.Radio");function i(e){var t;null!==(t=f.onChange)&&void 0!==t&&t.call(f,e),n.setStateAtKey(r,e)}var r="singleSelect",c=null!==(a=f.clickArea)&&void 0!==a?a:"radio",l=null!==(t=f.isDisabled)&&void 0!==t?t:e0(!1),s=n.ensurePrimaryKey("singleSelect"),u=null!==(a=null!==(e=f.value)&&void 0!==e?e:n.getStateAtKey(r))&&void 0!==a?a:f.defaultValue,t=Ed()(Ed()({name:"",width:50,align:"center"},f.radioColumn),{getCellProps:function(e,t,n){var r,o,e=null===(o=null===(r=f.radioColumn)||void 0===r?void 0:r.getCellProps)||void 0===o?void 0:o.call(r,e,t,n);if("cell"!==c)return e;var a=av.safeGetRowKey(s,t,n),n=l(t,n);return Dd(e,{style:{cursor:n?"not-allowed":"pointer"},onClick:n?void 0:function(e){f.stopClickEventPropagation&&e.stopPropagation(),i(a)}})},render:function(e,t,n){var r=av.safeGetRowKey(s,t,n);return Ze.a.createElement(o,{checked:u===r,disabled:l(t,n),onChange:"radio"===c?function(e,t){e=null!==(t=null==t?void 0:t.nativeEvent)&&void 0!==t?t:null==e?void 0:e.nativeEvent;e&&f.stopClickEventPropagation&&e.stopPropagation(),i(r)}:void 0})}}),a=jd()(e=n.getColumns()).call(e);return"start"===(null!==(e=f.radioPlacement)&&void 0!==e?e:"start")?a.unshift(t):a.push(t),n.columns(a),n.appendRowPropsGetter(function(e,t){var n,r,o=av.safeGetRowKey(s,e,t),a={};return f.highlightRowWhenSelected&&u===o&&(n="highlight"),"row"!==c||l(e,t)||(a.cursor="pointer",r=function(e){f.stopClickEventPropagation&&e.stopPropagation(),i(o)}),{className:n,style:a,onClick:r}}),n}}var H=n(417),C0=n.n(H);function k0(n,r){return function t(e){if(!Array.isArray(n))return n;return C0()(e=Sd()(e).call(e,function(e){return Vd(e)?e:Ed()(Ed()({},e),{children:t(e.children)})})).call(e,r)}(n)}function S0(e,t){if(null==e)return 1;if(null==t)return-1;if("number"==typeof e&&"number"==typeof t)return e-t;if("string"==typeof e&&"string"==typeof t)return e<t?-1:t<e?1:0;if(Array.isArray(e)&&Array.isArray(t)){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=S0(e[r],t[r]);if(0!==o)return o}return e.length-t.length}return 0}function j0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return P0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function P0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N0(e){var t=e.size,n=void 0===t?32:t,r=e.style,t=e.className,e=e.order;return Ze.a.createElement("svg",{style:r,className:t,focusable:"false",preserveAspectRatio:"xMidYMid meet",width:n,height:n,viewBox:"0 0 32 32","aria-hidden":"true",fill:"currentColor"},Ze.a.createElement("path",{fill:"asc"===e?"currentColor":"#bfbfbf",transform:"translate(0, 4)",d:"M8 8L16 0 24 8z"}),Ze.a.createElement("path",{fill:"desc"===e?"currentColor":"#bfbfbf",transform:"translate(0, -4)",d:"M24 24L16 32 8 24z "}))}function D0(e){var t=e.children,n=e.column,r=e.onToggle,o=e.sortOrder,a=e.sortIndex,e=e.sortOptions,n="right"===n.align?"flex-end":"center"===n.align?"center":"flex-start";return Ze.a.createElement(T0,{onClick:r,style:{justifyContent:n}},t,Ze.a.createElement(N0,{style:{userSelect:"none",marginLeft:2,flexShrink:0},className:Je()((t={},Od()(t,Eh.tableSortIcon,!0),Od()(t,"active","desc"===o||"asc"===o),t)),size:16,order:o}),"multiple"===e.mode&&-1!==a&&Ze.a.createElement("div",{style:{userSelect:"none",marginLeft:2,color:"#666",flex:"0 0 auto",fontSize:10,fontFamily:"monospace"}},a+1))}var T0=E.c.div(b()(["\n cursor: pointer;\n display: flex;\n align-items: center;\n // flex: auto;\n"])),M0="sort";function A0(){var v=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(r){function o(e,t){var n;null!==(n=v.onChangeSorts)&&void 0!==n&&n.call(v,e,t),r.setStateAtKey(M0,e)}var e=v.orders,a=void 0===e?["desc","asc","none"]:e,t=v.mode,n=void 0===t?"multiple":t,e=v.SortHeaderCell,c=void 0===e?D0:e,i=v.keepDataSource,l=v.highlightColumnWhenActive,s=v.stopClickEventPropagation,t=v.sortIconHoverShow,e=null!==(e=null!==(e=null!==(e=v.sorts)&&void 0!==e?e:r.getStateAtKey(M0))&&void 0!==e?e:v.defaultSorts)&&void 0!==e?e:[],e=zd()(e).call(e,function(e){return"none"!==e.order}),f="multiple"===n?e:jd()(e).call(e,0,1),u="multiple"===n?o:function(e,t){var n=e.length;o(jd()(e).call(e,n-1),t)},d={sorts:f,onChangeSorts:u,orders:a,mode:n,keepDataSource:i,highlightColumnWhenActive:l,stopClickEventPropagation:s,sortIconHoverShow:t},p=new Bd.a(Sd()(f).call(f,function(e,t){return[e.code,Ed()({index:t},e)]})),t=r.getDataSource(),h=r.getColumns();return r.dataSource(function(e){var t;if(i)return e;var u=new Bd.a(Sd()(t=zd()(t=qd(h,"leaf-only")).call(t,function(e){var t;return!1!==(null===(t=e.features)||void 0===t?void 0:t.sortable)&&null!=(null===(e=e.features)||void 0===e?void 0:e.sortable)})).call(t,function(e){return[e.code,e]}));return k0(e,function(e,t){var n,r=j0(f);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=o.code,i=o.order,c=u.get(a);if(null!=c){var l=c.features.sortable,s=("function"==typeof l?l:S0)(av.safeGetValue(c,e,-1),av.safeGetValue(c,t,-1),e,t);if(0!==s)return s*("asc"===i?1:-1)}}}catch(e){r.e(e)}finally{r.f()}return 0})}(t)),r.columns((t=h,Sd()(t).call(t,function e(r){var t=Ed()({},r);var n=r.code&&((null===(a=r.features)||void 0===a?void 0:a.sortable)||p.has(r.code));var o=n&&p.has(r.code);{var a;n&&(i=-1,a="none",o&&(n=p.get(r.code),o=n.order,n=n.index,a=o,i=n,l&&(t.headerCellProps=Dd(r.headerCellProps,{style:{background:"var(--header-highlight-bgcolor)"}}),t.getCellProps=function(e,t,n){n=av.safeGetCellProps(r,t,n);return Dd(n,{style:{background:"var(--highlight-bgcolor)"}})})),i=Ze.a.createElement(c,{onToggle:function(e){s&&e.stopPropagation(),m(r.code)},sortOrder:a,column:r,sortIndex:i,sortOptions:d},av.safeRenderHeader(Ed()(Ed()({},r),{title:r.title&&r.title[0]?r.title[0]:r.title}))),t.title&&t.title[0]?t.title[0]=i:t.title=i)}{var i;Vd(r)||(t.children=Sd()(i=r.children).call(i,e))}return t}))),r;function m(t){var e,n,r,o=p.get(t);null==o?(r={code:t,order:a[0]},u(Fd()(f).call(f,[r]),r)):(e=f0()(f).call(f,function(e){return e.code===t}),n=jd()(f).call(f,0,e+1),o=function(e){e=a.indexOf(e);return a[e===a.length-1?0:e+1]}(o.order),r={code:t,order:o},"none"===o?n.pop():n[e]=Ed()(Ed()({},n[e]),{order:o}),u(n,r))}}}var R0=E.c.div(b()(["\n display: flex;\n align-items: center;\n\n .tip-icon-wrapper {\n margin-left: 2px;\n }\n\n .tip-icon {\n display: flex;\n fill: currentColor;\n }\n"]));function I0(){return function(e){var n=e.ctx.components.Balloon,r=e.ctx.components.Tooltip;if(null==n&&null==r)throw new Error("使用 tips 之前需要通过 pipeline context 设置 components.Balloon / components.Tooltip");return e.mapColumns(xh(function(e){if(null===(t=e.features)||void 0===t||!t.tips)return e;var t="right"===e.align?"flex-end":"center"===e.align?"center":"flex-start";return Ed()(Ed()({},e),{title:Ze.a.createElement(R0,{style:{justifyContent:t}},av.safeRenderHeader(e),n?Ze.a.createElement(n,{closable:!1,trigger:Ze.a.createElement("div",{className:"tip-icon-wrapper"},Ze.a.createElement(h0.Info,{className:"tip-icon"}))},e.features.tips):Ze.a.createElement(r,{title:e.features.tips},Ze.a.createElement("div",{className:"tip-icon-wrapper"},Ze.a.createElement(h0.Info,{className:"tip-icon"}))))})}))}}function L0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function _0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F0=Rd()("treeMetaSymbol");function z0(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(o){var e,t=o.ctx,f=o.ensurePrimaryKey("treeMode");if("string"!=typeof f)throw new Error("treeMode 仅支持字符串作为 primaryKey");function n(e,t,n){var r;null!==(r=a.onChangeOpenKeys)&&void 0!==r&&r.call(a,e,t,n),o.setStateAtKey("treeMode",e,{key:t,action:n})}var r=null!==(e=null!==(e=null!==(e=a.openKeys)&&void 0!==e?e:o.getStateAtKey("treeMode"))&&void 0!==e?e:a.defaultOpenKeys)&&void 0!==e?e:[],d=new Yd.a(r),l=function(t){var e;d.has(t)?n(zd()(r).call(r,function(e){return e!==t}),t,"collapse"):n(Fd()(e=[]).call(e,Ld()(r),[t]),t,"expand")},p=null!==(e=a.isLeafNode)&&void 0!==e?e:Vd,s=null!==(e=a.clickArea)&&void 0!==e?e:"cell",h=null!==(e=a.treeMetaKey)&&void 0!==e?e:F0,u=Boolean(a.stopClickEventPropagation),m=t.indents.iconWidth,v=null!==(e=a.iconIndent)&&void 0!==e?e:t.indents.iconIndent,g=null!==(e=a.iconGap)&&void 0!==e?e:t.indents.iconGap,y=null!==(e=a.indentSize)&&void 0!==e?e:t.indents.indentSize,b=a.icon;return o.mapDataSource(function(e){var u=[];return function e(t,n){if(null!=t){var r,o=L0(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,i=a[f],c=d.has(i),l=p(a,{depth:n,expanded:c,rowKey:i}),s={depth:n,isLeaf:l,expanded:c,rowKey:i};u.push(Ed()(Od()({},h,s),a)),!l&&c&&e(a.children,n+1)}}catch(e){o.e(e)}finally{o.f()}}}(e,0),u}).mapColumns(function(e){if(0===e.length)return e;var t=u0()(e),c=t[0],e=jd()(t).call(t,1);return Fd()(t=[Ed()(Ed()({},c),{title:Ze.a.createElement("span",{style:{marginLeft:v+m+g}},av.safeRenderHeader(c)),render:function(e,t,n){var r=av.safeRender(c,t,n);if(null==t[h])return r;var o=t[h],a=o.rowKey,n=o.depth,t=o.isLeaf,o=o.expanded,n=v+n*y;if(t)return Ze.a.createElement(d0,{className:Je()("expansion-cell",Eh.leaf)},Ze.a.createElement("span",{style:{marginLeft:n+m+g}},r));function i(e){u&&e.stopPropagation(),l(a)}t=o?Eh.expanded:Eh.collapsed;return Ze.a.createElement(p0,{className:Je()("expansion-cell",t),style:{cursor:"content"===s?"pointer":void 0},onClick:"content"===s?i:void 0},b?Ze.a.createElement(b,{expanded:o,style:{cursor:"icon"===s?"pointer":void 0,marginLeft:n,marginRight:g,width:m},onClick:"icon"===s?i:void 0}):Ze.a.createElement(h0.CaretRight,{className:Je()("expansion-icon",t),style:{cursor:"icon"===s?"pointer":void 0,marginLeft:n,marginRight:g},onClick:"icon"===s?i:void 0}),r)},getCellProps:"cell"===s?function(e,t,n){var r=av.safeGetCellProps(c,t,n);if(null==t[h])return r;var n=t[h],t=n.isLeaf,o=n.rowKey;return t?r:Dd(r,{onClick:function(e){u&&e.stopPropagation(),l(o)},style:{cursor:"pointer"}})}:c.getCellProps})]).call(t,Ld()(e))})}}function B0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return H0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function H0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V0=kd()(function e(t){Cd()(this,e),Ed()(this,t)}),W0=function(){function t(e){Cd()(this,t),this.opts=e,this.valueSet=new Yd.a(e.value),this.initWrapperTree()}return kd()(t,[{key:"initWrapperTree",value:function(){var c=this,l=this.opts.getNodeValue;this.rootWrapper=new V0({root:!0,children:[]}),this.wrapperMap=new Bd.a,function e(t,n){var r,o=B0(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,i=new V0({parent:t,node:a,checked:c.valueSet.has(l(a))});c.wrapperMap.set(l(a),i),t.children.push(i),Vd(a)||(i.children=[],e(i,a.children))}}catch(e){o.e(e)}finally{o.f()}}(this.rootWrapper,this.opts.tree)}},{key:"value",get:function(){return this.opts.value}},{key:"isIndeterminate",value:function(e){return!1}},{key:"isChecked",value:function(e){return this.valueSet.has(e)}},{key:"getValueAfterCheck",value:function(e){return this.isChecked(e)?this.value:Jv.merge(this.value,[e])}},{key:"getValueAfterUncheck",value:function(e){return this.isChecked(e)?Jv.diff(this.value,[e]):this.value}},{key:"getValueAfterToggle",value:function(e){return this.isChecked(e)?this.getValueAfterUncheck(e):this.getValueAfterCheck(e)}},{key:"getNode",value:function(e){return null===(e=this.wrapperMap.get(e))||void 0===e?void 0:e.node}},{key:"getCleanValue",value:function(){return this.value}}]),t}();function U0(e,t){var n=void 0!==Rd.a&&Id()(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return q0(e,t);var n=jd()(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ad()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q0(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function q0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Y0=kd()(function e(t){Cd()(this,e),Ed()(this,t)}),K0=function(){function o(e){var r=this;Cd()(this,o),this.isDetached=function(e){var t,n;return null!==(e=null===(n=(t=r.opts).isDetached)||void 0===n?void 0:n.call(t,e))&&void 0!==e&&e},this.opts=e,this.valueSet=new Yd.a(e.value),this.initWrapperTree()}return kd()(o,[{key:"value",get:function(){return this.opts.value}},{key:"initWrapperTree",value:function(){var m=new Yd.a(this.value);this.rootWrapper=new Y0({root:!0,children:[]}),this.wrapperMap=new Bd.a;var v=this.opts.getNodeValue,g=this.isDetached,y=this.wrapperMap;!function e(t,n,r){t.allChildrenChecked=!0;0;var o,a=U0(n);try{for(a.s();!(o=a.n()).done;){var i=o.value,c=g(i),l=m.has(v(i));l&&!c&&(t.anyDescendentsChecked=!0);var s=!c&&r,u=l||s,f=new Y0({parent:t,node:i,checked:u,exactChecked:l,parentChecked:s,anyDescendentsChecked:u,detached:c});if(y.set(v(i),f),t.children.push(f),!Vd(i)&&(f.children=[],e(f,i.children,u),f.anyDescendentsChecked&&!c&&(t.anyDescendentsChecked=!0),f.allChildrenChecked)){f.checked=!0;var d,p=U0(f.children);try{for(p.s();!(d=p.n()).done;){var h=d.value;h.detached||(h.parentChecked=!0)}}catch(e){p.e(e)}finally{p.f()}}f.checked||c||(t.allChildrenChecked=!1)}}catch(e){a.e(e)}finally{a.f()}}(this.rootWrapper,this.opts.tree,!1)}},{key:"isIndeterminate",value:function(e){e=this.wrapperMap.get(e);return!e.checked&&e.anyDescendentsChecked}},{key:"isChecked",value:function(e){return this.wrapperMap.get(e).checked}},{key:"getValueAfterCheck",value:function(e){if(this.isChecked(e))return this.getCleanValue();e=Jv.merge(this.value,[e]);return new o(Ed()(Ed()({},this.opts),{value:e})).getCleanValue()}},{key:"getValueAfterUncheck",value:function(e){if(!this.isChecked(e))return this.getCleanValue();var t=this.wrapperMap.get(e),i=this.opts.getNodeValue,n=function(e){var t=[],n=e;for(;n.parentChecked&&!n.detached;){var r,o=U0(n.parent.children);try{for(o.s();!(r=o.n()).done;){var a=r.value;a===n||a.exactChecked||a.detached||t.push(i(a.node))}}catch(e){o.e(e)}finally{o.f()}n=n.parent}return t}(t),e=function(e){var a=new Yd.a,t=e;for(;;){if(a.add(i(t.node)),t.detached||!t.parentChecked)break;t=t.parent}return function e(t){if(null!=t){var n,r=U0(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;!o.detached&&o.checked&&(a.add(i(o.node)),!Vd(o)&&o.anyDescendentsChecked&&e(o.children))}}catch(e){r.e(e)}finally{r.f()}}}(e.children),a}(t),e=Jv.diff(Fd()(t=this.value).call(t,n),e);return new o(Ed()(Ed()({},this.opts),{value:e})).getCleanValue()}},{key:"getValueAfterToggle",value:function(e){return this.isChecked(e)?this.getValueAfterUncheck(e):this.getValueAfterCheck(e)}},{key:"getNode",value:function(e){return null===(e=this.wrapperMap.get(e))||void 0===e?void 0:e.node}},{key:"getCleanValue",value:function(){var t=this,e=this.opts,a=e.checkedStrategy,i=e.getNodeValue,c=zd()(e=this.value).call(e,function(e){return!t.wrapperMap.has(e)});return function e(t){var n,r=U0(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.checked&&("all"===a?c.push(i(o.node)):"parent"===a?o.parentChecked||c.push(i(o.node)):Vd(o)&&c.push(i(o.node))),Vd(o)||e(o.children)}}catch(e){r.e(e)}finally{r.f()}}(this.rootWrapper.children),c}}]),o}(),G0="treeSelect";function X0(p){return function(n){var r=n.ctx.components.Checkbox;if(null==r)throw new Error("使用 treeSelect 之前需要通过 pipeline context 设置 components.Checkbox");var o=n.ensurePrimaryKey("treeSelect");if("string"!=typeof o)throw new Error("treeSelect 仅支持字符串作为 primaryKey");function e(e){return e[o]}function a(e,t,n){return Ze.a.createElement(r,{checked:u.isChecked(e),indeterminate:u.isIndeterminate(e),disabled:!t&&c(n),onChange:"checkbox"===i||t?function(){return f(e)}:void 0})}var i=null!==(l=p.clickArea)&&void 0!==l?l:"checkbox",c=null!==(t=p.isDisabled)&&void 0!==t?t:e0(!1),t=null!==(l=p.idDetached)&&void 0!==l?l:e0(!1),l=null!==(l=null!==(l=null!==(l=p.value)&&void 0!==l?l:n.getStateAtKey(G0))&&void 0!==l?l:p.defaultValue)&&void 0!==l?l:[],s=null!=p.rootKey?[(s={},Od()(s,o,p.rootKey),Od()(s,"children",p.tree),s)]:p.tree,u=p.checkStrictly?new W0({value:l,getNodeValue:e,tree:s}):new K0({value:l,getNodeValue:e,isDetached:t,tree:s,checkedStrategy:null!==(d=p.checkedStrategy)&&void 0!==d?d:"parent"}),f=function(e){var t=u.getValueAfterToggle(e);n.setStateAtKey(G0,t),null!==(e=p.onChange)&&void 0!==e&&e.call(p,t)},t=Ed()(Ed()({name:"",width:50,align:"center",title:null!=p.rootKey?a(p.rootKey,!0):void 0},p.checkboxColumn),{render:function(e,t){return a(t[o],!1,t)},getCellProps:function(e,t){var n=t[o];if("cell"===i)return c(t)?{style:{cursor:"not-allowed"}}:{style:{cursor:"pointer"},onClick:function(e){p.stopClickEventPropagation&&e.stopPropagation(),f(n)}}}}),d=jd()(s=n.getColumns()).call(s);return"start"===(null!==(s=p.checkboxPlacement)&&void 0!==s?s:"start")?d.unshift(t):d.push(t),n.columns(d),"row"===i&&n.appendRowPropsGetter(function(t){if(!c(t))return{style:{cursor:"pointer"},onClick:function(e){p.stopClickEventPropagation&&e.stopPropagation(),f(t[o])}}}),p.highlightRowWhenSelected&&n.appendRowPropsGetter(function(e){if(u.isChecked(e[o]))return{className:"highlight"}}),n}}var $0="columnDrag",Q0=30;function Z0(e){e.stopPropagation()}function J0(){var u=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(P){var n=P.getStateAtKey($0,{}).cloumnsTranslateData,e=P.getColumns(),a=P.ref.current.domHelper&&P.ref.current.domHelper.tableBody;return P.columns(zd()(e).call(e,function(e){return e})),P.mapColumns(xh(function(j,e){var t=e.path,e=e.isLeaf,r=n?{transition:".3s",transform:"translate3d(".concat(n[j.code],"px, 0px, 0px)")}:{},o=j.getCellProps;return j.lock||!j.code?j:Ed()(Ed()({},j),{getCellProps:function(e,t,n){return Dd(null==o?void 0:o(e,t,n),{style:r})},headerCellProps:Dd(j.headerCellProps,{onMouseDown:!e||1<t.length?void 0:function(e){var g,y,b,s,w,x,O,E,n,C,k,S;function r(e){var t={clientX:e.clientX,clientY:e.clientY},n=P.ref.current.domHelper.virtual.scrollLeft-C,r=x-n;if(k(t),!(e.clientX-r<20)){!1===S&&(S=!0,w.addEventListener("click",Z0)),e.stopPropagation(),document.body.style.userSelect="none",w.style.cursor="move",b={},E.forEach(function(e){b[e.code]=0});for(var o,a=0,i=tg(y[a]);i<e.clientX-r&&a<y.length-1;)i+=tg(y[++a]);y.forEach(function(e,t){e.code===j.code&&(o=t)});var c=y[o],l=a;if(a<o)for(;l<o;){var s=y[l],u=s.code,f=s.lock,d=s.width,s=s.children;eg({code:u,lock:f})&&(b[u]+=c.width,Vd(y[l])?b[c.code]-=d:(b[c.code]-=tg(y[l]),ng(s,b,c.width)),g=!0),l++}else if(o<a)for(;o<l;){var p=y[l],h=p.code,m=p.lock,v=p.width,p=p.children;eg({code:h,lock:m})&&(b[h]-=c.width,Vd(y[l])?b[c.code]+=v:(b[c.code]+=tg(y[l]),ng(p,b,c.width,!0)),g=!0),l--}window.requestAnimationFrame(function(){P.setStateAtKey($0,{cloumnsTranslateData:b}),O=[o,a]})}}0===e.button&&(g=!1,y=P.getColumns(),b=P.getStateAtKey($0,{}).cloumnsTranslateData,s={},y.forEach(function(e,t){s[e.code]=t}),w=e.currentTarget,x=e.currentTarget.parentElement.getClientRects()[0].left,O=[],E=qd(y),n=a.getBoundingClientRect(),C=P.ref.current.domHelper.virtual.scrollLeft,S=!(k=function(e){var t=e.clientX,e=n.left;e+n.width<=t+Q0&&(P.ref.current.domHelper.virtual.scrollLeft+=Q0),t-Q0<=e&&(P.ref.current.domHelper.virtual.scrollLeft-=Q0)}),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",function e(t){t.stopPropagation(),document.body.removeEventListener("mousemove",r),document.body.removeEventListener("mouseup",e),window.requestAnimationFrame(function(){w.removeEventListener("click",Z0),S=!1,w=null;var e=O,t=xd()(e,2),n=t[0],e=t[1],r=y[n],o=e;if(e<n)for(;o<n;){var a=y[o],i=a.code;eg({code:i,lock:a.lock})&&(s[i]+=1,--s[r.code],g=!0),o++}else if(n<e)for(;n<o;){var c=y[o],l=c.code;eg({code:l,lock:c.lock})&&(--s[l],s[r.code]+=1,g=!0),o--}(t=u.onColumnDragStopped)&&(e=zd()(e=function(e,t){for(var n=new Array(e.length),r=Ld()(e);e.length;){var o=e.pop();n[t[o.code]]=o}return zd()(n).call(n,Boolean).length!==r.length?r:n}(y,s)).call(e,function(e){return e.code!==Ph}),t(g,e)),P.setStateAtKey($0,{cloumnsTranslateData:null})}),document.body.style.userSelect="",w.style.opacity="",w.style.cursor=""}),document.body.onselectstart=function(){return!1})},style:r})})}))}}function eg(e){var t=e.lock,e=e.code;return e&&e!==Ph&&!t}function tg(e){return e.children?e.children.reduce(function(e,t){return e+tg(t)},0):e.width}function ng(e,o,a,i){e.forEach(function(e){var t=e.code,n=e.children,r=null!==(r=o[t])&&void 0!==r?r:0;o[t]=r+(i?-a:a),Vd(e)||ng(n,o,a)})}function rg(t){return function(e){return e.lift(new og(t))}}var og=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new ag(e),e=qp(this.notifier,new Up(n));return e&&!n.seenValue?(n.add(e),t.subscribe(n)):n},e}(),ag=function(t){function e(e){e=t.call(this,e)||this;return e.seenValue=!1,e}return Xd(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(f);var ig=E.c.div(b()(['\n position: absolute;\n top: 0;\n right: -5px;\n height: 100%;\n width: 10px;\n cursor: ew-resize;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index:1;\n\n &:after {\n content: "";\n position: absolute;\n display: block;\n left: calc(50% - 1px);\n width: 1px;\n height: calc(100% - 14px);\n top: 7px;\n background-color: var(--border-color);\n }\n'])),cg=Object(E.c)(ig)(b()(["\n &:after {\n height: 100%;\n top: 0;\n }\n"]));function lg(e,t,n){return Math.max(e,Math.min(n,t))}function sg(e){e.preventDefault()}function ug(){var e,l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r="columnResize",p=null!==(e=l.minSize)&&void 0!==e?e:60,s=null!==(e=l.fallbackSize)&&void 0!==e?e:150,h=null!==(e=l.maxSize)&&void 0!==e?e:1e3;return function(n){var e,d=null!==(e=null!==(e=l.columnSize)&&void 0!==e?e:n.getStateAtKey(r))&&void 0!==e?e:{};qd(n.getColumns(),"leaf-only").forEach(function(e){var t=e.code,e=e.width;void 0===d[t]&&(d[t]="number"==typeof e?e:s)}),n.getStateAtKey(r)&&(null===(t=n.ref)||void 0===t?void 0:t.current.lastOptColumnSize)===l.columnSize||n.setStateAtKey(r,d),n.ref&&(n.ref.current.lastOptColumnSize=l.columnSize);function a(e,t){null!=l&&l.doubleClickCallback(e,t)}function i(e,t){window.addEventListener("selectstart",sg);var s={},n=e.clientX,r=t.children,u=t.code,f=d;e.stopPropagation(),Tp(window,"mousemove").pipe(rg(Tp(window,"mouseup")),Pp(function(e){var o,a,e=e.clientX,i=Ed()({},d),c=e-n,l=c;return 0<(null==r?void 0:r.length)?(o=qd(r,"leaf-only"),a=o.reduce(function(e,t){t=t.code;return e+d[t]},0),o.forEach(function(e,t){var n=e.code,r=d[n],e=Math.round(c*r/a);t<o.length-1?(i[n]=lg(p,r+e,h),s[n]=i[n],l-=e):(i[n]=lg(p,r+l,h),s[n]=i[n])})):(e=d[u],i[u]=lg(p,e+c,h),s[u]=i[u]),f=i})).subscribe({next:o,complete:function(){var e,t=Sd()(e=Nd()(s)).call(e,function(e){return{code:e,width:s[e]}});window.requestAnimationFrame(function(){var e;null!==(e=null==l?void 0:l.afterChangeSize)&&void 0!==e&&e.call(l,f,t)}),window.removeEventListener("selectstart",sg)}})}var t,o=function(t){window.requestAnimationFrame(function(){var e;n.setStateAtKey(r,t),null!==(e=null==l?void 0:l.onChangeSize)&&void 0!==e&&e.call(l,t),l.columnSize&&n.ref&&(n.ref.current.lastOptColumnSize=t)})},c=(t=n.getColumns(),-1<f0()(t).call(t,function(e){return e.children&&0<e.children.length}));return n.mapColumns(xh(function(t){var e=av.safeRenderHeader(t),n=t.code,r=t.features,o=t.width;return Ed()(Ed()({},t),{width:null!==(n=d[n])&&void 0!==n?n:o,title:Ze.a.createElement(Ze.a.Fragment,null,e,!1!==(null==r?void 0:r.resizeable)&&(c?Ze.a.createElement(cg,{className:Eh.tableHeaderCellResize,onDoubleClick:function(e){return a(e,t)},onMouseDown:function(e){return i(e,t)}}):Ze.a.createElement(ig,{className:Eh.tableHeaderCellResize,onDoubleClick:function(e){return a(e,t)},onMouseDown:function(e){return i(e,t)}}))),headerCellProps:Dd(t.headerCellProps,{className:"resizeable"})})}))}}function fg(e){return e.deepPath?e.deepPath():e.path||(e.composedPath?e.composedPath():function(e){var t=[],n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}(e))}function dg(e,t){return!(!e||!t)&&0<=fg(t).indexOf(e)}function pg(e,t){for(var n,r=0;!n&&r<e.length;){var o=e[r];t(o)&&(n=o),r++}return n}function hg(e,t,n){e=e.getBoundingClientRect(),t=(t===document.body?document.documentElement:t).getBoundingClientRect();return{x:e.left-t.left-(n?n.x:0),y:e.top-t.top-(n?n.y:0)}}function mg(e,t,n,r,o){var a,i=e.getBoundingClientRect(),c=document.documentElement,l=c.getBoundingClientRect(),s=t.getBoundingClientRect(),u=i.width,t=i.height,e=e===document.body;return e&&(u=l.width-Math.abs(l.left-i.left),t=l.height+c.scrollTop-Math.abs(l.top-i.top)),n&&(l=s.width,u=(i={x:n,maxX:u-l,width:l,isPerfectX:o}).x,a=i.maxX,l=i.width,n=(i=i.isPerfectX)&&Math.max(u,0)>Math.abs(a)&&l<=u?u-l:Math.min(Math.max(u,0),Math.abs(a))),r&&(a=s.height,s={y:r,maxY:t-a,height:a,scrollTop:c.scrollTop,isBody:e,isPerfectY:o},t=s.y,a=s.maxY,c=s.height,e=s.scrollTop,o=s.isBody,r=(s=s.isPerfectY)&&Math.max(t,0)>Math.abs(a)&&c<=(o?t-e:t)?t-c:Math.min(Math.max(t,0),Math.abs(a))),{x:n,y:r}}var vg=function(t){return function(e){e.value=t,e.select(),e.focus(),document.execCommand("copy"),document.body.removeChild(e)}};function gg(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(i){function c(e){var t=document.createElement("div");function n(e){(function(e,t){if(!e||!t)return!1;if(dg(t,e))return!0;return!1})(e,t)||r||(r=!0,l.removeChild(t),o.forEach(function(e){window.removeEventListener(e,n,!0)}))}t.setAttribute("class","kd-table-popup"),l.appendChild(t);var r=!1,o=["mousedown","contextmenu"];return X.a.render(e,t,function(){setTimeout(function(){o.forEach(function(e){window.addEventListener(e,n,!0)})},0)}),n}var l=p.popupParent||document.body,s=new wg;i.addTableProps({onContextMenu:function(e){!function(e){var t=fg(e.nativeEvent),n=0;for(;n<t.length;){var r=t[n];if(r.classList.contains(Eh.tableBody)||r.classList.contains(Eh.tableFooter))return!1;n++}return!0}(e)&&(e.preventDefault(),t(e))}});function u(e,t,n,r){var o,a=[];return t&&a.push((o=n,{name:"复制",action:function(){!function(e){var t=document.createElement("textarea");t.style.width="1px",t.style.height="1px",t.style.top="0px",t.style.left="0px",t.style.position="absolute",t.style.opacity="0.0",document.body.appendChild(t);try{e(t)}catch(e){Hd.warn("Browser does not support document.execCommand('copy') for clipboard operations")}}(vg(o))}})),p.getContextMenuItems?p.getContextMenuItems({record:e,column:t,value:n,event:r}):a}function f(){s.destroy()}function d(){return l}var t=function(e){var t,n=fg(e),r=pg(n,function(e){return e&&"table-cell"===e.getAttribute("data-role")}),n=((r?(t=r.getAttribute("data-code"),a=r.getAttribute("data-rowindex"),xg(r)):(a=null==(o=pg(n,function(e){return e&&"table-row"===e.getAttribute("data-role")}))?void 0:o.getAttribute("data-rowindex"),xg(o)))?i.getFooterDataSource()||[]:i.getDataSource())[a],o=void 0!==t&&t0(i.getColumns(),function(e){return e.code===t}),a=o&&n&&av.safeGetValue(o,n,a),a=u(n,o,a,e);0!==a.length?(e=function(e,t,n){var r=function(e,t){var n=t.getBoundingClientRect(),r=document.documentElement.getBoundingClientRect();return{x:e.clientX-(t===document.body?r:n).left,y:e.clientY-(t===document.body?r:n).top}}(e,t),e=r.x,t=r.y;n&&(r=n.offsetX,n=n.offsetY,r&&(e-=r),n&&(t-=n));return{x:e,y:t}}(e,l),e=c(Ze.a.createElement(yg,{options:a,hideContextMenu:f,position:e,getPopupParent:d})),s.init(e)):Hd.warn("context menu options is empty")};return i}}function yg(e){var t=e.options,t=void 0===t?[]:t,n=e.hideContextMenu,r=e.position,o=e.getPopupParent,a=Object(Qe.useRef)();return Object(Qe.useEffect)(function(){var e,t,n;a.current&&(e=o(),n=r.x,t=r.y,t=(n=function(e,t,n,r){var o=e.getBoundingClientRect(),a=document.documentElement,i=a.getBoundingClientRect(),c=t.getBoundingClientRect(),l=o.width,s=o.height;e===document.body&&(l=i.width,l-=Math.abs(i.left-o.left),s=i.height+a.scrollTop,s-=Math.abs(i.top-o.top));n&&(o=Math.min(c.width,120),t.style.minWidth=o+"px",o=l-o,n=Math.min(Math.max(n,0),Math.abs(o)));r&&(c=Math.min(c.height,180),c=s-c,r=Math.min(Math.max(r,0),Math.abs(c)));return{x:n,y:r}}(e,a.current,n,t)).x,n=n.y,a.current.style.left=t+"px",a.current.style.top=n+"px")},[r]),Ze.a.createElement(m0,{className:Ch.menu,ref:a,style:{left:r.x,top:r.y}},Ze.a.createElement("div",{className:Ch.menuList},Sd()(t).call(t,function(e,t){return Ze.a.createElement(bg,{key:e.key||function(e){var t=e.name,n=e.index;if(t){var r=0;t+="";for(var o=0;o<t.length;o++)r+=t.charCodeAt(t[o]);return Fd()(e="".concat(r,"_")).call(e,n)}return n}({name:e.name,index:t}),name:e.name,action:e.action,disabled:e.disabled,hideContextMenu:n})})))}function bg(e){var t=e.name,n=e.action,r=e.disabled,o=e.hideContextMenu,a=Object(Qe.useRef)();return Ze.a.createElement("div",{className:Je()(Ch.menuOption,Od()({},Ch.menuOptionDisable,r)),ref:a,onClick:function(){r||(o(),"function"==typeof n&&n())},onMouseEnter:function(e){var t;r||(t=a.current)&&t.classList.add(Ch.menuOptionActive)},onMouseLeave:function(e){var t;r||(t=a.current)&&setTimeout(function(){t.classList.remove(Ch.menuOptionActive)},10)}},Ze.a.createElement("span",{className:Ch.menuOptionText},t))}var wg=kd()(function e(){var t=this;Cd()(this,e),this.init=function(e){t.hidePopup=e},this.destroy=function(){t.hidePopup&&t.hidePopup(),t.hidePopup=null}});function xg(e){for(var t=e;t;){if("TFOOT"===t.tagName)return!0;if("TABLE"===t.tagName||"TBODY"===t.tagName)return!1;t=t.parentElement}return!1}var Og=E.c.div(b()(["\n display: flex;\n flex-direction: column;\n max-height: 450px;\n min-width: 160px;\n border-radius: 2px;\n background-color: #fff;\n box-shadow: 0 0 5px 0 rgba(154,154,154,.5);\n cursor: default;\n\n .popup-header {\n display: flex;\n background-color: #ebedf1;\n\n .popup-header-icon {\n color:#666;\n background-color: #fff;\n padding: 6px 16px 6px 16px;\n display: inline-block;\n border-right: 1px solid transparent;\n border-left: 1px solid transparent;\n border-top: 1px solid transparent;\n border-top-right-radius: 2px;\n border-top-left-radius: 2px;\n }\n }\n\n .popup-body {\n display: flex;\n }\n"]));var Eg=function(e){var t,n,r=e.style,o=e.children,a=e.position,i=e.filterIcon,c=e.onClose,l=Object(Qe.useState)(a),s=xd()(l,2),e=s[0],u=s[1],l=Object(Qe.useState)(!1),l=(s=xd()(l,2))[0],f=s[1],d=Ze.a.useRef(null);return Object(Qe.useEffect)(function(){u(mg(document.body,d.current,a.x,a.y,!0)),f(!0)},[a]),t=function(e){return!dg(d.current,e)&&c()},n=["mousedown"],Ze.a.useEffect(function(){return n.forEach(function(e){return window.addEventListener(e,t,!0)}),function(){return n.forEach(function(e){return window.removeEventListener(e,t,!0)})}},[n,t]),Ze.a.createElement(Og,{style:Ed()(Ed()({},r),{left:l?e.x:0,top:l?e.y:0,opacity:l?1:0}),ref:d},Ze.a.createElement("div",{className:"popup-header"},Ze.a.createElement("span",{className:"popup-header-icon"},i||Ze.a.createElement("svg",{width:14,height:14,viewBox:"64 64 896 896",focusable:"false","data-icon":"filter",fill:"currentColor","aria-hidden":"true"},Ze.a.createElement("path",{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3\n 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5\n 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"})))),Ze.a.createElement("div",{className:"popup-body"},o))},Cg=[{title:"包含",key:"contain",filter:function(t){return function(e){return null!=e&&("number"==typeof e&&(e+=""),Mm()(e).call(e,t))}}},{title:"不包含",key:"notContain",filter:function(t){return function(e){return null==e||("number"==typeof e&&(e+=""),!Mm()(e).call(e,t))}}},{title:"等于",key:"equal",filter:function(t){return function(e){return t!==e}}},{title:"不等于",key:"notEqual",filter:function(t){return function(e){return t!==e}}},{title:"为空",key:"isNull",filter:function(){return function(e){return!e}}},{title:"不为空",key:"notIsNull",filter:function(){return function(e){return!!e}}}],kg=E.c.div(b()(["\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n border-radius: 2px;\n width: 100%;\n\n ","\n .filter-option-list {\n display: flex;\n flex-direction: column;\n margin-top: 8px;\n ul {\n margin: 0;\n padding: 0;\n li {\n display: flex;\n position: relative;\n flex-shrink: 0;\n height: 32px;\n align-items: center;\n border-radius: 2px;\n font-size: 12px;\n color: var(--color);\n padding: 0 12px;\n overflow: hidden;\n cursor: pointer;\n &:hover{\n background-color: var(--primary-color-level1);\n }\n }\n li.active{\n background-color: var(--primary-color-level1);\n }\n }\n }\n\n .filter-search {\n display: flex;\n padding: 6px 12px;\n\n .filter-search-inner {\n width: 100%;\n font-size: 12px;\n color: #333333;\n height: 28px;\n line-height: 28px;\n padding: 0 8px;\n outline: none;\n background-color: #FAFAFA;\n border-radius: 2px;\n border: 1px solid var(--strong-border-color);\n &:hover{\n border-color: var(--primary-color)\n } \n &:focus{\n border-color: var(--primary-color)\n } \n }\n }\n\n .filter-footer {\n display: flex;\n flex-direction: row;\n padding: 8px 12px;\n justify-content: space-between;\n\n .filter-btn {\n text-align: center;\n font-size: 12px;\n width: 60px;\n height: 24px;\n line-height: 24px;\n }\n \n }\n"]),l);function Sg(e){var t=e.setFilterModel,n=e.filterModel,r=e.hidePanel,e=Ze.a.useState((null==n?void 0:n.filterCondition)||"contain"),o=(e=xd()(e,2))[0],a=e[1],e=Ze.a.useState((null==n?void 0:zd()(n))||""),i=(e=xd()(e,2))[0],c=e[1],l=Ze.a.useCallback(function(e){a(e.key)},[]);return Object(Qe.useEffect)(function(){a((null==n?void 0:n.filterCondition)||"contain"),c((null==n?void 0:zd()(n))||"")},[n]),Ze.a.createElement(kg,null,Ze.a.createElement("div",{className:"filter-option-list"},Ze.a.createElement("ul",null,Sd()(Cg).call(Cg,function(e,t){return Ze.a.createElement("li",{key:t,className:e.key===o?"active":"",onClick:function(){return l(e)}},e.title)}))),"notIsNull"!==o&&"isNull"!==o&&Ze.a.createElement("div",{className:"filter-search"},Ze.a.createElement("input",{className:"filter-search-inner",value:i,onChange:function(e){c(e.target.value)}})),Ze.a.createElement("div",{className:"filter-footer"},Ze.a.createElement("button",{className:Je()(Od()({"filter-btn":!0},Eh.button,!0)),onClick:function(){r(),t()}},"重置"),Ze.a.createElement("button",{className:Je()((e={"filter-btn":!0},Od()(e,Eh.button,!0),Od()(e,Eh.buttonPrimary,!0),e)),onClick:function(){r(),t({filter:[i],filterCondition:o})}},"确定")))}var jg=7,Pg=17,Ng=E.c.span(b()(["\n // position: absolute;\n // right: 4px;\n // cursor: pointer;\n // transform: translateY(-50%);\n // top: 50%;\n // height: 12px; \n"]));function Dg(e){function t(e){l(hg(n,document.body,{x:Pg,y:jg}))}var n=e.ele,r=e.filterIcon,o=e.hidePanel,a=e.renderPanelContent,i=Ze.a.useRef(null),c=Ze.a.useState(hg(n,document.body,{x:Pg,y:jg})),e=xd()(c,2),c=e[0],l=e[1];return Object(Qe.useEffect)(function(){var e=ah(i.current.children[0],t);return function(){e&&e.disconnect()}},[]),Ze.a.createElement("div",{ref:i},Ze.a.createElement(Eg,{style:{position:"absolute",zIndex:1050},onClose:o,position:c,filterIcon:r},a()))}var Tg=function(e){function t(){return p(!1)}var n=void 0===(h=e.size)?12:h,r=e.style,o=e.className,a=e.FilterPanelContent,i=e.filterIcon,c=e.setFilter,l=e.setFilterModel,s=e.filterModel,u=e.isFilterActive,f=e.stopClickEventPropagation,d=Ze.a.useState(!1),e=(h=xd()(d,2))[0],p=h[1],d=Ze.a.useRef(null),h=Je()((h={},Od()(h,o,!0),Od()(h,"filter-panel-open",e),h));return Ze.a.createElement(Ng,{style:r,className:h,onMouseDown:function(e){e.stopPropagation()},ref:d},Ze.a.createElement("span",{className:Eh.filterIcon,onClick:function(e){f&&e.stopPropagation(),p(!0)}},i||Ze.a.createElement("svg",{width:n,height:n,viewBox:"64 64 896 896",focusable:"false","data-icon":"filter",fill:"currentColor","aria-hidden":"true"},Ze.a.createElement("path",{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3\n 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5\n 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}))),e&&Object(k.createPortal)(Ze.a.createElement(Dg,{ele:d.current,filterIcon:i,hidePanel:t,renderPanelContent:function(){return a?Ze.a.createElement(a,{setFilter:c,filterModel:s,isFilterActive:u,hidePanel:t}):Ze.a.createElement(Sg,{setFilterModel:l,filterModel:s,isFilterActive:u,hidePanel:t})}}),document.body))},Mg="filter";function Ag(){var o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(l){var e=l.getDataSource(),t=l.getColumns(),n=o.filters,r=o.defaultFilters,s=o.onChangeFilters,i=o.keepDataSource,u=o.mode,f=o.filterIcon,d=o.stopClickEventPropagation,r=null!==(r=null!==(n=null!=n?n:l.getStateAtKey(Mg))&&void 0!==n?n:r)&&void 0!==r?r:[],r="single"===u?jd()(r).call(r,0,1):r,p=new Bd.a(Sd()(r).call(r,function(e){return[e.code,Ed()({},e)]}));return l.dataSource(function(e){var n=[];if(p.forEach(function(e,t){n.push(t)}),i||n.length<=0)return e;var t=l.getColumns(),o=new Bd.a(Sd()(t=zd()(t=qd(t,"leaf-only")).call(t,function(e){var t;return!1!==(null===(t=e.features)||void 0===t?void 0:t.filterable)&&null!=(null===(e=e.features)||void 0===e?void 0:e.filterable)})).call(t,function(e){return[e.code,e]})),a=new Bd.a(Sd()(Cg).call(Cg,function(e){return[e.key,Ed()({},e)]}));return e.reduce(function(e,t){return r=t,n.some(function(e){var t=p.get(e),n=null===(n=null===(n=o.get(e))||void 0===n?void 0:n.features)||void 0===n?void 0:n.filterable,n="function"==typeof n?n:a.get(t.filterCondition)?zd()(a.get(t.filterCondition)):(console.warn("列[".concat(e,"]未配置筛选函数,请设置 column.features.filterable 来作为该列的筛选函数, 目前使用默认包含筛选函数")),zd()(a.get("contain")));return!n(zd()(t))(r[e])})?e:Fd()(e).call(e,[t]);var r},[])}(e)),l.columns((t=t,Sd()(t).call(t,function e(r){var t=Ed()({},r);var n=r.code&&(null===(n=r.features)||void 0===n?void 0:n.filterable);var o=n&&0<(null===(a=null===(o=null==p?void 0:p.get(r.code))||void 0===o?void 0:zd()(o))||void 0===a?void 0:a.length);{var a,i;n&&(i=function(e){var t=new Bd.a(p),n=Ed()({code:r.code},e);null==e?t.delete(r.code):("single"===u&&t.clear(),t.set(r.code,n));t=Ad()(Qv()(t).call(t));null!=s&&s(t,n),l.setStateAtKey(Mg,t)},c=function(e,t){i(e?{code:r.code,filter:e,filterCondition:t}:void 0)},n=null===(a=r.features)||void 0===a?void 0:a.filterPanel,t.title=Fd()(a=[]).call(a,Ld()(Fd()(a=[]).call(a,null!==(a=t.title)&&void 0!==a?a:[av.safeRenderHeader(Ed()(Ed()({},r),{title:null}))])),[Ze.a.createElement(Tg,{key:"filter",FilterPanelContent:n,filterIcon:f,filterModel:p.get(r.code),setFilterModel:i,setFilter:c,isFilterActive:o,className:Je()((c={},Od()(c,Eh.tableFilterTrigger,!0),Od()(c,"active",o),c)),stopClickEventPropagation:d})]))}{var c;Vd(r)||(t.children=Sd()(c=r.children).call(c,e))}return t}))),l}}var Rg="rangeSelection",Ig="lastClickCell";function Lg(a){return function(u){var l=30,n=u.ref.current.domHelper&&u.ref.current.domHelper.tableBody;if(!n)return u;var s=u.getColumns(),c=function(e){var t;u.setStateAtKey(Rg,e),null!==(t=null==a?void 0:a.rangeSelectedChange)&&void 0!==t&&t.call(a,e)},r=function(e,t){var n,r,o,a,i;e&&t&&(i=t,(a=e).rowIndex!==i.rowIndex||a.code!==i.code)&&(n=e,r=t,a=qd(o=s,"leaf-only"),i=f0()(a).call(a,function(e){return e.code===n.code}),o=f0()(a).call(a,function(e){return e.code===r.code}),o=i<o?jd()(a).call(a,i,o+1):jd()(a).call(a,o,i+1),e={startRow:(i=e.rowIndex<=t.rowIndex)?e.rowIndex:e.rowIndex+e.rowSpan-1,endRow:i?t.rowIndex+t.rowSpan-1:t.rowIndex,columns:o,startColumn:e.column},c(e))},o=function(e){var t=_g(e.target,s);t&&(e.shiftKey?(e=u.getStateAtKey(Ig))?r(e,t):u.setStateAtKey(Ig,t):(u.setStateAtKey(Ig,t),c(null)))};return u.addTableProps({onMouseDown:function(e){var i,t,c;0===e.button&&dg(n,e.nativeEvent)&&(o(e),i=_g(e.target,s),t=Tp(window,"mousemove"),e=Tp(window,"mouseup"),c=n.getBoundingClientRect(),t.pipe(Pp(function(e){var t,n,r,o=_g(e.target||e.srcElement,s),a={clientX:e.clientX,clientY:e.clientY};return n=(t=a).clientX,r=a.clientY,e=c.left,a=c.top,t=c.height,e+c.width<=n+l&&(u.ref.current.domHelper.virtual.scrollLeft+=l),n-l<=e&&(u.ref.current.domHelper.virtual.scrollLeft-=l),a+t<=r+l&&(u.ref.current.domHelper.tableBody.scrollTop+=l),r+l<=a&&(u.ref.current.domHelper.tableBody.scrollTop-=l),{startDragCell:i,draggingCell:o}}),rg(e)).subscribe(function(e){var t=e.startDragCell,e=e.draggingCell;r(t,e)}))},onKeyDown:function(e){var t;(e.ctrlKey||e.metaKey)&&"a"===e.key&&(t=u.getDataSource().length,s.length&&t&&(!1!==a.preventkDefaultOfKeyDownEvent&&e.preventDefault(),c({startRow:0,endRow:t-1,columns:s,startColumn:s[0]})))},tabIndex:-1}),u.mapColumns(xh(function(c){var e,l=u.getStateAtKey(Rg);if(!l||-1===f0()(e=l.columns).call(e,function(e){return e.code===c.code}))return c;var s=c.getCellProps;return Ed()(Ed()({},c),{getCellProps:function(e,t,n){var r=null==s?void 0:s(e,t,n),o=l.startRow,a=l.endRow,i=l.columns,e=o<a?o:a,t=o<a?a:o,a=i[0],o=i[i.length-1],i=e<=n&&n<=t;return Dd(r,{className:Je()((r={},Od()(r,Eh.tableCellRangeSelected,i),Od()(r,Eh.tableCellRangeTop,n===e),Od()(r,Eh.tableCellRangeLeft,c.code===a.code&&i),Od()(r,Eh.tableCellRangeBottom,n===t),Od()(r,Eh.tableCellRangeRight,c.code===o.code&&i),r))})}})}))}}function _g(t,r){for(;t;){if("table-cell"===t.getAttribute("data-role")){var e=function(){var n=t.getAttribute("data-code"),e=t0(r,function(e,t){return e.code===n});return e?{v:{rowIndex:parseInt(t.getAttribute("data-rowindex")),rowSpan:parseInt(t.getAttribute("rowspan")||1),code:n,column:e}}:{v:null}}();if("object"===Pd()(e))return e.v}t=t.parentElement}return null}var Fg=["column","fixed","onChange","value","defaultValue","clickArea"],zg=["column","fixed","onChange","clickArea"];function Bg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Hg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Vg=function(e,t){var n,r,o,a,i,c,l,s;t&&("radio"===t.type?(n=t.column,i=t.fixed,r=t.onChange,o=t.value,a=t.defaultValue,c=t.clickArea,s=ee()(t,Fg),e.use(u.singleSelect(Hg({defaultValue:null==a?void 0:a[0],value:o?0===o.length?"":o[0]:void 0,radioColumn:n,radioPlacement:i,onChange:function(e){return null==r?void 0:r([e])},clickArea:"self"===c?"radio":c},s)))):(i=t.column,c=t.fixed,l=t.onChange,s=t.clickArea,t=ee()(t,zg),e.use(u.multiSelect(Hg({checkboxColumn:i,checkboxPlacement:c,onChange:function(e,t,n,r){return null==l?void 0:l(e,t,n,r)},clickArea:"self"===s?"checkbox":s},t)))))};function Wg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Ug=function(e,t){t&&e.use(u.rowDetail(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};function qg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Yg=function(e,t){t&&e.use(u.filter(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};function Kg(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Gg=function(e,t){t&&e.use(u.sort(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kg(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var Xg=function(e,t){t&&e.use(u.autoRowSpan())};function $g(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var Qg=function(e,t){t&&e.use(u.treeMode(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$g(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var Zg=function(e,t){t&&e.use(u.columnResize(!0===t?{}:t))};var Jg=function(e,t){t&&e.use(u.columnDrag(!0===t?{}:t))};var ey=function(e,t){t&&e.use(u.contextMenu(!0===t?{}:t))};function ty(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}var ny=function(e,t){t&&e.use(u.rangeSelection(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ty(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)))};var ry=function(e){var t,n=e.columns,r=e.dataSource,o=e.columnDrag,a=e.columnResize,i=e.primaryKey,c=e.rowSelection,l=e.rowDetail,s=e.filter,u=e.sort,f=e.autoRowSpan,d=e.treeMode,p=e.prefixCls,h=e.className,m=e.style,v=e.components,g=e.isLoading,y=e.footerDataSource,b=e.useVirtual,w=e.estimatedRowHeight,x=e.emptyCellHeight,O=e.hasHeader,E=e.useOuterBorder,C=e.defaultColumnWidth,k=e.getRowProps,S=e.getTableProps,j=e.contextMenu,P=e.rangeSelection,N=e.cssVariables,D=(0,(t=Object(Qe.useContext)(tt)).getPrefixCls)(t.prefixCls,p),e=Je()(D,h),r=(t={components:{Checkbox:(null==v?void 0:v.Checkbox)||Ce,Radio:(null==v?void 0:v.Radio)||gs}},p=Object(Qe.useState)({}),D=xd()(p,2),h=D[0],p=D[1],(D=Object(Qe.useRef)({})).current.featureOptions={},new Th({state:h,setState:p,ctx:t,ref:D}).primaryKey(void 0===i?"":i).input({columns:n,dataSource:r}));return y&&r.footerDataSource(y),Vg(r,c),Ug(r,l),Yg(r,s),Gg(r,u),Xg(r,f),Qg(r,d),Zg(r,a),Jg(r,o),ey(r,j),ny(r,P),"function"==typeof k?r.appendRowPropsGetter(k):se(!0,"table","parameter 'getRowProps' should be a function but here it is ".concat(k)),"function"==typeof S?(k=S(),r.addTableProps(k)):se(!0,"table","parameter 'getTableProps' should be a function but here it is ".concat(S)),Ze.a.createElement(Gv,Ge()({},r.getProps(),{className:e,style:m,isLoading:g,components:{LoadingIcon:(null==v?void 0:v.LoadingIcon)||function(){return Ze.a.createElement(Fa,{type:"container"})},EmptyContent:(null==v?void 0:v.EmptyContent)||function(){return Ze.a.createElement(lt,null)}},useVirtual:b,estimatedRowHeight:w,emptyCellHeight:x,hasHeader:O,useOuterBorder:E,defaultColumnWidth:C,cssVariables:N}))},b=(C("embed","base"),Ze.a.forwardRef(function(r,e){var t=Object(Qe.useContext)(tt),n=t.compDefaultProps,o=t.getPrefixCls,a=t.prefixCls,i=et("Stepper",n,r),c=i.prefixCls,l=i.onChange,s=i.step,u=i.type,f=i.stepBtnClassName,d=i.max,p=i.min,t=i.value,n=i.defaultValue,h=o(a,"inputNumber",c);se("number"!=typeof s,"stepper","step必须为一个数值");function m(){var e=k("embed"),t=Je()("".concat(h,"-embedStep-plus"),(n={},Xe()(n,f,f),Xe()(n,"".concat(h,"-embedStep-disabled"),b),n)),n=Je()("".concat(h,"-embedStep-minus"),(n={},Xe()(n,f,f),Xe()(n,"".concat(h,"-embedStep-disabled"),x),n));return Ze.a.createElement("span",{className:e},Ze.a.createElement("span",{className:t,onMouseDown:function(){P("plus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"arrow-up"})),Ze.a.createElement("span",{className:n,onMouseDown:function(){P("minus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"arrow-down"})))}var c=Object(Qe.useRef)(),v=Object(Qe.useRef)(),e=e||c,g=Object(Qe.useRef)(null),y=Object(Qe.useRef)(null),c=Object(Qe.useState)(!1),c=$e()(c,2),b=c[0],w=c[1],c=Object(Qe.useState)(!1),c=$e()(c,2),x=c[0],O=c[1],n=nt(void 0,{value:t,defaultValue:n}),n=$e()(n,2),E=n[0],C=n[1],k=function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Je()((n={},Xe()(n,"".concat(h,"-").concat(e,"Step"),!0),Xe()(n,"".concat(h,"-").concat(e,"Step-disabled"),r),Xe()(n,"".concat(h,"-").concat(e,"Step-").concat(t),t),Xe()(n,"".concat(h,"-").concat(e,"Step-small"),"small"===i.size),Xe()(n,"".concat(h,"-").concat(e,"Step-middle"),"middle"===i.size),Xe()(n,"".concat(h,"-").concat(e,"Step-large"),"large"===i.size),Xe()(n,f,"base"===e&&f),n))},S=function(e){var t=parseFloat(s);if("number"!=typeof t)return!1;var n=parseFloat(v.current.value)||parseFloat(i.min)||0,t=new Ji.a(n)[e](t).valueOf(),t=v.current.verifiValue(t);return!1!==t&&(!("number"==typeof d&&(Number(t)+s>d?w(!0):w(!1),Number(t)>d))&&(!("number"==typeof p&&(Number(t)-s<p?O(!0):O(!1),Number(t)<p))&&(void 0===(null==r?void 0:r.value)&&C(t),void(l&&l({target:{value:t}})))))},j=function(e){y.current=setInterval(function(){S(e)},300)},P=function(e){return S(e),g.current=setTimeout(function(){j(e)},300),document.addEventListener("mouseup",N,!0),!1},N=Object(Qe.useCallback)(function(){return g.current&&clearTimeout(g.current),y.current&&clearInterval(y.current),document.removeEventListener("mouseup",N),!1},[g,y]);return Ze.a.createElement(mc,Ge()({},Ec(i,["step","type","stepBtnClassName","value","defaultValue"]),{ref:e,stepperrref:v,value:E,prefix:function(){if("embed"===u)return null;var e=k("base","decrease",x);return Ze.a.createElement("span",{className:e,onMouseDown:function(){P("minus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"reduce"}))}(),suffix:(e=k("base","increase",b),"embed"===u?m():Ze.a.createElement("span",{className:e,onMouseDown:function(){P("plus")}},Ze.a.createElement(Ee,{className:"".concat(h,"-icon"),type:"add"}))),onChange:function(e){var t,n=parseFloat(e.target.value);String(E).length&&(null===(t=e.target.value)||void 0===t?void 0:t.length)>=String(E).length&&""!==e.target.value&&void 0!==(null==r?void 0:r.value)&&(d&&d<n||p&&n<p)||(void 0===(null==r?void 0:r.value)&&C(e.target.value),void 0===(null==r?void 0:r.value)&&v.current.setValue(e.target.value),l&&l(e))}}))}));b.displayName="Stepper";var oy=b;function ay(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function iy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ay(Object(n),!0).forEach(function(e){Xe()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}b=Ze.a.forwardRef(function(t,e){var n=Object(Qe.useContext)(tt),r=n.getPrefixCls,o=n.prefixCls,a=n.compDefaultProps,i=n.locale.getLangMsg,c=et("BaseData",a,t),l=c.prefixCls,s=c.className,u=c.mode,f=c.disabled,d=c.delimiter,p=void 0===d?",":d,h=c.placeholder,n=void 0===h?i("global","selectholder"):h,a=c.showDetailIcon,m=c.showFrequent,v=c.showCollectIcon,g=c.columns,d=c.options,y=void 0===d?[]:d,b=c.value,w=c.optionLabelProp,x=c.size,i=c.style,O=c.dropdownFooterRender,h=c.collectList,E=void 0===h?[]:h,d=c.historyList,C=void 0===d?[]:d,k=c.loading,S=c.searchField,j=c.dropdownStyle,P=c.onChange,N=c.onSearch,D=c.onSelect,T=c.onShowDetail,M=c.onCollect,A=c.onShowMore,R=c.onVisibleChange,I="multiple"===u,h=Object(Qe.useState)([]),d=$e()(h,2),L=d[0],_=d[1],u=Object(Qe.useState)(""),h=$e()(u,2),F=h[0],z=h[1],d=Object(Qe.useState)([]),u=$e()(d,2),B=u[0],H=u[1],h=Object(Qe.useState)(!1),d=$e()(h,2),u=d[0],V=d[1],h=Object(Qe.useState)(!1),d=$e()(h,2),W=d[0],U=d[1],h=Object(Qe.useState)(!!t.visible),d=$e()(h,2),h=d[0],q=d[1],d=Object(Qe.useRef)(),Y=e||d,K=Object(Qe.useRef)(),G=Object(Qe.useRef)({previousInputValue:"",searchIndex:0,editOptions:[],selectionStart:0,previousEditValue:"",deleteEndIndx:0}),X=r(o,"baseData",l),s=Je()(X,s,Xe()({},"".concat(X,"-disabled"),f));Object(Qe.useEffect)(function(){G.current.searchIndex=L.length,G.current.editOptions=L},[L]);var $=Object(Qe.useCallback)(function(){var n=[];return F.split(p).reduce(function(e,t){return n.push({start:e,end:e+t.length}),e+t.length+1},0),n},[p,F]);Object(Qe.useEffect)(function(){var e=$();H(e)},[$]),Object(Qe.useEffect)(function(){var e=[];I&&Array.isArray(b)&&(e=b),_(e=!I&&b?[b]:e),G.current.editOptions=ke()(e)},[b,I]),Object(Qe.useEffect)(function(){var e,t,n,r,o;G.current.previousEditValue&&(n=$(),r=Q(G.current.previousEditValue,p),e=Q(F,p),o=(null===(t=K.current)||void 0===t?void 0:t.selectionStart)||0,t=de(o,n),G.current.searchIndex=t,n=ke()(G.current.editOptions||[]),e.length-r.length==1&&(G.current.deleteEndIndx=t,n.splice(t,0,null)),e.length<r.length&&(r=G.current.previousEditValue,r=I?r.length-F.length+o:0,r=(o=pe(o,r,B)).start,o=o.end,null!=n&&n.splice(r,o-r+1)),G.current.editOptions=n,G.current.previousEditValue=F)},[p,F,I,$]);var Q=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").split(1<arguments.length?arguments[1]:void 0).filter(function(e){return e})};Object(Qe.useLayoutEffect)(function(){K.current&&(0<K.current.scrollWidth-K.current.offsetWidth?V(!0):V(!1))},[K,F]);var Z=Object(Qe.useCallback)(function(){var e=L.reduce(function(e,t,n,r){return"".concat(e).concat(t[w]).concat(n!==r.length-1?p:"")},"");G.current.previousInputValue=e,z(e),G.current.previousEditValue="".concat(e).concat(p)},[p,w,L]);Object(Qe.useEffect)(function(){Z()},[Z]);function J(e){q(!0);var t,n,r=e.target.value,o=r;I&&K.current&&r&&r.length>F.length&&(t=K.current.selectionStart||0,n=1===(G.current.selectionStart=t)&&r[1]!==p&&1!==r.length,e=t!==r.length&&r[t-2]===p&&r[t]!==p,(n||e)&&(K.current.value=o=r.substring(0,t)+p+r.substring(t,r.length),ue(K.current,t))),z(o),se(o)}function ee(e){if(!I)return e;if(K.current&&e){if(e.indexOf(p)<0)return e;var t=K.current.selectionStart||0,n=e.slice(0,t).lastIndexOf(p)+1,r=-1===(r=e.slice(t).indexOf(p))?e.length:t+r;return e=e.slice(n,r)}return e}function te(){f||(U(!0),I&&L.length&&z("".concat(F).concat(p)))}function ne(){var e;f||(U(!1),z(G.current.previousInputValue),G.current.previousEditValue="".concat(G.current.previousInputValue).concat(p),e=(G.current.editOptions||[]).filter(function(e){return e})||[],JSON.stringify(e)!==JSON.stringify(L)&&null!=P&&P(e.filter(function(e){return e}).map(function(e){return e.value}),e.filter(function(e){return e})),void 0===b&&_(e))}function re(){var e;f||K.current&&(e=K.current.scrollWidth-K.current.offsetWidth,K.current.scrollLeft=e,setTimeout(function(){ue(K.current,F.length+1)},0))}function oe(e){e.stopPropagation(),null!=T&&T(L)}function ae(e){e.stopPropagation(),null!=A&&A()}function ie(){var e=(t=fe((null===(t=K.current)||void 0===t?void 0:t.selectionStart)||0,(null===(e=K.current)||void 0===e?void 0:e.selectionEnd)||0)).start,t=t.end;he(K.current,e,t)}function ce(e){var t=void 0===(o=G.current.searchValue)?"":o,n=e.indexOf(t),r=e.substr(0,n),o=e.substr(n+t.length);return-1<n?Ze.a.createElement("span",null,r,Ze.a.createElement("span",{className:"".concat(X,"-dropdown-options-item-search")},t),o):Ze.a.createElement("span",null,e)}function le(){return m?Ze.a.createElement(iu,{defaultActiveKey:"history"},Ze.a.createElement(iu.TabPane,{key:"history",tab:"历史记录"},be(C,g)),Ze.a.createElement(iu.TabPane,{key:"collect",tab:"我的收藏"},be(E,g))):null}var se=function(e){e=ee(e);G.current.searchValue=e,null!=N&&N(e)},ue=function(e,t){e.setSelectionRange?(e.focus(),window.setTimeout(e.setSelectionRange(t,t),0)):e.createTextRange&&((e=e.createTextRange).collapse(!0),e.moveEnd("character",t),e.moveStart("character",t),e.select())},fe=function(e,t){for(var n=0;n<B.length;n++){var r=B[n];if(r.start<=e&&r.end>=t)return r}return{}},de=function(e,t){for(var n=0,r=0;r<t.length;r++){var o=t[r];o.start<=e&&o.end>=e&&(n=r)}return n},pe=function(e,t,n){for(var r={start:null,end:null},o=0;o<n.length;o++){var a=n[o];a.start>=e&&null===r.start&&(r.start=o),a.end<=t&&(r.end=o)}return r},he=function(e,t,n){e.setSelectionRange(t,n)},me=function(e){e=e.target.checked?y:[];P(e.map(function(e){return e.value}),e),void 0===b&&_(e)},ve=Object(Qe.useCallback)(function(e,t){null!=M&&M(t,e)},[M]),a=a&&!I&&!W,ge=Object(Qe.useCallback)(function(e){return 0<e.length&&e.length<y.length},[y]),ye=function(e){return y.length&&e.length===y.length},be=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=t&&Array.isArray(t)?t:e&&Array.isArray(e)&&e.length?Object.keys(e[0]).map(function(e){return{key:e}}):[],a=ge(L),i=ye(L);return Ze.a.createElement(Ze.a.Fragment,null,t&&Array.isArray(t)&&Ze.a.createElement("div",{className:"".concat(X,"-dropdown-columns")},o.map(function(e,t){return Ze.a.createElement("span",{key:e.key,className:"".concat(X,"-dropdown-columns-item"),title:e.title},I&&0===t&&r&&Ze.a.createElement(Ce,{style:{marginRight:5},checked:i,indeterminate:a,onChange:me}),e.title)})),k?Ze.a.createElement("div",{className:"".concat(X,"-dropdown-loading")},Ze.a.createElement(Fa,null)):e.length?xe(e,o,r):Oe(),n&&O&&Ze.a.createElement("div",{className:"".concat(X,"-dropdown-footer")},O))},we=Object(Qe.useCallback)(function(t){return Ze.a.createElement("span",{className:"".concat(X,"-dropdown-options-item-collect"),onMouseDown:function(e){return e.stopPropagation()}},-1===E.findIndex(function(e){return e.value===t.value})?Ze.a.createElement(Ee,{className:"".concat(X,"-dropdown-options-item-collect-not-icon"),type:"collect",onClick:function(){return ve(t,!0)}}):Ze.a.createElement(Ee,{className:"".concat(X,"-dropdown-options-item-collect-icon"),type:"star",onClick:function(){return ve(t,!1)},style:{visibility:"visible"}}))},[X,E,ve]),xe=function(e,o){var a=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Ze.a.createElement(Ze.a.Fragment,null,e.map(function(r,e){return x<e+1?null:Ze.a.createElement("div",{key:r.value,className:Je()("".concat(X,"-dropdown-options"),{selected:L.some(function(e){return e.value===r.value})}),onMouseDown:function(){return function(t){if(G.current.searchValue=void 0,-1!==L.findIndex(function(e){return e.value===t.value})){var e=L.filter(function(e){return e.value!==t.value});return I&&void 0===b&&_(e),void(null!=P&&P(e.filter(function(e){return e}).map(function(e){return e.value}),e.filter(function(e){return e})))}e=ke()(G.current.editOptions||[]);null!=e&&e.splice(G.current.searchIndex||0,1,t),I?null!=P&&P((e||[]).filter(function(e){return e}).map(function(e){return e.value}),(e||[]).filter(function(e){return e})):null!=P&&P(t.value,t),null!=D&&D(t.value,t),void 0===b&&(G.current.editOptions=e,_((e||[]).filter(function(e){return e})))}(r)}},o.map(function(e,t){return Ze.a.createElement("span",{key:e.key,className:"".concat(X,"-dropdown-options-item"),title:r[e.key]},I&&a&&0===t&&Ze.a.createElement(Ce,{style:{marginRight:5},value:r.value,checked:L.some(function(e){return e.value===r.value})}),(n=r,e=e,"all"===S||S===e.key?ce(n[e.key]):n[e.key]),v&&o.length-1===t&&we(r));var n}))}))},Oe=Object(Qe.useCallback)(function(){return Ze.a.createElement("div",{className:"".concat(X,"-dropdown-empty")},Ze.a.createElement(lt,null))},[X]),h=iy(iy({popperStyle:function(){if(null!=Y&&Y.current)return{width:(null==j?void 0:j.width)||330,zIndex:1050}}(),placement:"bottomLeft"},c),{},{defaultVisible:h,visible:h,prefixCls:"".concat(X,"-dropdown-wrapper"),onVisibleChange:function(e){null!=R&&R(e),void 0!==t.visible||e&&!W||q(e)}});return rt(Ze.a.createElement("div",{className:s,ref:Y,style:i},Ze.a.createElement(qe,{ref:K,borderType:"none",disabled:f,onChange:J,placeholder:n,value:F,onDoubleClick:ie,onFocus:te,onBlur:ne}),u&&!W&&I&&Ze.a.createElement("span",{className:"".concat(X,"-total"),onClick:re},"共".concat(L.length,"项")),a&&!f&&Ze.a.createElement("span",{className:"".concat(X,"-detail"),onClick:oe},Ze.a.createElement(Ee,{type:"material"})),!f&&Ze.a.createElement("span",{className:"".concat(X,"-suffix"),onClick:ae},Ze.a.createElement(Ee,{type:"search"}))),Ze.a.createElement("div",{className:"".concat(X,"-dropdown")},G.current.searchValue?be(y,g,!0,!0):le()),h)});b.displayName="BaseData";var cy=b,ly=["size","style","className","target","href","underscore","children","prefix","suffix","disabled","onClick","prefixCls"],b=(C("large","middle","small"),Ze.a.forwardRef(function(e,t){var n=Object(Qe.useContext)(tt),r=n.getPrefixCls,o=n.prefixCls,a=n.compDefaultProps,i=et("Link",a,e),c=i.size,l=i.style,s=i.className,u=i.target,f=i.href,n=i.underscore,a=i.children,d=i.prefix,p=i.suffix,h=i.disabled,m=i.onClick,e=i.prefixCls,i=ee()(i,ly),t=t||Ze.a.createRef(),v=r(o,"link",e),c=Je()((e={},Xe()(e,"".concat(v),!0),Xe()(e,"".concat(v,"-size-").concat(c),c),e)),s=Je()(s,(e={},Xe()(e,"".concat(v,"-text"),!0),Xe()(e,"".concat(v,"-underscore"),n),Xe()(e,"".concat(v,"-disabled"),h),e)),n=Object(Qe.useMemo)(function(){return d?Ze.a.createElement("span",{className:"".concat(v,"-prefix")},d):null},[d,v]),e=Object(Qe.useMemo)(function(){return p?Ze.a.createElement("span",{className:"".concat(v,"-suffix")},p):null},[p,v]);return Ze.a.createElement("div",{style:l,className:c},n,Ze.a.createElement("a",Ge()({ref:t,target:u,disabled:h,href:f,className:s,onClick:function(e){h&&e.preventDefault(),m&&null!=m&&m(e)}},i),a),e)}));b.displayName="Link";var sy=b}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=433);function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var a,i});
|
|
203
203
|
//# sourceMappingURL=kdesign.min.js.map
|