@sheetxl/studio-mui 0.4.10 → 0.4.12

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 (127) hide show
  1. package/browser/cjs/B7qLzxylqOaybl3H.cjs +7 -0
  2. package/browser/cjs/BNGixOiIsu8jZlvn.cjs +7 -0
  3. package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +7 -0
  4. package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +7 -0
  5. package/browser/cjs/BpiMMYip132x0r1O.cjs +7 -0
  6. package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +7 -0
  7. package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +7 -0
  8. package/browser/cjs/C6_zcNM0Efa11KEE.cjs +7 -0
  9. package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +7 -0
  10. package/browser/cjs/CITvaW7L_iZfIyAN.cjs +7 -0
  11. package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +7 -0
  12. package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +7 -0
  13. package/browser/cjs/C_SgucbRn-v9IkNO.cjs +7 -0
  14. package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +7 -0
  15. package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +7 -0
  16. package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +7 -0
  17. package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +7 -0
  18. package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +7 -0
  19. package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +7 -0
  20. package/browser/cjs/DqAlQQIZIyF7HMib.cjs +7 -0
  21. package/browser/cjs/DuwawlAm4aRBNTBm.cjs +7 -0
  22. package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +7 -0
  23. package/browser/cjs/IC19hB4Ntvw1158j.cjs +7 -0
  24. package/browser/cjs/index.cjs +10 -4
  25. package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +7 -0
  26. package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +7 -0
  27. package/browser/esm/B8dJHVZJta8QbNKG.mjs +7 -0
  28. package/browser/esm/BThbC01mtb7qq8_A.mjs +7 -0
  29. package/browser/esm/Bnt1M91BRyMvXrc4.mjs +7 -0
  30. package/browser/esm/BqN0SYrEO0RZQtv-.mjs +7 -0
  31. package/browser/esm/CHPXsEre3jry2-jF.mjs +7 -0
  32. package/browser/esm/CMCOU0nDlymDFS9l.mjs +7 -0
  33. package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +7 -0
  34. package/browser/esm/CesL-3BNbMB1f_if.mjs +7 -0
  35. package/browser/esm/CfvNSnuQLa1SPbNL.mjs +7 -0
  36. package/browser/esm/CloqVDbJmTL4oFek.mjs +7 -0
  37. package/browser/esm/Cta0yn5UIrP2UoT4.mjs +7 -0
  38. package/browser/esm/CwRyQHiDoBLx5_1g.mjs +7 -0
  39. package/browser/esm/DI-ZGstUJFwkx4H6.mjs +7 -0
  40. package/browser/esm/DQTfmweCXjuIlITn.mjs +7 -0
  41. package/browser/esm/DUIfOO25d1fqtJzn.mjs +7 -0
  42. package/browser/esm/DhOXsRr8c7bDS1jM.mjs +7 -0
  43. package/browser/esm/JPwh2m5-pXkdPVzF.mjs +7 -0
  44. package/browser/esm/UkNAvQj0NVgeMpUl.mjs +7 -0
  45. package/browser/esm/ZUfck_LDsQb9gpvU.mjs +7 -0
  46. package/browser/esm/gHhqkr52cxXkga0T.mjs +7 -0
  47. package/browser/esm/index.mjs +8 -83
  48. package/browser/esm/obM68UOvA5HV7Lt1.mjs +7 -0
  49. package/browser/esm/x9MyDRdLE47dI9dF.mjs +7 -0
  50. package/browser/esm/yW9jxnamUqAhVQkJ.mjs +7 -0
  51. package/licenses/dependencies.txt +145 -145
  52. package/node/esm/{DxbGK6Zl1UgjOa4-.mjs → B3M2CzPvK2oKOfg5.mjs} +2 -2
  53. package/node/esm/{D9XxEDOFeim_xxQE.mjs → BIRLX0-9t62Lqats.mjs} +2 -2
  54. package/node/esm/{BmkBQUrL_kkRhzTh.mjs → BJY8yNMmN_yyRtIG.mjs} +1 -1
  55. package/node/esm/{bMROCCq764fn-xgi.mjs → Bj8uU2shfkvN4LnE.mjs} +6 -6
  56. package/node/esm/{sAnM1xQCuHDSOmip.mjs → Bt5y5wVaVAVjwHBl.mjs} +1 -1
  57. package/node/esm/{BPqOHRFTv--y9umX.mjs → C2P_M1JNT_WZZN3H.mjs} +8 -8
  58. package/node/esm/{CcretMZPKGn3lnR4.mjs → CBGAl2mih9mHDt5w.mjs} +1 -1
  59. package/node/esm/{Clurk3ikkAHRiukp.mjs → CKtVB9hMCfabQMxC.mjs} +2 -2
  60. package/node/esm/{Dc--wbPxmu3D8pbK.mjs → CVGxETc4rIE1gNAH.mjs} +38 -38
  61. package/node/esm/{BGArlD6RNgEObMgD.mjs → CryVonGjJnmo2dE_.mjs} +5 -5
  62. package/node/esm/{FBYT_1wWMsovwFUH.mjs → D1C8ifsmXsypL6pp.mjs} +13 -13
  63. package/node/esm/{DAGXTtxswgRevXcg.mjs → D1xD8cOQDGcbjIlG.mjs} +1 -1
  64. package/node/esm/{tOKSFYpLW-UAq6Gt.mjs → DUfB1ollhqU-JIk5.mjs} +4 -4
  65. package/node/esm/{M1FpuPZr9_2AafMV.mjs → Dx2vq1Hdt4pqmOF-.mjs} +2 -2
  66. package/node/esm/{wsJBzsqfI7PB1hMT.mjs → M3UB6IrhVERZziiJ.mjs} +2 -2
  67. package/node/esm/{BvRJoxdFTieQ7fmr.mjs → PF5CCBvapZxEzc7k.mjs} +1 -1
  68. package/node/esm/{p6vc6u8VPkFyCsYx.mjs → bv_GA6NGCT0sJaXy.mjs} +2 -2
  69. package/node/esm/{DhG888jHVhaxSY8F.mjs → h1y2hBFecTqRgUa-.mjs} +25 -25
  70. package/node/esm/index.mjs +5265 -4998
  71. package/node/esm/{BCPBJsft-CxWAdC2.mjs → kHsChOtl8GUkzj5Q.mjs} +2 -2
  72. package/node/esm/{CvPEjDQ6QhtpTabY.mjs → kIQFLB3nmEJdn_OT.mjs} +1 -1
  73. package/node/esm/{BBg45DshIWHYXywC.mjs → m8fyd2BoYkTOJlc1.mjs} +1 -1
  74. package/node/esm/{usxl4NgDVOQ7LrDb.mjs → wdtYNTNCynMMS4_P.mjs} +1 -1
  75. package/package.json +8 -8
  76. package/types/index.d.ts +11 -0
  77. package/browser/cjs/BKTBvSy7O4Xw2cgz.cjs +0 -12
  78. package/browser/cjs/BpePzZJYiqMlY5Tv.cjs +0 -6
  79. package/browser/cjs/C1kdA0ggDPxfA1rZ.cjs +0 -7
  80. package/browser/cjs/C3Ou4UjGdLm76uIO.cjs +0 -6
  81. package/browser/cjs/CFxDNxEIdtHFQI9Y.cjs +0 -7
  82. package/browser/cjs/CYBKL0vexMAhOhAv.cjs +0 -15
  83. package/browser/cjs/CdVTdaOLyLtwVswE.cjs +0 -6
  84. package/browser/cjs/ClsxZKYLxWzS4vf3.cjs +0 -12
  85. package/browser/cjs/Co1amcDxMGmeSblk.cjs +0 -161
  86. package/browser/cjs/CoKAO1N3hI6MCu8D.cjs +0 -6
  87. package/browser/cjs/CtsmtdeQOqFBoICs.cjs +0 -6
  88. package/browser/cjs/CuB7GbiZyoeSvc0Z.cjs +0 -6
  89. package/browser/cjs/D-N-VqvFR1gHQx1f.cjs +0 -11
  90. package/browser/cjs/DDFf-jFPulia8BBq.cjs +0 -11
  91. package/browser/cjs/Db8DWa6iDZSqedMi.cjs +0 -90
  92. package/browser/cjs/DeGIeKT9CooiCmKo.cjs +0 -6
  93. package/browser/cjs/LWz4eqzOyIvcl3ew.cjs +0 -6
  94. package/browser/cjs/bzV_pbhf0GMpQZ5j.cjs +0 -16
  95. package/browser/cjs/fCiaIJ9GEGrJHKcW.cjs +0 -18
  96. package/browser/cjs/g_d3i2WIzavP1fkJ.cjs +0 -6
  97. package/browser/cjs/jtJTqrtVCIIZdMGs.cjs +0 -6
  98. package/browser/cjs/lKYJYMC7FrPq5kHP.cjs +0 -42
  99. package/browser/cjs/niDPoiECJADuYx3e.cjs +0 -145
  100. package/browser/cjs/olo9IZBG5nwaup_7.cjs +0 -6
  101. package/browser/cjs/zKQuLycAjgd_X11q.cjs +0 -6
  102. package/browser/esm/3hWSR1m3EU7D5hi-.mjs +0 -1352
  103. package/browser/esm/536uCif-OpzkPpDe.mjs +0 -84
  104. package/browser/esm/BAKeXjQwj8pB6HZf.mjs +0 -3803
  105. package/browser/esm/BCEAVoasUKP7howp.mjs +0 -25
  106. package/browser/esm/BKPv5CXZmlt0Bt9q.mjs +0 -52
  107. package/browser/esm/BpaKIplfXogRA7Dy.mjs +0 -424
  108. package/browser/esm/C7S8lmNi8dvBvaaL.mjs +0 -13391
  109. package/browser/esm/C8g1cXW8UUjZ5aXU.mjs +0 -43
  110. package/browser/esm/CDg8_cQCaixUeVW5.mjs +0 -59
  111. package/browser/esm/COdRj-kRolpDnJJt.mjs +0 -153
  112. package/browser/esm/C_SmA3bhMniSBiJM.mjs +0 -2251
  113. package/browser/esm/CfhFPyNuH7O_8Ma5.mjs +0 -46
  114. package/browser/esm/Cq7Bvqjn_f2hb4Yu.mjs +0 -1703
  115. package/browser/esm/Cu4sFU_zvi2DcKL0.mjs +0 -864
  116. package/browser/esm/DRlIFEu_74fHh0Nd.mjs +0 -44
  117. package/browser/esm/DW_hf-cH6FfKvA2U.mjs +0 -1366
  118. package/browser/esm/D_9FRFbybIoGcpk5.mjs +0 -640
  119. package/browser/esm/DssrQc6563EzuV2p.mjs +0 -1467
  120. package/browser/esm/TCkOSlTdkEa2IszR.mjs +0 -392
  121. package/browser/esm/XunxgPz4pxTyfYZa.mjs +0 -19979
  122. package/browser/esm/YJTooL6WwG9eY3LG.mjs +0 -48
  123. package/browser/esm/ej-oxHSoVFxjTvis.mjs +0 -2410
  124. package/browser/esm/fbwdS1S_4A9RYV7u.mjs +0 -1672
  125. package/browser/esm/tZtCH_zqvCEW6mXy.mjs +0 -23
  126. package/browser/esm/tbB-JzXGTPYVXdKc.mjs +0 -52
  127. package/node/esm/BmYPa_c9Yu9hUbtH.mjs +0 -312
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
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 n}from"react/jsx-runtime";import{memo as t,useState as a,useCallback as o}from"react";import{Box as i,FormControlLabel as s,Checkbox as l}from"@mui/material";import{B as r,p,R as c}from"./Cc7y1nMDr5J8jWx-.mjs";const d=["Ok","Cancel"],m=t(t=>{const{tableOptions:m,context:g,onOption:u,onValidateOption:f,onDone:h,options:O=d,defaultOption:x=O?.[0],cancelOption:b="Cancel",sx:C,...D}=t,[N,T]=a(!1),[j,k]=a(()=>m?.hasHeader??!1),[v,w]=a(()=>m?.ranges??null),y=r(e=>{const n={...m,hasHeader:j,ranges:v};u?.(e,e===b,e===x),h?.({option:e,tableOptions:n})},[h,u,x,b,j,v,m]),F=o(async(e,n)=>null,[]);return e(p,{title:"Insert Table",options:O,onDone:y,onValidateOption:F,defaultOption:x,cancelOption:b,autoFocusSel:".range-input input",sx:{width:"360px",...C},...D,children:n(i,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[e(c,{formName:"range",value:v,onChangeInput:e=>w(e),resolvedAddress:g.getNames().getRanges.bind(g.getNames()),onFocus:e=>{N||e.target?.select(),T(!0)}}),e(s,{control:e(l,{checked:j,onChange:()=>k(!j)}),label:"Table has headers",labelPlacement:"end"})]})})});export{m as TableNewDialog,m as default};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
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}from"react/jsx-runtime";import{memo as o,forwardRef as n,useState as a}from"react";import{G as e,I as i,p,d as r,D as s}from"./Cc7y1nMDr5J8jWx-.mjs";import{Box as l,FormControl as u,TextField as c}from"@mui/material";import{alpha as d}from"@mui/system";const m=["Input"],g=o(n((o,n)=>{const{initialValue:g="",onOption:f,onValidateOption:h,onInputOption:y,onValidateInputOption:O,onDone:x,inputProps:w,inputLabel:I,inputType:T,inputPlaceHolder:F,options:P=m,autoFocusSel:v=".autoFocus",cancelOption:C,defaultOption:b=P?.[0],...k}=o,[D,V]=a(!1),[j,B]=a(g),[H,L]=a(""),[M,N]=a(!0),S=e(async(t,o)=>{if(!O)return!0;const n=await(O?.(t,o));L(n?.message??"");const a=n?.valid??!0;return N(a),a},[O]),$=e(async t=>{y?.(j,t)},[j,y,x,f,C,b]),z=e(async t=>{t.keyCode===i.Enter&&await(S?.(j,null))},[j,$]),E=e(t=>{B(t.target.value),S?.(t.target.value,null)},[h]),G=e(async t=>{let o=await S(j,t);try{!1!==o&&(o=await S(j,t))}catch(t){}return o??!0},[j,h]);return t(p,{options:P,onDone:x,onOption:(t,o)=>{o||$(t)},onValidateOption:G,cancelOption:C,defaultOption:b,autoFocusSel:v,ref:n,...k,children:t(l,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0)},children:t(u,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t(c,{onFocus:t=>{D||t.target?.select(),V(!0)},type:T,label:I,helperText:H||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5),color:M?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:F,spellCheck:!1,autoComplete:"off",...w,className:r("autoFocus",w?.className),sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${d("#fff",s(5))}, ${d("#fff",s(5))})`}}},value:j,onChange:E,onKeyDown:z,onContextMenu:t=>{t.stopPropagation()}})})})})}));export{g as default};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
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"./Cc7y1nMDr5J8jWx-.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("./CloqVDbJmTL4oFek.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};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
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{e as t}from"./Cc7y1nMDr5J8jWx-.mjs";import{c as e,b as s,r,t as o,a as i,p as n,d as l}from"./Bnt1M91BRyMvXrc4.mjs";import{IFont as a,IAutoFilter as c,Sort as u,IRange as h,AddressUtils as p,IFill as g,IStyle as d,ITextFrame as m,FormulaError as b,IBorder as f}from"@sheetxl/sdk";class A{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let e=0;e<this.list.length;e++)t(this.list[e],e,this)}}const y=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,v=t=>{const e=parseInt(t);return isNaN(e)?null:e},F=t=>{const e=parseFloat(t);return isNaN(e)?null:e},C=new Map;class w{constructor(t,e,s,r,o,i=null,n){const l=(t,e,s)=>n?.getRef?.(t,e,s,n?.parsedRefs),a=t=>n?.getRefs?.(t,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??C}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let t=0;t<r.length;t++){const e=r[t];if(""===e||"."===e)continue;let o=[];for(let t=0;t<s.length;t++){const r=s[t],i=r.childNodes;for(let t=0;i&&t<i.length;t++){const s=r.childNodes[t];s.localName!==e&&"*"!==e||o.push(s)}}s=o}return 1===s.length?s[0]:0===s.length?null:new A(s)}getFromPath(e,s){return t.getFromPath(e,s)}setToPath(e,s,r){return t.setToPath(e,s,r)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return null==o?s:"1"===o||"on"===o||"true"===o||"0"!==o&&"off"!==o&&"false"!==o&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return y}get INT_COPY(){return v}get FLOAT_COPY(){return F}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o)if(Array.isArray(o))for(let t=0;t<o.length;t++){if(null==i)return;if(i=o[t](i),null==i)return}else{if(null==i)return;if(i=o(i),null==i)return}this.setToPath(s,r,i)}}class P{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class N{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);1===o.nodeType&&"Relationship"===o.localName&&this.processRelationship(t,o,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const O=(e,s)=>{if(e||!e.hasAttribute("rot"))return;const r=e.getAttribute("rot"),o=t.roundAccurately(n(r),2);-1e3!==o&&(s.rotation=o)},T=(t,e,s,r,o)=>{const i=t.getValAttrAsString(r,e);null!==i&&(s[o]=i)},V=(t,e,s,r,o=r,i=null)=>{const n=t.getValAttrAsBoolean(r,e,i);null!==n&&(s[o]=n)},S=(t,e,s,r,o)=>{const i=t.getValAttrAsInteger(r,e);null!==i&&(s[o]=i)},k=(t,e,s,r,o,i=1)=>{const n=t.getValAttrAsFloat(r,e);null!==n&&(s[o]=n*i)};class x{visit(t,e,s){return V(t,e,s,"roundedCorners","roundedCorners"),S(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let t=0;t<c.length;t++){const e=c[t];if(e.xAxisId){const r=e.xAxisId,n=a.get(r);o[t+""]=n,e.offsetXAxis=t,delete e.xAxisId,s.xAxes=o,o.length=++i}if(e.yAxisId){const r=e.yAxisId,o=a.get(r);n[t+""]=o,e.offsetYAxis=t,delete e.yAxisId,s.yAxes=n,n.length=++l}r[t+""]=e}r.length=c.length;const u=t.getVisitorParamsState().get("series");if(!u||0===u.length)return;const h={};s.series=h;for(let t=0;t<u.length;t++)h[t+""]=u[t];h.length=u.length}}class L{visit(t,e,s){return V(t,e,s,"plotVisOnly","plotVisOnly"),T(t,e,s,"dispBlanksAs","dispBlanksAs"),V(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),V(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(!0===r||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",null!==i)}catch(t){throw new Error("Unexpected Error parsing Chart: "+t)}}}class I{visit(t,e,s){let r={};return s.plotArea=r,r}}class B{EnumMappings(){}static fromOoxmlGradientType(t){return"circle"===t?"radial":t}static fromOoxmlLineCap(t){if("rnd"===t)return"round";if("flat"===t)return"butt";if("sq"===t)return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return"sng"===t?"single":t}static fromOoxmlAlignment(t){return"ctr"===t?"center":t}}class j{visit(t,e,s){}processStroke(t,e,s){const r={},n=t.evaluate("ln",e);if(n){n.hasAttribute("algn")&&(r.align=B.fromOoxmlAlignment(n.getAttribute("algn"))),n.hasAttribute("cap")&&(r.lineCap=B.fromOoxmlLineCap(n.getAttribute("cap"))),n.hasAttribute("cmpd")&&(r.compound=B.fromOoxmlCompound(n.getAttribute("cmpd"))),n.hasAttribute("w")&&(r.width=o(n.getAttribute("w")));const e=t.evaluate("miter",n);e&&(r.lineJoin="miter",e.hasAttribute("lim")&&(r.miter=parseFloat(e.getAttribute("lim")))),t.evaluate("bevel",n)&&(r.lineJoin="bevel"),t.evaluate("round",n)&&(r.lineJoin="round");const l=t.evaluate("custDash",n);if(l){const e=t.evaluate("ds",l);if(e&&e.length>0){let t="";for(let s=0;s<e.length;s++){const r=e.item(s);t+=i(r.getAttribute("d"))+","+i(r.getAttribute("sp"))}r.dash=t}}const a=t.evaluate("prstDash",n);a&&a.hasAttribute("val")&&(r.dash=a.getAttribute("val")),this.parseEndElement(t,n,r,"headEnd","head"),this.parseEndElement(t,n,r,"tailEnd","tail");const c=this.processFill(t,n,s);r.fill=c}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const t=i.getAttribute("len")?i.getAttribute("len"):"med",e=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=t+"-"+e}}processFill(t,e,r){const o={};if(t.evaluate("noFill",e))return o.none=!0,o;const i=t.evaluate("solidFill",e);if(i){const e=this.processAdjColor(t,i);return e&&(o.solid=e),o}const n=t.evaluate("gradFill",e);if(n){n.hasAttribute("rotWithShape")&&(o.isRotated="1"===n.getAttribute("rotWithShape"));const e=this.processGradFill(t,n);return o.gradient=e,o}const l=t.evaluate("pattFill",e);if(l){const e=this.processPatternFill(t,l);return o.pattern=e,o}const a=t.evaluate("blipFill",e);if(a){a.hasAttribute("rotWithShape")&&(o.isRotated=s(a.getAttribute("rotWithShape"))),a.hasAttribute("dpi")&&(o.dpi=a.getAttribute("dpi"));const e=this.processImageFill(t,a);return o.image=e,o}return o.none=!0,o}processGradFill(t,e){const r={},o=t.evaluate("lin",e);if(o){if(r.type="linear",o.hasAttribute("ang")){const t=n(o.getAttribute("ang"));r.angle=t}if(o.hasAttribute("scaled")){const t=s(o.getAttribute("scaled"));r.scaled=t}}const l={};e.hasAttribute("flip")&&(l.mirror=e.getAttribute("flip")),Object.keys(l).length>0&&(r.tile=l);const a=t.evaluate("path",e);if(a){a.hasAttribute("path")&&(r.type=B.fromOoxmlGradientType(a.getAttribute("path")));const e=t.evaluate("fillToRect",a);e&&(r.fillTo=this.getRect(e))}const c=t.evaluate("tileRect",e);c&&(r.tile.bounds=this.getRect(c));const u=[],h=t.evaluate("gsLst/gs",e);for(let e=0;h&&e<h.length;e++){const s=h.item(e),r={offset:i(s.getAttribute("pos")),color:this.processAdjColor(t,s)};u.push(r)}return u.length>0&&(r.stops=u),r}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=i(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=i(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=i(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=i(t.getAttribute("r"))),0===Object.keys(e).length?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const e=this.processAdjColor(t,o);e&&(s.background=e)}const i=t.evaluate("fgClr",e);if(i){let e=this.processAdjColor(t,i);e&&(s.foreground=e)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+i(e.getAttribute("r"))+","+i(e.getAttribute("g"))+","+i(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+n(e.getAttribute("hue"))+","+i(e.getAttribute("sat"))+","+i(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(1===i.nodeType){let r=i.localName;s+="hue"===r||"hueOff"===r||"hueMod"===r?this.processAdjustmentElement(t,e,r,6e4):"gray"===r||"comp"===r||"inv"===r||"gamma"===r||"invGamma"===r?this.processAdjustmentElement(t,e,r,1):this.processAdjustmentElement(t,e,r)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class _ extends j{visit(t,s,r){try{const o=t.evaluate("xfrm",s);if(o){O(o,r);const s={x:0,y:0,width:0,height:0},i=t.evaluate("off",o);i&&(s.x=e(i.getAttribute("x"))??0,s.y=e(i.getAttribute("y"))??0);const n=t.evaluate("ext",o);i&&(s.width=e(n.getAttribute("cx"))??0,s.height=e(n.getAttribute("cy"))??0),r.bounds=s}const i=t.evaluate("prstGeom",s);i?.hasAttribute("prst")?r.geometry=i?.getAttribute("prst"):t.evaluate("customGeom",s)&&console.warn("customGeom not supported yet");const n=this.processFill(t,s,r);n&&Object.keys(n).length>0&&(r.fill=n);const l=this.processStroke(t,s,r);return l&&Object.keys(l).length>0&&(r.stroke=l),r}catch(t){throw console.warn(t),new Error("Unexpected Error parsing Shape Properties element")}}}class R{visit(t,e,s){let r={};if(T(t,e,r,"grouping","grouping"),V(t,e,r,"varyColors","varyColors"),k(t,e,r,"gapWidth","gapWidth",.01),k(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),S(t,e,r,"bubbleScale","bubbleScale"),V(t,e,r,"showNegBubbles","showNegativeBubbleValues"),V(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),S(t,e,r,"firstSliceAng","startAngle"),S(t,e,r,"holeSize","holeSize"),T(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let e=t.getVisitorParamsState().get("types");e||(e=[],t.getVisitorParamsState().set("types",e)),e.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(0===r.length)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class E extends R{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type="col"===r?"column":"bar")}}class Y{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);null!==i&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),!0===n?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(V(t,e,r,"showBubbleSize","showBubbleSize"),V(t,e,r,"showCatName","showCatName"),V(t,e,r,"showLeaderLines","showLeaderLines"),V(t,e,r,"showPercent","showPercentage"),V(t,e,r,"showSerName","showSerName"),V(t,e,r,"showVal","showVal"),V(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return null!==l&&(r.separator=l.textContent),T(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const t=r.getAttribute("formatCode");s.formatCode=t,r.hasAttribute("sourceLinked")&&(s.sourceLinked="1"===r.getAttribute("sourceLinked"))}}}const D=(t,e,s)=>{if(!0===t.getValAttrAsBoolean("invertIfNegative",e))if(t.evaluate("extLst/ext/invertSolidFillFmt",e)){if(s.fill&&s.fillNegative){const e=t.getFromPath(s,"fill.solid.adjs");e&&t.setToPath(s,"fillNegative.solid.adjs",e)}}else{const t={val:"FFFFFF"},e={};e.solid=t,s.fillNegative=e;const r={val:"000000"},o={};o.solid=r;const i={};i.fill=o,s.strokeNegative=i}};class M{visit(t,e,s){const r={};S(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;null!==o&&null!==o.firstChild&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),null!==i&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),null!==n&&(l=this.parsePointsAsString(t,n))),null!==l&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),S(t,e,r,"idx","idx"),V(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(null!==r){const e=r.firstChild.nodeValue;t.setToPath(s,"title.range",e)}else{const r=t.evaluate("tx/v",e);null!==r&&t.setToPath(s,"title.text.simpleRun",r.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let s=0;o&&r&&s<r;s++){let r=null,o=t.evaluate("pt[@idx='"+s+"']/v",e);o instanceof Node&&(r=o.textContent),i[s]=r}for(let t=0;t<i.length;t++)t>0&&(s+=","),void 0!==i[t]&&(s+=i[t]);return s+="}",s}afterVisit(t,e,s){D(t,e,s);let r=t.getFromPath(s,"points");if(r){const e=Object.keys(r);for(let o=0;o<e.length;o++){const i=e[o],n=t.getFromPath(r,i);if(!n)continue;let l=t.getFromPath(n,"markers");l&&(t.setToPath(s,"markers.points."+i,l),delete n.markers)}}}}class U{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return null!==n&&(o[n]=i),V(t,e,i,"bubble3D","bubble3D"),S(t,e,i,"explosion","explosion"),D(t,e,i),i}}class z{visit(t,e,s){const r=e.parentNode.localName;if("ser"===r||"dPt"===r){const r={},o=t.getValAttrAsString("size",e);null!==o&&(r.size=o);const i=t.getValAttrAsString("symbol",e);return i&&(r.type=i),s.markers=r,r}return null}}class G{visit(t,e,s){let r={};this.parseScaling(t,e,r),k(t,e,r,"majorUnit","majorUnits"),k(t,e,r,"minorUnit","minorUnits"),V(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),T(t,e,r,"majorTickMark","majorTickMarks"),T(t,e,r,"minorTickMark","minorTickMarks"),T(t,e,r,"crosses","crosses"),k(t,e,r,"crossesAt","crosses"),T(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),S(t,e,r,"lblOffset","labelOffset"),T(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=null!==o&&0===o,S(t,e,r,"tickMarkSkip","tickMarkSkip"),S(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),T(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(null!==l){n.dem=l;let s=t.getValAttrAsString(i,e);n.amt=s}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);null!==r&&("ctr"===r?s.labelAlign="center":"l"===r?s.labelAlign="left":"r"===r&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);null!==r&&("b"===r?s.orientation="bottom":"l"===r?s.orientation="left":"r"===r?s.orientation="right":"t"===r&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);null!==o&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked="1"===o.getAttribute("sourceLinked"))),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);null!==r&&(s.inverted="minMax"!==r);const o=t.getValAttrAsFloat("scaling/logBase",e);null!==o&&(s.logBase=o,s.scaleType="log"),k(t,e,s,"scaling/max","max"),k(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);null!==r&&(t.setToPath(s,"labels.shown",!0!==r),t.setToPath(s,"shown",!0!==r));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",null!==i);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",null!==n);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",null!==l)}}class W{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),(new _).visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=e=>{const s={};let r=t.evaluate("t",e);const o=t.evaluate("rPr",e);o&&this.parseTextProperties(t,o,s),r?s.text=r.firstChild.textContent??"":e.textContent&&(s.text=e.textContent??""),i.push(s)};if(void 0!==n?.length)for(let t=0;n&&t<n.length;t++)l(n.item(t));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&O(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight="1"===e.getAttribute("b")?700:400),e.hasAttribute("i")&&(s.italic="1"===e.getAttribute("i")),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const t=s.font??{};if(r.hasAttribute("typeface")&&(t.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const e=r.getAttribute("panose");e&&(t.fallbacks=[a.getPanoseFallback(e)])}r.hasAttribute("pitchFamily")&&(t.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(t.charset=r.getAttribute("charset")),Object.keys(t).length>0&&(s.font=t)}}}class X{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let s=t.getFromPath(r,"title");s||(s={},t.setToPath(r,"title",s));let o=s,i=t.getValAttrAsBoolean("delete",e);return null!==i&&(o.shown=!i),o}return s}}class ${visit(t,e,s){const r={};return V(t,e,r,"overlay","overlay"),T(t,e,r,"legendPos","position"),s.legend=r,r}}class K extends _{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class H extends W{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const e=r.firstElementChild.nodeValue;t.setToPath(s,"range",e)}}visit(t,e,s){const r={};V(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const t=s.text?.rotation??null;null!==t&&(s.rotation=parseInt(t),delete s.title.rotation)}}}class J{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let e={};k(t,r,e,"x","x"),k(t,r,e,"y","y"),k(t,r,e,"w","w"),k(t,r,e,"h","h"),T(t,r,e,"xMode","xMode"),T(t,r,e,"yMode","yMode"),T(t,r,e,"wMode","wMode"),T(t,r,e,"hMode","hMode"),Object.keys(e).length>0&&(s.manualLayout=e)}return s}}class q{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class Q extends j{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let s=0;s<o.length;s++){const i=o.item(s);if(1===i.nodeType){let s=i.localName;const o=t.evaluate(s,e),n=this.processAdjColor(t,o);r[s]=n}}return Object.keys(r).length>0&&(s.colors=r),r}}class Z{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[a.getPanoseFallback(i)]),s}}class tt{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const e=t.getRef(o);"string"==typeof e&&(r.address=e)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class et{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:c.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:c.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let e=0;e<r.length;e++){const o=r.item(e);if(1!==o.nodeType)continue;let i=null;"customFilter"===o.localName&&(i=this.processCustomFilter(t,o)),i&&s.filters.push(i)}return s}processDynamicFilter(t,e){const s={type:c.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:c.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType)if("dateGroupItem"===s.localName){const e=this.processDateGroupItem(t,s);e&&r.push(e)}else if("filter"===s.localName){const e=this.processFilterItem(t,s);void 0!==e&&o.push(e)}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:c.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:c.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1!==s.nodeType)continue;let i=null;"colorFilter"===s.localName?i=this.processColorFilter(t,s):"customFilters"===s.localName?i=this.processCustomFilters(t,s):"dynamicFilter"===s.localName?i=this.processDynamicFilter(t,s):"filters"===s.localName?i=this.processFilters(t,s):"iconFilter"===s.localName?i=this.processIcon(t,s):"top10"===s.localName&&(i=this.processTop10(t,s)),i&&o.push(i)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const r={};if(!e.hasAttribute("colId"))return;r.offset=parseInt(e.getAttribute("colId"));let o=!1;return e.hasAttribute("hiddenButton")&&(o=s(e.getAttribute("hiddenButton"))),o&&(r.hiddenButton=!0),e.hasAttribute("showButton")&&(r.showButton=s(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,r),r}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1===s.nodeType&&"filterColumn"===s.localName){const e=this.processFilterColumn(t,s);e&&o.push(e)}}return o.length>0&&(s.fields=o),o}}class st{visit(t,e,r){if(!e)return;const o={};if(t.copyFromAttribute(e,"ref",o),e.hasAttribute("caseSensitive")){const t=s(e.getAttribute("caseSensitive"));o.collatorOptions=t?u.CaseSensitiveOptions:u.CaseInsensitiveOptions}const i=e.getAttribute("sortMethod");null!=i&&"none"!==i&&("stroke"===i?o.collatorOptions={...o.collatorOptions,collation:"stroke"}:"pinYin"===i&&(o.collatorOptions={...o.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&s(e.getAttribute("columnSort"))&&(o.orientation=h.Orientation.Column);const n=p.fastStringToRange(o.ref);return this.processSortConditions(t,e,o,n),Object.keys(o).length>0&&(r.sort=o),o}processSortCondition(t,e,r){if(!e)return null;const o={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const t=e.getAttribute("ref"),s=p.fastStringToRange(t);o.offset=r?s.colStart-r.colStart:s.colStart}return o.reverse=!1,e.hasAttribute("descending")&&(o.reverse=s(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",o,"sortOn"),t.copyFromAttribute(e,"dxfId",o),t.copyFromAttribute(e,"iconSet",o),t.copyFromAttribute(e,"customList",o),o}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"sortCondition"===s.localName){const e=this.processSortCondition(t,s,r);e&&i.push(e)}}return i.length>0&&(s.fields=i),i}}class rt{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=l(t=>e.getAttribute(t),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);if(1===i.nodeType&&"font"===i.localName){const e={};this.processFont(t,i,e),s[o++]=e}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=a.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const t=r.getAttribute("val");s.underline=t||a.UnderlineStyle.Single}T(t,e,s,"vertAlign","verticalAlign"),"superscript"===s.verticalAlign?s.verticalAlign=a.VerticalAlignment.Super:"subscript"===s.verticalAlign&&(s.verticalAlign=a.VerticalAlignment.Sub),k(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),T(t,e,s,"name","family"),T(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const t=i.getAttribute("val");if(t)switch(t){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return T(t,e,s,"scheme","scheme"),V(t,e,s,"shadow","shadow",!0),V(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),T(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);1===i.nodeType&&"fill"===i.localName&&this.processFill(t,i,s,o++)}return s}processFill(t,e,s,r){const o={type:g.Type.None},i=e.childNodes;let n=!1;for(let e=0;!n&&e<i.length;e++){const s=i.item(e);1===s.nodeType&&("gradientFill"===s.localName?(this.processGradientFill(t,s,o),n=!0):"patternFill"===s.localName&&(this.processPatternFill(t,s,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=g.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=t=>{if(!t)return 0;const e=parseFloat(t);return isNaN(e)?0:e};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let e=0;e<n.length;e++){const s=n.item(e);if(1===s.nodeType&&"stop"===s.localName){const e={};r.push(e);const o=parseFloat(s.getAttribute("position"));e.offset=o;const i=t.evaluate("color",s);this.processDataBarColor(t,i,e,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?g.BuiltInSheetPattern.Solid:g.BuiltInSheetPattern.None);if(o===g.BuiltInSheetPattern.None)return{none:!0};s.type=g.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===g.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const t=n;n=l,l=t}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const u=t.evaluate("bgColor",e);return this.processDataBarColor(t,u,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let e=0;e<o.length;e++){const n=o.item(e);1===n.nodeType&&"border"===n.localName&&this.processBorder(t,n,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,f.Edge.Left),this.processBorderStroke(t,e,i,f.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,f.Edge.Vertical),this.processBorderStroke(t,e,i,f.Edge.Top),this.processBorderStroke(t,e,i,f.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,f.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class ot extends rt{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:g.Type.None},r.fills[1]={type:g.Type.Pattern,patternType:g.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const r=[];this.processCellStyles(t,t.evaluate("cellStyles",e),r,o,i),s.named=r}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"rgbColor"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"color"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let t=0;t<o.length;t++){const e=o.item(t);if(1===e.nodeType&&"numFmt"===e.localName){const t=e.getAttribute("numFmtId"),s=e.getAttribute("formatCode");if(t&&s){const e=s.replace(/\\(.)/g,"$1");r.set(parseInt(t),e)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let e=0;e<n.length;e++){const l=n.item(e);if(1===l.nodeType&&"xf"===l.localName){const e={};this.processXF(t,l,e,r,o,i),s.push(e)}}}processXF(t,e,r,o,i,n){if(!e)return;const l=e.getAttribute("xfId");if(l&&i){const t=i.get(parseInt(l));t&&t!==d.BuiltInName.Normal&&(r.named=t)}const a=t=>!(!n&&e.hasAttribute(t))||s(e.getAttribute("applyFont"));if(a("applyFont")){const t=o.fonts[e.getAttribute("fontId")];t&&(r.font=t)}if(a("applyFill")){const t=o.fills[e.getAttribute("fillId")];t&&Object.keys(t).length>0&&(r.fill=t)}if(a("applyBorder")){const t=o.borders[e.getAttribute("borderId")];t&&Object.keys(t).length>0&&(r.border=t)}if(a("applyNumberFormat")){const s=e.getAttribute("numFmtId");if(s){const e=parseInt(s);let o;const i=t.getVisitorParamsState();if(i){const t=i.get("numFmts");t&&(o=t.get(e)),r.numberFormat=o??e}else console.warn("no visitor params state")}}a("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),r),a("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),r);const c=s(e.getAttribute("quotePrefix"));c&&(r.quotePrefix=c)}processAlignment(t,e,r){const o={};if(e?.hasAttribute("horizontal")?o.horizontal=e.getAttribute("horizontal"):o.horizontal=m.HorizontalAlignment.General,e?.hasAttribute("vertical")?o.vertical=e.getAttribute("vertical"):o.vertical=m.VerticalAlignment.Bottom,e?.hasAttribute("indent")?o.indent=parseInt(e.getAttribute("indent")):o.indent=0,e?.hasAttribute("relativeIndent")?o.relativeIndent=parseInt(e.getAttribute("relativeIndent")):o.relativeIndent=0,s(e?.getAttribute("wrapText"))?o.overflow=m.Overflow.Wrap:o.overflow=m.Overflow.Visible,s(e?.getAttribute("shrinkToFit"))&&(o.overflow=m.Overflow.Shrink),e?.hasAttribute("textRotation")){let t=parseFloat(e.getAttribute("textRotation"));t>0&&t<=90?t=360-t:t>90&&t<=180?t-=90:255===t&&(t=0,o.stacked=!0),o.rotation=t}else o.rotation=0;e?.hasAttribute("justifyLastLine")&&(o.justifyLastLine=s(e.getAttribute("justifyLastLine")));const i=e?.getAttribute("readingOrder");return i&&("0"===i?o.readingDirection=m.ReadingDirection.Auto:"1"===i?o.readingDirection=m.ReadingDirection.LeftToRight:"2"===i?o.readingDirection=m.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${i}`)),Object.keys(o).length>0&&(r.alignment=o),r}processProtection(t,e,r){if(!e)return;const o={},i=e.getAttribute("locked");i&&!s(i)&&(o.edit=!0);const n=e.getAttribute("hidden");return n&&s(n)&&(o.formulaHidden=!0),Object.keys(o).length>0&&(r.protection=o),r}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"font"===o.localName){const e={};this.processFont(t,o,e),s.font=e}else if(1===o.nodeType&&"fill"===o.localName){const e=[];this.processFill(t,o,e,0),e.length>0&&e[0]&&(s.fill=e[0])}else if(1===o.nodeType&&"border"===o.localName){const e=[];this.processBorder(t,o,e,0,!1),e.length>0&&e[0]&&(s.border=e[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);if(1===i.nodeType&&"dxf"===i.localName){const e={};this.processDXF(t,i,e);const o=s.length;r.set(o,e),s.push(e)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,r,o,i=!1){const n=e.getAttribute("name"),l={name:n};e.hasAttribute("table")&&(l.table=s(e.getAttribute("table"))),e.hasAttribute("pivot")&&(l.pivot=s(e.getAttribute("pivot"))),i&&!l.pivot&&o.unshift(null);const a=e.childNodes;for(let t=0;t<a.length;t++){const e=a.item(t);if(1===e.nodeType&&"tableStyleElement"===e.localName){const t=e.getAttribute("type"),s=e.getAttribute("dxfId");let r=o?.[s];r||(console.warn("invalid dfx id",s),r={}),l[t]=r;let i=null;e.hasAttribute("size")&&(i=parseInt(e.getAttribute("size"))),i&&!isNaN(i)&&(r.size=i)}}delete l.name,r[n]=l}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let e=0;e<a.length;e++){const s=a.item(e);1===s.nodeType&&"tableStyle"===s.localName&&this.processTableStyle(t,s,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,r,o,i){if(!e)return;const n=e.childNodes;for(let t=0;t<n.length;t++){const e=n.item(t);if(1===e.nodeType&&"cellStyle"===e.localName){const t=parseInt(e.getAttribute("xfId")),n=e.getAttribute("name");if(i.set(t,n),!o[t])continue;const l={name:n,style:o[t]};e.getAttribute("hidden")&&(l.hidden=s(e.getAttribute("hidden"))),e.getAttribute("iLevel")&&(l.iLevel=parseInt(e.getAttribute("iLevel"))),r.push(l)}}}afterVisit(t,e,s){}}class it extends rt{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=t=>!0!==t&&"1"!==t&&"on"!==t&&"true"!==t&&(!1===t||"0"===t||"off"===t||"false"===t||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);1===s.nodeType&&"sheet"===s.localName&&this.processSheetRef(t,s,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const e=r.item(i);1===e.nodeType&&"workbookView"===e.localName&&(this.processWorkbookView(t,e,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,t=>t+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,t=>t]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&3===i.nodeType&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const t=e.getAttribute("localSheetId");if(!r[t]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${t}' which does not exist.`);o.scope=r[t].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);1===i.nodeType&&"definedName"===i.localName&&this.processDefineName(t,i,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class nt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableStyleInfo"===s.localName&&(t.copyFromAttribute(s,"name",o),t.copyFromAttribute(s,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"tableColumn"===o.localName){const e={};t.copyFromAttribute(o,"name",e),t.copyFromAttribute(o,"uniqueName",e),s.push(e)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableColumns"===s.localName&&this.processTableColumn(t,s,o)}o.length>0&&(s.columns=o)}}class lt{visit(t,e,s){return s}}class at{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,s,r,o){if(!s)return;const i={c:0,r:0,x:0,y:0};return t.evaluate("col",s)&&(i.c=parseInt(t.evaluate("col",s).textContent)),t.evaluate("row",s)&&(i.r=parseInt(t.evaluate("row",s).textContent)),t.evaluate("colOff",s)&&(i.x=e(t.evaluate("colOff",s).textContent)),t.evaluate("rowOff",s)&&(i.y=e(t.evaluate("rowOff",s).textContent)),"from"===o?r.tl=i:r.br=i,r}}class ct{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class ut extends ct{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const e=t.evaluate("graphicFrameLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType)try{let e=s.localName;"chart"===e&&(e="chart"),o.type=e;const r=s.getAttribute("r:id");r&&(o.json=t.getRef(r))}catch(t){console.warn("Unable to parse graphicFrame",t)}}return o&&(s.content=o),o}}class ht extends ct{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const e=t.evaluate("spLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class pt extends ct{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const s=t.evaluate("picLocks",o);if(s){s.hasAttribute("noChangeAspect")&&(r.lockAspect="1"===s.getAttribute("noChangeAspect"));const e={};t.copyFromAttribute(s,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(e).length>0&&(r.locks=e)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const e=i.getAttribute("r:embed")??i.getAttribute("embed");if(!e)return void console.warn("no rId found for blip",i);n=t.getRef(e,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class gt extends ht{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const e=t.evaluate("grpSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class dt extends ht{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const e=t.evaluate("cxnSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const mt="richTypes";class bt{visit(t,e,s){let r=t.getVisitorParamsState().get(mt);r||(r=[],t.getVisitorParamsState().set(mt,r));const o=e.childNodes,i=o.length;for(let e=0;e<i;e++){const s=o.item(e);if(1===s.nodeType&&"s"===s.localName){const e={type:s.getAttribute("t")??"n",keys:[]};this.processKeys(t,s,e),r.push(e)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let t=0;t<o;t++){const e=r.item(t);if(1===e.nodeType&&"k"===e.localName){const t=e.getAttribute("n"),s=e.getAttribute("t");i.push([t,s])}}}}const ft="richData";class At{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(ft);o||(o=[],t.getVisitorParamsState().set(ft,o));const i=e.childNodes,n=i.length;for(let e=0;e<n;e++){const s=i.item(e);if(1===s.nodeType&&"rv"===s.localName){const e=r[s.getAttribute("s")],i={type:e.type};this.processValues(t,s,i,e);const n=this.mapType(t,i);o.push(n)}}return s.richData=o,o}mapType(t,e){if("_error"===e.type){const s=e.errorType;if(s)try{e=b.getBuiltInById(s+1)}catch(t){}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let e=0;e<i;e++){const r=o.item(e);if(1===r.nodeType&&"v"===r.localName){const o=n[e];if(!o)return void t.warn("Invalid richData");const i=o[0],l=o[1];let a=r.textContent;"i"===l&&(a=Number(a)),s[i]=a}}}}class yt{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let t=0;t<r.length;t++){const e=r.item(t);if(1===e.nodeType&&"author"===e.localName){const t=e.firstChild;t&&3===t.nodeType&&s.push(t.textContent)}}}}class vt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Ft{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Ct{visit(t,e,o){if(!e)return;const i={};return t.copyFromAttribute(e,"id",i,"id",r),t.copyFromAttribute(e,"personId",i,"personId",r),t.copyFromAttribute(e,"ref",i),t.copyFromAttribute(e,"parentId",i,"parentId",r),t.copyFromAttribute(e,"dT",i),e.hasAttribute("done")&&(i.done=s(e.getAttribute("done"))),o.push(i),i}}class wt{visit(t,e,s){const o=[],i=e.childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType&&"person"===s.localName){const e={};t.copyFromAttribute(s,"id",e,"id",r),t.copyFromAttribute(s,"displayName",e),t.copyFromAttribute(s,"userId",e,"userId",r),t.copyFromAttribute(s,"providerId",e),o.push(e)}}return o.length>0&&(s.persons=o),o}}const Pt={};class Nt{constructor(t,e){this.path=t,this.visitor=e}}class Ot{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new N),this.registerVisitor("spPr",new _),this.registerVisitor("txBody",new W),this.registerVisitor("txPr",new W),this.registerVisitor("c:chartSpace",new x),this.registerVisitor("c:chartSpace",new L,"chart"),this.registerVisitor("c:plotArea",new I),this.registerVisitor("c:barChart",new E),this.registerVisitor("c:doughnutChart",new R),this.registerVisitor("c:lineChart",new R),this.registerVisitor("c:ofPieType",new R),this.registerVisitor("c:pieChart",new R),this.registerVisitor("c:scatterChart",new R),this.registerVisitor("c:barChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new M),this.registerVisitor("c:dPt",new U),this.registerVisitor("c:marker",new z),this.registerVisitor("c:catAx",new G),this.registerVisitor("c:valAx",new G),this.registerVisitor("c:dateAx",new G),this.registerVisitor("c:majorGridlines",new P("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new P("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new W("labels.text"),"txPr"),this.registerVisitor("c:valAx",new W("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new W("labels.text"),"txPr"),this.registerVisitor("c:legend",new $),this.registerVisitor("c:legend",new W("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new X),this.registerVisitor("c:ser",new K,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new Y("labels"),"dLbls"),this.registerVisitor("c:dLbl",new Y("points")),this.registerVisitor("c:title",new H),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new J),this.registerVisitor("c:dispUnits",new P("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new H("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new W,"tx/rich"),this.registerVisitor("a:theme",new q),this.registerVisitor("a:theme",new Q,"themeElements/clrScheme"),this.registerVisitor("a:theme",new Z,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new et),this.registerVisitor("sortState",new st),this.registerVisitor("s:workbook",new it),this.registerVisitor("styleSheet",new ot),this.registerVisitor("table",new nt),this.registerVisitor("hlinkClick",new tt),this.registerVisitor("wsDr",new lt),this.registerVisitor("twoCellAnchor",new at),this.registerVisitor("oneCellAnchor",new at),this.registerVisitor("absoluteAnchor",new at),this.registerVisitor("graphicFrame",new ut),this.registerVisitor("sp",new ht),this.registerVisitor("grpSp",new gt),this.registerVisitor("cxnSp",new dt),this.registerVisitor("pic",new pt),this.registerVisitor("rvStructures",new bt),this.registerVisitor("rvData",new At),this.registerVisitor("comments",new yt),this.registerVisitor("commentList",new vt,"comment"),this.registerVisitor("comment",new W("content"),"text"),this.registerVisitor("ThreadedComments",new Ft),this.registerVisitor("threadedComment",new Ct),this.registerVisitor("threadedComment",new W("content"),"text"),this.registerVisitor("personList",new wt)}registerVisitor(t,e,s=null){-1===t.indexOf(":")&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Nt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Pt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new w(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let e=0;e<a.length;e++){const s=a[e];try{s.visitor?.afterVisit?.(s.context,s.elemParent,s.jsonParent)}catch(t){console.warn(`Error in afterVisit: ${s.context.getPath()}`,t)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let u=null;try{u=e.evaluate(c.path,r)}catch(e){console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!u)continue;const h=t=>{let l=t.localName,a=t.parentNode;for(;a&&a!==r;)l=a.localName+"/"+l,a=a.parentNode;const u=e.getPath()+"/"+l;if(c.visitor){const r=new w(e,this,u,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,r,s,t,o,i,n)}};if(u.length>0){const t=u;for(let e=0;e<t.length;e++)h(t.item(e))}else h(u)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let t=0;t<c.length;t++){const r=c.item(t);if(1===r.nodeType){const t=r,a=t.localName,c=this.visitorsByXmlTagName.get(a),u=e.getPath()+"/"+a,h=new w(e,this,u,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c,h,s,t,l??o,i,n)}}return l}}export{Ot as FromOOXMLConverter,Ot as default};