@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
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Box as o,TextField as n,InputAdornment as r,IconButton as i,FormControlLabel as l,Checkbox as s,Typography as a,TableCell as c,DialogContent as d}from"@mui/material";import{s as u,t as h,v as f,w as p,z as m,_ as g,A as v,E as _,F as S,e as y,L as w,a as C,H as x,M as R,O as b}from"./BPMMuKIe5xb3-D8V.mjs";import*as T from"react";import z,{cloneElement as I,useState as P,useMemo as O,useEffect as k}from"react";import{Close as M}from"@mui/icons-material";import L,{internal_serializeStyles as G,internal_mutateStyles as A}from"@mui/styled-engine";import{alpha as E}from"@mui/system";const W=u();function H(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function D(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function j(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?D(n.style,o):n.style;else{const{variants:e,...r}=n;t=o?D(G(r),o):r}return N(e,n.variants,[t],o)}return n?.isProcessed?o?D(G(n.style),o):n.style:o?D(G(n),o):n}function N(e,t,o=[],n=void 0){let r;e:for(let i=0;i<t.length;i+=1){const l=t[i];if("function"==typeof l.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!l.props(r))continue}else for(const t in l.props)if(e[t]!==l.props[t]&&e.ownerState?.[t]!==l.props[t])continue e;"function"==typeof l.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},o.push(n?D(G(l.style(r)),n):l.style(r))):o.push(n?D(G(l.style),n):l.style)}return o}function B(e,t){}function U(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const V=function(e={}){const{themeId:t,defaultTheme:o=W,rootShouldForwardProp:n=H,slotShouldForwardProp:r=H}=e;function i(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,o)}return(e,t={})=>{A(e,e=>e.filter(e=>e!==h));const{name:o,slot:l,skipVariantsResolver:s,skipSx:a,overridesResolver:c=j(U(l)),...d}=t,u=o&&o.startsWith("Mui")||l?"components":"custom",p=void 0!==s?s:l&&"Root"!==l&&"root"!==l||!1,m=a||!1;let g=H;"Root"===l||"root"===l?g=n:l?g=r:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const v=L(e,{shouldForwardProp:g,label:B(),...d}),_=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return F(t,e,t.theme.modularCssLayers?u:void 0)};if(f(e)){const t=function(e){const{variants:t,...o}=e,n={variants:t,style:G(o),isProcessed:!0};return n.style===o||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=G(e.style))}),n}(e);return function(e){return t.variants?F(e,t,e.theme.modularCssLayers?u:void 0):e.theme.modularCssLayers?D(t.style,u):t.style}}return e},S=(...t)=>{const n=[],r=t.map(_),l=[];if(n.push(i),o&&c&&l.push(function(e){const t=e.theme,n=t.components?.[o]?.styleOverrides;if(!n)return null;const r={};for(const t in n)r[t]=F(e,n[t],e.theme.modularCssLayers?"theme":void 0);return c(e,r)}),o&&!p&&l.push(function(e){const t=e.theme,n=t?.components?.[o]?.variants;return n?N(e,n,[],e.theme.modularCssLayers?"theme":void 0):null}),m||l.push(h),Array.isArray(r[0])){const e=r.shift(),t=new Array(n.length).fill(""),o=new Array(l.length).fill("");let i;i=[...t,...e,...o],i.raw=[...t,...e.raw,...o],n.unshift(i)}const s=[...n,...r,...l],a=v(...s);return e.muiName&&(a.muiName=e.muiName),a};return v.withConfig&&(S.withConfig=v.withConfig),S}}({themeId:p,defaultTheme:m,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e){return K="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},K(e)}function $(e){var t=function(e,t){if("object"!=K(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t);if("object"!=K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==K(t)?t:t+""}function X(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,$(n.key),n)}}function Y(e,t,o){return t&&X(e.prototype,t),o&&X(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function J(e,t){if(t&&("object"==K(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 Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}function Q(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&&g(e,t)}function ee(e,t,o){return(t=$(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function te(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function oe(e){this.setState(function(t){var o=this.constructor.getDerivedStateFromProps(e,t);return null!=o?o:null}.bind(this))}function ne(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 re(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=te,t.componentWillReceiveProps=oe),"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=ne;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 ie(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 le(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ie(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(se=function(){return!!e})()}te.__suppressDeprecationWarning=!0,oe.__suppressDeprecationWarning=!0,ne.__suppressDeprecationWarning=!0;var ae=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,se()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),ee(t,"_columnStartIndex",0),ee(t,"_columnStopIndex",0),ee(t,"_rowStartIndex",0),ee(t,"_rowStopIndex",0),ee(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}))}}),ee(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 Q(e,T.PureComponent),Y(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 T.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?le(le({},t),{},{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}])}();function ce(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 de(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 ue(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(he=function(){return!!e})()}ee(ae,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),re(ae);var fe=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,he()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"state",{height:t.props.defaultHeight||0,width:t.props.defaultWidth||0}),ee(t,"_parentNode",void 0),ee(t,"_autoSizer",void 0),ee(t,"_window",void 0),ee(t,"_detectElementResize",void 0),ee(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}))}}),ee(t,"_setRef",function(e){t._autoSizer=e}),t}return Q(e,T.Component),Y(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=ce(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,a=l.width,c={overflow:"visible"},d={};return n||(c.height=0,d.height=s),r||(c.width=0,d.width=a),T.createElement("div",{className:o,ref:this._setRef,style:ue(ue({},c),i)},t(d))}}])}();function pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pe=function(){return!!e})()}ee(fe,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var me=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,pe()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"_child",T.createRef()),ee(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}))}),ee(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 Q(e,T.PureComponent),Y(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:I(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 ge(){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)}}ee(me,"__internalCellMeasurerFlag",!1);const ve=!("undefined"==typeof window||!window.document||!window.document.createElement);var _e;function Se(e){if((!_e&&0!==_e||e)&&ve){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),_e=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return _e}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 we(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){ee(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 Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ce=function(){return!!e})()}var xe="observed",Re="requested",be=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,Ce()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),ee(t,"_calculateSizeAndPositionDataOnNextUpdate",!1),ee(t,"_onSectionRenderedMemoizer",ge()),ee(t,"_onScrollMemoizer",ge(!1)),ee(t,"_invokeOnSectionRenderedHelper",function(){var e=t.props,o=e.cellLayoutManager,n=e.onSectionRendered;t._onSectionRenderedMemoizer({callback:n,indices:{indices:o.getLastRenderedIndices()}})}),ee(t,"_setScrollingContainerRef",function(e){t._scrollingContainer=e}),ee(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)}}),ee(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?xe:Re;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=Se(),void 0===t._scrollbarSize?(t._scrollbarSizeMeasured=!1,t._scrollbarSize=0):t._scrollbarSizeMeasured=!0,t}return Q(e,T.PureComponent),Y(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=Se(),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===Re&&(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,o=e.cellCount,n=e.cellLayoutManager,r=e.className,i=e.height,l=e.horizontalOverscanSize,s=e.id,a=e.noContentRenderer,c=e.style,d=e.verticalOverscanSize,u=e.width,h=this.state,f=h.isScrolling,p=h.scrollLeft,m=h.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==n||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=n,this._calculateSizeAndPositionDataOnNextUpdate=!1,n.calculateSizeAndPositionData());var g=n.getTotalSize(),_=g.height,S=g.width,y=Math.max(0,p-l),w=Math.max(0,m-d),C=Math.min(S,p+u+l),x=Math.min(_,m+i+d),R=i>0&&u>0?n.cellRenderers({height:x-w,isScrolling:f,width:C-y,x:y,y:w}):[],b={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:u,willChange:"transform"},z=_>i?this._scrollbarSize:0,I=S>u?this._scrollbarSize:0;return b.overflowX=S+z<=u?"hidden":"auto",b.overflowY=_+I<=i?"hidden":"auto",T.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:v("ReactVirtualized__Collection",r),id:s,onScroll:this._onScroll,role:"grid",style:we(we({},b),c),tabIndex:0},o>0&&T.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:_,maxHeight:_,maxWidth:S,overflow:"hidden",pointerEvents:f?"none":"",width:S}},R),0===o&&a())}},{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:Re};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:Re}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Re}}}])}();ee(be,"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}),be.propTypes={},re(be);var Te=function(){return Y(function e(t){var o=t.height,n=t.width,r=t.x,i=t.y;q(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)}}])}(),ze=function(){return Y(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;q(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 Te({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 Ie(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 Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pe=function(){return!!e})()}var Oe=function(){function e(t,o){var n,r,i,l;return q(this,e),r=this,l=[t,o],i=Z(i=e),(n=J(r,Pe()?Reflect.construct(i,l||[],Z(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 Q(e,T.PureComponent),Y(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=_({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(this.props),this.props));return T.createElement(be,_({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 ze(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=Ie({align:t,cellOffset:a.x,cellSize:a.width,containerSize:l,currentOffset:r}),i=Ie({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 ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ke=function(){return!!e})()}function Me(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 Le(e,t){if(null==e)return{};var o,n,r=S(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}ee(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 q(this,e),r=this,l=[t,o],i=Z(i=e),(n=J(r,ke()?Reflect.construct(i,l||[],Z(r).constructor):i.apply(r,l)))._registerChild=n._registerChild.bind(n),n}return Q(e,T.PureComponent),Y(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 Ge,Ae=function(){return Y(function e(t){var o=t.cellCount,n=t.cellSizeGetter,r=t.estimatedCellSize;q(this,e),ee(this,"_cellSizeAndPositionData",{}),ee(this,"_lastMeasuredIndex",-1),ee(this,"_lastBatchedIndex",-1),ee(this,"_cellCount",void 0),ee(this,"_cellSizeGetter",void 0),ee(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)}}])}(),Ee=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5},We=["maxScrollSize"],He=function(){return Y(function e(t){var o=t.maxScrollSize,n=void 0===o?Ee():o,r=Le(t,We);q(this,e),ee(this,"_cellSizeAndPositionManager",void 0),ee(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new Ae(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 De(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 je=(Ge="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||Ge.webkitRequestAnimationFrame||Ge.mozRequestAnimationFrame||Ge.oRequestAnimationFrame||Ge.msRequestAnimationFrame||function(e){return Ge.setTimeout(e,1e3/60)},Fe=Ge.cancelAnimationFrame||Ge.webkitCancelAnimationFrame||Ge.mozCancelAnimationFrame||Ge.oCancelAnimationFrame||Ge.msCancelAnimationFrame||function(e){Ge.clearTimeout(e)},Ne=je,Be=Fe,Ue=function(e){return Be(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=Ne(n)},r={id:Ne(n)};return r};function qe(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 Ke(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):qe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function $e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($e=function(){return!!e})()}var Xe="observed",Ye="requested",Je=function(){function e(t){var o,n,r,i;q(this,e),n=this,i=[t],r=Z(r=e),ee(o=J(n,$e()?Reflect.construct(r,i||[],Z(n).constructor):r.apply(n,i)),"_onGridRenderedMemoizer",ge()),ee(o,"_onScrollMemoizer",ge(!1)),ee(o,"_deferredInvalidateColumnIndex",null),ee(o,"_deferredInvalidateRowIndex",null),ee(o,"_recomputeScrollLeftFlag",!1),ee(o,"_recomputeScrollTopFlag",!1),ee(o,"_horizontalScrollBarSize",0),ee(o,"_verticalScrollBarSize",0),ee(o,"_scrollbarPresenceChanged",!1),ee(o,"_scrollingContainer",void 0),ee(o,"_childrenToDisplay",void 0),ee(o,"_columnStartIndex",void 0),ee(o,"_columnStopIndex",void 0),ee(o,"_rowStartIndex",void 0),ee(o,"_rowStopIndex",void 0),ee(o,"_renderedColumnStartIndex",0),ee(o,"_renderedColumnStopIndex",0),ee(o,"_renderedRowStartIndex",0),ee(o,"_renderedRowStopIndex",0),ee(o,"_initialScrollTop",void 0),ee(o,"_initialScrollLeft",void 0),ee(o,"_disablePointerEventsTimeoutId",void 0),ee(o,"_styleCache",{}),ee(o,"_cellCache",{}),ee(o,"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),ee(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}})}),ee(o,"_setScrollingContainerRef",function(e){o._scrollingContainer=e,"function"==typeof o.props.elementRef?o.props.elementRef(e):"object"===K(o.props.elementRef)&&(o.props.elementRef.current=e)}),ee(o,"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)});var l=new He({cellCount:t.columnCount,cellSizeGetter:function(o){return e._wrapSizeGetter(t.columnWidth)(o)},estimatedCellSize:e._getEstimatedColumnSize(t)}),s=new He({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 Q(e,T.PureComponent),Y(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=Ke(Ke({},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:Xe};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(Ke(Ke({},r),{},{scrollToColumn:t})),void 0!==o&&this._updateScrollTopForScrollToRow(Ke(Ke({},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=Ke(Ke({},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===Ye&&(!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)):De({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)):De({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&&Ue(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,n=e.autoWidth,r=e.className,i=e.containerProps,l=e.containerRole,s=e.containerStyle,a=e.height,c=e.id,d=e.noContentRenderer,u=e.role,h=e.style,f=e.tabIndex,p=e.width,m=this.state,g=m.instanceProps,S=m.needToResetStyleCache,y=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:o?"auto":a,position:"relative",width:n?"auto":p,WebkitOverflowScrolling:"touch",willChange:"transform"};S&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=g.columnSizeAndPositionManager.getTotalSize(),x=g.rowSizeAndPositionManager.getTotalSize(),R=x>a?g.scrollbarSize:0,b=C>p?g.scrollbarSize:0;b===this._horizontalScrollBarSize&&R===this._verticalScrollBarSize||(this._horizontalScrollBarSize=b,this._verticalScrollBarSize=R,this._scrollbarPresenceChanged=!0),w.overflowX=C+R<=p?"hidden":"auto",w.overflowY=x+b<=a?"hidden":"auto";var z=this._childrenToDisplay,I=0===z.length&&a>0&&p>0;return T.createElement("div",_({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:v("ReactVirtualized__Grid",r),id:c,onScroll:this._onScroll,role:u,style:Ke(Ke({},w),h),tabIndex:f}),z.length>0&&T.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:Ke({width:t?"auto":C,height:x,maxWidth:C,maxHeight:x,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},s)},z),I&&d())}},{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&&Ue(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}),Me({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)}}),Me({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,Ke(Ke(Ke({},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:Ye};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}):{}}}])}();ee(Je,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,n=e.columnSizeAndPositionManager,r=e.columnStartIndex,i=e.columnStopIndex,l=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,a=e.isScrolling,c=e.isScrollingOptOut,d=e.parent,u=e.rowSizeAndPositionManager,h=e.rowStartIndex,f=e.rowStopIndex,p=e.styleCache,m=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,v=e.visibleRowIndices,_=[],S=n.areOffsetsAdjusted()||u.areOffsetsAdjusted(),y=!a&&!S,w=h;w<=f;w++)for(var C=u.getSizeAndPositionOfCell(w),x=r;x<=i;x++){var R=n.getSizeAndPositionOfCell(x),b=x>=g.start&&x<=g.stop&&w>=v.start&&w<=v.stop,T="".concat(w,"-").concat(x),I=void 0;y&&p[T]?I=p[T]:l&&!l.has(w,x)?I={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(I={height:C.size,left:R.offset+s,position:"absolute",top:C.offset+m,width:R.size},p[T]=I);var P={columnIndex:x,isScrolling:a,isVisible:b,key:T,parent:d,rowIndex:w,style:I},O=void 0;!c&&!a||s||m?O=o(P):(t[T]||(t[T]=o(P)),O=t[T]),null!=O&&!1!==O&&(O.props.role||(O=z.cloneElement(O,{role:"gridcell"})),_.push(O))}return _},containerRole:"row",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Se,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}),re(Je);function Ze(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 Qe(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 et(e,t){if(e){if("string"==typeof e)return Qe(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)?Qe(e,t):void 0}}function tt(e){return function(e){if(Array.isArray(e))return Qe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||et(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 ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ot=function(){return!!e})()}var nt=function(){function e(t,o){var n,r,i,l;return q(this,e),r=this,l=[t,o],i=Z(i=e),(n=J(r,ot()?Reflect.construct(i,l||[],Z(r).constructor):i.apply(r,l)))._loadMoreRowsMemoizer=ge(),n._onRowsRendered=n._onRowsRendered.bind(n),n._registerChild=n._registerChild.bind(n),n}return Q(e,T.PureComponent),Y(e,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=ge(),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,tt(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 rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rt=function(){return!!e})()}ee(nt,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),nt.propTypes={};var it=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,rt()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"Grid",void 0),ee(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})}),ee(t,"_setRef",function(e){t.Grid=e}),ee(t,"_onScroll",function(e){var o=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,t.props.onScroll)({clientHeight:o,scrollHeight:n,scrollTop:r})}),ee(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 Q(e,T.PureComponent),Y(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,o=e.noRowsRenderer,n=e.scrollToIndex,r=e.width,i=v("ReactVirtualized__List",t);return T.createElement(Je,_({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:r,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:n}))}}])}();function lt(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)||et(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.")}()}ee(it,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:Ze,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const st={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 at(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 ct=at.prototype;function dt(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 ut(e,t){var o=yt(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 ht(e,t){var o=e.intervals([]);o.push(t),ut(e,o)}function ft(e,t){var o=e.intervals([]),n=o.indexOf(t);return n<0?0:(o.splice(n,1),ut(e,o),1)}function pt(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 mt(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 gt(e,t){for(var o=0;o<e.length;++o){var n=t(e[o]);if(n)return n}}function vt(e,t){return e-t}function _t(e,t){var o=e[0]-t[0];return o||e[1]-t[1]}function St(e,t){var o=e[1]-t[1];return o||e[0]-t[0]}function yt(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(vt);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(_t),c.sort(St),new at(n,yt(r),yt(i),a,c)}function wt(e){this.root=e}ct.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},ct.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)?ht(this,e):this.left.insert(e):this.left=yt([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?ht(this,e):this.right.insert(e):this.right=yt([e]);else{var o=st.ge(this.leftPoints,e,_t),n=st.ge(this.rightPoints,e,St);this.leftPoints.splice(o,0,e),this.rightPoints.splice(n,0,e)}},ct.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)?ft(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)?ft(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}dt(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?dt(this,this.left):dt(this,this.right);return 1}for(r=st.ge(this.leftPoints,e,_t);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=st.ge(this.rightPoints,e,St);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},ct.queryPoint=function(e,t){if(e<this.mid){if(this.left)if(o=this.left.queryPoint(e,t))return o;return pt(this.leftPoints,e,t)}if(e>this.mid){var o;if(this.right)if(o=this.right.queryPoint(e,t))return o;return mt(this.rightPoints,e,t)}return gt(this.leftPoints,t)},ct.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?pt(this.leftPoints,t,o):e>this.mid?mt(this.rightPoints,e,o):gt(this.leftPoints,o)};var Ct=wt.prototype;Ct.insert=function(e){this.root?this.root.insert(e):this.root=new at(e[0],null,null,[e],[e])},Ct.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},Ct.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Ct.queryInterval=function(e,t,o){if(e<=t&&this.root)return this.root.queryInterval(e,t,o)},Object.defineProperty(Ct,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Ct,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var xt=function(){return Y(function e(){q(this,e),ee(this,"_columnSizeMap",{}),ee(this,"_intervalTree",new wt(null)),ee(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=lt(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 Rt(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 bt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Rt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tt=function(){return!!e})()}var zt=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,Tt()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollTop:0}),ee(t,"_debounceResetIsScrollingId",void 0),ee(t,"_invalidateOnUpdateStartIndex",null),ee(t,"_invalidateOnUpdateStopIndex",null),ee(t,"_positionCache",new xt),ee(t,"_startIndex",null),ee(t,"_startIndexMemoized",null),ee(t,"_stopIndex",null),ee(t,"_stopIndexMemoized",null),ee(t,"_debounceResetIsScrollingCallback",function(){t.setState({isScrolling:!1})}),ee(t,"_setScrollingContainerRef",function(e){t._scrollingContainer=e}),ee(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 Q(e,T.PureComponent),Y(e,[{key:"clearCellPositions",value:function(){this._positionCache=new xt,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 xt,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&&Ue(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,o=this.props,n=o.autoHeight,r=o.cellCount,i=o.cellMeasurerCache,l=o.cellRenderer,s=o.className,a=o.height,c=o.id,d=o.keyMapper,u=o.overscanByPixels,h=o.role,f=o.style,p=o.tabIndex,m=o.width,g=o.rowDirection,_=this.state,S=_.isScrolling,y=_.scrollTop,w=[],C=this._getEstimatedTotalHeight(),x=this._positionCache.shortestColumnSize,R=this._positionCache.count,b=0;if(this._positionCache.range(Math.max(0,y-u),a+2*u,function(o,n,r){void 0===e?(b=o,e=o):(b=Math.min(b,o),e=Math.max(e,o)),w.push(l({index:o,isScrolling:S,key:d(o),parent:t,style:ee(ee(ee(ee({height:i.getHeight(o)},"ltr"===g?"left":"right",n),"position","absolute"),"top",r),"width",i.getWidth(o))}))}),x<y+a+u&&R<r)for(var z=Math.min(r-R,Math.ceil((y+a+u-x)/i.defaultHeight*m/i.defaultWidth)),I=R;I<R+z;I++)e=I,w.push(l({index:I,isScrolling:S,key:d(I),parent:this,style:{width:i.getWidth(I)}}));return this._startIndex=b,this._stopIndex=e,T.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:v("ReactVirtualized__Masonry",s),id:c,onScroll:this._onScroll,role:h,style:bt({boxSizing:"border-box",direction:"ltr",height:n?"auto":a,overflowX:"hidden",overflowY:C<a?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},f),tabIndex:p},T.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:C,maxWidth:"100%",maxHeight:C,overflow:"hidden",pointerEvents:S?"none":"",position:"relative"}},w))}},{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&&Ue(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 It(){}ee(zt,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:It,onScroll:It,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),re(zt);var Pt=function(){return Y(function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};q(this,e),ee(this,"_cellMeasurerCache",void 0),ee(this,"_columnIndexOffset",void 0),ee(this,"_rowIndexOffset",void 0),ee(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),ee(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"],kt=["columnIndex","rowIndex"],Mt=["columnIndex"],Lt=["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"];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 At(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){ee(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 Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Et=function(){return!!e})()}var Wt=function(){function e(t,o){var n,r,i,l;q(this,e),r=this,l=[t,o],i=Z(i=e),ee(n=J(r,Et()?Reflect.construct(i,l||[],Z(r).constructor):i.apply(r,l)),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),ee(n,"_deferredInvalidateColumnIndex",null),ee(n,"_deferredInvalidateRowIndex",null),ee(n,"_bottomLeftGridRef",function(e){n._bottomLeftGrid=e}),ee(n,"_bottomRightGridRef",function(e){n._bottomRightGrid=e}),ee(n,"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=Le(e,Ot),r=n.props,i=r.cellRenderer,l=r.fixedRowCount;return t===r.rowCount-l?T.createElement("div",{key:o.key,style:At(At({},o.style),{},{height:20})}):i(At(At({},o),{},{parent:n,rowIndex:t+l}))}),ee(n,"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,r=Le(e,kt),i=n.props,l=i.cellRenderer,s=i.fixedColumnCount,a=i.fixedRowCount;return l(At(At({},r),{},{columnIndex:t+s,parent:n,rowIndex:o+a}))}),ee(n,"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=Le(e,Mt),r=n.props,i=r.cellRenderer,l=r.columnCount,s=r.fixedColumnCount;return t===l-s?T.createElement("div",{key:o.key,style:At(At({},o.style),{},{width:20})}):i(At(At({},o),{},{columnIndex:t+s,parent:n}))}),ee(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}),ee(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)}),ee(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})}}),ee(n,"_onScrollLeft",function(e){var t=e.scrollLeft;n._onScroll({scrollLeft:t,scrollTop:n.state.scrollTop})}),ee(n,"_onScrollTop",function(e){var t=e.scrollTop;n._onScroll({scrollTop:t,scrollLeft:n.state.scrollLeft})}),ee(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}),ee(n,"_topLeftGridRef",function(e){n._topLeftGrid=e}),ee(n,"_topRightGridRef",function(e){n._topRightGrid=e});var s=t.deferredMeasurementCache,a=t.fixedColumnCount,c=t.fixedRowCount;return n._maybeCalculateCachedStyles(!0),s&&(n._deferredMeasurementCacheBottomLeftGrid=c>0?new Pt({cellMeasurerCache:s,columnIndexOffset:0,rowIndexOffset:c}):s,n._deferredMeasurementCacheBottomRightGrid=a>0||c>0?new Pt({cellMeasurerCache:s,columnIndexOffset:a,rowIndexOffset:c}):s,n._deferredMeasurementCacheTopRightGrid=a>0?new Pt({cellMeasurerCache:s,columnIndexOffset:a,rowIndexOffset:0}):s),n}return Q(e,T.PureComponent),Y(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=Le(e,Lt);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,s=l.scrollLeft,a=l.scrollTop;return T.createElement("div",{style:this._containerOuterStyle},T.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(At(At({},i),{},{onScroll:t,scrollLeft:s}))),T.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(At(At({},i),{},{onScroll:t,scrollTop:a})),this._renderBottomRightGrid(At(At({},i),{},{onScroll:t,onSectionRendered:o,scrollLeft:s,scrollToColumn:n,scrollToRow:r,scrollTop:a}))))}},{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=At({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=At({left:0,overflowX:"hidden",overflowY:n?"auto":"hidden",position:"absolute"},d)),(e||g||u!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=At({left:this._getLeftGridWidth(this.props),position:"absolute"},u)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=At({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||g||f!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=At({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,o=e.fixedColumnCount,n=e.fixedRowCount,r=e.rowCount,i=e.hideBottomLeftGridScrollbar,l=this.state.showVerticalScrollbar;if(!o)return null;var s=l?1:0,a=this._getBottomGridHeight(e),c=this._getLeftGridWidth(e),d=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,u=i?c+d:c,h=T.createElement(Je,_({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:a,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,r-n)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:u}));return i?T.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:At(At({},this._bottomLeftGridStyle),{},{height:a,width:c,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,n=e.fixedRowCount,r=e.rowCount,i=e.scrollToColumn,l=e.scrollToRow;return T.createElement(Je,_({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,r-n),rowHeight:this._rowHeightBottomGrid,scrollToColumn:i-o,scrollToRow:l-n,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return t&&o?T.createElement(Je,_({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,n=e.fixedColumnCount,r=e.fixedRowCount,i=e.scrollLeft,l=e.hideTopRightGridScrollbar,s=this.state,a=s.showHorizontalScrollbar,c=s.scrollbarSize;if(!r)return null;var d=a?1:0,u=this._getTopGridHeight(e),h=this._getRightGridWidth(e),f=a?c:0,p=u,m=this._topRightGridStyle;l&&(p=u+f,m=At(At({},this._topRightGridStyle),{},{left:0}));var g=T.createElement(Je,_({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-n)+d,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:p,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:r,scrollLeft:i,style:m,tabIndex:null,width:h}));return l?T.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:At(At({},this._topRightGridStyle),{},{height:u,width:h,overflowX:"hidden"})},g):g}}],[{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 Ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ht=function(){return!!e})()}ee(Wt,"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}),Wt.propTypes={},re(Wt),(function(){function e(t,o){var n,r,i,l;return q(this,e),r=this,l=[t,o],i=Z(i=e),(n=J(r,Ht()?Reflect.construct(i,l||[],Z(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 Q(e,T.PureComponent),Y(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 Dt="ASC",jt="DESC";function Ft(e){var t=e.sortDirection,o=v("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===Dt,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===jt});return T.createElement("svg",{className:o,width:18,height:18,viewBox:"0 0 24 24"},t===Dt?T.createElement("path",{d:"M7 14l5-5 5 5z"}):T.createElement("path",{d:"M7 10l5 5 5-5z"}),T.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function Nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nt=function(){return!!e})()}Ft.propTypes={};var Bt=function(){function e(){return q(this,e),t=this,n=arguments,o=Z(o=e),J(t,Nt()?Reflect.construct(o,n||[],Z(t).constructor):o.apply(t,n));var t,o,n}return Q(e,T.Component),Y(e)}();function Ut(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?Ut(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ut(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qt=function(){return!!e})()}ee(Bt,"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:Dt,flexGrow:0,flexShrink:1,headerRenderer:function(e){var t=e.dataKey,o=e.label,n=e.sortBy,r=e.sortDirection,i=n===t,l=[T.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return i&&l.push(T.createElement(Ft,{key:"SortIndicator",sortDirection:r})),l},style:{}}),Bt.propTypes={};var Kt=function(){function e(t){var o,n,r,i;return q(this,e),n=this,i=[t],r=Z(r=e),(o=J(n,qt()?Reflect.construct(r,i||[],Z(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 Q(e,T.PureComponent),Y(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,o=t.children,n=t.className,r=t.disableHeader,i=t.gridClassName,l=t.gridStyle,s=t.headerHeight,a=t.headerRowRenderer,c=t.height,d=t.id,u=t.noRowsRenderer,h=t.rowClassName,f=t.rowStyle,p=t.scrollToIndex,m=t.style,g=t.width,S=this.state.scrollbarWidth,y=r?c:c-s,w="function"==typeof h?h({index:-1}):h,C="function"==typeof f?f({index:-1}):f;return this._cachedColumnStyles=[],T.Children.toArray(o).forEach(function(t,o){var n=e._getFlexStyleForColumn(t,t.props.style||Bt.defaultProps.style);e._cachedColumnStyles[o]=Vt({overflow:"hidden"},n)}),T.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":T.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:v("ReactVirtualized__Table",n),id:d,role:"grid",style:m},!r&&a({className:v("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:Vt({height:s,overflow:"hidden",paddingRight:S,width:g},C)}),T.createElement(Je,_({},this.props,{elementRef:this._setGridElementRef,"aria-readonly":null,autoContainerWidth:!0,className:v("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:y,id:void 0,noContentRenderer:u,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:S,scrollToRow:p,style:Vt(Vt({},l),{},{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,n=e.isScrolling,r=e.parent,i=e.rowData,l=e.rowIndex,s=this.props.onColumnClick,a=t.props,c=a.cellDataGetter,d=a.cellRenderer,u=a.className,h=a.columnData,f=a.dataKey,p=a.id,m=d({cellData:c({columnData:h,dataKey:f,rowData:i}),columnData:h,columnIndex:o,dataKey:f,isScrolling:n,parent:r,rowData:i,rowIndex:l}),g=this._cachedColumnStyles[o],_="string"==typeof m?m:null;return T.createElement("div",{"aria-colindex":o+1,"aria-describedby":p,className:v("ReactVirtualized__Table__rowColumn",u),key:"Row"+l+"-Col"+o,onClick:function(e){s&&s({columnData:h,dataKey:f,event:e})},role:"gridcell",style:g,title:_},m)}},{key:"_createHeader",value:function(e){var t,o,n,r,i,l=e.column,s=e.index,a=this.props,c=a.headerClassName,d=a.headerStyle,u=a.onHeaderClick,h=a.sort,f=a.sortBy,p=a.sortDirection,m=l.props,g=m.columnData,_=m.dataKey,S=m.defaultSortDirection,y=m.disableSort,w=m.headerRenderer,C=m.id,x=m.label,R=!y&&h,b=v("ReactVirtualized__Table__headerColumn",c,l.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:R}),z=this._getFlexStyleForColumn(l,Vt(Vt({},d),l.props.headerStyle)),I=w({columnData:g,dataKey:_,disableSort:y,label:x,sortBy:f,sortDirection:p});if(R||u){var P=f!==_?S:p===jt?Dt:jt,O=function(e){R&&h({defaultSortDirection:S,event:e,sortBy:_,sortDirection:P}),u&&u({columnData:g,dataKey:_,event:e})};i=l.props["aria-label"]||x||_,r="none",n=0,t=O,o=function(e){"Enter"!==e.key&&" "!==e.key||O(e)}}return f===_&&(r=p===Dt?"ascending":"descending"),T.createElement("div",{"aria-label":i,"aria-sort":r,className:b,id:C,key:"Header-Col"+s,onClick:t,onKeyDown:o,role:"columnheader",style:z,tabIndex:n},I)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,n=e.isScrolling,r=e.key,i=e.parent,l=e.style,s=this.props,a=s.children,c=s.onRowClick,d=s.onRowDoubleClick,u=s.onRowRightClick,h=s.onRowMouseOver,f=s.onRowMouseOut,p=s.rowClassName,m=s.rowGetter,g=s.rowRenderer,_=s.rowStyle,S=this.state.scrollbarWidth,y="function"==typeof p?p({index:o}):p,w="function"==typeof _?_({index:o}):_,C=m({index:o}),x=T.Children.toArray(a).map(function(e,r){return t._createColumn({column:e,columnIndex:r,isScrolling:n,parent:i,rowData:C,rowIndex:o,scrollbarWidth:S})}),R=v("ReactVirtualized__Table__row",y),b=Vt(Vt({},l),{},{height:this._getRowHeight(o),overflow:"hidden",paddingRight:S},w);return g({className:R,columns:x,index:o,isScrolling:n,key:r,onRowClick:c,onRowDoubleClick:d,onRowRightClick:u,onRowMouseOver:h,onRowMouseOut:f,rowData:C,style:b})}},{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?[]:T.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})}}])}();ee(Kt,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Ze,overscanRowCount:10,rowRenderer:function(e){var t=e.className,o=e.columns,n=e.index,r=e.key,i=e.onRowClick,l=e.onRowDoubleClick,s=e.onRowMouseOut,a=e.onRowMouseOver,c=e.onRowRightClick,d=e.rowData,u=e.style,h={"aria-rowindex":n+1};return(i||l||s||a||c)&&(h["aria-label"]="row",h.tabIndex=0,i&&(h.onClick=function(e){return i({event:e,index:n,rowData:d})}),l&&(h.onDoubleClick=function(e){return l({event:e,index:n,rowData:d})}),s&&(h.onMouseOut=function(e){return s({event:e,index:n,rowData:d})}),a&&(h.onMouseOver=function(e){return a({event:e,index:n,rowData:d})}),c&&(h.onContextMenu=function(e){return c({event:e,index:n,rowData:d})})),T.createElement("div",_({},h,{className:t,key:r,role:"row",style:u}),o)},headerRowRenderer:function(e){var t=e.className,o=e.columns,n=e.style;return T.createElement("div",{className:t,role:"row",style:n},o)},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),Kt.propTypes={};var $t=[],Xt=null,Yt=null;function Jt(){Yt&&(Yt=null,document.body&&null!=Xt&&(document.body.style.pointerEvents=Xt),Xt=null)}function Zt(){Jt(),$t.forEach(function(e){return e.__resetIsScrolling()})}function Qt(e){e.currentTarget===window&&null==Xt&&document.body&&(Xt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){Yt&&Ue(Yt);var e=0;$t.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),Yt=Ve(Zt,e)}(),$t.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function eo(e,t){$t.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",Qt),$t.push(e)}function to(e,t){($t=$t.filter(function(t){return t!==e})).length||(t.removeEventListener("scroll",Qt),Yt&&(Ue(Yt),Jt()))}var oo=function(e){return e===window},no=function(e){return e.getBoundingClientRect()};function ro(e,t){if(e){if(oo(e)){var o=window,n=o.innerHeight,r=o.innerWidth;return{height:"number"==typeof n?n:0,width:"number"==typeof r?r:0}}return no(e)}return{height:t.serverHeight,width:t.serverWidth}}function io(e){return oo(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 lo(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 so(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(o),!0).forEach(function(t){ee(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ao(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ao=function(){return!!e})()}var co=function(){return"undefined"!=typeof window?window:void 0},uo=function(){function e(){var t,o,n,r;q(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=Z(n),ee(t=J(o,ao()?Reflect.construct(n,r||[],Z(o).constructor):n.apply(o,r)),"_window",co()),ee(t,"_isMounted",!1),ee(t,"_positionFromTop",0),ee(t,"_positionFromLeft",0),ee(t,"_detectElementResize",void 0),ee(t,"_child",void 0),ee(t,"_windowScrollerRef",T.createRef()),ee(t,"state",so(so({},ro(t.props.scrollElement,t.props)),{},{isScrolling:!1,scrollLeft:0,scrollTop:0})),ee(t,"_registerChild",function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),t._child=e,t.updatePosition()}),ee(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)}}),ee(t,"_registerResizeListener",function(e){e===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(e,t._onResize)}),ee(t,"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",t._onResize,!1):e&&t._detectElementResize.removeResizeListener(e,t._onResize)}),ee(t,"_onResize",function(){t.updatePosition()}),ee(t,"__handleWindowScrollEvent",function(){if(t._isMounted){var e=t.props.onScroll,o=t.props.scrollElement;if(o){var n=io(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})}}}),ee(t,"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return Q(e,T.PureComponent),Y(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(oo(t)&&document.documentElement){var o=document.documentElement,n=no(e),r=no(o);return{top:n.top-r.top,left:n.left-r.left}}var i=io(t),l=no(e),s=no(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=ro(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=ce(),this.updatePosition(e),e&&(eo(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),to(this,n),eo(this,o),this._unregisterResizeListener(n),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(to(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 T.createElement("div",{ref:this._windowScrollerRef},e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:o,scrollLeft:r,scrollTop:n,width:l}))}}])}();ee(uo,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:co(),serverHeight:0,serverWidth:0});const ho="ReactVirtualizedDemo-flexContainer",fo="ReactVirtualizedDemo-tableRow",po="ReactVirtualizedDemo-tableRowHover",mo="ReactVirtualizedDemo-tableCell",go="ReactVirtualizedDemo-noClick";class vo extends z.PureComponent{constructor(){super(...arguments),this.getRowClassName=({index:e})=>{const{onRowClick:t}=this.props;return x(fo,ho,{[po]:-1!==e&&null!=t})},this.cellRenderer=({cellData:e,dataKey:o,columnIndex:n,width:r})=>{const{columns:i,rowHeight:l,onRowClick:s}=this.props;let a=e,d={height:l,paddingRight:"2px",paddingTop:"0px",paddingBottom:"0px",minWidth:`${r}px`,maxWidth:`${r}px`};return"shortcut"===o?a=R(e):"description"===o&&(d={...d,fontSize:".75rem",display:"block",paddingTop:"4px",whiteSpace:"pre-line"}),t(c,{component:"div",className:x(mo,ho,{[go]:null==s}),variant:"body",style:d,align:null!=n&&i[n].numeric?"right":"left",children:a})},this.headerRenderer=({label:e,columnIndex:o,width:n})=>{const{headerHeight:r,columns:i}=this.props,l=i[o];return t(c,{component:"div",className:x(mo,ho,go),variant:"head",sx:{width:n,height:r,backgroundColor:e=>e.palette.grey[300]},align:l.numeric?"right":"left",children:t("span",{children:l.label})})}}static{this.defaultProps={headerHeight:40,rowHeight:48}}render(){const{columns:e,rowHeight:o,headerHeight:n,...r}=this.props;return t(fe,{children:({height:i,width:l})=>t(Kt,{height:i,width:l,rowHeight:o,gridStyle:{direction:"inherit"},headerHeight:n,...r,rowClassName:this.getRowClassName,children:e.map(({dataKey:e,width:o,widthLess:n,...r},i)=>{const s=n?l-n:o;return t(Bt,{style:{flex:`1 1 ${s}px`},headerRenderer:e=>this.headerRenderer({...e,width:s,columnIndex:i}),className:ho,cellDataGetter:({rowData:e,columnData:t,dataKey:o})=>e[o],cellRenderer:e=>this.cellRenderer({...e,width:s,columnIndex:i}),dataKey:e,width:s,...r},e)})})})}}const _o=V(vo)(({theme:e})=>({"& .ReactVirtualized__Table__headerRow":{..."rtl"===e.direction&&{paddingLeft:"0 !important"},..."rtl"!==e.direction&&{paddingRight:void 0}},"& .ReactVirtualized__Table__Grid":{outline:"none"},[`& .${ho}`]:{display:"flex",alignItems:"center",boxSizing:"border-box"},[`& .${fo}`]:{cursor:"pointer"},[`& .${po}`]:{"&:hover:not([disabled])":{backgroundColor:e.palette.grey[200]}},[`& .${mo}`]:{flex:1},[`& .${go}`]:{cursor:"initial"}}));function So(c){const{commands:d,...u}=c,[h,f]=P(!1),[p,m]=P(""),g=O(()=>{let e=d.getAllCommands();h||(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},[h,d]),[v,_]=P(null);k(()=>{import("./C5iuJTeAtknnUEIE.mjs").then(e=>{_(new e.default(g,{threshold:0,ignoreLocation:!0,keys:["label","description"]}))})},[g]);const[S,x]=P(g),R=p.length>0&&0===S.length;k(()=>{v&&y.debounce(()=>{if(0===p.trim().length)return void x(g);const e=v.search(p.trim()),t=new Array(e.length);for(let o=0;o<e.length;o++)t[o]=e[o].item;x(t)},90)()},[v,p]);return e(o,{style:{height:440,width:"100%",display:"flex",flexDirection:"column"},...u,children:[e(o,{sx:{display:"flex",alignItems:"center",justifyContent:"end",marginBottom:e=>e.spacing(2),color:e=>e.palette.text.secondary},children:[t(n,{InputProps:{sx:{backgroundImage:`linear-gradient(${E("#fff",C(5))}, ${E("#fff",C(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:t(r,{sx:{opacity:p.length>0?1:0,display:p.length>0?"flex":"none"},position:"end",children:t(i,{"aria-label":"clear search",onClick:()=>m(""),edge:"end",children:t(M,{})})})},sx:{flex:"1 1 40%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>R?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>R?`${e.palette.error.main} !important`:void 0}},value:p,onChange:e=>{m(e.target.value)},onKeyDown:e=>{e.which===w.Escape&&p.length>0&&(m(""),e.stopPropagation(),e.preventDefault())},onContextMenu:e=>{e.stopPropagation()}}),t(l,{sx:{flex:"1 1 60%"},control:t(s,{checked:h,onChange:()=>f(!h)}),label:"Show commands without key bindings",labelPlacement:"start"})]}),t(o,{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(${E("#fff",C(5))}, ${E("#fff",C(5))})`}},children:t(_o,{rowCount:S.length,rowGetter:e=>S[e.index],columns:[{width:180,label:"Command",dataKey:"label"},{width:260,label:"Key Binding",dataKey:"shortcut"},{width:240,label:"Description",dataKey:"description",widthLess:440}]})}),t(o,{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:t(a,{noWrap:!0,component:"div",sx:{color:e=>R?e.palette.error.main:e.palette.text.secondary},children:`${0===S.length?"No":S.length} shortcut key${1===S.length?"":"s"}${p.length>0?" found":""}`})})]})}const yo=e=>{const{title:o="Shortcut Keys",commands:n,sx:r,...i}=e;return t(b,{isModal:!0,onKeyDown:e=>{e.keyCode===w.F1&&e.preventDefault()},sx:{width:"780px",...r},title:o,autoFocusSel:".input",...i,children:t(d,{dividers:!0,children:t(So,{commands:n,sx:{marginBottom:"8px"}})})})};export{yo as default};
@@ -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
- import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as e,useMemo as o,useState as a,useCallback as i}from"react";import{Box as s,FormControl as l,TextField as r}from"@mui/material";import{B as p,p as d,a as c}from"./BPMMuKIe5xb3-D8V.mjs";import{alpha as u}from"@mui/system";const g=["Ok","Cancel"],m=e(e=>{const{initialHyperlink:m=null,initialDisplay:f=null,onUpdateHyperlink:x,context:h,onOption:y,onValidateOption:T,onDone:k,options:C=g,defaultOption:O=C?.[0],cancelOption:P="Cancel",sx:b,...D}=e,F=o(()=>null!==(m??h?.()?.getHyperlink()),[]),I=o(()=>{let t=null,n=null;m&&("string"==typeof m?n=m:t=m);const e=t??h?.()?.getHyperlink();return{address:n??e?.getAddress()??"",textToDisplay:e?.getDisplayText()??""}},[m,h]),[v,w]=a(I.address),[H,M]=a(()=>{const t=h?.().toTextUnformatted()??f;return t===I.address?"":t}),[$,B]=a(!1),L=i(t=>{M(t.target.value)},[]),W=i(async(t,n)=>null,[]),j=p(async t=>{const n=""===v?null:{address:v};t!==P&&x?.(n,H),y?.(t,t===P,t===O),k?.()},[v,H,x,k,y,O,P]),z=p(t=>{w(t.target.value),W(t.target.value,null)},[T]),A=p(async t=>{let n=await Promise.resolve(T?.(t));try{!1!==n&&(n=await W(v,t))}catch(t){}return n??!0},[T]);return t(d,{title:(F?"Edit":"Insert")+" Link",options:C,onDone:k,onOption:t=>j(t),onValidateOption:A,defaultOption:O,cancelOption:P,autoFocusSel:".autoFocus",sx:{width:"480px",...b},...D,children:n(s,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:[t(l,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t(r,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:t=>{$||t.target?.select(),B(!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(${u("#fff",c(5))}, ${u("#fff",c(5))})`}}},value:v,onChange:z,onContextMenu:t=>{t.stopPropagation()}})}),t(l,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t(r,{label:"Display Text",placeholder:v?.startsWith("#")?v.substring(1):v,onFocus:()=>{B(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${u("#fff",c(5))}, ${u("#fff",c(5))})`}}},value:H,onChange:L,onContextMenu:t=>{t.stopPropagation()}})})]})})});export{m as HyperlinkDialog,m as default};
@@ -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
- import{Workbook as e}from"@sheetxl/sdk";const r=async(e,r)=>{const n=await e.toJSON(),t=r?.whiteSpace??0;let o;r?.beforeWrite?.(e,n),o=0===t?JSON.stringify(n):function(e,r=2){const n=[];function t(e){const t=r*e;return void 0===n[t]&&(n[t]=" ".repeat(t)),n[t]}return function e(r,n,o,f){if(null==r||"object"!=typeof r)return JSON.stringify(r);const i=t(n),a=t(n+1);if(Array.isArray(r)){const t=r.length;if(0===t)return"[]";if(0!==o)return JSON.stringify(r);let f="[\n";for(let i=0;i<t;i++)f+=a+e(r[i],n+1,o+1,!0),i<t-1&&(f+=",\n");return f+="\n"+i+"]",f}const s=Object.keys(r),u=s.length;if(0===u)return"{}";if(!(o<2))return JSON.stringify(r);let c="{\n";f||(o=0);for(let t=0;t<u;t++){const f=s[t];c+=a+JSON.stringify(f)+": "+e(r[f],n+1,o,!1),t<u-1&&(c+=",\n")}return c+="\n"+i+"}",c}(e,0,0,!1)}(n,t);let f=(new TextEncoder).encode(o).buffer;const i=r?.compress??!0;return i&&(f=await async function(e,r="gzip"){let n;"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?(n=new ArrayBuffer(e.byteLength),new Uint8Array(n).set(new Uint8Array(e))):n=e;const t=new ReadableStream({start(e){e.enqueue(n),e.close()}}),o=new CompressionStream(r),f=t.pipeThrough(o);return(await new Response(f).blob()).arrayBuffer()}(f,"string"==typeof i?i:void 0)),f},n=async(r,n)=>{let t=r;(function(e){if(e.byteLength<4)return!1;const r=new Uint8Array(e),n={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},t=Object.keys(n);for(let e=0;e<t.length;e++){const o=t[e],f=n[o];let i=!0;for(let e=0;e<f.length;e++)if(r[e]!==f[e]){i=!1;break}if(i)return o}return!1})(t)&&(t=await async function(e,r="gzip"){let n;"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?(n=new ArrayBuffer(e.byteLength),new Uint8Array(n).set(new Uint8Array(e))):n=e;const t=new Blob([n]).stream(),o=new DecompressionStream(r),f=t.pipeThrough(o);return(await new Response(f).blob()).arrayBuffer()}(t));let o=(new TextDecoder).decode(t);const f=JSON.parse(o),i={...n?.createWorkbookOptions??{},json:f};return new e(i)};export{n as fromBufferJSON,r as toBufferJSON};
@@ -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
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{memo as n,useState as o,useRef as a,useReducer as i,useMemo as s}from"react";import{DialogContent as l,Box as r}from"@mui/material";import{T as c,b as d,x as g,j as m,B as p,O as h,N as u,R as x,n as f,k as y,l as b,m as w,f as S,o as C,Z as N}from"./BPMMuKIe5xb3-D8V.mjs";const v=n(n=>{const{title:v,onHide:R,autoFocusSel:T=".range-input input",context:F,notifier:D=c,command:H,commands:j,...B}=n,[I,P]=o(!1),[z,L]=o(!1),O=a(null),[E,A]=i(e=>e+1,0),[M,{width:k}]=d();g(H);const V=F??H.context(),W=V.table(),[Z,q]=o(()=>W?V.getNames().getRanges(W.getRange()):null),G=s(()=>W?.getName()??"",[W]);m(V.table(),{onAnchorCoordsChange(e){q(V.getNames().getRanges(e.getRange()))},onProtectedChange(e){A()}});const J=p(e=>{V?.table().setName(e)},[V]),K=p(e=>{V?.table().resize(e.at(0))},[V]);let Q=null;return V.table()||(Q=e("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("div",{children:"No table selected"})})),e(h,{ref:O,title:v??"Table Details",initialPosition:{y:"35"},autoFocusSel:T,onHide:R,onFocus:()=>P(!0),onBlur:e=>{O?.current?.contains(e.relatedTarget)||P(!1)},PaperProps:{elevation:I?3:1},...B,children:t(l,{dividers:!0,ref:M,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[t(r,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:V.table()?1:0},children:[e(r,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:e(r,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:t(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[e(u,{formName:"name",defaultInput:G,value:W?.getName()??"No table",onChangeInput:J,onValidate:e=>{W&&W.getName().toLowerCase()===e.toLowerCase()||V?.getNames().validateName(e)},disabled:W?.isProtected()??!0,onFocus:e=>{z||e.target?.select(),L(!0)}}),e(x,{formName:"range",value:Z,onChangeInput:K,resolvedAddress:V.getNames().getRanges.bind(V.getNames()),disabled:W?.isProtected()??!0,onFocus:e=>{z||e.target?.select(),L(!0)}})]})})}),t(r,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[e(f,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),e(y,{disabled:W?.isProtected(),styleOptions:W?.getStyleOptions()??null,onStyleOptionsChange:e=>{W.updateStyleOptions(e)},showHeaderRow:W?.getShowHeaders(),onShowHeaderRowChange:e=>{try{W.setShowHeaders(e)}catch(e){D.showError(e)}},showTotalRow:W?.getShowTotals(),onShowTotalRowChange:e=>{try{W.setShowTotals(e)}catch(e){D.showError(e)}},showFilterButton:W?.getFilter()?W.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{W.setShowFilterButton(e)}catch(e){D.showError(e)}}}),e(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:e(b,{table:W,styles:V.styles(),bodyStyle:V.bodyStyle(),cellHeight:30,isLive:!0})}),e(f,{orientation:"horizontal"}),t(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[e(w,{variant:C.Menuitem,command:j.getCommand("convertTableToRange"),commandState:W,icon:S(e(N,{}))}),e(w,{variant:C.Menuitem,commandState:W,command:j.getCommand("deleteTable"),icon:S(e(N,{}))})]})]})]}),Q]})})});export{v as TableDetailsWindow,v as default};
@@ -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
- import{NumberFormat as t,ScalarType as e,ResourceCollection as s,Tuple as i,IAutoFilter as o,AddressUtils as r,CommonUtils as n,Theme as a,JSONStableStringify as l,Workbook as c,IColor as h,CoordUtils as u,IRange as d,OutOfBoundsError as p,FormulaError as g}from"@sheetxl/sdk";import{e as f}from"./BPMMuKIe5xb3-D8V.mjs";const m=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",T=new RegExp(`^[${m}][-${m}.0-9·̀-ͯ‿-⁀]*$`,"u");function y(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const b="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",x=new RegExp(`^[${b}][-${b}.0-9·̀-ͯ‿-⁀]*$`,"u");function w(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const v=function(t){return 32===t||10===t||13===t||9===t},S=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},C=y,k=function(t){return y(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256},A=[32,10,13,9],D=T,E=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},P=w,O=function(t){return w(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256},I=x,V="http://www.w3.org/XML/1998/namespace",L="http://www.w3.org/2000/xmlns/",N={__proto__:null,xml:V,xmlns:L},R={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},$=-1,M=-2,j=13,H=33,F=10,X=60,B=61,W=62,_=63,q=93,z=t=>34===t||39===t,U=[34,39],G=[...U,91,W],Z=[...U,X,q],Q=[B,_,...A],J=[...A,W,38,X];function K(t,e,s){switch(e){case"xml":s!==V&&t.fail(`xml prefix must be bound to ${V}.`);break;case"xmlns":s!==L&&t.fail(`xmlns prefix must be bound to ${L}.`)}switch(s){case L:t.fail(""===e?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${L}.`);break;case V:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${s}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}}}const Y=t=>I.test(t),tt=t=>D.test(t),et={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class st{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const e=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){this.nameStartCheck=P,this.nameCheck=O,this.isName=Y,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...N};const t=this.opt.additionalNamespaces;null!=t&&(function(t,e){for(const s of Object.keys(e))K(t,s,e[s])}(this,t),Object.assign(this.ns,t))}else this.nameStartCheck=C,this.nameCheck=k,this.isName=tt,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?j:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:e}=this.opt;if(void 0===e){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");e="1.0"}this.setXMLVersion(e),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(R),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,e){this[et[t]]=e}off(t){this[et[t]]=void 0}makeError(t){let e=this.fileName??"";return this.trackPosition&&(e.length>0&&(e+=":"),e+=`${this.line}:${this.column}`),e.length>0&&(e+=": "),new Error(e+t)}fail(t){const e=this.makeError(t),s=this.errorHandler;if(void 0===s)throw e;return s(e),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let e=!1;null===t?(e=!0,t=""):"object"==typeof t&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let s=t.length;const i=t.charCodeAt(s-1);!e&&(13===i||i>=55296&&i<=56319)&&(this.carriedFromPrevious=t[s-1],s--,t=t.slice(0,s));const{stateTable:o}=this;for(this.chunk=t,this.i=0;this.i<s;)o[this.state].call(this);return this.chunkPosition+=s,e?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,e=this.i;if(this.prevI=e,this.i++,e>=t.length)return $;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>=32||9===s)return s;switch(s){case F:return this.line++,this.column=0,this.positionAtNewLine=this.position,F;case 13:return t.charCodeAt(e+1)===F&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,M;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCode11(){const{chunk:t,i:e}=this;if(this.prevI=e,this.i=e+1,e>=t.length)return $;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>31&&s<127||s>159&&8232!==s||9===s)return s;switch(s){case F:return this.line++,this.column=0,this.positionAtNewLine=this.position,F;case 13:{const s=t.charCodeAt(e+1);s!==F&&133!==s||(this.i=e+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,M;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCodeNorm(){const t=this.getCode();return t===M?F:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:e}=this;const{chunk:s}=this;for(;;){const i=this.getCode(),o=i===M,r=o?F:i;if(r===$||t.includes(r))return this.text+=s.slice(e,this.prevI),r;o&&(this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i)}}captureToChar(t){let{i:e}=this;const{chunk:s}=this;for(;;){let i=this.getCode();switch(i){case M:this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i,i=F;break;case $:return this.text+=s.slice(e),!1}if(i===t)return this.text+=s.slice(e,this.prevI),!0}}captureNameChars(){const{chunk:t,i:e}=this;for(;;){const s=this.getCode();if(s===$)return this.name+=t.slice(e),$;if(!k(s))return this.name+=t.slice(e,this.prevI),s===M?F:s}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===$||!v(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=S,this.getCode=this.getCode10):(this.isChar=E,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case X:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case $:break;default:this.unget(),this.state=j,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(G);switch(t){case W:this.doctypeHandler?.(this.text),this.text="",this.state=j,this.doctype=!0;break;case $:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:z(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Z);t!==$&&(this.text+=String.fromCodePoint(t),t===q?this.state=2:t===X?this.state=6:z(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case _:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===W?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(_)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===W&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:e}=this;t:for(;;)switch(this.getCode()){case M:this.entity+=`${e.slice(t,this.prevI)}\n`,t=this.i;break;case 59:{const{entityReturnState:s}=this,i=this.entity+e.slice(t,this.prevI);let o;this.state=s,""===i?(this.fail("empty entity name."),o="&;"):(o=this.parseEntity(i),this.entity=""),s===j&&void 0===this.textHandler||(this.text+=o);break t}case $:this.entity+=e.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(C(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case _:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=j,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();45===t?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==W?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=j}sCData(){this.captureToChar(q)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===q?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case W:this.cdataHandler?.(this.text),this.text="",this.state=j;break;case q:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===_||v(t)?(this.fail("processing instruction without a target."),this.state=t===_?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:e}=this;for(;;){const s=this.getCodeNorm();if(s===$)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(s)){this.piTarget+=t.slice(e,this.prevI);const i=s===_;i||v(s)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=i?H:27):this.state=i?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(s));break}}}sPIBody(){if(0===this.text.length){const t=this.getCodeNorm();t===_?this.state=26:v(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(_)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===W){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:t,body:this.text}),this.piTarget=this.text="",this.state=j}else t===_?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==_?t!==$&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=H}sXMLDeclName(){const t=this.captureTo(Q);if(t===_)return this.state=H,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(v(t)||t===B){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===B?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===_)return this.state=H,void this.fail("XML declaration is incomplete.");v(t)||(t!==B&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===_)return this.state=H,void this.fail("XML declaration is incomplete.");v(t)||(z(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,_]);if(t===_)return this.state=H,this.text="",void this.fail("XML declaration is incomplete.");if(t===$)return;const e=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const t=e;this.xmlDecl.version=t,/^1\.[0-9]+$/.test(t)?this.opt.forceXMLVersion||this.setXMLVersion(t):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==_?(v(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=H}sXMLDeclEnding(){this.getCodeNorm()===W?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=j):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===$)return;const e=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=e.ns=Object.create(null)),this.openTagStartHandler?.(e),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case W:this.openTag();break;case 47:this.state=35;break;default:v(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===W?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==$&&(C(t)?(this.unget(),this.state=37):t===W?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===B?this.state=39:v(t)?this.state=38:t===W?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==$&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case $:return;case B:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===W?this.openTag():C(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();z(t)?(this.q=t,this.state=40):v(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:e}=this;let{i:s}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(s,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(s,this.prevI),this.state=14,void(this.entityReturnState=40);case F:case M:case 9:this.text+=`${e.slice(s,this.prevI)} `,s=this.i;break;case X:return this.text+=e.slice(s,this.prevI),void this.fail("disallowed character.");case $:return void(this.text+=e.slice(s))}}sAttribValueClosed(){const t=this.getCodeNorm();v(t)?this.state=36:t===W?this.openTag():47===t?this.state=35:C(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(J);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case X:this.fail("disallowed character.");break;case $:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===W?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===W?this.closeTag():v(t)?this.state=44:t!==$&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case W:this.closeTag();break;case $:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:e}=this;const{chunk:s,textHandler:i}=this;t:for(;;)switch(this.getCode()){case X:if(this.state=15,void 0!==i){const{text:e}=this,o=s.slice(t,this.prevI);0!==e.length?(i(e+o),this.text=""):0!==o.length&&i(o)}e=0;break t;case 38:this.state=14,this.entityReturnState=j,void 0!==i&&(this.text+=s.slice(t,this.prevI)),e=0;break t;case q:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case W:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case M:void 0!==i&&(this.text+=`${s.slice(t,this.prevI)}\n`),t=this.i,e=0;break;case $:void 0!==i&&(this.text+=s.slice(t));break t;default:e=0}this.forbiddenState=e}handleTextOutsideRoot(){let{i:t}=this;const{chunk:e,textHandler:s}=this;let i=!1;t:for(;;){const o=this.getCode();switch(o){case X:if(this.state=15,void 0!==s){const{text:i}=this,o=e.slice(t,this.prevI);0!==i.length?(s(i+o),this.text=""):0!==o.length&&s(o)}break t;case 38:this.state=14,this.entityReturnState=j,void 0!==s&&(this.text+=e.slice(t,this.prevI)),i=!0;break t;case M:void 0!==s&&(this.text+=`${e.slice(t,this.prevI)}\n`),t=this.i;break;case $:void 0!==s&&(this.text+=e.slice(t));break t;default:v(o)||(i=!0)}}i&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,e){const{prefix:s,local:i}=this.qname(t),o={name:t,prefix:s,local:i,value:e};if(this.attribList.push(o),this.attributeHandler?.(o),"xmlns"===s){const t=e.trim();"1.0"===this.currentXMLVersion&&""===t&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=t,K(this,i,t)}else if("xmlns"===t){const t=e.trim();this.topNS[""]=t,K(this,"",t)}}pushAttribPlain(t,e){const s={name:t,value:e};this.attribList.push(s),this.attributeHandler?.(s)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const e=t.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==j&&this.fail("unexpected end.");const{text:e}=this;return 0!==e.length&&(this.textHandler?.(e),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let e=this.topNS[t];if(void 0!==e)return e;const{tags:s}=this;for(let i=s.length-1;i>=0;i--)if(e=s[i].ns[t],void 0!==e)return e;return e=this.ns[t],void 0!==e?e:this.opt.resolvePrefix?.(t)}qname(t){const e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};const s=t.slice(e+1),i=t.slice(0,e);return(""===i||""===s||s.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:i,local:s}}processAttribsNS(){const{attribList:t}=this,e=this.tag;{const{prefix:t,local:s}=this.qname(e.name);e.prefix=t,e.local=s;const i=e.uri=this.resolve(t)??"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),e.uri=t))}if(0===t.length)return;const{attributes:s}=e,i=new Set;for(const e of t){const{name:t,prefix:o,local:r}=e;let n,a;""===o?(n="xmlns"===t?L:"",a=t):(n=this.resolve(o),void 0===n&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),n=o),a=`{${n}}${r}`),i.has(a)&&this.fail(`duplicate attribute: ${a}.`),i.add(a),e.uri=n,s[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,e=this.tag.attributes;for(const{name:s,value:i}of t)void 0!==e[s]&&this.fail(`duplicate attribute: ${s}.`),e[s]=i;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!1,this.openTagHandler?.(e),t.push(e),this.state=j,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!0,this.openTagHandler?.(e),this.closeTagHandler?.(e),null===(this.tag=t[t.length-1]??null)&&(this.closedRoot=!0),this.state=j,this.name=""}closeTag(){const{tags:t,name:e}=this;if(this.state=j,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="</>");const s=this.closeTagHandler;let i=t.length;for(;i-- >0;){const i=this.tag=t.pop();if(this.topNS=i.ns,s?.(i),i.name===e)break;this.fail("unexpected close tag.")}0===i?this.closedRoot=!0:i<0&&(this.fail(`unmatched closing tag: ${e}.`),this.text+=`</${e}>`)}parseEntity(t){if("#"!==t[0]){const e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let e=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?e=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(e=parseInt(t.slice(1),10)),this.isChar(e)?String.fromCodePoint(e):(this.fail("malformed character entity."),`&${t};`)}}var it,ot;(ot=it||(it={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},ot.parseStream=async(t,e,s)=>{const i=new st({position:!1,...s});let o;if(e.onOpenTagStart&&i.on(ot.Events.OpenTagStart,e.onOpenTagStart),e.onOpenTag&&i.on(ot.Events.OpenTag,e.onOpenTag),e.onCloseTag&&i.on(ot.Events.CloseTag,e.onCloseTag),e.onAttribute&&i.on(ot.Events.Attribute,e.onAttribute),e.onText&&i.on(ot.Events.Text,e.onText),e.onError&&i.on(ot.Events.Error,e.onError),e.onEnd){e.onEnd;const t=()=>{o=e.onEnd()};i.on(ot.Events.End,t)}for(;;){const{value:e,done:s}=await t.read();if(s)break;i.write(e)}return i.close(),o};const rt=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,nt=t=>{const e=parseInt(t);return isNaN(e)?null:e},at=t=>{const e=parseFloat(t);return isNaN(e)?null:e},lt=null;class ct{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,e,s){const i=this._registeredVisitors,o=[];let r=null,n=null,a=null,l=null;const c=[],h={key:null,source:t};let u=null,d=!1;const p=(t,e)=>{let s=a.attributes[t];if(e)if(Array.isArray(e))for(let t=0;t<e.length;t++){if(null==s)return;if(s=e[t](s),null==s)return}else{if(null==s)return;if(s=e(s),null==s)return}return s},g={getSource:()=>u.source,setSource:t=>{u.source=t},setKey:t=>{u.key=t},getFrom:()=>a,getAttribute:(t,e)=>p(t,e)??null,hasAttribute:t=>null!==g.getAttribute(t),getParent:()=>c[c.length-2].source,getPath:()=>{const t=[];for(let e=0;e<o.length;e++)t.push(o[e].local);return t.join("\\")},parseAttribute:p,copyToObject:(t,e,s,i)=>{const o=p(i??e,s);void 0!==o&&(t[e]=o)},copyTo:(t,e,s)=>{const i=p(s??t,e);void 0!==i&&(u.source[t]=i)},warn:t=>{s?s?.(t):console.warn(t)}};return{onOpenTag:t=>{let e=t.name;const s=e.indexOf(":");-1!==s&&(e=e.slice(s+1));const p=i.get(e);if(r={local:e,visitor:p,tag:t,destination:null},d)return o.push(r),n=e,void(a=t);l=r?.visitor??null,p&&(u=0===o.length?h:null!==l?.to?{key:null,source:{}}:null,r.destination=u,u&&c.push(u)),o.push(r),n=e,a=t,d=null===l?.to,l?.openTag?.(g)},onCloseTag:t=>{let e=t.name;const i=e.indexOf(":");if(-1!==i&&(e=e.slice(i+1)),e!==n)throw new Error(`mismatch open/close tag: '${e}'/'${n}'`);d||l?.closeTag?.(g);const p=o.pop()??null;r=o[o.length-1]??null;const f=p?.destination;if(f){c.pop(),u=c[c.length-1]??h;const t=p.visitor;t&&t.to&&void 0!==f.source&&(Array.isArray(t.to)?u.source.push?u.source.push(f.source):s?.(`Unable to parse array for ${t.from} at ${g.getPath()}`):f.key?u.source[f.key]=f.source:"string"==typeof t.to&&(u.source[t.to]=f.source))}n=r?.local??null,a=r?.tag??null,l=r?.visitor??null,d=!r?.destination},onText:t=>{l?.text?.(t,g)},onEnd:e}}}const ht=(t,e,s,i=null)=>{if(!t)return null;let o=t;o.startsWith("/")&&(o=o.substring(1));let r=i?.parsedRefs?.get(t);if(void 0!==r)return r;const n=e(o);if(!n)return null;let a=n.content;try{s&&(a=s(a))}catch(t){console.warn(t)}return i?.parsedRefs?.set(t,a),a},ut=(t,e,s,i,o=null)=>{if(!t)return null;let r=t;r.startsWith("/")&&(r=r.substring(1));let n=o?.parsedRefs?.get(t);if(void 0!==n)return n;const a=e(r);if(!a)return null;const l=a.content;try{const e=(new TextDecoder).decode(l),r=s.parseFromString(e,"text/xml"),n=i.convert(r,t,o);return o?.parsedRefs?.set(t,n),n}catch(t){console.warn(t)}return null},dt=(t,e,s,i,o=null)=>{const r=new Map;let n=e.Directory[t];const a=n?n.length:0;for(let t=0;t<a;t++){const a=n[t];if(!a)continue;let l=a;l.startsWith("/")&&(l=l.substring(1));const c=ut(l,t=>e.files[t],s,i,o);r.set(l,c)}return r},pt=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],gt=(t,e="dk1")=>{let s;const i=t("auto");void 0===i||"1"!==i&&"true"!==i||(s=e);const o=t("indexed");o&&(s=`index${o}`);const r=t("rgb");r&&(s=r.toLowerCase(),8!==r.length||r.startsWith("FF")||(s="FF"+r.substring(2,r.length)));const n=t("theme");n&&(s=pt[n]);let a=t("tint");if(a&&(s+=` ${h.AdjustmentType.ETint} ${parseFloat(a)}`),s)return s},ft=t=>t?t.replace(/^\{([\s\S]+)\}$/,"$1"):t,mt=t=>t?f.roundAccurately(parseFloat(t)/12700,4):null,Tt=t=>t?f.roundAccurately(parseFloat(t)/9525,1):null,yt=t=>parseFloat(t)/1e3,bt=t=>parseFloat(t)/6e4,xt=t=>"true"===t||"1"===t;class wt{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const vt=(t,e,s)=>{if(t[0].value[0]===t[1].value[0])return e},St={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Ct=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(t,h)=>{const{password:f,onWarning:m,createWorkbookOptions:T={},...y}=h??{},b=import("./EiBc8VBUeU8VXEhw.mjs"),x=import("./Cqz35dsi-gZArS0S.mjs");let w=null;try{w=new DOMParser}catch(t){}let v=null;w||(v=import("./D9wzPAaUYfW5yKFN.mjs").then(t=>t.i));let S=null,C=null,k=null;try{const t=await Promise.all([b,x,v]);S=t[0],C=t[1],k=t[2]}catch(t){throw new Error("Unable to load XLSX parser.",{cause:t})}try{const h=S.read(t,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!h.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");h.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],h.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const p=new C.FromOOXMLConverter,f=w??new k.DOMParser,y=T?.resources??new s,b=y.beginPersist(),x={},v=new Set,A=new Map;A.set("richTypes",[]);const D=new Map,E=[],P=t=>h.files[t],O=(t,e)=>{const s=t.lastIndexOf("/"),i=t.substring(0,s+1)+"_rels/"+t.substring(s+1,t.length)+".rels";let o=e.get(i);return o||(o=((t,e,s,i,o=null)=>{if(!t)return null;const r=ut(t,e,s,i,o);if(!r)return null;const n=new Map,a=Object.keys(r),l=a.length;for(let t=0;t<l;t++){const e=a[t],s=r[e];n.set(e,s)}return n})(i,P,f,p,V),e.set(i,o)),o},I=(t,s,a,l=D)=>{let c=O(s,l).get(t),h=c?.target;if(!h)return null;if("External"===c.targetMode)return c.target;const T=s.lastIndexOf("/"),w=s.substring(0,T+1);h.startsWith("/")||(h=w+h),h=(t=>{const e=t.split(/\/+/),s=e.reduce((t,e,s)=>("."===e?t.splice(s,1):".."===e&&t.splice(s-1,2),t),e);return s.join("/")})(h);const S=p?.getVisitorParamsState().get("dxfs");let C=l.get(h);if(!C){const t="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";if(c.type===t){const t={};C=t;const s=async()=>{const s=((t,s,n,a,l,c,h)=>{const p=new ct,f=new i.TransposedBuilder;let m=null;p.registerVisitor({from:"autoFilter",to:"filter",openTag:t=>{t.copyTo("ref",lt)}}),p.registerVisitor({from:"conditionalFormatting",to:{},openTag:t=>{const e=t.getParent();e.conditionals||(e.conditionals=[]),e.conditionals.push(t.getSource());const s=t.getAttribute("sqref");s&&(t.getSource().ref=s.split(" ").join(",")),t.copyTo("pivot",rt)},closeTag:t=>{const e=t.getSource();if(e.rule){const t=Object.keys(e.rule);for(let s=0;s<t.length;s++){const i=t[s];"rule"!==i&&(e[i]=e.rule[i])}}delete e.rule}}),p.registerVisitor({from:"cfRule",to:"rule",openTag:t=>{const e=t.getParent();t.copyToObject(e,"type",lt),t.copyToObject(e,"priority",nt),t.copyToObject(e,"stopIfTrue",rt);const s=t.getAttribute("dxfId",nt);if(null!==s){let i=a?.get(s);i||(c?.(`Unable to load conditional color. Invalid dxfI: '${s}' at '${t.getPath()}'.`),i={}),e.style=i}t.copyToObject(e,"aboveAverage",rt),t.copyToObject(e,"equalAverage",rt),t.copyToObject(e,"stdDev",nt),t.copyToObject(e,"bottom",rt),t.copyToObject(e,"percent",rt),t.copyToObject(e,"rank",nt),t.copyToObject(e,"operator",lt),t.copyToObject(e,"text",lt),t.copyToObject(e,"timePeriod",lt)}}),p.registerVisitor({from:"colorScale",to:"colorScale"}),p.registerVisitor({from:"dataBar",to:"dataBar",openTag:t=>{t.copyTo("maxLength",nt),t.copyTo("minLength",nt),t.copyTo("showValue",rt)}}),p.registerVisitor({from:"iconSet",to:"iconSet",openTag:t=>{t.copyTo("iconSet",lt),t.copyTo("reverse",rt),t.copyTo("showValue",rt)}}),p.registerVisitor({from:"formula",to:null,text:(t,e)=>{const s=e.getParent();let i=s.formulas;i||(i=[],s.formulas=i),i.push(t)}}),p.registerVisitor({from:"cfvo",to:{},openTag:t=>{const e=t.getParent();e.conditions||(e.conditions=[]),e.conditions.push(t.getSource()),t.copyTo("type",lt),t.copyTo("value",at,"val"),t.copyTo("gte",rt)}}),p.registerVisitor({from:"color",to:{},openTag:t=>{const e=t.getParent();e.colors||(e.colors=[]);const s=gt(e=>t.getAttribute(e));e.colors.push(s)}}),p.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:t=>{const e=t.getParent();e.fields||(e.fields=[]),e.fields.push(t.getSource()),t.copyTo("offset",nt,"colId"),t.copyTo("hiddenButton",rt),t.copyTo("showButton",rt)}}),p.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Color,t.copyTo("cellColor",rt),t.copyTo("styleId",nt,"dxfId")}}),p.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Dynamic,t.copyTo("dynamicType",lt,"type"),t.copyTo("val",at),t.copyTo("maxVal",at,"maxVal")}}),p.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Icon,t.copyTo("iconId",nt),t.copyTo("iconSet",lt)}}),p.registerVisitor({from:"top10",to:"top10",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Top10,t.copyTo("filterVal",at),t.copyTo("percent",rt),t.copyTo("top",rt),t.copyTo("val",at)}}),p.registerVisitor({from:"filters",to:"filters",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Items,t.copyTo("blank",rt),t.copyTo("calendarType",lt)}}),p.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:t=>{const e=t.getParent();e.dateGroups||(e.dateGroups=[]),e.dateGroups.push(t.getSource()),t.copyTo("group",lt,"dateTimeGrouping"),t.copyTo("day",nt),t.copyTo("hour",nt),t.copyTo("minute",nt),t.copyTo("month",nt),t.copyTo("second",nt),t.copyTo("year",nt)}}),p.registerVisitor({from:"filter",to:"filter",openTag:t=>{const e=t.getParent();e.items||(e.items=[]),e.items.push(t.getAttribute("val",at))}}),p.registerVisitor({from:"customFilters",to:"customFilters",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Custom,t.copyTo("and",rt)}}),p.registerVisitor({from:"customFilter",to:"customFilter",openTag:t=>{const e=t.getParent();e.filters||(e.filters=[]),e.filters.push(t.getSource()),t.copyTo("operator",lt),t.copyTo("value",at,"val")}}),p.registerVisitor({from:"sortState",to:"sort",openTag:t=>{t.copyTo("ref",lt)}}),p.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:t=>{const e=t.getParent();e.fields||(e.fields=[]);const s=t.getSource();e.fields.push(s),t.copyTo("sortOn",lt,"sortBy"),t.copyTo("dxfId",lt,"sortBy"),t.copyTo("iconSet",lt),t.copyTo("customList",lt);const i=t.getAttribute("ref");if(i){const t=r.fastStringToRange(i,St).colStart,o=r.fastStringToRange(e.ref,St),n=o.colStart;s.offset=o?t-n:t}s.reverse=t.getAttribute("descending",rt)??!1}}),p.registerVisitor({from:"AlternateContent",to:null});const T=t=>{m=t.getSource(),t.copyTo("topLeft",lt,"topLeftCell");const e=xt(t.getAttribute("defaultGridColor")),s=t.getAttribute("colorId");null===s||e||(t.getSource().gridLineColor="index"+parseFloat(s)),t.copyTo("showZeros",rt),t.copyTo("showFormulas",rt),t.copyTo("zoomScale",nt),t.copyTo("showRowHeaders",rt,"showRowColHeaders"),t.copyTo("showColumnHeaders",rt,"showRowColHeaders"),t.copyTo("showRowGridlines",rt,"showGridLines"),t.copyTo("showColumnGridlines",rt,"showGridLines")};p.registerVisitor({from:"sheetView",to:"view",openTag:t=>{T(t)},closeTag:()=>{m=null}}),p.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:t=>{t.setSource([])}}),p.registerVisitor({from:"customSheetView",to:[],openTag:t=>{T(t)},closeTag:()=>{m=null}}),p.registerVisitor({from:"selection",to:"selection",openTag:t=>{if(!m)return;t.copyTo("cell",lt,"activeCell"),t.copyTo("rangeIndex",nt,"activeCellId");const e=t.getAttribute("activeCell"),s=t.getAttribute("sqref");s&&s!==e&&(t.getSource().ranges=s.split(" "))}}),p.registerVisitor({from:"pane",to:"pane",openTag:t=>{if(m&&"frozen"===t.getAttribute("state")){const e={};m.freezePanes=e,t.copyToObject(e,"topLeft",lt,"topLeftCell");const s=m.topLeft?r.fastStringToCell(m.topLeft):{colIndex:0,rowIndex:0},i={colIndex:0,rowIndex:0};t.copyToObject(i,"colIndex",nt,"xSplit"),t.copyToObject(i,"rowIndex",nt,"ySplit");const o={colIndex:s.colIndex+i.colIndex,rowIndex:s.rowIndex+i.rowIndex};e.coords=r.cellToString(o)}}}),p.registerVisitor({from:"tabColor",to:null,openTag:e=>{const s=gt(t=>e.getAttribute(t));s&&(t.tabColor=s)}}),p.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:t=>{}}),p.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:t=>{}}),p.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:t=>{}}),p.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:t=>{}}),p.registerVisitor({from:"printOptions",to:"printOptions",openTag:t=>{}}),p.registerVisitor({from:"mergeCells",to:"merges",openTag:t=>{t.setSource([])}}),p.registerVisitor({from:"mergeCell",to:[],openTag:t=>{const e=t.getAttribute("ref");t.setSource(e)}}),p.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:t=>{t.setSource([])}}),p.registerVisitor({from:"hyperlink",to:[],openTag:t=>{const e=t.getAttribute("r:id"),i=t.getAttribute("ref");if(!i)return void console.warn("No ref found for hyperlink");t.setKey(i);let o=e?s(e):"";if("string"!=typeof o)return void console.warn("Invalid address ",o);const r=t.getAttribute("location");o.endsWith("\\")&&(o=o.substring(0,o.length-1));const n=t.getAttribute("location");if(n&&(r&&r!==n&&console.warn("display and location are different",r,n),o+="#"+n),!o)return void console.warn("No address found for hyperlink. r:id",e);let a;const l=t.getAttribute("tooltip");a=l?{address:o,tooltip:l}:o,t.setSource({r:i,v:a})}}),p.registerVisitor({from:"drawing",to:"movables",openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i.movables):console.warn("no drawing found for rId",e)}}),p.registerVisitor({from:"tableParts",to:"tables",openTag:t=>{t.setSource([])}}),p.registerVisitor({from:"tablePart",to:[],openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i):console.warn("no table found for rId",e)}}),p.registerVisitor({from:"worksheet",to:"worksheet",openTag:t=>{}}),p.registerVisitor({from:"sheetProtection",to:"protection",openTag:t=>{let e=!1;if(t.hasAttribute("sheet")&&rt(t.getAttribute("sheet"))&&(e=!0),!e)return void t.setSource(void 0);const s=t=>!0===t||"1"===t||"on"===t||"true"===t||!1===t||"0"===t||"off"===t||"false"===t||null;t.copyTo("autoFilter",s),t.copyTo("deleteColumns",s),t.copyTo("formatCells",s),t.copyTo("formatColumns",s),t.copyTo("formatRows",s),t.copyTo("insertColumns",s),t.copyTo("insertHyperlinks",s),t.copyTo("insertRows",s),t.copyTo("objects",s),t.copyTo("pivotTables",s),t.copyTo("scenarios",s),t.copyTo("selectUnlockedCells",s),t.copyTo("selectUnlockedCells",s),t.copyTo("sort",s);const i={};t.copyToObject(i,"hash",lt,"hashValue"),t.copyToObject(i,"algorithm",lt,"algorithmName"),t.copyToObject(i,"salt",lt,"saltValue"),t.copyToObject(i,"spinCount",nt),Object.keys(i).length>0&&(t.getSource().password=i)}}),p.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:t=>{t.setSource({})}}),p.registerVisitor({from:"protectedRange",to:{},openTag:t=>{const e=t.getAttribute("sqref");t.setKey(e),t.copyTo("name"),t.copyTo("securityDescriptor");const s={};t.copyToObject(s,"hash",lt,"hashValue"),t.copyToObject(s,"algorithm",lt,"algorithmName"),t.copyToObject(s,"salt",lt,"saltValue"),t.copyToObject(s,"spinCount",nt),Object.keys(s).length>0&&(t.getSource().password=s)}}),p.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(t,"defaultColSize",at,"defaultColWidth"),e.copyToObject(t,"outlineLevelCol",nt,"outlineLevelCol");const s=e.getAttribute("customHeight");"1"!==s&&"true"!==s||e.copyToObject(t,"defaultRowSize",at,"defaultRowHeight"),e.copyToObject(t,"outlineLevelRow",nt,"outlineLevelRow")}}),p.registerVisitor({from:"cols",to:"cols",openTag:t=>{t.setSource([])}}),p.registerVisitor({from:"col",to:[],openTag:t=>{t.copyTo("min",t=>parseInt(t)-1),t.copyTo("max",t=>parseInt(t)-1),t.copyTo("sz",at,"width"),t.copyTo("cs",rt,"customWidth"),t.copyTo("h",rt,"hidden"),t.copyTo("l",nt,"outlineLevel"),t.copyTo("s",nt,"style")}}),p.registerVisitor({from:"oleObjects",to:null,openTag:t=>{t.warn("'OLE Objects' are not supported.")}});let y=null;const b={onOpenTag:t=>{null===y&&(y="")},onText:t=>{y+=t},onEnd:()=>{const t=n(y);return y=null,t},onError:t=>{}};return((t,s,i,o,n,a)=>{let l=!1,c=!1,h=[],p=!1,f=null,m=null,T=null,y=null,b=null,x=null;const w=a?.get("richData")??[],v=r.normalizeA1ToR1C1,S=u.createConflatingRanges(),C=new Map,k=[];let A=null;const D=u.createConflatingRanges();let E,P=!1,O=-1,I=-1,V=null,L=null;const N=[];let R=null,$=-2,M=0,j="",H="",F="",X="",B="",W="",_="",q="",z="",U="",G="",Z="",Q="",J="",K=!0,Y=null;return{...i,onEnd:()=>{N.length>0&&(s.rows=N);let e=S.done(vt);const o=e.length;if(o>0){const t=new Array(o);for(let s=0;s<o;s++){const i=e[s],o=r.rangeToString(i),n=i.value[1],a=r.resolveRelativeToA1(n,i.rowStart,i.colStart);t[s]=[o,a]}s.formulas=t}const n=D.done(!0),a=n.length;if(a>0){const t=new Array(a);for(let e=0;e<a;e++){const s=n[e],i=r.rangeToString(s);t[e]=i}s.volatile=t}if(k.length>0&&(s.dynamicArray=[...k]),h.length>0){h.sort(u.createRangeComparator(d.Orientation.Column));const t=[];let e=null,i=-1,o=-1,r=-1,n=-1,a=null;const l=h.length;l>0&&(e=h[0],i=e.colStart,o=e.colEnd,r=e.rowEnd,n=e.value,t.push(e));for(let s=1;s<l;s++)a=h[s],n!==a.value||i!==a.colStart||o!==a.colEnd||r+1!==a.rowEnd?(t.push(a),e=a,i=e.colStart,o=e.colEnd,r=e.rowEnd,n=e.value):(r=a.rowEnd,e.rowEnd=r);let c=[];for(let e=0;e<t.length;e++){const s=t[e];c.push({r:{colStart:s.colStart,colEnd:s.colEnd,rowStart:s.rowStart,rowEnd:s.rowEnd},v:s.value})}s.directStyles=c}const l=t.build();if(l){const t=l.tuples;s.data=t}i?.onEnd?.()},onOpenTag:t=>{let e=t.name;const s=e.indexOf(":");if(-1!==s&&(e=e.slice(s+1)),E){const s=t.attributes;switch(e){case"v":c=!0;break;case"f":switch(s.t??null){case null:case"normal":p=!0;break;case"shared":const t=s.si;m=s.ref,f=t;break;case"array":p=!0,m=s.ref,A=[m,!1];break;case"datatable":p=!0,m=s.ref,p=!0}void 0!==s.ca&&D.append(O,I);break;case"is":return void(P=!0)}return void(P&&n?.onOpenTag(t))}if(l){if("c"===e){E=t;const e=t.attributes.r;I=r.fastStringToCol(e);const s=t.attributes.t;void 0===s?L=null:(L=s,"str"===L&&(P=!0));let i=t.attributes.s;void 0!==i&&(i=parseInt(i),Y&&Y.value===i&&Y.colEnd+1===I?Y.colEnd=I:(Y={colStart:I,rowStart:O,colEnd:I,rowEnd:O,value:i},h.push(Y)))}}else{if("row"===e){l=!0;const e=t.attributes.r;if(O=parseInt(e)-1,M=0,H=t.attributes.customHeight,void 0!==H&&(M|=wt.CustomHeight),H!==z&&(K=!0,z=H),j=t.attributes.ht,void 0!==j&&(M|=wt.Ht),j!==q&&(K=!0,q=j),F=t.attributes.hidden,void 0!==F&&(M|=wt.Hidden),F!==U&&(K=!0,U=F),B=t.attributes.s,void 0!==B&&(M|=wt.S),B!==Z&&(K=!0,Z=B),X=t.attributes.customFormat,void 0!==X&&(M|=wt.CustomFormat),X!==G&&(K=!0,G=X),W=t.attributes.outlineLevel,void 0!==W&&(M|=wt.OutlineLevel),W!==Q&&(K=!0,Q=W),_=t.attributes.collapsed,void 0!==_&&(M|=wt.Collapsed),_!==J&&(K=!0,J=_),0!==M)if($+1!==O||K){const t=void 0!==H&&("1"===H||"true"===H),e=void 0!==X&&("1"===X||"true"===X);R={min:O,max:O,sz:t&&void 0!==j?parseFloat(j):-1,csz:t,h:void 0!==F&&("1"===F||"true"===F),s:t&&void 0!==B&&"0"!==B?parseInt(B):0,cs:e,l:void 0===W||"0"===W?0:parseInt(W),cl:void 0!==_&&("1"===_||"true"===_)},N.push(R)}else R.max=O;return $=O,void(K=!1)}i?.onOpenTag(t)}},onCloseTag:e=>{if(E){let s=e.name;const i=s.indexOf(":");if(-1!==i&&(s=s.slice(i+1)),P)if("is"===s||"v"===s){const e=n?.onEnd();null!==e&&t.addValue(O,I,""+e)}else n?.onCloseTag?.(e);return c&&(c=!1),void("c"===s&&(E=null,P=!1))}if(l)return l=!1,void(Y=null);i?.onCloseTag(e)},onText:s=>{if(s=s.trim(),c){switch(V=null,L){case null:case"n":V=parseFloat(s);break;case"b":V="1"===s||"true"===s;break;case"s":V=s;break;case"e":if("#VALUE!"===s){const t=E.attributes.vm;if(void 0!==t){const s=w[parseInt(t)-1];if(s&&s.isFormulaError){V={t:e.Error,v:s.getCode()};break}}}const t=g.getBuiltInByLabel(s);t?V={t:e.Error,v:t.getCode()}:(V=s,o?.(`Unknown formula error '${s}' in cell ${r.cellToString({colIndex:I,rowIndex:O})}`));break;case"str":case"inlineStr":P=!0}null!==V&&t.addValue(O,I,V)}if(A&&("e"===L&&(A[1]=!0),k.push(A),A=null),f)if(b===f)y=x;else{if(y=C.get(f),!y){const t=[];T=v(s,O,I,t),y=[T,t,s],C.set(f,y)}b=f,x=y}if(p){const t=[];T=v(s,O,I,t),y=[T,t,s]}if(y)return S.append(O,I,y),y=null,p=!1,f=null,void(m=null);P?n?.onText(s):l||i?.onText(s)}}})(f,t,p.createEventHandler(t,()=>{},c),c,b,h)})(t,(t,e=!1)=>I(t,h,e)??null,j,S,0,t=>{m&&(t=h+": "+t,m?.(t))},A),a=ht(h,P),c=await(async(t,e=8388608)=>{await(async()=>{if("undefined"==typeof ReadableStream)if("undefined"==typeof window){const{ReadableStream:t}=await import("./DSGJzNzS8OeMxUW1.mjs");globalThis.ReadableStream=t}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const s=new TextDecoder("utf-8");let i=0;const o=t instanceof Uint8Array?t:new Uint8Array(t);return new ReadableStream({pull(t){if(i>=o.byteLength)return void t.close();const r=o.subarray(i,Math.min(i+e,o.byteLength)),n=s.decode(r,{stream:i+e<o.byteLength});t.enqueue(n),i+=r.length}}).getReader()})(a);try{await it.parseStream(c,s,{xmlns:!1})}catch(t){throw console.warn(`Error parsing sheet: '${h}'`,t),new Error(`Error parsing sheet: '${h}'`,{cause:t})}const p=O(h,l);let f,T=new Map;if(p){const e="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let s;p.forEach((t,s)=>{if(t.type===e){const t=I(s,h,!1,l);f=t?.comments,f&&f.forEach(t=>{T.set(t.id,t)})}});const i="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(p.forEach((t,e)=>{if(t.type===i){const t=I(e,h,!1,l);s=t}}),s||f){const e=f??[],i=s?.comments;if(i){const t=s?.authors;for(let s=0;s<i.length;s++){const o=i[s];let r=void 0!==o.authorId?t[o.authorId]:void 0;if((!r||r.startsWith("tc="))&&(r=ft(r.substring(3)),T.has(r)))continue;let a=H.get(r);a||(a=F.get(r)),a||(a={id:n.uuidV4(),displayName:r},F.set(a.displayName,a),H.set(a.id,a)),r=a?.id??null;const l={id:n.uuidV4(),personId:r,ref:o.ref,done:!1,asNote:!0,content:o.content};e.push(l)}}t.comments=e}}};E.push(s())}else C=a?ht(h,P,t=>{const e=y.add({buffer:t});return e.addReference(x),v.add(e),b.toResourceId(e)},V):ut(h,P,f,p,V)}return C},V={paramMap:A,getRefs:O,getRef:I,parsedRefs:D,onWarning:m,addPerson:t=>null},L=[];let N=0;h.Strings&&(N=parseInt(h.Strings.Unique??h.Strings.length??0));const R=h.Strings??[];for(let t=0;t<N;t++)L.push(R[t]?.t??"");const $=new Map;let M=N;const j=t=>{const e=$.get(t);if(void 0!==e)return e;const s=M;return $.set(t,M++),L.push(t),s},H=(dt("richstructure",h,f,p,V),dt("richdata",h,f,p,V),new Map),F=new Map,X=dt("people",h,f,p);let B=null;if(X.size>0&&(B=X.entries().next()?.value?.[1]?.persons,B)){const t=B.length;for(let e=0;e<t;e++){const t=B[e];H.set(t.id,t),H.set(t.displayName,t)}}const W=dt("themes",h,f,p,V);let _=null;if(W&&W.entries){let t=W.entries().next();t?.value?.[1]&&(_=t.value[1])}const q=new a(_),z=dt("styles",h,f,p,V);let U=z.entries().next()?.value[1];U&&(U=JSON.parse(l(U)));const G=dt("workbooks",h,f,p,V);await Promise.all(E);const Z={...G.entries().next().value[1],styles:U,theme:q.toJSON()};L.length>0&&(Z.strings=L),B&&B.length>0&&(Z.people=B);const Q={...T,resources:y,json:Z},J=new c(Q);return v.forEach(t=>{t.deleteReference(x)}),b.endPersist(),J}catch(t){let e="Unable to parse XLSX.";throw t instanceof p&&(e="Unable to open XLSX. There are too many rows or columns."),new Error(e,{cause:t})}},toBufferXLSX:async(s,i)=>{const o=await import("./EiBc8VBUeU8VXEhw.mjs"),r=await s.toJSON(!0),n=o.utils.book_new();for(let i=0;i<r.sheets.length;i++){const a=r.sheets[i],l=o.utils.json_to_sheet([{}]);o.utils.book_append_sheet(n,l,a.name);const c=a.sheet,h=s.getSheetAt(i),u=h.getUsedRange();if(u?(l["!ref"]=u.getA1(),u.forEach((s,i)=>{const o={t:"z"},r=i.getCell().getStyle();if(!r.isNormal()){let e=r.getNumberFormat();e!==t.Type.General&&(e===t.Type.ShortDate?e="m/d/yyyy":e===t.Type.MediumDate?e="d-mmm-yy":e===t.Type.LongDate?e="[$-x-sysdate]dddd, mmmm dd, yyyy":e===t.Type.ShortTime?e="h:mm":e===t.Type.MediumTime?e="h:mm AM/PM":e===t.Type.LongTime&&(e="h:mm:ss AM/PM"),o.z=e)}if(null!==s)switch(i.getType()){case e.Number:o.t="n",o.v=s;break;case e.String:o.t="s",o.v=s;break;case e.Boolean:o.t="b",o.v=s;break;case e.Error:o.t="e",o.v=s.toString();case e.RichData:}l[i.getA1()]=o})):l["!ref"]="A1:A1",c.merges?.length>0){const t=[];l["!merges"]=t;for(let e=0;e<c.merges.length;e++)t.push(o.utils.decode_range(c.merges[e]))}if(c.cols?.length>0){const t=[];l["!cols"]=t;const e=c.cols,s={width:c.defaultColSize??h.getColumnWidthAsFontUnit(h.getColumnHeaders().getDefaultSize())};for(let i=0;i<e.length;i++){const o=e[i];for(let e=t.length;e<=o.min-1;e++)t.push(s);const r={};void 0!==o.sz&&(r.width=o.sz),void 0!==o.h&&(r.hidden=o.h),void 0!==o.l&&(r.level=o.l);for(let e=o.min;e<=o.max;e++)t.push(r)}}}return o.write(n,{type:"array",bookType:"xlsx"}),o.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));export{yt as a,xt as b,Tt as c,gt as d,Ct as i,bt as p,ft as r,mt as t};