@sheetxl/studio-vanilla 0.4.19 → 0.4.21

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 (178) hide show
  1. package/browser/cjs/index.cjs +80 -2
  2. package/browser/cjs/{BJIfDlGWvnC0eGUi.cjs → n6CXzSocLW_BCO8w.cjs} +6 -6
  3. package/browser/esm/{DiGLoJDZqriVp152.mjs → NBuS53B7u8hItiXf.mjs} +933 -937
  4. package/browser/esm/index.mjs +176 -4
  5. package/cdn/assets/CY8njwo06MWkoPz2.js +21 -0
  6. package/cdn/index.js +2 -2
  7. package/cdn/loader.js +1 -1
  8. package/package.json +3 -3
  9. package/browser/cjs/1FbLU-GkjsXMtg8T.cjs +0 -15
  10. package/browser/cjs/3xnum9EEG0qokR90.cjs +0 -12
  11. package/browser/cjs/5i4FVjROedZEnZNH.cjs +0 -6
  12. package/browser/cjs/9yZt9CqVSMBE7LUX.cjs +0 -6
  13. package/browser/cjs/B7V2ifI29G13Ypfn.cjs +0 -378
  14. package/browser/cjs/BCBl10fgrkZ5JX8E.cjs +0 -161
  15. package/browser/cjs/BCVApYTYfHlRzbCn.cjs +0 -6
  16. package/browser/cjs/BjW-ykzXN9S3TMzb.cjs +0 -11
  17. package/browser/cjs/Bn5tlfH0oqJI1Lk9.cjs +0 -6
  18. package/browser/cjs/BnD8IArw964iF-Zg.cjs +0 -1501
  19. package/browser/cjs/BnwSPi6FOdqxr7z1.cjs +0 -19
  20. package/browser/cjs/BxpKhdqadWDARG9W.cjs +0 -16
  21. package/browser/cjs/C8FEOglWYUtglsLP.cjs +0 -6
  22. package/browser/cjs/CDd6P2SfTKp4v-QA.cjs +0 -6
  23. package/browser/cjs/CFfq2Z-VQyMwMJKP.cjs +0 -6
  24. package/browser/cjs/CG1FkANzsujO3FLU.cjs +0 -6
  25. package/browser/cjs/CGD07mOjjl6zfCzK.cjs +0 -15
  26. package/browser/cjs/CMO36tnnJHrXso4Q.cjs +0 -7
  27. package/browser/cjs/CMfyyxtrIHPMnrBl.cjs +0 -6
  28. package/browser/cjs/CNue1AsHpswiVYJx.cjs +0 -6
  29. package/browser/cjs/C_bqbac1bCl1H0Bn.cjs +0 -6
  30. package/browser/cjs/C_jIzbaCWis1jB7f.cjs +0 -32
  31. package/browser/cjs/CaFeiasVg3jafLwL.cjs +0 -6
  32. package/browser/cjs/CaWJjQ_KmjWp1ooU.cjs +0 -145
  33. package/browser/cjs/CahVr7pzDRu3h4G3.cjs +0 -6
  34. package/browser/cjs/CaswMUSE1R9Noewr.cjs +0 -6
  35. package/browser/cjs/CfX6-fSMFgAg6iL9.cjs +0 -124
  36. package/browser/cjs/CkhCXLhqA4a2CnSJ.cjs +0 -6
  37. package/browser/cjs/CkriFKrE5BBPFQWm.cjs +0 -6
  38. package/browser/cjs/CuX_ftSJWqfRsXHy.cjs +0 -6
  39. package/browser/cjs/CznEff7u33FYbOSn.cjs +0 -6
  40. package/browser/cjs/D-fNsTpgGyZHdYEp.cjs +0 -6
  41. package/browser/cjs/DCxlQuW8eB70ZbcJ.cjs +0 -6
  42. package/browser/cjs/DFet-I-_FYR9s_ET.cjs +0 -6
  43. package/browser/cjs/DKQmNMiW6vEz1i7V.cjs +0 -6
  44. package/browser/cjs/DMOCfhgdy7Z8GoD-.cjs +0 -13
  45. package/browser/cjs/DVVk6WU7lfgpQLZG.cjs +0 -6
  46. package/browser/cjs/DYMFAMQ13cX03167.cjs +0 -7
  47. package/browser/cjs/DZVJ234kMQwb5dEy.cjs +0 -6
  48. package/browser/cjs/DZqqUVtfn36E0rIk.cjs +0 -6
  49. package/browser/cjs/DguzXHidCk2s1uCY.cjs +0 -6
  50. package/browser/cjs/Dhik7yBvR-5iyJcR.cjs +0 -6
  51. package/browser/cjs/Dms2LCMINwYEtl3S.cjs +0 -6
  52. package/browser/cjs/DnHgK81nepMuvMim.cjs +0 -6
  53. package/browser/cjs/DuJlHux5dLU53d80.cjs +0 -6
  54. package/browser/cjs/Dz5uLsJ16GF2Cyov.cjs +0 -6
  55. package/browser/cjs/Io_6AEq6KpjrZEfL.cjs +0 -6
  56. package/browser/cjs/R7ToEkyr-cbP0Q3N.cjs +0 -6
  57. package/browser/cjs/TGD3vlMtB_qnQE-M.cjs +0 -11
  58. package/browser/cjs/XFsZZevZgfk9vB1r.cjs +0 -6
  59. package/browser/cjs/bGVtUGltyeHuGKLB.cjs +0 -6
  60. package/browser/cjs/f-w9NYC1mTi7W9HY.cjs +0 -6
  61. package/browser/cjs/kGBvcCWaH3h23Ojp.cjs +0 -7
  62. package/browser/cjs/mUwYCSHSRCUQJ4uV.cjs +0 -42
  63. package/browser/cjs/qLyXB7fJpKBbTC_N.cjs +0 -6
  64. package/browser/cjs/s2JuJCqW6ny4lxQX.cjs +0 -6
  65. package/browser/esm/2Fopggi4LREIIXpY.mjs +0 -13208
  66. package/browser/esm/4ZXEcNsjnqWXAiUa.mjs +0 -2344
  67. package/browser/esm/4yxl564v_Wx022xz.mjs +0 -633
  68. package/browser/esm/5Ovf_TtcBCG7hgdY.mjs +0 -20
  69. package/browser/esm/6X4p3ajMgDNtcmLW.mjs +0 -10
  70. package/browser/esm/8F0vFRAXlzH-vmJl.mjs +0 -52354
  71. package/browser/esm/B1L8rEDpskxCqnhJ.mjs +0 -10
  72. package/browser/esm/BENg2ibY7Hr-SYp3.mjs +0 -10
  73. package/browser/esm/BHzg_9TpgdKnIlaX.mjs +0 -10
  74. package/browser/esm/BY9rDUy2rHkqh6hH.mjs +0 -820
  75. package/browser/esm/Bd2yJknZG5WTZ26u.mjs +0 -10
  76. package/browser/esm/BlH_AWoPr-w3-qdS.mjs +0 -10
  77. package/browser/esm/BmeozQuzbqa81PvH.mjs +0 -41
  78. package/browser/esm/BprECrKMFGb2UK2v.mjs +0 -2174
  79. package/browser/esm/Br_6r7a5IjKksr00.mjs +0 -390
  80. package/browser/esm/ByJuiohpCMXnDKmL.mjs +0 -47
  81. package/browser/esm/C04_X_6DkiZCUmwB.mjs +0 -1702
  82. package/browser/esm/C3pNOQaLBsTUp2CW.mjs +0 -10
  83. package/browser/esm/C4gnsPTE7_xP3Mz_.mjs +0 -1575
  84. package/browser/esm/C8kq7JNW8ivhRL1S.mjs +0 -3934
  85. package/browser/esm/CGquHZGGYOxATF73.mjs +0 -10
  86. package/browser/esm/CKwR5AWlnckKQRc-.mjs +0 -10
  87. package/browser/esm/CLSpsTCV3Onb_QXV.mjs +0 -84
  88. package/browser/esm/CMrXKGbxBR_LxLxN.mjs +0 -3755
  89. package/browser/esm/CN-UcSPqkcXnkJCx.mjs +0 -1365
  90. package/browser/esm/CQJsDOnipkhuGkKg.mjs +0 -56
  91. package/browser/esm/CTIgStBt9DOpau5q.mjs +0 -1665
  92. package/browser/esm/CXL9mY2kUT053cTN.mjs +0 -1346
  93. package/browser/esm/CZ54d8Ueai6uZgy6.mjs +0 -10
  94. package/browser/esm/CZM2uNUNI4W8qUw3.mjs +0 -10
  95. package/browser/esm/CaaAGrJF7OxdprqB.mjs +0 -10
  96. package/browser/esm/CnRJWnfDHzunp3N5.mjs +0 -472
  97. package/browser/esm/CpGYH9QSPqM4ejyF.mjs +0 -421
  98. package/browser/esm/CqLIq6VVhQnv6ZP4.mjs +0 -10
  99. package/browser/esm/CqTn7MLxDJZX7aIA.mjs +0 -10
  100. package/browser/esm/D3RHh0FQuMAKk4JL.mjs +0 -10
  101. package/browser/esm/D8hxrXJDfvDRoouY.mjs +0 -147
  102. package/browser/esm/DMwYqCQzDDwbzt8K.mjs +0 -44
  103. package/browser/esm/DNV2yXFlJ5hRF5ME.mjs +0 -46
  104. package/browser/esm/DUxcExPcvgbBrSXX.mjs +0 -5582
  105. package/browser/esm/DbTEH7CjzsjIc-ew.mjs +0 -21
  106. package/browser/esm/Df2lY3OJ73BCDQo6.mjs +0 -24
  107. package/browser/esm/DlUeNEy_cp31Am5t.mjs +0 -39
  108. package/browser/esm/DovESggwbqQKJEkM.mjs +0 -10
  109. package/browser/esm/DpNpusKUeZXcDNra.mjs +0 -29
  110. package/browser/esm/Dx-FJghQY8rpWJi1.mjs +0 -10
  111. package/browser/esm/DxObRtwZ98tP8NM3.mjs +0 -10
  112. package/browser/esm/FT-XJjpzjdyq4pin.mjs +0 -48
  113. package/browser/esm/HnfOytlj72v4rd6y.mjs +0 -425
  114. package/browser/esm/IChTkXO9eDekfSb7.mjs +0 -10
  115. package/browser/esm/KcDpdRfEgTnFwlSh.mjs +0 -21
  116. package/browser/esm/TVfGpAQkvkA9mx4E.mjs +0 -10
  117. package/browser/esm/pqikV5IyVMBYUDqP.mjs +0 -10
  118. package/browser/esm/qfHSXgWX4yZd3nwZ.mjs +0 -1466
  119. package/browser/esm/xWvOAH67Iwyf2Zge.mjs +0 -10
  120. package/browser/esm/xaJvLe6JwO1rQiE-.mjs +0 -12
  121. package/cdn/assets/15AvUM5aNUAfFLU7.js +0 -58
  122. package/cdn/assets/2Fopggi4LREIIXpY.js +0 -13208
  123. package/cdn/assets/4yxl564v_Wx022xz.js +0 -633
  124. package/cdn/assets/6X4p3ajMgDNtcmLW.js +0 -10
  125. package/cdn/assets/B1L8rEDpskxCqnhJ.js +0 -10
  126. package/cdn/assets/B1y38xd4JTLIrdUW.js +0 -1702
  127. package/cdn/assets/BENg2ibY7Hr-SYp3.js +0 -10
  128. package/cdn/assets/BHzg_9TpgdKnIlaX.js +0 -10
  129. package/cdn/assets/BXRf5zCAUE8kGNat.js +0 -46
  130. package/cdn/assets/BZdjtacH2DTSHsdG.js +0 -22
  131. package/cdn/assets/Bd2yJknZG5WTZ26u.js +0 -10
  132. package/cdn/assets/BlH_AWoPr-w3-qdS.js +0 -10
  133. package/cdn/assets/C3pNOQaLBsTUp2CW.js +0 -10
  134. package/cdn/assets/C6yX85fw0aO70N0-.js +0 -2346
  135. package/cdn/assets/CGquHZGGYOxATF73.js +0 -10
  136. package/cdn/assets/CKwR5AWlnckKQRc-.js +0 -10
  137. package/cdn/assets/CN-UcSPqkcXnkJCx.js +0 -1365
  138. package/cdn/assets/CSBAnGx7ebIRyjML.js +0 -21
  139. package/cdn/assets/CTIgStBt9DOpau5q.js +0 -1665
  140. package/cdn/assets/CXL9mY2kUT053cTN.js +0 -1346
  141. package/cdn/assets/CZ54d8Ueai6uZgy6.js +0 -10
  142. package/cdn/assets/CZM2uNUNI4W8qUw3.js +0 -10
  143. package/cdn/assets/CaaAGrJF7OxdprqB.js +0 -10
  144. package/cdn/assets/Cfgui52VcoZakyBi.js +0 -50
  145. package/cdn/assets/Ck6R7vI9j0vG-mKU.js +0 -390
  146. package/cdn/assets/ClTJpu1UdRW0KLAX.js +0 -23
  147. package/cdn/assets/Co1yPh9LPeUa-tCm.js +0 -29
  148. package/cdn/assets/CpGYH9QSPqM4ejyF.js +0 -421
  149. package/cdn/assets/CppP22dM3wzxzf_R.js +0 -3934
  150. package/cdn/assets/CqLIq6VVhQnv6ZP4.js +0 -10
  151. package/cdn/assets/CqTn7MLxDJZX7aIA.js +0 -10
  152. package/cdn/assets/D3RHh0FQuMAKk4JL.js +0 -10
  153. package/cdn/assets/DCmJyecz9jzS5Hh5.js +0 -41
  154. package/cdn/assets/DEHd1h8uAHbt7JQl.js +0 -425
  155. package/cdn/assets/DK25k4g9SWrBiPDl.js +0 -43
  156. package/cdn/assets/DL18SWHzmNBC5_Sq.js +0 -472
  157. package/cdn/assets/DZz8nVXsYYFIaomy.js +0 -3756
  158. package/cdn/assets/Df2lY3OJ73BCDQo6.js +0 -24
  159. package/cdn/assets/DidmQocPR2LUv5_-.js +0 -84
  160. package/cdn/assets/DifkJcFEihfAmrz6.js +0 -5582
  161. package/cdn/assets/Dj-9L-ifpIi1HChy.js +0 -52185
  162. package/cdn/assets/DovESggwbqQKJEkM.js +0 -10
  163. package/cdn/assets/Dwy3QqzGL-q3IHdC.js +0 -49
  164. package/cdn/assets/Dx-FJghQY8rpWJi1.js +0 -10
  165. package/cdn/assets/DxObRtwZ98tP8NM3.js +0 -10
  166. package/cdn/assets/IChTkXO9eDekfSb7.js +0 -10
  167. package/cdn/assets/KcDpdRfEgTnFwlSh.js +0 -21
  168. package/cdn/assets/R-6SrokApX5Vs5h6.js +0 -12
  169. package/cdn/assets/TVfGpAQkvkA9mx4E.js +0 -10
  170. package/cdn/assets/ZfVobc-p41aYisnX.js +0 -46
  171. package/cdn/assets/_QS_SgWjAGVcBh2y.js +0 -2177
  172. package/cdn/assets/_bKdjn1gFyUlsKF8.js +0 -149
  173. package/cdn/assets/cgKx_r-dAv2kc57N.js +0 -1575
  174. package/cdn/assets/lxv3lfQ08L2wD1S3.js +0 -820
  175. package/cdn/assets/pqikV5IyVMBYUDqP.js +0 -10
  176. package/cdn/assets/wXUNHjkvpeSH2dQZ.js +0 -1466
  177. package/cdn/assets/xWvOAH67Iwyf2Zge.js +0 -10
  178. package/cdn/assets/xaJvLe6JwO1rQiE-.js +0 -12
