@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.2

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