@sheetxl/studio-vanilla 0.4.9 → 0.4.11

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