@yester/virtual-table 1.1.4 → 1.2.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(_e,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],_):(_e=typeof globalThis<"u"?globalThis:_e||self,_(_e.VirtualTable={},_e.React,_e.ReactDOM))})(this,function(_e,_,
|
|
1
|
+
(function(_e,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],_):(_e=typeof globalThis<"u"?globalThis:_e||self,_(_e.VirtualTable={},_e.React,_e.ReactDOM))})(this,function(_e,_,Et){"use strict";function sr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const re=sr(_);function ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}},De={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var wt;function lr(){if(wt)return De;wt=1;var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(h,l,c){var f,E={},y=null,k=null;c!==void 0&&(y=""+c),l.key!==void 0&&(y=""+l.key),l.ref!==void 0&&(k=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(E[f]=l[f]);if(h&&h.defaultProps)for(f in l=h.defaultProps,l)E[f]===void 0&&(E[f]=l[f]);return{$$typeof:t,type:h,key:y,ref:k,props:E,_owner:i.current}}return De.Fragment=r,De.jsx=a,De.jsxs=a,De}var Fe={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),he
|
|
20
|
-
`),oe=
|
|
21
|
-
`+
|
|
17
|
+
*/var _t;function cr(){return _t||(_t=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),h=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),A=Symbol.iterator,R="@@iterator";function u(o){if(o===null||typeof o!="object")return null;var d=A&&o[A]||o[R];return typeof d=="function"?d:null}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(o){{for(var d=arguments.length,m=new Array(d>1?d-1:0),$=1;$<d;$++)m[$-1]=arguments[$];X("error",o,m)}}function X(o,d,m){{var $=M.ReactDebugCurrentFrame,U=$.getStackAddendum();U!==""&&(d+="%s",m=m.concat([U]));var Z=m.map(function(Y){return String(Y)});Z.unshift("Warning: "+d),Function.prototype.apply.call(console[o],console,Z)}}var I=!1,W=!1,F=!1,D=!1,p=!1,N;N=Symbol.for("react.module.reference");function z(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===s||p||o===i||o===c||o===f||D||o===k||I||W||F||typeof o=="object"&&o!==null&&(o.$$typeof===y||o.$$typeof===E||o.$$typeof===a||o.$$typeof===h||o.$$typeof===l||o.$$typeof===N||o.getModuleId!==void 0))}function V(o,d,m){var $=o.displayName;if($)return $;var U=d.displayName||d.name||"";return U!==""?m+"("+U+")":m}function B(o){return o.displayName||"Context"}function G(o){if(o==null)return null;if(typeof o.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case h:var d=o;return B(d)+".Consumer";case a:var m=o;return B(m._context)+".Provider";case l:return V(o,o.render,"ForwardRef");case E:var $=o.displayName||null;return $!==null?$:G(o.type)||"Memo";case y:{var U=o,Z=U._payload,Y=U._init;try{return G(Y(Z))}catch{return null}}}return null}var ne=Object.assign,pe=0,be,Pe,we,ye,xe,g,x;function w(){}w.__reactDisabledLog=!0;function b(){{if(pe===0){be=console.log,Pe=console.info,we=console.warn,ye=console.error,xe=console.group,g=console.groupCollapsed,x=console.groupEnd;var o={configurable:!0,enumerable:!0,value:w,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}pe++}}function v(){{if(pe--,pe===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},o,{value:be}),info:ne({},o,{value:Pe}),warn:ne({},o,{value:we}),error:ne({},o,{value:ye}),group:ne({},o,{value:xe}),groupCollapsed:ne({},o,{value:g}),groupEnd:ne({},o,{value:x})})}pe<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var T=M.ReactCurrentDispatcher,S;function C(o,d,m){{if(S===void 0)try{throw Error()}catch(U){var $=U.stack.trim().match(/\n( *(at )?)/);S=$&&$[1]||""}return`
|
|
18
|
+
`+S+o}}var O=!1,L;{var K=typeof WeakMap=="function"?WeakMap:Map;L=new K}function le(o,d){if(!o||O)return"";{var m=L.get(o);if(m!==void 0)return m}var $;O=!0;var U=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=T.current,T.current=null,b();try{if(d){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(me){$=me}Reflect.construct(o,[],Y)}else{try{Y.call()}catch(me){$=me}o.call(Y.prototype)}}else{try{throw Error()}catch(me){$=me}o()}}catch(me){if(me&&$&&typeof me.stack=="string"){for(var H=me.stack.split(`
|
|
19
|
+
`),he=$.stack.split(`
|
|
20
|
+
`),oe=H.length-1,ae=he.length-1;oe>=1&&ae>=0&&H[oe]!==he[ae];)ae--;for(;oe>=1&&ae>=0;oe--,ae--)if(H[oe]!==he[ae]){if(oe!==1||ae!==1)do if(oe--,ae--,ae<0||H[oe]!==he[ae]){var Ee=`
|
|
21
|
+
`+H[oe].replace(" at new "," at ");return o.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",o.displayName)),typeof o=="function"&&L.set(o,Ee),Ee}while(oe>=1&&ae>=0);break}}}finally{O=!1,T.current=Z,v(),Error.prepareStackTrace=U}var $e=o?o.displayName||o.name:"",Ae=$e?C($e):"";return typeof o=="function"&&L.set(o,Ae),Ae}function ce(o,d,m){return le(o,!1)}function P(o){var d=o.prototype;return!!(d&&d.isReactComponent)}function ee(o,d,m){if(o==null)return"";if(typeof o=="function")return le(o,P(o));if(typeof o=="string")return C(o);switch(o){case c:return C("Suspense");case f:return C("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case l:return ce(o.render);case E:return ee(o.type,d,m);case y:{var $=o,U=$._payload,Z=$._init;try{return ee(Z(U),d,m)}catch{}}}return""}var te=Object.prototype.hasOwnProperty,de={},ke=M.ReactDebugCurrentFrame;function ve(o){if(o){var d=o._owner,m=ee(o.type,o._source,d?d.type:null);ke.setExtraStackFrame(m)}else ke.setExtraStackFrame(null)}function ie(o,d,m,$,U){{var Z=Function.call.bind(te);for(var Y in o)if(Z(o,Y)){var H=void 0;try{if(typeof o[Y]!="function"){var he=Error(($||"React class")+": "+m+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw he.name="Invariant Violation",he}H=o[Y](d,Y,$,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){H=oe}H&&!(H instanceof Error)&&(ve(U),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$||"React class",m,Y,typeof H),ve(null)),H instanceof Error&&!(H.message in de)&&(de[H.message]=!0,ve(U),j("Failed %s type: %s",m,H.message),ve(null))}}}var se=Array.isArray;function ue(o){return se(o)}function je(o){{var d=typeof Symbol=="function"&&Symbol.toStringTag,m=d&&o[Symbol.toStringTag]||o.constructor.name||"Object";return m}}function Je(o){try{return Me(o),!1}catch{return!0}}function Me(o){return""+o}function Ve(o){if(Je(o))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",je(o)),Me(o)}var Re=M.ReactCurrentOwner,xn={key:!0,ref:!0,__self:!0,__source:!0},Xt,Zt,vt;vt={};function Rn(o){if(te.call(o,"ref")){var d=Object.getOwnPropertyDescriptor(o,"ref").get;if(d&&d.isReactWarning)return!1}return o.ref!==void 0}function Tn(o){if(te.call(o,"key")){var d=Object.getOwnPropertyDescriptor(o,"key").get;if(d&&d.isReactWarning)return!1}return o.key!==void 0}function Pn(o,d){if(typeof o.ref=="string"&&Re.current&&d&&Re.current.stateNode!==d){var m=G(Re.current.type);vt[m]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',G(Re.current.type),o.ref),vt[m]=!0)}}function jn(o,d){{var m=function(){Xt||(Xt=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};m.isReactWarning=!0,Object.defineProperty(o,"key",{get:m,configurable:!0})}}function Mn(o,d){{var m=function(){Zt||(Zt=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};m.isReactWarning=!0,Object.defineProperty(o,"ref",{get:m,configurable:!0})}}var An=function(o,d,m,$,U,Z,Y){var H={$$typeof:t,type:o,key:d,ref:m,props:Y,_owner:Z};return H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(H,"_source",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H};function zn(o,d,m,$,U){{var Z,Y={},H=null,he=null;m!==void 0&&(Ve(m),H=""+m),Tn(d)&&(Ve(d.key),H=""+d.key),Rn(d)&&(he=d.ref,Pn(d,U));for(Z in d)te.call(d,Z)&&!xn.hasOwnProperty(Z)&&(Y[Z]=d[Z]);if(o&&o.defaultProps){var oe=o.defaultProps;for(Z in oe)Y[Z]===void 0&&(Y[Z]=oe[Z])}if(H||he){var ae=typeof o=="function"?o.displayName||o.name||"Unknown":o;H&&jn(Y,ae),he&&Mn(Y,ae)}return An(o,H,he,U,$,Re.current,Y)}}var mt=M.ReactCurrentOwner,Qt=M.ReactDebugCurrentFrame;function Le(o){if(o){var d=o._owner,m=ee(o.type,o._source,d?d.type:null);Qt.setExtraStackFrame(m)}else Qt.setExtraStackFrame(null)}var gt;gt=!1;function bt(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function er(){{if(mt.current){var o=G(mt.current.type);if(o)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+o+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+o+"`."}return""}}function In(o){{if(o!==void 0){var d=o.fileName.replace(/^.*[\\\/]/,""),m=o.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+d+":"+m+"."}return""}}var tr={};function kn(o){{var d=er();if(!d){var m=typeof o=="string"?o:o.displayName||o.name;m&&(d=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+
|
|
27
|
+
Check the top-level render call using <`+m+">.")}return d}}function rr(o,d){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var m=kn(d);if(tr[m])return;tr[m]=!0;var $="";o&&o._owner&&o._owner!==mt.current&&($=" It was passed a child from "+G(o._owner.type)+"."),Le(o),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,$),Le(null)}}function nr(o,d){{if(typeof o!="object")return;if(ue(o))for(var m=0;m<o.length;m++){var $=o[m];bt($)&&rr($,d)}else if(bt(o))o._store&&(o._store.validated=!0);else if(o){var U=u(o);if(typeof U=="function"&&U!==o.entries)for(var Z=U.call(o),Y;!(Y=Z.next()).done;)bt(Y.value)&&rr(Y.value,d)}}}function Ln(o){{var d=o.type;if(d==null||typeof d=="string")return;var m;if(typeof d=="function")m=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===l||d.$$typeof===E))m=d.propTypes;else return;if(m){var $=G(d);ie(m,o.props,"prop",$,o)}else if(d.PropTypes!==void 0&&!gt){gt=!0;var U=G(d);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",U||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $n(o){{for(var d=Object.keys(o.props),m=0;m<d.length;m++){var $=d[m];if($!=="children"&&$!=="key"){Le(o),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Le(null);break}}o.ref!==null&&(Le(o),j("Invalid attribute `ref` supplied to `React.Fragment`."),Le(null))}}var or={};function ir(o,d,m,$,U,Z){{var Y=z(o);if(!Y){var H="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var he=In(U);he?H+=he:H+=er();var oe;o===null?oe="null":ue(o)?oe="array":o!==void 0&&o.$$typeof===t?(oe="<"+(G(o.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof o,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,H)}var ae=zn(o,d,m,U,Z);if(ae==null)return ae;if(Y){var Ee=d.children;if(Ee!==void 0)if($)if(ue(Ee)){for(var $e=0;$e<Ee.length;$e++)nr(Ee[$e],o);Object.freeze&&Object.freeze(Ee)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else nr(Ee,o)}if(te.call(d,"key")){var Ae=G(o),me=Object.keys(d).filter(function(Hn){return Hn!=="key"}),yt=me.length>0?"{key: someKey, "+me.join(": ..., ")+": ...}":"{key: someKey}";if(!or[Ae+yt]){var Vn=me.length>0?"{"+me.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
28
28
|
let props = %s;
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,
|
|
32
|
+
<%s key={someKey} {...props} />`,yt,Ae,Vn,Ae),or[Ae+yt]=!0}}return o===n?$n(ae):Ln(ae),ae}}function Dn(o,d,m){return ir(o,d,m,!0)}function Fn(o,d,m){return ir(o,d,m,!1)}var Nn=Fn,Wn=Dn;Fe.Fragment=n,Fe.jsx=Nn,Fe.jsxs=Wn}()),Fe}process.env.NODE_ENV==="production"?Xe.exports=lr():Xe.exports=cr();var Q=Xe.exports;function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ze.apply(null,arguments)}function Se(e){"@babel/helpers - typeof";return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Se(e)}var ur=Symbol.for("react.element"),fr=Symbol.for("react.transitional.element"),dr=Symbol.for("react.fragment");function St(e){return e&&Se(e)==="object"&&(e.$$typeof===ur||e.$$typeof===fr)&&e.type===dr}function Qe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return _.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Qe(n)):St(n)&&n.props?r=r.concat(Qe(n.props.children,t)):r.push(n))}),r}var hr=[];function Ct(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0)var r=hr.reduce(function(n,i){return i(n??"","warning")},t)}function pr(e,t){if(Se(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Se(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ot(e){var t=pr(e,"string");return Se(t)=="symbol"?t:t+""}function vr(e,t,r){return(t=Ot(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xt(Object(r),!0).forEach(function(n){vr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tt(e){return e instanceof HTMLElement||e instanceof SVGElement}function mr(e){return e&&Se(e)==="object"&&Tt(e.nativeElement)?e.nativeElement:Tt(e)?e:null}function et(e){var t=mr(e);if(t)return t;if(e instanceof _.Component){var r;return(r=Et.findDOMNode)===null||r===void 0?void 0:r.call(Et,e)}return null}var tt={exports:{}},q={};/**
|
|
33
33
|
* @license React
|
|
34
34
|
* react-is.production.min.js
|
|
35
35
|
*
|
|
@@ -37,7 +37,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the MIT license found in the
|
|
39
39
|
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var
|
|
40
|
+
*/var Pt;function gr(){if(Pt)return q;Pt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),h=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function R(u){if(typeof u=="object"&&u!==null){var M=u.$$typeof;switch(M){case e:switch(u=u.type,u){case r:case i:case n:case c:case f:return u;default:switch(u=u&&u.$$typeof,u){case h:case a:case l:case y:case E:case s:return u;default:return M}}case t:return M}}}return q.ContextConsumer=a,q.ContextProvider=s,q.Element=e,q.ForwardRef=l,q.Fragment=r,q.Lazy=y,q.Memo=E,q.Portal=t,q.Profiler=i,q.StrictMode=n,q.Suspense=c,q.SuspenseList=f,q.isAsyncMode=function(){return!1},q.isConcurrentMode=function(){return!1},q.isContextConsumer=function(u){return R(u)===a},q.isContextProvider=function(u){return R(u)===s},q.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},q.isForwardRef=function(u){return R(u)===l},q.isFragment=function(u){return R(u)===r},q.isLazy=function(u){return R(u)===y},q.isMemo=function(u){return R(u)===E},q.isPortal=function(u){return R(u)===t},q.isProfiler=function(u){return R(u)===i},q.isStrictMode=function(u){return R(u)===n},q.isSuspense=function(u){return R(u)===c},q.isSuspenseList=function(u){return R(u)===f},q.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===r||u===i||u===n||u===c||u===f||u===k||typeof u=="object"&&u!==null&&(u.$$typeof===y||u.$$typeof===E||u.$$typeof===s||u.$$typeof===a||u.$$typeof===l||u.$$typeof===A||u.getModuleId!==void 0)},q.typeOf=R,q}var J={};/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-is.development.js
|
|
43
43
|
*
|
|
@@ -45,9 +45,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var Tt;function gr(){return Tt||(Tt=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),j=!1,S=!1,d=!1,D=!1,$=!1,X;X=Symbol.for("react.module.reference");function M(P){return!!(typeof P=="string"||typeof P=="function"||P===r||P===i||$||P===n||P===f||P===h||D||P===A||j||S||d||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===E||P.$$typeof===s||P.$$typeof===a||P.$$typeof===c||P.$$typeof===X||P.getModuleId!==void 0))}function N(P){if(typeof P=="object"&&P!==null){var ee=P.$$typeof;switch(ee){case e:var te=P.type;switch(te){case r:case i:case n:case f:case h:return te;default:var de=te&&te.$$typeof;switch(de){case l:case a:case c:case v:case E:case s:return de;default:return ee}}case t:return ee}}}var F=a,I=s,p=e,Y=c,z=r,V=v,K=E,J=t,ne=i,pe=n,be=f,Pe=h,we=!1,ye=!1;function Oe(P){return we||(we=!0),!1}function b(P){return ye||(ye=!0),!1}function R(P){return N(P)===a}function w(P){return N(P)===s}function y(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function m(P){return N(P)===c}function T(P){return N(P)===r}function C(P){return N(P)===v}function x(P){return N(P)===E}function O(P){return N(P)===t}function k(P){return N(P)===i}function B(P){return N(P)===n}function le(P){return N(P)===f}function ce(P){return N(P)===h}U.ContextConsumer=F,U.ContextProvider=I,U.Element=p,U.ForwardRef=Y,U.Fragment=z,U.Lazy=V,U.Memo=K,U.Portal=J,U.Profiler=ne,U.StrictMode=pe,U.Suspense=be,U.SuspenseList=Pe,U.isAsyncMode=Oe,U.isConcurrentMode=b,U.isContextConsumer=R,U.isContextProvider=w,U.isElement=y,U.isForwardRef=m,U.isFragment=T,U.isLazy=C,U.isMemo=x,U.isPortal=O,U.isProfiler=k,U.isStrictMode=B,U.isSuspense=le,U.isSuspenseList=ce,U.isValidElementType=M,U.typeOf=N}()),U}process.env.NODE_ENV==="production"?et.exports=mr():et.exports=gr();var tt=et.exports;function br(e,t,r){var n=re.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var yr=Number(_.version.split(".")[0]),Er=function(t,r){typeof t=="function"?t(r):Se(t)==="object"&&t&&"current"in t&&(t.current=r)},wr=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(s){r.forEach(function(a){Er(a,s)})}},_r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return br(function(){return wr.apply(void 0,r)},r,function(i,s){return i.length!==s.length||i.every(function(a,l){return a!==s[l]})})},Sr=function(t){var r,n;if(!t)return!1;if(Pt(t)&&yr>=19)return!0;var i=tt.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==tt.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==tt.ForwardRef)};function Pt(e){return _.isValidElement(e)&&!wt(e)}var Cr=function(t){if(t&&Pt(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},rt=re.createContext(null);function xr(e){var t=e.children,r=e.onBatchResize,n=re.useRef(0),i=re.useRef([]),s=re.useContext(rt),a=re.useCallback(function(l,c,f){n.current+=1;var h=n.current;i.current.push({size:l,element:c,data:f}),Promise.resolve().then(function(){h===n.current&&(r==null||r(i.current),i.current=[])}),s==null||s(l,c,f)},[r,s]);return re.createElement(rt.Provider,{value:a},t)}var jt=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,s){return i[0]===r?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,s=this.__entries__;i<s.length;i++){var a=s[i];r.call(n,a[1],a[0])}},t}()}(),nt=typeof window<"u"&&typeof document<"u"&&window.document===document,He=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),Or=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(He):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Rr=2;function Tr(e,t){var r=!1,n=!1,i=0;function s(){r&&(r=!1,e()),n&&l()}function a(){Or(s)}function l(){var c=Date.now();if(r){if(c-i<Rr)return;n=!0}else r=!0,n=!1,setTimeout(a,t);i=c}return l}var Pr=20,jr=["top","right","bottom","left","width","height","size","weight"],Mr=typeof MutationObserver<"u",Ar=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Tr(this.refresh.bind(this),Pr)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!nt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Mr?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!nt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=jr.some(function(s){return!!~n.indexOf(s)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Mt=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},ze=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||He},At=Ye(0,0,0,0);function Be(e){return parseFloat(e)||0}function zt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var s=e["border-"+i+"-width"];return n+Be(s)},0)}function zr(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var s=i[n],a=e["padding-"+s];r[s]=Be(a)}return r}function Ir(e){var t=e.getBBox();return Ye(0,0,t.width,t.height)}function kr(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return At;var n=ze(e).getComputedStyle(e),i=zr(n),s=i.left+i.right,a=i.top+i.bottom,l=Be(n.width),c=Be(n.height);if(n.boxSizing==="border-box"&&(Math.round(l+s)!==t&&(l-=zt(n,"left","right")+s),Math.round(c+a)!==r&&(c-=zt(n,"top","bottom")+a)),!$r(e)){var f=Math.round(l+s)-t,h=Math.round(c+a)-r;Math.abs(f)!==1&&(l-=f),Math.abs(h)!==1&&(c-=h)}return Ye(i.left,i.top,l,c)}var Lr=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ze(e).SVGGraphicsElement}:function(e){return e instanceof ze(e).SVGElement&&typeof e.getBBox=="function"}}();function $r(e){return e===ze(e).document.documentElement}function Dr(e){return nt?Lr(e)?Ir(e):kr(e):At}function Fr(e){var t=e.x,r=e.y,n=e.width,i=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(s.prototype);return Mt(a,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),a}function Ye(e,t,r,n){return{x:e,y:t,width:r,height:n}}var Nr=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ye(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Dr(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Wr=function(){function e(t,r){var n=Fr(r);Mt(this,{target:t,contentRect:n})}return e}(),Vr=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new jt,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ze(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new Nr(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ze(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Wr(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),It=typeof WeakMap<"u"?new WeakMap:new jt,kt=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Ar.getInstance(),n=new Vr(t,r,this);It.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){kt.prototype[e]=function(){var t;return(t=It.get(this))[e].apply(t,arguments)}});var Hr=function(){return typeof He.ResizeObserver<"u"?He.ResizeObserver:kt}(),Ce=new Map;function Lt(e){e.forEach(function(t){var r,n=t.target;(r=Ce.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var $t=new Hr(Lt);process.env.NODE_ENV,process.env.NODE_ENV;function Br(e,t){Ce.has(e)||(Ce.set(e,new Set),$t.observe(e)),Ce.get(e).add(t)}function Yr(e,t){Ce.has(e)&&(Ce.get(e).delete(t),Ce.get(e).size||($t.unobserve(e),Ce.delete(e)))}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,St(n.key),n)}}function Gr(e,t,r){return t&&Dt(e.prototype,t),r&&Dt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ot(e,t)}function qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ot(e,t)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ke(e)}function Ft(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ft=function(){return!!e})()}function Ur(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jr(e,t){if(t&&(Se(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ur(e)}function Xr(e){var t=Ft();return function(){var r,n=Ke(e);if(t){var i=Ke(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jr(this,r)}}var Zr=function(e){qr(r,e);var t=Xr(r);function r(){return Kr(this,r),t.apply(this,arguments)}return Gr(r,[{key:"render",value:function(){return this.props.children}}]),r}(re.Component);function Qr(e,t){var r=e.children,n=e.disabled,i=re.useRef(null),s=re.useRef(null),a=re.useContext(rt),l=typeof r=="function",c=l?r(i):r,f=re.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!l&&re.isValidElement(c)&&Sr(c),E=h?Cr(c):null,v=_r(E,i),A=function(){var D;return Qe(i.current)||(i.current&&Se(i.current)==="object"?Qe((D=i.current)===null||D===void 0?void 0:D.nativeElement):null)||Qe(s.current)};re.useImperativeHandle(t,function(){return A()});var j=re.useRef(e);j.current=e;var S=re.useCallback(function(d){var D=j.current,$=D.onResize,X=D.data,M=d.getBoundingClientRect(),N=M.width,F=M.height,I=d.offsetWidth,p=d.offsetHeight,Y=Math.floor(N),z=Math.floor(F);if(f.current.width!==Y||f.current.height!==z||f.current.offsetWidth!==I||f.current.offsetHeight!==p){var V={width:Y,height:z,offsetWidth:I,offsetHeight:p};f.current=V;var K=I===Math.round(N)?N:I,J=p===Math.round(F)?F:p,ne=xt(xt({},V),{},{offsetWidth:K,offsetHeight:J});a==null||a(ne,d,X),$&&Promise.resolve().then(function(){$(ne,d)})}},[]);return re.useEffect(function(){var d=A();return d&&!n&&Br(d,S),function(){return Yr(d,S)}},[i.current,n]),re.createElement(Zr,{ref:s},h?re.cloneElement(c,{ref:v}):c)}var Nt=re.forwardRef(Qr);process.env.NODE_ENV!=="production"&&(Nt.displayName="SingleObserver");var en="rc-observer-key";function tn(e,t){var r=e.children,n=typeof r=="function"?[r]:Ze(r);return process.env.NODE_ENV!=="production"&&(n.length>1?_t(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):n.length===0&&_t(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),n.map(function(i,s){var a=(i==null?void 0:i.key)||"".concat(en,"-").concat(s);return re.createElement(Nt,Xe({},e,{key:a,ref:s===0?t:void 0}),i)})}var it=re.forwardRef(tn);process.env.NODE_ENV!=="production"&&(it.displayName="ResizeObserver"),it.Collection=xr;var Wt={exports:{}};/*!
|
|
48
|
+
*/var jt;function br(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),h=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),A=!1,R=!1,u=!1,M=!1,j=!1,X;X=Symbol.for("react.module.reference");function I(P){return!!(typeof P=="string"||typeof P=="function"||P===r||P===i||j||P===n||P===c||P===f||M||P===k||A||R||u||typeof P=="object"&&P!==null&&(P.$$typeof===y||P.$$typeof===E||P.$$typeof===s||P.$$typeof===a||P.$$typeof===l||P.$$typeof===X||P.getModuleId!==void 0))}function W(P){if(typeof P=="object"&&P!==null){var ee=P.$$typeof;switch(ee){case e:var te=P.type;switch(te){case r:case i:case n:case c:case f:return te;default:var de=te&&te.$$typeof;switch(de){case h:case a:case l:case y:case E:case s:return de;default:return ee}}case t:return ee}}}var F=a,D=s,p=e,N=l,z=r,V=y,B=E,G=t,ne=i,pe=n,be=c,Pe=f,we=!1,ye=!1;function xe(P){return we||(we=!0),!1}function g(P){return ye||(ye=!0),!1}function x(P){return W(P)===a}function w(P){return W(P)===s}function b(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function v(P){return W(P)===l}function T(P){return W(P)===r}function S(P){return W(P)===y}function C(P){return W(P)===E}function O(P){return W(P)===t}function L(P){return W(P)===i}function K(P){return W(P)===n}function le(P){return W(P)===c}function ce(P){return W(P)===f}J.ContextConsumer=F,J.ContextProvider=D,J.Element=p,J.ForwardRef=N,J.Fragment=z,J.Lazy=V,J.Memo=B,J.Portal=G,J.Profiler=ne,J.StrictMode=pe,J.Suspense=be,J.SuspenseList=Pe,J.isAsyncMode=xe,J.isConcurrentMode=g,J.isContextConsumer=x,J.isContextProvider=w,J.isElement=b,J.isForwardRef=v,J.isFragment=T,J.isLazy=S,J.isMemo=C,J.isPortal=O,J.isProfiler=L,J.isStrictMode=K,J.isSuspense=le,J.isSuspenseList=ce,J.isValidElementType=I,J.typeOf=W}()),J}process.env.NODE_ENV==="production"?tt.exports=gr():tt.exports=br();var rt=tt.exports;function yr(e,t,r){var n=re.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var Er=Number(_.version.split(".")[0]),wr=function(t,r){typeof t=="function"?t(r):Se(t)==="object"&&t&&"current"in t&&(t.current=r)},_r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(s){r.forEach(function(a){wr(a,s)})}},Sr=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yr(function(){return _r.apply(void 0,r)},r,function(i,s){return i.length!==s.length||i.every(function(a,h){return a!==s[h]})})},Cr=function(t){var r,n;if(!t)return!1;if(Mt(t)&&Er>=19)return!0;var i=rt.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==rt.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==rt.ForwardRef)};function Mt(e){return _.isValidElement(e)&&!St(e)}var Or=function(t){if(t&&Mt(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},nt=re.createContext(null);function xr(e){var t=e.children,r=e.onBatchResize,n=re.useRef(0),i=re.useRef([]),s=re.useContext(nt),a=re.useCallback(function(h,l,c){n.current+=1;var f=n.current;i.current.push({size:h,element:l,data:c}),Promise.resolve().then(function(){f===n.current&&(r==null||r(i.current),i.current=[])}),s==null||s(h,l,c)},[r,s]);return re.createElement(nt.Provider,{value:a},t)}var At=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,s){return i[0]===r?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,s=this.__entries__;i<s.length;i++){var a=s[i];r.call(n,a[1],a[0])}},t}()}(),ot=typeof window<"u"&&typeof document<"u"&&window.document===document,He=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),Rr=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(He):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Tr=2;function Pr(e,t){var r=!1,n=!1,i=0;function s(){r&&(r=!1,e()),n&&h()}function a(){Rr(s)}function h(){var l=Date.now();if(r){if(l-i<Tr)return;n=!0}else r=!0,n=!1,setTimeout(a,t);i=l}return h}var jr=20,Mr=["top","right","bottom","left","width","height","size","weight"],Ar=typeof MutationObserver<"u",zr=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Pr(this.refresh.bind(this),jr)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ot||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ar?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ot||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=Mr.some(function(s){return!!~n.indexOf(s)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),zt=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},ze=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||He},It=Ye(0,0,0,0);function Be(e){return parseFloat(e)||0}function kt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var s=e["border-"+i+"-width"];return n+Be(s)},0)}function Ir(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var s=i[n],a=e["padding-"+s];r[s]=Be(a)}return r}function kr(e){var t=e.getBBox();return Ye(0,0,t.width,t.height)}function Lr(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return It;var n=ze(e).getComputedStyle(e),i=Ir(n),s=i.left+i.right,a=i.top+i.bottom,h=Be(n.width),l=Be(n.height);if(n.boxSizing==="border-box"&&(Math.round(h+s)!==t&&(h-=kt(n,"left","right")+s),Math.round(l+a)!==r&&(l-=kt(n,"top","bottom")+a)),!Dr(e)){var c=Math.round(h+s)-t,f=Math.round(l+a)-r;Math.abs(c)!==1&&(h-=c),Math.abs(f)!==1&&(l-=f)}return Ye(i.left,i.top,h,l)}var $r=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ze(e).SVGGraphicsElement}:function(e){return e instanceof ze(e).SVGElement&&typeof e.getBBox=="function"}}();function Dr(e){return e===ze(e).document.documentElement}function Fr(e){return ot?$r(e)?kr(e):Lr(e):It}function Nr(e){var t=e.x,r=e.y,n=e.width,i=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(s.prototype);return zt(a,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),a}function Ye(e,t,r,n){return{x:e,y:t,width:r,height:n}}var Wr=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ye(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Fr(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Vr=function(){function e(t,r){var n=Nr(r);zt(this,{target:t,contentRect:n})}return e}(),Hr=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new At,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ze(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new Wr(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ze(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Vr(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Lt=typeof WeakMap<"u"?new WeakMap:new At,$t=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=zr.getInstance(),n=new Hr(t,r,this);Lt.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){$t.prototype[e]=function(){var t;return(t=Lt.get(this))[e].apply(t,arguments)}});var Br=function(){return typeof He.ResizeObserver<"u"?He.ResizeObserver:$t}(),Ce=new Map;function Dt(e){e.forEach(function(t){var r,n=t.target;(r=Ce.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var Ft=new Br(Dt);process.env.NODE_ENV,process.env.NODE_ENV;function Yr(e,t){Ce.has(e)||(Ce.set(e,new Set),Ft.observe(e)),Ce.get(e).add(t)}function Kr(e,t){Ce.has(e)&&(Ce.get(e).delete(t),Ce.get(e).size||(Ft.unobserve(e),Ce.delete(e)))}function Gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ot(n.key),n)}}function Ur(e,t,r){return t&&Nt(e.prototype,t),r&&Nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},it(e,t)}function qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&it(e,t)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ke(e)}function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wt=function(){return!!e})()}function Jr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xr(e,t){if(t&&(Se(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jr(e)}function Zr(e){var t=Wt();return function(){var r,n=Ke(e);if(t){var i=Ke(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xr(this,r)}}var Qr=function(e){qr(r,e);var t=Zr(r);function r(){return Gr(this,r),t.apply(this,arguments)}return Ur(r,[{key:"render",value:function(){return this.props.children}}]),r}(re.Component);function en(e,t){var r=e.children,n=e.disabled,i=re.useRef(null),s=re.useRef(null),a=re.useContext(nt),h=typeof r=="function",l=h?r(i):r,c=re.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!h&&re.isValidElement(l)&&Cr(l),E=f?Or(l):null,y=Sr(E,i),k=function(){var M;return et(i.current)||(i.current&&Se(i.current)==="object"?et((M=i.current)===null||M===void 0?void 0:M.nativeElement):null)||et(s.current)};re.useImperativeHandle(t,function(){return k()});var A=re.useRef(e);A.current=e;var R=re.useCallback(function(u){var M=A.current,j=M.onResize,X=M.data,I=u.getBoundingClientRect(),W=I.width,F=I.height,D=u.offsetWidth,p=u.offsetHeight,N=Math.floor(W),z=Math.floor(F);if(c.current.width!==N||c.current.height!==z||c.current.offsetWidth!==D||c.current.offsetHeight!==p){var V={width:N,height:z,offsetWidth:D,offsetHeight:p};c.current=V;var B=D===Math.round(W)?W:D,G=p===Math.round(F)?F:p,ne=Rt(Rt({},V),{},{offsetWidth:B,offsetHeight:G});a==null||a(ne,u,X),j&&Promise.resolve().then(function(){j(ne,u)})}},[]);return re.useEffect(function(){var u=k();return u&&!n&&Yr(u,R),function(){return Kr(u,R)}},[i.current,n]),re.createElement(Qr,{ref:s},f?re.cloneElement(l,{ref:y}):l)}var Vt=re.forwardRef(en);process.env.NODE_ENV!=="production"&&(Vt.displayName="SingleObserver");var tn="rc-observer-key";function rn(e,t){var r=e.children,n=typeof r=="function"?[r]:Qe(r);return process.env.NODE_ENV!=="production"&&(n.length>1?Ct(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):n.length===0&&Ct(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),n.map(function(i,s){var a=(i==null?void 0:i.key)||"".concat(tn,"-").concat(s);return re.createElement(Vt,Ze({},e,{key:a,ref:s===0?t:void 0}),i)})}var st=re.forwardRef(rn);process.env.NODE_ENV!=="production"&&(st.displayName="ResizeObserver"),st.Collection=xr;var Ht={exports:{}};/*!
|
|
49
49
|
Copyright (c) 2018 Jed Watson.
|
|
50
50
|
Licensed under the MIT License (MIT), see
|
|
51
51
|
http://jedwatson.github.io/classnames
|
|
52
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var s="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(s=i(s,n(l)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var l in s)t.call(s,l)&&s[l]&&(a=i(a,l));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Wt);var rn=Wt.exports;const st=sr(rn),Hn="",nn=_.forwardRef(({columns:e,width:t,onScroll:r,meta:n},i)=>{const s=_.useMemo(()=>{const a=[],l=h=>{let E=0;return h.forEach(v=>{if(v.children&&v.children.length>0){const A=l(v.children);A>E&&(E=A)}}),E+1},c=l(e),f=(h,E)=>{a[E]||(a[E]=[]),h.forEach(v=>{var d,D;let A="left";(d=v.style)!=null&&d.textAlign&&(A=v.style.textAlign);let j=n==null?void 0:n.find($=>$.field===v.field);if(!j){const $=v.field.split("||");if($.length>1){const X=$[$.length-1];j=n==null?void 0:n.find(M=>M.field===X)}else v.field.includes("__")&&(j=n==null?void 0:n.find(X=>v.field.startsWith(`${X.field}_`)))}(D=j==null?void 0:j.style)!=null&&D.textAlign&&(A=j.style.textAlign);const S={key:v.field||v.dataIndex||v.title||String(Math.random()),title:v.title,width:v.width,align:A,className:v.field,colSpan:1,rowSpan:1};if(v.children&&v.children.length>0){const $=X=>X.children&&X.children.length>0?X.children.reduce((M,N)=>M+$(N),0):1;S.colSpan=$(v),a[E].push(S),f(v.children,E+1)}else S.rowSpan=c-E,a[E].push(S)})};return f(e,0),a},[e,n]);return Q.jsx("div",{ref:i,className:"virtual-table-header hide-scrollbar",style:{overflow:"auto",width:t},onScroll:r,children:Q.jsxs("table",{style:{tableLayout:"fixed",width:"100%"},children:[Q.jsx("colgroup",{children:e.map((a,l)=>{const c=f=>f.children&&f.children.length>0?f.children.flatMap(c):[f.width];return c(a).map((f,h)=>Q.jsx("col",{style:{width:f,minWidth:f}},`${l}-${h}`))}).flat()}),Q.jsx("thead",{className:"virtual-table-thead",children:s.map((a,l)=>Q.jsx("tr",{className:"virtual-table-row",children:a.map((c,f)=>Q.jsx("th",{className:st("virtual-table-cell",c.className),colSpan:c.colSpan,rowSpan:c.rowSpan,title:c.title,style:{textAlign:c.align},children:c.title},f))},l))})]})})}),at=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(r=>at(r));const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=at(e[r]));return t},Vt=43,on=100,xe="-",Ht="合计";function sn(e){let t=e;for(;t;){if(t.dir)return t.dir==="rtl";t=t.parentElement}return!1}function an(e,t){const[r,n]=_.useState(t==="rtl");return _.useLayoutEffect(()=>{e&&(t||n(sn(e)))},[t,e]),r}const Ge=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Bt(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function ln({box:e,defaultHeight:t,defaultWidth:r,disabled:n,element:i,mode:s,style:a}){const{styleHeight:l,styleWidth:c}=_.useMemo(()=>({styleHeight:Bt(a==null?void 0:a.height),styleWidth:Bt(a==null?void 0:a.width)}),[a==null?void 0:a.height,a==null?void 0:a.width]),[f,h]=_.useState({height:t,width:r}),E=n||s==="only-height"&&l!==void 0||s==="only-width"&&c!==void 0||l!==void 0&&c!==void 0;return Ge(()=>{if(i===null||E)return;const v=new ResizeObserver(A=>{for(const j of A){const{contentRect:S,target:d}=j;i===d&&h(D=>D.height===S.height&&D.width===S.width?D:{height:S.height,width:S.width})}});return v.observe(i,{box:e}),()=>{v==null||v.unobserve(i)}},[e,E,i,l,c]),_.useMemo(()=>({height:l??f.height,width:c??f.width}),[f,l,c])}function cn(e){const t=_.useRef(()=>{throw new Error("Cannot call during render.")});return Ge(()=>{t.current=e},[e]),_.useCallback(r=>{var n;return(n=t.current)==null?void 0:n.call(t,r)},[t])}let Ie=null;function un(e=!1){if(Ie===null||e){const t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";const n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Ie="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Ie="negative":Ie="positive-ascending"),document.body.removeChild(t),Ie}return Ie}function lt({containerElement:e,direction:t,isRtl:r,scrollOffset:n}){if(t==="horizontal"&&r)switch(un()){case"negative":return-n;case"positive-descending":{if(e){const{clientWidth:i,scrollLeft:s,scrollWidth:a}=e;return a-i-s}break}}return n}function Te(e,t="Assertion error"){if(!e)throw Error(t)}function Ne(e,t){if(e===t)return!0;if(!!e!=!!t||(Te(e!==void 0),Te(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const r in e)if(!Object.is(t[r],e[r]))return!1;return!0}function Yt({cachedBounds:e,itemCount:t,itemSize:r}){if(t===0)return 0;if(typeof r=="number")return t*r;{const n=e.get(e.size===0?0:e.size-1);Te(n!==void 0,"Unexpected bounds cache miss");const i=(n.scrollOffset+n.size)/e.size;return t*i}}function fn({align:e,cachedBounds:t,index:r,itemCount:n,itemSize:i,containerScrollOffset:s,containerSize:a}){if(r<0||r>=n)throw RangeError(`Invalid index specified: ${r}`,{cause:`Index ${r} is not within the range of 0 - ${n-1}`});const l=Yt({cachedBounds:t,itemCount:n,itemSize:i}),c=t.get(r),f=Math.max(0,Math.min(l-a,c.scrollOffset)),h=Math.max(0,c.scrollOffset-a+c.size);switch(e==="smart"&&(s>=h&&s<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return c.scrollOffset<=a/2?0:c.scrollOffset+c.size/2>=l-a/2?l-a:c.scrollOffset+c.size/2-a/2;case"auto":default:return s>=h&&s<=f?s:s<h?h:f}}function ct({cachedBounds:e,containerScrollOffset:t,containerSize:r,itemCount:n,overscanCount:i}){const s=n-1;let a=0,l=-1,c=0,f=-1,h=0;for(;h<s;){const E=e.get(h);if(E.scrollOffset+E.size>t)break;h++}for(a=h,c=Math.max(0,a-i);h<s;){const E=e.get(h);if(E.scrollOffset+E.size>=t+r)break;h++}return l=Math.min(s,h),f=Math.min(n-1,l+i),a<0&&(a=0,l=-1,c=0,f=-1),{startIndexVisible:a,stopIndexVisible:l,startIndexOverscan:c,stopIndexOverscan:f}}function dn({itemCount:e,itemProps:t,itemSize:r}){const n=new Map;return{get(i){for(Te(i<e,`Invalid index ${i}`);n.size-1<i;){const a=n.size;let l;switch(typeof r){case"function":{l=r(a,t);break}case"number":{l=r;break}}if(a===0)n.set(a,{size:l,scrollOffset:0});else{const c=n.get(a-1);Te(c!==void 0,`Unexpected bounds cache miss for index ${i}`),n.set(a,{scrollOffset:c.scrollOffset+c.size,size:l})}}const s=n.get(i);return Te(s!==void 0,`Unexpected bounds cache miss for index ${i}`),s},set(i,s){n.set(i,s)},get size(){return n.size}}}function hn({itemCount:e,itemProps:t,itemSize:r}){return _.useMemo(()=>dn({itemCount:e,itemProps:t,itemSize:r}),[e,t,r])}function pn({containerSize:e,itemSize:t}){let r;switch(typeof t){case"string":{Te(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),Te(e!==void 0,"Container size must be defined if a percentage item size is specified"),r=e*parseInt(t)/100;break}default:{r=t;break}}return r}function Kt({containerElement:e,containerStyle:t,defaultContainerSize:r=0,direction:n,isRtl:i=!1,itemCount:s,itemProps:a,itemSize:l,onResize:c,overscanCount:f}){const{height:h=r,width:E=r}=ln({defaultHeight:n==="vertical"?r:void 0,defaultWidth:n==="horizontal"?r:void 0,element:e,mode:n==="vertical"?"only-height":"only-width",style:t}),v=_.useRef({height:0,width:0}),A=n==="vertical"?h:E,j=pn({containerSize:A,itemSize:l});_.useLayoutEffect(()=>{if(typeof c=="function"){const z=v.current;(z.height!==h||z.width!==E)&&(c({height:h,width:E},{...z}),z.height=h,z.width=E)}},[h,c,E]);const S=hn({itemCount:s,itemProps:a,itemSize:j}),d=_.useCallback(z=>S.get(z),[S]),[D,$]=_.useState(()=>ct({cachedBounds:S,containerScrollOffset:0,containerSize:A,itemCount:s,overscanCount:f})),{startIndexVisible:X,startIndexOverscan:M,stopIndexVisible:N,stopIndexOverscan:F}={startIndexVisible:Math.min(s-1,D.startIndexVisible),startIndexOverscan:Math.min(s-1,D.startIndexOverscan),stopIndexVisible:Math.min(s-1,D.stopIndexVisible),stopIndexOverscan:Math.min(s-1,D.stopIndexOverscan)},I=_.useCallback(()=>Yt({cachedBounds:S,itemCount:s,itemSize:j}),[S,s,j]),p=_.useCallback(z=>{const V=lt({containerElement:e,direction:n,isRtl:i,scrollOffset:z});return ct({cachedBounds:S,containerScrollOffset:V,containerSize:A,itemCount:s,overscanCount:f})},[S,e,A,n,i,s,f]);Ge(()=>{const z=(n==="vertical"?e==null?void 0:e.scrollTop:e==null?void 0:e.scrollLeft)??0;$(p(z))},[e,n,p]),Ge(()=>{if(!e)return;const z=()=>{$(V=>{const{scrollLeft:K,scrollTop:J}=e,ne=lt({containerElement:e,direction:n,isRtl:i,scrollOffset:n==="vertical"?J:K}),pe=ct({cachedBounds:S,containerScrollOffset:ne,containerSize:A,itemCount:s,overscanCount:f});return Ne(pe,V)?V:pe})};return e.addEventListener("scroll",z),()=>{e.removeEventListener("scroll",z)}},[S,e,A,n,s,f]);const Y=cn(({align:z="auto",containerScrollOffset:V,index:K})=>{let J=fn({align:z,cachedBounds:S,containerScrollOffset:V,containerSize:A,index:K,itemCount:s,itemSize:j});if(e){if(J=lt({containerElement:e,direction:n,isRtl:i,scrollOffset:J}),typeof e.scrollTo!="function"){const ne=p(J);Ne(D,ne)||$(ne)}return J}});return{getCellBounds:d,getEstimatedSize:I,scrollToIndex:Y,startIndexOverscan:M,startIndexVisible:X,stopIndexOverscan:F,stopIndexVisible:N}}function vn(e){return _.useMemo(()=>e,Object.values(e))}function mn(e,t){const{ariaAttributes:r,style:n,...i}=e,{ariaAttributes:s,style:a,...l}=t;return Ne(r,s)&&Ne(n,a)&&Ne(i,l)}function gn({cellComponent:e,cellProps:t,children:r,className:n,columnCount:i,columnWidth:s,defaultHeight:a=0,defaultWidth:l=0,dir:c,gridRef:f,onCellsRendered:h,onResize:E,overscanCount:v=3,rowCount:A,rowHeight:j,style:S,tagName:d="div",...D}){const $=vn(t),X=_.useMemo(()=>_.memo(e,mn),[e]),[M,N]=_.useState(null),F=an(M,c),{getCellBounds:I,getEstimatedSize:p,startIndexOverscan:Y,startIndexVisible:z,scrollToIndex:V,stopIndexOverscan:K,stopIndexVisible:J}=Kt({containerElement:M,containerStyle:S,defaultContainerSize:l,direction:"horizontal",isRtl:F,itemCount:i,itemProps:$,itemSize:s,onResize:E,overscanCount:v}),{getCellBounds:ne,getEstimatedSize:pe,startIndexOverscan:be,startIndexVisible:Pe,scrollToIndex:we,stopIndexOverscan:ye,stopIndexVisible:Oe}=Kt({containerElement:M,containerStyle:S,defaultContainerSize:a,direction:"vertical",itemCount:A,itemProps:$,itemSize:j,onResize:E,overscanCount:v});_.useImperativeHandle(f,()=>({get element(){return M},scrollToCell({behavior:w="auto",columnAlign:y="auto",columnIndex:m,rowAlign:T="auto",rowIndex:C}){const x=V({align:y,containerScrollOffset:(M==null?void 0:M.scrollLeft)??0,index:m}),O=we({align:T,containerScrollOffset:(M==null?void 0:M.scrollTop)??0,index:C});typeof(M==null?void 0:M.scrollTo)=="function"&&M.scrollTo({behavior:w,left:x,top:O})},scrollToColumn({align:w="auto",behavior:y="auto",index:m}){const T=V({align:w,containerScrollOffset:(M==null?void 0:M.scrollLeft)??0,index:m});typeof(M==null?void 0:M.scrollTo)=="function"&&M.scrollTo({behavior:y,left:T})},scrollToRow({align:w="auto",behavior:y="auto",index:m}){const T=we({align:w,containerScrollOffset:(M==null?void 0:M.scrollTop)??0,index:m});typeof(M==null?void 0:M.scrollTo)=="function"&&M.scrollTo({behavior:y,top:T})}}),[M,V,we]),_.useEffect(()=>{Y>=0&&K>=0&&be>=0&&ye>=0&&h&&h({columnStartIndex:z,columnStopIndex:J,rowStartIndex:Pe,rowStopIndex:Oe},{columnStartIndex:Y,columnStopIndex:K,rowStartIndex:be,rowStopIndex:ye})},[h,Y,z,K,J,be,Pe,ye,Oe]);const b=_.useMemo(()=>{const w=[];if(i>0&&A>0)for(let y=be;y<=ye;y++){const m=ne(y),T=[];for(let C=Y;C<=K;C++){const x=I(C);T.push(_.createElement(X,{...$,ariaAttributes:{"aria-colindex":C+1,role:"gridcell"},columnIndex:C,key:C,rowIndex:y,style:{position:"absolute",left:F?void 0:0,right:F?0:void 0,transform:`translate(${F?-x.scrollOffset:x.scrollOffset}px, ${m.scrollOffset}px)`,height:m.size,width:x.size}}))}w.push(Q.jsx("div",{role:"row","aria-rowindex":y+1,children:T},y))}return w},[X,$,i,Y,K,I,ne,F,A,be,ye]),R=Q.jsx("div",{"aria-hidden":!0,style:{height:pe(),width:p(),zIndex:-1}});return _.createElement(d,{"aria-colcount":i,"aria-rowcount":A,role:"grid",...D,className:n,dir:c,ref:N,style:{position:"relative",maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...S}},b,r,R)}const bn=e=>Q.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...e,children:[Q.jsx("path",{d:"M518.5 360.3a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7H381c10.2 0 19.9-4.9 25.9-13.2L512 460.4l105.2 145.4c6 8.3 15.6 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.5-12.7l-178-246z"}),Q.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})]}),yn=e=>Q.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...e,children:[Q.jsx("path",{d:"M690 405h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 563.6 406.8 418.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7z"}),Q.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})]}),En=(e,t,r)=>{var i;const n=(i=r[e])==null?void 0:i[t];return!n||n.rowspan===0||n.colspan===0},wn=(e,t,r,n,i,s)=>{var A,j;const a=(A=n[e])==null?void 0:A[t];if(!a||a.rowspan===0||a.colspan===0)return;const l={...r};let c=i[t];const f=c.field.split("||"),h=f[f.length-1],E=s==null?void 0:s.find(S=>S.field===h||S.field===c.field);E&&E.style;const v=(E==null?void 0:E.style)||(c==null?void 0:c.style);if(a.colspan>1){let S=0;for(let d=t;d<t+a.colspan;d++)S+=Number((j=i[d])==null?void 0:j.width)||100;l.width=S}return a.rowspan>1&&(l.height=a.rowspan*Vt),v!=null&&v.textAlign&&(l.textAlign=v.textAlign,v.textAlign==="right"&&(l.justifyContent="flex-end"),v.textAlign==="center"&&(l.justifyContent="center")),l.border="1px solid #f0f0f0",l.padding="8px 16px",l.display="flex",l.alignItems="center",l.backgroundColor="#fff",l},_n=({columnIndex:e,rowIndex:t,style:r,mergedData:n,columns:i,handleExpand:s,meta:a})=>{if(En(t,e,n))return null;const l=n[t][e],c=wn(t,e,r,n,i,a),f=i[e],h=f.field.split("||"),E=h[h.length-1],v=a==null?void 0:a.find(S=>S.field===E||S.field===f.field),A=_.isValidElement(l.content);let j;if(j=l.content,"formatter"in f&&f.formatter&&!A&&(j=f.formatter(j,l.data)),v!=null&&v.clickHandler&&!A&&j!==null&&j!==void 0){const S=l.data;j=Q.jsx("a",{href:"javascript:void(0)",onClick:d=>{d.preventDefault(),d.stopPropagation(),v.clickHandler(S)},className:"virtual-table-cell-link",children:j})}return Q.jsxs("div",{style:c,className:st("table-cell","virtual-table-cell",{"virtual-table-cell-last":e===i.length-1}),title:typeof j=="string"?j:void 0,children:[Q.jsx("span",{className:"expand-icon",children:l.expandable?l.expanded?Q.jsx(bn,{onClick:()=>{l.onClick&&l.onClick(l),s(l)}}):Q.jsx(yn,{onClick:()=>{l.onClick&&l.onClick(l),s(l)}}):null}),j]})},Sn=e=>{const{data:t,info:r,scroll:n,columns:i,tableWidth:s}=e,{ref:a,onScroll:l}=r,c=_.useRef(),f=_.useMemo(()=>{const F={};return Object.defineProperty(F,"scrollLeft",{get:()=>{var I,p;return((p=(I=c.current)==null?void 0:I.element)==null?void 0:p.scrollLeft)||0},set:I=>{var p;(p=c.current)!=null&&p.element&&(c.current.element.scrollLeft=I)}}),Object.defineProperty(F,"scrollTop",{get:()=>{var I,p;return((p=(I=c.current)==null?void 0:I.element)==null?void 0:p.scrollTop)||0},set:I=>{var p;(p=c.current)!=null&&p.element&&(c.current.element.scrollTop=I)}}),F},[]);_.useEffect(()=>{a&&(a.current=f)},[a,f]);const h=t,E=h.length,v=_.useCallback(F=>{let I=0;return F.forEach(p=>{p!=null&&p.children&&p.children.length>0?I+=v(p.children):I+=1}),I},[]),A=v(i),j=_.useCallback(F=>{let I=[];return F.forEach(p=>{p!=null&&p.children&&p.children.length>0?I=[...I,...j(p.children)]:I.push(p)}),I},[]),S=j(i),d=_.useCallback(F=>{const I=S[F];let p=(I==null?void 0:I.width)||100;return typeof p=="string"&&(p=parseInt(p.replace("px",""))||100),p},[S]),D=_.useCallback(F=>Vt,[]),$=_.useMemo(()=>h.map(F=>F.cells),[h]),X=_.useCallback(F=>{if(F&&typeof F.scrollLeft=="number"){l&&l(F);return}if(F&&F.target){const{scrollLeft:I,scrollTop:p}=F.target;l&&l({scrollLeft:I,scrollTop:p})}},[l]),M=_.useMemo(()=>{let F=1;return t&&t.length>0&&t.forEach(I=>{I.cells&&I.cells.forEach(p=>{p.rowspan>F&&(F=p.rowspan)})}),F},[t]),N=(typeof(n==null?void 0:n.y)=="number"?n.y:parseInt((n==null?void 0:n.y)||"400"))||400;return Q.jsx(gn,{gridRef:c,columnCount:A,columnWidth:d,rowCount:E,rowHeight:D,style:{height:N-40,width:s,overflowY:"auto"},onScroll:X,className:`virtual-grid row-${M}`,overscanCount:M+3,cellComponent:_n,cellProps:{mergedData:$,columns:S,data:h,handleExpand:e.handleExpand,meta:e.meta}})},We=e=>{const t=[],r=n=>{n.children&&n.children.length>0?n.children.forEach(i=>r(i)):t.push(n)};return e.forEach(n=>r(n)),t},ge=(e,t)=>{const r=t.split(".");let n=e;for(const i of r){if(n==null)return n;n=n[i]}return n==null&&(n=xe),n},ut=(e,t)=>"|"+t.map(n=>ge(e,n)).join("|"),Gt=(e,t)=>{if(!e)return null;try{const r=e.replace(/\{(\w+)\}/g,(n,i)=>{const s=t[i];return s!=null&&!isNaN(s)?String(s):"0"});return/^[\d\.\+\-\*\/\(\)\s]+$/.test(r)?new Function(`return ${r}`)():null}catch{return null}},qe={sum:e=>e.reduce((t,r)=>t+(Number(r)||0),0),avg:e=>{const t=e.filter(r=>!isNaN(Number(r)));return t.length>0?t.reduce((r,n)=>r+Number(n),0)/t.length:0},count:e=>e.length,min:e=>Math.min(...e.map(t=>Number(t)||1/0)),max:e=>Math.max(...e.map(t=>Number(t)||-1/0)),d_count:e=>new Set(e).size,variance:e=>{const t=e.map(i=>Number(i)).filter(i=>!isNaN(i));if(t.length===0)return 0;const r=t.reduce((i,s)=>i+s,0)/t.length;return t.map(i=>Math.pow(i-r,2)).reduce((i,s)=>i+s,0)/t.length},stddev:e=>{const t=e.map(s=>Number(s)).filter(s=>!isNaN(s));if(t.length===0)return 0;const r=t.reduce((s,a)=>s+a,0)/t.length,i=t.map(s=>Math.pow(s-r,2)).reduce((s,a)=>s+a,0)/t.length;return Math.sqrt(i)}},fe=new Map,ft=new Map,dt=new Map,qt=e=>{const{data:t,sortParams:r,fields:n}=e,{rows:i,columns:s,values:a}=n;if(!t||t.length===0||!i.length&&!s.length&&!a.length)return{list:[],dataExpandFilter:b=>b};const l=We(i),c=We(s),f=We(a).filter(b=>!b.hidden),h=l.map(b=>b.field),E=c.map(b=>b.field),v=new Map,A=new Map,j=new Map;t.forEach(b=>{const R=ut(b,h);v.has(R)||v.set(R,[]),v.get(R).push(b);const w=ut(b,E);A.has(w)||A.set(w,[]),A.get(w).push(b);const y=`${R}||${w}`;j.has(y)||j.set(y,[]),j.get(y).push(b)});const S=()=>Array.from(v.entries()).sort(([b,R],[w,y])=>{if(r&&r.length>0)for(const m of r){const{field:T,sortType:C}=m,x=C==="asc",O=ge(R[0],T),k=ge(y[0],T);if(O<k)return x?-1:1;if(O>k)return x?1:-1}for(let m=0;m<h.length;m++){const T=h[m],C=l[m],x=ge(R[0],T),O=ge(y[0],T);if(x!==O)if(C.sort&&C.sort.enabled){const k=C.sort.type==="asc";if(x<O)return k?-1:1;if(x>O)return k?1:-1}else{if(x<O)return-1;if(x>O)return 1}}return 0}),d=()=>Array.from(A.entries()).sort(([b,R],[w,y])=>{for(let m=0;m<E.length;m++){const T=E[m],C=c[m],x=ge(R[0],T),O=ge(y[0],T);if(x!==O)if(C.sort&&C.sort.enabled){const k=C.sort.type==="asc";if(x<O)return k?-1:1;if(x>O)return k?1:-1}else{if(x<O)return-1;if(x>O)return 1}}return 0}),D=()=>{const b=[],R=We(i);for(let w=1;w<=R.length;w++)b.push(R.slice(0,w));return b},$=()=>{const b=D(),R=new Set;return b.forEach((w,y)=>{const m=w[w.length-1];m.total&&m.total.enabled&&R.add(y)}),R},X=()=>{const b=D(),R=[],w=$();return w.size===0||w.forEach(y=>{let m=[];y>0&&(m=b[y-1]);const T={};t.forEach(C=>{let x="";if(y>0?x=m.map(O=>ge(C,O.field)).join("|"):x="__GLOBAL__",!T[x]){const k=b[y][y].total;T[x]={records:[],config:k}}T[x].records.push(C)}),R.push({level:y,data:T})}),R},M=d(),N=new Map,F=(b,R)=>{if(fe.has(b)){const w=fe.get(b),m=!w.get(R);w.set(R,m),ft.set("rowKey",R),ft.set("level",b),ft.set("expanded",m);const T=b-1;if(T>=0&&T<l.length&&l[T].clickExpandChildren&&m===!0){const x=b+1;if(fe.has(x)){const O=fe.get(x),k=R+"|";O.forEach((B,le)=>{le.startsWith(k)&&(O.set(le,!0),I(x,le))})}}}},I=(b,R)=>{const w=b+1;if(fe.has(w)){const y=fe.get(w),m=R+"|";y.forEach((T,C)=>{C.startsWith(m)&&(y.set(C,!0),I(w,C))})}},p=b=>{const R=X(),w=[...b];if(R.length===0)return w;for(let y=0;y<R.length;y++){const{level:m,data:T}=R[y];Object.keys(T).forEach(C=>{const{records:x,config:O}=T[C],{label:k=Ht,position:B="bottom"}=O||{},le=C.split("|");let ce=-1,P=-1;if(m===0)ce=0,P=w.length-1;else for(let ee=0;ee<w.length;ee++){const te=w[ee];h.slice(0,m).every((ke,ve)=>{var ie;return((ie=te[ve])==null?void 0:ie.content)===le[ve]})&&(ce===-1&&(ce=ee),P=ee)}if(ce!==-1){const ee=[];let te="";h.forEach((ke,ve)=>{let ie=xe;const se=ve+1,ue=se<h.length,je=l[ve];ve<=m&&(ve===m?ie=k:ie=le[ve],te+=`|${ie}`);const Ue=fe.has(se)&&fe.get(se).get(te)||!0;(ie===xe||ie===null||ie===void 0)&&je.emptyReplace&&(ie=je.emptyReplace),ee.push({content:ie,rowspan:1,colspan:1,data:null,rowKey:te,expandable:B==="top"&&ue&&ie!==xe&&ie!==Ht,expanded:B==="top"?Ue:!1,level:se,onClick:B==="top"&&ue?Me=>F(Me.level,Me.rowKey):void 0})}),M.forEach(([ke,ve])=>{const ie={};f.forEach(se=>{if(se.calculateType==="expr")return;const ue=se.field,je=se.calculateType||"sum",Me=x.filter(Re=>ut(Re,E)===ke).map(Re=>ge(Re,ue));let Ve=0;qe[je]&&(Ve=qe[je](Me)),ie[se.field]=Ve}),f.forEach(se=>{if(se.calculateType==="expr"&&se.expression){const ue=Gt(se.expression,ie);ie[se.field]=ue!==null?ue:0}}),f.forEach(se=>{let ue=ie[se.field];(ue===xe||ue===null||ue===void 0||typeof ue=="number"&&isNaN(ue))&&se.emptyReplace&&(ue=se.emptyReplace),ee.push({content:ue,rowspan:1,colspan:1,data:null})})});const de=B==="top"?ce:P+1;dt.has(te)||(w.splice(de,0,ee),dt.set(te,1),B==="top"&&m>0&&N.set(C,te))}})}return w},Y=We(i);fe.clear(),t.forEach(b=>{let R="";h.forEach((w,y)=>{const m=y+1,T=ge(b,w);R+=`|${T}`,fe.has(m)||fe.set(m,new Map);const C=l[y].collapsed;fe.get(m).set(R,!C)})});const z=S();let V=[];const K=new Map;z.forEach(([b,R])=>{const w=R[0];let y="";h.forEach((m,T)=>{const C=ge(w,m),x=T+1;y+=`|${C}`,K.has(x)||K.set(x,new Map);const O=K.get(x);O.set(y,(O.get(y)||0)+1)})}),z.forEach(([b,R])=>{const w=R[0],y=[];let m="";h.forEach((T,C)=>{var te;let x=ge(w,T);const O=C+1,k=O<h.length,B=l[C];m+=`|${x}`;let le=b;const ce=Y.find(de=>de.field===T);if((te=ce==null?void 0:ce.total)!=null&&te.enabled&&ce.total.label&&(le=`${m}|${ce.total.label}`),k){const de=m;N.has(de)||N.set(de,le)}const P=fe.has(O)&&fe.get(O).get(m)||!0,ee=O<h.length?(K.get(O).get(m)||0)>1:!1;(x===xe||x===null||x===void 0)&&B.emptyReplace&&(x=B.emptyReplace),y.push({content:x,rowspan:1,colspan:1,data:w,expandable:k&&ee,expanded:P,level:O,rowKey:m,onClick:k&&ee?de=>F(de.level,de.rowKey):void 0})}),M.forEach(([T,C])=>{const x={};f.forEach(O=>{if(O.calculateType==="expr")return;const k=O.field,B=O.calculateType||"sum",le=`${b}||${T}`,P=(j.get(le)||[]).map(te=>ge(te,k));let ee=0;qe[B]&&(ee=qe[B](P)),x[O.field]=ee}),f.forEach(O=>{if(O.calculateType==="expr"&&O.expression){const k=Gt(O.expression,x);x[O.field]=k!==null?k:0}}),f.forEach(O=>{let k=x[O.field];(k===xe||k===null||k===void 0||typeof k=="number"&&isNaN(k))&&O.emptyReplace&&(k=O.emptyReplace),y.push({content:k,rowspan:1,colspan:1,data:w})})}),V.push({cells:y,rowKey:m})});const J=b=>{const w=b.split("|").filter(Boolean).length;for(let y=1;y<w;y++)if(fe.has(y)){const m=fe.get(y),T=b.split("|").slice(0,y+1).join("|");if(m.has(T)&&!m.get(T)){const C=T,x=N.get(C);if(b!==x)return!1}}return!0},ne=b=>{var R,w;if(!b||b.length===0)return b;for(let y=0;y<l.length;y++){let m=b[0][y].content,T=0,C=l[y],x=(R=C.total)==null?void 0:R.enabled,O=((w=C.total)==null?void 0:w.label)||"";for(let k=1;k<b.length;k++){const B=b[k][y];B.content!==xe&&(!x||B.content!==O)&&B.content===m?(B.rowspan=0,b[T][y].rowspan++):(m=B.content,T=k)}}return b},pe=b=>{const R=b.filter(m=>J(m.rowKey)),w=R.map(m=>m.cells.map(T=>{const C={...T};if(C.expandable&&C.level&&C.rowKey&&fe.has(C.level)){const x=fe.get(C.level);x.has(C.rowKey)&&(C.expanded=x.get(C.rowKey))}return C}));return ne(w),R.map((m,T)=>({rowKey:m.rowKey,cells:w[T]}))};dt.clear();const be=V.map(b=>b.cells),we=p(be).map((b,R)=>{let w="";return b.forEach((y,m)=>{m<h.length&&y.rowKey&&(w=y.rowKey)}),{cells:b,rowKey:w}}),Oe=(()=>{const b=[];if(l.forEach(R=>{b.push({...R,width:R.width||100,fixed:"left",key:R.field})}),c.length===0)f.forEach(R=>{b.push({...R,width:R.width||100,key:R.field})});else{const R=[];M.forEach(([w,y])=>{const m=w.split("|").filter(C=>C!=="");let T=R;m.forEach((C,x)=>{var k;let O=T.find(B=>B.title===C);if(!O){const le=`${((k=c[x])==null?void 0:k.field)||"unknown"}_${C}`,ce={field:le,title:C,children:[],key:le};T.push(ce),O=ce}x===m.length-1?f.forEach(B=>{O.children||(O.children=[]),O.children.push({...B,field:`${w}||${B.field}`,title:B.title||B.field,width:B.width||100,key:`${w}||${B.field}`})}):(O.children||(O.children=[]),T=O.children)})}),b.push(...R)}return b})();return{list:we,dataExpandFilter:pe,tableColumns:Oe}},Ut=e=>{const{data:t,fields:r}=e,{rows:n,columns:i,values:s}=r;if(!s||s.length===0)return{list:[],dataExpandFilter:a=>a};if(!t||t.length===0)return{list:[],dataExpandFilter:a=>a};if(n.length===0&&i.length===0){const a=s.filter(f=>!f.hidden),l=a.map(f=>({...f,width:f.width||100,key:f.field}));return{list:t.map((f,h)=>({cells:a.map(v=>({content:f[v.field]??xe,rowspan:1,colspan:1,style:v.style,data:f})),rowKey:h.toString()})),dataExpandFilter:f=>f,tableColumns:l}}return qt(e)},Cn=_.memo(e=>{const{scroll:t,data:r,meta:n,sortParams:i,fields:s}=e,[a,l]=_.useState(0),[c,f]=_.useState([]),[h,E]=_.useState([]),v=_.useRef(null),A=_.useCallback(()=>{if(v.current){let p=v.current;if(!p||!p.list||!p.dataExpandFilter)return;f(p.dataExpandFilter(p.list))}},[]);_.useEffect(()=>{let Y=Ut({data:r,meta:n,sortParams:i,fields:s});v.current=Y,Y.tableColumns&&E(Y.tableColumns),A()},[r,n,i,s,A]);const j=_.useCallback(p=>p?typeof p=="string"?parseInt(p.replace("px",""))||0:typeof p=="number"?p:0:0,[]),{baseWidth:S,colCount:d}=_.useMemo(()=>{let p=0,Y=0;const z=V=>{V.forEach(K=>{(!("type"in K)||K.type!=="group")&&(p+=j(K.width),Y+=1),K!=null&&K.children&&K.children.length>0&&z(K.children)})};return z(h),{baseWidth:p,colCount:Y}},[h,j]),D=_.useMemo(()=>{const p=Y=>Y.map(z=>{let V=0;S<a&&d>0&&(V=Math.floor((a-S)/d));const J=(z.width?j(z.width):on)+V;return z.colSpan&&z.colSpan>1?z.width=J*z.colSpan:z.width=J,z.fixed&&(z.fixed=!1),z!=null&&z.children&&z.children.length>0&&(z.children=p(z.children)),z});return p(at(h))},[h,S,a,d,j]),$=_.useMemo(()=>{let p=0;const Y=z=>{z.forEach(V=>{(!("type"in V)||V.type!=="group")&&(p+=j(V.width)),V!=null&&V.children&&V.children.length>0&&Y(V.children)})};return Y(D),p},[D,j]),X=_.useRef(null),M=_.useRef(null),N=_.useRef(!1),F=_.useCallback(({scrollLeft:p})=>{N.current||(N.current=!0,X.current&&(X.current.scrollLeft=p),requestAnimationFrame(()=>{N.current=!1}))},[]),I=_.useCallback(p=>{if(N.current)return;N.current=!0;const Y=p.currentTarget.scrollLeft;M.current&&(M.current.scrollLeft=Y),requestAnimationFrame(()=>{N.current=!1})},[]);return Q.jsx(it,{onResize:({width:p})=>{p&&p!==a&&l(p)},children:Q.jsxs("div",{className:st("virtual-table",e.className),style:{width:"100%",...e.style},children:[Q.jsx(nn,{ref:X,columns:D,width:a-8,onScroll:I,meta:n}),Q.jsx("div",{className:"virtual-table-body",style:{width:"100%"},children:Q.jsx(Sn,{data:c,info:{ref:M,onScroll:F},scroll:t,columns:D,tableWidth:a,gridWidth:$,handleExpand:A,meta:n})})]})})});_e.VirtualTable=Cn,_e.dataHandler=Ut,_e.pivotDataHandler=qt,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
52
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var s="",a=0;a<arguments.length;a++){var h=arguments[a];h&&(s=i(s,n(h)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var h in s)t.call(s,h)&&s[h]&&(a=i(a,h));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ht);var nn=Ht.exports;const at=ar(nn),Bn="",on=_.forwardRef(({columns:e,width:t,onScroll:r,meta:n},i)=>{const s=_.useMemo(()=>{const a=[],h=f=>{let E=0;return f.forEach(y=>{if(y.children&&y.children.length>0){const k=h(y.children);k>E&&(E=k)}}),E+1},l=h(e),c=(f,E)=>{a[E]||(a[E]=[]),f.forEach(y=>{var u,M;let k="left";(u=y.style)!=null&&u.textAlign&&(k=y.style.textAlign);let A=n==null?void 0:n.find(j=>j.field===y.field);if(!A){const j=y.field.split("||");if(j.length>1){const X=j[j.length-1];A=n==null?void 0:n.find(I=>I.field===X)}else y.field.includes("__")&&(A=n==null?void 0:n.find(X=>y.field.startsWith(`${X.field}_`)))}(M=A==null?void 0:A.style)!=null&&M.textAlign&&(k=A.style.textAlign);const R={key:y.field||y.dataIndex||y.title||String(Math.random()),title:y.title,width:y.width,align:k,className:y.field,colSpan:1,rowSpan:1};if(y.children&&y.children.length>0){const j=X=>X.children&&X.children.length>0?X.children.reduce((I,W)=>I+j(W),0):1;R.colSpan=j(y),a[E].push(R),c(y.children,E+1)}else R.rowSpan=l-E,a[E].push(R)})};return c(e,0),a},[e,n]);return Q.jsx("div",{ref:i,className:"virtual-table-header hide-scrollbar",style:{overflow:"auto",width:t},onScroll:r,children:Q.jsxs("table",{style:{tableLayout:"fixed",width:"100%"},children:[Q.jsx("colgroup",{children:e.map((a,h)=>{const l=c=>c.children&&c.children.length>0?c.children.flatMap(l):[c.width];return l(a).map((c,f)=>Q.jsx("col",{style:{width:c,minWidth:c}},`${h}-${f}`))}).flat()}),Q.jsx("thead",{className:"virtual-table-thead",children:s.map((a,h)=>Q.jsx("tr",{className:"virtual-table-row",children:a.map((l,c)=>Q.jsx("th",{className:at("virtual-table-cell",l.className),colSpan:l.colSpan,rowSpan:l.rowSpan,title:l.title,style:{textAlign:l.align},children:l.title},c))},h))})]})})}),lt=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(r=>lt(r));const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=lt(e[r]));return t},ct=43,sn=100,Oe="-",Bt="合计",Ge=20;function an(e){let t=e;for(;t;){if(t.dir)return t.dir==="rtl";t=t.parentElement}return!1}function ln(e,t){const[r,n]=_.useState(t==="rtl");return _.useLayoutEffect(()=>{e&&(t||n(an(e)))},[t,e]),r}const Ue=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Yt(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function cn({box:e,defaultHeight:t,defaultWidth:r,disabled:n,element:i,mode:s,style:a}){const{styleHeight:h,styleWidth:l}=_.useMemo(()=>({styleHeight:Yt(a==null?void 0:a.height),styleWidth:Yt(a==null?void 0:a.width)}),[a==null?void 0:a.height,a==null?void 0:a.width]),[c,f]=_.useState({height:t,width:r}),E=n||s==="only-height"&&h!==void 0||s==="only-width"&&l!==void 0||h!==void 0&&l!==void 0;return Ue(()=>{if(i===null||E)return;const y=new ResizeObserver(k=>{for(const A of k){const{contentRect:R,target:u}=A;i===u&&f(M=>M.height===R.height&&M.width===R.width?M:{height:R.height,width:R.width})}});return y.observe(i,{box:e}),()=>{y==null||y.unobserve(i)}},[e,E,i,h,l]),_.useMemo(()=>({height:h??c.height,width:l??c.width}),[c,h,l])}function un(e){const t=_.useRef(()=>{throw new Error("Cannot call during render.")});return Ue(()=>{t.current=e},[e]),_.useCallback(r=>{var n;return(n=t.current)==null?void 0:n.call(t,r)},[t])}let Ie=null;function fn(e=!1){if(Ie===null||e){const t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";const n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Ie="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Ie="negative":Ie="positive-ascending"),document.body.removeChild(t),Ie}return Ie}function ut({containerElement:e,direction:t,isRtl:r,scrollOffset:n}){if(t==="horizontal"&&r)switch(fn()){case"negative":return-n;case"positive-descending":{if(e){const{clientWidth:i,scrollLeft:s,scrollWidth:a}=e;return a-i-s}break}}return n}function Te(e,t="Assertion error"){if(!e)throw Error(t)}function Ne(e,t){if(e===t)return!0;if(!!e!=!!t||(Te(e!==void 0),Te(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const r in e)if(!Object.is(t[r],e[r]))return!1;return!0}function Kt({cachedBounds:e,itemCount:t,itemSize:r}){if(t===0)return 0;if(typeof r=="number")return t*r;{const n=e.get(e.size===0?0:e.size-1);Te(n!==void 0,"Unexpected bounds cache miss");const i=(n.scrollOffset+n.size)/e.size;return t*i}}function dn({align:e,cachedBounds:t,index:r,itemCount:n,itemSize:i,containerScrollOffset:s,containerSize:a}){if(r<0||r>=n)throw RangeError(`Invalid index specified: ${r}`,{cause:`Index ${r} is not within the range of 0 - ${n-1}`});const h=Kt({cachedBounds:t,itemCount:n,itemSize:i}),l=t.get(r),c=Math.max(0,Math.min(h-a,l.scrollOffset)),f=Math.max(0,l.scrollOffset-a+l.size);switch(e==="smart"&&(s>=f&&s<=c?e="auto":e="center"),e){case"start":return c;case"end":return f;case"center":return l.scrollOffset<=a/2?0:l.scrollOffset+l.size/2>=h-a/2?h-a:l.scrollOffset+l.size/2-a/2;case"auto":default:return s>=f&&s<=c?s:s<f?f:c}}function ft({cachedBounds:e,containerScrollOffset:t,containerSize:r,itemCount:n,overscanCount:i}){const s=n-1;let a=0,h=-1,l=0,c=-1,f=0;for(;f<s;){const E=e.get(f);if(E.scrollOffset+E.size>t)break;f++}for(a=f,l=Math.max(0,a-i);f<s;){const E=e.get(f);if(E.scrollOffset+E.size>=t+r)break;f++}return h=Math.min(s,f),c=Math.min(n-1,h+i),a<0&&(a=0,h=-1,l=0,c=-1),{startIndexVisible:a,stopIndexVisible:h,startIndexOverscan:l,stopIndexOverscan:c}}function hn({itemCount:e,itemProps:t,itemSize:r}){const n=new Map;return{get(i){for(Te(i<e,`Invalid index ${i}`);n.size-1<i;){const a=n.size;let h;switch(typeof r){case"function":{h=r(a,t);break}case"number":{h=r;break}}if(a===0)n.set(a,{size:h,scrollOffset:0});else{const l=n.get(a-1);Te(l!==void 0,`Unexpected bounds cache miss for index ${i}`),n.set(a,{scrollOffset:l.scrollOffset+l.size,size:h})}}const s=n.get(i);return Te(s!==void 0,`Unexpected bounds cache miss for index ${i}`),s},set(i,s){n.set(i,s)},get size(){return n.size}}}function pn({itemCount:e,itemProps:t,itemSize:r}){return _.useMemo(()=>hn({itemCount:e,itemProps:t,itemSize:r}),[e,t,r])}function vn({containerSize:e,itemSize:t}){let r;switch(typeof t){case"string":{Te(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),Te(e!==void 0,"Container size must be defined if a percentage item size is specified"),r=e*parseInt(t)/100;break}default:{r=t;break}}return r}function Gt({containerElement:e,containerStyle:t,defaultContainerSize:r=0,direction:n,isRtl:i=!1,itemCount:s,itemProps:a,itemSize:h,onResize:l,overscanCount:c}){const{height:f=r,width:E=r}=cn({defaultHeight:n==="vertical"?r:void 0,defaultWidth:n==="horizontal"?r:void 0,element:e,mode:n==="vertical"?"only-height":"only-width",style:t}),y=_.useRef({height:0,width:0}),k=n==="vertical"?f:E,A=vn({containerSize:k,itemSize:h});_.useLayoutEffect(()=>{if(typeof l=="function"){const z=y.current;(z.height!==f||z.width!==E)&&(l({height:f,width:E},{...z}),z.height=f,z.width=E)}},[f,l,E]);const R=pn({itemCount:s,itemProps:a,itemSize:A}),u=_.useCallback(z=>R.get(z),[R]),[M,j]=_.useState(()=>ft({cachedBounds:R,containerScrollOffset:0,containerSize:k,itemCount:s,overscanCount:c})),{startIndexVisible:X,startIndexOverscan:I,stopIndexVisible:W,stopIndexOverscan:F}={startIndexVisible:Math.min(s-1,M.startIndexVisible),startIndexOverscan:Math.min(s-1,M.startIndexOverscan),stopIndexVisible:Math.min(s-1,M.stopIndexVisible),stopIndexOverscan:Math.min(s-1,M.stopIndexOverscan)},D=_.useCallback(()=>Kt({cachedBounds:R,itemCount:s,itemSize:A}),[R,s,A]),p=_.useCallback(z=>{const V=ut({containerElement:e,direction:n,isRtl:i,scrollOffset:z});return ft({cachedBounds:R,containerScrollOffset:V,containerSize:k,itemCount:s,overscanCount:c})},[R,e,k,n,i,s,c]);Ue(()=>{const z=(n==="vertical"?e==null?void 0:e.scrollTop:e==null?void 0:e.scrollLeft)??0;j(p(z))},[e,n,p]),Ue(()=>{if(!e)return;const z=()=>{j(V=>{const{scrollLeft:B,scrollTop:G}=e,ne=ut({containerElement:e,direction:n,isRtl:i,scrollOffset:n==="vertical"?G:B}),pe=ft({cachedBounds:R,containerScrollOffset:ne,containerSize:k,itemCount:s,overscanCount:c});return Ne(pe,V)?V:pe})};return e.addEventListener("scroll",z),()=>{e.removeEventListener("scroll",z)}},[R,e,k,n,s,c]);const N=un(({align:z="auto",containerScrollOffset:V,index:B})=>{let G=dn({align:z,cachedBounds:R,containerScrollOffset:V,containerSize:k,index:B,itemCount:s,itemSize:A});if(e){if(G=ut({containerElement:e,direction:n,isRtl:i,scrollOffset:G}),typeof e.scrollTo!="function"){const ne=p(G);Ne(M,ne)||j(ne)}return G}});return{getCellBounds:u,getEstimatedSize:D,scrollToIndex:N,startIndexOverscan:I,startIndexVisible:X,stopIndexOverscan:F,stopIndexVisible:W}}function mn(e){return _.useMemo(()=>e,Object.values(e))}function gn(e,t){const{ariaAttributes:r,style:n,...i}=e,{ariaAttributes:s,style:a,...h}=t;return Ne(r,s)&&Ne(n,a)&&Ne(i,h)}function bn({cellComponent:e,cellProps:t,children:r,className:n,columnCount:i,columnWidth:s,defaultHeight:a=0,defaultWidth:h=0,dir:l,gridRef:c,onCellsRendered:f,onResize:E,overscanCount:y=3,rowCount:k,rowHeight:A,style:R,tagName:u="div",...M}){const j=mn(t),X=_.useMemo(()=>_.memo(e,gn),[e]),[I,W]=_.useState(null),F=ln(I,l),{getCellBounds:D,getEstimatedSize:p,startIndexOverscan:N,startIndexVisible:z,scrollToIndex:V,stopIndexOverscan:B,stopIndexVisible:G}=Gt({containerElement:I,containerStyle:R,defaultContainerSize:h,direction:"horizontal",isRtl:F,itemCount:i,itemProps:j,itemSize:s,onResize:E,overscanCount:y}),{getCellBounds:ne,getEstimatedSize:pe,startIndexOverscan:be,startIndexVisible:Pe,scrollToIndex:we,stopIndexOverscan:ye,stopIndexVisible:xe}=Gt({containerElement:I,containerStyle:R,defaultContainerSize:a,direction:"vertical",itemCount:k,itemProps:j,itemSize:A,onResize:E,overscanCount:y});_.useImperativeHandle(c,()=>({get element(){return I},scrollToCell({behavior:w="auto",columnAlign:b="auto",columnIndex:v,rowAlign:T="auto",rowIndex:S}){const C=V({align:b,containerScrollOffset:(I==null?void 0:I.scrollLeft)??0,index:v}),O=we({align:T,containerScrollOffset:(I==null?void 0:I.scrollTop)??0,index:S});typeof(I==null?void 0:I.scrollTo)=="function"&&I.scrollTo({behavior:w,left:C,top:O})},scrollToColumn({align:w="auto",behavior:b="auto",index:v}){const T=V({align:w,containerScrollOffset:(I==null?void 0:I.scrollLeft)??0,index:v});typeof(I==null?void 0:I.scrollTo)=="function"&&I.scrollTo({behavior:b,left:T})},scrollToRow({align:w="auto",behavior:b="auto",index:v}){const T=we({align:w,containerScrollOffset:(I==null?void 0:I.scrollTop)??0,index:v});typeof(I==null?void 0:I.scrollTo)=="function"&&I.scrollTo({behavior:b,top:T})}}),[I,V,we]),_.useEffect(()=>{N>=0&&B>=0&&be>=0&&ye>=0&&f&&f({columnStartIndex:z,columnStopIndex:G,rowStartIndex:Pe,rowStopIndex:xe},{columnStartIndex:N,columnStopIndex:B,rowStartIndex:be,rowStopIndex:ye})},[f,N,z,B,G,be,Pe,ye,xe]);const g=_.useMemo(()=>{const w=[];if(i>0&&k>0)for(let b=be;b<=ye;b++){const v=ne(b),T=[];for(let S=N;S<=B;S++){const C=D(S);T.push(_.createElement(X,{...j,ariaAttributes:{"aria-colindex":S+1,role:"gridcell"},columnIndex:S,key:S,rowIndex:b,style:{position:"absolute",left:F?void 0:0,right:F?0:void 0,transform:`translate(${F?-C.scrollOffset:C.scrollOffset}px, ${v.scrollOffset}px)`,height:v.size,width:C.size}}))}w.push(Q.jsx("div",{role:"row","aria-rowindex":b+1,children:T},b))}return w},[X,j,i,N,B,D,ne,F,k,be,ye]),x=Q.jsx("div",{"aria-hidden":!0,style:{height:pe(),width:p(),zIndex:-1}});return _.createElement(u,{"aria-colcount":i,"aria-rowcount":k,role:"grid",...M,className:n,dir:l,ref:W,style:{position:"relative",maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...R}},g,r,x)}const yn=e=>Q.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...e,children:[Q.jsx("path",{d:"M518.5 360.3a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7H381c10.2 0 19.9-4.9 25.9-13.2L512 460.4l105.2 145.4c6 8.3 15.6 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.5-12.7l-178-246z"}),Q.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})]}),En=e=>Q.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...e,children:[Q.jsx("path",{d:"M690 405h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 563.6 406.8 418.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7z"}),Q.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})]}),wn=(e,t,r)=>{var i;const n=(i=r[e])==null?void 0:i[t];return n?n.rowspan===0||n.colspan===0:!1},_n=(e,t,r,n,i,s,a)=>{var R,u;const h=(R=n[e])==null?void 0:R[t],l=a||h;if(!l)return;const c={...r};let f=i[t];const E=f.field.split("||"),y=E[E.length-1],k=s==null?void 0:s.find(M=>M.field===y||M.field===f.field),A=(k==null?void 0:k.style)||(f==null?void 0:f.style);if(l.colspan>1){let M=0;for(let j=t;j<t+l.colspan;j++)M+=Number((u=i[j])==null?void 0:u.width)||100;c.width=M}return l.rowspan>1&&(c.height=l.rowspan*ct),c.height||(c.height=ct),A!=null&&A.textAlign&&(c.textAlign=A.textAlign,A.textAlign==="right"&&(c.justifyContent="flex-end"),A.textAlign==="center"&&(c.justifyContent="center")),c.border="1px solid #f0f0f0",c.padding="8px 16px",c.display="flex",c.alignItems="center",c.backgroundColor="#fff",l.rowspan>Ge&&(c.zIndex=1e4-e,c.position="absolute"),c},Sn=({columnIndex:e,rowIndex:t,style:r,mergedData:n,columns:i,handleExpand:s,meta:a,mergedCellsMap:h})=>{let l=n[t][e],c=!1;if(l.rowspan===0&&h){const M=`${t}-${e}`,j=h.get(M);if(j&&j.rowspan>Ge&&j.startIndex<t){const X=j.rowspan-(t-j.startIndex);l={...l,...j,rowspan:X},c=!0}}if(!c&&wn(t,e,n))return null;const f=_n(t,e,r,n,i,a,l),E=i[e],y=E.field.split("||"),k=y[y.length-1],A=a==null?void 0:a.find(M=>M.field===k||M.field===E.field),R=_.isValidElement(l.content);let u;if(u=l.content,"formatter"in E&&E.formatter&&!R&&(u=E.formatter(u,l.data)),A!=null&&A.clickHandler&&!R&&u!==null&&u!==void 0){const M=l.data;u=Q.jsx("a",{href:"javascript:void(0)",onClick:j=>{j.preventDefault(),j.stopPropagation(),A.clickHandler(M)},className:"virtual-table-cell-link",children:u})}return Q.jsxs("div",{style:f,className:at("table-cell","virtual-table-cell",{"virtual-table-cell-last":e===i.length-1}),title:typeof u=="string"?u:void 0,children:[Q.jsx("span",{className:"expand-icon",children:l.expandable?l.expanded?Q.jsx(yn,{onClick:()=>{l.onClick&&l.onClick(l),s(l)}}):Q.jsx(En,{onClick:()=>{l.onClick&&l.onClick(l),s(l)}}):null}),u]})},Cn=e=>{const{data:t,info:r,scroll:n,columns:i,tableWidth:s}=e,{ref:a,onScroll:h}=r,l=_.useRef(),c=_.useMemo(()=>{const F={};return Object.defineProperty(F,"scrollLeft",{get:()=>{var D,p;return((p=(D=l.current)==null?void 0:D.element)==null?void 0:p.scrollLeft)||0},set:D=>{var p;(p=l.current)!=null&&p.element&&(l.current.element.scrollLeft=D)}}),Object.defineProperty(F,"scrollTop",{get:()=>{var D,p;return((p=(D=l.current)==null?void 0:D.element)==null?void 0:p.scrollTop)||0},set:D=>{var p;(p=l.current)!=null&&p.element&&(l.current.element.scrollTop=D)}}),F},[]);_.useEffect(()=>{a&&(a.current=c)},[a,c]);const f=t,E=f.length,y=_.useCallback(F=>{let D=0;return F.forEach(p=>{p!=null&&p.children&&p.children.length>0?D+=y(p.children):D+=1}),D},[]),k=y(i),A=_.useCallback(F=>{let D=[];return F.forEach(p=>{p!=null&&p.children&&p.children.length>0?D=[...D,...A(p.children)]:D.push(p)}),D},[]),R=A(i),u=_.useCallback(F=>{const D=R[F];let p=(D==null?void 0:D.width)||100;return typeof p=="string"&&(p=parseInt(p.replace("px",""))||100),p},[R]),M=_.useCallback(F=>ct,[]),j=_.useMemo(()=>f.map(F=>F.cells),[f]),X=_.useCallback(F=>{if(F&&typeof F.scrollLeft=="number"){h&&h(F);return}if(F&&F.target){const{scrollLeft:D,scrollTop:p}=F.target;h&&h({scrollLeft:D,scrollTop:p})}},[h]),I=_.useMemo(()=>{const F=new Map;return f.forEach((D,p)=>{D.cells.forEach((N,z)=>{if(N.rowspan>Ge){const V={startIndex:p,rowspan:N.rowspan,content:N.content,data:N.data,expandable:N.expandable,expanded:N.expanded,level:N.level,rowKey:N.rowKey,onClick:N.onClick};for(let B=0;B<N.rowspan;B++){const G=`${p+B}-${z}`;F.set(G,V)}}})}),F},[f]),W=(typeof(n==null?void 0:n.y)=="number"?n.y:parseInt((n==null?void 0:n.y)||"400"))||400;return Q.jsx(bn,{gridRef:l,columnCount:k,columnWidth:u,rowCount:E,rowHeight:M,style:{height:W-40,width:s,overflowY:"auto"},onScroll:X,className:"virtual-grid",overscanCount:Ge,cellComponent:Sn,cellProps:{mergedData:j,columns:R,data:f,handleExpand:e.handleExpand,meta:e.meta,mergedCellsMap:I}})},We=e=>{const t=[],r=n=>{n.children&&n.children.length>0?n.children.forEach(i=>r(i)):t.push(n)};return e.forEach(n=>r(n)),t},ge=(e,t)=>{const r=t.split(".");let n=e;for(const i of r){if(n==null)return n;n=n[i]}return n==null&&(n=Oe),n},dt=(e,t)=>"|"+t.map(n=>ge(e,n)).join("|"),Ut=(e,t)=>{if(!e)return null;try{const r=e.replace(/\{(\w+)\}/g,(n,i)=>{const s=t[i];return s!=null&&!isNaN(s)?String(s):"0"});return/^[\d\.\+\-\*\/\(\)\s]+$/.test(r)?new Function(`return ${r}`)():null}catch{return null}},qe={sum:e=>e.reduce((t,r)=>t+(Number(r)||0),0),avg:e=>{const t=e;return t.length>0?t.reduce((r,n)=>r+(isNaN(Number(n))?0:Number(n)),0)/t.length:0},count:e=>e.length,min:e=>Math.min(...e.map(t=>Number(t)||1/0)),max:e=>Math.max(...e.map(t=>Number(t)||-1/0)),d_count:e=>new Set(e).size,variance:e=>{const t=e.map(i=>Number(i)).filter(i=>!isNaN(i));if(t.length===0)return 0;const r=t.reduce((i,s)=>i+s,0)/t.length;return t.map(i=>Math.pow(i-r,2)).reduce((i,s)=>i+s,0)/t.length},stddev:e=>{const t=e.map(s=>Number(s)).filter(s=>!isNaN(s));if(t.length===0)return 0;const r=t.reduce((s,a)=>s+a,0)/t.length,i=t.map(s=>Math.pow(s-r,2)).reduce((s,a)=>s+a,0)/t.length;return Math.sqrt(i)}},fe=new Map,ht=new Map,pt=new Map,qt=e=>{const{data:t,sortParams:r,fields:n}=e,{rows:i,columns:s,values:a}=n;if(!t||t.length===0||!i.length&&!s.length&&!a.length)return{list:[],dataExpandFilter:g=>g};const h=We(i),l=We(s),c=We(a).filter(g=>!g.hidden),f=h.map(g=>g.field),E=l.map(g=>g.field),y=new Map,k=new Map,A=new Map;t.forEach(g=>{const x=dt(g,f);y.has(x)||y.set(x,[]),y.get(x).push(g);const w=dt(g,E);k.has(w)||k.set(w,[]),k.get(w).push(g);const b=`${x}||${w}`;A.has(b)||A.set(b,[]),A.get(b).push(g)});const R=()=>Array.from(y.entries()).sort(([g,x],[w,b])=>{if(r&&r.length>0)for(const v of r){const{field:T,sortType:S}=v,C=S==="asc",O=ge(x[0],T),L=ge(b[0],T);if(O<L)return C?-1:1;if(O>L)return C?1:-1}for(let v=0;v<f.length;v++){const T=f[v],S=h[v],C=ge(x[0],T),O=ge(b[0],T);if(C!==O)if(S.sort&&S.sort.enabled){const L=S.sort.type==="asc";if(C<O)return L?-1:1;if(C>O)return L?1:-1}else{if(C<O)return-1;if(C>O)return 1}}return 0}),u=()=>Array.from(k.entries()).sort(([g,x],[w,b])=>{for(let v=0;v<E.length;v++){const T=E[v],S=l[v],C=ge(x[0],T),O=ge(b[0],T);if(C!==O)if(S.sort&&S.sort.enabled){const L=S.sort.type==="asc";if(C<O)return L?-1:1;if(C>O)return L?1:-1}else{if(C<O)return-1;if(C>O)return 1}}return 0}),M=()=>{const g=[],x=We(i);for(let w=1;w<=x.length;w++)g.push(x.slice(0,w));return g},j=()=>{const g=M(),x=new Set;return g.forEach((w,b)=>{const v=w[w.length-1];v.total&&v.total.enabled&&x.add(b)}),x},X=()=>{const g=M(),x=[],w=j();return w.size===0||w.forEach(b=>{let v=[];b>0&&(v=g[b-1]);const T={};t.forEach(S=>{let C="";if(b>0?C=v.map(O=>ge(S,O.field)).join("|"):C="__GLOBAL__",!T[C]){const L=g[b][b].total;T[C]={records:[],config:L}}T[C].records.push(S)}),x.push({level:b,data:T})}),x},I=u(),W=new Map,F=(g,x)=>{if(fe.has(g)){const w=fe.get(g),v=!w.get(x);w.set(x,v),ht.set("rowKey",x),ht.set("level",g),ht.set("expanded",v);const T=g-1;if(T>=0&&T<h.length&&h[T].clickExpandChildren&&v===!0){const C=g+1;if(fe.has(C)){const O=fe.get(C),L=x+"|";O.forEach((K,le)=>{le.startsWith(L)&&(O.set(le,!0),D(C,le))})}}}},D=(g,x)=>{const w=g+1;if(fe.has(w)){const b=fe.get(w),v=x+"|";b.forEach((T,S)=>{S.startsWith(v)&&(b.set(S,!0),D(w,S))})}},p=g=>{const x=X(),w=[...g];if(x.length===0)return w;for(let b=0;b<x.length;b++){const{level:v,data:T}=x[b];Object.keys(T).forEach(S=>{const{records:C,config:O}=T[S],{label:L=Bt,position:K="bottom"}=O||{},le=S.split("|");let ce=-1,P=-1;if(v===0)ce=0,P=w.length-1;else for(let ee=0;ee<w.length;ee++){const te=w[ee];f.slice(0,v).every((ke,ve)=>{var ie;return((ie=te[ve])==null?void 0:ie.content)===le[ve]})&&(ce===-1&&(ce=ee),P=ee)}if(ce!==-1){const ee=[];let te="";f.forEach((ke,ve)=>{let ie=Oe;const se=ve+1,ue=se<f.length,je=h[ve];ve<=v&&(ve===v?ie=L:ie=le[ve],te+=`|${ie}`);const Je=fe.has(se)&&fe.get(se).get(te)||!0;(ie===Oe||ie===null||ie===void 0)&&je.emptyReplace&&(ie=je.emptyReplace),ee.push({content:ie,rowspan:1,colspan:1,data:null,rowKey:te,expandable:K==="top"&&ue&&ie!==Oe&&ie!==Bt,expanded:K==="top"?Je:!1,level:se,onClick:K==="top"&&ue?Me=>F(Me.level,Me.rowKey):void 0})}),I.forEach(([ke,ve])=>{const ie={};c.forEach(se=>{if(se.calculateType==="expr")return;const ue=se.field,je=se.calculateType||"sum",Me=C.filter(Re=>dt(Re,E)===ke).map(Re=>ge(Re,ue));let Ve=0;qe[je]&&(Ve=qe[je](Me)),ie[se.field]=Ve}),c.forEach(se=>{if(se.calculateType==="expr"&&se.expression){const ue=Ut(se.expression,ie);ie[se.field]=ue!==null?ue:0}}),c.forEach(se=>{let ue=ie[se.field];(ue===Oe||ue===null||ue===void 0||typeof ue=="number"&&isNaN(ue))&&se.emptyReplace&&(ue=se.emptyReplace),ee.push({content:ue,rowspan:1,colspan:1,data:null})})});const de=K==="top"?ce:P+1;pt.has(te)||(w.splice(de,0,ee),pt.set(te,1),K==="top"&&v>0&&W.set(S,te))}})}return w},N=We(i);fe.clear(),t.forEach(g=>{let x="";f.forEach((w,b)=>{const v=b+1,T=ge(g,w);x+=`|${T}`,fe.has(v)||fe.set(v,new Map);const S=h[b].collapsed;fe.get(v).set(x,!S)})});const z=R();let V=[];const B=new Map;z.forEach(([g,x])=>{const w=x[0];let b="";f.forEach((v,T)=>{const S=ge(w,v),C=T+1;b+=`|${S}`,B.has(C)||B.set(C,new Map);const O=B.get(C);O.set(b,(O.get(b)||0)+1)})}),z.forEach(([g,x])=>{const w=x[0],b=[];let v="";f.forEach((T,S)=>{var te;let C=ge(w,T);const O=S+1,L=O<f.length,K=h[S];v+=`|${C}`;let le=g;const ce=N.find(de=>de.field===T);if((te=ce==null?void 0:ce.total)!=null&&te.enabled&&ce.total.label&&(le=`${v}|${ce.total.label}`),L){const de=v;W.has(de)||W.set(de,le)}const P=fe.has(O)&&fe.get(O).get(v)||!0,ee=O<f.length?(B.get(O).get(v)||0)>1:!1;(C===Oe||C===null||C===void 0)&&K.emptyReplace&&(C=K.emptyReplace),b.push({content:C,rowspan:1,colspan:1,data:w,expandable:L&&ee,expanded:P,level:O,rowKey:v,onClick:L&&ee?de=>F(de.level,de.rowKey):void 0})}),I.forEach(([T,S])=>{const C={};c.forEach(O=>{if(O.calculateType==="expr")return;const L=O.field,K=O.calculateType||"sum",le=`${g}||${T}`,P=(A.get(le)||[]).map(te=>ge(te,L));let ee=0;qe[K]&&(ee=qe[K](P)),C[O.field]=ee}),c.forEach(O=>{if(O.calculateType==="expr"&&O.expression){const L=Ut(O.expression,C);C[O.field]=L!==null?L:0}}),c.forEach(O=>{let L=C[O.field];(L===Oe||L===null||L===void 0||typeof L=="number"&&isNaN(L))&&O.emptyReplace&&(L=O.emptyReplace),b.push({content:L,rowspan:1,colspan:1,data:w})})}),V.push({cells:b,rowKey:v})});const G=g=>{const w=g.split("|").filter(Boolean).length;for(let b=1;b<w;b++)if(fe.has(b)){const v=fe.get(b),T=g.split("|").slice(0,b+1).join("|");if(v.has(T)&&!v.get(T)){const S=T,C=W.get(S);if(g!==C)return!1}}return!0},ne=g=>{var x,w;if(!g||g.length===0)return g;for(let b=0;b<h.length;b++){let v=g[0][b].content,T=0,S=h[b],C=(x=S.total)==null?void 0:x.enabled,O=((w=S.total)==null?void 0:w.label)||"";for(let L=1;L<g.length;L++){const K=g[L][b];K.content!==Oe&&(!C||K.content!==O)&&K.content===v?(K.rowspan=0,g[T][b].rowspan++):(v=K.content,T=L)}}return g},pe=g=>{const x=g.filter(v=>G(v.rowKey)),w=x.map(v=>v.cells.map(T=>{const S={...T};if(S.expandable&&S.level&&S.rowKey&&fe.has(S.level)){const C=fe.get(S.level);C.has(S.rowKey)&&(S.expanded=C.get(S.rowKey))}return S}));return ne(w),x.map((v,T)=>({rowKey:v.rowKey,cells:w[T]}))};pt.clear();const be=V.map(g=>g.cells),we=p(be).map((g,x)=>{let w="";return g.forEach((b,v)=>{v<f.length&&b.rowKey&&(w=b.rowKey)}),{cells:g,rowKey:w}}),xe=(()=>{const g=[];if(h.forEach(x=>{g.push({...x,width:x.width||100,fixed:"left",key:x.field})}),l.length===0)c.forEach(x=>{g.push({...x,width:x.width||100,key:x.field})});else{const x=[];I.forEach(([w,b])=>{const v=w.split("|").filter(S=>S!=="");let T=x;v.forEach((S,C)=>{var L;let O=T.find(K=>K.title===S);if(!O){const le=`${((L=l[C])==null?void 0:L.field)||"unknown"}__${S}`,ce={field:le,title:S,children:[],key:le};T.push(ce),O=ce}C===v.length-1?c.forEach(K=>{O.children||(O.children=[]),O.children.push({...K,field:`${w}||${K.field}`,title:K.title||K.field,width:K.width||100,key:`${w}||${K.field}`})}):(O.children||(O.children=[]),T=O.children)})}),g.push(...x)}return g})();return{list:we,dataExpandFilter:pe,tableColumns:xe}},Jt=e=>{const{data:t,fields:r}=e,{rows:n,columns:i,values:s}=r;if(!s||s.length===0)return{list:[],dataExpandFilter:a=>a};if(!t||t.length===0)return{list:[],dataExpandFilter:a=>a};if(n.length===0&&i.length===0){const a=s.filter(c=>!c.hidden),h=a.map(c=>({...c,width:c.width||100,key:c.field}));return{list:t.map((c,f)=>({cells:a.map(y=>({content:c[y.field]??Oe,rowspan:1,colspan:1,style:y.style,data:c})),rowKey:f.toString()})),dataExpandFilter:c=>c,tableColumns:h}}return qt(e)},On=_.memo(e=>{const{scroll:t,data:r,meta:n,sortParams:i,fields:s}=e,[a,h]=_.useState(0),[l,c]=_.useState([]),[f,E]=_.useState([]),y=_.useRef(null),k=_.useCallback(()=>{if(y.current){let p=y.current;if(!p||!p.list||!p.dataExpandFilter)return;c(p.dataExpandFilter(p.list))}},[]);_.useEffect(()=>{let N=Jt({data:r,meta:n,sortParams:i,fields:s});y.current=N,N.tableColumns&&E(N.tableColumns),k()},[r,n,i,s,k]);const A=_.useCallback(p=>p?typeof p=="string"?parseInt(p.replace("px",""))||0:typeof p=="number"?p:0:0,[]),{baseWidth:R,colCount:u}=_.useMemo(()=>{let p=0,N=0;const z=V=>{V.forEach(B=>{(!("type"in B)||B.type!=="group")&&(p+=A(B.width),N+=1),B!=null&&B.children&&B.children.length>0&&z(B.children)})};return z(f),{baseWidth:p,colCount:N}},[f,A]),M=_.useMemo(()=>{const p=N=>N.map(z=>{let V=0;R<a&&u>0&&(V=Math.floor((a-R)/u));const G=(z.width?A(z.width):sn)+V;return z.colSpan&&z.colSpan>1?z.width=G*z.colSpan:z.width=G,z.fixed&&(z.fixed=!1),z!=null&&z.children&&z.children.length>0&&(z.children=p(z.children)),z});return p(lt(f))},[f,R,a,u,A]),j=_.useMemo(()=>{let p=0;const N=z=>{z.forEach(V=>{(!("type"in V)||V.type!=="group")&&(p+=A(V.width)),V!=null&&V.children&&V.children.length>0&&N(V.children)})};return N(M),p},[M,A]),X=_.useRef(null),I=_.useRef(null),W=_.useRef(!1),F=_.useCallback(({scrollLeft:p})=>{W.current||(W.current=!0,X.current&&(X.current.scrollLeft=p),requestAnimationFrame(()=>{W.current=!1}))},[]),D=_.useCallback(p=>{if(W.current)return;W.current=!0;const N=p.currentTarget.scrollLeft;I.current&&(I.current.scrollLeft=N),requestAnimationFrame(()=>{W.current=!1})},[]);return Q.jsx(st,{onResize:({width:p})=>{p&&p!==a&&h(p)},children:Q.jsxs("div",{className:at("virtual-table",e.className),style:{width:"100%",...e.style},children:[Q.jsx(on,{ref:X,columns:M,width:a-8,onScroll:D,meta:n}),Q.jsx("div",{className:"virtual-table-body",style:{width:"100%"},children:Q.jsx(Cn,{data:l,info:{ref:I,onScroll:F},scroll:t,columns:M,tableWidth:a,gridWidth:j,handleExpand:k,meta:n})})]})})});_e.VirtualTable=On,_e.dataHandler=Jt,_e.pivotDataHandler=qt,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
53
53
|
//# sourceMappingURL=virtual-table.umd.js.map
|