@@ -1,2174 +0,0 @@
1
- import { r as C, an as Zt, ao as Qt, ap as eo, j as A, aq as to, ar as oo, as as Q, at as no, au as ro, av as io, aw as lo, b as Z, O as so, P as ao, E as _t, ax as co, B as he, a as uo, ay as ho, az as fo, aA as po, U as fe, x as mo, C as go, H as vo, aB as _o, aC as So, aD as He, aE as yo, aF as wo, aG as Co, y as St, aH as Se, aI as xo, aJ as Ro, aK as q, aL as bo, aM as N, aN as V, aO as zo } from "./8F0vFRAXlzH-vmJl.mjs";
2
- /**
3
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.19
4
- *
5
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
- * License: The license can be found at https://www.sheetxl.com/license.
7
- */
8
- const To = C.createContext(), Io = C.createContext();
9
- function Po(o) {
10
- return Qt("MuiTableCell", o);
11
- }
12
- const Oo = Zt("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]), ko = to("td", { name: "MuiTableCell", slot: "Root", overridesResolver: (o, e) => {
13
- const { ownerState: t } = o;
14
- return [e.root, e[t.variant], e[`size${Q(t.size)}`], t.padding !== "normal" && e[`padding${Q(t.padding)}`], t.align !== "inherit" && e[`align${Q(t.align)}`], t.stickyHeader && e.stickyHeader];
15
- } })(ro(({ theme: o }) => ({ ...o.typography.body2, display: "table-cell", verticalAlign: "inherit", borderBottom: o.vars ? `1px solid ${o.vars.palette.TableCell.border}` : `1px solid
16
- ${o.palette.mode === "light" ? io(Z(o.palette.divider, 1), 0.88) : lo(Z(o.palette.divider, 1), 0.68)}`, textAlign: "left", padding: 16, variants: [{ props: { variant: "head" }, style: { color: (o.vars || o).palette.text.primary, lineHeight: o.typography.pxToRem(24), fontWeight: o.typography.fontWeightMedium } }, { props: { variant: "body" }, style: { color: (o.vars || o).palette.text.primary } }, { props: { variant: "footer" }, style: { color: (o.vars || o).palette.text.secondary, lineHeight: o.typography.pxToRem(21), fontSize: o.typography.pxToRem(12) } }, { props: { size: "small" }, style: { padding: "6px 16px", [`&.${Oo.paddingCheckbox}`]: { width: 24, padding: "0 12px 0 16px", "& > *": { padding: 0 } } } }, { props: { padding: "checkbox" }, style: { width: 48, padding: "0 0 0 4px" } }, { props: { padding: "none" }, style: { padding: 0 } }, { props: { align: "left" }, style: { textAlign: "left" } }, { props: { align: "center" }, style: { textAlign: "center" } }, { props: { align: "right" }, style: { textAlign: "right", flexDirection: "row-reverse" } }, { props: { align: "justify" }, style: { textAlign: "justify" } }, { props: ({ ownerState: e }) => e.stickyHeader, style: { position: "sticky", top: 0, zIndex: 2, backgroundColor: (o.vars || o).palette.background.default } }] }))), We = C.forwardRef(function(o, e) {
17
- const t = eo({ props: o, name: "MuiTableCell" }), { align: n = "inherit", className: r, component: l, padding: i, scope: a, size: s, sortDirection: c, variant: d, ...h } = t, f = C.useContext(To), u = C.useContext(Io), v = u && u.variant === "head";
18
- let m;
19
- m = l || (v ? "th" : "td");
20
- let _ = a;
21
- m === "td" ? _ = void 0 : !_ && v && (_ = "col");
22
- const S = d || u && u.variant, y = { ...t, align: n, component: m, padding: i || (f && f.padding ? f.padding : "normal"), size: s || (f && f.size ? f.size : "medium"), sortDirection: c, stickyHeader: S === "head" && f && f.stickyHeader, variant: S }, g = ((x) => {
23
- const { classes: b, variant: R, align: T, padding: I, size: O, stickyHeader: P } = x, z = { root: ["root", R, P && "stickyHeader", T !== "inherit" && `align${Q(T)}`, I !== "normal" && `padding${Q(I)}`, `size${Q(O)}`] };
24
- return no(z, Po, b);
25
- })(y);
26
- let w = null;
27
- return c && (w = c === "asc" ? "ascending" : "descending"), A.jsx(ko, { as: m, ref: e, className: oo(g.root, r), "aria-sort": w, scope: _, ownerState: y, ...h });
28
- }), Mo = _o();
29
- function ye(o) {
30
- return o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as";
31
- }
32
- function K(o, e) {
33
- return e && o && typeof o == "object" && o.styles && !o.styles.startsWith("@layer") && (o.styles = `@layer ${e}{${String(o.styles)}}`), o;
34
- }
35
- function Lo(o) {
36
- return o ? (e, t) => t[o] : null;
37
- }
38
- function ge(o, e, t) {
39
- const n = typeof e == "function" ? e(o) : e;
40
- if (Array.isArray(n)) return n.flatMap((r) => ge(o, r, t));
41
- if (Array.isArray(n?.variants)) {
42
- let r;
43
- if (n.isProcessed) r = t ? K(n.style, t) : n.style;
44
- else {
45
- const { variants: l, ...i } = n;
46
- r = t ? K(q(i), t) : i;
47
- }
48
- return yt(o, n.variants, [r], t);
49
- }
50
- return n?.isProcessed ? t ? K(q(n.style), t) : n.style : t ? K(q(n), t) : n;
51
- }
52
- function yt(o, e, t = [], n = void 0) {
53
- let r;
54
- e: for (let l = 0; l < e.length; l += 1) {
55
- const i = e[l];
56
- if (typeof i.props == "function") {
57
- if (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, !i.props(r)) continue;
58
- } else for (const a in i.props) if (o[a] !== i.props[a] && o.ownerState?.[a] !== i.props[a]) continue e;
59
- typeof i.style == "function" ? (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, t.push(n ? K(q(i.style(r)), n) : i.style(r))) : t.push(n ? K(q(i.style), n) : i.style);
60
- }
61
- return t;
62
- }
63
- function Go(o) {
64
- return o && o.charAt(0).toLowerCase() + o.slice(1);
65
- }
66
- const Ao = function(o = {}) {
67
- const { themeId: e, defaultTheme: t = Mo, rootShouldForwardProp: n = ye, slotShouldForwardProp: r = ye } = o;
68
- function l(i) {
69
- var a, s, c;
70
- s = e, c = t, (a = i).theme = function(d) {
71
- for (const h in d) return !1;
72
- return !0;
73
- }(a.theme) ? c : a.theme[s] || a.theme;
74
- }
75
- return (i, a = {}) => {
76
- So(i, (b) => b.filter((R) => R !== He));
77
- const { name: s, slot: c, skipVariantsResolver: d, skipSx: h, overridesResolver: f = Lo(Go(c)), ...u } = a, v = s && s.startsWith("Mui") || c ? "components" : "custom", m = d !== void 0 ? d : c && c !== "Root" && c !== "root" || !1, _ = h || !1;
78
- let S = ye;
79
- var y;
80
- c === "Root" || c === "root" ? S = n : c ? S = r : typeof (y = i) == "string" && y.charCodeAt(0) > 96 && (S = void 0);
81
- const g = yo(i, { shouldForwardProp: S, label: void 0, ...u }), w = (b) => {
82
- if (b.__emotion_real === b) return b;
83
- if (typeof b == "function") return function(R) {
84
- return ge(R, b, R.theme.modularCssLayers ? v : void 0);
85
- };
86
- if (Ro(b)) {
87
- const R = function(T) {
88
- const { variants: I, ...O } = T, P = { variants: I, style: q(O), isProcessed: !0 };
89
- return P.style === O || I && I.forEach((z) => {
90
- typeof z.style != "function" && (z.style = q(z.style));
91
- }), P;
92
- }(b);
93
- return function(T) {
94
- return R.variants ? ge(T, R, T.theme.modularCssLayers ? v : void 0) : T.theme.modularCssLayers ? K(R.style, v) : R.style;
95
- };
96
- }
97
- return b;
98
- }, x = (...b) => {
99
- const R = [], T = b.map(w), I = [];
100
- if (R.push(l), s && f && I.push(function(z) {
101
- const L = z.theme, G = L.components?.[s]?.styleOverrides;
102
- if (!G) return null;
103
- const B = {};
104
- for (const Ee in G) B[Ee] = ge(z, G[Ee], z.theme.modularCssLayers ? "theme" : void 0);
105
- return f(z, B);
106
- }), s && !m && I.push(function(z) {
107
- const L = z.theme, G = L?.components?.[s]?.variants;
108
- return G ? yt(z, G, [], z.theme.modularCssLayers ? "theme" : void 0) : null;
109
- }), _ || I.push(He), Array.isArray(T[0])) {
110
- const z = T.shift(), L = new Array(R.length).fill(""), G = new Array(I.length).fill("");
111
- let B;
112
- B = [...L, ...z, ...G], B.raw = [...L, ...z.raw, ...G], R.unshift(B);
113
- }
114
- const O = [...R, ...T, ...I], P = g(...O);
115
- return i.muiName && (P.muiName = i.muiName), P;
116
- };
117
- return g.withConfig && (x.withConfig = g.withConfig), x;
118
- };
119
- }({ themeId: wo, defaultTheme: Co, rootShouldForwardProp: (o) => /* @__PURE__ */ function(e) {
120
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
121
- }(o) && o !== "classes" });
122
- function E(o, e) {
123
- if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
124
- }
125
- function ee(o) {
126
- return (ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
127
- return typeof e;
128
- } : function(e) {
129
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
130
- })(o);
131
- }
132
- function wt(o) {
133
- var e = function(t) {
134
- if (ee(t) != "object" || !t) return t;
135
- var n = t[Symbol.toPrimitive];
136
- if (n !== void 0) {
137
- var r = n.call(t, "string");
138
- if (ee(r) != "object") return r;
139
- throw new TypeError("@@toPrimitive must return a primitive value.");
140
- }
141
- return String(t);
142
- }(o);
143
- return ee(e) == "symbol" ? e : e + "";
144
- }
145
- function De(o, e) {
146
- for (var t = 0; t < e.length; t++) {
147
- var n = e[t];
148
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, wt(n.key), n);
149
- }
150
- }
151
- function H(o, e, t) {
152
- return e && De(o.prototype, e), t && De(o, t), Object.defineProperty(o, "prototype", { writable: !1 }), o;
153
- }
154
- function W(o, e) {
155
- if (e && (ee(e) == "object" || typeof e == "function")) return e;
156
- if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
157
- return function(t) {
158
- if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
159
- return t;
160
- }(o);
161
- }
162
- function k(o) {
163
- return (k = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
164
- return e.__proto__ || Object.getPrototypeOf(e);
165
- })(o);
166
- }
167
- function D(o, e) {
168
- if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
169
- o.prototype = Object.create(e && e.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), e && bo(o, e);
170
- }
171
- function p(o, e, t) {
172
- return (e = wt(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
173
- }
174
- function Ct() {
175
- var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
176
- o != null && this.setState(o);
177
- }
178
- function xt(o) {
179
- this.setState(function(e) {
180
- return this.constructor.getDerivedStateFromProps(o, e) ?? null;
181
- }.bind(this));
182
- }
183
- function Rt(o, e) {
184
- try {
185
- var t = this.props, n = this.state;
186
- this.props = o, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(t, n);
187
- } finally {
188
- this.props = t, this.state = n;
189
- }
190
- }
191
- function ue(o) {
192
- var e = o.prototype;
193
- if (!e || !e.isReactComponent) throw new Error("Can only polyfill class components");
194
- if (typeof o.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function") return o;
195
- var t = null, n = null, r = null;
196
- if (typeof e.componentWillMount == "function" ? t = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (t = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? r = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (r = "UNSAFE_componentWillUpdate"), t !== null || n !== null || r !== null) {
197
- var l = o.displayName || o.name, i = typeof o.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
198
- throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
199
-
200
- ` + l + " uses " + i + " but also contains the following legacy lifecycles:" + (t !== null ? `
201
- ` + t : "") + (n !== null ? `
202
- ` + n : "") + (r !== null ? `
203
- ` + r : "") + `
204
-
205
- The above lifecycles should be removed. Learn more about this warning here:
206
- https://fb.me/react-async-component-lifecycle-hooks`);
207
- }
208
- if (typeof o.getDerivedStateFromProps == "function" && (e.componentWillMount = Ct, e.componentWillReceiveProps = xt), typeof e.getSnapshotBeforeUpdate == "function") {
209
- if (typeof e.componentDidUpdate != "function") throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
210
- e.componentWillUpdate = Rt;
211
- var a = e.componentDidUpdate;
212
- e.componentDidUpdate = function(s, c, d) {
213
- var h = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : d;
214
- a.call(this, s, c, h);
215
- };
216
- }
217
- return o;
218
- }
219
- function je(o, e) {
220
- var t = Object.keys(o);
221
- if (Object.getOwnPropertySymbols) {
222
- var n = Object.getOwnPropertySymbols(o);
223
- e && (n = n.filter(function(r) {
224
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
225
- })), t.push.apply(t, n);
226
- }
227
- return t;
228
- }
229
- function Fe(o) {
230
- for (var e = 1; e < arguments.length; e++) {
231
- var t = arguments[e] != null ? arguments[e] : {};
232
- e % 2 ? je(Object(t), !0).forEach(function(n) {
233
- p(o, n, t[n]);
234
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : je(Object(t)).forEach(function(n) {
235
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
236
- });
237
- }
238
- return o;
239
- }
240
- function bt() {
241
- try {
242
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
243
- }));
244
- } catch {
245
- }
246
- return (bt = function() {
247
- return !!o;
248
- })();
249
- }
250
- Ct.__suppressDeprecationWarning = !0, xt.__suppressDeprecationWarning = !0, Rt.__suppressDeprecationWarning = !0;
251
- var Ne = function() {
252
- function o() {
253
- var e, t, n, r;
254
- E(this, o);
255
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
256
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, bt() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "state", { scrollToColumn: 0, scrollToRow: 0, instanceProps: { prevScrollToColumn: 0, prevScrollToRow: 0 } }), p(e, "_columnStartIndex", 0), p(e, "_columnStopIndex", 0), p(e, "_rowStartIndex", 0), p(e, "_rowStopIndex", 0), p(e, "_onKeyDown", function(s) {
257
- var c = e.props, d = c.columnCount, h = c.disabled, f = c.mode, u = c.rowCount;
258
- if (!h) {
259
- var v = e._getScrollState(), m = v.scrollToColumn, _ = v.scrollToRow, S = e._getScrollState(), y = S.scrollToColumn, g = S.scrollToRow;
260
- switch (s.key) {
261
- case "ArrowDown":
262
- g = Math.min(f === "cells" ? g + 1 : e._rowStopIndex + 1, u - 1);
263
- break;
264
- case "ArrowLeft":
265
- y = Math.max(f === "cells" ? y - 1 : e._columnStartIndex - 1, 0);
266
- break;
267
- case "ArrowRight":
268
- y = Math.min(f === "cells" ? y + 1 : e._columnStopIndex + 1, d - 1);
269
- break;
270
- case "ArrowUp":
271
- g = Math.max(f === "cells" ? g - 1 : e._rowStartIndex - 1, 0);
272
- }
273
- y === m && g === _ || (s.preventDefault(), e._updateScrollState({ scrollToColumn: y, scrollToRow: g }));
274
- }
275
- }), p(e, "_onSectionRendered", function(s) {
276
- var c = s.columnStartIndex, d = s.columnStopIndex, h = s.rowStartIndex, f = s.rowStopIndex;
277
- e._columnStartIndex = c, e._columnStopIndex = d, e._rowStartIndex = h, e._rowStopIndex = f;
278
- }), e;
279
- }
280
- return D(o, C.PureComponent), H(o, [{ key: "setScrollIndexes", value: function(e) {
281
- var t = e.scrollToColumn, n = e.scrollToRow;
282
- this.setState({ scrollToRow: n, scrollToColumn: t });
283
- } }, { key: "render", value: function() {
284
- var e = this.props, t = e.className, n = e.children, r = this._getScrollState(), l = r.scrollToColumn, i = r.scrollToRow;
285
- return C.createElement("div", { className: t, onKeyDown: this._onKeyDown }, n({ onSectionRendered: this._onSectionRendered, scrollToColumn: l, scrollToRow: i }));
286
- } }, { key: "_getScrollState", value: function() {
287
- return this.props.isControlled ? this.props : this.state;
288
- } }, { key: "_updateScrollState", value: function(e) {
289
- var t = e.scrollToColumn, n = e.scrollToRow, r = this.props, l = r.isControlled, i = r.onScrollToChange;
290
- typeof i == "function" && i({ scrollToColumn: t, scrollToRow: n }), l || this.setState({ scrollToColumn: t, scrollToRow: n });
291
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
292
- return e.isControlled ? {} : e.scrollToColumn !== t.instanceProps.prevScrollToColumn || e.scrollToRow !== t.instanceProps.prevScrollToRow ? Fe(Fe({}, t), {}, { scrollToColumn: e.scrollToColumn, scrollToRow: e.scrollToRow, instanceProps: { prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow } }) : {};
293
- } }]);
294
- }();
295
- function zt(o, e) {
296
- var t, n, r = (t = e !== void 0 ? e : typeof window < "u" ? window : typeof self < "u" ? self : global).document !== void 0 && t.document.attachEvent;
297
- if (!r) {
298
- var l = (n = t.requestAnimationFrame || t.mozRequestAnimationFrame || t.webkitRequestAnimationFrame || function(g) {
299
- return t.setTimeout(g, 20);
300
- }, function(g) {
301
- return n(g);
302
- }), i = function() {
303
- var g = t.cancelAnimationFrame || t.mozCancelAnimationFrame || t.webkitCancelAnimationFrame || t.clearTimeout;
304
- return function(w) {
305
- return g(w);
306
- };
307
- }(), a = function(g) {
308
- var w = g.__resizeTriggers__, x = w.firstElementChild, b = w.lastElementChild, R = x.firstElementChild;
309
- b.scrollLeft = b.scrollWidth, b.scrollTop = b.scrollHeight, R.style.width = x.offsetWidth + 1 + "px", R.style.height = x.offsetHeight + 1 + "px", x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight;
310
- }, s = function(g) {
311
- if (!(g.target.className && typeof g.target.className.indexOf == "function" && g.target.className.indexOf("contract-trigger") < 0 && g.target.className.indexOf("expand-trigger") < 0)) {
312
- var w = this;
313
- a(this), this.__resizeRAF__ && i(this.__resizeRAF__), this.__resizeRAF__ = l(function() {
314
- var x;
315
- ((x = w).offsetWidth != x.__resizeLast__.width || x.offsetHeight != x.__resizeLast__.height) && (w.__resizeLast__.width = w.offsetWidth, w.__resizeLast__.height = w.offsetHeight, w.__resizeListeners__.forEach(function(b) {
316
- b.call(w, g);
317
- }));
318
- });
319
- }
320
- }, c = !1, d = "", h = "animationstart", f = "Webkit Moz O ms".split(" "), u = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = t.document.createElement("fakeelement");
321
- if (v.style.animationName !== void 0 && (c = !0), c === !1) {
322
- for (var m = 0; m < f.length; m++) if (v.style[f[m] + "AnimationName"] !== void 0) {
323
- d = "-" + f[m].toLowerCase() + "-", h = u[m], c = !0;
324
- break;
325
- }
326
- }
327
- var _ = "resizeanim", S = "@" + d + "keyframes " + _ + " { from { opacity: 0; } to { opacity: 0; } } ", y = d + "animation: 1ms " + _ + "; ";
328
- }
329
- return { addResizeListener: function(g, w) {
330
- if (r) g.attachEvent("onresize", w);
331
- else {
332
- if (!g.__resizeTriggers__) {
333
- var x = g.ownerDocument, b = t.getComputedStyle(g);
334
- b && b.position == "static" && (g.style.position = "relative"), function(I) {
335
- if (!I.getElementById("detectElementResize")) {
336
- var O = (S || "") + ".resize-triggers { " + (y || "") + '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%; }', P = I.head || I.getElementsByTagName("head")[0], z = I.createElement("style");
337
- z.id = "detectElementResize", z.type = "text/css", o != null && z.setAttribute("nonce", o), z.styleSheet ? z.styleSheet.cssText = O : z.appendChild(I.createTextNode(O)), P.appendChild(z);
338
- }
339
- }(x), g.__resizeLast__ = {}, g.__resizeListeners__ = [], (g.__resizeTriggers__ = x.createElement("div")).className = "resize-triggers";
340
- var R = x.createElement("div");
341
- R.className = "expand-trigger", R.appendChild(x.createElement("div"));
342
- var T = x.createElement("div");
343
- T.className = "contract-trigger", g.__resizeTriggers__.appendChild(R), g.__resizeTriggers__.appendChild(T), g.appendChild(g.__resizeTriggers__), a(g), g.addEventListener("scroll", s, !0), h && (g.__resizeTriggers__.__animationListener__ = function(I) {
344
- I.animationName == _ && a(g);
345
- }, g.__resizeTriggers__.addEventListener(h, g.__resizeTriggers__.__animationListener__));
346
- }
347
- g.__resizeListeners__.push(w);
348
- }
349
- }, removeResizeListener: function(g, w) {
350
- if (r) g.detachEvent("onresize", w);
351
- else if (g.__resizeListeners__.splice(g.__resizeListeners__.indexOf(w), 1), !g.__resizeListeners__.length) {
352
- g.removeEventListener("scroll", s, !0), g.__resizeTriggers__.__animationListener__ && (g.__resizeTriggers__.removeEventListener(h, g.__resizeTriggers__.__animationListener__), g.__resizeTriggers__.__animationListener__ = null);
353
- try {
354
- g.__resizeTriggers__ = !g.removeChild(g.__resizeTriggers__);
355
- } catch {
356
- }
357
- }
358
- } };
359
- }
360
- function Be(o, e) {
361
- var t = Object.keys(o);
362
- if (Object.getOwnPropertySymbols) {
363
- var n = Object.getOwnPropertySymbols(o);
364
- e && (n = n.filter(function(r) {
365
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
366
- })), t.push.apply(t, n);
367
- }
368
- return t;
369
- }
370
- function Ue(o) {
371
- for (var e = 1; e < arguments.length; e++) {
372
- var t = arguments[e] != null ? arguments[e] : {};
373
- e % 2 ? Be(Object(t), !0).forEach(function(n) {
374
- p(o, n, t[n]);
375
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Be(Object(t)).forEach(function(n) {
376
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
377
- });
378
- }
379
- return o;
380
- }
381
- function Tt() {
382
- try {
383
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
384
- }));
385
- } catch {
386
- }
387
- return (Tt = function() {
388
- return !!o;
389
- })();
390
- }
391
- p(Ne, "defaultProps", { disabled: !1, isControlled: !1, mode: "edges", scrollToColumn: 0, scrollToRow: 0 }), ue(Ne);
392
- var It = function() {
393
- function o() {
394
- var e, t, n, r;
395
- E(this, o);
396
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
397
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, Tt() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "state", { height: e.props.defaultHeight || 0, width: e.props.defaultWidth || 0 }), p(e, "_parentNode", void 0), p(e, "_autoSizer", void 0), p(e, "_window", void 0), p(e, "_detectElementResize", void 0), p(e, "_onResize", function() {
398
- var s = e.props, c = s.disableHeight, d = s.disableWidth, h = s.onResize;
399
- if (e._parentNode) {
400
- var f = e._parentNode.offsetHeight || 0, u = e._parentNode.offsetWidth || 0, v = (e._window || window).getComputedStyle(e._parentNode) || {}, m = parseInt(v.paddingLeft, 10) || 0, _ = parseInt(v.paddingRight, 10) || 0, S = parseInt(v.paddingTop, 10) || 0, y = parseInt(v.paddingBottom, 10) || 0, g = f - S - y, w = u - m - _;
401
- (!c && e.state.height !== g || !d && e.state.width !== w) && (e.setState({ height: f - S - y, width: u - m - _ }), h({ height: f, width: u }));
402
- }
403
- }), p(e, "_setRef", function(s) {
404
- e._autoSizer = s;
405
- }), e;
406
- }
407
- return D(o, C.Component), H(o, [{ key: "componentDidMount", value: function() {
408
- var e = this.props.nonce;
409
- 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 = zt(e, this._window), this._detectElementResize.addResizeListener(this._parentNode, this._onResize), this._onResize());
410
- } }, { key: "componentWillUnmount", value: function() {
411
- this._detectElementResize && this._parentNode && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
412
- } }, { key: "render", value: function() {
413
- var e = this.props, t = e.children, n = e.className, r = e.disableHeight, l = e.disableWidth, i = e.style, a = this.state, s = a.height, c = a.width, d = { overflow: "visible" }, h = {};
414
- return r || (d.height = 0, h.height = s), l || (d.width = 0, h.width = c), C.createElement("div", { className: n, ref: this._setRef, style: Ue(Ue({}, d), i) }, t(h));
415
- } }]);
416
- }();
417
- function Pt() {
418
- try {
419
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
420
- }));
421
- } catch {
422
- }
423
- return (Pt = function() {
424
- return !!o;
425
- })();
426
- }
427
- p(It, "defaultProps", { onResize: function() {
428
- }, disableHeight: !1, disableWidth: !1, style: {} });
429
- var Eo = function() {
430
- function o() {
431
- var e, t, n, r;
432
- E(this, o);
433
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
434
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, Pt() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "_child", C.createRef()), p(e, "_measure", function() {
435
- var s = e.props, c = s.cache, d = s.columnIndex, h = d === void 0 ? 0 : d, f = s.parent, u = s.rowIndex, v = u === void 0 ? e.props.index || 0 : u, m = e._getCellMeasurements(), _ = m.height, S = m.width;
436
- _ === c.getHeight(v, h) && S === c.getWidth(v, h) || (c.set(v, h, S, _), f && typeof f.recomputeGridSize == "function" && f.recomputeGridSize({ columnIndex: h, rowIndex: v }));
437
- }), p(e, "_registerChild", function(s) {
438
- !s || s instanceof Element || console.warn("CellMeasurer registerChild expects to be passed Element or null"), e._child.current = s, s && e._maybeMeasureCell();
439
- }), e;
440
- }
441
- return D(o, C.PureComponent), H(o, [{ key: "componentDidMount", value: function() {
442
- this._maybeMeasureCell();
443
- } }, { key: "componentDidUpdate", value: function() {
444
- this._maybeMeasureCell();
445
- } }, { key: "render", value: function() {
446
- var e = this, t = this.props.children, n = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
447
- return n === null ? n : C.cloneElement(n, { ref: function(r) {
448
- typeof n.ref == "function" ? n.ref(r) : n.ref && (n.ref.current = r), e._child.current = r;
449
- } });
450
- } }, { key: "_getCellMeasurements", value: function() {
451
- var e = this.props.cache, t = this._child.current;
452
- if (t && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
453
- var n = t.style.width, r = t.style.height;
454
- e.hasFixedWidth() || (t.style.width = "auto"), e.hasFixedHeight() || (t.style.height = "auto");
455
- var l = Math.ceil(t.offsetHeight), i = Math.ceil(t.offsetWidth);
456
- return n && (t.style.width = n), r && (t.style.height = r), { height: l, width: i };
457
- }
458
- return { height: 0, width: 0 };
459
- } }, { key: "_maybeMeasureCell", value: function() {
460
- var e = this.props, t = e.cache, n = e.columnIndex, r = n === void 0 ? 0 : n, l = e.parent, i = e.rowIndex, a = i === void 0 ? this.props.index || 0 : i;
461
- if (!t.has(a, r)) {
462
- var s = this._getCellMeasurements(), c = s.height, d = s.width;
463
- t.set(a, r, d, c), l && typeof l.invalidateCellSizeAfterRender == "function" && l.invalidateCellSizeAfterRender({ columnIndex: r, rowIndex: a });
464
- }
465
- } }]);
466
- }();
467
- function te() {
468
- var o = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], e = {};
469
- return function(t) {
470
- var n = t.callback, r = t.indices, l = Object.keys(r), i = !o || l.every(function(s) {
471
- var c = r[s];
472
- return Array.isArray(c) ? c.length > 0 : c >= 0;
473
- }), a = l.length !== Object.keys(e).length || l.some(function(s) {
474
- var c = e[s], d = r[s];
475
- return Array.isArray(d) ? c.join(",") !== d.join(",") : c !== d;
476
- });
477
- e = r, i && a && n(r);
478
- };
479
- }
480
- p(Eo, "__internalCellMeasurerFlag", !1);
481
- const Ho = !(typeof window > "u" || !window.document || !window.document.createElement);
482
- var pe;
483
- function be(o) {
484
- if ((!pe && pe !== 0 || o) && Ho) {
485
- var e = document.createElement("div");
486
- e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), pe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
487
- }
488
- return pe;
489
- }
490
- function Ve(o, e) {
491
- var t = Object.keys(o);
492
- if (Object.getOwnPropertySymbols) {
493
- var n = Object.getOwnPropertySymbols(o);
494
- e && (n = n.filter(function(r) {
495
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
496
- })), t.push.apply(t, n);
497
- }
498
- return t;
499
- }
500
- function $e(o) {
501
- for (var e = 1; e < arguments.length; e++) {
502
- var t = arguments[e] != null ? arguments[e] : {};
503
- e % 2 ? Ve(Object(t), !0).forEach(function(n) {
504
- p(o, n, t[n]);
505
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Ve(Object(t)).forEach(function(n) {
506
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
507
- });
508
- }
509
- return o;
510
- }
511
- function Ot() {
512
- try {
513
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
514
- }));
515
- } catch {
516
- }
517
- return (Ot = function() {
518
- return !!o;
519
- })();
520
- }
521
- var ne = "requested", ve = function() {
522
- function o() {
523
- var e, t, n, r;
524
- E(this, o);
525
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
526
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, Ot() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollLeft: 0, scrollTop: 0 }), p(e, "_calculateSizeAndPositionDataOnNextUpdate", !1), p(e, "_onSectionRenderedMemoizer", te()), p(e, "_onScrollMemoizer", te(!1)), p(e, "_invokeOnSectionRenderedHelper", function() {
527
- var s = e.props, c = s.cellLayoutManager, d = s.onSectionRendered;
528
- e._onSectionRenderedMemoizer({ callback: d, indices: { indices: c.getLastRenderedIndices() } });
529
- }), p(e, "_setScrollingContainerRef", function(s) {
530
- e._scrollingContainer = s;
531
- }), p(e, "_updateScrollPositionForScrollToCell", function() {
532
- var s = e.props, c = s.cellLayoutManager, d = s.height, h = s.scrollToAlignment, f = s.scrollToCell, u = s.width, v = e.state, m = v.scrollLeft, _ = v.scrollTop;
533
- if (f >= 0) {
534
- var S = c.getScrollPositionForCell({ align: h, cellIndex: f, height: d, scrollLeft: m, scrollTop: _, width: u });
535
- S.scrollLeft === m && S.scrollTop === _ || e._setScrollPosition(S);
536
- }
537
- }), p(e, "_onScroll", function(s) {
538
- if (s.target === e._scrollingContainer) {
539
- e._enablePointerEventsAfterDelay();
540
- var c = e.props, d = c.cellLayoutManager, h = c.height, f = c.isScrollingChange, u = c.width, v = e._scrollbarSize, m = d.getTotalSize(), _ = m.height, S = m.width, y = Math.max(0, Math.min(S - u + v, s.target.scrollLeft)), g = Math.max(0, Math.min(_ - h + v, s.target.scrollTop));
541
- if (e.state.scrollLeft !== y || e.state.scrollTop !== g) {
542
- var w = s.cancelable ? "observed" : ne;
543
- e.state.isScrolling || f(!0), e.setState({ isScrolling: !0, scrollLeft: y, scrollPositionChangeReason: w, scrollTop: g });
544
- }
545
- e._invokeOnScrollMemoizer({ scrollLeft: y, scrollTop: g, totalWidth: S, totalHeight: _ });
546
- }
547
- }), e._scrollbarSize = be(), e._scrollbarSize === void 0 ? (e._scrollbarSizeMeasured = !1, e._scrollbarSize = 0) : e._scrollbarSizeMeasured = !0, e;
548
- }
549
- return D(o, C.PureComponent), H(o, [{ key: "recomputeCellSizesAndPositions", value: function() {
550
- this._calculateSizeAndPositionDataOnNextUpdate = !0, this.forceUpdate();
551
- } }, { key: "componentDidMount", value: function() {
552
- var e = this.props, t = e.cellLayoutManager, n = e.scrollLeft, r = e.scrollToCell, l = e.scrollTop;
553
- this._scrollbarSizeMeasured || (this._scrollbarSize = be(), this._scrollbarSizeMeasured = !0, this.setState({})), r >= 0 ? this._updateScrollPositionForScrollToCell() : (n >= 0 || l >= 0) && this._setScrollPosition({ scrollLeft: n, scrollTop: l }), this._invokeOnSectionRenderedHelper();
554
- var i = t.getTotalSize(), a = i.height, s = i.width;
555
- this._invokeOnScrollMemoizer({ scrollLeft: n || 0, scrollTop: l || 0, totalHeight: a, totalWidth: s });
556
- } }, { key: "componentDidUpdate", value: function(e, t) {
557
- var n = this.props, r = n.height, l = n.scrollToAlignment, i = n.scrollToCell, a = n.width, s = this.state, c = s.scrollLeft, d = s.scrollPositionChangeReason, h = s.scrollTop;
558
- d === ne && (c >= 0 && c !== t.scrollLeft && c !== this._scrollingContainer.scrollLeft && (this._scrollingContainer.scrollLeft = c), h >= 0 && h !== t.scrollTop && h !== this._scrollingContainer.scrollTop && (this._scrollingContainer.scrollTop = h)), r === e.height && l === e.scrollToAlignment && i === e.scrollToCell && a === e.width || this._updateScrollPositionForScrollToCell(), this._invokeOnSectionRenderedHelper();
559
- } }, { key: "componentWillUnmount", value: function() {
560
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
561
- } }, { key: "render", value: function() {
562
- var e = this.props, t = e.autoHeight, n = e.cellCount, r = e.cellLayoutManager, l = e.className, i = e.height, a = e.horizontalOverscanSize, s = e.id, c = e.noContentRenderer, d = e.style, h = e.verticalOverscanSize, f = e.width, u = this.state, v = u.isScrolling, m = u.scrollLeft, _ = u.scrollTop;
563
- (this._lastRenderedCellCount !== n || this._lastRenderedCellLayoutManager !== r || this._calculateSizeAndPositionDataOnNextUpdate) && (this._lastRenderedCellCount = n, this._lastRenderedCellLayoutManager = r, this._calculateSizeAndPositionDataOnNextUpdate = !1, r.calculateSizeAndPositionData());
564
- var S = r.getTotalSize(), y = S.height, g = S.width, w = Math.max(0, m - a), x = Math.max(0, _ - h), b = Math.min(g, m + f + a), R = Math.min(y, _ + i + h), T = i > 0 && f > 0 ? r.cellRenderers({ height: R - x, isScrolling: v, width: b - w, x: w, y: x }) : [], I = { boxSizing: "border-box", direction: "ltr", height: t ? "auto" : i, position: "relative", WebkitOverflowScrolling: "touch", width: f, willChange: "transform" }, O = y > i ? this._scrollbarSize : 0, P = g > f ? this._scrollbarSize : 0;
565
- return I.overflowX = g + O <= f ? "hidden" : "auto", I.overflowY = y + P <= i ? "hidden" : "auto", C.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Collection", l), id: s, onScroll: this._onScroll, role: "grid", style: $e($e({}, I), d), tabIndex: 0 }, n > 0 && C.createElement("div", { className: "ReactVirtualized__Collection__innerScrollContainer", style: { height: y, maxHeight: y, maxWidth: g, overflow: "hidden", pointerEvents: v ? "none" : "", width: g } }, T), n === 0 && c());
566
- } }, { key: "_enablePointerEventsAfterDelay", value: function() {
567
- var e = this;
568
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = setTimeout(function() {
569
- (0, e.props.isScrollingChange)(!1), e._disablePointerEventsTimeoutId = null, e.setState({ isScrolling: !1 });
570
- }, 150);
571
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
572
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalHeight, i = e.totalWidth;
573
- this._onScrollMemoizer({ callback: function(a) {
574
- var s = a.scrollLeft, c = a.scrollTop, d = t.props, h = d.height;
575
- (0, d.onScroll)({ clientHeight: h, clientWidth: d.width, scrollHeight: l, scrollLeft: s, scrollTop: c, scrollWidth: i });
576
- }, indices: { scrollLeft: n, scrollTop: r } });
577
- } }, { key: "_setScrollPosition", value: function(e) {
578
- var t = e.scrollLeft, n = e.scrollTop, r = { scrollPositionChangeReason: ne };
579
- t >= 0 && (r.scrollLeft = t), n >= 0 && (r.scrollTop = n), (t >= 0 && t !== this.state.scrollLeft || n >= 0 && n !== this.state.scrollTop) && this.setState(r);
580
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
581
- return e.cellCount !== 0 || t.scrollLeft === 0 && t.scrollTop === 0 ? e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null ? e.scrollTop : t.scrollTop, scrollPositionChangeReason: ne } : null : { scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: ne };
582
- } }]);
583
- }();
584
- p(ve, "defaultProps", { "aria-label": "grid", horizontalOverscanSize: 0, noContentRenderer: function() {
585
- return null;
586
- }, onScroll: function() {
587
- return null;
588
- }, onSectionRendered: function() {
589
- return null;
590
- }, scrollToAlignment: "auto", scrollToCell: -1, style: {}, verticalOverscanSize: 0 }), ve.propTypes = {}, ue(ve);
591
- var Wo = H(function o(e) {
592
- var t = e.height, n = e.width, r = e.x, l = e.y;
593
- E(this, o), this.height = t, this.width = n, this.x = r, this.y = l, this._indexMap = {}, this._indices = [];
594
- }, [{ key: "addCellIndex", value: function(o) {
595
- var e = o.index;
596
- this._indexMap[e] || (this._indexMap[e] = !0, this._indices.push(e));
597
- } }, { key: "getCellIndices", value: function() {
598
- return this._indices;
599
- } }, { key: "toString", value: function() {
600
- return "".concat(this.x, ",").concat(this.y, " ").concat(this.width, "x").concat(this.height);
601
- } }]), Do = H(function o() {
602
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100;
603
- E(this, o), this._sectionSize = e, this._cellMetadata = [], this._sections = {};
604
- }, [{ key: "getCellIndices", value: function(o) {
605
- var e = o.height, t = o.width, n = o.x, r = o.y, l = {};
606
- return this.getSections({ height: e, width: t, x: n, y: r }).forEach(function(i) {
607
- return i.getCellIndices().forEach(function(a) {
608
- l[a] = a;
609
- });
610
- }), Object.keys(l).map(function(i) {
611
- return l[i];
612
- });
613
- } }, { key: "getCellMetadata", value: function(o) {
614
- var e = o.index;
615
- return this._cellMetadata[e];
616
- } }, { key: "getSections", value: function(o) {
617
- for (var e = o.height, t = o.width, n = o.x, r = o.y, l = Math.floor(n / this._sectionSize), i = Math.floor((n + t - 1) / this._sectionSize), a = Math.floor(r / this._sectionSize), s = Math.floor((r + e - 1) / this._sectionSize), c = [], d = l; d <= i; d++) for (var h = a; h <= s; h++) {
618
- var f = "".concat(d, ".").concat(h);
619
- this._sections[f] || (this._sections[f] = new Wo({ height: this._sectionSize, width: this._sectionSize, x: d * this._sectionSize, y: h * this._sectionSize })), c.push(this._sections[f]);
620
- }
621
- return c;
622
- } }, { key: "getTotalSectionCount", value: function() {
623
- return Object.keys(this._sections).length;
624
- } }, { key: "toString", value: function() {
625
- var o = this;
626
- return Object.keys(this._sections).map(function(e) {
627
- return o._sections[e].toString();
628
- });
629
- } }, { key: "registerCell", value: function(o) {
630
- var e = o.cellMetadatum, t = o.index;
631
- this._cellMetadata[t] = e, this.getSections(e).forEach(function(n) {
632
- return n.addCellIndex({ index: t });
633
- });
634
- } }]);
635
- function Ke(o) {
636
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.cellOffset, r = o.cellSize, l = o.containerSize, i = o.currentOffset, a = n, s = a - l + r;
637
- switch (t) {
638
- case "start":
639
- return a;
640
- case "end":
641
- return s;
642
- case "center":
643
- return a - (l - r) / 2;
644
- default:
645
- return Math.max(s, Math.min(a, i));
646
- }
647
- }
648
- function kt() {
649
- try {
650
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
651
- }));
652
- } catch {
653
- }
654
- return (kt = function() {
655
- return !!o;
656
- })();
657
- }
658
- var qe = function() {
659
- function o(e, t) {
660
- var n, r, l, i;
661
- return E(this, o), r = this, i = [e, t], l = k(l = o), (n = W(r, kt() ? Reflect.construct(l, i || [], k(r).constructor) : l.apply(r, i)))._cellMetadata = [], n._lastRenderedCellIndices = [], n._cellCache = [], n._isScrollingChange = n._isScrollingChange.bind(n), n._setCollectionViewRef = n._setCollectionViewRef.bind(n), n;
662
- }
663
- return D(o, C.PureComponent), H(o, [{ key: "forceUpdate", value: function() {
664
- this._collectionView !== void 0 && this._collectionView.forceUpdate();
665
- } }, { key: "recomputeCellSizesAndPositions", value: function() {
666
- this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions();
667
- } }, { key: "render", value: function() {
668
- var e = V({}, (function(t) {
669
- if (t == null) throw new TypeError("Cannot destructure " + t);
670
- }(this.props), this.props));
671
- return C.createElement(ve, V({ cellLayoutManager: this, isScrollingChange: this._isScrollingChange, ref: this._setCollectionViewRef }, e));
672
- } }, { key: "calculateSizeAndPositionData", value: function() {
673
- var e = this.props, t = function(n) {
674
- for (var r = n.cellCount, l = n.cellSizeAndPositionGetter, i = [], a = new Do(n.sectionSize), s = 0, c = 0, d = 0; d < r; d++) {
675
- var h = l({ index: d });
676
- if (h.height == null || isNaN(h.height) || h.width == null || isNaN(h.width) || h.x == null || isNaN(h.x) || h.y == null || isNaN(h.y)) throw Error("Invalid metadata returned for cell ".concat(d, `:
677
- x:`).concat(h.x, ", y:").concat(h.y, ", width:").concat(h.width, ", height:").concat(h.height));
678
- s = Math.max(s, h.y + h.height), c = Math.max(c, h.x + h.width), i[d] = h, a.registerCell({ cellMetadatum: h, index: d });
679
- }
680
- return { cellMetadata: i, height: s, sectionManager: a, width: c };
681
- }({ cellCount: e.cellCount, cellSizeAndPositionGetter: e.cellSizeAndPositionGetter, sectionSize: e.sectionSize });
682
- this._cellMetadata = t.cellMetadata, this._sectionManager = t.sectionManager, this._height = t.height, this._width = t.width;
683
- } }, { key: "getLastRenderedIndices", value: function() {
684
- return this._lastRenderedCellIndices;
685
- } }, { key: "getScrollPositionForCell", value: function(e) {
686
- var t = e.align, n = e.cellIndex, r = e.height, l = e.scrollLeft, i = e.scrollTop, a = e.width, s = this.props.cellCount;
687
- if (n >= 0 && n < s) {
688
- var c = this._cellMetadata[n];
689
- l = Ke({ align: t, cellOffset: c.x, cellSize: c.width, containerSize: a, currentOffset: l }), i = Ke({ align: t, cellOffset: c.y, cellSize: c.height, containerSize: r, currentOffset: i });
690
- }
691
- return { scrollLeft: l, scrollTop: i };
692
- } }, { key: "getTotalSize", value: function() {
693
- return { height: this._height, width: this._width };
694
- } }, { key: "cellRenderers", value: function(e) {
695
- var t = this, n = e.height, r = e.isScrolling, l = e.width, i = e.x, a = e.y, s = this.props, c = s.cellGroupRenderer, d = s.cellRenderer;
696
- return this._lastRenderedCellIndices = this._sectionManager.getCellIndices({ height: n, width: l, x: i, y: a }), c({ cellCache: this._cellCache, cellRenderer: d, cellSizeAndPositionGetter: function(h) {
697
- var f = h.index;
698
- return t._sectionManager.getCellMetadata({ index: f });
699
- }, indices: this._lastRenderedCellIndices, isScrolling: r });
700
- } }, { key: "_isScrollingChange", value: function(e) {
701
- e || (this._cellCache = []);
702
- } }, { key: "_setCollectionViewRef", value: function(e) {
703
- this._collectionView = e;
704
- } }]);
705
- }();
706
- function Mt() {
707
- try {
708
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
709
- }));
710
- } catch {
711
- }
712
- return (Mt = function() {
713
- return !!o;
714
- })();
715
- }
716
- function Xe(o) {
717
- var e = o.cellCount, t = o.cellSize, n = o.computeMetadataCallback, r = o.computeMetadataCallbackProps, l = o.nextCellsCount, i = o.nextCellSize, a = o.nextScrollToIndex, s = o.scrollToIndex, c = o.updateScrollOffsetForScrollToIndex;
718
- e === l && (typeof t != "number" && typeof i != "number" || t === i) || (n(r), s >= 0 && s === a && c());
719
- }
720
- function ie(o, e) {
721
- if (o == null) return {};
722
- var t, n, r = zo(o, e);
723
- if (Object.getOwnPropertySymbols) {
724
- var l = Object.getOwnPropertySymbols(o);
725
- for (n = 0; n < l.length; n++) t = l[n], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(o, t) && (r[t] = o[t]);
726
- }
727
- return r;
728
- }
729
- p(qe, "defaultProps", { "aria-label": "grid", cellGroupRenderer: function(o) {
730
- var e = o.cellCache, t = o.cellRenderer, n = o.cellSizeAndPositionGetter, r = o.indices, l = o.isScrolling;
731
- return r.map(function(i) {
732
- var a = n({ index: i }), s = { index: i, isScrolling: l, key: i, style: { height: a.height, left: a.x, position: "absolute", top: a.y, width: a.width } };
733
- return l ? (i in e || (e[i] = t(s)), e[i]) : t(s);
734
- }).filter(function(i) {
735
- return !!i;
736
- });
737
- } }), qe.propTypes = {}, function() {
738
- function o(e, t) {
739
- var n, r, l, i;
740
- return E(this, o), r = this, i = [e, t], l = k(l = o), (n = W(r, Mt() ? Reflect.construct(l, i || [], k(r).constructor) : l.apply(r, i)))._registerChild = n._registerChild.bind(n), n;
741
- }
742
- return D(o, C.PureComponent), H(o, [{ key: "componentDidUpdate", value: function(e) {
743
- var t = this.props, n = t.columnMaxWidth, r = t.columnMinWidth, l = t.columnCount, i = t.width;
744
- n === e.columnMaxWidth && r === e.columnMinWidth && l === e.columnCount && i === e.width || this._registeredChild && this._registeredChild.recomputeGridSize();
745
- } }, { key: "render", value: function() {
746
- var e = this.props, t = e.children, n = e.columnMaxWidth, r = e.columnMinWidth, l = e.columnCount, i = e.width, a = r || 1, s = n ? Math.min(n, i) : i, c = i / l;
747
- return c = Math.max(a, c), c = Math.min(s, c), c = Math.floor(c), t({ adjustedWidth: Math.min(i, c * l), columnWidth: c, getColumnWidth: function() {
748
- return c;
749
- }, registerChild: this._registerChild });
750
- } }, { key: "_registerChild", value: function(e) {
751
- if (e && typeof e.recomputeGridSize != "function") throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");
752
- this._registeredChild = e, this._registeredChild && this._registeredChild.recomputeGridSize();
753
- } }]);
754
- }().propTypes = {};
755
- var F, jo = H(function o(e) {
756
- var t = e.cellCount, n = e.cellSizeGetter, r = e.estimatedCellSize;
757
- E(this, o), p(this, "_cellSizeAndPositionData", {}), p(this, "_lastMeasuredIndex", -1), p(this, "_lastBatchedIndex", -1), p(this, "_cellCount", void 0), p(this, "_cellSizeGetter", void 0), p(this, "_estimatedCellSize", void 0), this._cellSizeGetter = n, this._cellCount = t, this._estimatedCellSize = r;
758
- }, [{ key: "areOffsetsAdjusted", value: function() {
759
- return !1;
760
- } }, { key: "configure", value: function(o) {
761
- var e = o.cellCount, t = o.estimatedCellSize, n = o.cellSizeGetter;
762
- this._cellCount = e, this._estimatedCellSize = t, this._cellSizeGetter = n;
763
- } }, { key: "getCellCount", value: function() {
764
- return this._cellCount;
765
- } }, { key: "getEstimatedCellSize", value: function() {
766
- return this._estimatedCellSize;
767
- } }, { key: "getLastMeasuredIndex", value: function() {
768
- return this._lastMeasuredIndex;
769
- } }, { key: "getOffsetAdjustment", value: function() {
770
- return 0;
771
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
772
- if (o < 0 || o >= this._cellCount) throw Error("Requested index ".concat(o, " is outside of range 0..").concat(this._cellCount));
773
- if (o > this._lastMeasuredIndex) for (var e = this.getSizeAndPositionOfLastMeasuredCell(), t = e.offset + e.size, n = this._lastMeasuredIndex + 1; n <= o; n++) {
774
- var r = this._cellSizeGetter({ index: n });
775
- if (r === void 0 || isNaN(r)) throw Error("Invalid size returned for cell ".concat(n, " of value ").concat(r));
776
- r === null ? (this._cellSizeAndPositionData[n] = { offset: t, size: 0 }, this._lastBatchedIndex = o) : (this._cellSizeAndPositionData[n] = { offset: t, size: r }, t += r, this._lastMeasuredIndex = o);
777
- }
778
- return this._cellSizeAndPositionData[o];
779
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
780
- return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : { offset: 0, size: 0 };
781
- } }, { key: "getTotalSize", value: function() {
782
- var o = this.getSizeAndPositionOfLastMeasuredCell();
783
- return o.offset + o.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;
784
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
785
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
786
- if (n <= 0) return 0;
787
- var i, a = this.getSizeAndPositionOfCell(l), s = a.offset, c = s - n + a.size;
788
- switch (t) {
789
- case "start":
790
- i = s;
791
- break;
792
- case "end":
793
- i = c;
794
- break;
795
- case "center":
796
- i = s - (n - a.size) / 2;
797
- break;
798
- default:
799
- i = Math.max(c, Math.min(s, r));
800
- }
801
- var d = this.getTotalSize();
802
- return Math.max(0, Math.min(d - n, i));
803
- } }, { key: "getVisibleCellRange", value: function(o) {
804
- var e = o.containerSize, t = o.offset;
805
- if (this.getTotalSize() === 0) return {};
806
- var n = t + e, r = this._findNearestCell(t), l = this.getSizeAndPositionOfCell(r);
807
- t = l.offset + l.size;
808
- for (var i = r; t < n && i < this._cellCount - 1; ) i++, t += this.getSizeAndPositionOfCell(i).size;
809
- return { start: r, stop: i };
810
- } }, { key: "resetCell", value: function(o) {
811
- this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, o - 1);
812
- } }, { key: "_binarySearch", value: function(o, e, t) {
813
- for (; e <= o; ) {
814
- var n = e + Math.floor((o - e) / 2), r = this.getSizeAndPositionOfCell(n).offset;
815
- if (r === t) return n;
816
- r < t ? e = n + 1 : r > t && (o = n - 1);
817
- }
818
- return e > 0 ? e - 1 : 0;
819
- } }, { key: "_exponentialSearch", value: function(o, e) {
820
- for (var t = 1; o < this._cellCount && this.getSizeAndPositionOfCell(o).offset < e; ) o += t, t *= 2;
821
- return this._binarySearch(Math.min(o, this._cellCount - 1), Math.floor(o / 2), e);
822
- } }, { key: "_findNearestCell", value: function(o) {
823
- if (isNaN(o)) throw Error("Invalid offset ".concat(o, " specified"));
824
- o = Math.max(0, o);
825
- var e = this.getSizeAndPositionOfLastMeasuredCell(), t = Math.max(0, this._lastMeasuredIndex);
826
- return e.offset >= o ? this._binarySearch(t, 0, o) : this._exponentialSearch(t, o);
827
- } }]), Fo = ["maxScrollSize"], Ye = H(function o(e) {
828
- var t = e.maxScrollSize, n = t === void 0 ? typeof window < "u" && window.chrome ? 16777100 : 15e5 : t, r = ie(e, Fo);
829
- E(this, o), p(this, "_cellSizeAndPositionManager", void 0), p(this, "_maxScrollSize", void 0), this._cellSizeAndPositionManager = new jo(r), this._maxScrollSize = n;
830
- }, [{ key: "areOffsetsAdjusted", value: function() {
831
- return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
832
- } }, { key: "configure", value: function(o) {
833
- this._cellSizeAndPositionManager.configure(o);
834
- } }, { key: "getCellCount", value: function() {
835
- return this._cellSizeAndPositionManager.getCellCount();
836
- } }, { key: "getEstimatedCellSize", value: function() {
837
- return this._cellSizeAndPositionManager.getEstimatedCellSize();
838
- } }, { key: "getLastMeasuredIndex", value: function() {
839
- return this._cellSizeAndPositionManager.getLastMeasuredIndex();
840
- } }, { key: "getOffsetAdjustment", value: function(o) {
841
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize(), l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
842
- return Math.round(l * (r - n));
843
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
844
- return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o);
845
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
846
- return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
847
- } }, { key: "getTotalSize", value: function() {
848
- return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
849
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
850
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
851
- r = this._safeOffsetToOffset({ containerSize: n, offset: r });
852
- var i = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({ align: t, containerSize: n, currentOffset: r, targetIndex: l });
853
- return this._offsetToSafeOffset({ containerSize: n, offset: i });
854
- } }, { key: "getVisibleCellRange", value: function(o) {
855
- var e = o.containerSize, t = o.offset;
856
- return t = this._safeOffsetToOffset({ containerSize: e, offset: t }), this._cellSizeAndPositionManager.getVisibleCellRange({ containerSize: e, offset: t });
857
- } }, { key: "resetCell", value: function(o) {
858
- this._cellSizeAndPositionManager.resetCell(o);
859
- } }, { key: "_getOffsetPercentage", value: function(o) {
860
- var e = o.containerSize, t = o.offset, n = o.totalSize;
861
- return n <= e ? 0 : t / (n - e);
862
- } }, { key: "_offsetToSafeOffset", value: function(o) {
863
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
864
- if (n === r) return t;
865
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: n });
866
- return Math.round(l * (r - e));
867
- } }, { key: "_safeOffsetToOffset", value: function(o) {
868
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
869
- if (n === r) return t;
870
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
871
- return Math.round(l * (n - e));
872
- } }]);
873
- function Je(o) {
874
- var e = o.cellSize, t = o.cellSizeAndPositionManager, n = o.previousCellsCount, r = o.previousCellSize, l = o.previousScrollToAlignment, i = o.previousScrollToIndex, a = o.previousSize, s = o.scrollOffset, c = o.scrollToAlignment, d = o.scrollToIndex, h = o.size, f = o.sizeJustIncreasedFromZero, u = o.updateScrollIndexCallback, v = t.getCellCount(), m = d >= 0 && d < v;
875
- m && (h !== a || f || !r || typeof e == "number" && e !== r || c !== l || d !== i) ? u(d) : !m && v > 0 && (h < a || v < n) && s > t.getTotalSize() - h && u(v - 1);
876
- }
877
- var No = (F = typeof window < "u" ? window : typeof self < "u" ? self : {}).requestAnimationFrame || F.webkitRequestAnimationFrame || F.mozRequestAnimationFrame || F.oRequestAnimationFrame || F.msRequestAnimationFrame || function(o) {
878
- return F.setTimeout(o, 1e3 / 60);
879
- }, Bo = F.cancelAnimationFrame || F.webkitCancelAnimationFrame || F.mozCancelAnimationFrame || F.oCancelAnimationFrame || F.msCancelAnimationFrame || function(o) {
880
- F.clearTimeout(o);
881
- }, Ze = No, Uo = Bo, oe = function(o) {
882
- return Uo(o.id);
883
- }, Le = function(o, e) {
884
- var t;
885
- Promise.resolve().then(function() {
886
- t = Date.now();
887
- });
888
- var n = function() {
889
- Date.now() - t >= e ? o.call() : r.id = Ze(n);
890
- }, r = { id: Ze(n) };
891
- return r;
892
- };
893
- function Qe(o, e) {
894
- var t = Object.keys(o);
895
- if (Object.getOwnPropertySymbols) {
896
- var n = Object.getOwnPropertySymbols(o);
897
- e && (n = n.filter(function(r) {
898
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
899
- })), t.push.apply(t, n);
900
- }
901
- return t;
902
- }
903
- function j(o) {
904
- for (var e = 1; e < arguments.length; e++) {
905
- var t = arguments[e] != null ? arguments[e] : {};
906
- e % 2 ? Qe(Object(t), !0).forEach(function(n) {
907
- p(o, n, t[n]);
908
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Qe(Object(t)).forEach(function(n) {
909
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
910
- });
911
- }
912
- return o;
913
- }
914
- function Lt() {
915
- try {
916
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
917
- }));
918
- } catch {
919
- }
920
- return (Lt = function() {
921
- return !!o;
922
- })();
923
- }
924
- var et = "requested", $ = function() {
925
- function o(e) {
926
- var t, n, r, l;
927
- E(this, o), n = this, l = [e], r = k(r = o), p(t = W(n, Lt() ? Reflect.construct(r, l || [], k(n).constructor) : r.apply(n, l)), "_onGridRenderedMemoizer", te()), p(t, "_onScrollMemoizer", te(!1)), p(t, "_deferredInvalidateColumnIndex", null), p(t, "_deferredInvalidateRowIndex", null), p(t, "_recomputeScrollLeftFlag", !1), p(t, "_recomputeScrollTopFlag", !1), p(t, "_horizontalScrollBarSize", 0), p(t, "_verticalScrollBarSize", 0), p(t, "_scrollbarPresenceChanged", !1), p(t, "_scrollingContainer", void 0), p(t, "_childrenToDisplay", void 0), p(t, "_columnStartIndex", void 0), p(t, "_columnStopIndex", void 0), p(t, "_rowStartIndex", void 0), p(t, "_rowStopIndex", void 0), p(t, "_renderedColumnStartIndex", 0), p(t, "_renderedColumnStopIndex", 0), p(t, "_renderedRowStartIndex", 0), p(t, "_renderedRowStopIndex", 0), p(t, "_initialScrollTop", void 0), p(t, "_initialScrollLeft", void 0), p(t, "_disablePointerEventsTimeoutId", void 0), p(t, "_styleCache", {}), p(t, "_cellCache", {}), p(t, "_debounceScrollEndedCallback", function() {
928
- t._disablePointerEventsTimeoutId = null, t.setState({ isScrolling: !1, needToResetStyleCache: !1 });
929
- }), p(t, "_invokeOnGridRenderedHelper", function() {
930
- var s = t.props.onSectionRendered;
931
- t._onGridRenderedMemoizer({ callback: s, indices: { columnOverscanStartIndex: t._columnStartIndex, columnOverscanStopIndex: t._columnStopIndex, columnStartIndex: t._renderedColumnStartIndex, columnStopIndex: t._renderedColumnStopIndex, rowOverscanStartIndex: t._rowStartIndex, rowOverscanStopIndex: t._rowStopIndex, rowStartIndex: t._renderedRowStartIndex, rowStopIndex: t._renderedRowStopIndex } });
932
- }), p(t, "_setScrollingContainerRef", function(s) {
933
- t._scrollingContainer = s, typeof t.props.elementRef == "function" ? t.props.elementRef(s) : ee(t.props.elementRef) === "object" && (t.props.elementRef.current = s);
934
- }), p(t, "_onScroll", function(s) {
935
- s.target === t._scrollingContainer && t.handleScrollEvent(s.target);
936
- });
937
- var i = new Ye({ cellCount: e.columnCount, cellSizeGetter: function(s) {
938
- return o._wrapSizeGetter(e.columnWidth)(s);
939
- }, estimatedCellSize: o._getEstimatedColumnSize(e) }), a = new Ye({ cellCount: e.rowCount, cellSizeGetter: function(s) {
940
- return o._wrapSizeGetter(e.rowHeight)(s);
941
- }, estimatedCellSize: o._getEstimatedRowSize(e) });
942
- return t.state = { instanceProps: { columnSizeAndPositionManager: i, rowSizeAndPositionManager: a, prevColumnWidth: e.columnWidth, prevRowHeight: e.rowHeight, prevColumnCount: e.columnCount, prevRowCount: e.rowCount, prevIsScrolling: e.isScrolling === !0, prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow, scrollbarSize: 0, scrollbarSizeMeasured: !1 }, isScrolling: !1, scrollDirectionHorizontal: 1, scrollDirectionVertical: 1, scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: null, needToResetStyleCache: !1 }, e.scrollToRow > 0 && (t._initialScrollTop = t._getCalculatedScrollTop(e, t.state)), e.scrollToColumn > 0 && (t._initialScrollLeft = t._getCalculatedScrollLeft(e, t.state)), t;
943
- }
944
- return D(o, C.PureComponent), H(o, [{ key: "getOffsetForCell", value: function() {
945
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.alignment, n = t === void 0 ? this.props.scrollToAlignment : t, r = e.columnIndex, l = r === void 0 ? this.props.scrollToColumn : r, i = e.rowIndex, a = i === void 0 ? this.props.scrollToRow : i, s = j(j({}, this.props), {}, { scrollToAlignment: n, scrollToColumn: l, scrollToRow: a });
946
- return { scrollLeft: this._getCalculatedScrollLeft(s), scrollTop: this._getCalculatedScrollTop(s) };
947
- } }, { key: "getTotalRowsHeight", value: function() {
948
- return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
949
- } }, { key: "getTotalColumnsWidth", value: function() {
950
- return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
951
- } }, { key: "handleScrollEvent", value: function(e) {
952
- var t = e.scrollLeft, n = t === void 0 ? 0 : t, r = e.scrollTop, l = r === void 0 ? 0 : r;
953
- if (!(l < 0)) {
954
- this._debounceScrollEnded();
955
- var i = this.props, a = i.autoHeight, s = i.autoWidth, c = i.height, d = i.width, h = this.state.instanceProps, f = h.scrollbarSize, u = h.rowSizeAndPositionManager.getTotalSize(), v = h.columnSizeAndPositionManager.getTotalSize(), m = Math.min(Math.max(0, v - d + f), n), _ = Math.min(Math.max(0, u - c + f), l);
956
- if (this.state.scrollLeft !== m || this.state.scrollTop !== _) {
957
- var S = { isScrolling: !0, scrollDirectionHorizontal: m !== this.state.scrollLeft ? m > this.state.scrollLeft ? 1 : -1 : this.state.scrollDirectionHorizontal, scrollDirectionVertical: _ !== this.state.scrollTop ? _ > this.state.scrollTop ? 1 : -1 : this.state.scrollDirectionVertical, scrollPositionChangeReason: "observed" };
958
- a || (S.scrollTop = _), s || (S.scrollLeft = m), S.needToResetStyleCache = !1, this.setState(S);
959
- }
960
- this._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: _, totalColumnsWidth: v, totalRowsHeight: u });
961
- }
962
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
963
- var t = e.columnIndex, n = e.rowIndex;
964
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, t) : t, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, n) : n;
965
- } }, { key: "measureAllCells", value: function() {
966
- var e = this.props, t = e.columnCount, n = e.rowCount, r = this.state.instanceProps;
967
- r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t - 1), r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n - 1);
968
- } }, { key: "recomputeGridSize", value: function() {
969
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.scrollToColumn, s = i.scrollToRow, c = this.state.instanceProps;
970
- c.columnSizeAndPositionManager.resetCell(n), c.rowSizeAndPositionManager.resetCell(l), this._recomputeScrollLeftFlag = a >= 0 && (this.state.scrollDirectionHorizontal === 1 ? n <= a : n >= a), this._recomputeScrollTopFlag = s >= 0 && (this.state.scrollDirectionVertical === 1 ? l <= s : l >= s), this._styleCache = {}, this._cellCache = {}, this.forceUpdate();
971
- } }, { key: "scrollToCell", value: function(e) {
972
- var t = e.columnIndex, n = e.rowIndex, r = this.props.columnCount, l = this.props;
973
- r > 1 && t !== void 0 && this._updateScrollLeftForScrollToColumn(j(j({}, l), {}, { scrollToColumn: t })), n !== void 0 && this._updateScrollTopForScrollToRow(j(j({}, l), {}, { scrollToRow: n }));
974
- } }, { key: "componentDidMount", value: function() {
975
- var e = this.props, t = e.getScrollbarSize, n = e.height, r = e.scrollLeft, l = e.scrollToColumn, i = e.scrollTop, a = e.scrollToRow, s = e.width, c = this.state.instanceProps;
976
- if (this._initialScrollTop = 0, this._initialScrollLeft = 0, this._handleInvalidatedGridSize(), c.scrollbarSizeMeasured || this.setState(function(f) {
977
- var u = j(j({}, f), {}, { needToResetStyleCache: !1 });
978
- return u.instanceProps.scrollbarSize = t(), u.instanceProps.scrollbarSizeMeasured = !0, u;
979
- }), typeof r == "number" && r >= 0 || typeof i == "number" && i >= 0) {
980
- var d = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: r, scrollTop: i });
981
- d && (d.needToResetStyleCache = !1, this.setState(d));
982
- }
983
- 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));
984
- var h = n > 0 && s > 0;
985
- l >= 0 && h && this._updateScrollLeftForScrollToColumn(), a >= 0 && h && this._updateScrollTopForScrollToRow(), this._invokeOnGridRenderedHelper(), this._invokeOnScrollMemoizer({ scrollLeft: r || 0, scrollTop: i || 0, totalColumnsWidth: c.columnSizeAndPositionManager.getTotalSize(), totalRowsHeight: c.rowSizeAndPositionManager.getTotalSize() }), this._maybeCallOnScrollbarPresenceChange();
986
- } }, { key: "componentDidUpdate", value: function(e, t) {
987
- var n = this, r = this.props, l = r.autoHeight, i = r.autoWidth, a = r.columnCount, s = r.height, c = r.rowCount, d = r.scrollToAlignment, h = r.scrollToColumn, f = r.scrollToRow, u = r.width, v = this.state, m = v.scrollLeft, _ = v.scrollPositionChangeReason, S = v.scrollTop, y = v.instanceProps;
988
- this._handleInvalidatedGridSize();
989
- var g = a > 0 && e.columnCount === 0 || c > 0 && e.rowCount === 0;
990
- _ === et && (!i && m >= 0 && (m !== this._scrollingContainer.scrollLeft || g) && (this._scrollingContainer.scrollLeft = m), !l && S >= 0 && (S !== this._scrollingContainer.scrollTop || g) && (this._scrollingContainer.scrollTop = S));
991
- var w = (e.width === 0 || e.height === 0) && s > 0 && u > 0;
992
- if (this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : Je({ cellSizeAndPositionManager: y.columnSizeAndPositionManager, previousCellsCount: e.columnCount, previousCellSize: e.columnWidth, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToColumn, previousSize: e.width, scrollOffset: m, scrollToAlignment: d, scrollToIndex: h, size: u, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
993
- return n._updateScrollLeftForScrollToColumn(n.props);
994
- } }), this._recomputeScrollTopFlag ? (this._recomputeScrollTopFlag = !1, this._updateScrollTopForScrollToRow(this.props)) : Je({ cellSizeAndPositionManager: y.rowSizeAndPositionManager, previousCellsCount: e.rowCount, previousCellSize: e.rowHeight, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToRow, previousSize: e.height, scrollOffset: S, scrollToAlignment: d, scrollToIndex: f, size: s, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
995
- return n._updateScrollTopForScrollToRow(n.props);
996
- } }), this._invokeOnGridRenderedHelper(), m !== t.scrollLeft || S !== t.scrollTop) {
997
- var x = y.rowSizeAndPositionManager.getTotalSize(), b = y.columnSizeAndPositionManager.getTotalSize();
998
- this._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: S, totalColumnsWidth: b, totalRowsHeight: x });
999
- }
1000
- this._maybeCallOnScrollbarPresenceChange();
1001
- } }, { key: "componentWillUnmount", value: function() {
1002
- this._disablePointerEventsTimeoutId && oe(this._disablePointerEventsTimeoutId);
1003
- } }, { key: "render", value: function() {
1004
- var e = this.props, t = e.autoContainerWidth, n = e.autoHeight, r = e.autoWidth, l = e.className, i = e.containerProps, a = e.containerRole, s = e.containerStyle, c = e.height, d = e.id, h = e.noContentRenderer, f = e.role, u = e.style, v = e.tabIndex, m = e.width, _ = this.state, S = _.instanceProps, y = _.needToResetStyleCache, g = this._isScrolling(), w = { boxSizing: "border-box", direction: "ltr", height: n ? "auto" : c, position: "relative", width: r ? "auto" : m, WebkitOverflowScrolling: "touch", willChange: "transform" };
1005
- y && (this._styleCache = {}), this.state.isScrolling || this._resetStyleCache(), this._calculateChildrenToRender(this.props, this.state);
1006
- var x = S.columnSizeAndPositionManager.getTotalSize(), b = S.rowSizeAndPositionManager.getTotalSize(), R = b > c ? S.scrollbarSize : 0, T = x > m ? S.scrollbarSize : 0;
1007
- T === this._horizontalScrollBarSize && R === this._verticalScrollBarSize || (this._horizontalScrollBarSize = T, this._verticalScrollBarSize = R, this._scrollbarPresenceChanged = !0), w.overflowX = x + R <= m ? "hidden" : "auto", w.overflowY = b + T <= c ? "hidden" : "auto";
1008
- var I = this._childrenToDisplay, O = I.length === 0 && c > 0 && m > 0;
1009
- return C.createElement("div", V({ ref: this._setScrollingContainerRef }, i, { "aria-label": this.props["aria-label"], "aria-readonly": this.props["aria-readonly"], className: N("ReactVirtualized__Grid", l), id: d, onScroll: this._onScroll, role: f, style: j(j({}, w), u), tabIndex: v }), I.length > 0 && C.createElement("div", { className: "ReactVirtualized__Grid__innerScrollContainer", role: a, style: j({ width: t ? "auto" : x, height: b, maxWidth: x, maxHeight: b, overflow: "hidden", pointerEvents: g ? "none" : "", position: "relative" }, s) }, I), O && h());
1010
- } }, { key: "_calculateChildrenToRender", value: function() {
1011
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = e.cellRenderer, r = e.cellRangeRenderer, l = e.columnCount, i = e.deferredMeasurementCache, a = e.height, s = e.overscanColumnCount, c = e.overscanIndicesGetter, d = e.overscanRowCount, h = e.rowCount, f = e.width, u = e.isScrollingOptOut, v = t.scrollDirectionHorizontal, m = t.scrollDirectionVertical, _ = t.instanceProps, S = this._initialScrollTop > 0 ? this._initialScrollTop : t.scrollTop, y = this._initialScrollLeft > 0 ? this._initialScrollLeft : t.scrollLeft, g = this._isScrolling(e, t);
1012
- if (this._childrenToDisplay = [], a > 0 && f > 0) {
1013
- var w = _.columnSizeAndPositionManager.getVisibleCellRange({ containerSize: f, offset: y }), x = _.rowSizeAndPositionManager.getVisibleCellRange({ containerSize: a, offset: S }), b = _.columnSizeAndPositionManager.getOffsetAdjustment({ containerSize: f, offset: y }), R = _.rowSizeAndPositionManager.getOffsetAdjustment({ containerSize: a, offset: S });
1014
- this._renderedColumnStartIndex = w.start, this._renderedColumnStopIndex = w.stop, this._renderedRowStartIndex = x.start, this._renderedRowStopIndex = x.stop;
1015
- var T = c({ direction: "horizontal", cellCount: l, overscanCellsCount: s, scrollDirection: v, startIndex: typeof w.start == "number" ? w.start : 0, stopIndex: typeof w.stop == "number" ? w.stop : -1 }), I = c({ direction: "vertical", cellCount: h, overscanCellsCount: d, scrollDirection: m, startIndex: typeof x.start == "number" ? x.start : 0, stopIndex: typeof x.stop == "number" ? x.stop : -1 }), O = T.overscanStartIndex, P = T.overscanStopIndex, z = I.overscanStartIndex, L = I.overscanStopIndex;
1016
- if (i) {
1017
- if (!i.hasFixedHeight()) {
1018
- for (var G = z; G <= L; G++) if (!i.has(G, 0)) {
1019
- O = 0, P = l - 1;
1020
- break;
1021
- }
1022
- }
1023
- if (!i.hasFixedWidth()) {
1024
- for (var B = O; B <= P; B++) if (!i.has(0, B)) {
1025
- z = 0, L = h - 1;
1026
- break;
1027
- }
1028
- }
1029
- }
1030
- this._childrenToDisplay = r({ cellCache: this._cellCache, cellRenderer: n, columnSizeAndPositionManager: _.columnSizeAndPositionManager, columnStartIndex: O, columnStopIndex: P, deferredMeasurementCache: i, horizontalOffsetAdjustment: b, isScrolling: g, isScrollingOptOut: u, parent: this, rowSizeAndPositionManager: _.rowSizeAndPositionManager, rowStartIndex: z, rowStopIndex: L, scrollLeft: y, scrollTop: S, styleCache: this._styleCache, verticalOffsetAdjustment: R, visibleColumnIndices: w, visibleRowIndices: x }), this._columnStartIndex = O, this._columnStopIndex = P, this._rowStartIndex = z, this._rowStopIndex = L;
1031
- }
1032
- } }, { key: "_debounceScrollEnded", value: function() {
1033
- var e = this.props.scrollingResetTimeInterval;
1034
- this._disablePointerEventsTimeoutId && oe(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = Le(this._debounceScrollEndedCallback, e);
1035
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1036
- if (typeof this._deferredInvalidateColumnIndex == "number" && typeof this._deferredInvalidateRowIndex == "number") {
1037
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1038
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t });
1039
- }
1040
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
1041
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalColumnsWidth, i = e.totalRowsHeight;
1042
- this._onScrollMemoizer({ callback: function(a) {
1043
- var s = a.scrollLeft, c = a.scrollTop, d = t.props, h = d.height;
1044
- (0, d.onScroll)({ clientHeight: h, clientWidth: d.width, scrollHeight: i, scrollLeft: s, scrollTop: c, scrollWidth: l });
1045
- }, indices: { scrollLeft: n, scrollTop: r } });
1046
- } }, { key: "_isScrolling", value: function() {
1047
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1048
- return Object.hasOwnProperty.call(e, "isScrolling") ? !!e.isScrolling : !!t.isScrolling;
1049
- } }, { key: "_maybeCallOnScrollbarPresenceChange", value: function() {
1050
- if (this._scrollbarPresenceChanged) {
1051
- var e = this.props.onScrollbarPresenceChange;
1052
- this._scrollbarPresenceChanged = !1, e({ horizontal: this._horizontalScrollBarSize > 0, size: this.state.instanceProps.scrollbarSize, vertical: this._verticalScrollBarSize > 0 });
1053
- }
1054
- } }, { key: "scrollToPosition", value: function(e) {
1055
- var t = e.scrollLeft, n = e.scrollTop, r = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: t, scrollTop: n });
1056
- r && (r.needToResetStyleCache = !1, this.setState(r));
1057
- } }, { key: "_getCalculatedScrollLeft", value: function() {
1058
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1059
- return o._getCalculatedScrollLeft(e, t);
1060
- } }, { key: "_updateScrollLeftForScrollToColumn", value: function() {
1061
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1062
- n && (n.needToResetStyleCache = !1, this.setState(n));
1063
- } }, { key: "_getCalculatedScrollTop", value: function() {
1064
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1065
- return o._getCalculatedScrollTop(e, t);
1066
- } }, { key: "_resetStyleCache", value: function() {
1067
- var e = this._styleCache, t = this._cellCache, n = this.props.isScrollingOptOut;
1068
- this._cellCache = {}, this._styleCache = {};
1069
- for (var r = this._rowStartIndex; r <= this._rowStopIndex; r++) for (var l = this._columnStartIndex; l <= this._columnStopIndex; l++) {
1070
- var i = "".concat(r, "-").concat(l);
1071
- this._styleCache[i] = e[i], n && (this._cellCache[i] = t[i]);
1072
- }
1073
- } }, { key: "_updateScrollTopForScrollToRow", value: function() {
1074
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollTopForScrollToRowStateUpdate(e, t);
1075
- n && (n.needToResetStyleCache = !1, this.setState(n));
1076
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1077
- var n = {};
1078
- e.columnCount === 0 && t.scrollLeft !== 0 || e.rowCount === 0 && t.scrollTop !== 0 ? (n.scrollLeft = 0, n.scrollTop = 0) : (e.scrollLeft !== t.scrollLeft && e.scrollToColumn < 0 || e.scrollTop !== t.scrollTop && e.scrollToRow < 0) && Object.assign(n, o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }));
1079
- var r, l, i = t.instanceProps;
1080
- return n.needToResetStyleCache = !1, e.columnWidth === i.prevColumnWidth && e.rowHeight === i.prevRowHeight || (n.needToResetStyleCache = !0), i.columnSizeAndPositionManager.configure({ cellCount: e.columnCount, estimatedCellSize: o._getEstimatedColumnSize(e), cellSizeGetter: o._wrapSizeGetter(e.columnWidth) }), i.rowSizeAndPositionManager.configure({ cellCount: e.rowCount, estimatedCellSize: o._getEstimatedRowSize(e), cellSizeGetter: o._wrapSizeGetter(e.rowHeight) }), i.prevColumnCount !== 0 && i.prevRowCount !== 0 || (i.prevColumnCount = 0, i.prevRowCount = 0), e.autoHeight && e.isScrolling === !1 && i.prevIsScrolling === !0 && Object.assign(n, { isScrolling: !1 }), Xe({ cellCount: i.prevColumnCount, cellSize: typeof i.prevColumnWidth == "number" ? i.prevColumnWidth : null, computeMetadataCallback: function() {
1081
- return i.columnSizeAndPositionManager.resetCell(0);
1082
- }, computeMetadataCallbackProps: e, nextCellsCount: e.columnCount, nextCellSize: typeof e.columnWidth == "number" ? e.columnWidth : null, nextScrollToIndex: e.scrollToColumn, scrollToIndex: i.prevScrollToColumn, updateScrollOffsetForScrollToIndex: function() {
1083
- r = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1084
- } }), Xe({ cellCount: i.prevRowCount, cellSize: typeof i.prevRowHeight == "number" ? i.prevRowHeight : null, computeMetadataCallback: function() {
1085
- return i.rowSizeAndPositionManager.resetCell(0);
1086
- }, computeMetadataCallbackProps: e, nextCellsCount: e.rowCount, nextCellSize: typeof e.rowHeight == "number" ? e.rowHeight : null, nextScrollToIndex: e.scrollToRow, scrollToIndex: i.prevScrollToRow, updateScrollOffsetForScrollToIndex: function() {
1087
- l = o._getScrollTopForScrollToRowStateUpdate(e, t);
1088
- } }), i.prevColumnCount = e.columnCount, i.prevColumnWidth = e.columnWidth, i.prevIsScrolling = e.isScrolling === !0, i.prevRowCount = e.rowCount, i.prevRowHeight = e.rowHeight, i.prevScrollToColumn = e.scrollToColumn, i.prevScrollToRow = e.scrollToRow, i.scrollbarSize = e.getScrollbarSize(), i.scrollbarSize === void 0 ? (i.scrollbarSizeMeasured = !1, i.scrollbarSize = 0) : i.scrollbarSizeMeasured = !0, n.instanceProps = i, j(j(j({}, n), r), l);
1089
- } }, { key: "_getEstimatedColumnSize", value: function(e) {
1090
- return typeof e.columnWidth == "number" ? e.columnWidth : e.estimatedColumnSize;
1091
- } }, { key: "_getEstimatedRowSize", value: function(e) {
1092
- return typeof e.rowHeight == "number" ? e.rowHeight : e.estimatedRowSize;
1093
- } }, { key: "_getScrollToPositionStateUpdate", value: function(e) {
1094
- var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, l = { scrollPositionChangeReason: et };
1095
- return typeof n == "number" && n >= 0 && (l.scrollDirectionHorizontal = n > t.scrollLeft ? 1 : -1, l.scrollLeft = n), typeof r == "number" && r >= 0 && (l.scrollDirectionVertical = r > t.scrollTop ? 1 : -1, l.scrollTop = r), typeof n == "number" && n >= 0 && n !== t.scrollLeft || typeof r == "number" && r >= 0 && r !== t.scrollTop ? l : {};
1096
- } }, { key: "_wrapSizeGetter", value: function(e) {
1097
- return typeof e == "function" ? e : function() {
1098
- return e;
1099
- };
1100
- } }, { key: "_getCalculatedScrollLeft", value: function(e, t) {
1101
- var n = e.columnCount, r = e.height, l = e.scrollToAlignment, i = e.scrollToColumn, a = e.width, s = t.scrollLeft, c = t.instanceProps;
1102
- if (n > 0) {
1103
- var d = n - 1, h = i < 0 ? d : Math.min(d, i), f = c.rowSizeAndPositionManager.getTotalSize(), u = c.scrollbarSizeMeasured && f > r ? c.scrollbarSize : 0;
1104
- return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: a - u, currentOffset: s, targetIndex: h });
1105
- }
1106
- return 0;
1107
- } }, { key: "_getScrollLeftForScrollToColumnStateUpdate", value: function(e, t) {
1108
- var n = t.scrollLeft, r = o._getCalculatedScrollLeft(e, t);
1109
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: r, scrollTop: -1 }) : {};
1110
- } }, { key: "_getCalculatedScrollTop", value: function(e, t) {
1111
- var n = e.height, r = e.rowCount, l = e.scrollToAlignment, i = e.scrollToRow, a = e.width, s = t.scrollTop, c = t.instanceProps;
1112
- if (r > 0) {
1113
- var d = r - 1, h = i < 0 ? d : Math.min(d, i), f = c.columnSizeAndPositionManager.getTotalSize(), u = c.scrollbarSizeMeasured && f > a ? c.scrollbarSize : 0;
1114
- return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: n - u, currentOffset: s, targetIndex: h });
1115
- }
1116
- return 0;
1117
- } }, { key: "_getScrollTopForScrollToRowStateUpdate", value: function(e, t) {
1118
- var n = t.scrollTop, r = o._getCalculatedScrollTop(e, t);
1119
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: -1, scrollTop: r }) : {};
1120
- } }]);
1121
- }();
1122
- function Gt(o) {
1123
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1124
- return t = Math.max(1, t), n === 1 ? { overscanStartIndex: Math.max(0, r - 1), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l + 1) };
1125
- }
1126
- function ze(o, e) {
1127
- (e == null || e > o.length) && (e = o.length);
1128
- for (var t = 0, n = Array(e); t < e; t++) n[t] = o[t];
1129
- return n;
1130
- }
1131
- function At(o, e) {
1132
- if (o) {
1133
- if (typeof o == "string") return ze(o, e);
1134
- var t = {}.toString.call(o).slice(8, -1);
1135
- return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ze(o, e) : void 0;
1136
- }
1137
- }
1138
- function Et() {
1139
- try {
1140
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1141
- }));
1142
- } catch {
1143
- }
1144
- return (Et = function() {
1145
- return !!o;
1146
- })();
1147
- }
1148
- p($, "defaultProps", { "aria-label": "grid", "aria-readonly": !0, autoContainerWidth: !1, autoHeight: !1, autoWidth: !1, cellRangeRenderer: function(o) {
1149
- for (var e = o.cellCache, t = o.cellRenderer, n = o.columnSizeAndPositionManager, r = o.columnStartIndex, l = o.columnStopIndex, i = o.deferredMeasurementCache, a = o.horizontalOffsetAdjustment, s = o.isScrolling, c = o.isScrollingOptOut, d = o.parent, h = o.rowSizeAndPositionManager, f = o.rowStartIndex, u = o.rowStopIndex, v = o.styleCache, m = o.verticalOffsetAdjustment, _ = o.visibleColumnIndices, S = o.visibleRowIndices, y = [], g = n.areOffsetsAdjusted() || h.areOffsetsAdjusted(), w = !s && !g, x = f; x <= u; x++) for (var b = h.getSizeAndPositionOfCell(x), R = r; R <= l; R++) {
1150
- var T = n.getSizeAndPositionOfCell(R), I = R >= _.start && R <= _.stop && x >= S.start && x <= S.stop, O = "".concat(x, "-").concat(R), P = void 0;
1151
- w && v[O] ? P = v[O] : i && !i.has(x, R) ? P = { height: "auto", left: 0, position: "absolute", top: 0, width: "auto" } : (P = { height: b.size, left: T.offset + a, position: "absolute", top: b.offset + m, width: T.size }, v[O] = P);
1152
- var z = { columnIndex: R, isScrolling: s, isVisible: I, key: O, parent: d, rowIndex: x, style: P }, L = void 0;
1153
- !c && !s || a || m ? L = t(z) : (e[O] || (e[O] = t(z)), L = e[O]), L != null && L !== !1 && (L.props.role || (L = St.cloneElement(L, { role: "gridcell" })), y.push(L));
1154
- }
1155
- return y;
1156
- }, containerRole: "row", containerStyle: {}, estimatedColumnSize: 100, estimatedRowSize: 30, getScrollbarSize: be, noContentRenderer: function() {
1157
- return null;
1158
- }, onScroll: function() {
1159
- }, onScrollbarPresenceChange: function() {
1160
- }, onSectionRendered: function() {
1161
- }, overscanColumnCount: 0, overscanIndicesGetter: function(o) {
1162
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1163
- return n === 1 ? { overscanStartIndex: Math.max(0, r), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l) };
1164
- }, overscanRowCount: 10, role: "grid", scrollingResetTimeInterval: 150, scrollToAlignment: "auto", scrollToColumn: -1, scrollToRow: -1, style: {}, tabIndex: 0, isScrollingOptOut: !1 }), ue($);
1165
- var tt = function() {
1166
- function o(e, t) {
1167
- var n, r, l, i;
1168
- return E(this, o), r = this, i = [e, t], l = k(l = o), (n = W(r, Et() ? Reflect.construct(l, i || [], k(r).constructor) : l.apply(r, i)))._loadMoreRowsMemoizer = te(), n._onRowsRendered = n._onRowsRendered.bind(n), n._registerChild = n._registerChild.bind(n), n;
1169
- }
1170
- return D(o, C.PureComponent), H(o, [{ key: "resetLoadMoreRowsCache", value: function(e) {
1171
- this._loadMoreRowsMemoizer = te(), e && this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1172
- } }, { key: "render", value: function() {
1173
- return (0, this.props.children)({ onRowsRendered: this._onRowsRendered, registerChild: this._registerChild });
1174
- } }, { key: "_loadUnloadedRanges", value: function(e) {
1175
- var t = this, n = this.props.loadMoreRows;
1176
- e.forEach(function(r) {
1177
- var l = n(r);
1178
- l && l.then(function() {
1179
- var i;
1180
- (i = { lastRenderedStartIndex: t._lastRenderedStartIndex, lastRenderedStopIndex: t._lastRenderedStopIndex, startIndex: r.startIndex, stopIndex: r.stopIndex }).startIndex > i.lastRenderedStopIndex || i.stopIndex < i.lastRenderedStartIndex || t._registeredChild && function(a) {
1181
- var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, c = typeof a.recomputeGridSize == "function" ? a.recomputeGridSize : a.recomputeRowHeights;
1182
- c ? c.call(a, s) : a.forceUpdate();
1183
- }(t._registeredChild, t._lastRenderedStartIndex);
1184
- });
1185
- });
1186
- } }, { key: "_onRowsRendered", value: function(e) {
1187
- var t = e.startIndex, n = e.stopIndex;
1188
- this._lastRenderedStartIndex = t, this._lastRenderedStopIndex = n, this._doStuff(t, n);
1189
- } }, { key: "_doStuff", value: function(e, t) {
1190
- var n, r = this, l = this.props, i = l.isRowLoaded, a = l.minimumBatchSize, s = l.rowCount, c = l.threshold, d = function(f) {
1191
- for (var u = f.isRowLoaded, v = f.minimumBatchSize, m = f.rowCount, _ = f.stopIndex, S = [], y = null, g = null, w = f.startIndex; w <= _; w++) u({ index: w }) ? g !== null && (S.push({ startIndex: y, stopIndex: g }), y = g = null) : (g = w, y === null && (y = w));
1192
- if (g !== null) {
1193
- for (var x = Math.min(Math.max(g, y + v - 1), m - 1), b = g + 1; b <= x && !u({ index: b }); b++) g = b;
1194
- S.push({ startIndex: y, stopIndex: g });
1195
- }
1196
- if (S.length) for (var R = S[0]; R.stopIndex - R.startIndex + 1 < v && R.startIndex > 0; ) {
1197
- var T = R.startIndex - 1;
1198
- if (u({ index: T })) break;
1199
- R.startIndex = T;
1200
- }
1201
- return S;
1202
- }({ isRowLoaded: i, minimumBatchSize: a, rowCount: s, startIndex: Math.max(0, e - c), stopIndex: Math.min(s - 1, t + c) }), h = (n = []).concat.apply(n, function(f) {
1203
- return function(u) {
1204
- if (Array.isArray(u)) return ze(u);
1205
- }(f) || function(u) {
1206
- if (typeof Symbol < "u" && u[Symbol.iterator] != null || u["@@iterator"] != null) return Array.from(u);
1207
- }(f) || At(f) || function() {
1208
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
1209
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1210
- }();
1211
- }(d.map(function(f) {
1212
- return [f.startIndex, f.stopIndex];
1213
- })));
1214
- this._loadMoreRowsMemoizer({ callback: function() {
1215
- r._loadUnloadedRanges(d);
1216
- }, indices: { squashedUnloadedRanges: h } });
1217
- } }, { key: "_registerChild", value: function(e) {
1218
- this._registeredChild = e;
1219
- } }]);
1220
- }();
1221
- function Ht() {
1222
- try {
1223
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1224
- }));
1225
- } catch {
1226
- }
1227
- return (Ht = function() {
1228
- return !!o;
1229
- })();
1230
- }
1231
- p(tt, "defaultProps", { minimumBatchSize: 10, rowCount: 0, threshold: 15 }), tt.propTypes = {};
1232
- var Vo = function() {
1233
- function o() {
1234
- var e, t, n, r;
1235
- E(this, o);
1236
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1237
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, Ht() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "Grid", void 0), p(e, "_cellRenderer", function(s) {
1238
- var c = s.parent, d = s.rowIndex, h = s.style, f = s.isScrolling, u = s.isVisible, v = s.key, m = e.props.rowRenderer, _ = Object.getOwnPropertyDescriptor(h, "width");
1239
- return _ && _.writable && (h.width = "100%"), m({ index: d, style: h, isScrolling: f, isVisible: u, key: v, parent: c });
1240
- }), p(e, "_setRef", function(s) {
1241
- e.Grid = s;
1242
- }), p(e, "_onScroll", function(s) {
1243
- var c = s.clientHeight, d = s.scrollHeight, h = s.scrollTop;
1244
- (0, e.props.onScroll)({ clientHeight: c, scrollHeight: d, scrollTop: h });
1245
- }), p(e, "_onSectionRendered", function(s) {
1246
- var c = s.rowOverscanStartIndex, d = s.rowOverscanStopIndex, h = s.rowStartIndex, f = s.rowStopIndex;
1247
- (0, e.props.onRowsRendered)({ overscanStartIndex: c, overscanStopIndex: d, startIndex: h, stopIndex: f });
1248
- }), e;
1249
- }
1250
- return D(o, C.PureComponent), H(o, [{ key: "forceUpdateGrid", value: function() {
1251
- this.Grid && this.Grid.forceUpdate();
1252
- } }, { key: "getOffsetForRow", value: function(e) {
1253
- var t = e.alignment, n = e.index;
1254
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n, columnIndex: 0 }).scrollTop : 0;
1255
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1256
- var t = e.columnIndex, n = e.rowIndex;
1257
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1258
- } }, { key: "measureAllRows", value: function() {
1259
- this.Grid && this.Grid.measureAllCells();
1260
- } }, { key: "recomputeGridSize", value: function() {
1261
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1262
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1263
- } }, { key: "recomputeRowHeights", value: function() {
1264
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1265
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e, columnIndex: 0 });
1266
- } }, { key: "scrollToPosition", value: function() {
1267
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1268
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1269
- } }, { key: "scrollToRow", value: function() {
1270
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1271
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1272
- } }, { key: "render", value: function() {
1273
- var e = this.props, t = e.className, n = e.noRowsRenderer, r = e.scrollToIndex, l = e.width, i = N("ReactVirtualized__List", t);
1274
- return C.createElement($, V({}, this.props, { autoContainerWidth: !0, cellRenderer: this._cellRenderer, className: i, columnWidth: l, columnCount: 1, noContentRenderer: n, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, scrollToRow: r }));
1275
- } }]);
1276
- }();
1277
- p(Vo, "defaultProps", { autoHeight: !1, estimatedRowSize: 30, onScroll: function() {
1278
- }, noRowsRenderer: function() {
1279
- return null;
1280
- }, onRowsRendered: function() {
1281
- }, overscanIndicesGetter: Gt, overscanRowCount: 10, scrollToAlignment: "auto", scrollToIndex: -1, style: {} });
1282
- const me = function(o, e, t, n, r) {
1283
- return typeof t == "function" ? function(l, i, a, s, c) {
1284
- for (var d = a + 1; i <= a; ) {
1285
- var h = i + a >>> 1;
1286
- c(l[h], s) >= 0 ? (d = h, a = h - 1) : i = h + 1;
1287
- }
1288
- return d;
1289
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1290
- for (var c = a + 1; i <= a; ) {
1291
- var d = i + a >>> 1;
1292
- l[d] >= s ? (c = d, a = d - 1) : i = d + 1;
1293
- }
1294
- return c;
1295
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1296
- };
1297
- function Ge(o, e, t, n, r) {
1298
- this.mid = o, this.left = e, this.right = t, this.leftPoints = n, this.rightPoints = r, this.count = (e ? e.count : 0) + (t ? t.count : 0) + n.length;
1299
- }
1300
- var re = Ge.prototype;
1301
- function we(o, e) {
1302
- o.mid = e.mid, o.left = e.left, o.right = e.right, o.leftPoints = e.leftPoints, o.rightPoints = e.rightPoints, o.count = e.count;
1303
- }
1304
- function Wt(o, e) {
1305
- var t = ce(e);
1306
- o.mid = t.mid, o.left = t.left, o.right = t.right, o.leftPoints = t.leftPoints, o.rightPoints = t.rightPoints, o.count = t.count;
1307
- }
1308
- function ot(o, e) {
1309
- var t = o.intervals([]);
1310
- t.push(e), Wt(o, t);
1311
- }
1312
- function nt(o, e) {
1313
- var t = o.intervals([]), n = t.indexOf(e);
1314
- return n < 0 ? 0 : (t.splice(n, 1), Wt(o, t), 1);
1315
- }
1316
- function rt(o, e, t) {
1317
- for (var n = 0; n < o.length && o[n][0] <= e; ++n) {
1318
- var r = t(o[n]);
1319
- if (r) return r;
1320
- }
1321
- }
1322
- function it(o, e, t) {
1323
- for (var n = o.length - 1; n >= 0 && o[n][1] >= e; --n) {
1324
- var r = t(o[n]);
1325
- if (r) return r;
1326
- }
1327
- }
1328
- function lt(o, e) {
1329
- for (var t = 0; t < o.length; ++t) {
1330
- var n = e(o[t]);
1331
- if (n) return n;
1332
- }
1333
- }
1334
- function $o(o, e) {
1335
- return o - e;
1336
- }
1337
- function Te(o, e) {
1338
- return o[0] - e[0] || o[1] - e[1];
1339
- }
1340
- function Ie(o, e) {
1341
- return o[1] - e[1] || o[0] - e[0];
1342
- }
1343
- function ce(o) {
1344
- if (o.length === 0) return null;
1345
- for (var e = [], t = 0; t < o.length; ++t) e.push(o[t][0], o[t][1]);
1346
- e.sort($o);
1347
- var n = e[e.length >> 1], r = [], l = [], i = [];
1348
- for (t = 0; t < o.length; ++t) {
1349
- var a = o[t];
1350
- a[1] < n ? r.push(a) : n < a[0] ? l.push(a) : i.push(a);
1351
- }
1352
- var s = i, c = i.slice();
1353
- return s.sort(Te), c.sort(Ie), new Ge(n, ce(r), ce(l), s, c);
1354
- }
1355
- function Dt(o) {
1356
- this.root = o;
1357
- }
1358
- re.intervals = function(o) {
1359
- return o.push.apply(o, this.leftPoints), this.left && this.left.intervals(o), this.right && this.right.intervals(o), o;
1360
- }, re.insert = function(o) {
1361
- var e = this.count - this.leftPoints.length;
1362
- if (this.count += 1, o[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (e + 1) ? ot(this, o) : this.left.insert(o) : this.left = ce([o]);
1363
- else if (o[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (e + 1) ? ot(this, o) : this.right.insert(o) : this.right = ce([o]);
1364
- else {
1365
- var t = me(this.leftPoints, o, Te), n = me(this.rightPoints, o, Ie);
1366
- this.leftPoints.splice(t, 0, o), this.rightPoints.splice(n, 0, o);
1367
- }
1368
- }, re.remove = function(o) {
1369
- var e = this.count - this.leftPoints;
1370
- if (o[1] < this.mid) return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (e - 1) ? nt(this, o) : (l = this.left.remove(o)) === 2 ? (this.left = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1371
- if (o[0] > this.mid) return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (e - 1) ? nt(this, o) : (l = this.right.remove(o)) === 2 ? (this.right = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1372
- if (this.count === 1) return this.leftPoints[0] === o ? 2 : 0;
1373
- if (this.leftPoints.length === 1 && this.leftPoints[0] === o) {
1374
- if (this.left && this.right) {
1375
- for (var t = this, n = this.left; n.right; ) t = n, n = n.right;
1376
- if (t === this) n.right = this.right;
1377
- else {
1378
- var r = this.left, l = this.right;
1379
- t.count -= n.count, t.right = n.left, n.left = r, n.right = l;
1380
- }
1381
- we(this, n), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
1382
- } else this.left ? we(this, this.left) : we(this, this.right);
1383
- return 1;
1384
- }
1385
- for (r = me(this.leftPoints, o, Te); r < this.leftPoints.length && this.leftPoints[r][0] === o[0]; ++r) if (this.leftPoints[r] === o) {
1386
- for (this.count -= 1, this.leftPoints.splice(r, 1), l = me(this.rightPoints, o, Ie); l < this.rightPoints.length && this.rightPoints[l][1] === o[1]; ++l) if (this.rightPoints[l] === o) return this.rightPoints.splice(l, 1), 1;
1387
- }
1388
- return 0;
1389
- }, re.queryPoint = function(o, e) {
1390
- return o < this.mid ? this.left && (t = this.left.queryPoint(o, e)) ? t : rt(this.leftPoints, o, e) : o > this.mid ? this.right && (t = this.right.queryPoint(o, e)) ? t : it(this.rightPoints, o, e) : lt(this.leftPoints, e);
1391
- var t;
1392
- }, re.queryInterval = function(o, e, t) {
1393
- var n;
1394
- return o < this.mid && this.left && (n = this.left.queryInterval(o, e, t)) || e > this.mid && this.right && (n = this.right.queryInterval(o, e, t)) ? n : e < this.mid ? rt(this.leftPoints, e, t) : o > this.mid ? it(this.rightPoints, o, t) : lt(this.leftPoints, t);
1395
- };
1396
- var J = Dt.prototype;
1397
- J.insert = function(o) {
1398
- this.root ? this.root.insert(o) : this.root = new Ge(o[0], null, null, [o], [o]);
1399
- }, J.remove = function(o) {
1400
- if (this.root) {
1401
- var e = this.root.remove(o);
1402
- return e === 2 && (this.root = null), e !== 0;
1403
- }
1404
- return !1;
1405
- }, J.queryPoint = function(o, e) {
1406
- if (this.root) return this.root.queryPoint(o, e);
1407
- }, J.queryInterval = function(o, e, t) {
1408
- if (o <= e && this.root) return this.root.queryInterval(o, e, t);
1409
- }, Object.defineProperty(J, "count", { get: function() {
1410
- return this.root ? this.root.count : 0;
1411
- } }), Object.defineProperty(J, "intervals", { get: function() {
1412
- return this.root ? this.root.intervals([]) : [];
1413
- } });
1414
- var Ce = H(function o() {
1415
- E(this, o), p(this, "_columnSizeMap", {}), p(this, "_intervalTree", new Dt(null)), p(this, "_leftMap", {});
1416
- }, [{ key: "estimateTotalHeight", value: function(o, e, t) {
1417
- var n = o - this.count;
1418
- return this.tallestColumnSize + Math.ceil(n / e) * t;
1419
- } }, { key: "range", value: function(o, e, t) {
1420
- var n = this;
1421
- this._intervalTree.queryInterval(o, o + e, function(r) {
1422
- var l = function(s, c) {
1423
- return function(d) {
1424
- if (Array.isArray(d)) return d;
1425
- }(s) || function(d, h) {
1426
- var f = d == null ? null : typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
1427
- if (f != null) {
1428
- var u, v, m, _, S = [], y = !0, g = !1;
1429
- try {
1430
- if (m = (f = f.call(d)).next, h !== 0) for (; !(y = (u = m.call(f)).done) && (S.push(u.value), S.length !== h); y = !0) ;
1431
- } catch (w) {
1432
- g = !0, v = w;
1433
- } finally {
1434
- try {
1435
- if (!y && f.return != null && (_ = f.return(), Object(_) !== _)) return;
1436
- } finally {
1437
- if (g) throw v;
1438
- }
1439
- }
1440
- return S;
1441
- }
1442
- }(s, c) || At(s, c) || function() {
1443
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1444
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1445
- }();
1446
- }(r, 3), i = l[0];
1447
- l[1];
1448
- var a = l[2];
1449
- return t(a, n._leftMap[a], i);
1450
- });
1451
- } }, { key: "setPosition", value: function(o, e, t, n) {
1452
- this._intervalTree.insert([t, t + n, o]), this._leftMap[o] = e;
1453
- var r = this._columnSizeMap, l = r[e];
1454
- r[e] = l === void 0 ? t + n : Math.max(l, t + n);
1455
- } }, { key: "count", get: function() {
1456
- return this._intervalTree.count;
1457
- } }, { key: "shortestColumnSize", get: function() {
1458
- var o = this._columnSizeMap, e = 0;
1459
- for (var t in o) {
1460
- var n = o[t];
1461
- e = e === 0 ? n : Math.min(e, n);
1462
- }
1463
- return e;
1464
- } }, { key: "tallestColumnSize", get: function() {
1465
- var o = this._columnSizeMap, e = 0;
1466
- for (var t in o) {
1467
- var n = o[t];
1468
- e = Math.max(e, n);
1469
- }
1470
- return e;
1471
- } }]);
1472
- function st(o, e) {
1473
- var t = Object.keys(o);
1474
- if (Object.getOwnPropertySymbols) {
1475
- var n = Object.getOwnPropertySymbols(o);
1476
- e && (n = n.filter(function(r) {
1477
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1478
- })), t.push.apply(t, n);
1479
- }
1480
- return t;
1481
- }
1482
- function Ko(o) {
1483
- for (var e = 1; e < arguments.length; e++) {
1484
- var t = arguments[e] != null ? arguments[e] : {};
1485
- e % 2 ? st(Object(t), !0).forEach(function(n) {
1486
- p(o, n, t[n]);
1487
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : st(Object(t)).forEach(function(n) {
1488
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1489
- });
1490
- }
1491
- return o;
1492
- }
1493
- function jt() {
1494
- try {
1495
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1496
- }));
1497
- } catch {
1498
- }
1499
- return (jt = function() {
1500
- return !!o;
1501
- })();
1502
- }
1503
- var at = function() {
1504
- function o() {
1505
- var e, t, n, r;
1506
- E(this, o);
1507
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1508
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, jt() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollTop: 0 }), p(e, "_debounceResetIsScrollingId", void 0), p(e, "_invalidateOnUpdateStartIndex", null), p(e, "_invalidateOnUpdateStopIndex", null), p(e, "_positionCache", new Ce()), p(e, "_startIndex", null), p(e, "_startIndexMemoized", null), p(e, "_stopIndex", null), p(e, "_stopIndexMemoized", null), p(e, "_debounceResetIsScrollingCallback", function() {
1509
- e.setState({ isScrolling: !1 });
1510
- }), p(e, "_setScrollingContainerRef", function(s) {
1511
- e._scrollingContainer = s;
1512
- }), p(e, "_onScroll", function(s) {
1513
- var c = e.props.height, d = s.currentTarget.scrollTop, h = Math.min(Math.max(0, e._getEstimatedTotalHeight() - c), d);
1514
- d === h && (e._debounceResetIsScrolling(), e.state.scrollTop !== h && e.setState({ isScrolling: !0, scrollTop: h }));
1515
- }), e;
1516
- }
1517
- return D(o, C.PureComponent), H(o, [{ key: "clearCellPositions", value: function() {
1518
- this._positionCache = new Ce(), this.forceUpdate();
1519
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1520
- var t = e.rowIndex;
1521
- this._invalidateOnUpdateStartIndex === null ? (this._invalidateOnUpdateStartIndex = t, this._invalidateOnUpdateStopIndex = t) : (this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, t), this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, t));
1522
- } }, { key: "recomputeCellPositions", value: function() {
1523
- var e = this._positionCache.count - 1;
1524
- this._positionCache = new Ce(), this._populatePositionCache(0, e), this.forceUpdate();
1525
- } }, { key: "componentDidMount", value: function() {
1526
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
1527
- } }, { key: "componentDidUpdate", value: function(e, t) {
1528
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback(), this.props.scrollTop !== e.scrollTop && this._debounceResetIsScrolling();
1529
- } }, { key: "componentWillUnmount", value: function() {
1530
- this._debounceResetIsScrollingId && oe(this._debounceResetIsScrollingId);
1531
- } }, { key: "render", value: function() {
1532
- var e, t = this, n = this.props, r = n.autoHeight, l = n.cellCount, i = n.cellMeasurerCache, a = n.cellRenderer, s = n.className, c = n.height, d = n.id, h = n.keyMapper, f = n.overscanByPixels, u = n.role, v = n.style, m = n.tabIndex, _ = n.width, S = n.rowDirection, y = this.state, g = y.isScrolling, w = y.scrollTop, x = [], b = this._getEstimatedTotalHeight(), R = this._positionCache.shortestColumnSize, T = this._positionCache.count, I = 0;
1533
- if (this._positionCache.range(Math.max(0, w - f), c + 2 * f, function(z, L, G) {
1534
- e === void 0 ? (I = z, e = z) : (I = Math.min(I, z), e = Math.max(e, z)), x.push(a({ index: z, isScrolling: g, key: h(z), parent: t, style: p(p(p(p({ height: i.getHeight(z) }, S === "ltr" ? "left" : "right", L), "position", "absolute"), "top", G), "width", i.getWidth(z)) }));
1535
- }), R < w + c + f && T < l) for (var O = Math.min(l - T, Math.ceil((w + c + f - R) / i.defaultHeight * _ / i.defaultWidth)), P = T; P < T + O; P++) e = P, x.push(a({ index: P, isScrolling: g, key: h(P), parent: this, style: { width: i.getWidth(P) } }));
1536
- return this._startIndex = I, this._stopIndex = e, C.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Masonry", s), id: d, onScroll: this._onScroll, role: u, style: Ko({ boxSizing: "border-box", direction: "ltr", height: r ? "auto" : c, overflowX: "hidden", overflowY: b < c ? "hidden" : "auto", position: "relative", width: _, WebkitOverflowScrolling: "touch", willChange: "transform" }, v), tabIndex: m }, C.createElement("div", { className: "ReactVirtualized__Masonry__innerScrollContainer", style: { width: "100%", height: b, maxWidth: "100%", maxHeight: b, overflow: "hidden", pointerEvents: g ? "none" : "", position: "relative" } }, x));
1537
- } }, { key: "_checkInvalidateOnUpdate", value: function() {
1538
- if (typeof this._invalidateOnUpdateStartIndex == "number") {
1539
- var e = this._invalidateOnUpdateStartIndex, t = this._invalidateOnUpdateStopIndex;
1540
- this._invalidateOnUpdateStartIndex = null, this._invalidateOnUpdateStopIndex = null, this._populatePositionCache(e, t), this.forceUpdate();
1541
- }
1542
- } }, { key: "_debounceResetIsScrolling", value: function() {
1543
- var e = this.props.scrollingResetTimeInterval;
1544
- this._debounceResetIsScrollingId && oe(this._debounceResetIsScrollingId), this._debounceResetIsScrollingId = Le(this._debounceResetIsScrollingCallback, e);
1545
- } }, { key: "_getEstimatedTotalHeight", value: function() {
1546
- var e = this.props, t = e.cellCount, n = e.cellMeasurerCache, r = e.width, l = Math.max(1, Math.floor(r / n.defaultWidth));
1547
- return this._positionCache.estimateTotalHeight(t, l, n.defaultHeight);
1548
- } }, { key: "_invokeOnScrollCallback", value: function() {
1549
- var e = this.props, t = e.height, n = e.onScroll, r = this.state.scrollTop;
1550
- this._onScrollMemoized !== r && (n({ clientHeight: t, scrollHeight: this._getEstimatedTotalHeight(), scrollTop: r }), this._onScrollMemoized = r);
1551
- } }, { key: "_invokeOnCellsRenderedCallback", value: function() {
1552
- 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);
1553
- } }, { key: "_populatePositionCache", value: function(e, t) {
1554
- for (var n = this.props, r = n.cellMeasurerCache, l = n.cellPositioner, i = e; i <= t; i++) {
1555
- var a = l(i), s = a.left, c = a.top;
1556
- this._positionCache.setPosition(i, s, c, r.getHeight(i));
1557
- }
1558
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1559
- return e.scrollTop !== void 0 && t.scrollTop !== e.scrollTop ? { isScrolling: !0, scrollTop: e.scrollTop } : null;
1560
- } }]);
1561
- }();
1562
- function ct() {
1563
- }
1564
- p(at, "defaultProps", { autoHeight: !1, keyMapper: function(o) {
1565
- return o;
1566
- }, onCellsRendered: ct, onScroll: ct, overscanByPixels: 20, role: "grid", scrollingResetTimeInterval: 150, style: {}, tabIndex: 0, rowDirection: "ltr" }), ue(at);
1567
- var xe = H(function o() {
1568
- var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1569
- E(this, o), p(this, "_cellMeasurerCache", void 0), p(this, "_columnIndexOffset", void 0), p(this, "_rowIndexOffset", void 0), p(this, "columnWidth", function(s) {
1570
- var c = s.index;
1571
- e._cellMeasurerCache.columnWidth({ index: c + e._columnIndexOffset });
1572
- }), p(this, "rowHeight", function(s) {
1573
- var c = s.index;
1574
- e._cellMeasurerCache.rowHeight({ index: c + e._rowIndexOffset });
1575
- });
1576
- var n = t.cellMeasurerCache, r = t.columnIndexOffset, l = r === void 0 ? 0 : r, i = t.rowIndexOffset, a = i === void 0 ? 0 : i;
1577
- this._cellMeasurerCache = n, this._columnIndexOffset = l, this._rowIndexOffset = a;
1578
- }, [{ key: "clear", value: function(o, e) {
1579
- this._cellMeasurerCache.clear(o + this._rowIndexOffset, e + this._columnIndexOffset);
1580
- } }, { key: "clearAll", value: function() {
1581
- this._cellMeasurerCache.clearAll();
1582
- } }, { key: "defaultHeight", get: function() {
1583
- return this._cellMeasurerCache.defaultHeight;
1584
- } }, { key: "defaultWidth", get: function() {
1585
- return this._cellMeasurerCache.defaultWidth;
1586
- } }, { key: "hasFixedHeight", value: function() {
1587
- return this._cellMeasurerCache.hasFixedHeight();
1588
- } }, { key: "hasFixedWidth", value: function() {
1589
- return this._cellMeasurerCache.hasFixedWidth();
1590
- } }, { key: "getHeight", value: function(o) {
1591
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1592
- return this._cellMeasurerCache.getHeight(o + this._rowIndexOffset, e + this._columnIndexOffset);
1593
- } }, { key: "getWidth", value: function(o) {
1594
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1595
- return this._cellMeasurerCache.getWidth(o + this._rowIndexOffset, e + this._columnIndexOffset);
1596
- } }, { key: "has", value: function(o) {
1597
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1598
- return this._cellMeasurerCache.has(o + this._rowIndexOffset, e + this._columnIndexOffset);
1599
- } }, { key: "set", value: function(o, e, t, n) {
1600
- this._cellMeasurerCache.set(o + this._rowIndexOffset, e + this._columnIndexOffset, t, n);
1601
- } }]), qo = ["rowIndex"], Xo = ["columnIndex", "rowIndex"], Yo = ["columnIndex"], Jo = ["onScroll", "onSectionRendered", "onScrollbarPresenceChange", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow"];
1602
- function dt(o, e) {
1603
- var t = Object.keys(o);
1604
- if (Object.getOwnPropertySymbols) {
1605
- var n = Object.getOwnPropertySymbols(o);
1606
- e && (n = n.filter(function(r) {
1607
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1608
- })), t.push.apply(t, n);
1609
- }
1610
- return t;
1611
- }
1612
- function M(o) {
1613
- for (var e = 1; e < arguments.length; e++) {
1614
- var t = arguments[e] != null ? arguments[e] : {};
1615
- e % 2 ? dt(Object(t), !0).forEach(function(n) {
1616
- p(o, n, t[n]);
1617
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : dt(Object(t)).forEach(function(n) {
1618
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1619
- });
1620
- }
1621
- return o;
1622
- }
1623
- function Ft() {
1624
- try {
1625
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1626
- }));
1627
- } catch {
1628
- }
1629
- return (Ft = function() {
1630
- return !!o;
1631
- })();
1632
- }
1633
- var Re = function() {
1634
- function o(e, t) {
1635
- var n, r, l, i;
1636
- E(this, o), r = this, i = [e, t], l = k(l = o), p(n = W(r, Ft() ? Reflect.construct(l, i || [], k(r).constructor) : l.apply(r, i)), "state", { scrollLeft: 0, scrollTop: 0, scrollbarSize: 0, showHorizontalScrollbar: !1, showVerticalScrollbar: !1 }), p(n, "_deferredInvalidateColumnIndex", null), p(n, "_deferredInvalidateRowIndex", null), p(n, "_bottomLeftGridRef", function(d) {
1637
- n._bottomLeftGrid = d;
1638
- }), p(n, "_bottomRightGridRef", function(d) {
1639
- n._bottomRightGrid = d;
1640
- }), p(n, "_cellRendererBottomLeftGrid", function(d) {
1641
- var h = d.rowIndex, f = ie(d, qo), u = n.props, v = u.cellRenderer, m = u.fixedRowCount;
1642
- return h === u.rowCount - m ? C.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { height: 20 }) }) : v(M(M({}, f), {}, { parent: n, rowIndex: h + m }));
1643
- }), p(n, "_cellRendererBottomRightGrid", function(d) {
1644
- var h = d.columnIndex, f = d.rowIndex, u = ie(d, Xo), v = n.props, m = v.cellRenderer, _ = v.fixedColumnCount, S = v.fixedRowCount;
1645
- return m(M(M({}, u), {}, { columnIndex: h + _, parent: n, rowIndex: f + S }));
1646
- }), p(n, "_cellRendererTopRightGrid", function(d) {
1647
- var h = d.columnIndex, f = ie(d, Yo), u = n.props, v = u.cellRenderer, m = u.columnCount, _ = u.fixedColumnCount;
1648
- return h === m - _ ? C.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { width: 20 }) }) : v(M(M({}, f), {}, { columnIndex: h + _, parent: n }));
1649
- }), p(n, "_columnWidthRightGrid", function(d) {
1650
- var h = d.index, f = n.props, u = f.columnCount, v = f.fixedColumnCount, m = f.columnWidth, _ = n.state, S = _.scrollbarSize;
1651
- return _.showHorizontalScrollbar && h === u - v ? S : typeof m == "function" ? m({ index: h + v }) : m;
1652
- }), p(n, "_onScroll", function(d) {
1653
- var h = d.scrollLeft, f = d.scrollTop;
1654
- n.setState({ scrollLeft: h, scrollTop: f });
1655
- var u = n.props.onScroll;
1656
- u && u(d);
1657
- }), p(n, "_onScrollbarPresenceChange", function(d) {
1658
- var h = d.horizontal, f = d.size, u = d.vertical, v = n.state, m = v.showHorizontalScrollbar, _ = v.showVerticalScrollbar;
1659
- if (h !== m || u !== _) {
1660
- n.setState({ scrollbarSize: f, showHorizontalScrollbar: h, showVerticalScrollbar: u });
1661
- var S = n.props.onScrollbarPresenceChange;
1662
- typeof S == "function" && S({ horizontal: h, size: f, vertical: u });
1663
- }
1664
- }), p(n, "_onScrollLeft", function(d) {
1665
- var h = d.scrollLeft;
1666
- n._onScroll({ scrollLeft: h, scrollTop: n.state.scrollTop });
1667
- }), p(n, "_onScrollTop", function(d) {
1668
- var h = d.scrollTop;
1669
- n._onScroll({ scrollTop: h, scrollLeft: n.state.scrollLeft });
1670
- }), p(n, "_rowHeightBottomGrid", function(d) {
1671
- var h = d.index, f = n.props, u = f.fixedRowCount, v = f.rowCount, m = f.rowHeight, _ = n.state, S = _.scrollbarSize;
1672
- return _.showVerticalScrollbar && h === v - u ? S : typeof m == "function" ? m({ index: h + u }) : m;
1673
- }), p(n, "_topLeftGridRef", function(d) {
1674
- n._topLeftGrid = d;
1675
- }), p(n, "_topRightGridRef", function(d) {
1676
- n._topRightGrid = d;
1677
- });
1678
- var a = e.deferredMeasurementCache, s = e.fixedColumnCount, c = e.fixedRowCount;
1679
- return n._maybeCalculateCachedStyles(!0), a && (n._deferredMeasurementCacheBottomLeftGrid = c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: 0, rowIndexOffset: c }) : a, n._deferredMeasurementCacheBottomRightGrid = s > 0 || c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: c }) : a, n._deferredMeasurementCacheTopRightGrid = s > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: 0 }) : a), n;
1680
- }
1681
- return D(o, C.PureComponent), H(o, [{ key: "forceUpdateGrids", value: function() {
1682
- this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate(), this._bottomRightGrid && this._bottomRightGrid.forceUpdate(), this._topLeftGrid && this._topLeftGrid.forceUpdate(), this._topRightGrid && this._topRightGrid.forceUpdate();
1683
- } }, { key: "invalidateCellSizeAfterRender", value: function() {
1684
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1685
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, n) : n, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, l) : l;
1686
- } }, { key: "measureAllCells", value: function() {
1687
- this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells(), this._bottomRightGrid && this._bottomRightGrid.measureAllCells(), this._topLeftGrid && this._topLeftGrid.measureAllCells(), this._topRightGrid && this._topRightGrid.measureAllCells();
1688
- } }, { key: "recomputeGridSize", value: function() {
1689
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.fixedColumnCount, s = i.fixedRowCount, c = Math.max(0, n - a), d = Math.max(0, l - s);
1690
- this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: d }), this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: d }), this._topLeftGrid && this._topLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: l }), this._topRightGrid && this._topRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: l }), this._leftGridWidth = null, this._topGridHeight = null, this._maybeCalculateCachedStyles(!0);
1691
- } }, { key: "componentDidMount", value: function() {
1692
- var e = this.props, t = e.scrollLeft, n = e.scrollTop;
1693
- if (t > 0 || n > 0) {
1694
- var r = {};
1695
- t > 0 && (r.scrollLeft = t), n > 0 && (r.scrollTop = n), this.setState(r);
1696
- }
1697
- this._handleInvalidatedGridSize();
1698
- } }, { key: "componentDidUpdate", value: function() {
1699
- this._handleInvalidatedGridSize();
1700
- } }, { key: "render", value: function() {
1701
- var e = this.props, t = e.onScroll, n = e.onSectionRendered;
1702
- e.onScrollbarPresenceChange, e.scrollLeft;
1703
- var r = e.scrollToColumn;
1704
- e.scrollTop;
1705
- var l = e.scrollToRow, i = ie(e, Jo);
1706
- if (this._prepareForRender(), this.props.width === 0 || this.props.height === 0) return null;
1707
- var a = this.state, s = a.scrollLeft, c = a.scrollTop;
1708
- return C.createElement("div", { style: this._containerOuterStyle }, C.createElement("div", { style: this._containerTopStyle }, this._renderTopLeftGrid(i), this._renderTopRightGrid(M(M({}, i), {}, { onScroll: t, scrollLeft: s }))), C.createElement("div", { style: this._containerBottomStyle }, this._renderBottomLeftGrid(M(M({}, i), {}, { onScroll: t, scrollTop: c })), this._renderBottomRightGrid(M(M({}, i), {}, { onScroll: t, onSectionRendered: n, scrollLeft: s, scrollToColumn: r, scrollToRow: l, scrollTop: c }))));
1709
- } }, { key: "_getBottomGridHeight", value: function(e) {
1710
- return e.height - this._getTopGridHeight(e);
1711
- } }, { key: "_getLeftGridWidth", value: function(e) {
1712
- var t = e.fixedColumnCount, n = e.columnWidth;
1713
- if (this._leftGridWidth == null) if (typeof n == "function") {
1714
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1715
- this._leftGridWidth = r;
1716
- } else this._leftGridWidth = n * t;
1717
- return this._leftGridWidth;
1718
- } }, { key: "_getRightGridWidth", value: function(e) {
1719
- return e.width - this._getLeftGridWidth(e);
1720
- } }, { key: "_getTopGridHeight", value: function(e) {
1721
- var t = e.fixedRowCount, n = e.rowHeight;
1722
- if (this._topGridHeight == null) if (typeof n == "function") {
1723
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1724
- this._topGridHeight = r;
1725
- } else this._topGridHeight = n * t;
1726
- return this._topGridHeight;
1727
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1728
- if (typeof this._deferredInvalidateColumnIndex == "number") {
1729
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1730
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t }), this.forceUpdate();
1731
- }
1732
- } }, { key: "_maybeCalculateCachedStyles", value: function(e) {
1733
- var t = this.props, n = t.columnWidth, r = t.enableFixedColumnScroll, l = t.enableFixedRowScroll, i = t.height, a = t.fixedColumnCount, s = t.fixedRowCount, c = t.rowHeight, d = t.style, h = t.styleBottomLeftGrid, f = t.styleBottomRightGrid, u = t.styleTopLeftGrid, v = t.styleTopRightGrid, m = t.width, _ = e || i !== this._lastRenderedHeight || m !== this._lastRenderedWidth, S = e || n !== this._lastRenderedColumnWidth || a !== this._lastRenderedFixedColumnCount, y = e || s !== this._lastRenderedFixedRowCount || c !== this._lastRenderedRowHeight;
1734
- (e || _ || d !== this._lastRenderedStyle) && (this._containerOuterStyle = M({ height: i, overflow: "visible", width: m }, d)), (e || _ || y) && (this._containerTopStyle = { height: this._getTopGridHeight(this.props), position: "relative", width: m }, this._containerBottomStyle = { height: i - this._getTopGridHeight(this.props), overflow: "visible", position: "relative", width: m }), (e || h !== this._lastRenderedStyleBottomLeftGrid) && (this._bottomLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: r ? "auto" : "hidden", position: "absolute" }, h)), (e || S || f !== this._lastRenderedStyleBottomRightGrid) && (this._bottomRightGridStyle = M({ left: this._getLeftGridWidth(this.props), position: "absolute" }, f)), (e || u !== this._lastRenderedStyleTopLeftGrid) && (this._topLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: "hidden", position: "absolute", top: 0 }, u)), (e || S || v !== this._lastRenderedStyleTopRightGrid) && (this._topRightGridStyle = M({ left: this._getLeftGridWidth(this.props), overflowX: l ? "auto" : "hidden", overflowY: "hidden", position: "absolute", top: 0 }, v)), this._lastRenderedColumnWidth = n, this._lastRenderedFixedColumnCount = a, this._lastRenderedFixedRowCount = s, this._lastRenderedHeight = i, this._lastRenderedRowHeight = c, this._lastRenderedStyle = d, this._lastRenderedStyleBottomLeftGrid = h, this._lastRenderedStyleBottomRightGrid = f, this._lastRenderedStyleTopLeftGrid = u, this._lastRenderedStyleTopRightGrid = v, this._lastRenderedWidth = m;
1735
- } }, { key: "_prepareForRender", value: function() {
1736
- 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;
1737
- } }, { key: "_renderBottomLeftGrid", value: function(e) {
1738
- var t = e.enableFixedColumnScroll, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.hideBottomLeftGridScrollbar, a = this.state.showVerticalScrollbar;
1739
- if (!n) return null;
1740
- var s = a ? 1 : 0, c = this._getBottomGridHeight(e), d = this._getLeftGridWidth(e), h = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, f = i ? d + h : d, u = C.createElement($, V({}, e, { cellRenderer: this._cellRendererBottomLeftGrid, className: this.props.classNameBottomLeftGrid, columnCount: n, deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid, height: c, onScroll: t ? this._onScrollTop : void 0, ref: this._bottomLeftGridRef, rowCount: Math.max(0, l - r) + s, rowHeight: this._rowHeightBottomGrid, style: this._bottomLeftGridStyle, tabIndex: null, width: f }));
1741
- return i ? C.createElement("div", { className: "BottomLeftGrid_ScrollWrapper", style: M(M({}, this._bottomLeftGridStyle), {}, { height: c, width: d, overflowY: "hidden" }) }, u) : u;
1742
- } }, { key: "_renderBottomRightGrid", value: function(e) {
1743
- var t = e.columnCount, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.scrollToColumn, a = e.scrollToRow;
1744
- return C.createElement($, V({}, e, { cellRenderer: this._cellRendererBottomRightGrid, className: this.props.classNameBottomRightGrid, columnCount: Math.max(0, t - n), columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid, height: this._getBottomGridHeight(e), onScroll: this._onScroll, onScrollbarPresenceChange: this._onScrollbarPresenceChange, ref: this._bottomRightGridRef, rowCount: Math.max(0, l - r), rowHeight: this._rowHeightBottomGrid, scrollToColumn: i - n, scrollToRow: a - r, style: this._bottomRightGridStyle, width: this._getRightGridWidth(e) }));
1745
- } }, { key: "_renderTopLeftGrid", value: function(e) {
1746
- var t = e.fixedColumnCount, n = e.fixedRowCount;
1747
- return t && n ? C.createElement($, V({}, e, { className: this.props.classNameTopLeftGrid, columnCount: t, height: this._getTopGridHeight(e), ref: this._topLeftGridRef, rowCount: n, style: this._topLeftGridStyle, tabIndex: null, width: this._getLeftGridWidth(e) })) : null;
1748
- } }, { key: "_renderTopRightGrid", value: function(e) {
1749
- var t = e.columnCount, n = e.enableFixedRowScroll, r = e.fixedColumnCount, l = e.fixedRowCount, i = e.scrollLeft, a = e.hideTopRightGridScrollbar, s = this.state, c = s.showHorizontalScrollbar, d = s.scrollbarSize;
1750
- if (!l) return null;
1751
- var h = c ? 1 : 0, f = this._getTopGridHeight(e), u = this._getRightGridWidth(e), v = c ? d : 0, m = f, _ = this._topRightGridStyle;
1752
- a && (m = f + v, _ = M(M({}, this._topRightGridStyle), {}, { left: 0 }));
1753
- var S = C.createElement($, V({}, e, { cellRenderer: this._cellRendererTopRightGrid, className: this.props.classNameTopRightGrid, columnCount: Math.max(0, t - r) + h, columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid, height: m, onScroll: n ? this._onScrollLeft : void 0, ref: this._topRightGridRef, rowCount: l, scrollLeft: i, style: _, tabIndex: null, width: u }));
1754
- return a ? C.createElement("div", { className: "TopRightGrid_ScrollWrapper", style: M(M({}, this._topRightGridStyle), {}, { height: f, width: u, overflowX: "hidden" }) }, S) : S;
1755
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1756
- return e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null && e.scrollLeft >= 0 ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null && e.scrollTop >= 0 ? e.scrollTop : t.scrollTop } : null;
1757
- } }]);
1758
- }();
1759
- function Nt() {
1760
- try {
1761
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1762
- }));
1763
- } catch {
1764
- }
1765
- return (Nt = function() {
1766
- return !!o;
1767
- })();
1768
- }
1769
- p(Re, "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 }), Re.propTypes = {}, ue(Re), function() {
1770
- function o(e, t) {
1771
- var n, r, l, i;
1772
- return E(this, o), r = this, i = [e, t], l = k(l = o), (n = W(r, Nt() ? Reflect.construct(l, i || [], k(r).constructor) : l.apply(r, i))).state = { clientHeight: 0, clientWidth: 0, scrollHeight: 0, scrollLeft: 0, scrollTop: 0, scrollWidth: 0 }, n._onScroll = n._onScroll.bind(n), n;
1773
- }
1774
- return D(o, C.PureComponent), H(o, [{ key: "render", value: function() {
1775
- var e = this.props.children, t = this.state, n = t.clientHeight, r = t.clientWidth, l = t.scrollHeight, i = t.scrollLeft, a = t.scrollTop, s = t.scrollWidth;
1776
- return e({ clientHeight: n, clientWidth: r, onScroll: this._onScroll, scrollHeight: l, scrollLeft: i, scrollTop: a, scrollWidth: s });
1777
- } }, { key: "_onScroll", value: function(e) {
1778
- var t = e.clientHeight, n = e.clientWidth, r = e.scrollHeight, l = e.scrollLeft, i = e.scrollTop, a = e.scrollWidth;
1779
- this.setState({ clientHeight: t, clientWidth: n, scrollHeight: r, scrollLeft: l, scrollTop: i, scrollWidth: a });
1780
- } }]);
1781
- }().propTypes = {};
1782
- var de = "ASC", Pe = "DESC";
1783
- function Bt(o) {
1784
- var e = o.sortDirection, t = N("ReactVirtualized__Table__sortableHeaderIcon", { "ReactVirtualized__Table__sortableHeaderIcon--ASC": e === de, "ReactVirtualized__Table__sortableHeaderIcon--DESC": e === Pe });
1785
- return C.createElement("svg", { className: t, width: 18, height: 18, viewBox: "0 0 24 24" }, e === de ? C.createElement("path", { d: "M7 14l5-5 5 5z" }) : C.createElement("path", { d: "M7 10l5 5 5-5z" }), C.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }));
1786
- }
1787
- function Ut() {
1788
- try {
1789
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1790
- }));
1791
- } catch {
1792
- }
1793
- return (Ut = function() {
1794
- return !!o;
1795
- })();
1796
- }
1797
- Bt.propTypes = {};
1798
- var _e = function() {
1799
- function o() {
1800
- return E(this, o), e = this, n = arguments, t = k(t = o), W(e, Ut() ? Reflect.construct(t, n || [], k(e).constructor) : t.apply(e, n));
1801
- var e, t, n;
1802
- }
1803
- return D(o, C.Component), H(o);
1804
- }();
1805
- function ut(o, e) {
1806
- var t = Object.keys(o);
1807
- if (Object.getOwnPropertySymbols) {
1808
- var n = Object.getOwnPropertySymbols(o);
1809
- e && (n = n.filter(function(r) {
1810
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1811
- })), t.push.apply(t, n);
1812
- }
1813
- return t;
1814
- }
1815
- function U(o) {
1816
- for (var e = 1; e < arguments.length; e++) {
1817
- var t = arguments[e] != null ? arguments[e] : {};
1818
- e % 2 ? ut(Object(t), !0).forEach(function(n) {
1819
- p(o, n, t[n]);
1820
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ut(Object(t)).forEach(function(n) {
1821
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1822
- });
1823
- }
1824
- return o;
1825
- }
1826
- function Vt() {
1827
- try {
1828
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1829
- }));
1830
- } catch {
1831
- }
1832
- return (Vt = function() {
1833
- return !!o;
1834
- })();
1835
- }
1836
- p(_e, "defaultProps", { cellDataGetter: function(o) {
1837
- var e = o.dataKey, t = o.rowData;
1838
- return typeof t.get == "function" ? t.get(e) : t[e];
1839
- }, cellRenderer: function(o) {
1840
- var e = o.cellData;
1841
- return e == null ? "" : String(e);
1842
- }, defaultSortDirection: de, flexGrow: 0, flexShrink: 1, headerRenderer: function(o) {
1843
- var e = o.dataKey, t = o.label, n = o.sortBy, r = o.sortDirection, l = n === e, i = [C.createElement("span", { className: "ReactVirtualized__Table__headerTruncatedText", key: "label", title: typeof t == "string" ? t : null }, t)];
1844
- return l && i.push(C.createElement(Bt, { key: "SortIndicator", sortDirection: r })), i;
1845
- }, style: {} }), _e.propTypes = {};
1846
- var Oe = function() {
1847
- function o(e) {
1848
- var t, n, r, l;
1849
- return E(this, o), n = this, l = [e], r = k(r = o), (t = W(n, Vt() ? Reflect.construct(r, l || [], k(n).constructor) : r.apply(n, l))).state = { scrollbarWidth: 0 }, t._createColumn = t._createColumn.bind(t), t._createRow = t._createRow.bind(t), t._onScroll = t._onScroll.bind(t), t._onSectionRendered = t._onSectionRendered.bind(t), t._setRef = t._setRef.bind(t), t._setGridElementRef = t._setGridElementRef.bind(t), t;
1850
- }
1851
- return D(o, C.PureComponent), H(o, [{ key: "forceUpdateGrid", value: function() {
1852
- this.Grid && this.Grid.forceUpdate();
1853
- } }, { key: "getOffsetForRow", value: function(e) {
1854
- var t = e.alignment, n = e.index;
1855
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n }).scrollTop : 0;
1856
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1857
- var t = e.columnIndex, n = e.rowIndex;
1858
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1859
- } }, { key: "measureAllRows", value: function() {
1860
- this.Grid && this.Grid.measureAllCells();
1861
- } }, { key: "recomputeGridSize", value: function() {
1862
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1863
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1864
- } }, { key: "recomputeRowHeights", value: function() {
1865
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1866
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e });
1867
- } }, { key: "scrollToPosition", value: function() {
1868
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1869
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1870
- } }, { key: "scrollToRow", value: function() {
1871
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1872
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1873
- } }, { key: "getScrollbarWidth", value: function() {
1874
- if (this.GridElement) {
1875
- var e = this.GridElement, t = e.clientWidth || 0;
1876
- return (e.offsetWidth || 0) - t;
1877
- }
1878
- return 0;
1879
- } }, { key: "componentDidMount", value: function() {
1880
- this._setScrollbarWidth();
1881
- } }, { key: "componentDidUpdate", value: function() {
1882
- this._setScrollbarWidth();
1883
- } }, { key: "render", value: function() {
1884
- var e = this, t = this.props, n = t.children, r = t.className, l = t.disableHeader, i = t.gridClassName, a = t.gridStyle, s = t.headerHeight, c = t.headerRowRenderer, d = t.height, h = t.id, f = t.noRowsRenderer, u = t.rowClassName, v = t.rowStyle, m = t.scrollToIndex, _ = t.style, S = t.width, y = this.state.scrollbarWidth, g = l ? d : d - s, w = typeof u == "function" ? u({ index: -1 }) : u, x = typeof v == "function" ? v({ index: -1 }) : v;
1885
- return this._cachedColumnStyles = [], C.Children.toArray(n).forEach(function(b, R) {
1886
- var T = e._getFlexStyleForColumn(b, b.props.style || _e.defaultProps.style);
1887
- e._cachedColumnStyles[R] = U({ overflow: "hidden" }, T);
1888
- }), C.createElement("div", { "aria-label": this.props["aria-label"], "aria-labelledby": this.props["aria-labelledby"], "aria-colcount": C.Children.toArray(n).length, "aria-rowcount": this.props.rowCount, className: N("ReactVirtualized__Table", r), id: h, role: "grid", style: _ }, !l && c({ className: N("ReactVirtualized__Table__headerRow", w), columns: this._getHeaderColumns(), style: U({ height: s, overflow: "hidden", paddingRight: y, width: S }, x) }), C.createElement($, V({}, this.props, { elementRef: this._setGridElementRef, "aria-readonly": null, autoContainerWidth: !0, className: N("ReactVirtualized__Table__Grid", i), cellRenderer: this._createRow, columnWidth: S, columnCount: 1, height: g, id: void 0, noContentRenderer: f, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, role: "rowgroup", scrollbarWidth: y, scrollToRow: m, style: U(U({}, a), {}, { overflowX: "hidden" }) })));
1889
- } }, { key: "_createColumn", value: function(e) {
1890
- var t = e.column, n = e.columnIndex, r = e.isScrolling, l = e.parent, i = e.rowData, a = e.rowIndex, s = this.props.onColumnClick, c = t.props, d = c.cellDataGetter, h = c.cellRenderer, f = c.className, u = c.columnData, v = c.dataKey, m = c.id, _ = h({ cellData: d({ columnData: u, dataKey: v, rowData: i }), columnData: u, columnIndex: n, dataKey: v, isScrolling: r, parent: l, rowData: i, rowIndex: a }), S = this._cachedColumnStyles[n], y = typeof _ == "string" ? _ : null;
1891
- return C.createElement("div", { "aria-colindex": n + 1, "aria-describedby": m, className: N("ReactVirtualized__Table__rowColumn", f), key: "Row" + a + "-Col" + n, onClick: function(g) {
1892
- s && s({ columnData: u, dataKey: v, event: g });
1893
- }, role: "gridcell", style: S, title: y }, _);
1894
- } }, { key: "_createHeader", value: function(e) {
1895
- var t, n, r, l, i, a = e.column, s = e.index, c = this.props, d = c.headerClassName, h = c.headerStyle, f = c.onHeaderClick, u = c.sort, v = c.sortBy, m = c.sortDirection, _ = a.props, S = _.columnData, y = _.dataKey, g = _.defaultSortDirection, w = _.disableSort, x = _.headerRenderer, b = _.id, R = _.label, T = !w && u, I = N("ReactVirtualized__Table__headerColumn", d, a.props.headerClassName, { ReactVirtualized__Table__sortableHeaderColumn: T }), O = this._getFlexStyleForColumn(a, U(U({}, h), a.props.headerStyle)), P = x({ columnData: S, dataKey: y, disableSort: w, label: R, sortBy: v, sortDirection: m });
1896
- if (T || f) {
1897
- var z = v !== y ? g : m === Pe ? de : Pe, L = function(G) {
1898
- T && u({ defaultSortDirection: g, event: G, sortBy: y, sortDirection: z }), f && f({ columnData: S, dataKey: y, event: G });
1899
- };
1900
- i = a.props["aria-label"] || R || y, l = "none", r = 0, t = L, n = function(G) {
1901
- G.key !== "Enter" && G.key !== " " || L(G);
1902
- };
1903
- }
1904
- return v === y && (l = m === de ? "ascending" : "descending"), C.createElement("div", { "aria-label": i, "aria-sort": l, className: I, id: b, key: "Header-Col" + s, onClick: t, onKeyDown: n, role: "columnheader", style: O, tabIndex: r }, P);
1905
- } }, { key: "_createRow", value: function(e) {
1906
- var t = this, n = e.rowIndex, r = e.isScrolling, l = e.key, i = e.parent, a = e.style, s = this.props, c = s.children, d = s.onRowClick, h = s.onRowDoubleClick, f = s.onRowRightClick, u = s.onRowMouseOver, v = s.onRowMouseOut, m = s.rowClassName, _ = s.rowGetter, S = s.rowRenderer, y = s.rowStyle, g = this.state.scrollbarWidth, w = typeof m == "function" ? m({ index: n }) : m, x = typeof y == "function" ? y({ index: n }) : y, b = _({ index: n }), R = C.Children.toArray(c).map(function(O, P) {
1907
- return t._createColumn({ column: O, columnIndex: P, isScrolling: r, parent: i, rowData: b, rowIndex: n, scrollbarWidth: g });
1908
- }), T = N("ReactVirtualized__Table__row", w), I = U(U({}, a), {}, { height: this._getRowHeight(n), overflow: "hidden", paddingRight: g }, x);
1909
- return S({ className: T, columns: R, index: n, isScrolling: r, key: l, onRowClick: d, onRowDoubleClick: h, onRowRightClick: f, onRowMouseOver: u, onRowMouseOut: v, rowData: b, style: I });
1910
- } }, { key: "_getFlexStyleForColumn", value: function(e) {
1911
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = "".concat(e.props.flexGrow, " ").concat(e.props.flexShrink, " ").concat(e.props.width, "px"), r = U(U({}, t), {}, { flex: n, msFlex: n, WebkitFlex: n });
1912
- return e.props.maxWidth && (r.maxWidth = e.props.maxWidth), e.props.minWidth && (r.minWidth = e.props.minWidth), r;
1913
- } }, { key: "_getHeaderColumns", value: function() {
1914
- var e = this, t = this.props, n = t.children;
1915
- return (t.disableHeader ? [] : C.Children.toArray(n)).map(function(r, l) {
1916
- return e._createHeader({ column: r, index: l });
1917
- });
1918
- } }, { key: "_getRowHeight", value: function(e) {
1919
- var t = this.props.rowHeight;
1920
- return typeof t == "function" ? t({ index: e }) : t;
1921
- } }, { key: "_onScroll", value: function(e) {
1922
- var t = e.clientHeight, n = e.scrollHeight, r = e.scrollTop;
1923
- (0, this.props.onScroll)({ clientHeight: t, scrollHeight: n, scrollTop: r });
1924
- } }, { key: "_onSectionRendered", value: function(e) {
1925
- var t = e.rowOverscanStartIndex, n = e.rowOverscanStopIndex, r = e.rowStartIndex, l = e.rowStopIndex;
1926
- (0, this.props.onRowsRendered)({ overscanStartIndex: t, overscanStopIndex: n, startIndex: r, stopIndex: l });
1927
- } }, { key: "_setRef", value: function(e) {
1928
- this.Grid = e;
1929
- } }, { key: "_setGridElementRef", value: function(e) {
1930
- this.GridElement = e;
1931
- } }, { key: "_setScrollbarWidth", value: function() {
1932
- var e = this.getScrollbarWidth();
1933
- this.setState({ scrollbarWidth: e });
1934
- } }]);
1935
- }();
1936
- p(Oe, "defaultProps", { disableHeader: !1, estimatedRowSize: 30, headerHeight: 0, headerStyle: {}, noRowsRenderer: function() {
1937
- return null;
1938
- }, onRowsRendered: function() {
1939
- return null;
1940
- }, onScroll: function() {
1941
- return null;
1942
- }, overscanIndicesGetter: Gt, overscanRowCount: 10, rowRenderer: function(o) {
1943
- var e = o.className, t = o.columns, n = o.index, r = o.key, l = o.onRowClick, i = o.onRowDoubleClick, a = o.onRowMouseOut, s = o.onRowMouseOver, c = o.onRowRightClick, d = o.rowData, h = o.style, f = { "aria-rowindex": n + 1 };
1944
- return (l || i || a || s || c) && (f["aria-label"] = "row", f.tabIndex = 0, l && (f.onClick = function(u) {
1945
- return l({ event: u, index: n, rowData: d });
1946
- }), i && (f.onDoubleClick = function(u) {
1947
- return i({ event: u, index: n, rowData: d });
1948
- }), a && (f.onMouseOut = function(u) {
1949
- return a({ event: u, index: n, rowData: d });
1950
- }), s && (f.onMouseOver = function(u) {
1951
- return s({ event: u, index: n, rowData: d });
1952
- }), c && (f.onContextMenu = function(u) {
1953
- return c({ event: u, index: n, rowData: d });
1954
- })), C.createElement("div", V({}, f, { className: e, key: r, role: "row", style: h }), t);
1955
- }, headerRowRenderer: function(o) {
1956
- var e = o.className, t = o.columns, n = o.style;
1957
- return C.createElement("div", { className: e, role: "row", style: n }, t);
1958
- }, rowStyle: {}, scrollToAlignment: "auto", scrollToIndex: -1, style: {} }), Oe.propTypes = {};
1959
- var Y = [], ae = null, X = null;
1960
- function $t() {
1961
- X && (X = null, document.body && ae != null && (document.body.style.pointerEvents = ae), ae = null);
1962
- }
1963
- function Zo() {
1964
- $t(), Y.forEach(function(o) {
1965
- return o.__resetIsScrolling();
1966
- });
1967
- }
1968
- function Kt(o) {
1969
- o.currentTarget === window && ae == null && document.body && (ae = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), function() {
1970
- X && oe(X);
1971
- var e = 0;
1972
- Y.forEach(function(t) {
1973
- e = Math.max(e, t.props.scrollingResetTimeInterval);
1974
- }), X = Le(Zo, e);
1975
- }(), Y.forEach(function(e) {
1976
- e.props.scrollElement === o.currentTarget && e.__handleWindowScrollEvent();
1977
- });
1978
- }
1979
- function ht(o, e) {
1980
- Y.some(function(t) {
1981
- return t.props.scrollElement === e;
1982
- }) || e.addEventListener("scroll", Kt), Y.push(o);
1983
- }
1984
- function ft(o, e) {
1985
- (Y = Y.filter(function(t) {
1986
- return t !== o;
1987
- })).length || (e.removeEventListener("scroll", Kt), X && (oe(X), $t()));
1988
- }
1989
- var Ae = function(o) {
1990
- return o === window;
1991
- }, le = function(o) {
1992
- return o.getBoundingClientRect();
1993
- };
1994
- function pt(o, e) {
1995
- if (o) {
1996
- if (Ae(o)) {
1997
- var t = window, n = t.innerHeight, r = t.innerWidth;
1998
- return { height: typeof n == "number" ? n : 0, width: typeof r == "number" ? r : 0 };
1999
- }
2000
- return le(o);
2001
- }
2002
- return { height: e.serverHeight, width: e.serverWidth };
2003
- }
2004
- function mt(o) {
2005
- return Ae(o) && document.documentElement ? { top: "scrollY" in window ? window.scrollY : document.documentElement.scrollTop, left: "scrollX" in window ? window.scrollX : document.documentElement.scrollLeft } : { top: o.scrollTop, left: o.scrollLeft };
2006
- }
2007
- function gt(o, e) {
2008
- var t = Object.keys(o);
2009
- if (Object.getOwnPropertySymbols) {
2010
- var n = Object.getOwnPropertySymbols(o);
2011
- e && (n = n.filter(function(r) {
2012
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
2013
- })), t.push.apply(t, n);
2014
- }
2015
- return t;
2016
- }
2017
- function vt(o) {
2018
- for (var e = 1; e < arguments.length; e++) {
2019
- var t = arguments[e] != null ? arguments[e] : {};
2020
- e % 2 ? gt(Object(t), !0).forEach(function(n) {
2021
- p(o, n, t[n]);
2022
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : gt(Object(t)).forEach(function(n) {
2023
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
2024
- });
2025
- }
2026
- return o;
2027
- }
2028
- function qt() {
2029
- try {
2030
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2031
- }));
2032
- } catch {
2033
- }
2034
- return (qt = function() {
2035
- return !!o;
2036
- })();
2037
- }
2038
- var Xt = function() {
2039
- return typeof window < "u" ? window : void 0;
2040
- }, Qo = function() {
2041
- function o() {
2042
- var e, t, n, r;
2043
- E(this, o);
2044
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
2045
- return t = this, n = o, r = [].concat(i), n = k(n), p(e = W(t, qt() ? Reflect.construct(n, r || [], k(t).constructor) : n.apply(t, r)), "_window", Xt()), p(e, "_isMounted", !1), p(e, "_positionFromTop", 0), p(e, "_positionFromLeft", 0), p(e, "_detectElementResize", void 0), p(e, "_child", void 0), p(e, "_windowScrollerRef", C.createRef()), p(e, "state", vt(vt({}, pt(e.props.scrollElement, e.props)), {}, { isScrolling: !1, scrollLeft: 0, scrollTop: 0 })), p(e, "_registerChild", function(s) {
2046
- !s || s instanceof Element || console.warn("WindowScroller registerChild expects to be passed Element or null"), e._child = s, e.updatePosition();
2047
- }), p(e, "_onChildScroll", function(s) {
2048
- var c = s.scrollTop;
2049
- if (e.state.scrollTop !== c) {
2050
- var d = e.props.scrollElement;
2051
- d && (typeof d.scrollTo == "function" ? d.scrollTo(0, c + e._positionFromTop) : d.scrollTop = c + e._positionFromTop);
2052
- }
2053
- }), p(e, "_registerResizeListener", function(s) {
2054
- s === window ? window.addEventListener("resize", e._onResize, !1) : e._detectElementResize.addResizeListener(s, e._onResize);
2055
- }), p(e, "_unregisterResizeListener", function(s) {
2056
- s === window ? window.removeEventListener("resize", e._onResize, !1) : s && e._detectElementResize.removeResizeListener(s, e._onResize);
2057
- }), p(e, "_onResize", function() {
2058
- e.updatePosition();
2059
- }), p(e, "__handleWindowScrollEvent", function() {
2060
- if (e._isMounted) {
2061
- var s = e.props.onScroll, c = e.props.scrollElement;
2062
- if (c) {
2063
- var d = mt(c), h = Math.max(0, d.left - e._positionFromLeft), f = Math.max(0, d.top - e._positionFromTop);
2064
- e.setState({ isScrolling: !0, scrollLeft: h, scrollTop: f }), s({ scrollLeft: h, scrollTop: f });
2065
- }
2066
- }
2067
- }), p(e, "__resetIsScrolling", function() {
2068
- e.setState({ isScrolling: !1 });
2069
- }), e;
2070
- }
2071
- return D(o, C.PureComponent), H(o, [{ key: "updatePosition", value: function() {
2072
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollElement, t = this.props.onResize, n = this.state, r = n.height, l = n.width, i = this._child || this._windowScrollerRef.current;
2073
- if (i instanceof Element && e) {
2074
- var a = function(c, d) {
2075
- if (Ae(d) && document.documentElement) {
2076
- var h = document.documentElement, f = le(c), u = le(h);
2077
- return { top: f.top - u.top, left: f.left - u.left };
2078
- }
2079
- var v = mt(d), m = le(c), _ = le(d);
2080
- return { top: m.top + v.top - _.top, left: m.left + v.left - _.left };
2081
- }(i, e);
2082
- this._positionFromTop = a.top, this._positionFromLeft = a.left;
2083
- }
2084
- var s = pt(e, this.props);
2085
- r === s.height && l === s.width || (this.setState({ height: s.height, width: s.width }), t({ height: s.height, width: s.width })), this.props.updateScrollTopOnUpdatePosition === !0 && (this.__handleWindowScrollEvent(), this.__resetIsScrolling());
2086
- } }, { key: "componentDidMount", value: function() {
2087
- var e = this.props.scrollElement;
2088
- this._detectElementResize = zt(), this.updatePosition(e), e && (ht(this, e), this._registerResizeListener(e)), this._isMounted = !0;
2089
- } }, { key: "componentDidUpdate", value: function(e, t) {
2090
- var n = this.props.scrollElement, r = e.scrollElement;
2091
- r !== n && r != null && n != null && (this.updatePosition(n), ft(this, r), ht(this, n), this._unregisterResizeListener(r), this._registerResizeListener(n));
2092
- } }, { key: "componentWillUnmount", value: function() {
2093
- var e = this.props.scrollElement;
2094
- e && (ft(this, e), this._unregisterResizeListener(e)), this._isMounted = !1;
2095
- } }, { key: "render", value: function() {
2096
- var e = this.props.children, t = this.state, n = t.isScrolling, r = t.scrollTop, l = t.scrollLeft, i = t.height, a = t.width;
2097
- return C.createElement("div", { ref: this._windowScrollerRef }, e({ onChildScroll: this._onChildScroll, registerChild: this._registerChild, height: i, isScrolling: n, scrollLeft: l, scrollTop: r, width: a }));
2098
- } }]);
2099
- }();
2100
- p(Qo, "defaultProps", { onResize: function() {
2101
- }, onScroll: function() {
2102
- }, scrollingResetTimeInterval: 150, scrollElement: Xt(), serverHeight: 0, serverWidth: 0 });
2103
- const se = "ReactVirtualizedDemo-flexContainer", Yt = "ReactVirtualizedDemo-tableRow", Jt = "ReactVirtualizedDemo-tableRowHover", ke = "ReactVirtualizedDemo-tableCell", Me = "ReactVirtualizedDemo-noClick";
2104
- class en extends St.PureComponent {
2105
- constructor() {
2106
- super(...arguments), this.getRowClassName = ({ index: e }) => {
2107
- const { onRowClick: t } = this.props;
2108
- return Se(Yt, se, { [Jt]: e !== -1 && t != null });
2109
- }, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: n, width: r }) => {
2110
- const { columns: l, rowHeight: i, onRowClick: a } = this.props;
2111
- let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
2112
- return t === "shortcut" ? s = xo(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), A.jsx(We, { component: "div", className: Se(ke, se, { [Me]: a == null }), variant: "body", style: c, align: n != null && l[n].numeric ? "right" : "left", children: s });
2113
- }, this.headerRenderer = ({ label: e, columnIndex: t, width: n }) => {
2114
- const { headerHeight: r, columns: l } = this.props, i = l[t];
2115
- return A.jsx(We, { component: "div", className: Se(ke, se, Me), variant: "head", sx: { width: n, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: A.jsx("span", { children: i.label }) });
2116
- };
2117
- }
2118
- static {
2119
- this.defaultProps = { headerHeight: 40, rowHeight: 48 };
2120
- }
2121
- render() {
2122
- const { columns: e, rowHeight: t, headerHeight: n, ...r } = this.props;
2123
- return A.jsx(It, { children: ({ height: l, width: i }) => A.jsx(Oe, { height: l, width: i, rowHeight: t, gridStyle: { direction: "inherit" }, headerHeight: n, ...r, rowClassName: this.getRowClassName, children: e.map(({ dataKey: a, width: s, widthLess: c, ...d }, h) => {
2124
- const f = c ? i - c : s;
2125
- return A.jsx(_e, { style: { flex: `1 1 ${f}px` }, headerRenderer: (u) => this.headerRenderer({ ...u, width: f, columnIndex: h }), className: se, cellDataGetter: ({ rowData: u, columnData: v, dataKey: m }) => u[m], cellRenderer: (u) => this.cellRenderer({ ...u, width: f, columnIndex: h }), dataKey: a, width: f, ...d }, a);
2126
- }) }) });
2127
- }
2128
- }
2129
- const tn = Ao(en)(({ theme: o }) => ({ "& .ReactVirtualized__Table__headerRow": { ...o.direction === "rtl" && { paddingLeft: "0 !important" }, ...o.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${se}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Yt}`]: { cursor: "pointer" }, [`& .${Jt}`]: { "&:hover:not([disabled])": { backgroundColor: o.palette.grey[200] } }, [`& .${ke}`]: { flex: 1 }, [`& .${Me}`]: { cursor: "initial" } }));
2130
- function on(o) {
2131
- const { commands: e, ...t } = o, [n, r] = C.useState(!1), [l, i] = C.useState(""), a = C.useMemo(() => {
2132
- let u = e.getAllCommands();
2133
- n || (u = u.filter((_) => _.command.shortcut())), u.sort((_, S) => _.command.label().localeCompare(S.command.label()));
2134
- const v = [], m = (_) => _.replace(/\n\n/g, `
2135
- `);
2136
- for (let _ = 0; _ < u.length; _++) {
2137
- const S = u[_].command, y = S.shortcut();
2138
- if (Array.isArray(y)) {
2139
- const g = y;
2140
- for (let w = 0; w < g.length; w++) v.push({ label: S.label(), description: m(S.description()), shortcut: g[w] });
2141
- } else v.push({ label: S.label(), description: m(S.description()), shortcut: S.shortcut() });
2142
- }
2143
- return v;
2144
- }, [n, e]), [s, c] = C.useState(null);
2145
- C.useEffect(() => {
2146
- import("./4yxl564v_Wx022xz.mjs").then((u) => {
2147
- c(new u.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
2148
- });
2149
- }, [a]);
2150
- const [d, h] = C.useState(a), f = l.length > 0 && d.length === 0;
2151
- return C.useEffect(() => {
2152
- s && co.debounce(() => {
2153
- if (l.trim().length === 0) return void h(a);
2154
- const u = s.search(l.trim()), v = new Array(u.length);
2155
- for (let m = 0; m < u.length; m++) v[m] = u[m].item;
2156
- h(v);
2157
- }, 90)();
2158
- }, [s, l]), A.jsxs(he, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [A.jsxs(he, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (u) => u.spacing(2), color: (u) => u.palette.text.secondary }, children: [A.jsx(uo, { InputProps: { sx: { backgroundImage: `linear-gradient(${Z("#fff", fe(5))}, ${Z("#fff", fe(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (u) => u.spacing(1), paddingBottom: (u) => u.spacing(1) } }, endAdornment: A.jsx(ho, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: A.jsx(fo, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: A.jsx(po, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (u) => u.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (u) => f ? `${u.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (u) => f ? `${u.palette.error.main} !important` : void 0 } }, value: l, onChange: (u) => {
2159
- i(u.target.value);
2160
- }, onKeyDown: (u) => {
2161
- u.which === _t.Escape && l.length > 0 && (i(""), u.stopPropagation(), u.preventDefault());
2162
- }, onContextMenu: (u) => {
2163
- u.stopPropagation();
2164
- } }), A.jsx(mo, { sx: { flex: "1 1 60%" }, control: A.jsx(go, { checked: n, onChange: () => r(!n) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), A.jsx(he, { sx: { flex: "1 1 100%", borderRadius: (u) => `${u.shape.borderRadius}px`, border: (u) => `solid ${u.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (u) => u.palette.background.paper, backgroundImage: `linear-gradient(${Z("#fff", fe(5))}, ${Z("#fff", fe(5))})` } }, children: A.jsx(tn, { rowCount: d.length, rowGetter: (u) => d[u.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), A.jsx(he, { sx: { display: "flex", flexShrink: "0", paddingLeft: (u) => u.spacing(1), paddingTop: (u) => u.spacing(1), paddingRight: (u) => u.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: A.jsx(vo, { noWrap: !0, component: "div", sx: { color: (u) => f ? u.palette.error.main : u.palette.text.secondary }, children: `${d.length === 0 ? "No" : d.length} shortcut key${d.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
2165
- }
2166
- const rn = (o) => {
2167
- const { title: e = "Shortcut Keys", commands: t, sx: n, ...r } = o;
2168
- return A.jsx(so, { isModal: !0, onKeyDown: (l) => {
2169
- l.keyCode === _t.F1 && l.preventDefault();
2170
- }, sx: { width: "780px", ...n }, title: e, autoFocusSel: ".input", ...r, children: A.jsx(ao, { dividers: !0, children: A.jsx(on, { commands: t, sx: { marginBottom: "8px" } }) }) });
2171
- };
2172
- export {
2173
- rn as default
2174
- };