@sheetxl/studio-mui 0.4.9 → 0.4.11
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/browser/cjs/B29yIlf_FSHx9q3M.cjs +7 -0
- package/browser/cjs/B783moVfFT70yQuK.cjs +7 -0
- package/browser/cjs/BCtVyhxIZSUPH_Z4.cjs +7 -0
- package/browser/cjs/BE6O6K7i1mHBC3et.cjs +7 -0
- package/browser/cjs/BQ-G2ABc3FYN-D50.cjs +7 -0
- package/browser/cjs/BabvaPi1dUIPt5AG.cjs +7 -0
- package/browser/cjs/BbvcxaJzfy7H6xfa.cjs +7 -0
- package/browser/cjs/Bhh0dqxUzzOzHWMc.cjs +7 -0
- package/browser/cjs/CH50hiw_7LBSC6dR.cjs +7 -0
- package/browser/cjs/Cfb0T6htsh82UPK-.cjs +7 -0
- package/browser/cjs/CisYglNTHGrj9oMH.cjs +7 -0
- package/browser/cjs/Clbakb5VUTDTlofM.cjs +7 -0
- package/browser/cjs/D7xmeRe-f7IifEKc.cjs +7 -0
- package/browser/cjs/DCV-6w2JGk_faE3x.cjs +7 -0
- package/browser/cjs/DY2PuDSgw0TrB5-_.cjs +7 -0
- package/browser/cjs/Df5v6knUJ4dqHmmo.cjs +7 -0
- package/browser/cjs/DyzVC_iq7ceqC2fj.cjs +7 -0
- package/browser/cjs/QB_8kWYEsfOH_HwK.cjs +7 -0
- package/browser/cjs/aOmlMJRAkQEF59EX.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/li-J7BWV6WUzY5aq.cjs +7 -0
- package/browser/cjs/u0WmWLGlCwhnhL9i.cjs +7 -0
- package/browser/cjs/uoBAuXnlUz8scSA1.cjs +7 -0
- package/browser/cjs/xp2ZII-PuLk9tHK3.cjs +7 -0
- package/browser/cjs/xq-CJbsvm7BQO8lK.cjs +7 -0
- package/browser/esm/12Ttun7hzbiInyVr.mjs +7 -0
- package/browser/esm/7jSMnphGrNRPUa_S.mjs +7 -0
- package/browser/esm/AnCmK-idMDJ2vI8H.mjs +7 -0
- package/browser/esm/B-Ut_yUCD9THCz0T.mjs +7 -0
- package/browser/esm/BTD5k7gtFcqDwslB.mjs +7 -0
- package/browser/esm/BVRUNnRvnt7aVCDD.mjs +7 -0
- package/browser/esm/BauTkiamxm0HDt6M.mjs +7 -0
- package/browser/esm/BcIp2mxLBfjUBE0q.mjs +7 -0
- package/browser/esm/Bi_0z0hyhFuz5Ta3.mjs +7 -0
- package/browser/esm/BkDEdK7zOlsoUKCZ.mjs +7 -0
- package/browser/esm/BpGexBYtmHbTIJz2.mjs +7 -0
- package/browser/esm/CJawFB555VEY-Vge.mjs +7 -0
- package/browser/esm/CWogLlWYHiL4W6CH.mjs +7 -0
- package/browser/esm/Cr46Bo9bGoz0LbWq.mjs +7 -0
- package/browser/esm/Csk8rXNpaXmf5g7O.mjs +7 -0
- package/browser/esm/Cu-5HDPN8B0qE77-.mjs +7 -0
- package/browser/esm/CzgR8PxJ_89IC4Mr.mjs +7 -0
- package/browser/esm/DMUXpRbV3ahdB1lN.mjs +7 -0
- package/browser/esm/DiIX5KzrWnbDWjGE.mjs +7 -0
- package/browser/esm/Djo2IS-ivmVSrO3v.mjs +7 -0
- package/browser/esm/Hy95ExHvIFgzxQb-.mjs +7 -0
- package/browser/esm/Z1_72ZY8rW2Mc3g_.mjs +7 -0
- package/browser/esm/_ZR9nT54xwy-C6ow.mjs +7 -0
- package/browser/esm/csxyptiqbJZO0pQA.mjs +7 -0
- package/browser/esm/index.mjs +8 -82
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{CsbP0EYKOHobzZCu.mjs → 8THCZRGNmI2nPqMR.mjs} +2 -2
- package/node/esm/{CGiJgZJFY-YsXWCX.mjs → BDm0y2dv7wLZhYj1.mjs} +1 -1
- package/node/esm/{CijBL1IDWaxPgQ_E.mjs → BPylexVHXa-t0sqJ.mjs} +6 -6
- package/node/esm/{B7xzqWxB07TdXnmo.mjs → BQYQg7lfqFbWaf8x.mjs} +2 -2
- package/node/esm/{BUVA6vYXyFFnBCMg.mjs → BSUbQzac78SXiAJe.mjs} +1 -1
- package/node/esm/{qewbqty13W1sKrMC.mjs → BeNXnrWMr5S34Oxb.mjs} +1 -1
- package/node/esm/{BfuG4JD3t3n1uOci.mjs → C6jxZQrvMLctjLZM.mjs} +4 -4
- package/node/esm/{Dn38s6pH3QNvdk-x.mjs → CCZepFZNn1pIXrnd.mjs} +1 -1
- package/node/esm/{9iDXWtTOWeDVslQL.mjs → CXSwyUs6BuNGCic0.mjs} +13 -13
- package/node/esm/{Dq49h62ihEYk_8VR.mjs → CaV6SH-PMyHlXUhx.mjs} +1 -1
- package/node/esm/{B18g9zjzyR9YL3Mv.mjs → D481dAOp77EZbV5s.mjs} +2 -2
- package/node/esm/{DWKLdf_rn5dajRBA.mjs → DHj9iDuBImdwscIb.mjs} +25 -25
- package/node/esm/{uY021f9cZSWYX0--.mjs → DIGsHHDexzj0uG_T.mjs} +5 -5
- package/node/esm/{Cr5l_3AqPbv4mke9.mjs → DLiw-2C_tqGgJIQ6.mjs} +2 -2
- package/node/esm/{CG1T0Z1roNRSVlal.mjs → DNJVdt9TbBsUE8Jm.mjs} +1 -1
- package/node/esm/{DGTK2YeARR5cTnft.mjs → DaCmut490aSCGvX8.mjs} +1 -1
- package/node/esm/{C7t1ZHhSDgJnZ4Da.mjs → Dd2OFQJQyYp6bAeP.mjs} +1 -1
- package/node/esm/{DHmVr6jRLzt6lD1x.mjs → DkpAjhQeaZn_Ipxg.mjs} +2 -2
- package/node/esm/{DODhKM0Qeycx3Hvp.mjs → DyMCnCG9LzH5Mgw0.mjs} +2 -2
- package/node/esm/{v4fR5lIq2IqY_Clq.mjs → RV-AvxVzzFKWjYFM.mjs} +38 -38
- package/node/esm/{tur4cwLbnCn69JK-.mjs → Ui3_6RhrEZQDOXwg.mjs} +8 -8
- package/node/esm/index.mjs +5373 -5075
- package/node/esm/{CILOMzOF30-XSZqR.mjs → qI75rORek8T0-Kpf.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +24 -0
- package/browser/cjs/02LSJ7jnb-ovS7ex.cjs +0 -15
- package/browser/cjs/BDDJIe6JwgEYEtda.cjs +0 -6
- package/browser/cjs/BGh6tEDK_1MFKfMU.cjs +0 -145
- package/browser/cjs/BSRDKlVOTYHfOAF_.cjs +0 -11
- package/browser/cjs/Bn0BSzVk_S-rvDwk.cjs +0 -6
- package/browser/cjs/Bzf8jKmmZl374mof.cjs +0 -6
- package/browser/cjs/C20NTPRE5_ExESDZ.cjs +0 -6
- package/browser/cjs/C5i9hklL-WNb8J_q.cjs +0 -42
- package/browser/cjs/CLxYxjd0yz1LCTB-.cjs +0 -6
- package/browser/cjs/CUo2iW5IL6UZJNWT.cjs +0 -6
- package/browser/cjs/C_QWbWVBVc6YJ4Q3.cjs +0 -16
- package/browser/cjs/CeeZxww7wpF45vvp.cjs +0 -6
- package/browser/cjs/CekKZCV1J1HUFIqO.cjs +0 -6
- package/browser/cjs/CgD0b2zJD8zElhuz.cjs +0 -6
- package/browser/cjs/CqwEnIUDMxWw5DX1.cjs +0 -87
- package/browser/cjs/CwOKyPq_H2afJacv.cjs +0 -7
- package/browser/cjs/D32t9wiFoNX7WVEo.cjs +0 -161
- package/browser/cjs/DILF3GzsMdg-Y2wu.cjs +0 -11
- package/browser/cjs/Dr-PR7J1T91UjrPL.cjs +0 -12
- package/browser/cjs/DyR0_iZAINpjodWL.cjs +0 -12
- package/browser/cjs/LWuNxqu9MyiniH_g.cjs +0 -18
- package/browser/cjs/O8r9K4Qh6Pgd6rXU.cjs +0 -7
- package/browser/cjs/jbTHHxJODyD10jVH.cjs +0 -6
- package/browser/cjs/n-4XaX3pkXUEEQ5u.cjs +0 -6
- package/browser/cjs/qQGaIq5VhlZJU-xf.cjs +0 -6
- package/browser/esm/AmErN6xXU01K_bEs.mjs +0 -3803
- package/browser/esm/B08nVBuOXar7x7in.mjs +0 -1703
- package/browser/esm/B8xKZIF9fvamlvW5.mjs +0 -1467
- package/browser/esm/BGWd79IfMfoHoO6g.mjs +0 -392
- package/browser/esm/BT8vduOS21nsJ6EQ.mjs +0 -1366
- package/browser/esm/Bz6NqTbktTH8Df6_.mjs +0 -2251
- package/browser/esm/CDRALHzsBIsRPM5g.mjs +0 -153
- package/browser/esm/CIH1rBtL9lK5ku-N.mjs +0 -13391
- package/browser/esm/CVJee4uHPTdpZGEH.mjs +0 -46
- package/browser/esm/CXUv64T9mbQbJGgM.mjs +0 -48
- package/browser/esm/Ca5nvvpeuP6Wsv5P.mjs +0 -43
- package/browser/esm/CelDYTh0f7McDj4o.mjs +0 -44
- package/browser/esm/DHlS6l8ZPDMN2cwP.mjs +0 -1672
- package/browser/esm/DXKQ9TZdaT7ytR1S.mjs +0 -640
- package/browser/esm/D_FJwwe-bsDiDGBV.mjs +0 -2410
- package/browser/esm/DduyjhwDREaxXNzm.mjs +0 -59
- package/browser/esm/DffuCp_514AjqJLT.mjs +0 -864
- package/browser/esm/DgC_oaBYpwh1mBi_.mjs +0 -25
- package/browser/esm/Dl-SlJoaP7EFX-GR.mjs +0 -52
- package/browser/esm/DpTSO921EQ7L_abP.mjs +0 -52
- package/browser/esm/Dr5y4zmj1js9FjzE.mjs +0 -1352
- package/browser/esm/DuoEo0hJBssfAmB4.mjs +0 -84
- package/browser/esm/jIv4VNLAAFANZjhN.mjs +0 -424
- package/browser/esm/wysWhT4-jO-uukUH.mjs +0 -23
- package/browser/esm/zZaxvhjZK5N3yZkw.mjs +0 -19947
- package/node/esm/BBWRiJSBxt6O1CfK.mjs +0 -312
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),N=require("@mui/material"),k=require("./CqwEnIUDMxWw5DX1.cjs"),U=require("react"),Vt=require("@mui/icons-material"),V=require("./Dr-PR7J1T91UjrPL.cjs"),K=require("@mui/styled-engine"),he=require("@mui/system");function qt(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const x=qt(U),Kt=k.createTheme();function _e(o){return o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"}function X(o,e){return e&&o&&typeof o=="object"&&o.styles&&!o.styles.startsWith("@layer")&&(o.styles=`@layer ${e}{${String(o.styles)}}`),o}function $t(o){return o?(e,t)=>t[o]:null}function me(o,e,t){const n=typeof e=="function"?e(o):e;if(Array.isArray(n))return n.flatMap(r=>me(o,r,t));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=t?X(n.style,t):n.style;else{const{variants:l,...i}=n;r=t?X(K.internal_serializeStyles(i),t):i}return ft(o,n.variants,[r],t)}return n?.isProcessed?t?X(K.internal_serializeStyles(n.style),t):n.style:t?X(K.internal_serializeStyles(n),t):n}function ft(o,e,t=[],n=void 0){let r;e:for(let l=0;l<e.length;l+=1){const i=e[l];if(typeof i.props=="function"){if(r??={...o,...o.ownerState,ownerState:o.ownerState},!i.props(r))continue}else for(const a in i.props)if(o[a]!==i.props[a]&&o.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(r??={...o,...o.ownerState,ownerState:o.ownerState},t.push(n?X(K.internal_serializeStyles(i.style(r)),n):i.style(r))):t.push(n?X(K.internal_serializeStyles(i.style),n):i.style)}return t}function Xt(o){return o&&o.charAt(0).toLowerCase()+o.slice(1)}const Yt=function(o={}){const{themeId:e,defaultTheme:t=Kt,rootShouldForwardProp:n=_e,slotShouldForwardProp:r=_e}=o;function l(i){(function(a,s,c){a.theme=function(u){for(const d in u)return!1;return!0}(a.theme)?c:a.theme[s]||a.theme})(i,e,t)}return(i,a={})=>{K.internal_mutateStyles(i,C=>C.filter(R=>R!==k.styleFunctionSx));const{name:s,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=$t(Xt(c)),...h}=a,g=s&&s.startsWith("Mui")||c?"components":"custom",v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,_=d||!1;let S=_e;c==="Root"||c==="root"?S=n:c?S=r:function(C){return typeof C=="string"&&C.charCodeAt(0)>96}(i)&&(S=void 0);const m=K(i,{shouldForwardProp:S,label:void 0,...h}),y=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(R){return me(R,C,R.theme.modularCssLayers?g:void 0)};if(k.isPlainObject(C)){const R=function(z){const{variants:b,...I}=z,O={variants:b,style:K.internal_serializeStyles(I),isProcessed:!0};return O.style===I||b&&b.forEach(T=>{typeof T.style!="function"&&(T.style=K.internal_serializeStyles(T.style))}),O}(C);return function(z){return R.variants?me(z,R,z.theme.modularCssLayers?g:void 0):z.theme.modularCssLayers?X(R.style,g):R.style}}return C},w=(...C)=>{const R=[],z=C.map(y),b=[];if(R.push(l),s&&f&&b.push(function(T){const G=T.theme,M=G.components?.[s]?.styleOverrides;if(!M)return null;const H={};for(const Q in M)H[Q]=me(T,M[Q],T.theme.modularCssLayers?"theme":void 0);return f(T,H)}),s&&!v&&b.push(function(T){const G=T.theme,M=G?.components?.[s]?.variants;return M?ft(T,M,[],T.theme.modularCssLayers?"theme":void 0):null}),_||b.push(k.styleFunctionSx),Array.isArray(z[0])){const T=z.shift(),G=new Array(R.length).fill(""),M=new Array(b.length).fill("");let H;H=[...G,...T,...M],H.raw=[...G,...T.raw,...M],R.unshift(H)}const I=[...R,...z,...b],O=m(...I);return i.muiName&&(O.muiName=i.muiName),O};return m.withConfig&&(w.withConfig=m.withConfig),w}}({themeId:k.THEME_ID,defaultTheme:k.defaultTheme,rootShouldForwardProp:o=>function(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}(o)&&o!=="classes"});function E(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(o){return Y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(o)}function pt(o){var e=function(t,n){if(Y(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var l=r.call(t,n);if(Y(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o,"string");return Y(e)=="symbol"?e:e+""}function Ge(o,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,pt(n.key),n)}}function W(o,e,t){return e&&Ge(o.prototype,e),t&&Ge(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function D(o,e){if(e&&(Y(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o)}function P(o){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(o)}function j(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),e&&k._setPrototypeOf(o,e)}function p(o,e,t){return(e=pt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function mt(){var o=this.constructor.getDerivedStateFromProps(this.props,this.state);o!=null&&this.setState(o)}function gt(o){this.setState(function(e){var t=this.constructor.getDerivedStateFromProps(o,e);return t??null}.bind(this))}function vt(o,e){try{var t=this.props,n=this.state;this.props=o,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,n)}finally{this.props=t,this.state=n}}function de(o){var e=o.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof o.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return o;var t=null,n=null,r=null;if(typeof e.componentWillMount=="function"?t="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(t="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?r="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(r="UNSAFE_componentWillUpdate"),t!==null||n!==null||r!==null){var l=o.displayName||o.name,i=typeof o.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
7
|
-
|
|
8
|
-
`+l+" uses "+i+" but also contains the following legacy lifecycles:"+(t!==null?`
|
|
9
|
-
`+t:"")+(n!==null?`
|
|
10
|
-
`+n:"")+(r!==null?`
|
|
11
|
-
`+r:"")+`
|
|
12
|
-
|
|
13
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
14
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof o.getDerivedStateFromProps=="function"&&(e.componentWillMount=mt,e.componentWillReceiveProps=gt),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=vt;var a=e.componentDidUpdate;e.componentDidUpdate=function(s,c,u){var d=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;a.call(this,s,c,d)}}return o}function Ae(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function Ee(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function _t(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_t=function(){return!!o})()}mt.__suppressDeprecationWarning=!0,gt.__suppressDeprecationWarning=!0,vt.__suppressDeprecationWarning=!0;var We=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,_t()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),p(e,"_columnStartIndex",0),p(e,"_columnStopIndex",0),p(e,"_rowStartIndex",0),p(e,"_rowStopIndex",0),p(e,"_onKeyDown",function(s){var c=e.props,u=c.columnCount,d=c.disabled,f=c.mode,h=c.rowCount;if(!d){var g=e._getScrollState(),v=g.scrollToColumn,_=g.scrollToRow,S=e._getScrollState(),m=S.scrollToColumn,y=S.scrollToRow;switch(s.key){case"ArrowDown":y=Math.min(f==="cells"?y+1:e._rowStopIndex+1,h-1);break;case"ArrowLeft":m=Math.max(f==="cells"?m-1:e._columnStartIndex-1,0);break;case"ArrowRight":m=Math.min(f==="cells"?m+1:e._columnStopIndex+1,u-1);break;case"ArrowUp":y=Math.max(f==="cells"?y-1:e._rowStartIndex-1,0)}m===v&&y===_||(s.preventDefault(),e._updateScrollState({scrollToColumn:m,scrollToRow:y}))}}),p(e,"_onSectionRendered",function(s){var c=s.columnStartIndex,u=s.columnStopIndex,d=s.rowStartIndex,f=s.rowStopIndex;e._columnStartIndex=c,e._columnStopIndex=u,e._rowStartIndex=d,e._rowStopIndex=f}),e}return j(o,x.PureComponent),W(o,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow;this.setState({scrollToRow:n,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=this._getScrollState(),l=r.scrollToColumn,i=r.scrollToRow;return x.createElement("div",{className:t,onKeyDown:this._onKeyDown},n({onSectionRendered:this._onSectionRendered,scrollToColumn:l,scrollToRow:i}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow,r=this.props,l=r.isControlled,i=r.onScrollToChange;typeof i=="function"&&i({scrollToColumn:t,scrollToRow:n}),l||this.setState({scrollToColumn:t,scrollToRow:n})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?Ee(Ee({},t),{},{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}])}();function St(o,e){var t,n=(t=e!==void 0?e:typeof window<"u"?window:typeof self<"u"?self:global).document!==void 0&&t.document.attachEvent;if(!n){var r=function(){var m=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(y){return t.setTimeout(y,20)};return function(y){return m(y)}}(),l=function(){var m=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.clearTimeout;return function(y){return m(y)}}(),i=function(m){var y=m.__resizeTriggers__,w=y.firstElementChild,C=y.lastElementChild,R=w.firstElementChild;C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight,R.style.width=w.offsetWidth+1+"px",R.style.height=w.offsetHeight+1+"px",w.scrollLeft=w.scrollWidth,w.scrollTop=w.scrollHeight},a=function(m){if(!(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)){var y=this;i(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=r(function(){(function(w){return w.offsetWidth!=w.__resizeLast__.width||w.offsetHeight!=w.__resizeLast__.height})(y)&&(y.__resizeLast__.width=y.offsetWidth,y.__resizeLast__.height=y.offsetHeight,y.__resizeListeners__.forEach(function(w){w.call(y,m)}))})}},s=!1,c="",u="animationstart",d="Webkit Moz O ms".split(" "),f="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=t.document.createElement("fakeelement");if(h.style.animationName!==void 0&&(s=!0),s===!1){for(var g=0;g<d.length;g++)if(h.style[d[g]+"AnimationName"]!==void 0){c="-"+d[g].toLowerCase()+"-",u=f[g],s=!0;break}}var v="resizeanim",_="@"+c+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",S=c+"animation: 1ms "+v+"; "}return{addResizeListener:function(m,y){if(n)m.attachEvent("onresize",y);else{if(!m.__resizeTriggers__){var w=m.ownerDocument,C=t.getComputedStyle(m);C&&C.position=="static"&&(m.style.position="relative"),function(b){if(!b.getElementById("detectElementResize")){var I=(_||"")+".resize-triggers { "+(S||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',O=b.head||b.getElementsByTagName("head")[0],T=b.createElement("style");T.id="detectElementResize",T.type="text/css",o!=null&&T.setAttribute("nonce",o),T.styleSheet?T.styleSheet.cssText=I:T.appendChild(b.createTextNode(I)),O.appendChild(T)}}(w),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=w.createElement("div")).className="resize-triggers";var R=w.createElement("div");R.className="expand-trigger",R.appendChild(w.createElement("div"));var z=w.createElement("div");z.className="contract-trigger",m.__resizeTriggers__.appendChild(R),m.__resizeTriggers__.appendChild(z),m.appendChild(m.__resizeTriggers__),i(m),m.addEventListener("scroll",a,!0),u&&(m.__resizeTriggers__.__animationListener__=function(b){b.animationName==v&&i(m)},m.__resizeTriggers__.addEventListener(u,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(y)}},removeResizeListener:function(m,y){if(n)m.detachEvent("onresize",y);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(y),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",a,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(u,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}}}}function He(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function De(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?He(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function yt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!o})()}p(We,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),de(We);var wt=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,yt()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"state",{height:e.props.defaultHeight||0,width:e.props.defaultWidth||0}),p(e,"_parentNode",void 0),p(e,"_autoSizer",void 0),p(e,"_window",void 0),p(e,"_detectElementResize",void 0),p(e,"_onResize",function(){var s=e.props,c=s.disableHeight,u=s.disableWidth,d=s.onResize;if(e._parentNode){var f=e._parentNode.offsetHeight||0,h=e._parentNode.offsetWidth||0,g=(e._window||window).getComputedStyle(e._parentNode)||{},v=parseInt(g.paddingLeft,10)||0,_=parseInt(g.paddingRight,10)||0,S=parseInt(g.paddingTop,10)||0,m=parseInt(g.paddingBottom,10)||0,y=f-S-m,w=h-v-_;(!c&&e.state.height!==y||!u&&e.state.width!==w)&&(e.setState({height:f-S-m,width:h-v-_}),d({height:f,width:h}))}}),p(e,"_setRef",function(s){e._autoSizer=s}),e}return j(o,x.Component),W(o,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=St(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,l=e.disableWidth,i=e.style,a=this.state,s=a.height,c=a.width,u={overflow:"visible"},d={};return r||(u.height=0,d.height=s),l||(u.width=0,d.width=c),x.createElement("div",{className:n,ref:this._setRef,style:De(De({},u),i)},t(d))}}])}();function Ct(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ct=function(){return!!o})()}p(wt,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var Jt=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,Ct()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"_child",x.createRef()),p(e,"_measure",function(){var s=e.props,c=s.cache,u=s.columnIndex,d=u===void 0?0:u,f=s.parent,h=s.rowIndex,g=h===void 0?e.props.index||0:h,v=e._getCellMeasurements(),_=v.height,S=v.width;_===c.getHeight(g,d)&&S===c.getWidth(g,d)||(c.set(g,d,S,_),f&&typeof f.recomputeGridSize=="function"&&f.recomputeGridSize({columnIndex:d,rowIndex:g}))}),p(e,"_registerChild",function(s){!s||s instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),e._child.current=s,s&&e._maybeMeasureCell()}),e}return j(o,x.PureComponent),W(o,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this,t=this.props.children,n=typeof t=="function"?t({measure:this._measure,registerChild:this._registerChild}):t;return n===null?n:U.cloneElement(n,{ref:function(r){typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r),e._child.current=r}})}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child.current;if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var n=t.style.width,r=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var l=Math.ceil(t.offsetHeight),i=Math.ceil(t.offsetWidth);return n&&(t.style.width=n),r&&(t.style.height=r),{height:l,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,n=e.columnIndex,r=n===void 0?0:n,l=e.parent,i=e.rowIndex,a=i===void 0?this.props.index||0:i;if(!t.has(a,r)){var s=this._getCellMeasurements(),c=s.height,u=s.width;t.set(a,r,u,c),l&&typeof l.invalidateCellSizeAfterRender=="function"&&l.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:a})}}}])}();function te(){var o=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e={};return function(t){var n=t.callback,r=t.indices,l=Object.keys(r),i=!o||l.every(function(s){var c=r[s];return Array.isArray(c)?c.length>0:c>=0}),a=l.length!==Object.keys(e).length||l.some(function(s){var c=e[s],u=r[s];return Array.isArray(u)?c.join(",")!==u.join(","):c!==u});e=r,i&&a&&n(r)}}p(Jt,"__internalCellMeasurerFlag",!1);const Zt=!(typeof window>"u"||!window.document||!window.document.createElement);var fe;function xe(o){if((!fe&&fe!==0||o)&&Zt){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),fe=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return fe}function je(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function Fe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?je(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function xt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xt=function(){return!!o})()}var Qt="observed",ne="requested",ge=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,xt()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),p(e,"_calculateSizeAndPositionDataOnNextUpdate",!1),p(e,"_onSectionRenderedMemoizer",te()),p(e,"_onScrollMemoizer",te(!1)),p(e,"_invokeOnSectionRenderedHelper",function(){var s=e.props,c=s.cellLayoutManager,u=s.onSectionRendered;e._onSectionRenderedMemoizer({callback:u,indices:{indices:c.getLastRenderedIndices()}})}),p(e,"_setScrollingContainerRef",function(s){e._scrollingContainer=s}),p(e,"_updateScrollPositionForScrollToCell",function(){var s=e.props,c=s.cellLayoutManager,u=s.height,d=s.scrollToAlignment,f=s.scrollToCell,h=s.width,g=e.state,v=g.scrollLeft,_=g.scrollTop;if(f>=0){var S=c.getScrollPositionForCell({align:d,cellIndex:f,height:u,scrollLeft:v,scrollTop:_,width:h});S.scrollLeft===v&&S.scrollTop===_||e._setScrollPosition(S)}}),p(e,"_onScroll",function(s){if(s.target===e._scrollingContainer){e._enablePointerEventsAfterDelay();var c=e.props,u=c.cellLayoutManager,d=c.height,f=c.isScrollingChange,h=c.width,g=e._scrollbarSize,v=u.getTotalSize(),_=v.height,S=v.width,m=Math.max(0,Math.min(S-h+g,s.target.scrollLeft)),y=Math.max(0,Math.min(_-d+g,s.target.scrollTop));if(e.state.scrollLeft!==m||e.state.scrollTop!==y){var w=s.cancelable?Qt:ne;e.state.isScrolling||f(!0),e.setState({isScrolling:!0,scrollLeft:m,scrollPositionChangeReason:w,scrollTop:y})}e._invokeOnScrollMemoizer({scrollLeft:m,scrollTop:y,totalWidth:S,totalHeight:_})}}),e._scrollbarSize=xe(),e._scrollbarSize===void 0?(e._scrollbarSizeMeasured=!1,e._scrollbarSize=0):e._scrollbarSizeMeasured=!0,e}return j(o,x.PureComponent),W(o,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,l=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=xe(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||l>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:l}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,s=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:l||0,totalHeight:a,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,l=n.scrollToAlignment,i=n.scrollToCell,a=n.width,s=this.state,c=s.scrollLeft,u=s.scrollPositionChangeReason,d=s.scrollTop;u===ne&&(c>=0&&c!==t.scrollLeft&&c!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=c),d>=0&&d!==t.scrollTop&&d!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=d)),r===e.height&&l===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,l=e.className,i=e.height,a=e.horizontalOverscanSize,s=e.id,c=e.noContentRenderer,u=e.style,d=e.verticalOverscanSize,f=e.width,h=this.state,g=h.isScrolling,v=h.scrollLeft,_=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var S=r.getTotalSize(),m=S.height,y=S.width,w=Math.max(0,v-a),C=Math.max(0,_-d),R=Math.min(y,v+f+a),z=Math.min(m,_+i+d),b=i>0&&f>0?r.cellRenderers({height:z-C,isScrolling:g,width:R-w,x:w,y:C}):[],I={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:f,willChange:"transform"},O=m>i?this._scrollbarSize:0,T=y>f?this._scrollbarSize:0;return I.overflowX=y+O<=f?"hidden":"auto",I.overflowY=m+T<=i?"hidden":"auto",x.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:V.clsx("ReactVirtualized__Collection",l),id:s,onScroll:this._onScroll,role:"grid",style:Fe(Fe({},I),u),tabIndex:0},n>0&&x.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:m,maxHeight:m,maxWidth:y,overflow:"hidden",pointerEvents:g?"none":"",width:y}},b),n===0&&c())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(a){var s=a.scrollLeft,c=a.scrollTop,u=t.props,d=u.height;(0,u.onScroll)({clientHeight:d,clientWidth:u.width,scrollHeight:l,scrollLeft:s,scrollTop:c,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:ne};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.cellCount!==0||t.scrollLeft===0&&t.scrollTop===0?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null?e.scrollTop:t.scrollTop,scrollPositionChangeReason:ne}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:ne}}}])}();p(ge,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),ge.propTypes={},de(ge);var eo=function(){return W(function o(e){var t=e.height,n=e.width,r=e.x,l=e.y;E(this,o),this.height=t,this.width=n,this.x=r,this.y=l,this._indexMap={},this._indices=[]},[{key:"addCellIndex",value:function(o){var e=o.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}])}(),to=function(){return W(function o(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100;E(this,o),this._sectionSize=e,this._cellMetadata=[],this._sections={}},[{key:"getCellIndices",value:function(o){var e=o.height,t=o.width,n=o.x,r=o.y,l={};return this.getSections({height:e,width:t,x:n,y:r}).forEach(function(i){return i.getCellIndices().forEach(function(a){l[a]=a})}),Object.keys(l).map(function(i){return l[i]})}},{key:"getCellMetadata",value:function(o){var e=o.index;return this._cellMetadata[e]}},{key:"getSections",value:function(o){for(var e=o.height,t=o.width,n=o.x,r=o.y,l=Math.floor(n/this._sectionSize),i=Math.floor((n+t-1)/this._sectionSize),a=Math.floor(r/this._sectionSize),s=Math.floor((r+e-1)/this._sectionSize),c=[],u=l;u<=i;u++)for(var d=a;d<=s;d++){var f="".concat(u,".").concat(d);this._sections[f]||(this._sections[f]=new eo({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:d*this._sectionSize})),c.push(this._sections[f])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var o=this;return Object.keys(this._sections).map(function(e){return o._sections[e].toString()})}},{key:"registerCell",value:function(o){var e=o.cellMetadatum,t=o.index;this._cellMetadata[t]=e,this.getSections(e).forEach(function(n){return n.addCellIndex({index:t})})}}])}();function Ne(o){var e=o.align,t=e===void 0?"auto":e,n=o.cellOffset,r=o.cellSize,l=o.containerSize,i=o.currentOffset,a=n,s=a-l+r;switch(t){case"start":return a;case"end":return s;case"center":return a-(l-r)/2;default:return Math.max(s,Math.min(a,i))}}function Rt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rt=function(){return!!o})()}var Be=function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=P(l=o),(n=D(r,Rt()?Reflect.construct(l,i||[],P(r).constructor):l.apply(r,i)))._cellMetadata=[],n._lastRenderedCellIndices=[],n._cellCache=[],n._isScrollingChange=n._isScrollingChange.bind(n),n._setCollectionViewRef=n._setCollectionViewRef.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=k._extends({},(function(t){if(t==null)throw new TypeError("Cannot destructure "+t)}(this.props),this.props));return x.createElement(ge,k._extends({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(n){for(var r=n.cellCount,l=n.cellSizeAndPositionGetter,i=n.sectionSize,a=[],s=new to(i),c=0,u=0,d=0;d<r;d++){var f=l({index:d});if(f.height==null||isNaN(f.height)||f.width==null||isNaN(f.width)||f.x==null||isNaN(f.x)||f.y==null||isNaN(f.y))throw Error("Invalid metadata returned for cell ".concat(d,`:
|
|
15
|
-
x:`).concat(f.x,", y:").concat(f.y,", width:").concat(f.width,", height:").concat(f.height));c=Math.max(c,f.y+f.height),u=Math.max(u,f.x+f.width),a[d]=f,s.registerCell({cellMetadatum:f,index:d})}return{cellMetadata:a,height:c,sectionManager:s,width:u}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,n=e.cellIndex,r=e.height,l=e.scrollLeft,i=e.scrollTop,a=e.width,s=this.props.cellCount;if(n>=0&&n<s){var c=this._cellMetadata[n];l=Ne({align:t,cellOffset:c.x,cellSize:c.width,containerSize:a,currentOffset:l}),i=Ne({align:t,cellOffset:c.y,cellSize:c.height,containerSize:r,currentOffset:i})}return{scrollLeft:l,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,n=e.height,r=e.isScrolling,l=e.width,i=e.x,a=e.y,s=this.props,c=s.cellGroupRenderer,u=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:n,width:l,x:i,y:a}),c({cellCache:this._cellCache,cellRenderer:u,cellSizeAndPositionGetter:function(d){var f=d.index;return t._sectionManager.getCellMetadata({index:f})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}])}();function bt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bt=function(){return!!o})()}function Ue(o){var e=o.cellCount,t=o.cellSize,n=o.computeMetadataCallback,r=o.computeMetadataCallbackProps,l=o.nextCellsCount,i=o.nextCellSize,a=o.nextScrollToIndex,s=o.scrollToIndex,c=o.updateScrollOffsetForScrollToIndex;e===l&&(typeof t!="number"&&typeof i!="number"||t===i)||(n(r),s>=0&&s===a&&c())}function ie(o,e){if(o==null)return{};var t,n,r=k._objectWithoutPropertiesLoose(o,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(n=0;n<l.length;n++)t=l[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(o,t)&&(r[t]=o[t])}return r}p(Be,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(o){var e=o.cellCache,t=o.cellRenderer,n=o.cellSizeAndPositionGetter,r=o.indices,l=o.isScrolling;return r.map(function(i){var a=n({index:i}),s={index:i,isScrolling:l,key:i,style:{height:a.height,left:a.x,position:"absolute",top:a.y,width:a.width}};return l?(i in e||(e[i]=t(s)),e[i]):t(s)}).filter(function(i){return!!i})}}),Be.propTypes={},function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=P(l=o),(n=D(r,bt()?Reflect.construct(l,i||[],P(r).constructor):l.apply(r,i)))._registerChild=n._registerChild.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.columnMaxWidth,r=t.columnMinWidth,l=t.columnCount,i=t.width;n===e.columnMaxWidth&&r===e.columnMinWidth&&l===e.columnCount&&i===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.columnMaxWidth,r=e.columnMinWidth,l=e.columnCount,i=e.width,a=r||1,s=n?Math.min(n,i):i,c=i/l;return c=Math.max(a,c),c=Math.min(s,c),c=Math.floor(c),t({adjustedWidth:Math.min(i,c*l),columnWidth:c,getColumnWidth:function(){return c},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&typeof e.recomputeGridSize!="function")throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}])}().propTypes={};var B,oo=function(){return W(function o(e){var t=e.cellCount,n=e.cellSizeGetter,r=e.estimatedCellSize;E(this,o),p(this,"_cellSizeAndPositionData",{}),p(this,"_lastMeasuredIndex",-1),p(this,"_lastBatchedIndex",-1),p(this,"_cellCount",void 0),p(this,"_cellSizeGetter",void 0),p(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=t,this._estimatedCellSize=r},[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(o){var e=o.cellCount,t=o.estimatedCellSize,n=o.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=t,this._cellSizeGetter=n}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(o){if(o<0||o>=this._cellCount)throw Error("Requested index ".concat(o," is outside of range 0..").concat(this._cellCount));if(o>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),t=e.offset+e.size,n=this._lastMeasuredIndex+1;n<=o;n++){var r=this._cellSizeGetter({index:n});if(r===void 0||isNaN(r))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(r));r===null?(this._cellSizeAndPositionData[n]={offset:t,size:0},this._lastBatchedIndex=o):(this._cellSizeAndPositionData[n]={offset:t,size:r},t+=r,this._lastMeasuredIndex=o)}return this._cellSizeAndPositionData[o]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var o=this.getSizeAndPositionOfLastMeasuredCell();return o.offset+o.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(o){var e=o.align,t=e===void 0?"auto":e,n=o.containerSize,r=o.currentOffset,l=o.targetIndex;if(n<=0)return 0;var i,a=this.getSizeAndPositionOfCell(l),s=a.offset,c=s-n+a.size;switch(t){case"start":i=s;break;case"end":i=c;break;case"center":i=s-(n-a.size)/2;break;default:i=Math.max(c,Math.min(s,r))}var u=this.getTotalSize();return Math.max(0,Math.min(u-n,i))}},{key:"getVisibleCellRange",value:function(o){var e=o.containerSize,t=o.offset;if(this.getTotalSize()===0)return{};var n=t+e,r=this._findNearestCell(t),l=this.getSizeAndPositionOfCell(r);t=l.offset+l.size;for(var i=r;t<n&&i<this._cellCount-1;)i++,t+=this.getSizeAndPositionOfCell(i).size;return{start:r,stop:i}}},{key:"resetCell",value:function(o){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,o-1)}},{key:"_binarySearch",value:function(o,e,t){for(;e<=o;){var n=e+Math.floor((o-e)/2),r=this.getSizeAndPositionOfCell(n).offset;if(r===t)return n;r<t?e=n+1:r>t&&(o=n-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(o,e){for(var t=1;o<this._cellCount&&this.getSizeAndPositionOfCell(o).offset<e;)o+=t,t*=2;return this._binarySearch(Math.min(o,this._cellCount-1),Math.floor(o/2),e)}},{key:"_findNearestCell",value:function(o){if(isNaN(o))throw Error("Invalid offset ".concat(o," specified"));o=Math.max(0,o);var e=this.getSizeAndPositionOfLastMeasuredCell(),t=Math.max(0,this._lastMeasuredIndex);return e.offset>=o?this._binarySearch(t,0,o):this._exponentialSearch(t,o)}}])}(),no=function(){return typeof window<"u"&&window.chrome?16777100:15e5},ro=["maxScrollSize"],Ve=function(){return W(function o(e){var t=e.maxScrollSize,n=t===void 0?no():t,r=ie(e,ro);E(this,o),p(this,"_cellSizeAndPositionManager",void 0),p(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new oo(r),this._maxScrollSize=n},[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(o){this._cellSizeAndPositionManager.configure(o)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize(),l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:r});return Math.round(l*(r-n))}},{key:"getSizeAndPositionOfCell",value:function(o){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(o){var e=o.align,t=e===void 0?"auto":e,n=o.containerSize,r=o.currentOffset,l=o.targetIndex;r=this._safeOffsetToOffset({containerSize:n,offset:r});var i=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:n,currentOffset:r,targetIndex:l});return this._offsetToSafeOffset({containerSize:n,offset:i})}},{key:"getVisibleCellRange",value:function(o){var e=o.containerSize,t=o.offset;return t=this._safeOffsetToOffset({containerSize:e,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:t})}},{key:"resetCell",value:function(o){this._cellSizeAndPositionManager.resetCell(o)}},{key:"_getOffsetPercentage",value:function(o){var e=o.containerSize,t=o.offset,n=o.totalSize;return n<=e?0:t/(n-e)}},{key:"_offsetToSafeOffset",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:n});return Math.round(l*(r-e))}},{key:"_safeOffsetToOffset",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:r});return Math.round(l*(n-e))}}])}();function qe(o){var e=o.cellSize,t=o.cellSizeAndPositionManager,n=o.previousCellsCount,r=o.previousCellSize,l=o.previousScrollToAlignment,i=o.previousScrollToIndex,a=o.previousSize,s=o.scrollOffset,c=o.scrollToAlignment,u=o.scrollToIndex,d=o.size,f=o.sizeJustIncreasedFromZero,h=o.updateScrollIndexCallback,g=t.getCellCount(),v=u>=0&&u<g;v&&(d!==a||f||!r||typeof e=="number"&&e!==r||c!==l||u!==i)?h(u):!v&&g>0&&(d<a||g<n)&&s>t.getTotalSize()-d&&h(g-1)}var io=(B=typeof window<"u"?window:typeof self<"u"?self:{}).requestAnimationFrame||B.webkitRequestAnimationFrame||B.mozRequestAnimationFrame||B.oRequestAnimationFrame||B.msRequestAnimationFrame||function(o){return B.setTimeout(o,1e3/60)},lo=B.cancelAnimationFrame||B.webkitCancelAnimationFrame||B.mozCancelAnimationFrame||B.oCancelAnimationFrame||B.msCancelAnimationFrame||function(o){B.clearTimeout(o)},Ke=io,so=lo,oe=function(o){return so(o.id)},ke=function(o,e){var t;Promise.resolve().then(function(){t=Date.now()});var n=function(){Date.now()-t>=e?o.call():r.id=Ke(n)},r={id:Ke(n)};return r};function $e(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function F(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Tt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tt=function(){return!!o})()}var ao="observed",Xe="requested",$=function(){function o(e){var t,n,r,l;E(this,o),n=this,l=[e],r=P(r=o),p(t=D(n,Tt()?Reflect.construct(r,l||[],P(n).constructor):r.apply(n,l)),"_onGridRenderedMemoizer",te()),p(t,"_onScrollMemoizer",te(!1)),p(t,"_deferredInvalidateColumnIndex",null),p(t,"_deferredInvalidateRowIndex",null),p(t,"_recomputeScrollLeftFlag",!1),p(t,"_recomputeScrollTopFlag",!1),p(t,"_horizontalScrollBarSize",0),p(t,"_verticalScrollBarSize",0),p(t,"_scrollbarPresenceChanged",!1),p(t,"_scrollingContainer",void 0),p(t,"_childrenToDisplay",void 0),p(t,"_columnStartIndex",void 0),p(t,"_columnStopIndex",void 0),p(t,"_rowStartIndex",void 0),p(t,"_rowStopIndex",void 0),p(t,"_renderedColumnStartIndex",0),p(t,"_renderedColumnStopIndex",0),p(t,"_renderedRowStartIndex",0),p(t,"_renderedRowStopIndex",0),p(t,"_initialScrollTop",void 0),p(t,"_initialScrollLeft",void 0),p(t,"_disablePointerEventsTimeoutId",void 0),p(t,"_styleCache",{}),p(t,"_cellCache",{}),p(t,"_debounceScrollEndedCallback",function(){t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1,needToResetStyleCache:!1})}),p(t,"_invokeOnGridRenderedHelper",function(){var s=t.props.onSectionRendered;t._onGridRenderedMemoizer({callback:s,indices:{columnOverscanStartIndex:t._columnStartIndex,columnOverscanStopIndex:t._columnStopIndex,columnStartIndex:t._renderedColumnStartIndex,columnStopIndex:t._renderedColumnStopIndex,rowOverscanStartIndex:t._rowStartIndex,rowOverscanStopIndex:t._rowStopIndex,rowStartIndex:t._renderedRowStartIndex,rowStopIndex:t._renderedRowStopIndex}})}),p(t,"_setScrollingContainerRef",function(s){t._scrollingContainer=s,typeof t.props.elementRef=="function"?t.props.elementRef(s):Y(t.props.elementRef)==="object"&&(t.props.elementRef.current=s)}),p(t,"_onScroll",function(s){s.target===t._scrollingContainer&&t.handleScrollEvent(s.target)});var i=new Ve({cellCount:e.columnCount,cellSizeGetter:function(s){return o._wrapSizeGetter(e.columnWidth)(s)},estimatedCellSize:o._getEstimatedColumnSize(e)}),a=new Ve({cellCount:e.rowCount,cellSizeGetter:function(s){return o._wrapSizeGetter(e.rowHeight)(s)},estimatedCellSize:o._getEstimatedRowSize(e)});return t.state={instanceProps:{columnSizeAndPositionManager:i,rowSizeAndPositionManager:a,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:e.isScrolling===!0,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(t._initialScrollTop=t._getCalculatedScrollTop(e,t.state)),e.scrollToColumn>0&&(t._initialScrollLeft=t._getCalculatedScrollLeft(e,t.state)),t}return j(o,x.PureComponent),W(o,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.alignment,n=t===void 0?this.props.scrollToAlignment:t,r=e.columnIndex,l=r===void 0?this.props.scrollToColumn:r,i=e.rowIndex,a=i===void 0?this.props.scrollToRow:i,s=F(F({},this.props),{},{scrollToAlignment:n,scrollToColumn:l,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=t===void 0?0:t,r=e.scrollTop,l=r===void 0?0:r;if(!(l<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,s=i.autoWidth,c=i.height,u=i.width,d=this.state.instanceProps,f=d.scrollbarSize,h=d.rowSizeAndPositionManager.getTotalSize(),g=d.columnSizeAndPositionManager.getTotalSize(),v=Math.min(Math.max(0,g-u+f),n),_=Math.min(Math.max(0,h-c+f),l);if(this.state.scrollLeft!==v||this.state.scrollTop!==_){var S={isScrolling:!0,scrollDirectionHorizontal:v!==this.state.scrollLeft?v>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:_!==this.state.scrollTop?_>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:ao};a||(S.scrollTop=_),s||(S.scrollLeft=v),S.needToResetStyleCache=!1,this.setState(S)}this._invokeOnScrollMemoizer({scrollLeft:v,scrollTop:_,totalColumnsWidth:g,totalRowsHeight:h})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r,i=this.props,a=i.scrollToColumn,s=i.scrollToRow,c=this.state.instanceProps;c.columnSizeAndPositionManager.resetCell(n),c.rowSizeAndPositionManager.resetCell(l),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===1?n<=a:n>=a),this._recomputeScrollTopFlag=s>=0&&(this.state.scrollDirectionVertical===1?l<=s:l>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,l=this.props;r>1&&t!==void 0&&this._updateScrollLeftForScrollToColumn(F(F({},l),{},{scrollToColumn:t})),n!==void 0&&this._updateScrollTopForScrollToRow(F(F({},l),{},{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.getScrollbarSize,n=e.height,r=e.scrollLeft,l=e.scrollToColumn,i=e.scrollTop,a=e.scrollToRow,s=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState(function(f){var h=F(F({},f),{},{needToResetStyleCache:!1});return h.instanceProps.scrollbarSize=t(),h.instanceProps.scrollbarSizeMeasured=!0,h}),typeof r=="number"&&r>=0||typeof i=="number"&&i>=0){var u=o._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:r,scrollTop:i});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=n>0&&s>0;l>=0&&d&&this._updateScrollLeftForScrollToColumn(),a>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:i||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,l=r.autoHeight,i=r.autoWidth,a=r.columnCount,s=r.height,c=r.rowCount,u=r.scrollToAlignment,d=r.scrollToColumn,f=r.scrollToRow,h=r.width,g=this.state,v=g.scrollLeft,_=g.scrollPositionChangeReason,S=g.scrollTop,m=g.instanceProps;this._handleInvalidatedGridSize();var y=a>0&&e.columnCount===0||c>0&&e.rowCount===0;_===Xe&&(!i&&v>=0&&(v!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=v),!l&&S>=0&&(S!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=S));var w=(e.width===0||e.height===0)&&s>0&&h>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):qe({cellSizeAndPositionManager:m.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:v,scrollToAlignment:u,scrollToIndex:d,size:h,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):qe({cellSizeAndPositionManager:m.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:S,scrollToAlignment:u,scrollToIndex:f,size:s,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),v!==t.scrollLeft||S!==t.scrollTop){var C=m.rowSizeAndPositionManager.getTotalSize(),R=m.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:v,scrollTop:S,totalColumnsWidth:R,totalRowsHeight:C})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&oe(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,l=e.className,i=e.containerProps,a=e.containerRole,s=e.containerStyle,c=e.height,u=e.id,d=e.noContentRenderer,f=e.role,h=e.style,g=e.tabIndex,v=e.width,_=this.state,S=_.instanceProps,m=_.needToResetStyleCache,y=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:n?"auto":c,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};m&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=S.columnSizeAndPositionManager.getTotalSize(),R=S.rowSizeAndPositionManager.getTotalSize(),z=R>c?S.scrollbarSize:0,b=C>v?S.scrollbarSize:0;b===this._horizontalScrollBarSize&&z===this._verticalScrollBarSize||(this._horizontalScrollBarSize=b,this._verticalScrollBarSize=z,this._scrollbarPresenceChanged=!0),w.overflowX=C+z<=v?"hidden":"auto",w.overflowY=R+b<=c?"hidden":"auto";var I=this._childrenToDisplay,O=I.length===0&&c>0&&v>0;return x.createElement("div",k._extends({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:V.clsx("ReactVirtualized__Grid",l),id:u,onScroll:this._onScroll,role:f,style:F(F({},w),h),tabIndex:g}),I.length>0&&x.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:F({width:t?"auto":C,height:R,maxWidth:C,maxHeight:R,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},s)},I),O&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,l=e.columnCount,i=e.deferredMeasurementCache,a=e.height,s=e.overscanColumnCount,c=e.overscanIndicesGetter,u=e.overscanRowCount,d=e.rowCount,f=e.width,h=e.isScrollingOptOut,g=t.scrollDirectionHorizontal,v=t.scrollDirectionVertical,_=t.instanceProps,S=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,m=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&f>0){var w=_.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:m}),C=_.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:S}),R=_.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:m}),z=_.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:S});this._renderedColumnStartIndex=w.start,this._renderedColumnStopIndex=w.stop,this._renderedRowStartIndex=C.start,this._renderedRowStopIndex=C.stop;var b=c({direction:"horizontal",cellCount:l,overscanCellsCount:s,scrollDirection:g,startIndex:typeof w.start=="number"?w.start:0,stopIndex:typeof w.stop=="number"?w.stop:-1}),I=c({direction:"vertical",cellCount:d,overscanCellsCount:u,scrollDirection:v,startIndex:typeof C.start=="number"?C.start:0,stopIndex:typeof C.stop=="number"?C.stop:-1}),O=b.overscanStartIndex,T=b.overscanStopIndex,G=I.overscanStartIndex,M=I.overscanStopIndex;if(i){if(!i.hasFixedHeight()){for(var H=G;H<=M;H++)if(!i.has(H,0)){O=0,T=l-1;break}}if(!i.hasFixedWidth()){for(var Q=O;Q<=T;Q++)if(!i.has(0,Q)){G=0,M=d-1;break}}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:_.columnSizeAndPositionManager,columnStartIndex:O,columnStopIndex:T,deferredMeasurementCache:i,horizontalOffsetAdjustment:R,isScrolling:y,isScrollingOptOut:h,parent:this,rowSizeAndPositionManager:_.rowSizeAndPositionManager,rowStartIndex:G,rowStopIndex:M,scrollLeft:m,scrollTop:S,styleCache:this._styleCache,verticalOffsetAdjustment:z,visibleColumnIndices:w,visibleRowIndices:C}),this._columnStartIndex=O,this._columnStopIndex=T,this._rowStartIndex=G,this._rowStopIndex=M}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&oe(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=ke(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(a){var s=a.scrollLeft,c=a.scrollTop,u=t.props,d=u.height;(0,u.onScroll)({clientHeight:d,clientWidth:u.width,scrollHeight:i,scrollLeft:s,scrollTop:c,scrollWidth:l})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r=o._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:t,scrollTop:n});r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return o._getCalculatedScrollLeft(e,t)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=o._getScrollLeftForScrollToColumnStateUpdate(e,t);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return o._getCalculatedScrollTop(e,t)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var l=this._columnStartIndex;l<=this._columnStopIndex;l++){var i="".concat(r,"-").concat(l);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=o._getScrollTopForScrollToRowStateUpdate(e,t);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};e.columnCount===0&&t.scrollLeft!==0||e.rowCount===0&&t.scrollTop!==0?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==t.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==t.scrollTop&&e.scrollToRow<0)&&Object.assign(n,o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var r,l,i=t.instanceProps;return n.needToResetStyleCache=!1,e.columnWidth===i.prevColumnWidth&&e.rowHeight===i.prevRowHeight||(n.needToResetStyleCache=!0),i.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:o._getEstimatedColumnSize(e),cellSizeGetter:o._wrapSizeGetter(e.columnWidth)}),i.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:o._getEstimatedRowSize(e),cellSizeGetter:o._wrapSizeGetter(e.rowHeight)}),i.prevColumnCount!==0&&i.prevRowCount!==0||(i.prevColumnCount=0,i.prevRowCount=0),e.autoHeight&&e.isScrolling===!1&&i.prevIsScrolling===!0&&Object.assign(n,{isScrolling:!1}),Ue({cellCount:i.prevColumnCount,cellSize:typeof i.prevColumnWidth=="number"?i.prevColumnWidth:null,computeMetadataCallback:function(){return i.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:typeof e.columnWidth=="number"?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:i.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=o._getScrollLeftForScrollToColumnStateUpdate(e,t)}}),Ue({cellCount:i.prevRowCount,cellSize:typeof i.prevRowHeight=="number"?i.prevRowHeight:null,computeMetadataCallback:function(){return i.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:typeof e.rowHeight=="number"?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:i.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){l=o._getScrollTopForScrollToRowStateUpdate(e,t)}}),i.prevColumnCount=e.columnCount,i.prevColumnWidth=e.columnWidth,i.prevIsScrolling=e.isScrolling===!0,i.prevRowCount=e.rowCount,i.prevRowHeight=e.rowHeight,i.prevScrollToColumn=e.scrollToColumn,i.prevScrollToRow=e.scrollToRow,i.scrollbarSize=e.getScrollbarSize(),i.scrollbarSize===void 0?(i.scrollbarSizeMeasured=!1,i.scrollbarSize=0):i.scrollbarSizeMeasured=!0,n.instanceProps=i,F(F(F({},n),r),l)}},{key:"_getEstimatedColumnSize",value:function(e){return typeof e.columnWidth=="number"?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return typeof e.rowHeight=="number"?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,l={scrollPositionChangeReason:Xe};return typeof n=="number"&&n>=0&&(l.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,l.scrollLeft=n),typeof r=="number"&&r>=0&&(l.scrollDirectionVertical=r>t.scrollTop?1:-1,l.scrollTop=r),typeof n=="number"&&n>=0&&n!==t.scrollLeft||typeof r=="number"&&r>=0&&r!==t.scrollTop?l:{}}},{key:"_wrapSizeGetter",value:function(e){return typeof e=="function"?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,l=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,s=t.scrollLeft,c=t.instanceProps;if(n>0){var u=n-1,d=i<0?u:Math.min(u,i),f=c.rowSizeAndPositionManager.getTotalSize(),h=c.scrollbarSizeMeasured&&f>r?c.scrollbarSize:0;return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:a-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,t){var n=t.scrollLeft,r=o._getCalculatedScrollLeft(e,t);return typeof r=="number"&&r>=0&&n!==r?o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:r,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,l=e.scrollToAlignment,i=e.scrollToRow,a=e.width,s=t.scrollTop,c=t.instanceProps;if(r>0){var u=r-1,d=i<0?u:Math.min(u,i),f=c.columnSizeAndPositionManager.getTotalSize(),h=c.scrollbarSizeMeasured&&f>a?c.scrollbarSize:0;return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:n-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,t){var n=t.scrollTop,r=o._getCalculatedScrollTop(e,t);return typeof r=="number"&&r>=0&&n!==r?o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:-1,scrollTop:r}):{}}}])}();p($,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(o){for(var e=o.cellCache,t=o.cellRenderer,n=o.columnSizeAndPositionManager,r=o.columnStartIndex,l=o.columnStopIndex,i=o.deferredMeasurementCache,a=o.horizontalOffsetAdjustment,s=o.isScrolling,c=o.isScrollingOptOut,u=o.parent,d=o.rowSizeAndPositionManager,f=o.rowStartIndex,h=o.rowStopIndex,g=o.styleCache,v=o.verticalOffsetAdjustment,_=o.visibleColumnIndices,S=o.visibleRowIndices,m=[],y=n.areOffsetsAdjusted()||d.areOffsetsAdjusted(),w=!s&&!y,C=f;C<=h;C++)for(var R=d.getSizeAndPositionOfCell(C),z=r;z<=l;z++){var b=n.getSizeAndPositionOfCell(z),I=z>=_.start&&z<=_.stop&&C>=S.start&&C<=S.stop,O="".concat(C,"-").concat(z),T=void 0;w&&g[O]?T=g[O]:i&&!i.has(C,z)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:R.size,left:b.offset+a,position:"absolute",top:R.offset+v,width:b.size},g[O]=T);var G={columnIndex:z,isScrolling:s,isVisible:I,key:O,parent:u,rowIndex:C,style:T},M=void 0;!c&&!s||a||v?M=t(G):(e[O]||(e[O]=t(G)),M=e[O]),M!=null&&M!==!1&&(M.props.role||(M=U.cloneElement(M,{role:"gridcell"})),m.push(M))}return m},containerRole:"row",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:xe,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(o){var e=o.cellCount,t=o.overscanCellsCount,n=o.scrollDirection,r=o.startIndex,l=o.stopIndex;return n===1?{overscanStartIndex:Math.max(0,r),overscanStopIndex:Math.min(e-1,l+t)}:{overscanStartIndex:Math.max(0,r-t),overscanStopIndex:Math.min(e-1,l)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),de($);function zt(o){var e=o.cellCount,t=o.overscanCellsCount,n=o.scrollDirection,r=o.startIndex,l=o.stopIndex;return t=Math.max(1,t),n===1?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(e-1,l+t)}:{overscanStartIndex:Math.max(0,r-t),overscanStopIndex:Math.min(e-1,l+1)}}function Re(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,n=Array(e);t<e;t++)n[t]=o[t];return n}function It(o,e){if(o){if(typeof o=="string")return Re(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Re(o,e):void 0}}function co(o){return function(e){if(Array.isArray(e))return Re(e)}(o)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(o)||It(o)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
16
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Pt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pt=function(){return!!o})()}var Ye=function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=P(l=o),(n=D(r,Pt()?Reflect.construct(l,i||[],P(r).constructor):l.apply(r,i)))._loadMoreRowsMemoizer=te(),n._onRowsRendered=n._onRowsRendered.bind(n),n._registerChild=n._registerChild.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=te(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,n=this.props.loadMoreRows;e.forEach(function(r){var l=n(r);l&&l.then(function(){var i,a,s,c,u;i={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:r.startIndex,stopIndex:r.stopIndex},a=i.lastRenderedStartIndex,s=i.lastRenderedStopIndex,c=i.startIndex,u=i.stopIndex,c>s||u<a||t._registeredChild&&function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=typeof d.recomputeGridSize=="function"?d.recomputeGridSize:d.recomputeRowHeights;h?h.call(d,f):d.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,l=this.props,i=l.isRowLoaded,a=l.minimumBatchSize,s=l.rowCount,c=l.threshold,u=function(f){for(var h=f.isRowLoaded,g=f.minimumBatchSize,v=f.rowCount,_=f.startIndex,S=f.stopIndex,m=[],y=null,w=null,C=_;C<=S;C++)h({index:C})?w!==null&&(m.push({startIndex:y,stopIndex:w}),y=w=null):(w=C,y===null&&(y=C));if(w!==null){for(var R=Math.min(Math.max(w,y+g-1),v-1),z=w+1;z<=R&&!h({index:z});z++)w=z;m.push({startIndex:y,stopIndex:w})}if(m.length)for(var b=m[0];b.stopIndex-b.startIndex+1<g&&b.startIndex>0;){var I=b.startIndex-1;if(h({index:I}))break;b.startIndex=I}return m}({isRowLoaded:i,minimumBatchSize:a,rowCount:s,startIndex:Math.max(0,e-c),stopIndex:Math.min(s-1,t+c)}),d=(n=[]).concat.apply(n,co(u.map(function(f){return[f.startIndex,f.stopIndex]})));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(u)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}])}();function Ot(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ot=function(){return!!o})()}p(Ye,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),Ye.propTypes={};var uo=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,Ot()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"Grid",void 0),p(e,"_cellRenderer",function(s){var c=s.parent,u=s.rowIndex,d=s.style,f=s.isScrolling,h=s.isVisible,g=s.key,v=e.props.rowRenderer,_=Object.getOwnPropertyDescriptor(d,"width");return _&&_.writable&&(d.width="100%"),v({index:u,style:d,isScrolling:f,isVisible:h,key:g,parent:c})}),p(e,"_setRef",function(s){e.Grid=s}),p(e,"_onScroll",function(s){var c=s.clientHeight,u=s.scrollHeight,d=s.scrollTop;(0,e.props.onScroll)({clientHeight:c,scrollHeight:u,scrollTop:d})}),p(e,"_onSectionRendered",function(s){var c=s.rowOverscanStartIndex,u=s.rowOverscanStopIndex,d=s.rowStartIndex,f=s.rowStopIndex;(0,e.props.onRowsRendered)({overscanStartIndex:c,overscanStopIndex:u,startIndex:d,stopIndex:f})}),e}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,l=e.width,i=V.clsx("ReactVirtualized__List",t);return x.createElement($,k._extends({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:l,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}])}();function ho(o,e){return function(t){if(Array.isArray(t))return t}(o)||function(t,n){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var l,i,a,s,c=[],u=!0,d=!1;try{if(a=(r=r.call(t)).next,n!==0)for(;!(u=(l=a.call(r)).done)&&(c.push(l.value),c.length!==n);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}(o,e)||It(o,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}p(uo,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:zt,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const pe={ge:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=a+1;i<=a;){var d=i+a>>>1;c(l[d],s)>=0?(u=d,a=d-1):i=d+1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=a+1;i<=a;){var u=i+a>>>1;l[u]>=s?(c=u,a=u-1):i=u+1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},gt:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=a+1;i<=a;){var d=i+a>>>1;c(l[d],s)>0?(u=d,a=d-1):i=d+1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=a+1;i<=a;){var u=i+a>>>1;l[u]>s?(c=u,a=u-1):i=u+1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},lt:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=i-1;i<=a;){var d=i+a>>>1;c(l[d],s)<0?(u=d,i=d+1):a=d-1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=i-1;i<=a;){var u=i+a>>>1;l[u]<s?(c=u,i=u+1):a=u-1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},le:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=i-1;i<=a;){var d=i+a>>>1;c(l[d],s)<=0?(u=d,i=d+1):a=d-1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=i-1;i<=a;){var u=i+a>>>1;l[u]<=s?(c=u,i=u+1):a=u-1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},eq:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(;i<=a;){var u=i+a>>>1,d=c(l[u],s);if(d===0)return u;d<=0?i=u+1:a=u-1}return-1}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(;i<=a;){var c=i+a>>>1,u=l[c];if(u===s)return c;u<=s?i=c+1:a=c-1}return-1}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)}};function Me(o,e,t,n,r){this.mid=o,this.left=e,this.right=t,this.leftPoints=n,this.rightPoints=r,this.count=(e?e.count:0)+(t?t.count:0)+n.length}var re=Me.prototype;function Se(o,e){o.mid=e.mid,o.left=e.left,o.right=e.right,o.leftPoints=e.leftPoints,o.rightPoints=e.rightPoints,o.count=e.count}function kt(o,e){var t=ce(e);o.mid=t.mid,o.left=t.left,o.right=t.right,o.leftPoints=t.leftPoints,o.rightPoints=t.rightPoints,o.count=t.count}function Je(o,e){var t=o.intervals([]);t.push(e),kt(o,t)}function Ze(o,e){var t=o.intervals([]),n=t.indexOf(e);return n<0?0:(t.splice(n,1),kt(o,t),1)}function Qe(o,e,t){for(var n=0;n<o.length&&o[n][0]<=e;++n){var r=t(o[n]);if(r)return r}}function et(o,e,t){for(var n=o.length-1;n>=0&&o[n][1]>=e;--n){var r=t(o[n]);if(r)return r}}function tt(o,e){for(var t=0;t<o.length;++t){var n=e(o[t]);if(n)return n}}function fo(o,e){return o-e}function be(o,e){var t=o[0]-e[0];return t||o[1]-e[1]}function Te(o,e){var t=o[1]-e[1];return t||o[0]-e[0]}function ce(o){if(o.length===0)return null;for(var e=[],t=0;t<o.length;++t)e.push(o[t][0],o[t][1]);e.sort(fo);var n=e[e.length>>1],r=[],l=[],i=[];for(t=0;t<o.length;++t){var a=o[t];a[1]<n?r.push(a):n<a[0]?l.push(a):i.push(a)}var s=i,c=i.slice();return s.sort(be),c.sort(Te),new Me(n,ce(r),ce(l),s,c)}function Mt(o){this.root=o}re.intervals=function(o){return o.push.apply(o,this.leftPoints),this.left&&this.left.intervals(o),this.right&&this.right.intervals(o),o},re.insert=function(o){var e=this.count-this.leftPoints.length;if(this.count+=1,o[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?Je(this,o):this.left.insert(o):this.left=ce([o]);else if(o[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?Je(this,o):this.right.insert(o):this.right=ce([o]);else{var t=pe.ge(this.leftPoints,o,be),n=pe.ge(this.rightPoints,o,Te);this.leftPoints.splice(t,0,o),this.rightPoints.splice(n,0,o)}},re.remove=function(o){var e=this.count-this.leftPoints;if(o[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?Ze(this,o):(l=this.left.remove(o))===2?(this.left=null,this.count-=1,1):(l===1&&(this.count-=1),l):0;if(o[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?Ze(this,o):(l=this.right.remove(o))===2?(this.right=null,this.count-=1,1):(l===1&&(this.count-=1),l):0;if(this.count===1)return this.leftPoints[0]===o?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===o){if(this.left&&this.right){for(var t=this,n=this.left;n.right;)t=n,n=n.right;if(t===this)n.right=this.right;else{var r=this.left,l=this.right;t.count-=n.count,t.right=n.left,n.left=r,n.right=l}Se(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Se(this,this.left):Se(this,this.right);return 1}for(r=pe.ge(this.leftPoints,o,be);r<this.leftPoints.length&&this.leftPoints[r][0]===o[0];++r)if(this.leftPoints[r]===o){for(this.count-=1,this.leftPoints.splice(r,1),l=pe.ge(this.rightPoints,o,Te);l<this.rightPoints.length&&this.rightPoints[l][1]===o[1];++l)if(this.rightPoints[l]===o)return this.rightPoints.splice(l,1),1}return 0},re.queryPoint=function(o,e){if(o<this.mid)return this.left&&(t=this.left.queryPoint(o,e))?t:Qe(this.leftPoints,o,e);if(o>this.mid){var t;return this.right&&(t=this.right.queryPoint(o,e))?t:et(this.rightPoints,o,e)}return tt(this.leftPoints,e)},re.queryInterval=function(o,e,t){var n;return o<this.mid&&this.left&&(n=this.left.queryInterval(o,e,t))||e>this.mid&&this.right&&(n=this.right.queryInterval(o,e,t))?n:e<this.mid?Qe(this.leftPoints,e,t):o>this.mid?et(this.rightPoints,o,t):tt(this.leftPoints,t)};var ee=Mt.prototype;ee.insert=function(o){this.root?this.root.insert(o):this.root=new Me(o[0],null,null,[o],[o])},ee.remove=function(o){if(this.root){var e=this.root.remove(o);return e===2&&(this.root=null),e!==0}return!1},ee.queryPoint=function(o,e){if(this.root)return this.root.queryPoint(o,e)},ee.queryInterval=function(o,e,t){if(o<=e&&this.root)return this.root.queryInterval(o,e,t)},Object.defineProperty(ee,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(ee,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var ye=function(){return W(function o(){E(this,o),p(this,"_columnSizeMap",{}),p(this,"_intervalTree",new Mt(null)),p(this,"_leftMap",{})},[{key:"estimateTotalHeight",value:function(o,e,t){var n=o-this.count;return this.tallestColumnSize+Math.ceil(n/e)*t}},{key:"range",value:function(o,e,t){var n=this;this._intervalTree.queryInterval(o,o+e,function(r){var l=ho(r,3),i=l[0];l[1];var a=l[2];return t(a,n._leftMap[a],i)})}},{key:"setPosition",value:function(o,e,t,n){this._intervalTree.insert([t,t+n,o]),this._leftMap[o]=e;var r=this._columnSizeMap,l=r[e];r[e]=l===void 0?t+n:Math.max(l,t+n)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var o=this._columnSizeMap,e=0;for(var t in o){var n=o[t];e=e===0?n:Math.min(e,n)}return e}},{key:"tallestColumnSize",get:function(){var o=this._columnSizeMap,e=0;for(var t in o){var n=o[t];e=Math.max(e,n)}return e}}])}();function ot(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function po(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ot(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Lt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lt=function(){return!!o})()}var nt=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,Lt()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"state",{isScrolling:!1,scrollTop:0}),p(e,"_debounceResetIsScrollingId",void 0),p(e,"_invalidateOnUpdateStartIndex",null),p(e,"_invalidateOnUpdateStopIndex",null),p(e,"_positionCache",new ye),p(e,"_startIndex",null),p(e,"_startIndexMemoized",null),p(e,"_stopIndex",null),p(e,"_stopIndexMemoized",null),p(e,"_debounceResetIsScrollingCallback",function(){e.setState({isScrolling:!1})}),p(e,"_setScrollingContainerRef",function(s){e._scrollingContainer=s}),p(e,"_onScroll",function(s){var c=e.props.height,u=s.currentTarget.scrollTop,d=Math.min(Math.max(0,e._getEstimatedTotalHeight()-c),u);u===d&&(e._debounceResetIsScrolling(),e.state.scrollTop!==d&&e.setState({isScrolling:!0,scrollTop:d}))}),e}return j(o,x.PureComponent),W(o,[{key:"clearCellPositions",value:function(){this._positionCache=new ye,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new ye,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&oe(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.autoHeight,l=n.cellCount,i=n.cellMeasurerCache,a=n.cellRenderer,s=n.className,c=n.height,u=n.id,d=n.keyMapper,f=n.overscanByPixels,h=n.role,g=n.style,v=n.tabIndex,_=n.width,S=n.rowDirection,m=this.state,y=m.isScrolling,w=m.scrollTop,C=[],R=this._getEstimatedTotalHeight(),z=this._positionCache.shortestColumnSize,b=this._positionCache.count,I=0;if(this._positionCache.range(Math.max(0,w-f),c+2*f,function(G,M,H){e===void 0?(I=G,e=G):(I=Math.min(I,G),e=Math.max(e,G)),C.push(a({index:G,isScrolling:y,key:d(G),parent:t,style:p(p(p(p({height:i.getHeight(G)},S==="ltr"?"left":"right",M),"position","absolute"),"top",H),"width",i.getWidth(G))}))}),z<w+c+f&&b<l)for(var O=Math.min(l-b,Math.ceil((w+c+f-z)/i.defaultHeight*_/i.defaultWidth)),T=b;T<b+O;T++)e=T,C.push(a({index:T,isScrolling:y,key:d(T),parent:this,style:{width:i.getWidth(T)}}));return this._startIndex=I,this._stopIndex=e,x.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:V.clsx("ReactVirtualized__Masonry",s),id:u,onScroll:this._onScroll,role:h,style:po({boxSizing:"border-box",direction:"ltr",height:r?"auto":c,overflowX:"hidden",overflowY:R<c?"hidden":"auto",position:"relative",width:_,WebkitOverflowScrolling:"touch",willChange:"transform"},g),tabIndex:v},x.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:R,maxWidth:"100%",maxHeight:R,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"}},C))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&oe(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=ke(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,n=e.cellMeasurerCache,r=e.width,l=Math.max(1,Math.floor(r/n.defaultWidth));return this._positionCache.estimateTotalHeight(t,l,n.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,n=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(n({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var n=this.props,r=n.cellMeasurerCache,l=n.cellPositioner,i=e;i<=t;i++){var a=l(i),s=a.left,c=a.top;this._positionCache.setPosition(i,s,c,r.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollTop!==void 0&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}])}();function rt(){}p(nt,"defaultProps",{autoHeight:!1,keyMapper:function(o){return o},onCellsRendered:rt,onScroll:rt,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),de(nt);var we=function(){return W(function o(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E(this,o),p(this,"_cellMeasurerCache",void 0),p(this,"_columnIndexOffset",void 0),p(this,"_rowIndexOffset",void 0),p(this,"columnWidth",function(s){var c=s.index;e._cellMeasurerCache.columnWidth({index:c+e._columnIndexOffset})}),p(this,"rowHeight",function(s){var c=s.index;e._cellMeasurerCache.rowHeight({index:c+e._rowIndexOffset})});var n=t.cellMeasurerCache,r=t.columnIndexOffset,l=r===void 0?0:r,i=t.rowIndexOffset,a=i===void 0?0:i;this._cellMeasurerCache=n,this._columnIndexOffset=l,this._rowIndexOffset=a},[{key:"clear",value:function(o,e){this._cellMeasurerCache.clear(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(o,e,t,n){this._cellMeasurerCache.set(o+this._rowIndexOffset,e+this._columnIndexOffset,t,n)}}])}(),mo=["rowIndex"],go=["columnIndex","rowIndex"],vo=["columnIndex"],_o=["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"];function it(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function L(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?it(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):it(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Gt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gt=function(){return!!o})()}var Ce=function(){function o(e,t){var n,r,l,i;E(this,o),r=this,i=[e,t],l=P(l=o),p(n=D(r,Gt()?Reflect.construct(l,i||[],P(r).constructor):l.apply(r,i)),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),p(n,"_deferredInvalidateColumnIndex",null),p(n,"_deferredInvalidateRowIndex",null),p(n,"_bottomLeftGridRef",function(u){n._bottomLeftGrid=u}),p(n,"_bottomRightGridRef",function(u){n._bottomRightGrid=u}),p(n,"_cellRendererBottomLeftGrid",function(u){var d=u.rowIndex,f=ie(u,mo),h=n.props,g=h.cellRenderer,v=h.fixedRowCount;return d===h.rowCount-v?x.createElement("div",{key:f.key,style:L(L({},f.style),{},{height:20})}):g(L(L({},f),{},{parent:n,rowIndex:d+v}))}),p(n,"_cellRendererBottomRightGrid",function(u){var d=u.columnIndex,f=u.rowIndex,h=ie(u,go),g=n.props,v=g.cellRenderer,_=g.fixedColumnCount,S=g.fixedRowCount;return v(L(L({},h),{},{columnIndex:d+_,parent:n,rowIndex:f+S}))}),p(n,"_cellRendererTopRightGrid",function(u){var d=u.columnIndex,f=ie(u,vo),h=n.props,g=h.cellRenderer,v=h.columnCount,_=h.fixedColumnCount;return d===v-_?x.createElement("div",{key:f.key,style:L(L({},f.style),{},{width:20})}):g(L(L({},f),{},{columnIndex:d+_,parent:n}))}),p(n,"_columnWidthRightGrid",function(u){var d=u.index,f=n.props,h=f.columnCount,g=f.fixedColumnCount,v=f.columnWidth,_=n.state,S=_.scrollbarSize;return _.showHorizontalScrollbar&&d===h-g?S:typeof v=="function"?v({index:d+g}):v}),p(n,"_onScroll",function(u){var d=u.scrollLeft,f=u.scrollTop;n.setState({scrollLeft:d,scrollTop:f});var h=n.props.onScroll;h&&h(u)}),p(n,"_onScrollbarPresenceChange",function(u){var d=u.horizontal,f=u.size,h=u.vertical,g=n.state,v=g.showHorizontalScrollbar,_=g.showVerticalScrollbar;if(d!==v||h!==_){n.setState({scrollbarSize:f,showHorizontalScrollbar:d,showVerticalScrollbar:h});var S=n.props.onScrollbarPresenceChange;typeof S=="function"&&S({horizontal:d,size:f,vertical:h})}}),p(n,"_onScrollLeft",function(u){var d=u.scrollLeft;n._onScroll({scrollLeft:d,scrollTop:n.state.scrollTop})}),p(n,"_onScrollTop",function(u){var d=u.scrollTop;n._onScroll({scrollTop:d,scrollLeft:n.state.scrollLeft})}),p(n,"_rowHeightBottomGrid",function(u){var d=u.index,f=n.props,h=f.fixedRowCount,g=f.rowCount,v=f.rowHeight,_=n.state,S=_.scrollbarSize;return _.showVerticalScrollbar&&d===g-h?S:typeof v=="function"?v({index:d+h}):v}),p(n,"_topLeftGridRef",function(u){n._topLeftGrid=u}),p(n,"_topRightGridRef",function(u){n._topRightGrid=u});var a=e.deferredMeasurementCache,s=e.fixedColumnCount,c=e.fixedRowCount;return n._maybeCalculateCachedStyles(!0),a&&(n._deferredMeasurementCacheBottomLeftGrid=c>0?new we({cellMeasurerCache:a,columnIndexOffset:0,rowIndexOffset:c}):a,n._deferredMeasurementCacheBottomRightGrid=s>0||c>0?new we({cellMeasurerCache:a,columnIndexOffset:s,rowIndexOffset:c}):a,n._deferredMeasurementCacheTopRightGrid=s>0?new we({cellMeasurerCache:a,columnIndexOffset:s,rowIndexOffset:0}):a),n}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,l):l}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r,i=this.props,a=i.fixedColumnCount,s=i.fixedRowCount,c=Math.max(0,n-a),u=Math.max(0,l-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:u}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:c,rowIndex:u}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:l}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:c,rowIndex:l}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered;e.onScrollbarPresenceChange,e.scrollLeft;var r=e.scrollToColumn;e.scrollTop;var l=e.scrollToRow,i=ie(e,_o);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var a=this.state,s=a.scrollLeft,c=a.scrollTop;return x.createElement("div",{style:this._containerOuterStyle},x.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(L(L({},i),{},{onScroll:t,scrollLeft:s}))),x.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(L(L({},i),{},{onScroll:t,scrollTop:c})),this._renderBottomRightGrid(L(L({},i),{},{onScroll:t,onSectionRendered:n,scrollLeft:s,scrollToColumn:r,scrollToRow:l,scrollTop:c}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(this._leftGridWidth==null)if(typeof n=="function"){for(var r=0,l=0;l<t;l++)r+=n({index:l});this._leftGridWidth=r}else this._leftGridWidth=n*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,n=e.rowHeight;if(this._topGridHeight==null)if(typeof n=="function"){for(var r=0,l=0;l<t;l++)r+=n({index:l});this._topGridHeight=r}else this._topGridHeight=n*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,n=t.columnWidth,r=t.enableFixedColumnScroll,l=t.enableFixedRowScroll,i=t.height,a=t.fixedColumnCount,s=t.fixedRowCount,c=t.rowHeight,u=t.style,d=t.styleBottomLeftGrid,f=t.styleBottomRightGrid,h=t.styleTopLeftGrid,g=t.styleTopRightGrid,v=t.width,_=e||i!==this._lastRenderedHeight||v!==this._lastRenderedWidth,S=e||n!==this._lastRenderedColumnWidth||a!==this._lastRenderedFixedColumnCount,m=e||s!==this._lastRenderedFixedRowCount||c!==this._lastRenderedRowHeight;(e||_||u!==this._lastRenderedStyle)&&(this._containerOuterStyle=L({height:i,overflow:"visible",width:v},u)),(e||_||m)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:v},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:v}),(e||d!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=L({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},d)),(e||S||f!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=L({left:this._getLeftGridWidth(this.props),position:"absolute"},f)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=L({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||S||g!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=L({left:this._getLeftGridWidth(this.props),overflowX:l?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},g)),this._lastRenderedColumnWidth=n,this._lastRenderedFixedColumnCount=a,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=i,this._lastRenderedRowHeight=c,this._lastRenderedStyle=u,this._lastRenderedStyleBottomLeftGrid=d,this._lastRenderedStyleBottomRightGrid=f,this._lastRenderedStyleTopLeftGrid=h,this._lastRenderedStyleTopRightGrid=g,this._lastRenderedWidth=v}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,n=e.fixedColumnCount,r=e.fixedRowCount,l=e.rowCount,i=e.hideBottomLeftGridScrollbar,a=this.state.showVerticalScrollbar;if(!n)return null;var s=a?1:0,c=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),d=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,f=i?u+d:u,h=x.createElement($,k._extends({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:c,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,l-r)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:f}));return i?x.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:L(L({},this._bottomLeftGridStyle),{},{height:c,width:u,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,n=e.fixedColumnCount,r=e.fixedRowCount,l=e.rowCount,i=e.scrollToColumn,a=e.scrollToRow;return x.createElement($,k._extends({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-n),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,l-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:i-n,scrollToRow:a-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,n=e.fixedRowCount;return t&&n?x.createElement($,k._extends({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:n,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,n=e.enableFixedRowScroll,r=e.fixedColumnCount,l=e.fixedRowCount,i=e.scrollLeft,a=e.hideTopRightGridScrollbar,s=this.state,c=s.showHorizontalScrollbar,u=s.scrollbarSize;if(!l)return null;var d=c?1:0,f=this._getTopGridHeight(e),h=this._getRightGridWidth(e),g=c?u:0,v=f,_=this._topRightGridStyle;a&&(v=f+g,_=L(L({},this._topRightGridStyle),{},{left:0}));var S=x.createElement($,k._extends({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+d,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:v,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:l,scrollLeft:i,style:_,tabIndex:null,width:h}));return a?x.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:L(L({},this._topRightGridStyle),{},{height:f,width:h,overflowX:"hidden"})},S):S}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}])}();function At(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(At=function(){return!!o})()}p(Ce,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),Ce.propTypes={},de(Ce),function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=P(l=o),(n=D(r,At()?Reflect.construct(l,i||[],P(r).constructor):l.apply(r,i))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},n._onScroll=n._onScroll.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,l=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,s=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:l,scrollLeft:i,scrollTop:a,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,l=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:l,scrollTop:i,scrollWidth:a})}}])}().propTypes={};var ue="ASC",ze="DESC";function Et(o){var e=o.sortDirection,t=V.clsx("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":e===ue,"ReactVirtualized__Table__sortableHeaderIcon--DESC":e===ze});return x.createElement("svg",{className:t,width:18,height:18,viewBox:"0 0 24 24"},e===ue?x.createElement("path",{d:"M7 14l5-5 5 5z"}):x.createElement("path",{d:"M7 10l5 5 5-5z"}),x.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function Wt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wt=function(){return!!o})()}Et.propTypes={};var ve=function(){function o(){return E(this,o),e=this,n=arguments,t=P(t=o),D(e,Wt()?Reflect.construct(t,n||[],P(e).constructor):t.apply(e,n));var e,t,n}return j(o,x.Component),W(o)}();function lt(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function q(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lt(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):lt(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Ht(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ht=function(){return!!o})()}p(ve,"defaultProps",{cellDataGetter:function(o){var e=o.dataKey,t=o.rowData;return typeof t.get=="function"?t.get(e):t[e]},cellRenderer:function(o){var e=o.cellData;return e==null?"":String(e)},defaultSortDirection:ue,flexGrow:0,flexShrink:1,headerRenderer:function(o){var e=o.dataKey,t=o.label,n=o.sortBy,r=o.sortDirection,l=n===e,i=[x.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof t=="string"?t:null},t)];return l&&i.push(x.createElement(Et,{key:"SortIndicator",sortDirection:r})),i},style:{}}),ve.propTypes={};var Ie=function(){function o(e){var t,n,r,l;return E(this,o),n=this,l=[e],r=P(r=o),(t=D(n,Ht()?Reflect.construct(r,l||[],P(n).constructor):r.apply(n,l))).state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(t),t._createRow=t._createRow.bind(t),t._onScroll=t._onScroll.bind(t),t._onSectionRendered=t._onSectionRendered.bind(t),t._setRef=t._setRef.bind(t),t._setGridElementRef=t._setGridElementRef.bind(t),t}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.GridElement){var e=this.GridElement,t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,l=t.disableHeader,i=t.gridClassName,a=t.gridStyle,s=t.headerHeight,c=t.headerRowRenderer,u=t.height,d=t.id,f=t.noRowsRenderer,h=t.rowClassName,g=t.rowStyle,v=t.scrollToIndex,_=t.style,S=t.width,m=this.state.scrollbarWidth,y=l?u:u-s,w=typeof h=="function"?h({index:-1}):h,C=typeof g=="function"?g({index:-1}):g;return this._cachedColumnStyles=[],x.Children.toArray(n).forEach(function(R,z){var b=e._getFlexStyleForColumn(R,R.props.style||ve.defaultProps.style);e._cachedColumnStyles[z]=q({overflow:"hidden"},b)}),x.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":x.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:V.clsx("ReactVirtualized__Table",r),id:d,role:"grid",style:_},!l&&c({className:V.clsx("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:q({height:s,overflow:"hidden",paddingRight:m,width:S},C)}),x.createElement($,k._extends({},this.props,{elementRef:this._setGridElementRef,"aria-readonly":null,autoContainerWidth:!0,className:V.clsx("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:S,columnCount:1,height:y,id:void 0,noContentRenderer:f,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:m,scrollToRow:v,style:q(q({},a),{},{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,l=e.parent,i=e.rowData,a=e.rowIndex,s=this.props.onColumnClick,c=t.props,u=c.cellDataGetter,d=c.cellRenderer,f=c.className,h=c.columnData,g=c.dataKey,v=c.id,_=d({cellData:u({columnData:h,dataKey:g,rowData:i}),columnData:h,columnIndex:n,dataKey:g,isScrolling:r,parent:l,rowData:i,rowIndex:a}),S=this._cachedColumnStyles[n],m=typeof _=="string"?_:null;return x.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:V.clsx("ReactVirtualized__Table__rowColumn",f),key:"Row"+a+"-Col"+n,onClick:function(y){s&&s({columnData:h,dataKey:g,event:y})},role:"gridcell",style:S,title:m},_)}},{key:"_createHeader",value:function(e){var t,n,r,l,i,a=e.column,s=e.index,c=this.props,u=c.headerClassName,d=c.headerStyle,f=c.onHeaderClick,h=c.sort,g=c.sortBy,v=c.sortDirection,_=a.props,S=_.columnData,m=_.dataKey,y=_.defaultSortDirection,w=_.disableSort,C=_.headerRenderer,R=_.id,z=_.label,b=!w&&h,I=V.clsx("ReactVirtualized__Table__headerColumn",u,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:b}),O=this._getFlexStyleForColumn(a,q(q({},d),a.props.headerStyle)),T=C({columnData:S,dataKey:m,disableSort:w,label:z,sortBy:g,sortDirection:v});if(b||f){var G=g!==m?y:v===ze?ue:ze,M=function(H){b&&h({defaultSortDirection:y,event:H,sortBy:m,sortDirection:G}),f&&f({columnData:S,dataKey:m,event:H})};i=a.props["aria-label"]||z||m,l="none",r=0,t=M,n=function(H){H.key!=="Enter"&&H.key!==" "||M(H)}}return g===m&&(l=v===ue?"ascending":"descending"),x.createElement("div",{"aria-label":i,"aria-sort":l,className:I,id:R,key:"Header-Col"+s,onClick:t,onKeyDown:n,role:"columnheader",style:O,tabIndex:r},T)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,l=e.key,i=e.parent,a=e.style,s=this.props,c=s.children,u=s.onRowClick,d=s.onRowDoubleClick,f=s.onRowRightClick,h=s.onRowMouseOver,g=s.onRowMouseOut,v=s.rowClassName,_=s.rowGetter,S=s.rowRenderer,m=s.rowStyle,y=this.state.scrollbarWidth,w=typeof v=="function"?v({index:n}):v,C=typeof m=="function"?m({index:n}):m,R=_({index:n}),z=x.Children.toArray(c).map(function(O,T){return t._createColumn({column:O,columnIndex:T,isScrolling:r,parent:i,rowData:R,rowIndex:n,scrollbarWidth:y})}),b=V.clsx("ReactVirtualized__Table__row",w),I=q(q({},a),{},{height:this._getRowHeight(n),overflow:"hidden",paddingRight:y},C);return S({className:b,columns:z,index:n,isScrolling:r,key:l,onRowClick:u,onRowDoubleClick:d,onRowRightClick:f,onRowMouseOver:h,onRowMouseOut:g,rowData:R,style:I})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=q(q({},t),{},{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:x.Children.toArray(n)).map(function(r,l){return e._createHeader({column:r,index:l})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return typeof t=="function"?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,l=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:l})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setGridElementRef",value:function(e){this.GridElement=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}])}();p(Ie,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:zt,overscanRowCount:10,rowRenderer:function(o){var e=o.className,t=o.columns,n=o.index,r=o.key,l=o.onRowClick,i=o.onRowDoubleClick,a=o.onRowMouseOut,s=o.onRowMouseOver,c=o.onRowRightClick,u=o.rowData,d=o.style,f={"aria-rowindex":n+1};return(l||i||a||s||c)&&(f["aria-label"]="row",f.tabIndex=0,l&&(f.onClick=function(h){return l({event:h,index:n,rowData:u})}),i&&(f.onDoubleClick=function(h){return i({event:h,index:n,rowData:u})}),a&&(f.onMouseOut=function(h){return a({event:h,index:n,rowData:u})}),s&&(f.onMouseOver=function(h){return s({event:h,index:n,rowData:u})}),c&&(f.onContextMenu=function(h){return c({event:h,index:n,rowData:u})})),x.createElement("div",k._extends({},f,{className:e,key:r,role:"row",style:d}),t)},headerRowRenderer:function(o){var e=o.className,t=o.columns,n=o.style;return x.createElement("div",{className:e,role:"row",style:n},t)},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),Ie.propTypes={};var Z=[],ae=null,J=null;function Dt(){J&&(J=null,document.body&&ae!=null&&(document.body.style.pointerEvents=ae),ae=null)}function So(){Dt(),Z.forEach(function(o){return o.__resetIsScrolling()})}function jt(o){o.currentTarget===window&&ae==null&&document.body&&(ae=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){J&&oe(J);var e=0;Z.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),J=ke(So,e)}(),Z.forEach(function(e){e.props.scrollElement===o.currentTarget&&e.__handleWindowScrollEvent()})}function st(o,e){Z.some(function(t){return t.props.scrollElement===e})||e.addEventListener("scroll",jt),Z.push(o)}function at(o,e){(Z=Z.filter(function(t){return t!==o})).length||(e.removeEventListener("scroll",jt),J&&(oe(J),Dt()))}var Le=function(o){return o===window},le=function(o){return o.getBoundingClientRect()};function ct(o,e){if(o){if(Le(o)){var t=window,n=t.innerHeight,r=t.innerWidth;return{height:typeof n=="number"?n:0,width:typeof r=="number"?r:0}}return le(o)}return{height:e.serverHeight,width:e.serverWidth}}function ut(o){return Le(o)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:o.scrollTop,left:o.scrollLeft}}function dt(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function ht(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dt(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):dt(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Ft(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ft=function(){return!!o})()}var Nt=function(){return typeof window<"u"?window:void 0},yo=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=P(n),p(e=D(t,Ft()?Reflect.construct(n,r||[],P(t).constructor):n.apply(t,r)),"_window",Nt()),p(e,"_isMounted",!1),p(e,"_positionFromTop",0),p(e,"_positionFromLeft",0),p(e,"_detectElementResize",void 0),p(e,"_child",void 0),p(e,"_windowScrollerRef",x.createRef()),p(e,"state",ht(ht({},ct(e.props.scrollElement,e.props)),{},{isScrolling:!1,scrollLeft:0,scrollTop:0})),p(e,"_registerChild",function(s){!s||s instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),e._child=s,e.updatePosition()}),p(e,"_onChildScroll",function(s){var c=s.scrollTop;if(e.state.scrollTop!==c){var u=e.props.scrollElement;u&&(typeof u.scrollTo=="function"?u.scrollTo(0,c+e._positionFromTop):u.scrollTop=c+e._positionFromTop)}}),p(e,"_registerResizeListener",function(s){s===window?window.addEventListener("resize",e._onResize,!1):e._detectElementResize.addResizeListener(s,e._onResize)}),p(e,"_unregisterResizeListener",function(s){s===window?window.removeEventListener("resize",e._onResize,!1):s&&e._detectElementResize.removeResizeListener(s,e._onResize)}),p(e,"_onResize",function(){e.updatePosition()}),p(e,"__handleWindowScrollEvent",function(){if(e._isMounted){var s=e.props.onScroll,c=e.props.scrollElement;if(c){var u=ut(c),d=Math.max(0,u.left-e._positionFromLeft),f=Math.max(0,u.top-e._positionFromTop);e.setState({isScrolling:!0,scrollLeft:d,scrollTop:f}),s({scrollLeft:d,scrollTop:f})}}}),p(e,"__resetIsScrolling",function(){e.setState({isScrolling:!1})}),e}return j(o,x.PureComponent),W(o,[{key:"updatePosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,l=n.width,i=this._child||this._windowScrollerRef.current;if(i instanceof Element&&e){var a=function(c,u){if(Le(u)&&document.documentElement){var d=document.documentElement,f=le(c),h=le(d);return{top:f.top-h.top,left:f.left-h.left}}var g=ut(u),v=le(c),_=le(u);return{top:v.top+g.top-_.top,left:v.left+g.left-_.left}}(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var s=ct(e,this.props);r===s.height&&l===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width})),this.props.updateScrollTopOnUpdatePosition===!0&&(this.__handleWindowScrollEvent(),this.__resetIsScrolling())}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=St(),this.updatePosition(e),e&&(st(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&r!=null&&n!=null&&(this.updatePosition(n),at(this,r),st(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(at(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,l=t.scrollLeft,i=t.height,a=t.width;return x.createElement("div",{ref:this._windowScrollerRef},e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:l,scrollTop:r,width:a}))}}])}();p(yo,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Nt(),serverHeight:0,serverWidth:0});const se="ReactVirtualizedDemo-flexContainer",Bt="ReactVirtualizedDemo-tableRow",Ut="ReactVirtualizedDemo-tableRowHover",Pe="ReactVirtualizedDemo-tableCell",Oe="ReactVirtualizedDemo-noClick";class wo extends U.PureComponent{constructor(){super(...arguments),this.getRowClassName=({index:e})=>{const{onRowClick:t}=this.props;return k.clsx(Bt,se,{[Ut]:e!==-1&&t!=null})},this.cellRenderer=({cellData:e,dataKey:t,columnIndex:n,width:r})=>{const{columns:l,rowHeight:i,onRowClick:a}=this.props;let s=e,c={height:i,paddingRight:"2px",paddingTop:"0px",paddingBottom:"0px",minWidth:`${r}px`,maxWidth:`${r}px`};return t==="shortcut"?s=k.$7(e):t==="description"&&(c={...c,fontSize:".75rem",display:"block",paddingTop:"4px",whiteSpace:"pre-line"}),A.jsx(N.TableCell,{component:"div",className:k.clsx(Pe,se,{[Oe]:a==null}),variant:"body",style:c,align:n!=null&&l[n].numeric?"right":"left",children:s})},this.headerRenderer=({label:e,columnIndex:t,width:n})=>{const{headerHeight:r,columns:l}=this.props,i=l[t];return A.jsx(N.TableCell,{component:"div",className:k.clsx(Pe,se,Oe),variant:"head",sx:{width:n,height:r,backgroundColor:a=>a.palette.grey[300]},align:i.numeric?"right":"left",children:A.jsx("span",{children:i.label})})}}static{this.defaultProps={headerHeight:40,rowHeight:48}}render(){const{columns:e,rowHeight:t,headerHeight:n,...r}=this.props;return A.jsx(wt,{children:({height:l,width:i})=>A.jsx(Ie,{height:l,width:i,rowHeight:t,gridStyle:{direction:"inherit"},headerHeight:n,...r,rowClassName:this.getRowClassName,children:e.map(({dataKey:a,width:s,widthLess:c,...u},d)=>{const f=c?i-c:s;return A.jsx(ve,{style:{flex:`1 1 ${f}px`},headerRenderer:h=>this.headerRenderer({...h,width:f,columnIndex:d}),className:se,cellDataGetter:({rowData:h,columnData:g,dataKey:v})=>h[v],cellRenderer:h=>this.cellRenderer({...h,width:f,columnIndex:d}),dataKey:a,width:f,...u},a)})})})}}const Co=Yt(wo)(({theme:o})=>({"& .ReactVirtualized__Table__headerRow":{...o.direction==="rtl"&&{paddingLeft:"0 !important"},...o.direction!=="rtl"&&{paddingRight:void 0}},"& .ReactVirtualized__Table__Grid":{outline:"none"},[`& .${se}`]:{display:"flex",alignItems:"center",boxSizing:"border-box"},[`& .${Bt}`]:{cursor:"pointer"},[`& .${Ut}`]:{"&:hover:not([disabled])":{backgroundColor:o.palette.grey[200]}},[`& .${Pe}`]:{flex:1},[`& .${Oe}`]:{cursor:"initial"}}));function xo(o){const{commands:e,...t}=o,[n,r]=U.useState(!1),[l,i]=U.useState(""),a=U.useMemo(()=>{let h=e.getAllCommands();n||(h=h.filter(_=>_.command.shortcut())),h.sort((_,S)=>_.command.label().localeCompare(S.command.label()));const g=[],v=_=>_.replace(/\n\n/g,`
|
|
18
|
-
`);for(let _=0;_<h.length;_++){const S=h[_].command,m=S.shortcut();if(Array.isArray(m)){const y=m;for(let w=0;w<y.length;w++)g.push({label:S.label(),description:v(S.description()),shortcut:y[w]})}else g.push({label:S.label(),description:v(S.description()),shortcut:S.shortcut()})}return g},[n,e]),[s,c]=U.useState(null);U.useEffect(()=>{Promise.resolve().then(()=>require("./jbTHHxJODyD10jVH.cjs")).then(h=>{c(new h.default(a,{threshold:0,ignoreLocation:!0,keys:["label","description"]}))})},[a]);const[u,d]=U.useState(a),f=l.length>0&&u.length===0;return U.useEffect(()=>{s&&k.Yt.debounce(()=>{if(l.trim().length===0)return void d(a);const h=s.search(l.trim()),g=new Array(h.length);for(let v=0;v<h.length;v++)g[v]=h[v].item;d(g)},90)()},[s,l]),A.jsxs(N.Box,{style:{height:440,width:"100%",display:"flex",flexDirection:"column"},...t,children:[A.jsxs(N.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",marginBottom:h=>h.spacing(2),color:h=>h.palette.text.secondary},children:[A.jsx(N.TextField,{InputProps:{sx:{backgroundImage:`linear-gradient(${he.alpha("#fff",k.getOverlayAlpha(5))}, ${he.alpha("#fff",k.getOverlayAlpha(5))})`},inputProps:{className:"input",autoFocus:!0,spellCheck:!1,placeholder:"Type to search key bindings",autoComplete:"off",sx:{paddingTop:h=>h.spacing(1),paddingBottom:h=>h.spacing(1)}},endAdornment:A.jsx(N.InputAdornment,{sx:{opacity:l.length>0?1:0,display:l.length>0?"flex":"none"},position:"end",children:A.jsx(N.IconButton,{"aria-label":"clear search",onClick:()=>i(""),edge:"end",children:A.jsx(Vt.Close,{})})})},sx:{flex:"1 1 40%",marginRight:h=>h.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:h=>f?`${h.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:h=>f?`${h.palette.error.main} !important`:void 0}},value:l,onChange:h=>{i(h.target.value)},onKeyDown:h=>{h.which===k.eo.Escape&&l.length>0&&(i(""),h.stopPropagation(),h.preventDefault())},onContextMenu:h=>{h.stopPropagation()}}),A.jsx(N.FormControlLabel,{sx:{flex:"1 1 60%"},control:A.jsx(N.Checkbox,{checked:n,onChange:()=>r(!n)}),label:"Show commands without key bindings",labelPlacement:"start"})]}),A.jsx(N.Box,{sx:{flex:"1 1 100%",borderRadius:h=>`${h.shape.borderRadius}px`,border:h=>`solid ${h.palette.divider} 1px`,paddingRight:"1px",overflow:"hidden","* .MuiTableCell-head":{background:h=>h.palette.background.paper,backgroundImage:`linear-gradient(${he.alpha("#fff",k.getOverlayAlpha(5))}, ${he.alpha("#fff",k.getOverlayAlpha(5))})`}},children:A.jsx(Co,{rowCount:u.length,rowGetter:h=>u[h.index],columns:[{width:180,label:"Command",dataKey:"label"},{width:260,label:"Key Binding",dataKey:"shortcut"},{width:240,label:"Description",dataKey:"description",widthLess:440}]})}),A.jsx(N.Box,{sx:{display:"flex",flexShrink:"0",paddingLeft:h=>h.spacing(1),paddingTop:h=>h.spacing(1),paddingRight:h=>h.spacing(1),userSelect:"none",justifyContent:"flex-end"},children:A.jsx(N.Typography,{noWrap:!0,component:"div",sx:{color:h=>f?h.palette.error.main:h.palette.text.secondary},children:`${u.length===0?"No":u.length} shortcut key${u.length===1?"":"s"}${l.length>0?" found":""}`})})]})}exports.default=o=>{const{title:e="Shortcut Keys",commands:t,sx:n,...r}=o;return A.jsx(k.jn,{isModal:!0,onKeyDown:l=>{l.keyCode===k.eo.F1&&l.preventDefault()},sx:{width:"780px",...n},title:e,autoFocusSel:".input",...r,children:A.jsx(N.DialogContent,{dividers:!0,children:A.jsx(xo,{commands:t,sx:{marginBottom:"8px"}})})})};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ce,ue,ne={},ee={},U={},oe={},H={};function Ne(){if(ue)return H;ue=1;var g=H&&H.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=H&&H.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(H,"__esModule",{value:!0}),H.JsDelivrSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return H.JsDelivrSourceResolver=j,H}var le,pe,he,N={},V={};function se(){if(pe)return le;function g(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function x(e,t){for(var o,n="",r=0,s=-1,l=0,f=0;f<=e.length;++f){if(f<e.length)o=e.charCodeAt(f);else{if(o===47)break;o=47}if(o===47){if(s!==f-1&&l!==1)if(s!==f-1&&l===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var D=n.lastIndexOf("/");if(D!==n.length-1){D===-1?(n="",r=0):r=(n=n.slice(0,D)).length-1-n.lastIndexOf("/"),s=f,l=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=f,l=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(s+1,f):n=e.slice(s+1,f),r=f-s-1;s=f,l=0}else o===46&&l!==-1?++l:l=-1}return n}pe=1;var j={resolve:function(){for(var e,t="",o=!1,n=arguments.length-1;n>=-1&&!o;n--){var r;n>=0?r=arguments[n]:(e===void 0&&(e=process.cwd()),r=e),g(r),r.length!==0&&(t=r+"/"+t,o=r.charCodeAt(0)===47)}return t=x(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(g(e),e.length===0)return".";var t=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return(e=x(e,!t)).length!==0||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return g(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var o=arguments[t];g(o),o.length>0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":j.normalize(e)},relative:function(e,t){if(g(e),g(t),e===t||(e=j.resolve(e))===(t=j.resolve(t)))return"";for(var o=1;o<e.length&&e.charCodeAt(o)===47;++o);for(var n=e.length,r=n-o,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var l=t.length-s,f=r<l?r:l,D=-1,O=0;O<=f;++O){if(O===f){if(l>f){if(t.charCodeAt(s+O)===47)return t.slice(s+O+1);if(O===0)return t.slice(s+O)}else r>f&&(e.charCodeAt(o+O)===47?D=O:O===0&&(D=0));break}var c=e.charCodeAt(o+O);if(c!==t.charCodeAt(s+O))break;c===47&&(D=O)}var i="";for(O=o+D+1;O<=n;++O)O!==n&&e.charCodeAt(O)!==47||(i.length===0?i+="..":i+="/..");return i.length>0?i+t.slice(s+D):(s+=D,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(g(e),e.length===0)return".";for(var t=e.charCodeAt(0),o=t===47,n=-1,r=!0,s=e.length-1;s>=1;--s)if((t=e.charCodeAt(s))===47){if(!r){n=s;break}}else r=!1;return n===-1?o?"/":".":o&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');g(e);var o,n=0,r=-1,s=!0;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var l=t.length-1,f=-1;for(o=e.length-1;o>=0;--o){var D=e.charCodeAt(o);if(D===47){if(!s){n=o+1;break}}else f===-1&&(s=!1,f=o+1),l>=0&&(D===t.charCodeAt(l)?--l===-1&&(r=o):(l=-1,r=f))}return n===r?r=f:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!s){n=o+1;break}}else r===-1&&(s=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname:function(e){g(e);for(var t=-1,o=0,n=-1,r=!0,s=0,l=e.length-1;l>=0;--l){var f=e.charCodeAt(l);if(f!==47)n===-1&&(r=!1,n=l+1),f===46?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1);else if(!r){o=l+1;break}}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===o+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return o=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),o?o===t.root?o+n:o+"/"+n:n;var t,o,n},parse:function(e){g(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var o,n=e.charCodeAt(0),r=n===47;r?(t.root="/",o=1):o=0;for(var s=-1,l=0,f=-1,D=!0,O=e.length-1,c=0;O>=o;--O)if((n=e.charCodeAt(O))!==47)f===-1&&(D=!1,f=O+1),n===46?s===-1?s=O:c!==1&&(c=1):s!==-1&&(c=-1);else if(!D){l=O+1;break}return s===-1||f===-1||c===0||c===1&&s===f-1&&s===l+1?f!==-1&&(t.base=t.name=l===0&&r?e.slice(1,f):e.slice(l,f)):(l===0&&r?(t.name=e.slice(1,s),t.base=e.slice(1,f)):(t.name=e.slice(l,s),t.base=e.slice(l,f)),t.ext=e.slice(s,f)),l>0?t.dir=e.slice(0,l-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};return j.posix=j,le=j}var fe,te={};function Ie(){if(fe)return te;fe=1;var g=te&&te.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(te,"__esModule",{value:!0}),te.importResourcePathToString=void 0;var x=g(se());return te.importResourcePathToString=function(j){var e;switch(j.kind){case"package":return x.default.join(j.packageName,(e=j.importPath)!==null&&e!==void 0?e:"","package.json");case"relative":return x.default.join(j.sourcePath,j.importPath);case"relative-in-package":return x.default.join(j.packageName,j.sourcePath,j.importPath)}},te}var de,ie={};function ve(){return de||(de=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.invokeUpdate=void 0,ie.invokeUpdate=function(g,x){var j,e="".concat(g.type,": ");switch(g.type){case"CodeChanged":case"ResolveNewImports":e+="";break;case"LookedUpTypeFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up");break;case"AttemptedLookUpFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," attempted to looked up");break;case"LookedUpPackage":e+='package.json for package "'.concat(g.package,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up").concat(g.definitelyTyped?" (found in definitely typed repo)":"");break;case"LoadedFromCache":e+='"'.concat(g.importPath,'" was loaded from cache');break;case"StoredToCache":e+='"'.concat(g.importPath,'" was stored to cache')}e.endsWith(": ")&&(e=e.slice(void 0,-2)),(j=x.onUpdate)===null||j===void 0||j.call(x,g,e)}),ie}var ye,ge,me,be,ae={};function ke(){if(ye)return ae;ye=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.RecursionDepth=void 0;var g=function(){function x(j,e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.options=j,this.fileRecursionDepth=e,this.packageRecursionDepth=t}return x.prototype.nextPackage=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth+1)},x.prototype.nextFile=function(){return new x(this.options,this.fileRecursionDepth+1,this.packageRecursionDepth)},x.prototype.same=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth)},x.prototype.shouldStop=function(){return this.options.fileRecursionDepth>0&&this.fileRecursionDepth>=this.options.fileRecursionDepth||this.options.packageRecursionDepth>0&&this.packageRecursionDepth>=this.options.packageRecursionDepth},x}();return ae.RecursionDepth=g,ae}function Le(){if(me)return U;me=1;var g=U&&U.__assign||function(){return g=Object.assign||function(i){for(var b,k=1,A=arguments.length;k<A;k++)for(var y in b=arguments[k])Object.prototype.hasOwnProperty.call(b,y)&&(i[y]=b[y]);return i},g.apply(this,arguments)},x=U&&U.__createBinding||(Object.create?function(i,b,k,A){A===void 0&&(A=k);var y=Object.getOwnPropertyDescriptor(b,k);y&&!("get"in y?!b.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return b[k]}}),Object.defineProperty(i,A,y)}:function(i,b,k,A){A===void 0&&(A=k),i[A]=b[k]}),j=U&&U.__setModuleDefault||(Object.create?function(i,b){Object.defineProperty(i,"default",{enumerable:!0,value:b})}:function(i,b){i.default=b}),e=U&&U.__importStar||function(i){if(i&&i.__esModule)return i;var b={};if(i!=null)for(var k in i)k!=="default"&&Object.prototype.hasOwnProperty.call(i,k)&&x(b,i,k);return j(b,i),b},t=U&&U.__awaiter||function(i,b,k,A){return new(k||(k=Promise))(function(y,T){function E(X){try{Z(A.next(X))}catch(R){T(R)}}function Y(X){try{Z(A.throw(X))}catch(R){T(R)}}function Z(X){var R;X.done?y(X.value):(R=X.value,R instanceof k?R:new k(function(G){G(R)})).then(E,Y)}Z((A=A.apply(i,b||[])).next())})},o=U&&U.__generator||function(i,b){var k,A,y,T,E={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return T={next:Y(0),throw:Y(1),return:Y(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function Y(Z){return function(X){return function(R){if(k)throw new TypeError("Generator is already executing.");for(;E;)try{if(k=1,A&&(y=2&R[0]?A.return:R[0]?A.throw||((y=A.return)&&y.call(A),0):A.next)&&!(y=y.call(A,R[1])).done)return y;switch(A=0,y&&(R=[2&R[0],y.value]),R[0]){case 0:case 1:y=R;break;case 4:return E.label++,{value:R[1],done:!1};case 5:E.label++,A=R[1],R=[0];continue;case 7:R=E.ops.pop(),E.trys.pop();continue;default:if(!((y=(y=E.trys).length>0&&y[y.length-1])||R[0]!==6&&R[0]!==2)){E=0;continue}if(R[0]===3&&(!y||R[1]>y[0]&&R[1]<y[3])){E.label=R[1];break}if(R[0]===6&&E.label<y[1]){E.label=y[1],y=R;break}if(y&&E.label<y[2]){E.label=y[2],E.ops.push(R);break}y[2]&&E.ops.pop(),E.trys.pop();continue}R=b.call(i,E)}catch(G){R=[6,G],A=0}finally{k=y=0}if(5&R[0])throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}([Z,X])}}},n=U&&U.__values||function(i){var b=typeof Symbol=="function"&&Symbol.iterator,k=b&&i[b],A=0;if(k)return k.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&A>=i.length&&(i=void 0),{value:i&&i[A++],done:!i}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(U,"__esModule",{value:!0}),U.AutoTypingsCore=void 0;var r=function(){if(ce)return oe;ce=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.DummySourceCache=void 0;var i=function(){function b(){}return b.prototype.getFile=function(k){return Promise.resolve(void 0)},b.prototype.isFileAvailable=function(k){return Promise.resolve(!1)},b.prototype.storeFile=function(k,A){return Promise.resolve(void 0)},b.prototype.clear=function(){return Promise.resolve(void 0)},b}();return oe.DummySourceCache=i,oe}(),s=Ne(),l=function(){if(ge)return N;ge=1;var i=N&&N.__assign||function(){return i=Object.assign||function(_){for(var a,h=1,v=arguments.length;h<v;h++)for(var u in a=arguments[h])Object.prototype.hasOwnProperty.call(a,u)&&(_[u]=a[u]);return _},i.apply(this,arguments)},b=N&&N.__createBinding||(Object.create?function(_,a,h,v){v===void 0&&(v=h);var u=Object.getOwnPropertyDescriptor(a,h);u&&!("get"in u?!a.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return a[h]}}),Object.defineProperty(_,v,u)}:function(_,a,h,v){v===void 0&&(v=h),_[v]=a[h]}),k=N&&N.__setModuleDefault||(Object.create?function(_,a){Object.defineProperty(_,"default",{enumerable:!0,value:a})}:function(_,a){_.default=a}),A=N&&N.__importStar||function(_){if(_&&_.__esModule)return _;var a={};if(_!=null)for(var h in _)h!=="default"&&Object.prototype.hasOwnProperty.call(_,h)&&b(a,_,h);return k(a,_),a},y=N&&N.__awaiter||function(_,a,h,v){return new(h||(h=Promise))(function(u,S){function m(C){try{p(v.next(C))}catch(d){S(d)}}function w(C){try{p(v.throw(C))}catch(d){S(d)}}function p(C){var d;C.done?u(C.value):(d=C.value,d instanceof h?d:new h(function(P){P(d)})).then(m,w)}p((v=v.apply(_,a||[])).next())})},T=N&&N.__generator||function(_,a){var h,v,u,S,m={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return S={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function w(p){return function(C){return function(d){if(h)throw new TypeError("Generator is already executing.");for(;m;)try{if(h=1,v&&(u=2&d[0]?v.return:d[0]?v.throw||((u=v.return)&&u.call(v),0):v.next)&&!(u=u.call(v,d[1])).done)return u;switch(v=0,u&&(d=[2&d[0],u.value]),d[0]){case 0:case 1:u=d;break;case 4:return m.label++,{value:d[1],done:!1};case 5:m.label++,v=d[1],d=[0];continue;case 7:d=m.ops.pop(),m.trys.pop();continue;default:if(!((u=(u=m.trys).length>0&&u[u.length-1])||d[0]!==6&&d[0]!==2)){m=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]<u[3])){m.label=d[1];break}if(d[0]===6&&m.label<u[1]){m.label=u[1],u=d;break}if(u&&m.label<u[2]){m.label=u[2],m.ops.push(d);break}u[2]&&m.ops.pop(),m.trys.pop();continue}d=a.call(_,m)}catch(P){d=[6,P],v=0}finally{h=u=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([p,C])}}},E=N&&N.__values||function(_){var a=typeof Symbol=="function"&&Symbol.iterator,h=a&&_[a],v=0;if(h)return h.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Y=N&&N.__read||function(_,a){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var v,u,S=h.call(_),m=[];try{for(;(a===void 0||a-- >0)&&!(v=S.next()).done;)m.push(v.value)}catch(w){u={error:w}}finally{try{v&&!v.done&&(h=S.return)&&h.call(S)}finally{if(u)throw u.error}}return m};Object.defineProperty(N,"__esModule",{value:!0}),N.ImportResolver=void 0;var Z=function(){if(he)return V;he=1;var _=V&&V.__createBinding||(Object.create?function(w,p,C,d){d===void 0&&(d=C);var P=Object.getOwnPropertyDescriptor(p,C);P&&!("get"in P?!p.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return p[C]}}),Object.defineProperty(w,d,P)}:function(w,p,C,d){d===void 0&&(d=C),w[d]=p[C]}),a=V&&V.__setModuleDefault||(Object.create?function(w,p){Object.defineProperty(w,"default",{enumerable:!0,value:p})}:function(w,p){w.default=p}),h=V&&V.__importStar||function(w){if(w&&w.__esModule)return w;var p={};if(w!=null)for(var C in w)C!=="default"&&Object.prototype.hasOwnProperty.call(w,C)&&_(p,w,C);return a(p,w),p},v=V&&V.__read||function(w,p){var C=typeof Symbol=="function"&&w[Symbol.iterator];if(!C)return w;var d,P,I=C.call(w),L=[];try{for(;(p===void 0||p-- >0)&&!(d=I.next()).done;)L.push(d.value)}catch(M){P={error:M}}finally{try{d&&!d.done&&(C=I.return)&&C.call(I)}finally{if(P)throw P.error}}return L},u=V&&V.__spreadArray||function(w,p,C){if(C||arguments.length===2)for(var d,P=0,I=p.length;P<I;P++)!d&&P in p||(d||(d=Array.prototype.slice.call(p,0,P)),d[P]=p[P]);return w.concat(d||Array.prototype.slice.call(p))};Object.defineProperty(V,"__esModule",{value:!0}),V.DependencyParser=void 0;var S=h(se()),m=function(){function w(){this.REGEX_CLEAN=/[\n|\r]/g,this.REGEX_DETECT_IMPORT=/(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g,this.REGEX_NODE_MODULE=/^node:([\w\W\/]+)$/}return w.prototype.parseDependencies=function(p,C){var d=this;return u([],v(p.matchAll(this.REGEX_DETECT_IMPORT)),!1).map(function(P){var I,L;return(L=(I=P[1])!==null&&I!==void 0?I:P[2])!==null&&L!==void 0?L:P[3]}).filter(function(P){return!!P}).map(function(P){return d.resolvePath(P,C)})},w.prototype.resolvePath=function(p,C){var d=p.match(this.REGEX_NODE_MODULE);if(d)return{kind:"relative-in-package",packageName:"@types/node",importPath:"".concat(d[1],".d.ts"),sourcePath:""};if(typeof C=="string"){if(p.startsWith("."))return{kind:"relative",importPath:p,sourcePath:C};if(p.startsWith("@")){var P=p.split("/");return{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}}return{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}switch(C.kind){case"package":throw Error("TODO?");case"relative":throw Error("TODO2?");case"relative-in-package":return p.startsWith(".")?{kind:"relative-in-package",packageName:C.packageName,sourcePath:S.join(C.sourcePath,C.importPath),importPath:p}:p.startsWith("@")?(P=p.split("/"),{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}):{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}},w}();return V.DependencyParser=m,V}(),X=Ie(),R=A(se()),G=ve(),Me=ke(),Ue=function(){function _(a){var h,v;if(this.options=a,this.loadedFiles=[],this.dependencyParser=new Z.DependencyParser,this.cache=a.sourceCache,this.sourceResolver=a.sourceResolver,this.newImportsResolved=!1,this.monaco=a.monaco,a.preloadPackages&&a.versions){this.versions=a.versions;try{for(var u=E(Object.entries(a.versions)),S=u.next();!S.done;S=u.next()){var m=Y(S.value,2),w=m[0];m[1],this.resolveImport({kind:"package",packageName:w,importPath:""},new Me.RecursionDepth(this.options)).catch(function(p){console.error(p)})}}catch(p){h={error:p}}finally{try{S&&!S.done&&(v=u.return)&&v.call(u)}finally{if(h)throw h.error}}}}return _.prototype.wereNewImportsResolved=function(){return this.newImportsResolved},_.prototype.resetNewImportsResolved=function(){this.newImportsResolved=!1},_.prototype.resolveImportsInFile=function(a,h,v){var u,S,m;return y(this,void 0,void 0,function(){var w,p,C,d,P,I,L,M;return T(this,function(F){switch(F.label){case 0:if(v.shouldStop())return[2];w=this.dependencyParser.parseDependencies(a,h),F.label=1;case 1:F.trys.push([1,8,9,10]),p=E(w),C=p.next(),F.label=2;case 2:if(C.done)return[3,7];d=C.value,F.label=3;case 3:return F.trys.push([3,5,,6]),[4,this.resolveImport(d,v)];case 4:return F.sent(),[3,6];case 5:return P=F.sent(),this.options.onError?(S=(u=this.options).onError)===null||S===void 0||S.call(u,(m=P.message)!==null&&m!==void 0?m:P):console.error(P),[3,6];case 6:return C=p.next(),[3,2];case 7:return[3,10];case 8:return I=F.sent(),L={error:I},[3,10];case 9:try{C&&!C.done&&(M=p.return)&&M.call(p)}finally{if(L)throw L.error}return[7];case 10:return[2]}})})},_.prototype.resolveImport=function(a,h){return y(this,void 0,void 0,function(){var v,u;return T(this,function(S){switch(S.label){case 0:if(v=this.hashImportResourcePath(a),this.loadedFiles.includes(v))return[2];switch(this.loadedFiles.push(v),a.kind){case"package":return[3,1];case"relative":return[3,5];case"relative-in-package":return[3,6]}return[3,8];case 1:return[4,this.resolveImportFromPackageRoot(a)];case 2:return(u=S.sent())?[4,this.resolveImportInPackage(u,h.nextPackage().nextFile())]:[3,4];case 3:case 7:return[2,S.sent()];case 4:return[3,8];case 5:throw Error("Not implemented yet");case 6:return[4,this.resolveImportInPackage(a,h.nextFile())];case 8:return[2]}})})},_.prototype.resolveImportInPackage=function(a,h){return y(this,void 0,void 0,function(){var v,u,S;return T(this,function(m){switch(m.label){case 0:return[4,this.loadSourceFileContents(a)];case 1:return(v=m.sent())?(u=v.source,S=v.at,this.createModel(u,this.monaco.Uri.parse(this.options.fileRootPath+R.join("node_modules/".concat(a.packageName),S))),[4,this.resolveImportsInFile(u,{kind:"relative-in-package",packageName:a.packageName,sourcePath:R.dirname(S),importPath:""},h)]):[3,3];case 2:m.sent(),m.label=3;case 3:return[2]}})})},_.prototype.resolveImportFromPackageRoot=function(a){var h,v,u,S,m,w,p,C,d;return y(this,void 0,void 0,function(){var P,I,L,M,F,B,re,J,W;return T(this,function($){switch($.label){case 0:return P={type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!1},!this.options.onlySpecifiedPackages||(h=this.versions)!==null&&h!==void 0&&h[a.packageName]||(v=this.versions)!==null&&v!==void 0&&v["@types/"+a.packageName]?(I=(S=(u=a.importPath)===null||u===void 0?void 0:u.length)!==null&&S!==void 0&&S,L=I?"/".concat(a.importPath):"",[4,this.resolvePackageJson(a.packageName,(m=this.versions)===null||m===void 0?void 0:m[a.packageName],I?a.importPath:void 0)]):((0,G.invokeUpdate)(P,this.options),[2]);case 1:return(M=$.sent())||!I?[3,3]:[4,this.resolvePackageJson(a.packageName,(w=this.versions)===null||w===void 0?void 0:w[a.packageName])];case 2:M=$.sent(),L="",$.label=3;case 3:return M?(F=JSON.parse(M)).typings||F.types?(W=F.typings||F.types,this.createModel(M,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(a.packageName).concat(L,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!0},this.options),this.setVersion(a.packageName,F.version),[2,{kind:"relative-in-package",packageName:a.packageName,sourcePath:"",importPath:R.join((p=a.importPath)!==null&&p!==void 0?p:"",W.startsWith("./")?W.slice(2):W)}]):[3,4]:[3,7];case 4:return B="@types/".concat(a.packageName.startsWith("@")?a.packageName.slice(1).replace(/\//,"__"):a.packageName),[4,this.resolvePackageJson(B,(C=this.versions)===null||C===void 0?void 0:C[B])];case 5:if(re=$.sent()){if((J=JSON.parse(re)).typings||J.types)return W=J.typings||J.types,this.createModel(re,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(B,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:B,definitelyTyped:!0,success:!0},this.options),this.setVersion(B,J.version),[2,{kind:"relative-in-package",packageName:B,sourcePath:"",importPath:R.join((d=a.importPath)!==null&&d!==void 0?d:"",W.startsWith("./")?W.slice(2):W)}];(0,G.invokeUpdate)(P,this.options)}else(0,G.invokeUpdate)(P,this.options);$.label=6;case 6:return[3,8];case 7:(0,G.invokeUpdate)(P,this.options),$.label=8;case 8:return[2]}})})},_.prototype.loadSourceFileContents=function(a){return y(this,void 0,void 0,function(){var h,v,u,S,m,w,p,C,d,P,I,L,M,F,B,re;return T(this,function(J){switch(J.label){case 0:return h=R.join(a.packageName,a.sourcePath,a.importPath),v={type:"LookedUpTypeFile",path:h,definitelyTyped:!1,success:!1},u=a.packageName,S=this.getVersion(a.packageName),(m=[".d.ts","/index.d.ts",".ts",".tsx","/index.ts","/index.tsx"]).map(function(W){return a.importPath.endsWith(W)}).reduce(function(W,$){return W||$},!1)?[4,this.resolveSourceFile(u,S,R.join(a.sourcePath,a.importPath))]:[3,2];case 1:return(F=J.sent())?[2,{source:F,at:R.join(a.sourcePath,a.importPath)}]:[3,9];case 2:J.trys.push([2,7,8,9]),w=E(m),p=w.next(),J.label=3;case 3:return p.done?[3,6]:(C=p.value,d=R.join(a.sourcePath,a.importPath),M=(C===".d.ts"&&d.endsWith(".js")?d.slice(0,-3):d)+C,[4,this.resolveSourceFile(u,S,M)]);case 4:if(F=J.sent(),(0,G.invokeUpdate)({type:"AttemptedLookUpFile",path:R.join(u,M),success:!!F},this.options),F)return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=5;case 5:return p=w.next(),[3,3];case 6:return[3,9];case 7:return P=J.sent(),B={error:P},[3,9];case 8:try{p&&!p.done&&(re=w.return)&&re.call(w)}finally{if(B)throw B.error}return[7];case 9:return[4,this.resolvePackageJson(u,S,R.join(a.sourcePath,a.importPath))];case 10:return(I=J.sent())&&(L=JSON.parse(I).types)?(M=R.join(a.sourcePath,a.importPath,L),[4,this.resolveSourceFile(u,S,M)]):[3,12];case 11:if(F=J.sent())return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=12;case 12:return(0,G.invokeUpdate)(v,this.options),[2,null]}})})},_.prototype.getVersion=function(a){var h;return(h=this.versions)===null||h===void 0?void 0:h[a]},_.prototype.setVersions=function(a){var h,v;this.versions=a,(v=(h=this.options).onUpdateVersions)===null||v===void 0||v.call(h,a)},_.prototype.setVersion=function(a,h){var v;this.setVersions(i(i({},this.versions),((v={})[a]=h,v)))},_.prototype.createModel=function(a,h){h=h.with({path:h.path.replace("@types/","")}),this.monaco.editor.getModel(h)||(this.monaco.editor.createModel(a,"typescript",h),this.newImportsResolved=!0)},_.prototype.hashImportResourcePath=function(a){return(0,X.importResourcePathToString)(a)},_.prototype.resolvePackageJson=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v??"","package.json"),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?m==null?[3,5]:(w=m,[3,7]):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolvePackageJson(a,h,v)];case 9:return(m=p.sent())&&this.cache.storeFile(u,m),[2,m]}})})},_.prototype.resolveSourceFile=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?((0,G.invokeUpdate)({type:"LoadedFromCache",importPath:u},this.options),m==null?[3,5]:(w=m,[3,7])):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolveSourceFile(a,h,v)];case 9:return(m=p.sent())&&((0,G.invokeUpdate)({type:"StoredToCache",importPath:u},this.options),this.cache.storeFile(u,m)),[2,m]}})})},_}();return N.ImportResolver=Ue,N}(),f=e(se()),D=ve(),O=ke(),c=function(){function i(b,k){var A=this;this.editor=b,this.options=k,this.disposables=[],this.importResolver=new l.ImportResolver(k);var y=b.onDidChangeModelContent(function(T){A.debouncedResolveContents()});this.disposables.push(y),this.resolveContents(),k.dontAdaptEditorOptions||k.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(g(g({},k.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()),{moduleResolution:k.monaco.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,rootDir:k.fileRootPath}))}return i.create=function(b,k){var A,y;return t(this,void 0,void 0,function(){var T;return o(this,function(E){if(k?.shareCache&&k.sourceCache&&!i.sharedCache&&(i.sharedCache=k.sourceCache),!(T=k?.monaco))throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");return[2,new i(b,g(g({fileRootPath:"inmemory://model/",onlySpecifiedPackages:!1,preloadPackages:!1,shareCache:!1,dontAdaptEditorOptions:!1,dontRefreshModelValueAfterResolvement:!1,sourceCache:(A=i.sharedCache)!==null&&A!==void 0?A:new r.DummySourceCache,sourceResolver:(y=k?.sourceResolver)!==null&&y!==void 0?y:new s.JsDelivrSourceResolver,debounceDuration:4e3,fileRecursionDepth:10,packageRecursionDepth:3},k),{monaco:T}))]})})},i.prototype.dispose=function(){var b,k;try{for(var A=n(this.disposables),y=A.next();!y.done;y=A.next())y.value.dispose()}catch(T){b={error:T}}finally{try{y&&!y.done&&(k=A.return)&&k.call(A)}finally{if(b)throw b.error}}},i.prototype.setVersions=function(b){this.importResolver.setVersions(b),this.options.versions=b},i.prototype.clearCache=function(){return t(this,void 0,void 0,function(){return o(this,function(b){switch(b.label){case 0:return[4,this.options.sourceCache.clear()];case 1:return b.sent(),[2]}})})},i.prototype.debouncedResolveContents=function(){var b=this;this.isResolving||((0,D.invokeUpdate)({type:"CodeChanged"},this.options),this.options.debounceDuration<=0?this.resolveContents():(this.debounceTimer!==void 0&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t(b,void 0,void 0,function(){return o(this,function(k){switch(k.label){case 0:return[4,this.resolveContents()];case 1:return k.sent(),this.debounceTimer=void 0,[2]}})})},this.options.debounceDuration)))},i.prototype.resolveContents=function(){var b;return t(this,void 0,void 0,function(){var k,A,y,T;return o(this,function(E){switch(E.label){case 0:if(this.isResolving=!0,(0,D.invokeUpdate)({type:"ResolveNewImports"},this.options),!(k=this.editor.getModel()))throw Error("No model");A=k.getLinesContent(),E.label=1;case 1:return E.trys.push([1,3,,4]),[4,this.importResolver.resolveImportsInFile(A.join(`
|
|
7
|
-
`),f.dirname(k.uri.toString()),new O.RecursionDepth(this.options))];case 2:return E.sent(),[3,4];case 3:if(y=E.sent(),!this.options.onError)throw y;return this.options.onError((b=y.message)!==null&&b!==void 0?b:y),[3,4];case 4:return this.importResolver.wereNewImportsResolved()&&(this.options.dontRefreshModelValueAfterResolvement||(T=this.editor.getPosition(),k.setValue(k.getValue()),T&&this.editor.setPosition(T)),this.importResolver.resetNewImportsResolved()),this.isResolving=!1,[2]}})})},i}();return U.AutoTypingsCore=c,U}var we,z={},_e,Pe,Oe,je,Re,Ce,Se,xe,Ae={},De={},Ee={},Te={},Q={};const Ge=function(g,x){for(var j=0;j<x.length;j++){const e=x[j];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in g)){const o=Object.getOwnPropertyDescriptor(e,t);o&&Object.defineProperty(g,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[xe?Se:(xe=1,Ce||(Ce=1,q=ne,Fe=ne&&ne.__createBinding||(Object.create?function(g,x,j,e){e===void 0&&(e=j);var t=Object.getOwnPropertyDescriptor(x,j);t&&!("get"in t?!x.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return x[j]}}),Object.defineProperty(g,e,t)}:function(g,x,j,e){e===void 0&&(e=j),g[e]=x[j]}),K=ne&&ne.__exportStar||function(g,x){for(var j in g)j==="default"||Object.prototype.hasOwnProperty.call(x,j)||Fe(x,g,j)},Object.defineProperty(q,"__esModule",{value:!0}),K(function(){if(be)return ee;be=1;var g,x=ee&&ee.__extends||(g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])})(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}g(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.AutoTypings=void 0;var j=function(e){function t(o,n){return e.call(this,o,n)||this}return x(t,e),t}(Le().AutoTypingsCore);return ee.AutoTypings=j,ee}(),q),K(Ie(),q),K(function(){if(we)return z;we=1;var g=z&&z.__awaiter||function(t,o,n,r){return new(n||(n=Promise))(function(s,l){function f(c){try{O(r.next(c))}catch(i){l(i)}}function D(c){try{O(r.throw(c))}catch(i){l(i)}}function O(c){var i;c.done?s(c.value):(i=c.value,i instanceof n?i:new n(function(b){b(i)})).then(f,D)}O((r=r.apply(t,o||[])).next())})},x=z&&z.__generator||function(t,o){var n,r,s,l,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function D(O){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return f.label++,{value:i[1],done:!1};case 5:f.label++,r=i[1],i=[0];continue;case 7:i=f.ops.pop(),f.trys.pop();continue;default:if(!((s=(s=f.trys).length>0&&s[s.length-1])||i[0]!==6&&i[0]!==2)){f=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){f.label=i[1];break}if(i[0]===6&&f.label<s[1]){f.label=s[1],s=i;break}if(s&&f.label<s[2]){f.label=s[2],f.ops.push(i);break}s[2]&&f.ops.pop(),f.trys.pop();continue}i=o.call(t,f)}catch(b){i=[6,b],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([O,c])}}},j=z&&z.__values||function(t){var o=typeof Symbol=="function"&&Symbol.iterator,n=o&&t[o],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(z,"__esModule",{value:!0}),z.LocalStorageCache=void 0;var e=function(){function t(){this.localCache={}}return t.prototype.getFile=function(o){var n;return g(this,void 0,void 0,function(){return x(this,function(r){try{return[2,(n=localStorage.getItem(t.LOCALSTORAGE_PREFIX+o))!==null&&n!==void 0?n:void 0]}catch{return[2,this.localCache[o]]}return[2]})})},t.prototype.storeFile=function(o,n){return g(this,void 0,void 0,function(){return x(this,function(r){this.localCache[o]=n;try{localStorage.setItem(t.LOCALSTORAGE_PREFIX+o,n)}catch{}return[2]})})},t.prototype.clear=function(){return g(this,void 0,void 0,function(){var o,n,r,s,l,f,D;return x(this,function(O){for(this.localCache={},o=[],n=0;n<localStorage.length;n++)(l=localStorage.key(n))!=null&&l.startsWith(t.LOCALSTORAGE_PREFIX)&&o.push(l);try{for(r=j(o),s=r.next();!s.done;s=r.next())l=s.value,localStorage.removeItem(l)}catch(c){f={error:c}}finally{try{s&&!s.done&&(D=r.return)&&D.call(r)}finally{if(f)throw f.error}}return[2]})})},t.LOCALSTORAGE_PREFIX="__autotyper_cache_",t}();return z.LocalStorageCache=e,z}(),q),K((_e||(_e=1,Object.defineProperty(Ae,"__esModule",{value:!0})),Ae),q),K((Pe||(Pe=1,Object.defineProperty(De,"__esModule",{value:!0})),De),q),K((Oe||(Oe=1,Object.defineProperty(Ee,"__esModule",{value:!0})),Ee),q),K((je||(je=1,Object.defineProperty(Te,"__esModule",{value:!0})),Te),q),K(function(){if(Re)return Q;Re=1;var g=Q&&Q.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=Q&&Q.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.UnpkgSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return Q.UnpkgSourceResolver=j,Q}(),q),K(Ne(),q)),Se=ne)]);var q,Fe,K;exports.c=Ge;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/function I(t){return Array.isArray?Array.isArray(t):ne(t)==="[object Array]"}function v(t){return typeof t=="string"}function te(t){return typeof t=="number"}function ae(t){return t===!0||t===!1||function(e){return ie(e)&&e!==null}(t)&&ne(t)=="[object Boolean]"}function ie(t){return typeof t=="object"}function F(t){return t!=null}function K(t){return!t.trim().length}function ne(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=Object.prototype.hasOwnProperty;class le{constructor(e){this._keys=[],this._keyMap={};let i=0;e.forEach(n=>{let s=se(n);this._keys.push(s),this._keyMap[s.id]=s,i+=s.weight}),this._keys.forEach(n=>{n.weight/=i})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function se(t){let e=null,i=null,n=null,s=1,c=null;if(v(t)||I(t))n=t,e=H(t),i=q(t);else{if(!G.call(t,"name"))throw new Error((o=>`Missing ${o} property in key`)("name"));const u=t.name;if(n=u,G.call(t,"weight")&&(s=t.weight,s<=0))throw new Error((o=>`Property 'weight' in key '${o}' must be a positive integer`)(u));e=H(u),i=q(u),c=t.getFn}return{path:e,id:i,weight:s,src:n,getFn:c}}function H(t){return I(t)?t:t.split(".")}function q(t){return I(t)?t.join("."):t}var l={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let i=[],n=!1;const s=(c,u,o)=>{if(F(c))if(u[o]){const r=c[u[o]];if(!F(r))return;if(o===u.length-1&&(v(r)||te(r)||ae(r)))i.push(function(a){return a==null?"":function(h){if(typeof h=="string")return h;let g=h+"";return g=="0"&&1/h==-1/0?"-0":g}(a)}(r));else if(I(r)){n=!0;for(let a=0,h=r.length;a<h;a+=1)s(r[a],u,o+1)}else u.length&&s(r,u,o+1)}else i.push(c)};return s(t,v(e)?e.split("."):e,0),n?i:i[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const de=/[^ ]+/g;class T{constructor({getFn:e=l.getFn,fieldNormWeight:i=l.fieldNormWeight}={}){this.norm=function(n=1,s=3){const c=new Map,u=Math.pow(10,s);return{get(o){const r=o.match(de).length;if(c.has(r))return c.get(r);const a=1/Math.pow(r,.5*n),h=parseFloat(Math.round(a*u)/u);return c.set(r,h),h},clear(){c.clear()}}}(i,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((i,n)=>{this._keysMap[i.id]=n})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,v(this.docs[0])?this.docs.forEach((e,i)=>{this._addString(e,i)}):this.docs.forEach((e,i)=>{this._addObject(e,i)}),this.norm.clear())}add(e){const i=this.size();v(e)?this._addString(e,i):this._addObject(e,i)}removeAt(e){this.records.splice(e,1);for(let i=e,n=this.size();i<n;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(e,i){return e[this._keysMap[i]]}size(){return this.records.length}_addString(e,i){if(!F(e)||K(e))return;let n={v:e,i,n:this.norm.get(e)};this.records.push(n)}_addObject(e,i){let n={i,$:{}};this.keys.forEach((s,c)=>{let u=s.getFn?s.getFn(e):this.getFn(e,s.path);if(F(u)){if(I(u)){let o=[];const r=[{nestedArrIndex:-1,value:u}];for(;r.length;){const{nestedArrIndex:a,value:h}=r.pop();if(F(h))if(v(h)&&!K(h)){let g={v:h,i:a,n:this.norm.get(h)};o.push(g)}else I(h)&&h.forEach((g,d)=>{r.push({nestedArrIndex:d,value:g})})}n.$[c]=o}else if(v(u)&&!K(u)){let o={v:u,n:this.norm.get(u)};n.$[c]=o}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function re(t,e,{getFn:i=l.getFn,fieldNormWeight:n=l.fieldNormWeight}={}){const s=new T({getFn:i,fieldNormWeight:n});return s.setKeys(t.map(se)),s.setSources(e),s.create(),s}function W(t,{errors:e=0,currentLocation:i=0,expectedLocation:n=0,distance:s=l.distance,ignoreLocation:c=l.ignoreLocation}={}){const u=e/t.length;if(c)return u;const o=Math.abs(n-i);return s?u+o/s:o?1:u}const b=32;function ge(t,e,i,{location:n=l.location,distance:s=l.distance,threshold:c=l.threshold,findAllMatches:u=l.findAllMatches,minMatchCharLength:o=l.minMatchCharLength,includeMatches:r=l.includeMatches,ignoreLocation:a=l.ignoreLocation}={}){if(e.length>b)throw new Error(`Pattern length exceeds max of ${b}.`);const h=e.length,g=t.length,d=Math.max(0,Math.min(n,g));let f=c,A=d;const C=o>1||r,p=C?Array(g):[];let E;for(;(E=t.indexOf(e,A))>-1;){let D=W(e,{currentLocation:E,expectedLocation:d,distance:s,ignoreLocation:a});if(f=Math.min(D,f),A=E+h,C){let B=0;for(;B<h;)p[E+B]=1,B+=1}}A=-1;let y=[],k=1,M=h+g;const $=1<<h-1;for(let D=0;D<h;D+=1){let B=0,L=M;for(;B<L;)W(e,{errors:D,currentLocation:d+L,expectedLocation:d,distance:s,ignoreLocation:a})<=f?B=L:M=L,L=Math.floor((M-B)/2+B);M=L;let N=Math.max(1,d-L+1),x=u?g:Math.min(d+L,g)+h,_=Array(x+2);_[x+1]=(1<<D)-1;for(let m=x;m>=N;m-=1){let R=m-1,j=i[t.charAt(R)];if(C&&(p[R]=+!!j),_[m]=(_[m+1]<<1|1)&j,D&&(_[m]|=(y[m+1]|y[m])<<1|1|y[m+1]),_[m]&$&&(k=W(e,{errors:D,currentLocation:R,expectedLocation:d,distance:s,ignoreLocation:a}),k<=f)){if(f=k,A=R,A<=d)break;N=Math.max(1,2*d-A)}}if(W(e,{errors:D+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:a})>f)break;y=_}const S={isMatch:A>=0,score:Math.max(.001,k)};if(C){const D=function(B=[],L=l.minMatchCharLength){let N=[],x=-1,_=-1,m=0;for(let R=B.length;m<R;m+=1){let j=B[m];j&&x===-1?x=m:j||x===-1||(_=m-1,_-x+1>=L&&N.push([x,_]),x=-1)}return B[m-1]&&m-x>=L&&N.push([x,m-1]),N}(p,o);D.length?r&&(S.indices=D):S.isMatch=!1}return S}function fe(t){let e={};for(let i=0,n=t.length;i<n;i+=1){const s=t.charAt(i);e[s]=(e[s]||0)|1<<n-i-1}return e}const z=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class ue{constructor(e,{location:i=l.location,threshold:n=l.threshold,distance:s=l.distance,includeMatches:c=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:o=l.minMatchCharLength,isCaseSensitive:r=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:h=l.ignoreLocation}={}){if(this.options={location:i,threshold:n,distance:s,includeMatches:c,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:r,ignoreDiacritics:a,ignoreLocation:h},e=r?e:e.toLowerCase(),e=a?z(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const g=(f,A)=>{this.chunks.push({pattern:f,alphabet:fe(f),startIndex:A})},d=this.pattern.length;if(d>b){let f=0;const A=d%b,C=d-A;for(;f<C;)g(this.pattern.substr(f,b),f),f+=b;if(A){const p=d-b;g(this.pattern.substr(p),p)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:i,ignoreDiacritics:n,includeMatches:s}=this.options;if(e=i?e:e.toLowerCase(),e=n?z(e):e,this.pattern===e){let C={isMatch:!0,score:0};return s&&(C.indices=[[0,e.length-1]]),C}const{location:c,distance:u,threshold:o,findAllMatches:r,minMatchCharLength:a,ignoreLocation:h}=this.options;let g=[],d=0,f=!1;this.chunks.forEach(({pattern:C,alphabet:p,startIndex:E})=>{const{isMatch:y,score:k,indices:M}=ge(e,C,p,{location:c+E,distance:u,threshold:o,findAllMatches:r,minMatchCharLength:a,includeMatches:s,ignoreLocation:h});y&&(f=!0),d+=k,y&&M&&(g=[...g,...M])});let A={isMatch:f,score:f?d/this.chunks.length:1};return f&&s&&(A.indices=g),A}}class w{constructor(e){this.pattern=e}static isMultiMatch(e){return X(e,this.multiRegex)}static isSingleMatch(e){return X(e,this.singleRegex)}search(){}}function X(t,e){const i=t.match(e);return i?i[1]:null}class ce extends w{constructor(e,{location:i=l.location,threshold:n=l.threshold,distance:s=l.distance,includeMatches:c=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:o=l.minMatchCharLength,isCaseSensitive:r=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:h=l.ignoreLocation}={}){super(e),this._bitapSearch=new ue(e,{location:i,threshold:n,distance:s,includeMatches:c,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:r,ignoreDiacritics:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class oe extends w{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let i,n=0;const s=[],c=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+c,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}}const J=[class extends w{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},oe,class extends w{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends w{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends w{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends w{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends w{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=t.indexOf(this.pattern)===-1;return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},ce],Y=J.length,Ae=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,pe=new Set([ce.type,oe.type]);class Ce{constructor(e,{isCaseSensitive:i=l.isCaseSensitive,ignoreDiacritics:n=l.ignoreDiacritics,includeMatches:s=l.includeMatches,minMatchCharLength:c=l.minMatchCharLength,ignoreLocation:u=l.ignoreLocation,findAllMatches:o=l.findAllMatches,location:r=l.location,threshold:a=l.threshold,distance:h=l.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:n,includeMatches:s,minMatchCharLength:c,findAllMatches:o,ignoreLocation:u,location:r,threshold:a,distance:h},e=i?e:e.toLowerCase(),e=n?z(e):e,this.pattern=e,this.query=function(g,d={}){return g.split("|").map(f=>{let A=f.trim().split(Ae).filter(p=>p&&!!p.trim()),C=[];for(let p=0,E=A.length;p<E;p+=1){const y=A[p];let k=!1,M=-1;for(;!k&&++M<Y;){const $=J[M];let S=$.isMultiMatch(y);S&&(C.push(new $(S,d)),k=!0)}if(!k)for(M=-1;++M<Y;){const $=J[M];let S=$.isSingleMatch(y);if(S){C.push(new $(S,d));break}}}return C})}(this.pattern,this.options)}static condition(e,i){return i.useExtendedSearch}searchIn(e){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s,ignoreDiacritics:c}=this.options;e=s?e:e.toLowerCase(),e=c?z(e):e;let u=0,o=[],r=0;for(let a=0,h=i.length;a<h;a+=1){const g=i[a];o.length=0,u=0;for(let d=0,f=g.length;d<f;d+=1){const A=g[d],{isMatch:C,indices:p,score:E}=A.search(e);if(!C){r=0,u=0,o.length=0;break}if(u+=1,r+=E,n){const y=A.constructor.type;pe.has(y)?o=[...o,...p]:o.push(p)}}if(u){let d={isMatch:!0,score:r/u};return n&&(d.indices=o),d}}return{isMatch:!1,score:1}}}const V=[];function Q(t,e){for(let i=0,n=V.length;i<n;i+=1){let s=V[i];if(s.condition(t,e))return new s(t,e)}return new ue(t,e)}const U="$and",me="$or",Z="$path",Me="$val",P=t=>!(!t[U]&&!t[me]),ee=t=>({[U]:Object.keys(t).map(e=>({[e]:t[e]}))});function he(t,e,{auto:i=!0}={}){const n=s=>{let c=Object.keys(s);const u=(r=>!!r[Z])(s);if(!u&&c.length>1&&!P(s))return n(ee(s));if((r=>!I(r)&&ie(r)&&!P(r))(s)){const r=u?s[Z]:c[0],a=u?s[Me]:s[r];if(!v(a))throw new Error((g=>`Invalid value for key ${g}`)(r));const h={keyId:q(r),pattern:a};return i&&(h.searcher=Q(a,e)),h}let o={children:[],operator:c[0]};return c.forEach(r=>{const a=s[r];I(a)&&a.forEach(h=>{o.children.push(n(h))})}),o};return P(t)||(t=ee(t)),n(t)}function Fe(t,e){const i=t.matches;e.matches=[],F(i)&&i.forEach(n=>{if(!F(n.indices)||!n.indices.length)return;const{indices:s,value:c}=n;let u={indices:s,value:c};n.key&&(u.key=n.key.src),n.idx>-1&&(u.refIndex=n.idx),e.matches.push(u)})}function Ee(t,e){e.score=t.score}class O{constructor(e,i={},n){this.options={...l,...i},this.options.useExtendedSearch,this._keyStore=new le(this.options.keys),this.setCollection(e,n)}setCollection(e,i){if(this._docs=e,i&&!(i instanceof T))throw new Error("Incorrect 'index' type");this._myIndex=i||re(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const i=[];for(let n=0,s=this._docs.length;n<s;n+=1){const c=this._docs[n];e(c,n)&&(this.removeAt(n),n-=1,s-=1,i.push(c))}return i}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:i=-1}={}){const{includeMatches:n,includeScore:s,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;let r=v(e)?v(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(a,{ignoreFieldNorm:h=l.ignoreFieldNorm}){a.forEach(g=>{let d=1;g.matches.forEach(({key:f,norm:A,score:C})=>{const p=f?f.weight:null;d*=Math.pow(C===0&&p?Number.EPSILON:C,(p||1)*(h?1:A))}),g.score=d})}(r,{ignoreFieldNorm:o}),c&&r.sort(u),te(i)&&i>-1&&(r=r.slice(0,i)),function(a,h,{includeMatches:g=l.includeMatches,includeScore:d=l.includeScore}={}){const f=[];return g&&f.push(Fe),d&&f.push(Ee),a.map(A=>{const{idx:C}=A,p={item:h[C],refIndex:C};return f.length&&f.forEach(E=>{E(A,p)}),p})}(r,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const i=Q(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:c,i:u,n:o})=>{if(!F(c))return;const{isMatch:r,score:a,indices:h}=i.searchIn(c);r&&s.push({item:c,idx:u,matches:[{score:a,value:c,norm:o,indices:h}]})}),s}_searchLogical(e){const i=he(e,this.options),n=(o,r,a)=>{if(!o.children){const{keyId:g,searcher:d}=o,f=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(r,g),searcher:d});return f&&f.length?[{idx:a,item:r,matches:f}]:[]}const h=[];for(let g=0,d=o.children.length;g<d;g+=1){const f=o.children[g],A=n(f,r,a);if(A.length)h.push(...A);else if(o.operator===U)return[]}return h},s=this._myIndex.records,c={},u=[];return s.forEach(({$:o,i:r})=>{if(F(o)){let a=n(i,o,r);a.length&&(c[r]||(c[r]={idx:r,item:o,matches:[]},u.push(c[r])),a.forEach(({matches:h})=>{c[r].matches.push(...h)}))}}),u}_searchObjectList(e){const i=Q(e,this.options),{keys:n,records:s}=this._myIndex,c=[];return s.forEach(({$:u,i:o})=>{if(!F(u))return;let r=[];n.forEach((a,h)=>{r.push(...this._findMatches({key:a,value:u[h],searcher:i}))}),r.length&&c.push({idx:o,item:u,matches:r})}),c}_findMatches({key:e,value:i,searcher:n}){if(!F(i))return[];let s=[];if(I(i))i.forEach(({v:c,i:u,n:o})=>{if(!F(c))return;const{isMatch:r,score:a,indices:h}=n.searchIn(c);r&&s.push({score:a,key:e,value:c,idx:u,norm:o,indices:h})});else{const{v:c,n:u}=i,{isMatch:o,score:r,indices:a}=n.searchIn(c);o&&s.push({score:r,key:e,value:c,norm:u,indices:a})}return s}}O.version="7.1.0",O.createIndex=re,O.parseIndex=function(t,{getFn:e=l.getFn,fieldNormWeight:i=l.fieldNormWeight}={}){const{keys:n,records:s}=t,c=new T({getFn:e,fieldNormWeight:i});return c.setKeys(n),c.setIndexRecords(s),c},O.config=l,O.parseQuery=he,function(...t){V.push(...t)}(Ce),exports.default=O;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("react"),t=require("./CqwEnIUDMxWw5DX1.cjs"),p=require("@mui/material"),O=require("@mui/system"),N=["Input"],$=a.memo(a.forwardRef((T,w)=>{const{initialValue:F="",onOption:S,onValidateOption:l,onInputOption:u,onValidateInputOption:r,onDone:c,inputProps:d,inputLabel:P,inputType:b,inputPlaceHolder:v,options:g=N,autoFocusSel:C=".autoFocus",cancelOption:f,defaultOption:m=g?.[0],...I}=T,[j,q]=a.useState(!1),[n,k]=a.useState(F),[D,V]=a.useState(""),[B,M]=a.useState(!0),i=t.s0(async(e,o)=>{if(!r)return!0;const x=await r?.(e,o);V(x?.message??"");const y=x?.valid??!0;return M(y),y},[r]),h=t.s0(async e=>{u?.(n,e)},[n,u,c,S,f,m]),R=t.s0(async e=>{e.keyCode===t.Z0.Enter&&await i?.(n,null)},[n,h]),H=t.s0(e=>{k(e.target.value),i?.(e.target.value,null)},[l]),L=t.s0(async e=>{let o=await i(n,e);try{o!==!1&&(o=await i(n,e))}catch{}return o??!0},[n,l]);return s.jsx(t.D8,{options:g,onDone:c,onOption:(e,o)=>{o||h(e)},onValidateOption:L,cancelOption:f,defaultOption:m,autoFocusSel:C,ref:w,...I,children:s.jsx(p.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:s.jsx(p.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:s.jsx(p.TextField,{onFocus:e=>{j||e.target?.select(),q(!0)},type:b,label:P,helperText:D||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:B?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:v,spellCheck:!1,autoComplete:"off",...d,className:t.A0("autoFocus",d?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${O.alpha("#fff",t.Re(5))}, ${O.alpha("#fff",t.Re(5))})`}}},value:n,onChange:H,onKeyDown:R,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=$;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@sheetxl/sdk");exports.fromBufferCSV=async(a,d)=>{const{papaParseConfig:i,setValuesOptions:f,createWorkbookOptions:h}=d??{},o=await Promise.resolve().then(()=>require("./02LSJ7jnb-ovS7ex.cjs")).then(n=>n.p),m=new TextDecoder().decode(a);let p=-1;const t=new S.Workbook(h),u=t.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:S.IRange.Orientation.Row}),c=d?.onProgress;let e=0;const r={...i,transform:(n,g)=>{i?.transform&&(n=i.transform(n,g));const s=g;s===0&&p++;let l=n??"";return u.pushAt(p,s,l),e++,e%1e5==0&&c?.(e),n}};return o.parse(m,r).data,u.apply({textParser:!0,...f}),t},exports.toBufferCSV=async(a,d)=>{const{trimLeadingBlankRow:i=!0,trimLeadingBlankColumn:f=!0,excludeHidden:h=!1,sheetKey:o=null,papaParseConfig:m={}}=d||{},p=await Promise.resolve().then(()=>require("./02LSJ7jnb-ovS7ex.cjs")).then(s=>s.p);if(!a)throw new Error("workbook must be specified");let t=null;if(o===null?t=a.getSelectedSheet():typeof o=="number"?t=a.getSheets().search()[o]:typeof o=="string"&&(t=a.getSheets().getByName(o)),!t)throw new Error("invalid sheetKey specified");let u=null;const c=[];let e=null,r=t.getUsedRange({excludeHidden:h});if(!r)throw new Error("Nothing to export");if(!i||!f){const s=i?r.getRowStart():0,l=f?r.getColumnStart():0;r=r.getOffsetTo(s,l)}r.forEach((s,l)=>{const w=l.getCoords(),y=l.getCell();u!==w.rowIndex&&(e&&c.push(e),e=[],u=w.rowIndex);const x=y.toTextUnformatted()??"";e.push(x)},{includeEmpty:!0,address:null}),e&&c.push(e);const n={...m},g=p.unparse(c,n);return new TextEncoder().encode(g).buffer};
|