@sheetxl/studio-mui 0.4.13 → 0.4.15

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.
Files changed (123) hide show
  1. package/browser/cjs/BNHQPLsVdLmkPgyG.cjs +6 -0
  2. package/browser/cjs/BUU_z9x81l1Qnv1t.cjs +6 -0
  3. package/browser/cjs/BX8hkPMsPd9PSv0Z.cjs +161 -0
  4. package/browser/cjs/BknKSPzyXctJohHb.cjs +6 -0
  5. package/browser/cjs/Blfxp7Ec3Yjx3gNU.cjs +6 -0
  6. package/browser/cjs/BqFEcpPZjpwULlZk.cjs +6 -0
  7. package/browser/cjs/C-pPuqiWtgMU4NgZ.cjs +15 -0
  8. package/browser/cjs/C9eqE9OnPkiI-5Zd.cjs +7 -0
  9. package/browser/cjs/CB6DGRkCA3BLDEFr.cjs +6 -0
  10. package/browser/cjs/CO4rZgb0ObTZh6NO.cjs +6 -0
  11. package/browser/cjs/CU900NraHPDHMGJt.cjs +18 -0
  12. package/browser/cjs/Cpo-h2pMpScosT7r.cjs +6 -0
  13. package/browser/cjs/Cq2L49XjSKiIAsND.cjs +11 -0
  14. package/browser/cjs/D9X3UXVH6b_NJFeo.cjs +12 -0
  15. package/browser/cjs/DZJO-_8PnMFRZMpg.cjs +6 -0
  16. package/browser/cjs/DmCCEKhedSOg163M.cjs +6 -0
  17. package/browser/cjs/DpZ5HlIMG95q2uIe.cjs +96 -0
  18. package/browser/cjs/DwLcsRl4-LumKl6l.cjs +42 -0
  19. package/browser/cjs/Dy2vYVhrEqTHdzfD.cjs +11 -0
  20. package/browser/cjs/Gj8MlEhOCg_o7idM.cjs +6 -0
  21. package/browser/cjs/IllnWqWVClWDW1ot.cjs +6 -0
  22. package/browser/cjs/J3xq71qTV9LqCUzu.cjs +145 -0
  23. package/browser/cjs/X9sJMKafafBPpNpK.cjs +16 -0
  24. package/browser/cjs/index.cjs +4 -10
  25. package/browser/cjs/klnhoS0cqBpCC5fo.cjs +7 -0
  26. package/browser/esm/BQNKKCtIvfOMph3T.mjs +2250 -0
  27. package/browser/esm/BiQfhG8JMHeWuT63.mjs +1672 -0
  28. package/browser/esm/Btyp6us1Vzz3ZfHk.mjs +13391 -0
  29. package/browser/esm/Bvr3QlWdnOSnskWL.mjs +392 -0
  30. package/browser/esm/CYpvNksOw1PyhLpA.mjs +52 -0
  31. package/browser/esm/CcZUaOkODU7h0onP.mjs +25 -0
  32. package/browser/esm/CnXUhdLB8blNUvSr.mjs +84 -0
  33. package/browser/esm/CwjVlrJJqEGZX6q2.mjs +52 -0
  34. package/browser/esm/D0v3VaJtA3LjHpWR.mjs +20816 -0
  35. package/browser/esm/D4DvAg7aaaWl0TPV.mjs +1467 -0
  36. package/browser/esm/DAZNeiMI9sOM-xd8.mjs +1366 -0
  37. package/browser/esm/DGUm6rEOgO8WrVtT.mjs +23 -0
  38. package/browser/esm/DGoy2q9hDB7kive6.mjs +44 -0
  39. package/browser/esm/DSCE3cCea5d5Ip-N.mjs +1703 -0
  40. package/browser/esm/DrTLuc1VQWQfDAej.mjs +59 -0
  41. package/browser/esm/DuzycndVID_eag8V.mjs +1352 -0
  42. package/browser/esm/FZoe4QJ2ecSD1pjB.mjs +43 -0
  43. package/browser/esm/HI5oLhcn8kfiky1k.mjs +3803 -0
  44. package/browser/esm/T2YlNqs-LGJBm08C.mjs +46 -0
  45. package/browser/esm/UCJVaz3qX1u53mgI.mjs +640 -0
  46. package/browser/esm/UWejV3W_nMwWqnxY.mjs +48 -0
  47. package/browser/esm/VpP_qw0lmgCaHdHR.mjs +153 -0
  48. package/browser/esm/YS19x3zzRUKQqXu_.mjs +2410 -0
  49. package/browser/esm/index.mjs +84 -8
  50. package/browser/esm/jqoS02EUPE2WEY1t.mjs +424 -0
  51. package/licenses/dependencies.txt +6 -6
  52. package/node/esm/{BO6cKQ_efCO2YTyW.mjs → 3htalFC0z5xbRnmH.mjs} +1 -1
  53. package/node/esm/{DKho7vhsoPr3NuMl.mjs → B-pzKiKMkbB9Es-9.mjs} +1 -1
  54. package/node/esm/{BZ8BYhQCAcmtqV_l.mjs → BFxzGj5sPFwrklFi.mjs} +3 -3
  55. package/node/esm/{DvKUmpzXvELOJbAq.mjs → BGYSS0lvjSMTtreq.mjs} +1 -1
  56. package/node/esm/{BxJ8RdpZW49RjtqB.mjs → BGZpuIQG7RsGY_HH.mjs} +1 -1
  57. package/node/esm/{BEWR_Oinb-P8gswu.mjs → BTnlaEz7yZqa7QHP.mjs} +1 -1
  58. package/node/esm/{DW7i1Qv4kcmwOTvD.mjs → BfUEFSGuAZXw2fvO.mjs} +1 -1
  59. package/node/esm/{BqcpB9wQAjq0QKR1.mjs → BiJ5CZBAxg4-QDHh.mjs} +1 -1
  60. package/node/esm/{nmVSg6Qpwj9V1oA0.mjs → Bnkt1wiWaLEq8xla.mjs} +1 -1
  61. package/node/esm/{-mcJjjdCwl8lh-eg.mjs → BwbOSLs2gcxOaV0i.mjs} +1 -1
  62. package/node/esm/{RpUFmc_WL9-PMYhx.mjs → CAWLE2N0nA-FjUkH.mjs} +1 -1
  63. package/node/esm/{uAAAbPd_k3kmgO5f.mjs → CSnI8PJEgxEQEj1B.mjs} +1 -1
  64. package/node/esm/{VnhwCsWDUmo5-K5N.mjs → CvYpf-Km1Rvg15q4.mjs} +1 -1
  65. package/node/esm/{BqsJ9biuGwjU2xgY.mjs → CxhzSvAqksnasp3g.mjs} +1 -1
  66. package/node/esm/{CdLN7JEivNllaQ6w.mjs → DCrdGvQ_vOB2o-ca.mjs} +1 -1
  67. package/node/esm/{CfO2Xok0ch8kylzr.mjs → DhGXQOOW9FBpgCqI.mjs} +1 -1
  68. package/node/esm/{CsPaYpANdd8Rpel-.mjs → DkhnVkboeZsdMJxH.mjs} +1 -1
  69. package/node/esm/{4WfRn0Og_yApP_Q8.mjs → DnMRqYWKDGXlNm42.mjs} +1 -1
  70. package/node/esm/{CQ1mTChRFSKFU2O1.mjs → DsS5U5rJ5tNVEGXs.mjs} +1 -1
  71. package/node/esm/{CcOchU9ZOmdG4JFr.mjs → DuyHq4Fs-_RQkwF_.mjs} +1 -1
  72. package/node/esm/{o-JVx3HFrRjVjKmi.mjs → FzVegyt0upYkLobF.mjs} +2 -2
  73. package/node/esm/{BPG7zfcXK20urqr_.mjs → imk332niB0MxWuGl.mjs} +5 -5
  74. package/node/esm/index.mjs +11 -11
  75. package/package.json +8 -8
  76. package/browser/cjs/34mwIxXhbXYv5xsc.cjs +0 -7
  77. package/browser/cjs/3OIgTi54FC0IBzyK.cjs +0 -7
  78. package/browser/cjs/B-Aq2h8aSDrc_0iZ.cjs +0 -7
  79. package/browser/cjs/BDhT8qcsUqUILki7.cjs +0 -7
  80. package/browser/cjs/BKJsMQHem8u-jMiR.cjs +0 -7
  81. package/browser/cjs/BO7LEbRChpLg-xKv.cjs +0 -7
  82. package/browser/cjs/BZR-qDCIYdiDtD-U.cjs +0 -7
  83. package/browser/cjs/BfE1_C2EpBrmB7bt.cjs +0 -7
  84. package/browser/cjs/Brij8vl9GntSQBer.cjs +0 -7
  85. package/browser/cjs/C61z_849Y2mg6eYL.cjs +0 -7
  86. package/browser/cjs/CaKjImRkCm3-QSAI.cjs +0 -7
  87. package/browser/cjs/Cw7iXqLfwZMRGb3J.cjs +0 -7
  88. package/browser/cjs/CwwItA5xvSx0QgDn.cjs +0 -7
  89. package/browser/cjs/DPTcPoZ3PiOOW7lp.cjs +0 -7
  90. package/browser/cjs/DhmN913n5MBAZsij.cjs +0 -7
  91. package/browser/cjs/DhoDW4ohnPkwiE_o.cjs +0 -7
  92. package/browser/cjs/Dj_PjsvImW3tjX0i.cjs +0 -7
  93. package/browser/cjs/Dl4WPIJFTvpCXOs3.cjs +0 -7
  94. package/browser/cjs/QCtfu4qn-ovJa_wL.cjs +0 -7
  95. package/browser/cjs/VQ4Cuzvkmtel1iE_.cjs +0 -7
  96. package/browser/cjs/VTMW1yjPzEJGyBmh.cjs +0 -7
  97. package/browser/cjs/hY59MepmKCIoN0hM.cjs +0 -7
  98. package/browser/cjs/pKp_fof7vGupYAM2.cjs +0 -7
  99. package/browser/cjs/t-9gaLqrOnGiw-3T.cjs +0 -7
  100. package/browser/esm/5U4XS5qxb3oJ33qK.mjs +0 -7
  101. package/browser/esm/BPMMuKIe5xb3-D8V.mjs +0 -7
  102. package/browser/esm/BXartMrqQuAXu0Qz.mjs +0 -7
  103. package/browser/esm/Bc8N72T3wtTApPEG.mjs +0 -7
  104. package/browser/esm/BjoQXBQuDry5Fgc_.mjs +0 -7
  105. package/browser/esm/BlUq84tk9v01SQgx.mjs +0 -7
  106. package/browser/esm/C5iuJTeAtknnUEIE.mjs +0 -7
  107. package/browser/esm/CN67iG3xuQhXAPad.mjs +0 -7
  108. package/browser/esm/CQgUOqCEwTc61uuT.mjs +0 -7
  109. package/browser/esm/Cq1DtQcbtmTtKOc4.mjs +0 -7
  110. package/browser/esm/Cqz35dsi-gZArS0S.mjs +0 -7
  111. package/browser/esm/D9wzPAaUYfW5yKFN.mjs +0 -7
  112. package/browser/esm/DRRzJ8Ep6_Tyd6ne.mjs +0 -7
  113. package/browser/esm/DSGJzNzS8OeMxUW1.mjs +0 -7
  114. package/browser/esm/DSIpyed_o2mrjd0r.mjs +0 -7
  115. package/browser/esm/DWgrVUwlK4kwFJn-.mjs +0 -7
  116. package/browser/esm/Dr6QLJSwckbF9K_u.mjs +0 -7
  117. package/browser/esm/DuSF-rjIFFvyCoo8.mjs +0 -7
  118. package/browser/esm/EiBc8VBUeU8VXEhw.mjs +0 -7
  119. package/browser/esm/R3CPiIXdp_rdc-Bw.mjs +0 -7
  120. package/browser/esm/eXqnYk6V-QI6pGI5.mjs +0 -7
  121. package/browser/esm/hdx26DrfopUuM4j1.mjs +0 -7
  122. package/browser/esm/oXfsh9SiDjQuu2ZE.mjs +0 -7
  123. package/browser/esm/zBIGDTI8z3bRbFxO.mjs +0 -7
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@mui/material"),o=require("./Brij8vl9GntSQBer.cjs"),n=require("react"),r=require("@mui/icons-material"),i=require("@mui/styled-engine"),l=require("@mui/system");function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const a=s(n);const c=o.createTheme();function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function u(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function h(e){return e?(t,o)=>o[e]:null}function f(e,t,o){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap(t=>f(e,t,o));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=o?u(n.style,o):n.style;else{const{variants:e,...r}=n;t=o?u(i.internal_serializeStyles(r),o):r}return p(e,n.variants,[t],o)}return n?.isProcessed?o?u(i.internal_serializeStyles(n.style),o):n.style:o?u(i.internal_serializeStyles(n),o):n}function p(e,t,o=[],n=void 0){let r;e:for(let l=0;l<t.length;l+=1){const s=t[l];if("function"==typeof s.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const t in s.props)if(e[t]!==s.props[t]&&e.ownerState?.[t]!==s.props[t])continue e;"function"==typeof s.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},o.push(n?u(i.internal_serializeStyles(s.style(r)),n):s.style(r))):o.push(n?u(i.internal_serializeStyles(s.style),n):s.style)}return o}function m(e,t){}function g(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const v=function(e={}){const{themeId:t,defaultTheme:n=c,rootShouldForwardProp:r=d,slotShouldForwardProp:l=d}=e;function s(e){!function(e,t,o){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?o:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{i.internal_mutateStyles(e,e=>e.filter(e=>e!==o.styleFunctionSx));const{name:n,slot:a,skipVariantsResolver:c,skipSx:v,overridesResolver:_=h(g(a)),...S}=t,y=n&&n.startsWith("Mui")||a?"components":"custom",w=void 0!==c?c:a&&"Root"!==a&&"root"!==a||!1,C=v||!1;let x=d;"Root"===a||"root"===a?x=r:a?x=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(x=void 0);const R=i(e,{shouldForwardProp:x,label:m(),...S}),b=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return f(t,e,t.theme.modularCssLayers?y:void 0)};if(o.isPlainObject(e)){const t=function(e){const{variants:t,...o}=e,n={variants:t,style:i.internal_serializeStyles(o),isProcessed:!0};return n.style===o||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=i.internal_serializeStyles(e.style))}),n}(e);return function(e){return t.variants?f(e,t,e.theme.modularCssLayers?y:void 0):e.theme.modularCssLayers?u(t.style,y):t.style}}return e},T=(...t)=>{const r=[],i=t.map(b),l=[];if(r.push(s),n&&_&&l.push(function(e){const t=e.theme,o=t.components?.[n]?.styleOverrides;if(!o)return null;const r={};for(const t in o)r[t]=f(e,o[t],e.theme.modularCssLayers?"theme":void 0);return _(e,r)}),n&&!w&&l.push(function(e){const t=e.theme,o=t?.components?.[n]?.variants;return o?p(e,o,[],e.theme.modularCssLayers?"theme":void 0):null}),C||l.push(o.styleFunctionSx),Array.isArray(i[0])){const e=i.shift(),t=new Array(r.length).fill(""),o=new Array(l.length).fill("");let n;n=[...t,...e,...o],n.raw=[...t,...e.raw,...o],r.unshift(n)}const a=[...r,...i,...l],c=R(...a);return e.muiName&&(c.muiName=e.muiName),c};return R.withConfig&&(T.withConfig=R.withConfig),T}}({themeId:o.THEME_ID,defaultTheme:o.defaultTheme,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function y(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t);if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==S(t)?t:t+""}function w(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function C(e,t,o){return t&&w(e.prototype,t),o&&w(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o._setPrototypeOf(e,t)}function T(e,t,o){return(t=y(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function z(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function I(e){this.setState(function(t){var o=this.constructor.getDerivedStateFromProps(e,t);return null!=o?o:null}.bind(this))}function P(e,t){try{var o=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(o,n)}finally{this.props=o,this.state=n}}function O(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var o=null,n=null,r=null;if("function"==typeof t.componentWillMount?o="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(o="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?n="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(n="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?r="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(r="UNSAFE_componentWillUpdate"),null!==o||null!==n||null!==r){var i=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==o?"\n "+o:"")+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=z,t.componentWillReceiveProps=I),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=P;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;s.call(this,e,t,n)}}return e}function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function M(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(L=function(){return!!e})()}z.__suppressDeprecationWarning=!0,I.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var G=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,L()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),T(t,"_columnStartIndex",0),T(t,"_columnStopIndex",0),T(t,"_rowStartIndex",0),T(t,"_rowStopIndex",0),T(t,"_onKeyDown",function(e){var o=t.props,n=o.columnCount,r=o.disabled,i=o.mode,l=o.rowCount;if(!r){var s=t._getScrollState(),a=s.scrollToColumn,c=s.scrollToRow,d=t._getScrollState(),u=d.scrollToColumn,h=d.scrollToRow;switch(e.key){case"ArrowDown":h="cells"===i?Math.min(h+1,l-1):Math.min(t._rowStopIndex+1,l-1);break;case"ArrowLeft":u="cells"===i?Math.max(u-1,0):Math.max(t._columnStartIndex-1,0);break;case"ArrowRight":u="cells"===i?Math.min(u+1,n-1):Math.min(t._columnStopIndex+1,n-1);break;case"ArrowUp":h="cells"===i?Math.max(h-1,0):Math.max(t._rowStartIndex-1,0)}u===a&&h===c||(e.preventDefault(),t._updateScrollState({scrollToColumn:u,scrollToRow:h}))}}),T(t,"_onSectionRendered",function(e){var o=e.columnStartIndex,n=e.columnStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;t._columnStartIndex=o,t._columnStopIndex=n,t._rowStartIndex=r,t._rowStopIndex=i}),t}return b(e,a.PureComponent),C(e,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,n=this._getScrollState(),r=n.scrollToColumn,i=n.scrollToRow;return a.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:r,scrollToRow:i}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,n=this.props,r=n.isControlled,i=n.onScrollToChange;"function"==typeof i&&i({scrollToColumn:t,scrollToRow:o}),r||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?M(M({},t),{},{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}])}();function A(e,t){var o,n=void 0!==(o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:global).document&&o.document.attachEvent;if(!n){var r=function(){var e=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)};return function(t){return e(t)}}(),i=function(){var e=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout;return function(t){return e(t)}}(),l=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,n=t.lastElementChild,r=o.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=o.offsetWidth+1+"px",r.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;l(this),this.__resizeRAF__&&i(this.__resizeRAF__),this.__resizeRAF__=r(function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(o){o.call(t,e)}))})}},a=!1,c="",d="animationstart",u="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=o.document.createElement("fakeelement");if(void 0!==f.style.animationName&&(a=!0),!1===a)for(var p=0;p<u.length;p++)if(void 0!==f.style[u[p]+"AnimationName"]){c="-"+u[p].toLowerCase()+"-",d=h[p],a=!0;break}var m="resizeanim",g="@"+c+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",v=c+"animation: 1ms "+m+"; "}return{addResizeListener:function(t,r){if(n)t.attachEvent("onresize",r);else{if(!t.__resizeTriggers__){var i=t.ownerDocument,a=o.getComputedStyle(t);a&&"static"==a.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var o=(g||"")+".resize-triggers { "+(v||"")+'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%; }',n=t.head||t.getElementsByTagName("head")[0],r=t.createElement("style");r.id="detectElementResize",r.type="text/css",null!=e&&r.setAttribute("nonce",e),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(t.createTextNode(o)),n.appendChild(r)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var c=i.createElement("div");c.className="expand-trigger",c.appendChild(i.createElement("div"));var u=i.createElement("div");u.className="contract-trigger",t.__resizeTriggers__.appendChild(c),t.__resizeTriggers__.appendChild(u),t.appendChild(t.__resizeTriggers__),l(t),t.addEventListener("scroll",s,!0),d&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&l(t)},t.__resizeTriggers__.addEventListener(d,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(r)}},removeResizeListener:function(e,t){if(n)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(d,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function E(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function W(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?E(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):E(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(H=function(){return!!e})()}T(G,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),O(G);var D=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,H()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"state",{height:t.props.defaultHeight||0,width:t.props.defaultWidth||0}),T(t,"_parentNode",void 0),T(t,"_autoSizer",void 0),T(t,"_window",void 0),T(t,"_detectElementResize",void 0),T(t,"_onResize",function(){var e=t.props,o=e.disableHeight,n=e.disableWidth,r=e.onResize;if(t._parentNode){var i=t._parentNode.offsetHeight||0,l=t._parentNode.offsetWidth||0,s=(t._window||window).getComputedStyle(t._parentNode)||{},a=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,d=parseInt(s.paddingTop,10)||0,u=parseInt(s.paddingBottom,10)||0,h=i-d-u,f=l-a-c;(!o&&t.state.height!==h||!n&&t.state.width!==f)&&(t.setState({height:i-d-u,width:l-a-c}),r({height:i,width:l}))}}),T(t,"_setRef",function(e){t._autoSizer=e}),t}return b(e,a.Component),C(e,[{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=A(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,o=e.className,n=e.disableHeight,r=e.disableWidth,i=e.style,l=this.state,s=l.height,c=l.width,d={overflow:"visible"},u={};return n||(d.height=0,u.height=s),r||(d.width=0,u.width=c),a.createElement("div",{className:o,ref:this._setRef,style:W(W({},d),i)},t(u))}}])}();function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}T(D,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var F=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,j()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"_child",a.createRef()),T(t,"_measure",function(){var e=t.props,o=e.cache,n=e.columnIndex,r=void 0===n?0:n,i=e.parent,l=e.rowIndex,s=void 0===l?t.props.index||0:l,a=t._getCellMeasurements(),c=a.height,d=a.width;c===o.getHeight(s,r)&&d===o.getWidth(s,r)||(o.set(s,r,d,c),i&&"function"==typeof i.recomputeGridSize&&i.recomputeGridSize({columnIndex:r,rowIndex:s}))}),T(t,"_registerChild",function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),t._child.current=e,e&&t._maybeMeasureCell()}),t}return b(e,a.PureComponent),C(e,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this,t=this.props.children,o="function"==typeof t?t({measure:this._measure,registerChild:this._registerChild}):t;return null===o?o:n.cloneElement(o,{ref:function(t){"function"==typeof o.ref?o.ref(t):o.ref&&(o.ref.current=t),e._child.current=t}})}},{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 o=t.style.width,n=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var r=Math.ceil(t.offsetHeight),i=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),n&&(t.style.height=n),{height:r,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,n=void 0===o?0:o,r=e.parent,i=e.rowIndex,l=void 0===i?this.props.index||0:i;if(!t.has(l,n)){var s=this._getCellMeasurements(),a=s.height,c=s.width;t.set(l,n,c,a),r&&"function"==typeof r.invalidateCellSizeAfterRender&&r.invalidateCellSizeAfterRender({columnIndex:n,rowIndex:l})}}}])}();function N(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(o){var n=o.callback,r=o.indices,i=Object.keys(r),l=!e||i.every(function(e){var t=r[e];return Array.isArray(t)?t.length>0:t>=0}),s=i.length!==Object.keys(t).length||i.some(function(e){var o=t[e],n=r[e];return Array.isArray(n)?o.join(",")!==n.join(","):o!==n});t=r,l&&s&&n(r)}}T(F,"__internalCellMeasurerFlag",!1);const B=!("undefined"==typeof window||!window.document||!window.document.createElement);var U;function V(e){if((!U&&0!==U||e)&&B){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),U=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return U}function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function $(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}var X="observed",Y="requested",J=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,K()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),T(t,"_calculateSizeAndPositionDataOnNextUpdate",!1),T(t,"_onSectionRenderedMemoizer",N()),T(t,"_onScrollMemoizer",N(!1)),T(t,"_invokeOnSectionRenderedHelper",function(){var e=t.props,o=e.cellLayoutManager,n=e.onSectionRendered;t._onSectionRenderedMemoizer({callback:n,indices:{indices:o.getLastRenderedIndices()}})}),T(t,"_setScrollingContainerRef",function(e){t._scrollingContainer=e}),T(t,"_updateScrollPositionForScrollToCell",function(){var e=t.props,o=e.cellLayoutManager,n=e.height,r=e.scrollToAlignment,i=e.scrollToCell,l=e.width,s=t.state,a=s.scrollLeft,c=s.scrollTop;if(i>=0){var d=o.getScrollPositionForCell({align:r,cellIndex:i,height:n,scrollLeft:a,scrollTop:c,width:l});d.scrollLeft===a&&d.scrollTop===c||t._setScrollPosition(d)}}),T(t,"_onScroll",function(e){if(e.target===t._scrollingContainer){t._enablePointerEventsAfterDelay();var o=t.props,n=o.cellLayoutManager,r=o.height,i=o.isScrollingChange,l=o.width,s=t._scrollbarSize,a=n.getTotalSize(),c=a.height,d=a.width,u=Math.max(0,Math.min(d-l+s,e.target.scrollLeft)),h=Math.max(0,Math.min(c-r+s,e.target.scrollTop));if(t.state.scrollLeft!==u||t.state.scrollTop!==h){var f=e.cancelable?X:Y;t.state.isScrolling||i(!0),t.setState({isScrolling:!0,scrollLeft:u,scrollPositionChangeReason:f,scrollTop:h})}t._invokeOnScrollMemoizer({scrollLeft:u,scrollTop:h,totalWidth:d,totalHeight:c})}}),t._scrollbarSize=V(),void 0===t._scrollbarSize?(t._scrollbarSizeMeasured=!1,t._scrollbarSize=0):t._scrollbarSizeMeasured=!0,t}return b(e,a.PureComponent),C(e,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,n=e.scrollToCell,r=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=V(),this._scrollbarSizeMeasured=!0,this.setState({})),n>=0?this._updateScrollPositionForScrollToCell():(o>=0||r>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:r}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),l=i.height,s=i.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:r||0,totalHeight:l,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,n=o.height,r=o.scrollToAlignment,i=o.scrollToCell,l=o.width,s=this.state,a=s.scrollLeft,c=s.scrollPositionChangeReason,d=s.scrollTop;c===Y&&(a>=0&&a!==t.scrollLeft&&a!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=a),d>=0&&d!==t.scrollTop&&d!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=d)),n===e.height&&r===e.scrollToAlignment&&i===e.scrollToCell&&l===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,i=e.className,l=e.height,s=e.horizontalOverscanSize,c=e.id,d=e.noContentRenderer,u=e.style,h=e.verticalOverscanSize,f=e.width,p=this.state,m=p.isScrolling,g=p.scrollLeft,v=p.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var _=r.getTotalSize(),S=_.height,y=_.width,w=Math.max(0,g-s),C=Math.max(0,v-h),x=Math.min(y,g+f+s),R=Math.min(S,v+l+h),b=l>0&&f>0?r.cellRenderers({height:R-C,isScrolling:m,width:x-w,x:w,y:C}):[],T={boxSizing:"border-box",direction:"ltr",height:t?"auto":l,position:"relative",WebkitOverflowScrolling:"touch",width:f,willChange:"transform"},z=S>l?this._scrollbarSize:0,I=y>f?this._scrollbarSize:0;return T.overflowX=y+z<=f?"hidden":"auto",T.overflowY=S+I<=l?"hidden":"auto",a.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:o.clsx("ReactVirtualized__Collection",i),id:c,onScroll:this._onScroll,role:"grid",style:$($({},T),u),tabIndex:0},n>0&&a.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:S,maxHeight:S,maxWidth:y,overflow:"hidden",pointerEvents:m?"none":"",width:y}},b),0===n&&d())}},{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,o=e.scrollLeft,n=e.scrollTop,r=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,n=e.scrollTop,l=t.props,s=l.height;(0,l.onScroll)({clientHeight:s,clientWidth:l.width,scrollHeight:r,scrollLeft:o,scrollTop:n,scrollWidth:i})},indices:{scrollLeft:o,scrollTop:n}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,n={scrollPositionChangeReason:Y};t>=0&&(n.scrollLeft=t),o>=0&&(n.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(n)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:Y}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Y}}}])}();T(J,"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}),J.propTypes={},O(J);var Z=function(){return C(function e(t){var o=t.height,n=t.width,r=t.x,i=t.y;_(this,e),this.height=o,this.width=n,this.x=r,this.y=i,this._indexMap={},this._indices=[]},[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{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)}}])}(),Q=function(){return C(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;_(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}},[{key:"getCellIndices",value:function(e){var t=e.height,o=e.width,n=e.x,r=e.y,i={};return this.getSections({height:t,width:o,x:n,y:r}).forEach(function(e){return e.getCellIndices().forEach(function(e){i[e]=e})}),Object.keys(i).map(function(e){return i[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,o=e.width,n=e.x,r=e.y,i=Math.floor(n/this._sectionSize),l=Math.floor((n+o-1)/this._sectionSize),s=Math.floor(r/this._sectionSize),a=Math.floor((r+t-1)/this._sectionSize),c=[],d=i;d<=l;d++)for(var u=s;u<=a;u++){var h="".concat(d,".").concat(u);this._sections[h]||(this._sections[h]=new Z({height:this._sectionSize,width:this._sectionSize,x:d*this._sectionSize,y:u*this._sectionSize})),c.push(this._sections[h])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,o=e.index;this._cellMetadata[o]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:o})})}}])}();function ee(e){var t=e.align,o=void 0===t?"auto":t,n=e.cellOffset,r=e.cellSize,i=e.containerSize,l=e.currentOffset,s=n,a=s-i+r;switch(o){case"start":return s;case"end":return a;case"center":return s-(i-r)/2;default:return Math.max(a,Math.min(s,l))}}function te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(te=function(){return!!e})()}var oe=function(){function e(t,o){var n,r,i,l;return _(this,e),r=this,l=[t,o],i=R(i=e),(n=x(r,te()?Reflect.construct(i,l||[],R(r).constructor):i.apply(r,l)))._cellMetadata=[],n._lastRenderedCellIndices=[],n._cellCache=[],n._isScrollingChange=n._isScrollingChange.bind(n),n._setCollectionViewRef=n._setCollectionViewRef.bind(n),n}return b(e,a.PureComponent),C(e,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=o._extends({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(this.props),this.props));return a.createElement(J,o._extends({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,o=e.cellSizeAndPositionGetter,n=e.sectionSize,r=[],i=new Q(n),l=0,s=0,a=0;a<t;a++){var c=o({index:a});if(null==c.height||isNaN(c.height)||null==c.width||isNaN(c.width)||null==c.x||isNaN(c.x)||null==c.y||isNaN(c.y))throw Error("Invalid metadata returned for cell ".concat(a,":\n x:").concat(c.x,", y:").concat(c.y,", width:").concat(c.width,", height:").concat(c.height));l=Math.max(l,c.y+c.height),s=Math.max(s,c.x+c.width),r[a]=c,i.registerCell({cellMetadatum:c,index:a})}return{cellMetadata:r,height:l,sectionManager:i,width:s}}({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,o=e.cellIndex,n=e.height,r=e.scrollLeft,i=e.scrollTop,l=e.width,s=this.props.cellCount;if(o>=0&&o<s){var a=this._cellMetadata[o];r=ee({align:t,cellOffset:a.x,cellSize:a.width,containerSize:l,currentOffset:r}),i=ee({align:t,cellOffset:a.y,cellSize:a.height,containerSize:n,currentOffset:i})}return{scrollLeft:r,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,o=e.height,n=e.isScrolling,r=e.width,i=e.x,l=e.y,s=this.props,a=s.cellGroupRenderer,c=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:r,x:i,y:l}),a({cellCache:this._cellCache,cellRenderer:c,cellSizeAndPositionGetter:function(e){var o=e.index;return t._sectionManager.getCellMetadata({index:o})},indices:this._lastRenderedCellIndices,isScrolling:n})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}])}();function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ne=function(){return!!e})()}function re(e){var t=e.cellCount,o=e.cellSize,n=e.computeMetadataCallback,r=e.computeMetadataCallbackProps,i=e.nextCellsCount,l=e.nextCellSize,s=e.nextScrollToIndex,a=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===i&&("number"!=typeof o&&"number"!=typeof l||o===l)||(n(r),a>=0&&a===s&&c())}function ie(e,t){if(null==e)return{};var n,r,i=o._objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}T(oe,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,o=e.cellRenderer,n=e.cellSizeAndPositionGetter,r=e.indices,i=e.isScrolling;return r.map(function(e){var r=n({index:e}),l={index:e,isScrolling:i,key:e,style:{height:r.height,left:r.x,position:"absolute",top:r.y,width:r.width}};return i?(e in t||(t[e]=o(l)),t[e]):o(l)}).filter(function(e){return!!e})}}),oe.propTypes={},(function(){function e(t,o){var n,r,i,l;return _(this,e),r=this,l=[t,o],i=R(i=e),(n=x(r,ne()?Reflect.construct(i,l||[],R(r).constructor):i.apply(r,l)))._registerChild=n._registerChild.bind(n),n}return b(e,a.PureComponent),C(e,[{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.columnMaxWidth,n=t.columnMinWidth,r=t.columnCount,i=t.width;o===e.columnMaxWidth&&n===e.columnMinWidth&&r===e.columnCount&&i===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.columnMaxWidth,n=e.columnMinWidth,r=e.columnCount,i=e.width,l=n||1,s=o?Math.min(o,i):i,a=i/r;return a=Math.max(l,a),a=Math.min(s,a),a=Math.floor(a),t({adjustedWidth:Math.min(i,a*r),columnWidth:a,getColumnWidth:function(){return a},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}])}()).propTypes={};var le,se=function(){return C(function e(t){var o=t.cellCount,n=t.cellSizeGetter,r=t.estimatedCellSize;_(this,e),T(this,"_cellSizeAndPositionData",{}),T(this,"_lastMeasuredIndex",-1),T(this,"_lastBatchedIndex",-1),T(this,"_cellCount",void 0),T(this,"_cellSizeGetter",void 0),T(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=o,this._estimatedCellSize=r},[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,n=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,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(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),o=t.offset+t.size,n=this._lastMeasuredIndex+1;n<=e;n++){var r=this._cellSizeGetter({index:n});if(void 0===r||isNaN(r))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(r));null===r?(this._cellSizeAndPositionData[n]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[n]={offset:o,size:r},o+=r,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,n=e.containerSize,r=e.currentOffset,i=e.targetIndex;if(n<=0)return 0;var l,s=this.getSizeAndPositionOfCell(i),a=s.offset,c=a-n+s.size;switch(o){case"start":l=a;break;case"end":l=c;break;case"center":l=a-(n-s.size)/2;break;default:l=Math.max(c,Math.min(a,r))}var d=this.getTotalSize();return Math.max(0,Math.min(d-n,l))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var n=o+t,r=this._findNearestCell(o),i=this.getSizeAndPositionOfCell(r);o=i.offset+i.size;for(var l=r;o<n&&l<this._cellCount-1;)l++,o+=this.getSizeAndPositionOfCell(l).size;return{start:r,stop:l}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var n=t+Math.floor((e-t)/2),r=this.getSizeAndPositionOfCell(n).offset;if(r===o)return n;r<o?t=n+1:r>o&&(e=n-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var o=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=o,o*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),o=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(o,0,e):this._exponentialSearch(o,e)}}])}(),ae=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5},ce=["maxScrollSize"],de=function(){return C(function e(t){var o=t.maxScrollSize,n=void 0===o?ae():o,r=ie(t,ce);_(this,e),T(this,"_cellSizeAndPositionManager",void 0),T(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new se(r),this._maxScrollSize=n},[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{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(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r});return Math.round(i*(r-n))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,n=e.containerSize,r=e.currentOffset,i=e.targetIndex;r=this._safeOffsetToOffset({containerSize:n,offset:r});var l=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:n,offset:l})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;return o=this._safeOffsetToOffset({containerSize:t,offset:o}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:o})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,o=e.offset,n=e.totalSize;return n<=t?0:o/(n-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return o;var i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:n});return Math.round(i*(r-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return o;var i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r});return Math.round(i*(n-t))}}])}();function ue(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,n=e.previousCellsCount,r=e.previousCellSize,i=e.previousScrollToAlignment,l=e.previousScrollToIndex,s=e.previousSize,a=e.scrollOffset,c=e.scrollToAlignment,d=e.scrollToIndex,u=e.size,h=e.sizeJustIncreasedFromZero,f=e.updateScrollIndexCallback,p=o.getCellCount(),m=d>=0&&d<p;m&&(u!==s||h||!r||"number"==typeof t&&t!==r||c!==i||d!==l)?f(d):!m&&p>0&&(u<s||p<n)&&a>o.getTotalSize()-u&&f(p-1)}var he=(le="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||le.webkitRequestAnimationFrame||le.mozRequestAnimationFrame||le.oRequestAnimationFrame||le.msRequestAnimationFrame||function(e){return le.setTimeout(e,1e3/60)},fe=le.cancelAnimationFrame||le.webkitCancelAnimationFrame||le.mozCancelAnimationFrame||le.oCancelAnimationFrame||le.msCancelAnimationFrame||function(e){le.clearTimeout(e)},pe=he,me=fe,ge=function(e){return me(e.id)},ve=function(e,t){var o;Promise.resolve().then(function(){o=Date.now()});var n=function(){Date.now()-o>=t?e.call():r.id=pe(n)},r={id:pe(n)};return r};function _e(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Se(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_e(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ye=function(){return!!e})()}var we="observed",Ce="requested",xe=function(){function e(t){var o,n,r,i;_(this,e),n=this,i=[t],r=R(r=e),T(o=x(n,ye()?Reflect.construct(r,i||[],R(n).constructor):r.apply(n,i)),"_onGridRenderedMemoizer",N()),T(o,"_onScrollMemoizer",N(!1)),T(o,"_deferredInvalidateColumnIndex",null),T(o,"_deferredInvalidateRowIndex",null),T(o,"_recomputeScrollLeftFlag",!1),T(o,"_recomputeScrollTopFlag",!1),T(o,"_horizontalScrollBarSize",0),T(o,"_verticalScrollBarSize",0),T(o,"_scrollbarPresenceChanged",!1),T(o,"_scrollingContainer",void 0),T(o,"_childrenToDisplay",void 0),T(o,"_columnStartIndex",void 0),T(o,"_columnStopIndex",void 0),T(o,"_rowStartIndex",void 0),T(o,"_rowStopIndex",void 0),T(o,"_renderedColumnStartIndex",0),T(o,"_renderedColumnStopIndex",0),T(o,"_renderedRowStartIndex",0),T(o,"_renderedRowStopIndex",0),T(o,"_initialScrollTop",void 0),T(o,"_initialScrollLeft",void 0),T(o,"_disablePointerEventsTimeoutId",void 0),T(o,"_styleCache",{}),T(o,"_cellCache",{}),T(o,"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),T(o,"_invokeOnGridRenderedHelper",function(){var e=o.props.onSectionRendered;o._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:o._columnStartIndex,columnOverscanStopIndex:o._columnStopIndex,columnStartIndex:o._renderedColumnStartIndex,columnStopIndex:o._renderedColumnStopIndex,rowOverscanStartIndex:o._rowStartIndex,rowOverscanStopIndex:o._rowStopIndex,rowStartIndex:o._renderedRowStartIndex,rowStopIndex:o._renderedRowStopIndex}})}),T(o,"_setScrollingContainerRef",function(e){o._scrollingContainer=e,"function"==typeof o.props.elementRef?o.props.elementRef(e):"object"===S(o.props.elementRef)&&(o.props.elementRef.current=e)}),T(o,"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)});var l=new de({cellCount:t.columnCount,cellSizeGetter:function(o){return e._wrapSizeGetter(t.columnWidth)(o)},estimatedCellSize:e._getEstimatedColumnSize(t)}),s=new de({cellCount:t.rowCount,cellSizeGetter:function(o){return e._wrapSizeGetter(t.rowHeight)(o)},estimatedCellSize:e._getEstimatedRowSize(t)});return o.state={instanceProps:{columnSizeAndPositionManager:l,rowSizeAndPositionManager:s,prevColumnWidth:t.columnWidth,prevRowHeight:t.rowHeight,prevColumnCount:t.columnCount,prevRowCount:t.rowCount,prevIsScrolling:!0===t.isScrolling,prevScrollToColumn:t.scrollToColumn,prevScrollToRow:t.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},t.scrollToRow>0&&(o._initialScrollTop=o._getCalculatedScrollTop(t,o.state)),t.scrollToColumn>0&&(o._initialScrollLeft=o._getCalculatedScrollLeft(t,o.state)),o}return b(e,a.PureComponent),C(e,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,o=void 0===t?this.props.scrollToAlignment:t,n=e.columnIndex,r=void 0===n?this.props.scrollToColumn:n,i=e.rowIndex,l=void 0===i?this.props.scrollToRow:i,s=Se(Se({},this.props),{},{scrollToAlignment:o,scrollToColumn:r,scrollToRow:l});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,o=void 0===t?0:t,n=e.scrollTop,r=void 0===n?0:n;if(!(r<0)){this._debounceScrollEnded();var i=this.props,l=i.autoHeight,s=i.autoWidth,a=i.height,c=i.width,d=this.state.instanceProps,u=d.scrollbarSize,h=d.rowSizeAndPositionManager.getTotalSize(),f=d.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,f-c+u),o),m=Math.min(Math.max(0,h-a+u),r);if(this.state.scrollLeft!==p||this.state.scrollTop!==m){var g={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:m!==this.state.scrollTop?m>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:we};l||(g.scrollTop=m),s||(g.scrollLeft=p),g.needToResetStyleCache=!1,this.setState(g)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:m,totalColumnsWidth:f,totalRowsHeight:h})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,n=this.state.instanceProps;n.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),n.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n,i=this.props,l=i.scrollToColumn,s=i.scrollToRow,a=this.state.instanceProps;a.columnSizeAndPositionManager.resetCell(o),a.rowSizeAndPositionManager.resetCell(r),this._recomputeScrollLeftFlag=l>=0&&(1===this.state.scrollDirectionHorizontal?o<=l:o>=l),this._recomputeScrollTopFlag=s>=0&&(1===this.state.scrollDirectionVertical?r<=s:r>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,n=this.props.columnCount,r=this.props;n>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(Se(Se({},r),{},{scrollToColumn:t})),void 0!==o&&this._updateScrollTopForScrollToRow(Se(Se({},r),{},{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var t=this.props,o=t.getScrollbarSize,n=t.height,r=t.scrollLeft,i=t.scrollToColumn,l=t.scrollTop,s=t.scrollToRow,a=t.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState(function(e){var t=Se(Se({},e),{},{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"==typeof r&&r>=0||"number"==typeof l&&l>=0){var d=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:r,scrollTop:l});d&&(d.needToResetStyleCache=!1,this.setState(d))}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 u=n>0&&a>0;i>=0&&u&&this._updateScrollLeftForScrollToColumn(),s>=0&&u&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:l||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,n=this.props,r=n.autoHeight,i=n.autoWidth,l=n.columnCount,s=n.height,a=n.rowCount,c=n.scrollToAlignment,d=n.scrollToColumn,u=n.scrollToRow,h=n.width,f=this.state,p=f.scrollLeft,m=f.scrollPositionChangeReason,g=f.scrollTop,v=f.instanceProps;this._handleInvalidatedGridSize();var _=l>0&&0===e.columnCount||a>0&&0===e.rowCount;m===Ce&&(!i&&p>=0&&(p!==this._scrollingContainer.scrollLeft||_)&&(this._scrollingContainer.scrollLeft=p),!r&&g>=0&&(g!==this._scrollingContainer.scrollTop||_)&&(this._scrollingContainer.scrollTop=g));var S=(0===e.width||0===e.height)&&s>0&&h>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):ue({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:c,scrollToIndex:d,size:h,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):ue({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:c,scrollToIndex:u,size:s,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||g!==t.scrollTop){var y=v.rowSizeAndPositionManager.getTotalSize(),w=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:w,totalRowsHeight:y})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&ge(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,i=e.className,l=e.containerProps,s=e.containerRole,c=e.containerStyle,d=e.height,u=e.id,h=e.noContentRenderer,f=e.role,p=e.style,m=e.tabIndex,g=e.width,v=this.state,_=v.instanceProps,S=v.needToResetStyleCache,y=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:n?"auto":d,position:"relative",width:r?"auto":g,WebkitOverflowScrolling:"touch",willChange:"transform"};S&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=_.columnSizeAndPositionManager.getTotalSize(),x=_.rowSizeAndPositionManager.getTotalSize(),R=x>d?_.scrollbarSize:0,b=C>g?_.scrollbarSize:0;b===this._horizontalScrollBarSize&&R===this._verticalScrollBarSize||(this._horizontalScrollBarSize=b,this._verticalScrollBarSize=R,this._scrollbarPresenceChanged=!0),w.overflowX=C+R<=g?"hidden":"auto",w.overflowY=x+b<=d?"hidden":"auto";var T=this._childrenToDisplay,z=0===T.length&&d>0&&g>0;return a.createElement("div",o._extends({ref:this._setScrollingContainerRef},l,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:o.clsx("ReactVirtualized__Grid",i),id:u,onScroll:this._onScroll,role:f,style:Se(Se({},w),p),tabIndex:m}),T.length>0&&a.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:Se({width:t?"auto":C,height:x,maxWidth:C,maxHeight:x,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},c)},T),z&&h())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=e.cellRenderer,n=e.cellRangeRenderer,r=e.columnCount,i=e.deferredMeasurementCache,l=e.height,s=e.overscanColumnCount,a=e.overscanIndicesGetter,c=e.overscanRowCount,d=e.rowCount,u=e.width,h=e.isScrollingOptOut,f=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,m=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,_=this._isScrolling(e,t);if(this._childrenToDisplay=[],l>0&&u>0){var S=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:u,offset:v}),y=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:l,offset:g}),w=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:u,offset:v}),C=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:l,offset:g});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=y.start,this._renderedRowStopIndex=y.stop;var x=a({direction:"horizontal",cellCount:r,overscanCellsCount:s,scrollDirection:f,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),R=a({direction:"vertical",cellCount:d,overscanCellsCount:c,scrollDirection:p,startIndex:"number"==typeof y.start?y.start:0,stopIndex:"number"==typeof y.stop?y.stop:-1}),b=x.overscanStartIndex,T=x.overscanStopIndex,z=R.overscanStartIndex,I=R.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var P=z;P<=I;P++)if(!i.has(P,0)){b=0,T=r-1;break}if(!i.hasFixedWidth())for(var O=b;O<=T;O++)if(!i.has(0,O)){z=0,I=d-1;break}}this._childrenToDisplay=n({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:b,columnStopIndex:T,deferredMeasurementCache:i,horizontalOffsetAdjustment:w,isScrolling:_,isScrollingOptOut:h,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:z,rowStopIndex:I,scrollLeft:v,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:C,visibleColumnIndices:S,visibleRowIndices:y}),this._columnStartIndex=b,this._columnStopIndex=T,this._rowStartIndex=z,this._rowStopIndex=I}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&ge(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=ve(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){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,o=e.scrollLeft,n=e.scrollTop,r=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,n=e.scrollTop,l=t.props,s=l.height;(0,l.onScroll)({clientHeight:s,clientWidth:l.width,scrollHeight:i,scrollLeft:o,scrollTop:n,scrollWidth:r})},indices:{scrollLeft:o,scrollTop:n}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(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(t){var o=t.scrollLeft,n=t.scrollTop,r=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:n});r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollLeft(t,o)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e._getScrollLeftForScrollToColumnStateUpdate(t,o);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollTop(t,o)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var n=this._rowStartIndex;n<=this._rowStopIndex;n++)for(var r=this._columnStartIndex;r<=this._columnStopIndex;r++){var i="".concat(n,"-").concat(r);this._styleCache[i]=e[i],o&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e._getScrollTopForScrollToRowStateUpdate(t,o);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(t,o){var n={};0===t.columnCount&&0!==o.scrollLeft||0===t.rowCount&&0!==o.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(t.scrollLeft!==o.scrollLeft&&t.scrollToColumn<0||t.scrollTop!==o.scrollTop&&t.scrollToRow<0)&&Object.assign(n,e._getScrollToPositionStateUpdate({prevState:o,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}));var r,i,l=o.instanceProps;return n.needToResetStyleCache=!1,t.columnWidth===l.prevColumnWidth&&t.rowHeight===l.prevRowHeight||(n.needToResetStyleCache=!0),l.columnSizeAndPositionManager.configure({cellCount:t.columnCount,estimatedCellSize:e._getEstimatedColumnSize(t),cellSizeGetter:e._wrapSizeGetter(t.columnWidth)}),l.rowSizeAndPositionManager.configure({cellCount:t.rowCount,estimatedCellSize:e._getEstimatedRowSize(t),cellSizeGetter:e._wrapSizeGetter(t.rowHeight)}),0!==l.prevColumnCount&&0!==l.prevRowCount||(l.prevColumnCount=0,l.prevRowCount=0),t.autoHeight&&!1===t.isScrolling&&!0===l.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),re({cellCount:l.prevColumnCount,cellSize:"number"==typeof l.prevColumnWidth?l.prevColumnWidth:null,computeMetadataCallback:function(){return l.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.columnCount,nextCellSize:"number"==typeof t.columnWidth?t.columnWidth:null,nextScrollToIndex:t.scrollToColumn,scrollToIndex:l.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=e._getScrollLeftForScrollToColumnStateUpdate(t,o)}}),re({cellCount:l.prevRowCount,cellSize:"number"==typeof l.prevRowHeight?l.prevRowHeight:null,computeMetadataCallback:function(){return l.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.rowCount,nextCellSize:"number"==typeof t.rowHeight?t.rowHeight:null,nextScrollToIndex:t.scrollToRow,scrollToIndex:l.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=e._getScrollTopForScrollToRowStateUpdate(t,o)}}),l.prevColumnCount=t.columnCount,l.prevColumnWidth=t.columnWidth,l.prevIsScrolling=!0===t.isScrolling,l.prevRowCount=t.rowCount,l.prevRowHeight=t.rowHeight,l.prevScrollToColumn=t.scrollToColumn,l.prevScrollToRow=t.scrollToRow,l.scrollbarSize=t.getScrollbarSize(),void 0===l.scrollbarSize?(l.scrollbarSizeMeasured=!1,l.scrollbarSize=0):l.scrollbarSizeMeasured=!0,n.instanceProps=l,Se(Se(Se({},n),r),i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:Ce};return"number"==typeof o&&o>=0&&(r.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,r.scrollLeft=o),"number"==typeof n&&n>=0&&(r.scrollDirectionVertical=n>t.scrollTop?1:-1,r.scrollTop=n),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof n&&n>=0&&n!==t.scrollTop?r:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,n=e.height,r=e.scrollToAlignment,i=e.scrollToColumn,l=e.width,s=t.scrollLeft,a=t.instanceProps;if(o>0){var c=o-1,d=i<0?c:Math.min(c,i),u=a.rowSizeAndPositionManager.getTotalSize(),h=a.scrollbarSizeMeasured&&u>n?a.scrollbarSize:0;return a.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:l-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(t,o){var n=o.scrollLeft,r=e._getCalculatedScrollLeft(t,o);return"number"==typeof r&&r>=0&&n!==r?e._getScrollToPositionStateUpdate({prevState:o,scrollLeft:r,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,n=e.rowCount,r=e.scrollToAlignment,i=e.scrollToRow,l=e.width,s=t.scrollTop,a=t.instanceProps;if(n>0){var c=n-1,d=i<0?c:Math.min(c,i),u=a.columnSizeAndPositionManager.getTotalSize(),h=a.scrollbarSizeMeasured&&u>l?a.scrollbarSize:0;return a.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:o-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(t,o){var n=o.scrollTop,r=e._getCalculatedScrollTop(t,o);return"number"==typeof r&&r>=0&&n!==r?e._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:r}):{}}}])}();T(xe,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,l=e.columnStopIndex,s=e.deferredMeasurementCache,a=e.horizontalOffsetAdjustment,c=e.isScrolling,d=e.isScrollingOptOut,u=e.parent,h=e.rowSizeAndPositionManager,f=e.rowStartIndex,p=e.rowStopIndex,m=e.styleCache,g=e.verticalOffsetAdjustment,v=e.visibleColumnIndices,_=e.visibleRowIndices,S=[],y=r.areOffsetsAdjusted()||h.areOffsetsAdjusted(),w=!c&&!y,C=f;C<=p;C++)for(var x=h.getSizeAndPositionOfCell(C),R=i;R<=l;R++){var b=r.getSizeAndPositionOfCell(R),T=R>=v.start&&R<=v.stop&&C>=_.start&&C<=_.stop,z="".concat(C,"-").concat(R),I=void 0;w&&m[z]?I=m[z]:s&&!s.has(C,R)?I={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(I={height:x.size,left:b.offset+a,position:"absolute",top:x.offset+g,width:b.size},m[z]=I);var P={columnIndex:R,isScrolling:c,isVisible:T,key:z,parent:u,rowIndex:C,style:I},O=void 0;!d&&!c||a||g?O=o(P):(t[z]||(t[z]=o(P)),O=t[z]),null!=O&&!1!==O&&(O.props.role||(O=n.cloneElement(O,{role:"gridcell"})),S.push(O))}return S},containerRole:"row",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:V,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,n=e.scrollDirection,r=e.startIndex,i=e.stopIndex;return 1===n?{overscanStartIndex:Math.max(0,r),overscanStopIndex:Math.min(t-1,i+o)}:{overscanStartIndex:Math.max(0,r-o),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),O(xe);function Re(e){var t=e.cellCount,o=e.overscanCellsCount,n=e.scrollDirection,r=e.startIndex,i=e.stopIndex;return o=Math.max(1,o),1===n?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(t-1,i+o)}:{overscanStartIndex:Math.max(0,r-o),overscanStopIndex:Math.min(t-1,i+1)}}function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function Te(e,t){if(e){if("string"==typeof e)return be(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?be(e,t):void 0}}function ze(e){return function(e){if(Array.isArray(e))return be(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ie=function(){return!!e})()}var Pe=function(){function e(t,o){var n,r,i,l;return _(this,e),r=this,l=[t,o],i=R(i=e),(n=x(r,Ie()?Reflect.construct(i,l||[],R(r).constructor):i.apply(r,l)))._loadMoreRowsMemoizer=N(),n._onRowsRendered=n._onRowsRendered.bind(n),n._registerChild=n._registerChild.bind(n),n}return b(e,a.PureComponent),C(e,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=N(),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,o=this.props.loadMoreRows;e.forEach(function(e){var n=o(e);n&&n.then(function(){var o,n,r,i,l;o={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex},n=o.lastRenderedStartIndex,r=o.lastRenderedStopIndex,i=o.startIndex,l=o.stopIndex,i>r||l<n||t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;o?o.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,n=this,r=this.props,i=r.isRowLoaded,l=r.minimumBatchSize,s=r.rowCount,a=r.threshold,c=function(e){for(var t=e.isRowLoaded,o=e.minimumBatchSize,n=e.rowCount,r=e.startIndex,i=e.stopIndex,l=[],s=null,a=null,c=r;c<=i;c++){t({index:c})?null!==a&&(l.push({startIndex:s,stopIndex:a}),s=a=null):(a=c,null===s&&(s=c))}if(null!==a){for(var d=Math.min(Math.max(a,s+o-1),n-1),u=a+1;u<=d&&!t({index:u});u++)a=u;l.push({startIndex:s,stopIndex:a})}if(l.length)for(var h=l[0];h.stopIndex-h.startIndex+1<o&&h.startIndex>0;){var f=h.startIndex-1;if(t({index:f}))break;h.startIndex=f}return l}({isRowLoaded:i,minimumBatchSize:l,rowCount:s,startIndex:Math.max(0,e-a),stopIndex:Math.min(s-1,t+a)}),d=(o=[]).concat.apply(o,ze(c.map(function(e){return[e.startIndex,e.stopIndex]})));this._loadMoreRowsMemoizer({callback:function(){n._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}])}();function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}T(Pe,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),Pe.propTypes={};var ke=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,Oe()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"Grid",void 0),T(t,"_cellRenderer",function(e){var o=e.parent,n=e.rowIndex,r=e.style,i=e.isScrolling,l=e.isVisible,s=e.key,a=t.props.rowRenderer,c=Object.getOwnPropertyDescriptor(r,"width");return c&&c.writable&&(r.width="100%"),a({index:n,style:r,isScrolling:i,isVisible:l,key:s,parent:o})}),T(t,"_setRef",function(e){t.Grid=e}),T(t,"_onScroll",function(e){var o=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,t.props.onScroll)({clientHeight:o,scrollHeight:n,scrollTop:r})}),T(t,"_onSectionRendered",function(e){var o=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,t.props.onRowsRendered)({overscanStartIndex:o,overscanStopIndex:n,startIndex:r,stopIndex:i})}),t}return b(e,a.PureComponent),C(e,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[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,i=e.width,l=o.clsx("ReactVirtualized__List",t);return a.createElement(xe,o._extends({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:l,columnWidth:i,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}])}();function Me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i,l,s=[],a=!0,c=!1;try{if(i=(o=o.call(e)).next,0===t);else for(;!(a=(n=i.call(o)).done)&&(s.push(n.value),s.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{if(!a&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||Te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}T(ke,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:Re,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const Le={ge:function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(var i=o+1;t<=o;){var l=t+o>>>1;r(e[l],n)>=0?(i=l,o=l-1):t=l+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(var r=o+1;t<=o;){var i=t+o>>>1;e[i]>=n?(r=i,o=i-1):t=i+1}return r}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)},gt:function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(var i=o+1;t<=o;){var l=t+o>>>1;r(e[l],n)>0?(i=l,o=l-1):t=l+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(var r=o+1;t<=o;){var i=t+o>>>1;e[i]>n?(r=i,o=i-1):t=i+1}return r}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)},lt:function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(var i=t-1;t<=o;){var l=t+o>>>1;r(e[l],n)<0?(i=l,t=l+1):o=l-1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(var r=t-1;t<=o;){var i=t+o>>>1;e[i]<n?(r=i,t=i+1):o=i-1}return r}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)},le:function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(var i=t-1;t<=o;){var l=t+o>>>1;r(e[l],n)<=0?(i=l,t=l+1):o=l-1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(var r=t-1;t<=o;){var i=t+o>>>1;e[i]<=n?(r=i,t=i+1):o=i-1}return r}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)},eq:function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(;t<=o;){var i=t+o>>>1,l=r(e[i],n);if(0===l)return i;l<=0?t=i+1:o=i-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(;t<=o;){var r=t+o>>>1,i=e[r];if(i===n)return r;i<=n?t=r+1:o=r-1}return-1}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)}};function Ge(e,t,o,n,r){this.mid=e,this.left=t,this.right=o,this.leftPoints=n,this.rightPoints=r,this.count=(t?t.count:0)+(o?o.count:0)+n.length}var Ae=Ge.prototype;function Ee(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function We(e,t){var o=qe(t);e.mid=o.mid,e.left=o.left,e.right=o.right,e.leftPoints=o.leftPoints,e.rightPoints=o.rightPoints,e.count=o.count}function He(e,t){var o=e.intervals([]);o.push(t),We(e,o)}function De(e,t){var o=e.intervals([]),n=o.indexOf(t);return n<0?0:(o.splice(n,1),We(e,o),1)}function je(e,t,o){for(var n=0;n<e.length&&e[n][0]<=t;++n){var r=o(e[n]);if(r)return r}}function Fe(e,t,o){for(var n=e.length-1;n>=0&&e[n][1]>=t;--n){var r=o(e[n]);if(r)return r}}function Ne(e,t){for(var o=0;o<e.length;++o){var n=t(e[o]);if(n)return n}}function Be(e,t){return e-t}function Ue(e,t){var o=e[0]-t[0];return o||e[1]-t[1]}function Ve(e,t){var o=e[1]-t[1];return o||e[0]-t[0]}function qe(e){if(0===e.length)return null;for(var t=[],o=0;o<e.length;++o)t.push(e[o][0],e[o][1]);t.sort(Be);var n=t[t.length>>1],r=[],i=[],l=[];for(o=0;o<e.length;++o){var s=e[o];s[1]<n?r.push(s):n<s[0]?i.push(s):l.push(s)}var a=l,c=l.slice();return a.sort(Ue),c.sort(Ve),new Ge(n,qe(r),qe(i),a,c)}function $e(e){this.root=e}Ae.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},Ae.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?He(this,e):this.left.insert(e):this.left=qe([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?He(this,e):this.right.insert(e):this.right=qe([e]);else{var o=Le.ge(this.leftPoints,e,Ue),n=Le.ge(this.rightPoints,e,Ve);this.leftPoints.splice(o,0,e),this.rightPoints.splice(n,0,e)}},Ae.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?De(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?De(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var o=this,n=this.left;n.right;)o=n,n=n.right;if(o===this)n.right=this.right;else{var r=this.left,i=this.right;o.count-=n.count,o.right=n.left,n.left=r,n.right=i}Ee(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Ee(this,this.left):Ee(this,this.right);return 1}for(r=Le.ge(this.leftPoints,e,Ue);r<this.leftPoints.length&&this.leftPoints[r][0]===e[0];++r)if(this.leftPoints[r]===e){this.count-=1,this.leftPoints.splice(r,1);for(i=Le.ge(this.rightPoints,e,Ve);i<this.rightPoints.length&&this.rightPoints[i][1]===e[1];++i)if(this.rightPoints[i]===e)return this.rightPoints.splice(i,1),1}return 0},Ae.queryPoint=function(e,t){if(e<this.mid){if(this.left)if(o=this.left.queryPoint(e,t))return o;return je(this.leftPoints,e,t)}if(e>this.mid){var o;if(this.right)if(o=this.right.queryPoint(e,t))return o;return Fe(this.rightPoints,e,t)}return Ne(this.leftPoints,t)},Ae.queryInterval=function(e,t,o){var n;if(e<this.mid&&this.left&&(n=this.left.queryInterval(e,t,o)))return n;if(t>this.mid&&this.right&&(n=this.right.queryInterval(e,t,o)))return n;return t<this.mid?je(this.leftPoints,t,o):e>this.mid?Fe(this.rightPoints,e,o):Ne(this.leftPoints,o)};var Ke=$e.prototype;Ke.insert=function(e){this.root?this.root.insert(e):this.root=new Ge(e[0],null,null,[e],[e])},Ke.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},Ke.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Ke.queryInterval=function(e,t,o){if(e<=t&&this.root)return this.root.queryInterval(e,t,o)},Object.defineProperty(Ke,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Ke,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Xe=function(){return C(function e(){_(this,e),T(this,"_columnSizeMap",{}),T(this,"_intervalTree",new $e(null)),T(this,"_leftMap",{})},[{key:"estimateTotalHeight",value:function(e,t,o){var n=e-this.count;return this.tallestColumnSize+Math.ceil(n/t)*o}},{key:"range",value:function(e,t,o){var n=this;this._intervalTree.queryInterval(e,e+t,function(e){var t=Me(e,3),r=t[0];t[1];var i=t[2];return o(i,n._leftMap[i],r)})}},{key:"setPosition",value:function(e,t,o,n){this._intervalTree.insert([o,o+n,e]),this._leftMap[e]=t;var r=this._columnSizeMap,i=r[t];r[t]=void 0===i?o+n:Math.max(i,o+n)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var n=e[o];t=0===t?n:Math.min(t,n)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var n=e[o];t=Math.max(t,n)}return t}}])}();function Ye(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Je(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ye(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ze=function(){return!!e})()}var Qe=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,Ze()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollTop:0}),T(t,"_debounceResetIsScrollingId",void 0),T(t,"_invalidateOnUpdateStartIndex",null),T(t,"_invalidateOnUpdateStopIndex",null),T(t,"_positionCache",new Xe),T(t,"_startIndex",null),T(t,"_startIndexMemoized",null),T(t,"_stopIndex",null),T(t,"_stopIndexMemoized",null),T(t,"_debounceResetIsScrollingCallback",function(){t.setState({isScrolling:!1})}),T(t,"_setScrollingContainerRef",function(e){t._scrollingContainer=e}),T(t,"_onScroll",function(e){var o=t.props.height,n=e.currentTarget.scrollTop,r=Math.min(Math.max(0,t._getEstimatedTotalHeight()-o),n);n===r&&(t._debounceResetIsScrolling(),t.state.scrollTop!==r&&t.setState({isScrolling:!0,scrollTop:r}))}),t}return b(e,a.PureComponent),C(e,[{key:"clearCellPositions",value:function(){this._positionCache=new Xe,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(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 Xe,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&&ge(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.autoHeight,i=n.cellCount,l=n.cellMeasurerCache,s=n.cellRenderer,c=n.className,d=n.height,u=n.id,h=n.keyMapper,f=n.overscanByPixels,p=n.role,m=n.style,g=n.tabIndex,v=n.width,_=n.rowDirection,S=this.state,y=S.isScrolling,w=S.scrollTop,C=[],x=this._getEstimatedTotalHeight(),R=this._positionCache.shortestColumnSize,b=this._positionCache.count,z=0;if(this._positionCache.range(Math.max(0,w-f),d+2*f,function(o,n,r){void 0===e?(z=o,e=o):(z=Math.min(z,o),e=Math.max(e,o)),C.push(s({index:o,isScrolling:y,key:h(o),parent:t,style:T(T(T(T({height:l.getHeight(o)},"ltr"===_?"left":"right",n),"position","absolute"),"top",r),"width",l.getWidth(o))}))}),R<w+d+f&&b<i)for(var I=Math.min(i-b,Math.ceil((w+d+f-R)/l.defaultHeight*v/l.defaultWidth)),P=b;P<b+I;P++)e=P,C.push(s({index:P,isScrolling:y,key:h(P),parent:this,style:{width:l.getWidth(P)}}));return this._startIndex=z,this._stopIndex=e,a.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:o.clsx("ReactVirtualized__Masonry",c),id:u,onScroll:this._onScroll,role:p,style:Je({boxSizing:"border-box",direction:"ltr",height:r?"auto":d,overflowX:"hidden",overflowY:x<d?"hidden":"auto",position:"relative",width:v,WebkitOverflowScrolling:"touch",willChange:"transform"},m),tabIndex:g},a.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:x,maxWidth:"100%",maxHeight:x,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"}},C))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){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&&ge(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=ve(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,n=e.width,r=Math.max(1,Math.floor(n/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,n=this.state.scrollTop;this._onScrollMemoized!==n&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:n}),this._onScrollMemoized=n)}},{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 o=this.props,n=o.cellMeasurerCache,r=o.cellPositioner,i=e;i<=t;i++){var l=r(i),s=l.left,a=l.top;this._positionCache.setPosition(i,s,a,n.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}])}();function et(){}T(Qe,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:et,onScroll:et,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),O(Qe);var tt=function(){return C(function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_(this,e),T(this,"_cellMeasurerCache",void 0),T(this,"_columnIndexOffset",void 0),T(this,"_rowIndexOffset",void 0),T(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),T(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var n=o.cellMeasurerCache,r=o.columnIndexOffset,i=void 0===r?0:r,l=o.rowIndexOffset,s=void 0===l?0:l;this._cellMeasurerCache=n,this._columnIndexOffset=i,this._rowIndexOffset=s},[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+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(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,n){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,n)}}])}(),ot=["rowIndex"],nt=["columnIndex","rowIndex"],rt=["columnIndex"],it=["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"];function lt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function st(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(at=function(){return!!e})()}var ct=function(){function e(t,o){var n,r,i,l;_(this,e),r=this,l=[t,o],i=R(i=e),T(n=x(r,at()?Reflect.construct(i,l||[],R(r).constructor):i.apply(r,l)),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),T(n,"_deferredInvalidateColumnIndex",null),T(n,"_deferredInvalidateRowIndex",null),T(n,"_bottomLeftGridRef",function(e){n._bottomLeftGrid=e}),T(n,"_bottomRightGridRef",function(e){n._bottomRightGrid=e}),T(n,"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=ie(e,ot),r=n.props,i=r.cellRenderer,l=r.fixedRowCount;return t===r.rowCount-l?a.createElement("div",{key:o.key,style:st(st({},o.style),{},{height:20})}):i(st(st({},o),{},{parent:n,rowIndex:t+l}))}),T(n,"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,r=ie(e,nt),i=n.props,l=i.cellRenderer,s=i.fixedColumnCount,a=i.fixedRowCount;return l(st(st({},r),{},{columnIndex:t+s,parent:n,rowIndex:o+a}))}),T(n,"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=ie(e,rt),r=n.props,i=r.cellRenderer,l=r.columnCount,s=r.fixedColumnCount;return t===l-s?a.createElement("div",{key:o.key,style:st(st({},o.style),{},{width:20})}):i(st(st({},o),{},{columnIndex:t+s,parent:n}))}),T(n,"_columnWidthRightGrid",function(e){var t=e.index,o=n.props,r=o.columnCount,i=o.fixedColumnCount,l=o.columnWidth,s=n.state,a=s.scrollbarSize;return s.showHorizontalScrollbar&&t===r-i?a:"function"==typeof l?l({index:t+i}):l}),T(n,"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;n.setState({scrollLeft:t,scrollTop:o});var r=n.props.onScroll;r&&r(e)}),T(n,"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,r=e.vertical,i=n.state,l=i.showHorizontalScrollbar,s=i.showVerticalScrollbar;if(t!==l||r!==s){n.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:r});var a=n.props.onScrollbarPresenceChange;"function"==typeof a&&a({horizontal:t,size:o,vertical:r})}}),T(n,"_onScrollLeft",function(e){var t=e.scrollLeft;n._onScroll({scrollLeft:t,scrollTop:n.state.scrollTop})}),T(n,"_onScrollTop",function(e){var t=e.scrollTop;n._onScroll({scrollTop:t,scrollLeft:n.state.scrollLeft})}),T(n,"_rowHeightBottomGrid",function(e){var t=e.index,o=n.props,r=o.fixedRowCount,i=o.rowCount,l=o.rowHeight,s=n.state,a=s.scrollbarSize;return s.showVerticalScrollbar&&t===i-r?a:"function"==typeof l?l({index:t+r}):l}),T(n,"_topLeftGridRef",function(e){n._topLeftGrid=e}),T(n,"_topRightGridRef",function(e){n._topRightGrid=e});var s=t.deferredMeasurementCache,c=t.fixedColumnCount,d=t.fixedRowCount;return n._maybeCalculateCachedStyles(!0),s&&(n._deferredMeasurementCacheBottomLeftGrid=d>0?new tt({cellMeasurerCache:s,columnIndexOffset:0,rowIndexOffset:d}):s,n._deferredMeasurementCacheBottomRightGrid=c>0||d>0?new tt({cellMeasurerCache:s,columnIndexOffset:c,rowIndexOffset:d}):s,n._deferredMeasurementCacheTopRightGrid=c>0?new tt({cellMeasurerCache:s,columnIndexOffset:c,rowIndexOffset:0}):s),n}return b(e,a.PureComponent),C(e,[{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&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,r):r}},{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&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n,i=this.props,l=i.fixedColumnCount,s=i.fixedRowCount,a=Math.max(0,o-l),c=Math.max(0,r-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:a,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:r}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:a,rowIndex:r}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var n={};t>0&&(n.scrollLeft=t),o>0&&(n.scrollTop=o),this.setState(n)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered;e.onScrollbarPresenceChange,e.scrollLeft;var n=e.scrollToColumn;e.scrollTop;var r=e.scrollToRow,i=ie(e,it);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,s=l.scrollLeft,c=l.scrollTop;return a.createElement("div",{style:this._containerOuterStyle},a.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(st(st({},i),{},{onScroll:t,scrollLeft:s}))),a.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(st(st({},i),{},{onScroll:t,scrollTop:c})),this._renderBottomRightGrid(st(st({},i),{},{onScroll:t,onSectionRendered:o,scrollLeft:s,scrollToColumn:n,scrollToRow:r,scrollTop:c}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var n=0,r=0;r<t;r++)n+=o({index:r});this._leftGridWidth=n}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var n=0,r=0;r<t;r++)n+=o({index:r});this._topGridHeight=n}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){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,o=t.columnWidth,n=t.enableFixedColumnScroll,r=t.enableFixedRowScroll,i=t.height,l=t.fixedColumnCount,s=t.fixedRowCount,a=t.rowHeight,c=t.style,d=t.styleBottomLeftGrid,u=t.styleBottomRightGrid,h=t.styleTopLeftGrid,f=t.styleTopRightGrid,p=t.width,m=e||i!==this._lastRenderedHeight||p!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||l!==this._lastRenderedFixedColumnCount,v=e||s!==this._lastRenderedFixedRowCount||a!==this._lastRenderedRowHeight;(e||m||c!==this._lastRenderedStyle)&&(this._containerOuterStyle=st({height:i,overflow:"visible",width:p},c)),(e||m||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:p},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:p}),(e||d!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=st({left:0,overflowX:"hidden",overflowY:n?"auto":"hidden",position:"absolute"},d)),(e||g||u!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=st({left:this._getLeftGridWidth(this.props),position:"absolute"},u)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=st({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||g||f!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=st({left:this._getLeftGridWidth(this.props),overflowX:r?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},f)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=l,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=i,this._lastRenderedRowHeight=a,this._lastRenderedStyle=c,this._lastRenderedStyleBottomLeftGrid=d,this._lastRenderedStyleBottomRightGrid=u,this._lastRenderedStyleTopLeftGrid=h,this._lastRenderedStyleTopRightGrid=f,this._lastRenderedWidth=p}},{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,i=e.rowCount,l=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!n)return null;var c=s?1:0,d=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),h=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,f=l?u+h:u,p=a.createElement(xe,o._extends({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:d,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+c,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:f}));return l?a.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:st(st({},this._bottomLeftGridStyle),{},{height:d,width:u,overflowY:"hidden"})},p):p}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,n=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,l=e.scrollToColumn,s=e.scrollToRow;return a.createElement(xe,o._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,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:l-n,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,n=e.fixedRowCount;return t&&n?a.createElement(xe,o._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,i=e.fixedRowCount,l=e.scrollLeft,s=e.hideTopRightGridScrollbar,c=this.state,d=c.showHorizontalScrollbar,u=c.scrollbarSize;if(!i)return null;var h=d?1:0,f=this._getTopGridHeight(e),p=this._getRightGridWidth(e),m=d?u:0,g=f,v=this._topRightGridStyle;s&&(g=f+m,v=st(st({},this._topRightGridStyle),{},{left:0}));var _=a.createElement(xe,o._extends({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+h,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:g,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:l,style:v,tabIndex:null,width:p}));return s?a.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:st(st({},this._topRightGridStyle),{},{height:f,width:p,overflowX:"hidden"})},_):_}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}])}();function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}T(ct,"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}),ct.propTypes={},O(ct),(function(){function e(t,o){var n,r,i,l;return _(this,e),r=this,l=[t,o],i=R(i=e),(n=x(r,dt()?Reflect.construct(i,l||[],R(r).constructor):i.apply(r,l))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},n._onScroll=n._onScroll.bind(n),n}return b(e,a.PureComponent),C(e,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,n=t.clientWidth,r=t.scrollHeight,i=t.scrollLeft,l=t.scrollTop,s=t.scrollWidth;return e({clientHeight:o,clientWidth:n,onScroll:this._onScroll,scrollHeight:r,scrollLeft:i,scrollTop:l,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,n=e.scrollHeight,r=e.scrollLeft,i=e.scrollTop,l=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:n,scrollLeft:r,scrollTop:i,scrollWidth:l})}}])}()).propTypes={};var ut="ASC",ht="DESC";function ft(e){var t=e.sortDirection,n=o.clsx("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===ut,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===ht});return a.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===ut?a.createElement("path",{d:"M7 14l5-5 5 5z"}):a.createElement("path",{d:"M7 10l5 5 5-5z"}),a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pt=function(){return!!e})()}ft.propTypes={};var mt=function(){function e(){return _(this,e),t=this,n=arguments,o=R(o=e),x(t,pt()?Reflect.construct(o,n||[],R(t).constructor):o.apply(t,n));var t,o,n}return b(e,a.Component),C(e)}();function gt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function vt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}T(mt,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:ut,flexGrow:0,flexShrink:1,headerRenderer:function(e){var t=e.dataKey,o=e.label,n=e.sortBy,r=e.sortDirection,i=n===t,l=[a.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return i&&l.push(a.createElement(ft,{key:"SortIndicator",sortDirection:r})),l},style:{}}),mt.propTypes={};var St=function(){function e(t){var o,n,r,i;return _(this,e),n=this,i=[t],r=R(r=e),(o=x(n,_t()?Reflect.construct(r,i||[],R(n).constructor):r.apply(n,i))).state={scrollbarWidth:0},o._createColumn=o._createColumn.bind(o),o._createRow=o._createRow.bind(o),o._onScroll=o._onScroll.bind(o),o._onSectionRendered=o._onSectionRendered.bind(o),o._setRef=o._setRef.bind(o),o._setGridElementRef=o._setGridElementRef.bind(o),o}return b(e,a.PureComponent),C(e,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[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,i=t.disableHeader,l=t.gridClassName,s=t.gridStyle,c=t.headerHeight,d=t.headerRowRenderer,u=t.height,h=t.id,f=t.noRowsRenderer,p=t.rowClassName,m=t.rowStyle,g=t.scrollToIndex,v=t.style,_=t.width,S=this.state.scrollbarWidth,y=i?u:u-c,w="function"==typeof p?p({index:-1}):p,C="function"==typeof m?m({index:-1}):m;return this._cachedColumnStyles=[],a.Children.toArray(n).forEach(function(t,o){var n=e._getFlexStyleForColumn(t,t.props.style||mt.defaultProps.style);e._cachedColumnStyles[o]=vt({overflow:"hidden"},n)}),a.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":a.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:o.clsx("ReactVirtualized__Table",r),id:h,role:"grid",style:v},!i&&d({className:o.clsx("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:vt({height:c,overflow:"hidden",paddingRight:S,width:_},C)}),a.createElement(xe,o._extends({},this.props,{elementRef:this._setGridElementRef,"aria-readonly":null,autoContainerWidth:!0,className:o.clsx("ReactVirtualized__Table__Grid",l),cellRenderer:this._createRow,columnWidth:_,columnCount:1,height:y,id:void 0,noContentRenderer:f,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:S,scrollToRow:g,style:vt(vt({},s),{},{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,i=e.parent,l=e.rowData,s=e.rowIndex,c=this.props.onColumnClick,d=t.props,u=d.cellDataGetter,h=d.cellRenderer,f=d.className,p=d.columnData,m=d.dataKey,g=d.id,v=h({cellData:u({columnData:p,dataKey:m,rowData:l}),columnData:p,columnIndex:n,dataKey:m,isScrolling:r,parent:i,rowData:l,rowIndex:s}),_=this._cachedColumnStyles[n],S="string"==typeof v?v:null;return a.createElement("div",{"aria-colindex":n+1,"aria-describedby":g,className:o.clsx("ReactVirtualized__Table__rowColumn",f),key:"Row"+s+"-Col"+n,onClick:function(e){c&&c({columnData:p,dataKey:m,event:e})},role:"gridcell",style:_,title:S},v)}},{key:"_createHeader",value:function(e){var t,n,r,i,l,s=e.column,c=e.index,d=this.props,u=d.headerClassName,h=d.headerStyle,f=d.onHeaderClick,p=d.sort,m=d.sortBy,g=d.sortDirection,v=s.props,_=v.columnData,S=v.dataKey,y=v.defaultSortDirection,w=v.disableSort,C=v.headerRenderer,x=v.id,R=v.label,b=!w&&p,T=o.clsx("ReactVirtualized__Table__headerColumn",u,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:b}),z=this._getFlexStyleForColumn(s,vt(vt({},h),s.props.headerStyle)),I=C({columnData:_,dataKey:S,disableSort:w,label:R,sortBy:m,sortDirection:g});if(b||f){var P=m!==S?y:g===ht?ut:ht,O=function(e){b&&p({defaultSortDirection:y,event:e,sortBy:S,sortDirection:P}),f&&f({columnData:_,dataKey:S,event:e})};l=s.props["aria-label"]||R||S,i="none",r=0,t=O,n=function(e){"Enter"!==e.key&&" "!==e.key||O(e)}}return m===S&&(i=g===ut?"ascending":"descending"),a.createElement("div",{"aria-label":l,"aria-sort":i,className:T,id:x,key:"Header-Col"+c,onClick:t,onKeyDown:n,role:"columnheader",style:z,tabIndex:r},I)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,i=e.key,l=e.parent,s=e.style,c=this.props,d=c.children,u=c.onRowClick,h=c.onRowDoubleClick,f=c.onRowRightClick,p=c.onRowMouseOver,m=c.onRowMouseOut,g=c.rowClassName,v=c.rowGetter,_=c.rowRenderer,S=c.rowStyle,y=this.state.scrollbarWidth,w="function"==typeof g?g({index:n}):g,C="function"==typeof S?S({index:n}):S,x=v({index:n}),R=a.Children.toArray(d).map(function(e,o){return t._createColumn({column:e,columnIndex:o,isScrolling:r,parent:l,rowData:x,rowIndex:n,scrollbarWidth:y})}),b=o.clsx("ReactVirtualized__Table__row",w),T=vt(vt({},s),{},{height:this._getRowHeight(n),overflow:"hidden",paddingRight:y},C);return _({className:b,columns:R,index:n,isScrolling:r,key:i,onRowClick:u,onRowDoubleClick:h,onRowRightClick:f,onRowMouseOver:p,onRowMouseOut:m,rowData:x,style:T})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),n=vt(vt({},t),{},{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(n.maxWidth=e.props.maxWidth),e.props.minWidth&&(n.minWidth=e.props.minWidth),n}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children;return(t.disableHeader?[]:a.Children.toArray(o)).map(function(t,o){return e._createHeader({column:t,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,n=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:n})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,n=e.rowStartIndex,r=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:n,stopIndex:r})}},{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})}}])}();T(St,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Re,overscanRowCount:10,rowRenderer:function(e){var t=e.className,n=e.columns,r=e.index,i=e.key,l=e.onRowClick,s=e.onRowDoubleClick,c=e.onRowMouseOut,d=e.onRowMouseOver,u=e.onRowRightClick,h=e.rowData,f=e.style,p={"aria-rowindex":r+1};return(l||s||c||d||u)&&(p["aria-label"]="row",p.tabIndex=0,l&&(p.onClick=function(e){return l({event:e,index:r,rowData:h})}),s&&(p.onDoubleClick=function(e){return s({event:e,index:r,rowData:h})}),c&&(p.onMouseOut=function(e){return c({event:e,index:r,rowData:h})}),d&&(p.onMouseOver=function(e){return d({event:e,index:r,rowData:h})}),u&&(p.onContextMenu=function(e){return u({event:e,index:r,rowData:h})})),a.createElement("div",o._extends({},p,{className:t,key:i,role:"row",style:f}),n)},headerRowRenderer:function(e){var t=e.className,o=e.columns,n=e.style;return a.createElement("div",{className:t,role:"row",style:n},o)},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),St.propTypes={};var yt=[],wt=null,Ct=null;function xt(){Ct&&(Ct=null,document.body&&null!=wt&&(document.body.style.pointerEvents=wt),wt=null)}function Rt(){xt(),yt.forEach(function(e){return e.__resetIsScrolling()})}function bt(e){e.currentTarget===window&&null==wt&&document.body&&(wt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){Ct&&ge(Ct);var e=0;yt.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),Ct=ve(Rt,e)}(),yt.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function Tt(e,t){yt.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",bt),yt.push(e)}function zt(e,t){(yt=yt.filter(function(t){return t!==e})).length||(t.removeEventListener("scroll",bt),Ct&&(ge(Ct),xt()))}var It=function(e){return e===window},Pt=function(e){return e.getBoundingClientRect()};function Ot(e,t){if(e){if(It(e)){var o=window,n=o.innerHeight,r=o.innerWidth;return{height:"number"==typeof n?n:0,width:"number"==typeof r?r:0}}return Pt(e)}return{height:t.serverHeight,width:t.serverWidth}}function kt(e){return It(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function Mt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Lt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(o),!0).forEach(function(t){T(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Mt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gt=function(){return!!e})()}var At=function(){return"undefined"!=typeof window?window:void 0},Et=function(){function e(){var t,o,n,r;_(this,e);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=e,r=[].concat(l),n=R(n),T(t=x(o,Gt()?Reflect.construct(n,r||[],R(o).constructor):n.apply(o,r)),"_window",At()),T(t,"_isMounted",!1),T(t,"_positionFromTop",0),T(t,"_positionFromLeft",0),T(t,"_detectElementResize",void 0),T(t,"_child",void 0),T(t,"_windowScrollerRef",a.createRef()),T(t,"state",Lt(Lt({},Ot(t.props.scrollElement,t.props)),{},{isScrolling:!1,scrollLeft:0,scrollTop:0})),T(t,"_registerChild",function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),t._child=e,t.updatePosition()}),T(t,"_onChildScroll",function(e){var o=e.scrollTop;if(t.state.scrollTop!==o){var n=t.props.scrollElement;n&&("function"==typeof n.scrollTo?n.scrollTo(0,o+t._positionFromTop):n.scrollTop=o+t._positionFromTop)}}),T(t,"_registerResizeListener",function(e){e===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(e,t._onResize)}),T(t,"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",t._onResize,!1):e&&t._detectElementResize.removeResizeListener(e,t._onResize)}),T(t,"_onResize",function(){t.updatePosition()}),T(t,"__handleWindowScrollEvent",function(){if(t._isMounted){var e=t.props.onScroll,o=t.props.scrollElement;if(o){var n=kt(o),r=Math.max(0,n.left-t._positionFromLeft),i=Math.max(0,n.top-t._positionFromTop);t.setState({isScrolling:!0,scrollLeft:r,scrollTop:i}),e({scrollLeft:r,scrollTop:i})}}}),T(t,"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return b(e,a.PureComponent),C(e,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,n=o.height,r=o.width,i=this._child||this._windowScrollerRef.current;if(i instanceof Element&&e){var l=function(e,t){if(It(t)&&document.documentElement){var o=document.documentElement,n=Pt(e),r=Pt(o);return{top:n.top-r.top,left:n.left-r.left}}var i=kt(t),l=Pt(e),s=Pt(t);return{top:l.top+i.top-s.top,left:l.left+i.left-s.left}}(i,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var s=Ot(e,this.props);n===s.height&&r===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width})),!0===this.props.updateScrollTopOnUpdatePosition&&(this.__handleWindowScrollEvent(),this.__resetIsScrolling())}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=A(),this.updatePosition(e),e&&(Tt(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,n=e.scrollElement;n!==o&&null!=n&&null!=o&&(this.updatePosition(o),zt(this,n),Tt(this,o),this._unregisterResizeListener(n),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(zt(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,n=t.scrollTop,r=t.scrollLeft,i=t.height,l=t.width;return a.createElement("div",{ref:this._windowScrollerRef},e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:o,scrollLeft:r,scrollTop:n,width:l}))}}])}();T(Et,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:At(),serverHeight:0,serverWidth:0});const Wt="ReactVirtualizedDemo-flexContainer",Ht="ReactVirtualizedDemo-tableRow",Dt="ReactVirtualizedDemo-tableRowHover",jt="ReactVirtualizedDemo-tableCell",Ft="ReactVirtualizedDemo-noClick";class Nt extends n.PureComponent{constructor(){super(...arguments),this.getRowClassName=({index:e})=>{const{onRowClick:t}=this.props;return o.clsx$1(Ht,Wt,{[Dt]:-1!==e&&null!=t})},this.cellRenderer=({cellData:n,dataKey:r,columnIndex:i,width:l})=>{const{columns:s,rowHeight:a,onRowClick:c}=this.props;let d=n,u={height:a,paddingRight:"2px",paddingTop:"0px",paddingBottom:"0px",minWidth:`${l}px`,maxWidth:`${l}px`};return"shortcut"===r?d=o.Au(n):"description"===r&&(u={...u,fontSize:".75rem",display:"block",paddingTop:"4px",whiteSpace:"pre-line"}),e.jsx(t.TableCell,{component:"div",className:o.clsx$1(jt,Wt,{[Ft]:null==c}),variant:"body",style:u,align:null!=i&&s[i].numeric?"right":"left",children:d})},this.headerRenderer=({label:n,columnIndex:r,width:i})=>{const{headerHeight:l,columns:s}=this.props,a=s[r];return e.jsx(t.TableCell,{component:"div",className:o.clsx$1(jt,Wt,Ft),variant:"head",sx:{width:i,height:l,backgroundColor:e=>e.palette.grey[300]},align:a.numeric?"right":"left",children:e.jsx("span",{children:a.label})})}}static{this.defaultProps={headerHeight:40,rowHeight:48}}render(){const{columns:t,rowHeight:o,headerHeight:n,...r}=this.props;return e.jsx(D,{children:({height:i,width:l})=>e.jsx(St,{height:i,width:l,rowHeight:o,gridStyle:{direction:"inherit"},headerHeight:n,...r,rowClassName:this.getRowClassName,children:t.map(({dataKey:t,width:o,widthLess:n,...r},i)=>{const s=n?l-n:o;return e.jsx(mt,{style:{flex:`1 1 ${s}px`},headerRenderer:e=>this.headerRenderer({...e,width:s,columnIndex:i}),className:Wt,cellDataGetter:({rowData:e,columnData:t,dataKey:o})=>e[o],cellRenderer:e=>this.cellRenderer({...e,width:s,columnIndex:i}),dataKey:t,width:s,...r},t)})})})}}const Bt=v(Nt)(({theme:e})=>({"& .ReactVirtualized__Table__headerRow":{..."rtl"===e.direction&&{paddingLeft:"0 !important"},..."rtl"!==e.direction&&{paddingRight:void 0}},"& .ReactVirtualized__Table__Grid":{outline:"none"},[`& .${Wt}`]:{display:"flex",alignItems:"center",boxSizing:"border-box"},[`& .${Ht}`]:{cursor:"pointer"},[`& .${Dt}`]:{"&:hover:not([disabled])":{backgroundColor:e.palette.grey[200]}},[`& .${jt}`]:{flex:1},[`& .${Ft}`]:{cursor:"initial"}}));function Ut(i){const{commands:s,...a}=i,[c,d]=n.useState(!1),[u,h]=n.useState(""),f=n.useMemo(()=>{let e=s.getAllCommands();c||(e=e.filter(e=>e.command.shortcut())),e.sort((e,t)=>e.command.label().localeCompare(t.command.label()));const t=[],o=e=>e.replace(/\n\n/g,"\n");for(let n=0;n<e.length;n++){const r=e[n].command,i=r.shortcut();if(Array.isArray(i)){const e=i;for(let n=0;n<e.length;n++)t.push({label:r.label(),description:o(r.description()),shortcut:e[n]})}else t.push({label:r.label(),description:o(r.description()),shortcut:r.shortcut()})}return t},[c,s]),[p,m]=n.useState(null);n.useEffect(()=>{Promise.resolve().then(()=>require("./VTMW1yjPzEJGyBmh.cjs")).then(e=>{m(new e.default(f,{threshold:0,ignoreLocation:!0,keys:["label","description"]}))})},[f]);const[g,v]=n.useState(f),_=u.length>0&&0===g.length;n.useEffect(()=>{p&&o.et.debounce(()=>{if(0===u.trim().length)return void v(f);const e=p.search(u.trim()),t=new Array(e.length);for(let o=0;o<e.length;o++)t[o]=e[o].item;v(t)},90)()},[p,u]);return e.jsxs(t.Box,{style:{height:440,width:"100%",display:"flex",flexDirection:"column"},...a,children:[e.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",marginBottom:e=>e.spacing(2),color:e=>e.palette.text.secondary},children:[e.jsx(t.TextField,{InputProps:{sx:{backgroundImage:`linear-gradient(${l.alpha("#fff",o.getOverlayAlpha(5))}, ${l.alpha("#fff",o.getOverlayAlpha(5))})`},inputProps:{className:"input",autoFocus:!0,spellCheck:!1,placeholder:"Type to search key bindings",autoComplete:"off",sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(1)}},endAdornment:e.jsx(t.InputAdornment,{sx:{opacity:u.length>0?1:0,display:u.length>0?"flex":"none"},position:"end",children:e.jsx(t.IconButton,{"aria-label":"clear search",onClick:()=>h(""),edge:"end",children:e.jsx(r.Close,{})})})},sx:{flex:"1 1 40%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>_?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>_?`${e.palette.error.main} !important`:void 0}},value:u,onChange:e=>{h(e.target.value)},onKeyDown:e=>{e.which===o.L.Escape&&u.length>0&&(h(""),e.stopPropagation(),e.preventDefault())},onContextMenu:e=>{e.stopPropagation()}}),e.jsx(t.FormControlLabel,{sx:{flex:"1 1 60%"},control:e.jsx(t.Checkbox,{checked:c,onChange:()=>d(!c)}),label:"Show commands without key bindings",labelPlacement:"start"})]}),e.jsx(t.Box,{sx:{flex:"1 1 100%",borderRadius:e=>`${e.shape.borderRadius}px`,border:e=>`solid ${e.palette.divider} 1px`,paddingRight:"1px",overflow:"hidden","* .MuiTableCell-head":{background:e=>e.palette.background.paper,backgroundImage:`linear-gradient(${l.alpha("#fff",o.getOverlayAlpha(5))}, ${l.alpha("#fff",o.getOverlayAlpha(5))})`}},children:e.jsx(Bt,{rowCount:g.length,rowGetter:e=>g[e.index],columns:[{width:180,label:"Command",dataKey:"label"},{width:260,label:"Key Binding",dataKey:"shortcut"},{width:240,label:"Description",dataKey:"description",widthLess:440}]})}),e.jsx(t.Box,{sx:{display:"flex",flexShrink:"0",paddingLeft:e=>e.spacing(1),paddingTop:e=>e.spacing(1),paddingRight:e=>e.spacing(1),userSelect:"none",justifyContent:"flex-end"},children:e.jsx(t.Typography,{noWrap:!0,component:"div",sx:{color:e=>_?e.palette.error.main:e.palette.text.secondary},children:`${0===g.length?"No":g.length} shortcut key${1===g.length?"":"s"}${u.length>0?" found":""}`})})]})}exports.default=n=>{const{title:r="Shortcut Keys",commands:i,sx:l,...s}=n;return e.jsx(o.Op,{isModal:!0,onKeyDown:e=>{e.keyCode===o.L.F1&&e.preventDefault()},sx:{width:"780px",...l},title:r,autoFocusSel:".input",...s,children:e.jsx(t.DialogContent,{dividers:!0,children:e.jsx(Ut,{commands:i,sx:{marginBottom:"8px"}})})})};
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("react"),n=require("@mui/material"),o=require("./Brij8vl9GntSQBer.cjs"),a=require("@mui/system"),s=["Ok","Cancel"],i=e.memo(i=>{const{initialComments:l=null,onUpdateComments:r,context:p,onOption:c,onValidateOption:u,onDone:m,options:d=s,defaultOption:g=d?.[0],cancelOption:x="Cancel",sx:f,...h}=i,C=e.useMemo(()=>{const t=l??p?.()?.getComments();let e="";if(t&&t.content&&t.content.runs){const n=t.content.runs;for(let t=0;t<n.length;t++){const o=n[t];e+=o?.text}}return e},[]),[O,y]=e.useState(C),[j,v]=e.useState(!1),F=e.useCallback(async(t,e)=>null,[]),T=o.B(async t=>{const e=""===O?[]:O.split("\n");if(t!==x){const t=[];for(let n=0;n<e.length;n++)t.push({text:e[n]});const n={content:{runs:t}};r?.(n)}c?.(t,t===x,t===g),m?.()},[O,r,m,c,g,x]),b=o.B(t=>{y(t.target.value),F(t.target.value,null)},[u]),B=o.B(async t=>{let e=await Promise.resolve(u?.(t));try{!1!==e&&(e=await F(O,t))}catch(t){}return e??!0},[u,O]);return t.jsx(o.pm,{title:(C?"Edit":"Insert")+" Comments",options:d,onDone:m,onOption:t=>T(t),onValidateOption:B,defaultOption:g,cancelOption:x,autoFocusSel:".autoFocus",sx:{width:"480px",...f},...h,children:t.jsx(n.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:t.jsx(n.FormControl,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t.jsx(n.TextField,{label:"Comments",placeholder:"Enter a comment.",onFocus:t=>{j||t.target?.select(),v(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${a.alpha("#fff",o.getOverlayAlpha(5))}, ${a.alpha("#fff",o.getOverlayAlpha(5))})`}}},value:O,onChange:b,onContextMenu:t=>{t.stopPropagation()}})})})})});exports.CommentsDialog=i,exports.default=i;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("@mui/material"),o=require("@sheetxl/sdk"),r=require("./Brij8vl9GntSQBer.cjs"),n=require("@mui/system"),l=["Ok","Cancel"],s=t.memo(s=>{const{initialValue:i,context:p,onOption:u,onValidateOption:c,onInputOption:m,onDone:d,options:g=l,defaultOption:y=g?.[0],cancelOption:x="Cancel",sx:h,...f}=s,[b,v]=t.useState(i),[C,F]=t.useState(!1),T=t.useCallback(async(e,t)=>!0,[]),O=r.B(async e=>{m?.(b,e),u?.(e,e===x,e===y),d?.()},[b,m,d,u,x,y]),j=r.B(async e=>{if(e.keyCode===r.L.Enter){!1!==await(T?.(b,null))&&O(y)}},[b,O]),k=r.B(e=>{v(e.target.value),T?.(e.target.value,null)},[c]),S=r.B(async e=>{let t=await Promise.resolve(c?.(e));try{!1!==t&&(t=await Promise.resolve(T?.(b,e))??!0)}catch(e){}return t??!0},[c]),[N,P]=t.useState(o.NumberFormat.Styles.lookupStyle(b).formatType??o.NumberFormat.Type.Custom);t.useEffect(()=>{P(o.NumberFormat.Styles.lookupStyle(b).formatType??o.NumberFormat.Type.Custom)},[b]);const w=t.useMemo(()=>{const t=o.NumberFormat.Styles.lookupPrimary(),r=t=>e.jsx(a.MenuItem,{value:t,children:t},t),n=Object.keys(t).map(e=>r(t[e].formatType));return n.push(r(o.NumberFormat.Type.Custom)),n},[]),B=t.useCallback(e=>{const t=e.target.value;P(t);const a=o.NumberFormat.Styles.lookupDefault(t);a&&v(a)},[]),I=t.useMemo(()=>{const e=p();return e.createTemporaryCell({value:e.getValue()??12345,style:{numberFormat:b}})},[N,b,p]);return e.jsx(r.pm,{title:"Number Format",options:g,onDone:d,onOption:e=>O(e),onValidateOption:S,defaultOption:y,cancelOption:x,autoFocusSel:".autoFocus",sx:{width:"580px",...h},...f,children:e.jsxs(a.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[e.jsxs(a.FormControl,{sx:{minWidth:135},size:"small",children:[e.jsx(a.InputLabel,{children:"Category"}),e.jsx(a.Select,{value:N,label:"Category",onChange:B,sx:{backgroundImage:`linear-gradient(${n.alpha("#fff",r.getOverlayAlpha(5))}, ${n.alpha("#fff",r.getOverlayAlpha(5))})`},children:w})]}),e.jsx(a.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:e.jsx(a.TextField,{label:"Code",onFocus:e=>{C||e.target?.select(),F(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",r.getOverlayAlpha(5))}, ${n.alpha("#fff",r.getOverlayAlpha(5))})`}}},value:b,onChange:k,onKeyDown:j,onContextMenu:e=>{e.stopPropagation()}})}),e.jsxs(a.Box,{children:[e.jsx(a.Typography,{variant:"caption",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:"Preview"}),e.jsx(a.Typography,{variant:"body2",component:"div",sx:{borderRadius:e=>`${e.shape.borderRadius}px`,padding:e=>e.spacing(1),border:e=>`1px solid ${e.palette.grey[400]}`},children:I.getNumberFormat().displayText||"(empty)"})]})]})})});exports.NumberFormatDialog=s,exports.default=s;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),n=require("@mui/material"),i=require("@mui/icons-material"),o=require("@sheetxl/sdk"),s=require("./Brij8vl9GntSQBer.cjs"),l=require("@mui/system"),r=t.memo(i=>{const{label:o,value:r,options:a,onSelect:c,tabIndex:u=0,...p}=i,[d,x]=t.useState(()=>f(r,a));t.useEffect(()=>{x(f(r,a))},[r,a]);const g=s.B(e=>{x(e.target.value),c?.(a[e.target.value])},[c,a]),m=t.useMemo(()=>Object.keys(a).map(t=>e.jsx(n.MenuItem,{value:t,children:t},t)),[a]);return e.jsxs(n.FormControl,{sx:{minWidth:135},size:"small",children:[e.jsx(n.InputLabel,{children:o}),e.jsx(n.Select,{inputProps:{tabIndex:u},value:d,label:o,onChange:g,sx:{backgroundImage:`linear-gradient(${l.alpha("#fff",s.getOverlayAlpha(5))}, ${l.alpha("#fff",s.getOverlayAlpha(5))})`},...p,children:m})]})}),a={Workbook:"workbook",Sheet:"sheet"},c={enter:140,exit:140},u={Formulas:o.ICell.Content.Formulas,Values:o.ICell.Content.Values,Notes:o.ICell.Content.Notes,Comments:o.ICell.Content.Comments},p={...u};delete p.Values;const d={"By Rows":!0,"By Columns":!1},f=(e,t)=>{const n=Object.keys(t);for(let i=0;i<n.length;i++){const o=n[i];if(t[o]===e)return o}},x=t.memo(f=>{const{replace:x=!1,findText:g,replaceText:m,findOptions:h,replaceOptions:O,title:C,onHide:y,onFindOrReplace:j,...R}=f,b=t.useRef(null),v=t.useRef(null),T=t.useRef(null),I=t.useRef(null),S=t.useRef(null),k=t.useRef(null),w=(e,t)=>{if(!t)return;t.start(e,{center:!1}),setTimeout(()=>t.stop(e),180)},[E,F]=t.useState(!1),[A,B]=t.useState(!1),[D,P]=t.useState(x),[K,M]=t.useState(!1),[U,L]=t.useState(!1),[q,$]=t.useState({findText:null,replaceText:null,replace:x,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:o.IRange.Orientation.Row,fields:[o.ICell.Content.Formulas]},scope:a.Sheet}),V=s.B(async(e,t,n,i)=>{if(!j)return;const s={...q};s.replaceOptions={...s.replaceOptions},s.findOptions={...s.findOptions},s.replaceOptions.maxCount=n?void 0:1,s.replace=t,t&&q.findOptions.fields?.[0]===o.ICell.Content.Values&&(s.findOptions.fields=[o.ICell.Content.Formulas]),s.findOptions.reverse=!e;const l=await j({autoFocus:i,...s});M(0===l)},[q,j]);t.useEffect(()=>{M(!1)},[q,A,D]);const W=s.B((e,t)=>{if(e.keyCode===s.L.Enter){if(!q.findText)return;let n=!0,i=!1;e.shiftKey&&(n=!1),t?(e.ctrlKey&&e.altKey&&(i=!0),w(e,i?k.current:S.current)):w(e,n?I.current:T.current),V(n,t,i,!1)}},[q]),N=t.useRef(null);t.useLayoutEffect(()=>{$(e=>{const t={...e};t.findText=g&&g.length>0?g:e.findText??"",F(!0),void 0!==m&&(t.replaceText=m),h&&(t.findOptions={...t.findOptions,...h}),t.replaceText||(t.replaceText=""),t.replaceOptions&&(t.replaceOptions={...t.replaceOptions}),O&&(t.replaceOptions={...t.replaceOptions,...O}),q.findOptions.fields?.[0]||(q.findOptions.fields=[o.ICell.Content.Formulas]);const n=!(!O&&void 0===m);return n&&P(n),t}),U||N.current?.focus()},[g,m,h,O]),t.useEffect(()=>{D?(q.findOptions.fields[0],o.ICell.Content.Values):F(!0)},[D]),t.useEffect(()=>{if(E&&b.current&&q.findText===b.current.value)return b.current===document.activeElement||b.current.contains(document.activeElement)?(b.current?.select(),void F(!1)):void b.current.addEventListener("focus",()=>{b.current?.select(),F(!1)},{once:!0})},[E,q]);const[H,{width:z}]=s.useMeasure();return e.jsx(s.Op,{ref:N,title:C??(D?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:y,onFocus:()=>L(!0),onBlur:()=>{L(!1),M(!1)},PaperProps:{elevation:U?3:1},...R,children:e.jsxs(n.DialogContent,{dividers:!0,ref:H,sx:{display:"flex",flexDirection:"column",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},onKeyDown:e=>{if("h"===e.key&&e.ctrlKey)P(!0),b.current?.contains(document.activeElement)&&v.current?.focus();else if("f"===e.key&&e.ctrlKey)b.current?.focus();else if("c"===e.key&&e.altKey)$(e=>{const t={...e};return t.findOptions.matchCase=!e.findOptions.matchCase,t});else if("e"===e.key&&e.altKey)$(e=>{const t={...e};return t.findOptions.matchEntireCell=!e.findOptions.matchEntireCell,t});else{if("r"!==e.key||!e.altKey)return;$(e=>{const t={...e};return t.findOptions.useRegex=!e.findOptions.useRegex,t})}e.preventDefault()},children:[e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[e.jsx(s.Uu,{selected:A,onSelectToggle:e=>{B(e)},preventFocus:!0,label:"Toggle Additional Options",icon:s.ui(e.jsx(s.Xs,{}))}),e.jsx(s.Uu,{selected:D,onSelectToggle:e=>{P(e)},preventFocus:!0,label:"Toggle Replace",icon:s.ui(e.jsx(s.qs,{})),shortcut:{key:D?"F":"H",modifiers:[s.S.Ctrl]}})]}),e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e.jsx(n.TextField,{label:"Find",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),minWidth:z>460?"20em":void 0,backgroundImage:`linear-gradient(${l.alpha("#fff",s.getOverlayAlpha(5))}, ${l.alpha("#fff",s.getOverlayAlpha(5))})`},inputProps:{draggable:!1,ref:b,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}},endAdornment:e.jsx(n.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:e.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[e.jsx(s.Uu,{selected:q.findOptions.matchCase,onSelectToggle:e=>{$(t=>{const n={...t};return n.findOptions.matchCase=e,n})},label:"Match Case",shortcut:{key:"C",modifiers:[s.S.Alt]},icon:s.ui(e.jsx(s.Gs,{}))}),e.jsx(s.Uu,{selected:q.findOptions.matchEntireCell,onSelectToggle:e=>{$(t=>{const n={...t};return n.findOptions.matchEntireCell=e,n})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[s.S.Alt]},icon:s.ui(e.jsx(s.Ks,{}))}),e.jsx(s.Uu,{selected:q.findOptions.useRegex,onSelectToggle:e=>{$(t=>{const n={...t};return n.findOptions.useRegex=e,n})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[s.S.Alt]},icon:s.ui(e.jsx(s.ec,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>K?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>K?`${e.palette.error.main} !important`:void 0}},value:q.findText??"",onChange:e=>{$(t=>{const n={...t};return n.findText=e.target.value,n})},onKeyDown:e=>W(e,!1),onContextMenu:e=>{e.stopPropagation()}}),e.jsx(s.Uu,{selected:q.findOptions.reverse,onSelectToggle:e=>{V(!1,!1)},touchRippleRef:T,label:"",shortcut:{key:"Enter",modifiers:[s.S.Shift]},icon:s.ui(q.findOptions.orientation!==o.IRange.Orientation.Column?e.jsx(i.ArrowBack,{}):e.jsx(i.ArrowUpward,{})),disabled:!q.findText}),e.jsx(s.Uu,{selected:!q.findOptions.reverse,onSelectToggle:e=>{V(!0,!1)},touchRippleRef:I,label:"Next Match",shortcut:{key:"Enter"},icon:s.ui(q.findOptions.orientation!==o.IRange.Orientation.Column?e.jsx(i.ArrowForward,{}):e.jsx(i.ArrowDownward,{})),disabled:!q.findText})]}),e.jsx(n.Collapse,{in:D,timeout:c,onExit:()=>{b.current?.focus()},children:e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[e.jsx(n.TextField,{label:"Replace",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${l.alpha("#fff",s.getOverlayAlpha(5))}, ${l.alpha("#fff",s.getOverlayAlpha(5))})`},inputProps:{ref:v,className:"input",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1)},value:q.replaceText??"",onChange:e=>{$(t=>{const n={...t};return n.replaceText=e.target.value,n})},onKeyDown:e=>W(e,!0),onContextMenu:e=>{e.stopPropagation()}}),e.jsx(s.Uu,{onSelectToggle:e=>{V(!0,!0)},touchRippleRef:S,label:"Replace",shortcut:{key:"Enter"},icon:s.ui(e.jsx(s.Qs,{})),disabled:!q.findText}),e.jsx(s.Uu,{onSelectToggle:e=>{V(!0,!0,!0)},touchRippleRef:k,label:"Replace All",shortcut:{key:"Enter",modifiers:[s.S.Ctrl,s.S.Alt]},icon:s.ui(e.jsx(s.Js,{})),disabled:!q.findText})]})})]})]}),e.jsx(n.Collapse,{in:A,timeout:c,onExit:()=>{b.current?.focus()},children:e.jsxs(n.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[e.jsx(s.nd,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),e.jsxs(n.Box,{sx:{display:"flex",flexDirection:z>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[e.jsx(r,{label:"Within",value:q.scope,options:a,onSelect:e=>{$(t=>{const n={...t};return n.scope=e,n})}}),e.jsx(r,{label:"Search",value:q.findOptions.orientation!==o.IRange.Orientation.Column,options:d,onSelect:e=>{$(t=>{const n={...t};return n.findOptions.orientation=e?o.IRange.Orientation.Row:o.IRange.Orientation.Column,n})}}),e.jsx(r,{label:"Look in",value:D&&q.findOptions.fields?.[0]===o.ICell.Content.Values?o.ICell.Content.Formulas:q.findOptions.fields?.[0],options:D?p:u,onSelect:e=>{$(t=>{const n={...t};return n.findOptions.fields=[e],n})}})]})]})})]})})});exports.FindReplaceWindow=x,exports.ScopeOptions=a,exports.default=x;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@sheetxl/sdk");exports.fromBufferCSV=async(t,r)=>{const{papaParseConfig:o,setValuesOptions:n,createWorkbookOptions:s}=r??{},a=await Promise.resolve().then(()=>require("./BO7LEbRChpLg-xKv.cjs")).then(e=>e.p),l=(new TextDecoder).decode(t);let i=-1;const c=new e.Workbook(s),d=c.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:e.IRange.Orientation.Row}),u=r?.onProgress;let p=0;const f={...o,transform:(e,t)=>{o?.transform&&(e=o.transform(e,t));const r=t;0===r&&i++;let n=e??"";return d.pushAt(i,r,n),p++,p%1e5==0&&u?.(p),e}};return a.parse(l,f).data,d.apply({textParser:!0,...n}),c},exports.toBufferCSV=async(e,t)=>{const{trimLeadingBlankRow:r=!0,trimLeadingBlankColumn:o=!0,excludeHidden:n=!1,sheetKey:s=null,papaParseConfig:a={}}=t||{},l=await Promise.resolve().then(()=>require("./BO7LEbRChpLg-xKv.cjs")).then(e=>e.p);if(!e)throw new Error("workbook must be specified");let i=null;if(null===s?i=e.getSelectedSheet():"number"==typeof s?i=e.getSheets().search()[s]:"string"==typeof s&&(i=e.getSheets().getByName(s)),!i)throw new Error("invalid sheetKey specified");let c=null;const d=[];let u=null,p=i.getUsedRange({excludeHidden:n});if(!p)throw new Error("Nothing to export");if(!r||!o){const e=r?p.getRowStart():0,t=o?p.getColumnStart():0;p=p.getOffsetTo(e,t)}p.forEach((e,t)=>{const r=t.getCoords(),o=t.getCell();c!==r.rowIndex&&(u&&d.push(u),u=[],c=r.rowIndex);const n=o.toTextUnformatted()??"";u.push(n)},{includeEmpty:!0,address:null}),u&&d.push(u);const f={...a},g=l.unparse(d,f);return(new TextEncoder).encode(g).buffer};
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),n=require("@mui/material"),a=require("./Brij8vl9GntSQBer.cjs"),o=["Ok","Cancel"],s=t.memo(s=>{const{tableOptions:l,context:i,onOption:r,onValidateOption:c,onDone:p,options:u=o,defaultOption:d=u?.[0],cancelOption:g="Cancel",sx:x,...m}=s,[b,h]=t.useState(!1),[O,j]=t.useState(()=>l?.hasHeader??!1),[f,C]=t.useState(()=>l?.ranges??null),S=a.B(e=>{const t={...l,hasHeader:O,ranges:f};r?.(e,e===g,e===d),p?.({option:e,tableOptions:t})},[p,r,d,g,O,f,l]),T=t.useCallback(async(e,t)=>null,[]);return e.jsx(a.pm,{title:"Insert Table",options:u,onDone:S,onValidateOption:T,defaultOption:d,cancelOption:g,autoFocusSel:".range-input input",sx:{width:"360px",...x},...m,children:e.jsxs(n.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[e.jsx(a.RangeInput,{formName:"range",value:f,onChangeInput:e=>C(e),resolvedAddress:i.getNames().getRanges.bind(i.getNames()),onFocus:e=>{b||e.target?.select(),h(!0)}}),e.jsx(n.FormControlLabel,{control:e.jsx(n.Checkbox,{checked:O,onChange:()=>j(!O)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=s,exports.default=s;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===c(t)}function e(t){return"string"==typeof t}function n(t){return"number"==typeof t}function s(t){return!0===t||!1===t||function(t){return i(t)&&null!==t}(t)&&"[object Boolean]"==c(t)}function i(t){return"object"==typeof t}function r(t){return null!=t}function u(t){return!t.trim().length}function c(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=Object.prototype.hasOwnProperty;class h{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=a(t);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function a(n){let s=null,i=null,r=null,u=1,c=null;if(e(n)||t(n))r=n,s=l(n),i=d(n);else{if(!o.call(n,"name"))throw new Error((t=>`Missing ${t} property in key`)("name"));const t=n.name;if(r=t,o.call(n,"weight")&&(u=n.weight,u<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(t));s=l(t),i=d(t),c=n.getFn}return{path:s,id:i,weight:u,src:r,getFn:c}}function l(e){return t(e)?e:e.split(".")}function d(e){return t(e)?e.join("."):e}var g={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(i,u){let c=[],o=!1;const h=(i,u,a)=>{if(r(i))if(u[a]){const l=i[u[a]];if(!r(l))return;if(a===u.length-1&&(e(l)||n(l)||s(l)))c.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(l));else if(t(l)){o=!0;for(let t=0,e=l.length;t<e;t+=1)h(l[t],u,a+1)}else u.length&&h(l,u,a+1)}else c.push(i)};return h(i,e(u)?u.split("."):u,0),o?c:c[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const f=/[^ ]+/g;class A{constructor({getFn:t=g.getFn,fieldNormWeight:e=g.fieldNormWeight}={}){this.norm=function(t=1,e=3){const n=new Map,s=Math.pow(10,e);return{get(e){const i=e.match(f).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*t),u=parseFloat(Math.round(r*s)/s);return n.set(i,u),u},clear(){n.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,e(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const n=this.size();e(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!r(t)||u(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(n,s){let i={i:s,$:{}};this.keys.forEach((s,c)=>{let o=s.getFn?s.getFn(n):this.getFn(n,s.path);if(r(o))if(t(o)){let n=[];const s=[{nestedArrIndex:-1,value:o}];for(;s.length;){const{nestedArrIndex:i,value:c}=s.pop();if(r(c))if(e(c)&&!u(c)){let t={v:c,i:i,n:this.norm.get(c)};n.push(t)}else t(c)&&c.forEach((t,e)=>{s.push({nestedArrIndex:e,value:t})})}i.$[c]=n}else if(e(o)&&!u(o)){let t={v:o,n:this.norm.get(o)};i.$[c]=t}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function p(t,e,{getFn:n=g.getFn,fieldNormWeight:s=g.fieldNormWeight}={}){const i=new A({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(a)),i.setSources(e),i.create(),i}function C(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=g.distance,ignoreLocation:r=g.ignoreLocation}={}){const u=e/t.length;if(r)return u;const c=Math.abs(s-n);return i?u+c/i:c?1:u}const m=32;function M(t,e,n,{location:s=g.location,distance:i=g.distance,threshold:r=g.threshold,findAllMatches:u=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,includeMatches:o=g.includeMatches,ignoreLocation:h=g.ignoreLocation}={}){if(e.length>m)throw new Error(`Pattern length exceeds max of ${m}.`);const a=e.length,l=t.length,d=Math.max(0,Math.min(s,l));let f=r,A=d;const p=c>1||o,M=p?Array(l):[];let F;for(;(F=t.indexOf(e,A))>-1;){let t=C(e,{currentLocation:F,expectedLocation:d,distance:i,ignoreLocation:h});if(f=Math.min(t,f),A=F+a,p){let t=0;for(;t<a;)M[F+t]=1,t+=1}}A=-1;let E=[],y=1,D=a+l;const x=1<<a-1;for(let s=0;s<a;s+=1){let r=0,c=D;for(;r<c;){C(e,{errors:s,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:h})<=f?r=c:D=c,c=Math.floor((D-r)/2+r)}D=c;let o=Math.max(1,d-c+1),g=u?l:Math.min(d+c,l)+a,m=Array(g+2);m[g+1]=(1<<s)-1;for(let r=g;r>=o;r-=1){let u=r-1,c=n[t.charAt(u)];if(p&&(M[u]=+!!c),m[r]=(m[r+1]<<1|1)&c,s&&(m[r]|=(E[r+1]|E[r])<<1|1|E[r+1]),m[r]&x&&(y=C(e,{errors:s,currentLocation:u,expectedLocation:d,distance:i,ignoreLocation:h}),y<=f)){if(f=y,A=u,A<=d)break;o=Math.max(1,2*d-A)}}if(C(e,{errors:s+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>f)break;E=m}const B={isMatch:A>=0,score:Math.max(.001,y)};if(p){const t=function(t=[],e=g.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let u=t.length;r<u;r+=1){let u=t[r];u&&-1===s?s=r:u||-1===s||(i=r-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[r-1]&&r-s>=e&&n.push([s,r-1]),n}(M,c);t.length?o&&(B.indices=t):B.isMatch=!1}return B}function F(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}const E=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 y{constructor(t,{location:e=g.location,threshold:n=g.threshold,distance:s=g.distance,includeMatches:i=g.includeMatches,findAllMatches:r=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:o=g.ignoreDiacritics,ignoreLocation:h=g.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h},t=c?t:t.toLowerCase(),t=o?E(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:F(t),startIndex:e})},l=this.pattern.length;if(l>m){let t=0;const e=l%m,n=l-e;for(;t<n;)a(this.pattern.substr(t,m),t),t+=m;if(e){const t=l-m;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s}=this.options;if(t=e?t:t.toLowerCase(),t=n?E(t):t,this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:i,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach(({pattern:e,alphabet:n,startIndex:g})=>{const{isMatch:f,score:A,indices:p}=M(t,e,n,{location:i+g,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,includeMatches:s,ignoreLocation:h});f&&(d=!0),l+=A,f&&p&&(a=[...a,...p])});let g={isMatch:d,score:d?l/this.chunks.length:1};return d&&s&&(g.indices=a),g}}class D{constructor(t){this.pattern=t}static isMultiMatch(t){return x(t,this.multiRegex)}static isSingleMatch(t){return x(t,this.singleRegex)}search(){}}function x(t,e){const n=t.match(e);return n?n[1]:null}class B extends D{constructor(t,{location:e=g.location,threshold:n=g.threshold,distance:s=g.distance,includeMatches:i=g.includeMatches,findAllMatches:r=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:o=g.ignoreDiacritics,ignoreLocation:h=g.ignoreLocation}={}){super(t),this._bitapSearch=new y(t,{location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class L extends D{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const s=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,s.push([e,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}}const k=[class extends D{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]}}},L,class extends D{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 D{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 D{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 D{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 D{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},B],_=k.length,v=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const S=new Set([B.type,L.type]);class I{constructor(t,{isCaseSensitive:e=g.isCaseSensitive,ignoreDiacritics:n=g.ignoreDiacritics,includeMatches:s=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:r=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:c=g.location,threshold:o=g.threshold,distance:h=g.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s,minMatchCharLength:i,findAllMatches:u,ignoreLocation:r,location:c,threshold:o,distance:h},t=e?t:t.toLowerCase(),t=n?E(t):t,this.pattern=t,this.query=function(t,e={}){return t.split("|").map(t=>{let n=t.trim().split(v).filter(t=>t&&!!t.trim()),s=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let r=!1,u=-1;for(;!r&&++u<_;){const t=k[u];let n=t.isMultiMatch(i);n&&(s.push(new t(n,e)),r=!0)}if(!r)for(u=-1;++u<_;){const t=k[u];let n=t.isSingleMatch(i);if(n){s.push(new t(n,e));break}}}return s})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s,ignoreDiacritics:i}=this.options;t=s?t:t.toLowerCase(),t=i?E(t):t;let r=0,u=[],c=0;for(let s=0,i=e.length;s<i;s+=1){const i=e[s];u.length=0,r=0;for(let e=0,s=i.length;e<s;e+=1){const s=i[e],{isMatch:o,indices:h,score:a}=s.search(t);if(!o){c=0,r=0,u.length=0;break}if(r+=1,c+=a,n){const t=s.constructor.type;S.has(t)?u=[...u,...h]:u.push(h)}}if(r){let t={isMatch:!0,score:c/r};return n&&(t.indices=u),t}}return{isMatch:!1,score:1}}}const w=[];function $(t,e){for(let n=0,s=w.length;n<s;n+=1){let s=w[n];if(s.condition(t,e))return new s(t,e)}return new y(t,e)}const b="$and",N="$or",R="$path",O="$val",j=t=>!(!t[b]&&!t[N]),W=t=>({[b]:Object.keys(t).map(e=>({[e]:t[e]}))});function z(n,s,{auto:r=!0}={}){const u=n=>{let c=Object.keys(n);const o=(t=>!!t[R])(n);if(!o&&c.length>1&&!j(n))return u(W(n));if((e=>!t(e)&&i(e)&&!j(e))(n)){const t=o?n[R]:c[0],i=o?n[O]:n[t];if(!e(i))throw new Error((t=>`Invalid value for key ${t}`)(t));const u={keyId:d(t),pattern:i};return r&&(u.searcher=$(i,s)),u}let h={children:[],operator:c[0]};return c.forEach(e=>{const s=n[e];t(s)&&s.forEach(t=>{h.children.push(u(t))})}),h};return j(n)||(n=W(n)),u(n)}function K(t,e){const n=t.matches;e.matches=[],r(n)&&n.forEach(t=>{if(!r(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let i={indices:n,value:s};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)})}function P(t,e){e.score=t.score}class q{constructor(t,e={},n){this.options={...g,...e},this.options.useExtendedSearch,this._keyStore=new h(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof A))throw new Error("Incorrect 'index' type");this._myIndex=e||p(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){r(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,s-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:u,sortFn:c,ignoreFieldNorm:o}=this.options;let h=e(t)?e(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=g.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:s,score:i})=>{const r=t?t.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(e?1:s))}),t.score=n})}(h,{ignoreFieldNorm:o}),u&&h.sort(c),n(s)&&s>-1&&(h=h.slice(0,s)),function(t,e,{includeMatches:n=g.includeMatches,includeScore:s=g.includeScore}={}){const i=[];return n&&i.push(K),s&&i.push(P),t.map(t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,s)}),s})}(h,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t){const e=$(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:t,i:n,n:i})=>{if(!r(t))return;const{isMatch:u,score:c,indices:o}=e.searchIn(t);u&&s.push({item:t,idx:n,matches:[{score:c,value:t,norm:i,indices:o}]})}),s}_searchLogical(t){const e=z(t,this.options),n=(t,e,s)=>{if(!t.children){const{keyId:n,searcher:i}=t,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return r&&r.length?[{idx:s,item:e,matches:r}]:[]}const i=[];for(let r=0,u=t.children.length;r<u;r+=1){const u=t.children[r],c=n(u,e,s);if(c.length)i.push(...c);else if(t.operator===b)return[]}return i},s=this._myIndex.records,i={},u=[];return s.forEach(({$:t,i:s})=>{if(r(t)){let r=n(e,t,s);r.length&&(i[s]||(i[s]={idx:s,item:t,matches:[]},u.push(i[s])),r.forEach(({matches:t})=>{i[s].matches.push(...t)}))}}),u}_searchObjectList(t){const e=$(t,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:t,i:s})=>{if(!r(t))return;let u=[];n.forEach((n,s)=>{u.push(...this._findMatches({key:n,value:t[s],searcher:e}))}),u.length&&i.push({idx:s,item:t,matches:u})}),i}_findMatches({key:e,value:n,searcher:s}){if(!r(n))return[];let i=[];if(t(n))n.forEach(({v:t,i:n,n:u})=>{if(!r(t))return;const{isMatch:c,score:o,indices:h}=s.searchIn(t);c&&i.push({score:o,key:e,value:t,idx:n,norm:u,indices:h})});else{const{v:t,n:r}=n,{isMatch:u,score:c,indices:o}=s.searchIn(t);u&&i.push({score:c,key:e,value:t,norm:r,indices:o})}return i}}q.version="7.1.0",q.createIndex=p,q.parseIndex=function(t,{getFn:e=g.getFn,fieldNormWeight:n=g.fieldNormWeight}={}){const{keys:s,records:i}=t,r=new A({getFn:e,fieldNormWeight:n});return r.setKeys(s),r.setIndexRecords(i),r},q.config=g,q.parseQuery=z,function(...t){w.push(...t)}(I),exports.default=q;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),n=require("@mui/material"),o=require("./Brij8vl9GntSQBer.cjs"),i=t.memo(i=>{const{title:a,onHide:s,autoFocusSel:l=".range-input input",context:r,notifier:c=o.Tt,command:d,commands:g,...x}=i,[u,m]=t.useState(!1),[p,h]=t.useState(!1),y=t.useRef(null),[f,b]=t.useReducer(e=>e+1,0),[S,{width:j}]=o.useMeasure();o.xe(d);const w=r??d.context(),C=w.table(),[T,B]=t.useState(()=>C?w.getNames().getRanges(C.getRange()):null),v=t.useMemo(()=>C?.getName()??"",[C]);o.ht(w.table(),{onAnchorCoordsChange(e){B(w.getNames().getRanges(e.getRange()))},onProtectedChange(e){b()}});const N=o.B(e=>{w?.table().setName(e)},[w]),R=o.B(e=>{w?.table().resize(e.at(0))},[w]);let D=null;return w.table()||(D=e.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:1,display:"flex",alignItems:"center",justifyItems:"center",justifyContent:"center",boxSizing:"border-box"},children:e.jsx("div",{children:"No table selected"})})),e.jsx(o.Op,{ref:y,title:a??"Table Details",initialPosition:{y:"35"},autoFocusSel:l,onHide:s,onFocus:()=>m(!0),onBlur:e=>{y?.current?.contains(e.relatedTarget)||m(!1)},PaperProps:{elevation:u?3:1},...x,children:e.jsxs(n.DialogContent,{dividers:!0,ref:S,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:w.table()?1:0},children:[e.jsx(n.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:e.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[e.jsx(o.NamedInput,{formName:"name",defaultInput:v,value:C?.getName()??"No table",onChangeInput:N,onValidate:e=>{C&&C.getName().toLowerCase()===e.toLowerCase()||w?.getNames().validateName(e)},disabled:C?.isProtected()??!0,onFocus:e=>{p||e.target?.select(),h(!0)}}),e.jsx(o.RangeInput,{formName:"range",value:T,onChangeInput:R,resolvedAddress:w.getNames().getRanges.bind(w.getNames()),disabled:C?.isProtected()??!0,onFocus:e=>{p||e.target?.select(),h(!0)}})]})})}),e.jsxs(n.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[e.jsx(o.nd,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),e.jsx(o.TableStyleOptionsPanel,{disabled:C?.isProtected(),styleOptions:C?.getStyleOptions()??null,onStyleOptionsChange:e=>{C.updateStyleOptions(e)},showHeaderRow:C?.getShowHeaders(),onShowHeaderRowChange:e=>{try{C.setShowHeaders(e)}catch(e){c.showError(e)}},showTotalRow:C?.getShowTotals(),onShowTotalRowChange:e=>{try{C.setShowTotals(e)}catch(e){c.showError(e)}},showFilterButton:C?.getFilter()?C.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{C.setShowFilterButton(e)}catch(e){c.showError(e)}}}),e.jsx(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:e.jsx(o.TableStylePreview,{table:C,styles:w.styles(),bodyStyle:w.bodyStyle(),cellHeight:30,isLive:!0})}),e.jsx(o.nd,{orientation:"horizontal"}),e.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[e.jsx(o.xm,{variant:o.Se.Menuitem,command:g.getCommand("convertTableToRange"),commandState:C,icon:o.ui(e.jsx(o.Zl,{}))}),e.jsx(o.xm,{variant:o.Se.Menuitem,commandState:C,command:g.getCommand("deleteTable"),icon:o.ui(e.jsx(o.Zl,{}))})]})]})]}),D]})})});exports.TableDetailsWindow=i,exports.default=i;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),o=require("./Brij8vl9GntSQBer.cjs"),a=require("@mui/material"),n=require("@mui/system"),i=["Input"],r=t.memo(t.forwardRef((r,s)=>{const{initialValue:p="",onOption:l,onValidateOption:u,onInputOption:c,onValidateInputOption:d,onDone:g,inputProps:m,inputLabel:f,inputType:x,inputPlaceHolder:h,options:y=i,autoFocusSel:O=".autoFocus",cancelOption:T,defaultOption:w=y?.[0],...F}=r,[S,j]=t.useState(!1),[I,P]=t.useState(p),[b,v]=t.useState(""),[C,q]=t.useState(!0),D=o.Gi(async(e,t)=>{if(!d)return!0;const o=await(d?.(e,t));v(o?.message??"");const a=o?.valid??!0;return q(a),a},[d]),G=o.Gi(async e=>{c?.(I,e)},[I,c,g,l,T,w]),k=o.Gi(async e=>{e.keyCode===o.Ii.Enter&&await(D?.(I,null))},[I,G]),V=o.Gi(e=>{P(e.target.value),D?.(e.target.value,null)},[u]),B=o.Gi(async e=>{let t=await D(I,e);try{!1!==t&&(t=await D(I,e))}catch(e){}return t??!0},[I,u]);return e.jsx(o.pm,{options:y,onDone:g,onOption:(e,t)=>{t||G(e)},onValidateOption:B,cancelOption:T,defaultOption:w,autoFocusSel:O,ref:s,...F,children:e.jsx(a.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:e.jsx(a.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:e.jsx(a.TextField,{onFocus:e=>{S||e.target?.select(),j(!0)},type:x,label:f,helperText:b||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:C?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:h,spellCheck:!1,autoComplete:"off",...m,className:o.de("autoFocus",m?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",o.Do(5))}, ${n.alpha("#fff",o.Do(5))})`}}},value:I,onChange:V,onKeyDown:k,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=r;
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@sheetxl/sdk");exports.fromBufferJSON=async(r,t)=>{let n=r;(function(e){if(e.byteLength<4)return!1;const r=new Uint8Array(e),t={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},n=Object.keys(t);for(let e=0;e<n.length;e++){const o=n[e],i=t[o];let f=!0;for(let e=0;e<i.length;e++)if(r[e]!==i[e]){f=!1;break}if(f)return o}return!1})(n)&&(n=await async function(e,r="gzip"){let t;"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?(t=new ArrayBuffer(e.byteLength),new Uint8Array(t).set(new Uint8Array(e))):t=e;const n=new Blob([t]).stream(),o=new DecompressionStream(r),i=n.pipeThrough(o);return(await new Response(i).blob()).arrayBuffer()}(n));let o=(new TextDecoder).decode(n);const i=JSON.parse(o),f={...t?.createWorkbookOptions??{},json:i};return new e.Workbook(f)},exports.toBufferJSON=async(e,r)=>{const t=await e.toJSON(),n=r?.whiteSpace??0;let o;r?.beforeWrite?.(e,t),o=0===n?JSON.stringify(t):function(e,r=2){const t=[];function n(e){const n=r*e;return void 0===t[n]&&(t[n]=" ".repeat(n)),t[n]}return function e(r,t,o,i){if(null==r||"object"!=typeof r)return JSON.stringify(r);const f=n(t),s=n(t+1);if(Array.isArray(r)){const n=r.length;if(0===n)return"[]";if(0!==o)return JSON.stringify(r);let i="[\n";for(let f=0;f<n;f++)i+=s+e(r[f],t+1,o+1,!0),f<n-1&&(i+=",\n");return i+="\n"+f+"]",i}const a=Object.keys(r),u=a.length;if(0===u)return"{}";if(!(o<2))return JSON.stringify(r);let c="{\n";i||(o=0);for(let n=0;n<u;n++){const i=a[n];c+=s+JSON.stringify(i)+": "+e(r[i],t+1,o,!1),n<u-1&&(c+=",\n")}return c+="\n"+f+"}",c}(e,0,0,!1)}(t,n);let i=(new TextEncoder).encode(o).buffer;const f=r?.compress??!0;return f&&(i=await async function(e,r="gzip"){let t;"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?(t=new ArrayBuffer(e.byteLength),new Uint8Array(t).set(new Uint8Array(e))):t=e;const n=new ReadableStream({start(e){e.enqueue(t),e.close()}}),o=new CompressionStream(r),i=n.pipeThrough(o);return(await new Response(i).blob()).arrayBuffer()}(i,"string"==typeof f?f:void 0)),i};
@@ -1,7 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- var e,t={exports:{}};const i=function(e,t){for(var i=0;i<t.length;i++){const r=t[i];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const i=Object.getOwnPropertyDescriptor(r,t);i&&Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[(e||(e=1,t.exports=function e(){var t,i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,s={},a=0,o={};function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new c(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(s=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,s)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&v(this._config.beforeFirstChunk)&&void 0!==(s=this._config.beforeFirstChunk(e))&&(e=s),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var s=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=s.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),s&&s.data&&(this._rowCount+=s.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,n)i.postMessage({results:s,workerId:o.WORKER_ID,finished:r});else if(v(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!v(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){v(this._config.error)?this._config.error(e):n&&this._config.error&&i.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),h.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,i=this._config.downloadRequestHeaders;for(e in i)t.setRequestHeader(e,i[e])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(new Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),h.call(this,e);var t,i,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,n=(this._config.chunkSize&&(n=Math.min(this._start+this._config.chunkSize,this._input.size),e=i.call(e,this._start,n)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;h.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,i;if(!this._finished)return e=this._config.chunkSize,t=e?(i=t.substring(0,e),t.substring(e)):(i=t,""),this._finished=!t,this.parseChunk(i)}}function l(e){h.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=b(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=b(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=b(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=b(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t,i,r,n,s=Math.pow(2,53),a=-s,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,l=0,c=!1,_=!1,m=[],y={data:[],errors:[],meta:{}};function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){if(y&&r&&(R("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!b(e)})),E()){if(y)if(Array.isArray(y.data[0])){for(var t=0;E()&&t<y.data.length;t++)y.data[t].forEach(d);y.data.splice(0,1)}else y.data.forEach(d);function d(t,i){v(e.transformHeader)&&(t=e.transformHeader(t,i)),m.push(t)}}function i(t,i){for(var r=e.header?{}:[],n=0;n<t.length;n++){var o=n,d=t[n];d=((t,i)=>(t=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&((e=>{if(h.test(e)&&(e=parseFloat(e),a<e&&e<s))return 1})(i)?parseFloat(i):u.test(i)?new Date(i):""===i?null:i):i)(o=e.header?n>=m.length?"__parsed_extra":m[n]:o,d=e.transform?e.transform(d,o):d),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(d)):r[o]=d}return e.header&&(n>m.length?R("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,l+i):n<m.length&&R("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,l+i)),r}var n;y&&(e.header||e.dynamicTyping||e.transform)&&(n=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),n=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=m),l+=n)}function E(){return e.header&&0===m.length}function R(e,t,i,r){e={type:e,code:t,message:i},void 0!==r&&(e.row=r),y.errors.push(e)}v(e.step)&&(n=e.step,e.step=function(t){y=t,E()?w():(w(),0!==y.data.length&&(f+=t.data.length,e.preview&&f>e.preview?i.abort():(y.data=y.data[0],n(y,d))))}),this.parse=function(n,s,a){var h=e.quoteChar||'"';return e.newline||(e.newline=this.guessLineEndings(n,h)),r=!1,e.delimiter?v(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter):((h=((t,i,r,n,s)=>{var a,h,u,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<s.length;f++){for(var l,c=s[f],p=0,_=0,m=0,y=(u=void 0,new g({comments:n,delimiter:c,newline:i,preview:10}).parse(t)),k=0;k<y.data.length;k++)r&&b(y.data[k])?m++:(_+=l=y.data[k].length,void 0===u?u=l:0<l&&(p+=Math.abs(l-u),u=l));0<y.data.length&&(_/=y.data.length-m),(void 0===h||p<=h)&&(void 0===d||d<_)&&1.99<_&&(h=p,a=c,d=_)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=h.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),h=k(e),e.preview&&e.header&&h.preview++,t=n,i=new g(h),y=i.parse(t,s,a),w(),c?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,i.abort(),t=v(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(c=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,i.abort(),y.meta.aborted=!0,v(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=new RegExp(p(t)+"([^]*?)"+p(t),"gm");var i=(e=e.replace(t,"")).split("\r");if(e=1<(t=e.split("\n")).length&&t[0].length<i[0].length,1===i.length||e)return"\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,i=e.newline,r=e.comments,n=e.step,s=e.preview,a=e.fastMode,h=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<o.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var l=0,c=!1;this.parse=function(o,g,_){if("string"!=typeof o)throw new Error("Input must be a string");var m=o.length,y=t.length,k=i.length,b=r.length,w=v(n),E=[],R=[],C=[],O=l=0;if(!o)return P();if(a||!1!==a&&-1===o.indexOf(d)){for(var S=o.split(i),x=0;x<S.length;x++){if(C=S[x],l+=C.length,x!==S.length-1)l+=i.length;else if(_)return P();if(!r||C.substring(0,b)!==r){if(w){if(E=[],F(C.split(t)),U(),c)return P()}else F(C.split(t));if(s&&s<=x)return E=E.slice(0,s),P(!0)}}return P()}for(var A=o.indexOf(t,l),I=o.indexOf(i,l),T=new RegExp(p(f)+p(d),"g"),D=o.indexOf(d,l);;)if(o[l]===d)for(D=l,l++;;){if(-1===(D=o.indexOf(d,D+1)))return _||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:l}),z();if(D===m-1)return z(o.substring(l,D).replace(T,d));if(d===f&&o[D+1]===f)D++;else if(d===f||0===D||o[D-1]!==f){-1!==A&&A<D+1&&(A=o.indexOf(t,D+1));var L=j(-1===(I=-1!==I&&I<D+1?o.indexOf(i,D+1):I)?A:Math.min(A,I));if(o.substr(D+1+L,y)===t){C.push(o.substring(l,D).replace(T,d)),o[l=D+1+L+y]!==d&&(D=o.indexOf(d,l)),A=o.indexOf(t,l),I=o.indexOf(i,l);break}if(L=j(I),o.substring(D+1+L,D+1+L+k)===i){if(C.push(o.substring(l,D).replace(T,d)),M(D+1+L+k),A=o.indexOf(t,l),D=o.indexOf(d,l),w&&(U(),c))return P();if(s&&E.length>=s)return P(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:l}),D++}}else if(r&&0===C.length&&o.substring(l,l+b)===r){if(-1===I)return P();l=I+k,I=o.indexOf(i,l),A=o.indexOf(t,l)}else if(-1!==A&&(A<I||-1===I))C.push(o.substring(l,A)),l=A+y,A=o.indexOf(t,l);else{if(-1===I)break;if(C.push(o.substring(l,I)),M(I+k),w&&(U(),c))return P();if(s&&E.length>=s)return P(!0)}return z();function F(e){E.push(e),O=l}function j(e){return-1!==e&&(e=o.substring(D+1,e))&&""===e.trim()?e.length:0}function z(e){return _||(void 0===e&&(e=o.substring(l)),C.push(e),l=m,F(C),w&&U()),P()}function M(e){l=e,F(C),C=[],I=o.indexOf(i,l)}function P(r){if(e.header&&!g&&E.length&&!u){var n=E[0],s=Object.create(null),a=new Set(n);let t=!1;for(let i=0;i<n.length;i++){let r=n[i];if(s[r=v(e.transformHeader)?e.transformHeader(r,i):r]){let e,o=s[r];for(;e=r+"_"+o,o++,a.has(e););a.add(e),n[i]=e,s[r]++,t=!0,(h=null===h?{}:h)[e]=r}else s[r]=1,n[i]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:E,errors:R,meta:{delimiter:t,linebreak:i,aborted:c,truncated:!!r,cursor:O+(g||0),renamedHeaders:h}}}function U(){n(P()),E=[],R=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function _(e){var t=e.data,i=s[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(v(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!r);a++);delete t.results}else v(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=s[e];v(i.userComplete)&&i.userComplete(t),i.terminate(),delete s[e]}function y(){throw new Error("Not implemented.")}function k(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=k(e[t]);return i}function b(e,t){return function(){e.apply(t,arguments)}}function v(e){return"function"==typeof e}return o.parse=function(t,r){var n=(r=r||{}).dynamicTyping||!1;if(v(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!v(r.transform)&&r.transform,!r.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(t),n=new(r.download?u:f)(r)):!0===t.readable&&v(t.read)&&v(t.on)?n=new l(r):(i.File&&t instanceof File||t instanceof Object)&&(n=new d(r)),n.stream(t);(n=(()=>{var t;return!!o.WORKERS_SUPPORTED&&(t=(()=>{var t=i.URL||i.webkitURL||null,r=e.toString();return o.BLOB_URL||(o.BLOB_URL=t.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))})(),(t=new i.Worker(t)).onmessage=_,t.id=a++,s[t.id]=t)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=v(r.step),r.chunk=v(r.chunk),r.complete=v(r.complete),r.error=v(r.error),delete r.worker,n.postMessage({input:t,config:r,workerId:n.id})},o.unparse=function(e,t){var i=!1,r=!0,n=",",s="\r\n",a='"',h=a+a,u=!1,d=null,f=!1,l=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(h=t.escapeChar+a),t.escapeFormulae instanceof RegExp?f=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(f=/^[=+\-@\t\r].*$/)}})(),new RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return c(null,e,u);if("object"==typeof e[0])return c(d||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),c(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function c(e,t,i){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),h=!Array.isArray(t[0]);if(o&&r){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var f=(o?e:t[d]).length,l=!1,c=o?0===Object.keys(t[d]).length:0===t[d].length;if(i&&!o&&(l="greedy"===i?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===i&&o){for(var p=[],_=0;_<f;_++){var m=h?e[_]:_;p.push(t[d][m])}l=""===p.join("").trim()}if(!l){for(var y=0;y<f;y++){0<y&&!c&&(a+=n);var k=o&&h?e[y]:y;a+=g(t[d][k],y)}d<t.length-1&&(!i||0<f&&!c)&&(a+=s)}}return a}function g(e,t){var r,s;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(s=!1,f&&"string"==typeof e&&f.test(e)&&(e="'"+e,s=!0),r=e.toString().replace(l,h),(s=s||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1})(r,o.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!r&&!!i.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=c,o.NetworkStreamer=u,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=l,i.jQuery&&((t=i.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(e){if("INPUT"!==t(this).prop("tagName").toUpperCase()||"file"!==t(this).attr("type").toLowerCase()||!i.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)n.push({file:this.files[s],inputElem:this,instanceConfig:t.extend({},r)})}),s(),this;function s(){if(0===n.length)v(e.complete)&&e.complete();else{var i,r,s,h=n[0];if(v(e.before)){var u=e.before(h.file,h.inputElem);if("object"==typeof u){if("abort"===u.action)return i=h.file,r=h.inputElem,s=u.reason,void(v(e.error)&&e.error({name:"AbortError"},i,r,s));if("skip"===u.action)return void a();"object"==typeof u.config&&(h.instanceConfig=t.extend(h.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=h.instanceConfig.complete;h.instanceConfig.complete=function(e){v(d)&&d(e,h.file,h.inputElem),a()},o.parse(h.file,h.instanceConfig)}}function a(){n.splice(0,1),s()}}),n&&(i.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?i.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(i.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&i.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(h.prototype)).constructor=u,(d.prototype=Object.create(h.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(l.prototype=Object.create(h.prototype)).constructor=l,o}()),t.exports)]);export{i as p};