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