@k8slens/extensions 6.2.0-git.edd9a11415.0 → 6.2.0-git.f4d5097d2f.0

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 (26) hide show
  1. package/dist/src/common/app-event-bus/app-event-bus.injectable.d.ts +3 -1
  2. package/dist/src/common/app-event-bus/emit-event.injectable.d.ts +4 -2
  3. package/dist/src/common/app-event-bus/event-bus.d.ts +3 -2
  4. package/dist/src/common/cluster-store/cluster-store.d.ts +3 -1
  5. package/dist/src/common/event-emitter.d.ts +1 -1
  6. package/dist/src/common/fs/exec-file.injectable.d.ts +2 -3
  7. package/dist/src/common/helm/add-helm-repository-channel.d.ts +1 -1
  8. package/dist/src/common/helm/remove-helm-repository-channel.d.ts +1 -1
  9. package/dist/src/common/user-store/user-store.d.ts +2 -0
  10. package/dist/src/common/utils/async-result.d.ts +5 -2
  11. package/dist/src/extensions/common-api/event-bus.d.ts +1 -1
  12. package/dist/src/extensions/extension-api.js +65 -21
  13. package/dist/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.d.ts +5 -1
  14. package/dist/src/main/helm/exec-helm/exec-helm.injectable.d.ts +5 -1
  15. package/dist/src/main/helm/repositories/add-helm-repository/add-helm-repository-channel-listener.injectable.d.ts +1 -1
  16. package/dist/src/main/helm/repositories/add-helm-repository/add-helm-repository.injectable.d.ts +1 -2
  17. package/dist/src/main/helm/repositories/remove-helm-repository/remove-helm-repository-channel-listener.injectable.d.ts +1 -1
  18. package/dist/src/main/helm/repositories/remove-helm-repository/remove-helm-repository.injectable.d.ts +2 -1
  19. package/dist/src/main/lens-proxy/lens-proxy.d.ts +4 -0
  20. package/dist/src/main/resource-applier/create-resource-applier.injectable.d.ts +5 -0
  21. package/dist/src/main/{resource-applier.d.ts → resource-applier/resource-applier.d.ts} +19 -4
  22. package/dist/src/main/shell-session/shell-session.d.ts +4 -0
  23. package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.d.ts +3 -3
  24. package/package.json +1 -1
  25. package/dist/src/common/__tests__/event-bus.test.d.ts +0 -5
  26. package/dist/src/common/app-event-bus/app-event-bus.global-override-for-injectable.d.ts +0 -5
@@ -25730,7 +25730,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
25730
25730
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25731
25731
 
25732
25732
  "use strict";
25733
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FixedSizeGrid\": () => (/* binding */ FixedSizeGrid),\n/* harmony export */ \"FixedSizeList\": () => (/* binding */ FixedSizeList),\n/* harmony export */ \"VariableSizeGrid\": () => (/* binding */ VariableSizeGrid),\n/* harmony export */ \"VariableSizeList\": () => (/* binding */ VariableSizeList),\n/* harmony export */ \"areEqual\": () => (/* binding */ areEqual),\n/* harmony export */ \"shouldComponentUpdate\": () => (/* binding */ shouldComponentUpdate)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\n\n\n\n\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\nvar now = hasNativePerformanceNow ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nfunction cancelTimeout(timeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\nfunction requestTimeout(callback, delay) {\n var start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n var timeoutID = {\n id: requestAnimationFrame(tick)\n };\n return timeoutID;\n}\n\nvar size = -1; // This utility copied from \"dom-helpers\" package.\n\nfunction getScrollbarSize(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (size === -1 || recalculate) {\n var div = document.createElement('div');\n var style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n document.body.appendChild(div);\n size = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n }\n\n return size;\n}\nvar cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nfunction getRTLOffsetType(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (cachedRTLResult === null || recalculate) {\n var outerDiv = document.createElement('div');\n var outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n var innerDiv = document.createElement('div');\n var innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nvar defaultItemKey = function defaultItemKey(_ref) {\n var columnIndex = _ref.columnIndex,\n data = _ref.data,\n rowIndex = _ref.rowIndex;\n return rowIndex + \":\" + columnIndex;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsOverscanCount = null;\nvar devWarningsOverscanRowsColumnsCount = null;\nvar devWarningsTagName = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = /*#__PURE__*/new WeakSet();\n devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();\n devWarningsTagName = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createGridComponent(_ref2) {\n var _class;\n\n var getColumnOffset = _ref2.getColumnOffset,\n getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,\n getColumnWidth = _ref2.getColumnWidth,\n getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,\n getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,\n getRowHeight = _ref2.getRowHeight,\n getRowOffset = _ref2.getRowOffset,\n getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,\n getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,\n initInstanceProps = _ref2.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref2.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Grid, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function Grid(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this));\n _this._resetIsScrollingTimeoutId = null;\n _this._outerRef = void 0;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this),\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,\n scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward'\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {\n return _this.props.onItemsRendered({\n overscanColumnStartIndex: overscanColumnStartIndex,\n overscanColumnStopIndex: overscanColumnStopIndex,\n overscanRowStartIndex: overscanRowStartIndex,\n overscanRowStopIndex: overscanRowStopIndex,\n visibleColumnStartIndex: visibleColumnStartIndex,\n visibleColumnStopIndex: visibleColumnStopIndex,\n visibleRowStartIndex: visibleRowStartIndex,\n visibleRowStopIndex: visibleRowStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n horizontalScrollDirection: horizontalScrollDirection,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n verticalScrollDirection: verticalScrollDirection,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (rowIndex, columnIndex) {\n var _this$props = _this.props,\n columnWidth = _this$props.columnWidth,\n direction = _this$props.direction,\n rowHeight = _this$props.rowHeight;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);\n\n var key = rowIndex + \":\" + columnIndex;\n var style;\n\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);\n\n var isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : _offset,\n right: isRtl ? _offset : undefined,\n top: getRowOffset(_this.props, rowIndex, _this._instanceProps),\n height: getRowHeight(_this.props, rowIndex, _this._instanceProps),\n width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (_, __, ___) {\n return {};\n });\n\n _this._onScroll = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientHeight = _event$currentTarget.clientHeight,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollTop = _event$currentTarget.scrollTop,\n scrollHeight = _event$currentTarget.scrollHeight,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n\n var calculatedScrollLeft = scrollLeft;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));\n var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1);\n });\n };\n\n return _this;\n }\n\n Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = Grid.prototype;\n\n _proto.scrollTo = function scrollTo(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(function (prevState) {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n return null;\n }\n\n return {\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(_ref4) {\n var _ref4$align = _ref4.align,\n align = _ref4$align === void 0 ? 'auto' : _ref4$align,\n columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex;\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n height = _this$props2.height,\n rowCount = _this$props2.rowCount,\n width = _this$props2.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n var scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n\n var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;\n var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;\n this.scrollTo({\n scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,\n scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n initialScrollLeft = _this$props3.initialScrollLeft,\n initialScrollTop = _this$props3.initialScrollTop;\n\n if (this._outerRef != null) {\n var outerRef = this._outerRef;\n\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var direction = this.props.direction;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollTop = _this$state2.scrollTop,\n scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n var outerRef = this._outerRef;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n columnCount = _this$props4.columnCount,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n rowCount = _this$props4.rowCount,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling;\n\n var _this$_getHorizontalR = this._getHorizontalRangeToRender(),\n columnStartIndex = _this$_getHorizontalR[0],\n columnStopIndex = _this$_getHorizontalR[1];\n\n var _this$_getVerticalRan = this._getVerticalRangeToRender(),\n rowStartIndex = _this$_getVerticalRan[0],\n rowStopIndex = _this$_getVerticalRan[1];\n\n var items = [];\n\n if (columnCount > 0 && rowCount) {\n for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {\n for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n columnIndex: _columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({\n columnIndex: _columnIndex,\n data: itemData,\n rowIndex: _rowIndex\n }),\n rowIndex: _rowIndex,\n style: this._getItemStyle(_rowIndex, _columnIndex)\n }));\n }\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n var _this$props5 = this.props,\n columnCount = _this$props5.columnCount,\n onItemsRendered = _this$props5.onItemsRendered,\n onScroll = _this$props5.onScroll,\n rowCount = _this$props5.rowCount;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),\n _overscanColumnStartIndex = _this$_getHorizontalR2[0],\n _overscanColumnStopIndex = _this$_getHorizontalR2[1],\n _visibleColumnStartIndex = _this$_getHorizontalR2[2],\n _visibleColumnStopIndex = _this$_getHorizontalR2[3];\n\n var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),\n _overscanRowStartIndex = _this$_getVerticalRan2[0],\n _overscanRowStopIndex = _this$_getVerticalRan2[1],\n _visibleRowStartIndex = _this$_getVerticalRan2[2],\n _visibleRowStopIndex = _this$_getVerticalRan2[3];\n\n this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);\n }\n }\n\n if (typeof onScroll === 'function') {\n var _this$state3 = this.state,\n _horizontalScrollDirection = _this$state3.horizontalScrollDirection,\n _scrollLeft = _this$state3.scrollLeft,\n _scrollTop = _this$state3.scrollTop,\n _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,\n _verticalScrollDirection = _this$state3.verticalScrollDirection;\n\n this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {\n var _this$props6 = this.props,\n columnCount = _this$props6.columnCount,\n overscanColumnCount = _this$props6.overscanColumnCount,\n overscanColumnsCount = _this$props6.overscanColumnsCount,\n overscanCount = _this$props6.overscanCount,\n rowCount = _this$props6.rowCount;\n var _this$state4 = this.state,\n horizontalScrollDirection = _this$state4.horizontalScrollDirection,\n isScrolling = _this$state4.isScrolling,\n scrollLeft = _this$state4.scrollLeft;\n var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);\n var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {\n var _this$props7 = this.props,\n columnCount = _this$props7.columnCount,\n overscanCount = _this$props7.overscanCount,\n overscanRowCount = _this$props7.overscanRowCount,\n overscanRowsCount = _this$props7.overscanRowsCount,\n rowCount = _this$props7.rowCount;\n var _this$state5 = this.state,\n isScrolling = _this$state5.isScrolling,\n verticalScrollDirection = _this$state5.verticalScrollDirection,\n scrollTop = _this$state5.scrollTop;\n var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);\n var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return Grid;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false\n }, _class;\n}\n\nvar validateSharedProps = function validateSharedProps(_ref5, _ref6) {\n var children = _ref5.children,\n direction = _ref5.direction,\n height = _ref5.height,\n innerTagName = _ref5.innerTagName,\n outerTagName = _ref5.outerTagName,\n overscanColumnsCount = _ref5.overscanColumnsCount,\n overscanCount = _ref5.overscanCount,\n overscanRowsCount = _ref5.overscanRowsCount,\n width = _ref5.width;\n var instance = _ref6.instance;\n\n if (true) {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {\n if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n if (typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Grids must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n }\n\n if (typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Grids must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\nvar getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {\n var rowCount = _ref.rowCount;\n var rowMetadataMap = _ref2.rowMetadataMap,\n estimatedRowHeight = _ref2.estimatedRowHeight,\n lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredRowIndex >= rowCount) {\n lastMeasuredRowIndex = rowCount - 1;\n }\n\n if (lastMeasuredRowIndex >= 0) {\n var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {\n var columnCount = _ref3.columnCount;\n var columnMetadataMap = _ref4.columnMetadataMap,\n estimatedColumnWidth = _ref4.estimatedColumnWidth,\n lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredColumnIndex >= columnCount) {\n lastMeasuredColumnIndex = columnCount - 1;\n }\n\n if (lastMeasuredColumnIndex >= 0) {\n var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {\n var itemMetadataMap, itemSize, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n itemSize = props.columnWidth;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n itemSize = props.rowHeight;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n if (itemType === 'column') {\n instanceProps.lastMeasuredColumnIndex = index;\n } else {\n instanceProps.lastMeasuredRowIndex = index;\n }\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {\n var itemMetadataMap, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {\n var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var size = itemType === 'column' ? props.width : props.height;\n var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = itemType === 'column' ? getEstimatedTotalWidth(props, instanceProps) : getEstimatedTotalHeight(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + scrollbarSize + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n};\n\nvar VariableSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(props, index, instanceProps) {\n return getItemMetadata('column', props, index, instanceProps).offset;\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {\n return findNearestItem('column', props, instanceProps, scrollLeft);\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {\n var columnCount = props.columnCount,\n width = props.width;\n var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);\n var maxOffset = scrollLeft + width;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < columnCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('column', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n getColumnWidth: function getColumnWidth(props, index, instanceProps) {\n return instanceProps.columnMetadataMap[index].size;\n },\n getEstimatedTotalHeight: getEstimatedTotalHeight,\n getEstimatedTotalWidth: getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getRowOffset: function getRowOffset(props, index, instanceProps) {\n return getItemMetadata('row', props, index, instanceProps).offset;\n },\n getRowHeight: function getRowHeight(props, index, instanceProps) {\n return instanceProps.rowMetadataMap[index].size;\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {\n return findNearestItem('row', props, instanceProps, scrollTop);\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {\n var rowCount = props.rowCount,\n height = props.height;\n var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);\n var maxOffset = scrollTop + height;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < rowCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('row', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref5 = props,\n estimatedColumnWidth = _ref5.estimatedColumnWidth,\n estimatedRowHeight = _ref5.estimatedRowHeight;\n var instanceProps = {\n columnMetadataMap: {},\n estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,\n estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredColumnIndex: -1,\n lastMeasuredRowIndex: -1,\n rowMetadataMap: {}\n };\n\n instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n columnIndex: columnIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n rowIndex: rowIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterIndices = function (_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex,\n _ref6$shouldForceUpda = _ref6.shouldForceUpdate,\n shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;\n\n if (typeof columnIndex === 'number') {\n instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);\n }\n\n if (typeof rowIndex === 'number') {\n instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);\n } // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref7) {\n var columnWidth = _ref7.columnWidth,\n rowHeight = _ref7.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'function') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n } else if (typeof rowHeight !== 'function') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;\n\nvar defaultItemKey$1 = function defaultItemKey(index, data) {\n return index;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsDirection = null;\nvar devWarningsTagName$1 = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /*#__PURE__*/new WeakSet();\n devWarningsTagName$1 = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createListComponent(_ref) {\n var _class;\n\n var getItemOffset = _ref.getItemOffset,\n getEstimatedTotalSize = _ref.getEstimatedTotalSize,\n getItemSize = _ref.getItemSize,\n getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,\n getStartIndexForOffset = _ref.getStartIndexForOffset,\n getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,\n initInstanceProps = _ref.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(List, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function List(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this));\n _this._outerRef = void 0;\n _this._resetIsScrollingTimeoutId = null;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this),\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,\n scrollUpdateWasRequested: false\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {\n return _this.props.onItemsRendered({\n overscanStartIndex: overscanStartIndex,\n overscanStopIndex: overscanStopIndex,\n visibleStartIndex: visibleStartIndex,\n visibleStopIndex: visibleStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n scrollDirection: scrollDirection,\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (index) {\n var _this$props = _this.props,\n direction = _this$props.direction,\n itemSize = _this$props.itemSize,\n layout = _this$props.layout;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);\n\n var style;\n\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n var _offset = getItemOffset(_this.props, index, _this._instanceProps);\n\n var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var isRtl = direction === 'rtl';\n var offsetHorizontal = isHorizontal ? _offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? _offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%'\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (_, __, ___) {\n return {};\n });\n\n _this._onScrollHorizontal = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction;\n var scrollOffset = scrollLeft;\n\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._onScrollVertical = function (event) {\n var _event$currentTarget2 = event.currentTarget,\n clientHeight = _event$currentTarget2.clientHeight,\n scrollHeight = _event$currentTarget2.scrollHeight,\n scrollTop = _event$currentTarget2.scrollTop;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1, null);\n });\n };\n\n return _this;\n }\n\n List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps$1(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = List.prototype;\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset);\n this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(index, align) {\n if (align === void 0) {\n align = 'auto';\n }\n\n var itemCount = this.props.itemCount;\n var scrollOffset = this.state.scrollOffset;\n index = Math.max(0, Math.min(index, itemCount - 1));\n this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props2 = this.props,\n direction = _this$props2.direction,\n initialScrollOffset = _this$props2.initialScrollOffset,\n layout = _this$props2.layout;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props3 = this.props,\n direction = _this$props3.direction,\n layout = _this$props3.layout;\n var _this$state = this.state,\n scrollOffset = _this$state.scrollOffset,\n scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemCount = _this$props4.itemCount,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey$1 : _this$props4$itemKey,\n layout = _this$props4.layout,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;\n\n var _this$_getRangeToRend = this._getRangeToRender(),\n startIndex = _this$_getRangeToRend[0],\n stopIndex = _this$_getRangeToRend[1];\n\n var items = [];\n\n if (itemCount > 0) {\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n data: itemData,\n key: itemKey(_index, itemData),\n index: _index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(_index)\n }));\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%'\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n var itemCount = this.props.itemCount;\n\n if (itemCount > 0) {\n var _this$_getRangeToRend2 = this._getRangeToRender(),\n _overscanStartIndex = _this$_getRangeToRend2[0],\n _overscanStopIndex = _this$_getRangeToRend2[1],\n _visibleStartIndex = _this$_getRangeToRend2[2],\n _visibleStopIndex = _this$_getRangeToRend2[3];\n\n this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n var _this$state2 = this.state,\n _scrollDirection = _this$state2.scrollDirection,\n _scrollOffset = _this$state2.scrollOffset,\n _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getRangeToRender = function _getRangeToRender() {\n var _this$props5 = this.props,\n itemCount = _this$props5.itemCount,\n overscanCount = _this$props5.overscanCount;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollDirection = _this$state3.scrollDirection,\n scrollOffset = _this$state3.scrollOffset;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);\n var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;\n var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return List;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false\n }, _class;\n} // NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nvar validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {\n var children = _ref2.children,\n direction = _ref2.direction,\n height = _ref2.height,\n layout = _ref2.layout,\n innerTagName = _ref2.innerTagName,\n outerTagName = _ref2.outerTagName,\n width = _ref2.width;\n var instance = _ref3.instance;\n\n if (true) {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {\n devWarningsTagName$1.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n } // TODO Deprecate direction \"horizontal\"\n\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.');\n }\n\n break;\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + (\"\\\"\" + layout + \"\\\" was specified.\"));\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;\n\nvar getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {\n var _ref = props,\n itemSize = _ref.itemSize;\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {\n var itemCount = props.itemCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {\n var itemCount = _ref2.itemCount;\n var itemMetadataMap = _ref3.itemMetadataMap,\n estimatedItemSize = _ref3.estimatedItemSize,\n lastMeasuredIndex = _ref3.lastMeasuredIndex;\n var totalSizeOfMeasuredItems = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nvar VariableSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(props, index, instanceProps) {\n return getItemMetadata$1(props, index, instanceProps).offset;\n },\n getItemSize: function getItemSize(props, index, instanceProps) {\n return instanceProps.itemMetadataMap[index].size;\n },\n getEstimatedTotalSize: getEstimatedTotalSize,\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {\n return findNearestItem$1(props, instanceProps, offset);\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n itemCount = props.itemCount,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);\n var maxOffset = scrollOffset + size;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata$1(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref4 = props,\n estimatedItemSize = _ref4.estimatedItemSize;\n var instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,\n lastMeasuredIndex: -1\n };\n\n instance.resetAfterIndex = function (index, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref5) {\n var itemSize = _ref5.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'function') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(_ref, index) {\n var columnWidth = _ref.columnWidth;\n return index * columnWidth;\n },\n getColumnWidth: function getColumnWidth(_ref2, index) {\n var columnWidth = _ref2.columnWidth;\n return columnWidth;\n },\n getRowOffset: function getRowOffset(_ref3, index) {\n var rowHeight = _ref3.rowHeight;\n return index * rowHeight;\n },\n getRowHeight: function getRowHeight(_ref4, index) {\n var rowHeight = _ref4.rowHeight;\n return rowHeight;\n },\n getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {\n var rowCount = _ref5.rowCount,\n rowHeight = _ref5.rowHeight;\n return rowHeight * rowCount;\n },\n getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {\n var columnCount = _ref6.columnCount,\n columnWidth = _ref6.columnWidth;\n return columnWidth * columnCount;\n },\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {\n var columnCount = _ref7.columnCount,\n columnWidth = _ref7.columnWidth,\n width = _ref7.width;\n var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);\n var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);\n\n if (align === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(width / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {\n var rowHeight = _ref8.rowHeight,\n height = _ref8.height,\n rowCount = _ref8.rowCount;\n var lastRowOffset = Math.max(0, rowCount * rowHeight - height);\n var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);\n\n if (align === 'smart') {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(height / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {\n var columnWidth = _ref9.columnWidth,\n columnCount = _ref9.columnCount;\n return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {\n var columnWidth = _ref10.columnWidth,\n columnCount = _ref10.columnCount,\n width = _ref10.width;\n var left = startIndex * columnWidth;\n var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive\n ));\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {\n var rowHeight = _ref11.rowHeight,\n rowCount = _ref11.rowCount;\n return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {\n var rowHeight = _ref12.rowHeight,\n rowCount = _ref12.rowCount,\n height = _ref12.height;\n var top = startIndex * rowHeight;\n var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref13) {\n var columnWidth = _ref13.columnWidth,\n rowHeight = _ref13.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'number') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n }\n\n if (typeof rowHeight !== 'number') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(_ref, index) {\n var itemSize = _ref.itemSize;\n return index * itemSize;\n },\n getItemSize: function getItemSize(_ref2, index) {\n var itemSize = _ref2.itemSize;\n return itemSize;\n },\n getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {\n var itemCount = _ref3.itemCount,\n itemSize = _ref3.itemSize;\n return itemSize * itemCount;\n },\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset) {\n var direction = _ref4.direction,\n height = _ref4.height,\n itemCount = _ref4.itemCount,\n itemSize = _ref4.itemSize,\n layout = _ref4.layout,\n width = _ref4.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var lastItemOffset = Math.max(0, itemCount * itemSize - size);\n var maxOffset = Math.min(lastItemOffset, index * itemSize);\n var minOffset = Math.max(0, index * itemSize - size + itemSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {\n var itemCount = _ref5.itemCount,\n itemSize = _ref5.itemSize;\n return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {\n var direction = _ref6.direction,\n height = _ref6.height,\n itemCount = _ref6.itemCount,\n itemSize = _ref6.itemSize,\n layout = _ref6.layout,\n width = _ref6.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var offset = startIndex * itemSize;\n var size = isHorizontal ? width : height;\n var numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(itemCount - 1, startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref7) {\n var itemSize = _ref7.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'number') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(prev, next) {\n for (var attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n\n for (var _attribute in next) {\n if (prev[_attribute] !== next[_attribute]) {\n return true;\n }\n }\n\n return false;\n}\n\nvar _excluded = [\"style\"],\n _excluded2 = [\"style\"];\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-api.html#reactmemo\n\nfunction areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prevProps, _excluded);\n\n var nextStyle = nextProps.style,\n nextRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(nextProps, _excluded2);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n}\n\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate\n\nfunction shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}\n\n\n//# sourceMappingURL=index.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/react-window/dist/index.esm.js?");
25733
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FixedSizeGrid\": () => (/* binding */ FixedSizeGrid),\n/* harmony export */ \"FixedSizeList\": () => (/* binding */ FixedSizeList),\n/* harmony export */ \"VariableSizeGrid\": () => (/* binding */ VariableSizeGrid),\n/* harmony export */ \"VariableSizeList\": () => (/* binding */ VariableSizeList),\n/* harmony export */ \"areEqual\": () => (/* binding */ areEqual),\n/* harmony export */ \"shouldComponentUpdate\": () => (/* binding */ shouldComponentUpdate)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\n\n\n\n\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\nvar now = hasNativePerformanceNow ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nfunction cancelTimeout(timeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\nfunction requestTimeout(callback, delay) {\n var start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n var timeoutID = {\n id: requestAnimationFrame(tick)\n };\n return timeoutID;\n}\n\nvar size = -1; // This utility copied from \"dom-helpers\" package.\n\nfunction getScrollbarSize(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (size === -1 || recalculate) {\n var div = document.createElement('div');\n var style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n document.body.appendChild(div);\n size = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n }\n\n return size;\n}\nvar cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nfunction getRTLOffsetType(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (cachedRTLResult === null || recalculate) {\n var outerDiv = document.createElement('div');\n var outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n var innerDiv = document.createElement('div');\n var innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nvar defaultItemKey = function defaultItemKey(_ref) {\n var columnIndex = _ref.columnIndex,\n data = _ref.data,\n rowIndex = _ref.rowIndex;\n return rowIndex + \":\" + columnIndex;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsOverscanCount = null;\nvar devWarningsOverscanRowsColumnsCount = null;\nvar devWarningsTagName = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = /*#__PURE__*/new WeakSet();\n devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();\n devWarningsTagName = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createGridComponent(_ref2) {\n var _class;\n\n var getColumnOffset = _ref2.getColumnOffset,\n getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,\n getColumnWidth = _ref2.getColumnWidth,\n getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,\n getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,\n getRowHeight = _ref2.getRowHeight,\n getRowOffset = _ref2.getRowOffset,\n getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,\n getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,\n initInstanceProps = _ref2.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref2.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Grid, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function Grid(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this));\n _this._resetIsScrollingTimeoutId = null;\n _this._outerRef = void 0;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this),\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,\n scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward'\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {\n return _this.props.onItemsRendered({\n overscanColumnStartIndex: overscanColumnStartIndex,\n overscanColumnStopIndex: overscanColumnStopIndex,\n overscanRowStartIndex: overscanRowStartIndex,\n overscanRowStopIndex: overscanRowStopIndex,\n visibleColumnStartIndex: visibleColumnStartIndex,\n visibleColumnStopIndex: visibleColumnStopIndex,\n visibleRowStartIndex: visibleRowStartIndex,\n visibleRowStopIndex: visibleRowStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n horizontalScrollDirection: horizontalScrollDirection,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n verticalScrollDirection: verticalScrollDirection,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (rowIndex, columnIndex) {\n var _this$props = _this.props,\n columnWidth = _this$props.columnWidth,\n direction = _this$props.direction,\n rowHeight = _this$props.rowHeight;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);\n\n var key = rowIndex + \":\" + columnIndex;\n var style;\n\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);\n\n var isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : _offset,\n right: isRtl ? _offset : undefined,\n top: getRowOffset(_this.props, rowIndex, _this._instanceProps),\n height: getRowHeight(_this.props, rowIndex, _this._instanceProps),\n width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (_, __, ___) {\n return {};\n });\n\n _this._onScroll = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientHeight = _event$currentTarget.clientHeight,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollTop = _event$currentTarget.scrollTop,\n scrollHeight = _event$currentTarget.scrollHeight,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n\n var calculatedScrollLeft = scrollLeft;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));\n var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1);\n });\n };\n\n return _this;\n }\n\n Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = Grid.prototype;\n\n _proto.scrollTo = function scrollTo(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(function (prevState) {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n return null;\n }\n\n return {\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(_ref4) {\n var _ref4$align = _ref4.align,\n align = _ref4$align === void 0 ? 'auto' : _ref4$align,\n columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex;\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n height = _this$props2.height,\n rowCount = _this$props2.rowCount,\n width = _this$props2.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n var scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n\n var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;\n var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;\n this.scrollTo({\n scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,\n scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n initialScrollLeft = _this$props3.initialScrollLeft,\n initialScrollTop = _this$props3.initialScrollTop;\n\n if (this._outerRef != null) {\n var outerRef = this._outerRef;\n\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var direction = this.props.direction;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollTop = _this$state2.scrollTop,\n scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n var outerRef = this._outerRef;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n columnCount = _this$props4.columnCount,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n rowCount = _this$props4.rowCount,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling;\n\n var _this$_getHorizontalR = this._getHorizontalRangeToRender(),\n columnStartIndex = _this$_getHorizontalR[0],\n columnStopIndex = _this$_getHorizontalR[1];\n\n var _this$_getVerticalRan = this._getVerticalRangeToRender(),\n rowStartIndex = _this$_getVerticalRan[0],\n rowStopIndex = _this$_getVerticalRan[1];\n\n var items = [];\n\n if (columnCount > 0 && rowCount) {\n for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {\n for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n columnIndex: _columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({\n columnIndex: _columnIndex,\n data: itemData,\n rowIndex: _rowIndex\n }),\n rowIndex: _rowIndex,\n style: this._getItemStyle(_rowIndex, _columnIndex)\n }));\n }\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n var _this$props5 = this.props,\n columnCount = _this$props5.columnCount,\n onItemsRendered = _this$props5.onItemsRendered,\n onScroll = _this$props5.onScroll,\n rowCount = _this$props5.rowCount;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),\n _overscanColumnStartIndex = _this$_getHorizontalR2[0],\n _overscanColumnStopIndex = _this$_getHorizontalR2[1],\n _visibleColumnStartIndex = _this$_getHorizontalR2[2],\n _visibleColumnStopIndex = _this$_getHorizontalR2[3];\n\n var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),\n _overscanRowStartIndex = _this$_getVerticalRan2[0],\n _overscanRowStopIndex = _this$_getVerticalRan2[1],\n _visibleRowStartIndex = _this$_getVerticalRan2[2],\n _visibleRowStopIndex = _this$_getVerticalRan2[3];\n\n this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);\n }\n }\n\n if (typeof onScroll === 'function') {\n var _this$state3 = this.state,\n _horizontalScrollDirection = _this$state3.horizontalScrollDirection,\n _scrollLeft = _this$state3.scrollLeft,\n _scrollTop = _this$state3.scrollTop,\n _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,\n _verticalScrollDirection = _this$state3.verticalScrollDirection;\n\n this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {\n var _this$props6 = this.props,\n columnCount = _this$props6.columnCount,\n overscanColumnCount = _this$props6.overscanColumnCount,\n overscanColumnsCount = _this$props6.overscanColumnsCount,\n overscanCount = _this$props6.overscanCount,\n rowCount = _this$props6.rowCount;\n var _this$state4 = this.state,\n horizontalScrollDirection = _this$state4.horizontalScrollDirection,\n isScrolling = _this$state4.isScrolling,\n scrollLeft = _this$state4.scrollLeft;\n var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);\n var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {\n var _this$props7 = this.props,\n columnCount = _this$props7.columnCount,\n overscanCount = _this$props7.overscanCount,\n overscanRowCount = _this$props7.overscanRowCount,\n overscanRowsCount = _this$props7.overscanRowsCount,\n rowCount = _this$props7.rowCount;\n var _this$state5 = this.state,\n isScrolling = _this$state5.isScrolling,\n verticalScrollDirection = _this$state5.verticalScrollDirection,\n scrollTop = _this$state5.scrollTop;\n var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);\n var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return Grid;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false\n }, _class;\n}\n\nvar validateSharedProps = function validateSharedProps(_ref5, _ref6) {\n var children = _ref5.children,\n direction = _ref5.direction,\n height = _ref5.height,\n innerTagName = _ref5.innerTagName,\n outerTagName = _ref5.outerTagName,\n overscanColumnsCount = _ref5.overscanColumnsCount,\n overscanCount = _ref5.overscanCount,\n overscanRowsCount = _ref5.overscanRowsCount,\n width = _ref5.width;\n var instance = _ref6.instance;\n\n if (true) {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {\n if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n if (typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Grids must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n }\n\n if (typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Grids must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\nvar getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {\n var rowCount = _ref.rowCount;\n var rowMetadataMap = _ref2.rowMetadataMap,\n estimatedRowHeight = _ref2.estimatedRowHeight,\n lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredRowIndex >= rowCount) {\n lastMeasuredRowIndex = rowCount - 1;\n }\n\n if (lastMeasuredRowIndex >= 0) {\n var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {\n var columnCount = _ref3.columnCount;\n var columnMetadataMap = _ref4.columnMetadataMap,\n estimatedColumnWidth = _ref4.estimatedColumnWidth,\n lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredColumnIndex >= columnCount) {\n lastMeasuredColumnIndex = columnCount - 1;\n }\n\n if (lastMeasuredColumnIndex >= 0) {\n var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {\n var itemMetadataMap, itemSize, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n itemSize = props.columnWidth;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n itemSize = props.rowHeight;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n if (itemType === 'column') {\n instanceProps.lastMeasuredColumnIndex = index;\n } else {\n instanceProps.lastMeasuredRowIndex = index;\n }\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {\n var itemMetadataMap, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {\n var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var size = itemType === 'column' ? props.width : props.height;\n var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = itemType === 'column' ? getEstimatedTotalWidth(props, instanceProps) : getEstimatedTotalHeight(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + scrollbarSize + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n};\n\nvar VariableSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(props, index, instanceProps) {\n return getItemMetadata('column', props, index, instanceProps).offset;\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {\n return findNearestItem('column', props, instanceProps, scrollLeft);\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {\n var columnCount = props.columnCount,\n width = props.width;\n var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);\n var maxOffset = scrollLeft + width;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < columnCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('column', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n getColumnWidth: function getColumnWidth(props, index, instanceProps) {\n return instanceProps.columnMetadataMap[index].size;\n },\n getEstimatedTotalHeight: getEstimatedTotalHeight,\n getEstimatedTotalWidth: getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getRowOffset: function getRowOffset(props, index, instanceProps) {\n return getItemMetadata('row', props, index, instanceProps).offset;\n },\n getRowHeight: function getRowHeight(props, index, instanceProps) {\n return instanceProps.rowMetadataMap[index].size;\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {\n return findNearestItem('row', props, instanceProps, scrollTop);\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {\n var rowCount = props.rowCount,\n height = props.height;\n var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);\n var maxOffset = scrollTop + height;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < rowCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('row', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref5 = props,\n estimatedColumnWidth = _ref5.estimatedColumnWidth,\n estimatedRowHeight = _ref5.estimatedRowHeight;\n var instanceProps = {\n columnMetadataMap: {},\n estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,\n estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredColumnIndex: -1,\n lastMeasuredRowIndex: -1,\n rowMetadataMap: {}\n };\n\n instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n columnIndex: columnIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n rowIndex: rowIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterIndices = function (_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex,\n _ref6$shouldForceUpda = _ref6.shouldForceUpdate,\n shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;\n\n if (typeof columnIndex === 'number') {\n instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);\n }\n\n if (typeof rowIndex === 'number') {\n instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);\n } // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref7) {\n var columnWidth = _ref7.columnWidth,\n rowHeight = _ref7.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'function') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n } else if (typeof rowHeight !== 'function') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;\n\nvar defaultItemKey$1 = function defaultItemKey(index, data) {\n return index;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsDirection = null;\nvar devWarningsTagName$1 = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /*#__PURE__*/new WeakSet();\n devWarningsTagName$1 = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createListComponent(_ref) {\n var _class;\n\n var getItemOffset = _ref.getItemOffset,\n getEstimatedTotalSize = _ref.getEstimatedTotalSize,\n getItemSize = _ref.getItemSize,\n getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,\n getStartIndexForOffset = _ref.getStartIndexForOffset,\n getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,\n initInstanceProps = _ref.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(List, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function List(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this));\n _this._outerRef = void 0;\n _this._resetIsScrollingTimeoutId = null;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this),\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,\n scrollUpdateWasRequested: false\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {\n return _this.props.onItemsRendered({\n overscanStartIndex: overscanStartIndex,\n overscanStopIndex: overscanStopIndex,\n visibleStartIndex: visibleStartIndex,\n visibleStopIndex: visibleStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n scrollDirection: scrollDirection,\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (index) {\n var _this$props = _this.props,\n direction = _this$props.direction,\n itemSize = _this$props.itemSize,\n layout = _this$props.layout;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);\n\n var style;\n\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n var _offset = getItemOffset(_this.props, index, _this._instanceProps);\n\n var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var isRtl = direction === 'rtl';\n var offsetHorizontal = isHorizontal ? _offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? _offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%'\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (_, __, ___) {\n return {};\n });\n\n _this._onScrollHorizontal = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction;\n var scrollOffset = scrollLeft;\n\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._onScrollVertical = function (event) {\n var _event$currentTarget2 = event.currentTarget,\n clientHeight = _event$currentTarget2.clientHeight,\n scrollHeight = _event$currentTarget2.scrollHeight,\n scrollTop = _event$currentTarget2.scrollTop;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1, null);\n });\n };\n\n return _this;\n }\n\n List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps$1(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = List.prototype;\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset);\n this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(index, align) {\n if (align === void 0) {\n align = 'auto';\n }\n\n var _this$props2 = this.props,\n itemCount = _this$props2.itemCount,\n layout = _this$props2.layout;\n var scrollOffset = this.state.scrollOffset;\n index = Math.max(0, Math.min(index, itemCount - 1)); // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n\n var scrollbarSize = 0;\n\n if (this._outerRef) {\n var outerRef = this._outerRef;\n\n if (layout === 'vertical') {\n scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;\n } else {\n scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;\n }\n }\n\n this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps, scrollbarSize));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n direction = _this$props3.direction,\n initialScrollOffset = _this$props3.initialScrollOffset,\n layout = _this$props3.layout;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props4 = this.props,\n direction = _this$props4.direction,\n layout = _this$props4.layout;\n var _this$state = this.state,\n scrollOffset = _this$state.scrollOffset,\n scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n className = _this$props5.className,\n direction = _this$props5.direction,\n height = _this$props5.height,\n innerRef = _this$props5.innerRef,\n innerElementType = _this$props5.innerElementType,\n innerTagName = _this$props5.innerTagName,\n itemCount = _this$props5.itemCount,\n itemData = _this$props5.itemData,\n _this$props5$itemKey = _this$props5.itemKey,\n itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey,\n layout = _this$props5.layout,\n outerElementType = _this$props5.outerElementType,\n outerTagName = _this$props5.outerTagName,\n style = _this$props5.style,\n useIsScrolling = _this$props5.useIsScrolling,\n width = _this$props5.width;\n var isScrolling = this.state.isScrolling; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;\n\n var _this$_getRangeToRend = this._getRangeToRender(),\n startIndex = _this$_getRangeToRend[0],\n stopIndex = _this$_getRangeToRend[1];\n\n var items = [];\n\n if (itemCount > 0) {\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n data: itemData,\n key: itemKey(_index, itemData),\n index: _index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(_index)\n }));\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%'\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n var itemCount = this.props.itemCount;\n\n if (itemCount > 0) {\n var _this$_getRangeToRend2 = this._getRangeToRender(),\n _overscanStartIndex = _this$_getRangeToRend2[0],\n _overscanStopIndex = _this$_getRangeToRend2[1],\n _visibleStartIndex = _this$_getRangeToRend2[2],\n _visibleStopIndex = _this$_getRangeToRend2[3];\n\n this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n var _this$state2 = this.state,\n _scrollDirection = _this$state2.scrollDirection,\n _scrollOffset = _this$state2.scrollOffset,\n _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getRangeToRender = function _getRangeToRender() {\n var _this$props6 = this.props,\n itemCount = _this$props6.itemCount,\n overscanCount = _this$props6.overscanCount;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollDirection = _this$state3.scrollDirection,\n scrollOffset = _this$state3.scrollOffset;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);\n var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;\n var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return List;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false\n }, _class;\n} // NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nvar validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {\n var children = _ref2.children,\n direction = _ref2.direction,\n height = _ref2.height,\n layout = _ref2.layout,\n innerTagName = _ref2.innerTagName,\n outerTagName = _ref2.outerTagName,\n width = _ref2.width;\n var instance = _ref3.instance;\n\n if (true) {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {\n devWarningsTagName$1.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n } // TODO Deprecate direction \"horizontal\"\n\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.');\n }\n\n break;\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + (\"\\\"\" + layout + \"\\\" was specified.\"));\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;\n\nvar getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {\n var _ref = props,\n itemSize = _ref.itemSize;\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {\n var itemCount = props.itemCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {\n var itemCount = _ref2.itemCount;\n var itemMetadataMap = _ref3.itemMetadataMap,\n estimatedItemSize = _ref3.estimatedItemSize,\n lastMeasuredIndex = _ref3.lastMeasuredIndex;\n var totalSizeOfMeasuredItems = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nvar VariableSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(props, index, instanceProps) {\n return getItemMetadata$1(props, index, instanceProps).offset;\n },\n getItemSize: function getItemSize(props, index, instanceProps) {\n return instanceProps.itemMetadataMap[index].size;\n },\n getEstimatedTotalSize: getEstimatedTotalSize,\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = props.direction,\n height = props.height,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {\n return findNearestItem$1(props, instanceProps, offset);\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n itemCount = props.itemCount,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);\n var maxOffset = scrollOffset + size;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata$1(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref4 = props,\n estimatedItemSize = _ref4.estimatedItemSize;\n var instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,\n lastMeasuredIndex: -1\n };\n\n instance.resetAfterIndex = function (index, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref5) {\n var itemSize = _ref5.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'function') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(_ref, index) {\n var columnWidth = _ref.columnWidth;\n return index * columnWidth;\n },\n getColumnWidth: function getColumnWidth(_ref2, index) {\n var columnWidth = _ref2.columnWidth;\n return columnWidth;\n },\n getRowOffset: function getRowOffset(_ref3, index) {\n var rowHeight = _ref3.rowHeight;\n return index * rowHeight;\n },\n getRowHeight: function getRowHeight(_ref4, index) {\n var rowHeight = _ref4.rowHeight;\n return rowHeight;\n },\n getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {\n var rowCount = _ref5.rowCount,\n rowHeight = _ref5.rowHeight;\n return rowHeight * rowCount;\n },\n getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {\n var columnCount = _ref6.columnCount,\n columnWidth = _ref6.columnWidth;\n return columnWidth * columnCount;\n },\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {\n var columnCount = _ref7.columnCount,\n columnWidth = _ref7.columnWidth,\n width = _ref7.width;\n var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);\n var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);\n\n if (align === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(width / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {\n var rowHeight = _ref8.rowHeight,\n height = _ref8.height,\n rowCount = _ref8.rowCount;\n var lastRowOffset = Math.max(0, rowCount * rowHeight - height);\n var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);\n\n if (align === 'smart') {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(height / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {\n var columnWidth = _ref9.columnWidth,\n columnCount = _ref9.columnCount;\n return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {\n var columnWidth = _ref10.columnWidth,\n columnCount = _ref10.columnCount,\n width = _ref10.width;\n var left = startIndex * columnWidth;\n var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive\n ));\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {\n var rowHeight = _ref11.rowHeight,\n rowCount = _ref11.rowCount;\n return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {\n var rowHeight = _ref12.rowHeight,\n rowCount = _ref12.rowCount,\n height = _ref12.height;\n var top = startIndex * rowHeight;\n var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref13) {\n var columnWidth = _ref13.columnWidth,\n rowHeight = _ref13.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'number') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n }\n\n if (typeof rowHeight !== 'number') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(_ref, index) {\n var itemSize = _ref.itemSize;\n return index * itemSize;\n },\n getItemSize: function getItemSize(_ref2, index) {\n var itemSize = _ref2.itemSize;\n return itemSize;\n },\n getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {\n var itemCount = _ref3.itemCount,\n itemSize = _ref3.itemSize;\n return itemSize * itemCount;\n },\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = _ref4.direction,\n height = _ref4.height,\n itemCount = _ref4.itemCount,\n itemSize = _ref4.itemSize,\n layout = _ref4.layout,\n width = _ref4.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var lastItemOffset = Math.max(0, itemCount * itemSize - size);\n var maxOffset = Math.min(lastItemOffset, index * itemSize);\n var minOffset = Math.max(0, index * itemSize - size + itemSize + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {\n var itemCount = _ref5.itemCount,\n itemSize = _ref5.itemSize;\n return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {\n var direction = _ref6.direction,\n height = _ref6.height,\n itemCount = _ref6.itemCount,\n itemSize = _ref6.itemSize,\n layout = _ref6.layout,\n width = _ref6.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var offset = startIndex * itemSize;\n var size = isHorizontal ? width : height;\n var numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(itemCount - 1, startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref7) {\n var itemSize = _ref7.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'number') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(prev, next) {\n for (var attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n\n for (var _attribute in next) {\n if (prev[_attribute] !== next[_attribute]) {\n return true;\n }\n }\n\n return false;\n}\n\nvar _excluded = [\"style\"],\n _excluded2 = [\"style\"];\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-api.html#reactmemo\n\nfunction areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prevProps, _excluded);\n\n var nextStyle = nextProps.style,\n nextRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(nextProps, _excluded2);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n}\n\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate\n\nfunction shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}\n\n\n//# sourceMappingURL=index.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/react-window/dist/index.esm.js?");
25734
25734
 
25735
25735
  /***/ }),
25736
25736
 
@@ -29661,18 +29661,18 @@ eval("\n\n/**\n * A shareable symbol constant that can be used\n * as a non-enum
29661
29661
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29662
29662
 
29663
29663
  "use strict";
29664
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _event_bus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst appEventBusInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"app-event-bus\",\n instantiate: () => _event_bus__WEBPACK_IMPORTED_MODULE_1__.appEventBus,\n causesSideEffects: true,\n decorable: false,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (appEventBusInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/app-event-bus/app-event-bus.injectable.ts?");
29664
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../event-emitter */ \"./src/common/event-emitter.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst appEventBusInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"app-event-bus\",\n instantiate: () => new _event_emitter__WEBPACK_IMPORTED_MODULE_1__.EventEmitter,\n decorable: false,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (appEventBusInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/app-event-bus/app-event-bus.injectable.ts?");
29665
29665
 
29666
29666
  /***/ }),
29667
29667
 
29668
- /***/ "./src/common/app-event-bus/event-bus.ts":
29669
- /*!***********************************************!*\
29670
- !*** ./src/common/app-event-bus/event-bus.ts ***!
29671
- \***********************************************/
29668
+ /***/ "./src/common/app-event-bus/emit-event.injectable.ts":
29669
+ /*!***********************************************************!*\
29670
+ !*** ./src/common/app-event-bus/emit-event.injectable.ts ***!
29671
+ \***********************************************************/
29672
29672
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29673
29673
 
29674
29674
  "use strict";
29675
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"appEventBus\": () => (/* binding */ appEventBus)\n/* harmony export */ });\n/* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../event-emitter */ \"./src/common/event-emitter.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\nconst appEventBus = new _event_emitter__WEBPACK_IMPORTED_MODULE_0__.EventEmitter();\n\n\n//# sourceURL=webpack://open-lens/./src/common/app-event-bus/event-bus.ts?");
29675
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app-event-bus.injectable */ \"./src/common/app-event-bus/app-event-bus.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst emitAppEventInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"emit-app-event\",\n instantiate: (di) => {\n const bus = di.inject(_app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n return (event) => bus.emit(event);\n },\n decorable: false,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (emitAppEventInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/app-event-bus/emit-event.injectable.ts?");
29676
29676
 
29677
29677
  /***/ }),
29678
29678
 
@@ -29881,7 +29881,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
29881
29881
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29882
29882
 
29883
29883
  "use strict";
29884
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cluster_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cluster-store */ \"./src/common/cluster-store/cluster-store.ts\");\n/* harmony import */ var _cluster_create_cluster_injection_token__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster/create-cluster-injection-token */ \"./src/common/cluster/create-cluster-injection-token.ts\");\n/* harmony import */ var _read_cluster_config_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./read-cluster-config.injectable */ \"./src/common/cluster-store/read-cluster-config.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\nconst clusterStoreInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"cluster-store\",\n instantiate: (di) => {\n _cluster_store__WEBPACK_IMPORTED_MODULE_1__.ClusterStore.resetInstance();\n return _cluster_store__WEBPACK_IMPORTED_MODULE_1__.ClusterStore.createInstance({\n createCluster: di.inject(_cluster_create_cluster_injection_token__WEBPACK_IMPORTED_MODULE_2__.createClusterInjectionToken),\n readClusterConfigSync: di.inject(_read_cluster_config_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n });\n },\n causesSideEffects: true,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clusterStoreInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/cluster-store/cluster-store.injectable.ts?");
29884
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _cluster_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cluster-store */ \"./src/common/cluster-store/cluster-store.ts\");\n/* harmony import */ var _cluster_create_cluster_injection_token__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster/create-cluster-injection-token */ \"./src/common/cluster/create-cluster-injection-token.ts\");\n/* harmony import */ var _read_cluster_config_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./read-cluster-config.injectable */ \"./src/common/cluster-store/read-cluster-config.injectable.ts\");\n/* harmony import */ var _app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app-event-bus/emit-event.injectable */ \"./src/common/app-event-bus/emit-event.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\nconst clusterStoreInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"cluster-store\",\n instantiate: (di) => {\n _cluster_store__WEBPACK_IMPORTED_MODULE_1__.ClusterStore.resetInstance();\n return _cluster_store__WEBPACK_IMPORTED_MODULE_1__.ClusterStore.createInstance({\n createCluster: di.inject(_cluster_create_cluster_injection_token__WEBPACK_IMPORTED_MODULE_2__.createClusterInjectionToken),\n readClusterConfigSync: di.inject(_read_cluster_config_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n emitAppEvent: di.inject(_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n });\n },\n causesSideEffects: true,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clusterStoreInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/cluster-store/cluster-store.injectable.ts?");
29885
29885
 
29886
29886
  /***/ }),
29887
29887
 
@@ -29892,7 +29892,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
29892
29892
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29893
29893
 
29894
29894
  "use strict";
29895
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClusterStore\": () => (/* binding */ ClusterStore)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _cluster_cluster__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster/cluster */ \"./src/common/cluster/cluster.ts\");\n/* harmony import */ var _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../migrations/cluster-store */ \"./src/migrations/cluster-store/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/* harmony import */ var _ipc_cluster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ipc/cluster */ \"./src/common/ipc/cluster.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nclass ClusterStore extends _base_store__WEBPACK_IMPORTED_MODULE_1__.BaseStore {\n constructor(dependencies) {\n super({\n configName: \"lens-cluster-store\",\n accessPropertiesByDotNotation: false,\n syncOptions: {\n equals: mobx__WEBPACK_IMPORTED_MODULE_10__.comparer.structural,\n },\n migrations: _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n });\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"displayName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ClusterStore\"\n });\n Object.defineProperty(this, \"clusters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n Object.defineProperty(this, \"disposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (0,_utils__WEBPACK_IMPORTED_MODULE_7__.disposer)()\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(this);\n this.load();\n this.pushStateToViewsAutomatically();\n }\n async loadInitialOnRenderer() {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(\"[CLUSTER-STORE] requesting initial state sync\");\n for (const { id, state } of await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_8__.requestInitialClusterStates)()) {\n (_a = this.getById(id)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n }\n provideInitialFromMain() {\n (0,_ipc__WEBPACK_IMPORTED_MODULE_6__.ipcMainHandle)(_ipc_cluster__WEBPACK_IMPORTED_MODULE_9__.clusterStates, () => (this.clustersList.map(cluster => ({\n id: cluster.id,\n state: cluster.getState(),\n }))));\n }\n pushStateToViewsAutomatically() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain) {\n this.disposer.push((0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.connectedClustersList, () => this.pushState()));\n }\n }\n registerIpcListener() {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[CLUSTER-STORE] start to listen (${electron__WEBPACK_IMPORTED_MODULE_0__.webFrame.routingId})`);\n const ipc = electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain !== null && electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain !== void 0 ? electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain : electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer;\n ipc === null || ipc === void 0 ? void 0 : ipc.on(\"cluster:state\", (event, clusterId, state) => {\n var _a;\n (_a = this.getById(clusterId)) === null || _a === void 0 ? void 0 : _a.setState(state);\n });\n }\n unregisterIpcListener() {\n super.unregisterIpcListener();\n this.disposer();\n }\n pushState() {\n this.clusters.forEach((c) => {\n c.pushState();\n });\n }\n get clustersList() {\n return Array.from(this.clusters.values());\n }\n get connectedClustersList() {\n return this.clustersList.filter((c) => !c.disconnected);\n }\n hasClusters() {\n return this.clusters.size > 0;\n }\n getById(id) {\n if (id) {\n return this.clusters.get(id);\n }\n return undefined;\n }\n addCluster(clusterOrModel) {\n _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_5__.appEventBus.emit({ name: \"cluster\", action: \"add\" });\n const cluster = clusterOrModel instanceof _cluster_cluster__WEBPACK_IMPORTED_MODULE_2__.Cluster\n ? clusterOrModel\n : this.dependencies.createCluster(clusterOrModel, this.dependencies.readClusterConfigSync(clusterOrModel));\n this.clusters.set(cluster.id, cluster);\n return cluster;\n }\n fromStore({ clusters = [] } = {}) {\n const currentClusters = new Map(this.clusters);\n const newClusters = new Map();\n // update new clusters\n for (const clusterModel of clusters) {\n try {\n let cluster = currentClusters.get(clusterModel.id);\n if (cluster) {\n cluster.updateModel(clusterModel);\n }\n else {\n cluster = this.dependencies.createCluster(clusterModel, this.dependencies.readClusterConfigSync(clusterModel));\n }\n newClusters.set(clusterModel.id, cluster);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(`[CLUSTER-STORE]: Failed to update/create a cluster: ${error}`);\n }\n }\n this.clusters.replace(newClusters);\n }\n toJSON() {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.toJS)({\n clusters: this.clustersList.map(cluster => cluster.toJSON()),\n });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"clustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"connectedClustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], ClusterStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/cluster-store/cluster-store.ts?");
29895
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClusterStore\": () => (/* binding */ ClusterStore)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _cluster_cluster__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster/cluster */ \"./src/common/cluster/cluster.ts\");\n/* harmony import */ var _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../migrations/cluster-store */ \"./src/migrations/cluster-store/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/* harmony import */ var _ipc_cluster__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ipc/cluster */ \"./src/common/ipc/cluster.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\nclass ClusterStore extends _base_store__WEBPACK_IMPORTED_MODULE_1__.BaseStore {\n constructor(dependencies) {\n super({\n configName: \"lens-cluster-store\",\n accessPropertiesByDotNotation: false,\n syncOptions: {\n equals: mobx__WEBPACK_IMPORTED_MODULE_9__.comparer.structural,\n },\n migrations: _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n });\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"displayName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ClusterStore\"\n });\n Object.defineProperty(this, \"clusters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_9__.observable.map()\n });\n Object.defineProperty(this, \"disposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (0,_utils__WEBPACK_IMPORTED_MODULE_6__.disposer)()\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(this);\n this.load();\n this.pushStateToViewsAutomatically();\n }\n async loadInitialOnRenderer() {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(\"[CLUSTER-STORE] requesting initial state sync\");\n for (const { id, state } of await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_7__.requestInitialClusterStates)()) {\n (_a = this.getById(id)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n }\n provideInitialFromMain() {\n (0,_ipc__WEBPACK_IMPORTED_MODULE_5__.ipcMainHandle)(_ipc_cluster__WEBPACK_IMPORTED_MODULE_8__.clusterStates, () => (this.clustersList.map(cluster => ({\n id: cluster.id,\n state: cluster.getState(),\n }))));\n }\n pushStateToViewsAutomatically() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain) {\n this.disposer.push((0,mobx__WEBPACK_IMPORTED_MODULE_9__.reaction)(() => this.connectedClustersList, () => this.pushState()));\n }\n }\n registerIpcListener() {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[CLUSTER-STORE] start to listen (${electron__WEBPACK_IMPORTED_MODULE_0__.webFrame.routingId})`);\n const ipc = electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain !== null && electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain !== void 0 ? electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain : electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer;\n ipc === null || ipc === void 0 ? void 0 : ipc.on(\"cluster:state\", (event, clusterId, state) => {\n var _a;\n (_a = this.getById(clusterId)) === null || _a === void 0 ? void 0 : _a.setState(state);\n });\n }\n unregisterIpcListener() {\n super.unregisterIpcListener();\n this.disposer();\n }\n pushState() {\n this.clusters.forEach((c) => {\n c.pushState();\n });\n }\n get clustersList() {\n return Array.from(this.clusters.values());\n }\n get connectedClustersList() {\n return this.clustersList.filter((c) => !c.disconnected);\n }\n hasClusters() {\n return this.clusters.size > 0;\n }\n getById(id) {\n if (id) {\n return this.clusters.get(id);\n }\n return undefined;\n }\n addCluster(clusterOrModel) {\n this.dependencies.emitAppEvent({ name: \"cluster\", action: \"add\" });\n const cluster = clusterOrModel instanceof _cluster_cluster__WEBPACK_IMPORTED_MODULE_2__.Cluster\n ? clusterOrModel\n : this.dependencies.createCluster(clusterOrModel, this.dependencies.readClusterConfigSync(clusterOrModel));\n this.clusters.set(cluster.id, cluster);\n return cluster;\n }\n fromStore({ clusters = [] } = {}) {\n const currentClusters = new Map(this.clusters);\n const newClusters = new Map();\n // update new clusters\n for (const clusterModel of clusters) {\n try {\n let cluster = currentClusters.get(clusterModel.id);\n if (cluster) {\n cluster.updateModel(clusterModel);\n }\n else {\n cluster = this.dependencies.createCluster(clusterModel, this.dependencies.readClusterConfigSync(clusterModel));\n }\n newClusters.set(clusterModel.id, cluster);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(`[CLUSTER-STORE]: Failed to update/create a cluster: ${error}`);\n }\n }\n this.clusters.replace(newClusters);\n }\n toJSON() {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.toJS)({\n clusters: this.clustersList.map(cluster => cluster.toJSON()),\n });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"clustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"connectedClustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], ClusterStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/cluster-store/cluster-store.ts?");
29896
29896
 
29897
29897
  /***/ }),
29898
29898
 
@@ -29958,7 +29958,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
29958
29958
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29959
29959
 
29960
29960
  "use strict";
29961
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EventEmitter\": () => (/* binding */ EventEmitter)\n/* harmony export */ });\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nclass EventEmitter {\n constructor() {\n Object.defineProperty(this, \"listeners\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"emit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (...data) => {\n for (const [callback, { once }] of this.listeners) {\n if (once) {\n this.removeListener(callback);\n }\n if (callback(...data) === false) {\n break;\n }\n }\n }\n });\n }\n addListener(callback, options = {}) {\n const fn = options.prepend ? \"unshift\" : \"push\";\n this.listeners[fn]([callback, options]);\n }\n removeListener(callback) {\n this.listeners = this.listeners.filter(([cb]) => cb !== callback);\n }\n removeAllListeners() {\n this.listeners.length = 0;\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/event-emitter.ts?");
29961
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EventEmitter\": () => (/* binding */ EventEmitter)\n/* harmony export */ });\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nclass EventEmitter {\n constructor() {\n Object.defineProperty(this, \"listeners\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n addListener(callback, options = {}) {\n const fn = options.prepend ? \"unshift\" : \"push\";\n this.listeners[fn]([callback, options]);\n }\n removeListener(callback) {\n this.listeners = this.listeners.filter(([cb]) => cb !== callback);\n }\n removeAllListeners() {\n this.listeners.length = 0;\n }\n emit(...data) {\n for (const [callback, { once }] of this.listeners) {\n if (once) {\n this.removeListener(callback);\n }\n if (callback(...data) === false) {\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/event-emitter.ts?");
29962
29962
 
29963
29963
  /***/ }),
29964
29964
 
@@ -30039,6 +30039,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
30039
30039
 
30040
30040
  /***/ }),
30041
30041
 
30042
+ /***/ "./src/common/fs/delete-file.injectable.ts":
30043
+ /*!*************************************************!*\
30044
+ !*** ./src/common/fs/delete-file.injectable.ts ***!
30045
+ \*************************************************/
30046
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30047
+
30048
+ "use strict";
30049
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _fs_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fs.injectable */ \"./src/common/fs/fs.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst deleteFileInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"delete-file\",\n instantiate: (di) => di.inject(_fs_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]).unlink,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (deleteFileInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/fs/delete-file.injectable.ts?");
30050
+
30051
+ /***/ }),
30052
+
30053
+ /***/ "./src/common/fs/exec-file.injectable.ts":
30054
+ /*!***********************************************!*\
30055
+ !*** ./src/common/fs/exec-file.injectable.ts ***!
30056
+ \***********************************************/
30057
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30058
+
30059
+ "use strict";
30060
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst execFileInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"exec-file\",\n instantiate: () => (filePath, args, options) => new Promise((resolve) => {\n (0,child_process__WEBPACK_IMPORTED_MODULE_1__.execFile)(filePath, args, options !== null && options !== void 0 ? options : {}, (error, stdout, stderr) => {\n if (error) {\n resolve({\n callWasSuccessful: false,\n error: Object.assign(error, { stderr }),\n });\n }\n else {\n resolve({\n callWasSuccessful: true,\n response: stdout,\n });\n }\n });\n }),\n causesSideEffects: true,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (execFileInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/fs/exec-file.injectable.ts?");
30061
+
30062
+ /***/ }),
30063
+
30042
30064
  /***/ "./src/common/fs/fs.injectable.ts":
30043
30065
  /*!****************************************!*\
30044
30066
  !*** ./src/common/fs/fs.injectable.ts ***!
@@ -30072,6 +30094,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
30072
30094
 
30073
30095
  /***/ }),
30074
30096
 
30097
+ /***/ "./src/common/fs/write-file.injectable.ts":
30098
+ /*!************************************************!*\
30099
+ !*** ./src/common/fs/write-file.injectable.ts ***!
30100
+ \************************************************/
30101
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30102
+
30103
+ "use strict";
30104
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _path_get_dirname_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/get-dirname.injectable */ \"./src/common/path/get-dirname.injectable.ts\");\n/* harmony import */ var _fs_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fs.injectable */ \"./src/common/fs/fs.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\nconst writeFileInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"write-file\",\n instantiate: (di) => {\n const { writeFile, ensureDir } = di.inject(_fs_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n const getDirnameOfPath = di.inject(_path_get_dirname_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n return async (filePath, content, opts) => {\n await ensureDir(getDirnameOfPath(filePath), {\n mode: 0o755,\n ...(opts !== null && opts !== void 0 ? opts : {}),\n });\n await writeFile(filePath, content, {\n encoding: \"utf-8\",\n ...(opts !== null && opts !== void 0 ? opts : {}),\n });\n };\n },\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (writeFileInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/fs/write-file.injectable.ts?");
30105
+
30106
+ /***/ }),
30107
+
30075
30108
  /***/ "./src/common/fs/write-json-file.injectable.ts":
30076
30109
  /*!*****************************************************!*\
30077
30110
  !*** ./src/common/fs/write-json-file.injectable.ts ***!
@@ -31520,7 +31553,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
31520
31553
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31521
31554
 
31522
31555
  "use strict";
31523
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectStore\": () => (/* binding */ KubeObjectStore)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../logger */ \"./src/common/logger.ts\");\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! assert */ \"assert\");\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(assert__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/objects */ \"./src/common/utils/objects.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_2__.ItemStore {\n constructor(api, opts) {\n var _a;\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_8__.observable.array([], { deep: false })\n });\n if (api) {\n this.api = api;\n }\n this.limit = opts === null || opts === void 0 ? void 0 : opts.limit;\n this.bufferSize = (_a = opts === null || opts === void 0 ? void 0 : opts.bufferSize) !== null && _a !== void 0 ? _a : 50000;\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(this);\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.autoBind)(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_8__.when)(() => Boolean(this.context));\n }\n get namespacesReady() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_8__.when)(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n // TODO: Circular dependency: KubeObjectStore -> ClusterFrameContext -> NamespaceStore -> KubeObjectStore\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [namespace].flat();\n if (namespaces.length) {\n return this.items.filter(item => (0,_utils__WEBPACK_IMPORTED_MODULE_0__.includes)(namespaces, item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return (0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.entries)(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, reqInit, onLoadFailure }) {\n var _a, _b, _c, _d, _e, _f;\n if (!((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster) === null || _b === void 0 ? void 0 : _b.isAllowedResource(this.api.kind))) {\n return [];\n }\n const isLoadingAll = ((_c = this.context.allNamespaces) === null || _c === void 0 ? void 0 : _c.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!this.api.isNamespaced || isLoadingAll) {\n if (this.api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = this.api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return (_d = await res) !== null && _d !== void 0 ? _d : [];\n }\n catch (error) {\n onLoadFailure(((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isRequestError)(error)\n ? error.message || error.toString()\n : \"Unknown error\"));\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return (_e = await res) !== null && _e !== void 0 ? _e : [];\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => this.api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...(_f = result.value) !== null && _f !== void 0 ? _f : []);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message || result.reason);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll({ namespaces, merge = true, reqInit, onLoadFailure } = {}) {\n const context = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.waitUntilDefined)(() => this.context);\n namespaces !== null && namespaces !== void 0 ? namespaces : (namespaces = context.contextNamespaces);\n this.isLoading = true;\n try {\n const items = await this.loadItems({ namespaces, reqInit, onLoadFailure });\n this.mergeItems(items, { merge, namespaces });\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n return undefined;\n }\n async reloadAll(opts = {}) {\n const { force = false, ...loadingOptions } = opts;\n if (this.isLoading || (this.isLoaded && !force)) {\n return undefined;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { merge = true, updateStore = true, sort = true, filter = true, namespaces }) {\n let items = partialItems;\n // update existing items\n if (merge && this.api.isNamespaced) {\n const ns = new Set(namespaces);\n items = [\n ...this.items.filter(item => !ns.has(item.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(item, \"Failed to load item from kube\");\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = (0,_kube_api_parse__WEBPACK_IMPORTED_MODULE_3__.parseKubeApi)(resourcePath);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(name, \"name must be part of resourcePath\");\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(newItem, \"Failed to create item from kube\");\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(newItem) {\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n const rawItem = await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\");\n assert__WEBPACK_IMPORTED_MODULE_5___default()(rawItem, `Failed to patch ${item.getScopedName()} of ${item.kind} ${item.apiVersion}`);\n return this.postUpdate(rawItem);\n }\n async update(item, data) {\n const rawItem = await this.api.update({\n name: item.getName(),\n namespace: item.getNs(),\n }, data);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(rawItem, `Failed to update ${item.getScopedName()} of ${item.kind} ${item.apiVersion}`);\n return this.postUpdate(rawItem);\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n await Promise.all(this.selectedItems.map(this.remove));\n }\n async removeItems(items) {\n await Promise.all(items.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.reaction)(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe({ onLoadFailure, abortController = new (abort_controller__WEBPACK_IMPORTED_MODULE_7___default())() } = {}) {\n if (this.api.isNamespaced) {\n Promise.race([\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.rejectPromiseBy)(abortController.signal),\n Promise.all([\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.waitUntilDefined)(() => this.context),\n this.namespacesReady,\n ]),\n ])\n .then(([context]) => {\n var _a;\n assert__WEBPACK_IMPORTED_MODULE_5___default()(this.loadedNamespaces);\n if (((_a = context.cluster) === null || _a === void 0 ? void 0 : _a.isGlobalWatchEnabled) && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, { onLoadFailure });\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_0__.noop); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n // TODO: upgrade node-fetch once we are starting to use ES modules\n const signal = abortController.signal;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeStatus && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll({ namespaces: [namespace], reqInit: { signal }, ...opts })\n : this.loadAll({ merge: false, reqInit: { signal }, ...opts })).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n var _a;\n const items = this.getItems();\n for (const event of this.eventsBuffer.clear()) {\n if (event.type === \"ERROR\") {\n continue;\n }\n try {\n const { type, object } = event;\n if (!((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid)) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(\"[KUBE-STORE]: watch event did not have defined .metadata.uid, skipping\", { event });\n // Other parts of the code will break if this happens\n continue;\n }\n const index = items.findIndex(item => item.getId() === object.metadata.uid);\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n // fallthrough\n case \"MODIFIED\": {\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n }\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(\"[KUBE-STORE]: failed to handle event from watch buffer\", { error, event });\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_8__.observable.box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.observable,\n __metadata(\"design:type\", Object)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/kube-object.store.ts?");
31556
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectStore\": () => (/* binding */ KubeObjectStore)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../logger */ \"./src/common/logger.ts\");\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! assert */ \"assert\");\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(assert__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/objects */ \"./src/common/utils/objects.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_2__.ItemStore {\n constructor(api, opts) {\n var _a;\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_8__.observable.array([], { deep: false })\n });\n if (api) {\n this.api = api;\n }\n this.limit = opts === null || opts === void 0 ? void 0 : opts.limit;\n this.bufferSize = (_a = opts === null || opts === void 0 ? void 0 : opts.bufferSize) !== null && _a !== void 0 ? _a : 50000;\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(this);\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.autoBind)(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_8__.when)(() => Boolean(this.context));\n }\n get namespacesReady() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_8__.when)(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n // TODO: Circular dependency: KubeObjectStore -> ClusterFrameContext -> NamespaceStore -> KubeObjectStore\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [namespace].flat();\n if (namespaces.length) {\n return this.items.filter(item => (0,_utils__WEBPACK_IMPORTED_MODULE_0__.includes)(namespaces, item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return (0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.entries)(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, reqInit, onLoadFailure }) {\n var _a, _b, _c, _d, _e, _f;\n if (!((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster) === null || _b === void 0 ? void 0 : _b.isAllowedResource(this.api.kind))) {\n return [];\n }\n const isLoadingAll = ((_c = this.context.allNamespaces) === null || _c === void 0 ? void 0 : _c.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!this.api.isNamespaced || isLoadingAll) {\n if (this.api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = this.api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return (_d = await res) !== null && _d !== void 0 ? _d : [];\n }\n catch (error) {\n onLoadFailure(((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isRequestError)(error)\n ? error.message || error.toString()\n : \"Unknown error\"));\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return (_e = await res) !== null && _e !== void 0 ? _e : [];\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => this.api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...(_f = result.value) !== null && _f !== void 0 ? _f : []);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message || result.reason);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll({ namespaces, merge = true, reqInit, onLoadFailure } = {}) {\n const context = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.waitUntilDefined)(() => this.context);\n namespaces !== null && namespaces !== void 0 ? namespaces : (namespaces = context.contextNamespaces);\n this.isLoading = true;\n try {\n const items = await this.loadItems({ namespaces, reqInit, onLoadFailure });\n this.mergeItems(items, { merge, namespaces });\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n return undefined;\n }\n async reloadAll(opts = {}) {\n const { force = false, ...loadingOptions } = opts;\n if (this.isLoading || (this.isLoaded && !force)) {\n return undefined;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { merge = true, updateStore = true, sort = true, filter = true, namespaces }) {\n let items = partialItems;\n // update existing items\n if (merge && this.api.isNamespaced) {\n const ns = new Set(namespaces);\n items = [\n ...this.items.filter(item => !ns.has(item.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(item, \"Failed to load item from kube\");\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = (0,_kube_api_parse__WEBPACK_IMPORTED_MODULE_3__.parseKubeApi)(resourcePath);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(name, \"name must be part of resourcePath\");\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(newItem, \"Failed to create item from kube\");\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(newItem) {\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n const rawItem = await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\");\n assert__WEBPACK_IMPORTED_MODULE_5___default()(rawItem, `Failed to patch ${item.getScopedName()} of ${item.kind} ${item.apiVersion}`);\n return this.postUpdate(rawItem);\n }\n async update(item, data) {\n const rawItem = await this.api.update({\n name: item.getName(),\n namespace: item.getNs(),\n }, data);\n assert__WEBPACK_IMPORTED_MODULE_5___default()(rawItem, `Failed to update ${item.getScopedName()} of ${item.kind} ${item.apiVersion}`);\n return this.postUpdate(rawItem);\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n await Promise.all(this.selectedItems.map(this.remove));\n }\n async removeItems(items) {\n await Promise.all(items.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.reaction)(() => [...this.eventsBuffer], this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe({ onLoadFailure, abortController = new (abort_controller__WEBPACK_IMPORTED_MODULE_7___default())() } = {}) {\n if (this.api.isNamespaced) {\n Promise.race([\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.rejectPromiseBy)(abortController.signal),\n Promise.all([\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.waitUntilDefined)(() => this.context),\n this.namespacesReady,\n ]),\n ])\n .then(([context]) => {\n var _a;\n assert__WEBPACK_IMPORTED_MODULE_5___default()(this.loadedNamespaces);\n if (((_a = context.cluster) === null || _a === void 0 ? void 0 : _a.isGlobalWatchEnabled) && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, { onLoadFailure });\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_0__.noop); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n // TODO: upgrade node-fetch once we are starting to use ES modules\n const signal = abortController.signal;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeStatus && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll({ namespaces: [namespace], reqInit: { signal }, ...opts })\n : this.loadAll({ merge: false, reqInit: { signal }, ...opts })).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n var _a;\n const items = this.getItems();\n for (const event of this.eventsBuffer.clear()) {\n if (event.type === \"ERROR\") {\n continue;\n }\n try {\n const { type, object } = event;\n if (!((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid)) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(\"[KUBE-STORE]: watch event did not have defined .metadata.uid, skipping\", { event });\n // Other parts of the code will break if this happens\n continue;\n }\n const index = items.findIndex(item => item.getId() === object.metadata.uid);\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n // fallthrough\n case \"MODIFIED\": {\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n }\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(\"[KUBE-STORE]: failed to handle event from watch buffer\", { error, event });\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_8__.observable.box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.observable,\n __metadata(\"design:type\", Object)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/kube-object.store.ts?");
31524
31557
 
31525
31558
  /***/ }),
31526
31559
 
@@ -31564,7 +31597,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
31564
31597
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31565
31598
 
31566
31599
  "use strict";
31567
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResourceStack\": () => (/* binding */ ResourceStack)\n/* harmony export */ });\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var handlebars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! handlebars */ \"./node_modules/handlebars/lib/index.js\");\n/* harmony import */ var handlebars__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(handlebars__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _main_resource_applier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../main/resource-applier */ \"./src/main/resource-applier.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../cluster-store/cluster-store */ \"./src/common/cluster-store/cluster-store.ts\");\n/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! js-yaml */ \"./node_modules/js-yaml/dist/js-yaml.mjs\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/* harmony import */ var _extensions_as_legacy_globals_for_extension_api_legacy_global_di_for_extension_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api */ \"./src/extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api.ts\");\n/* harmony import */ var _vars_product_name_injectable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../vars/product-name.injectable */ \"./src/common/vars/product-name.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\n\n\nclass ResourceStack {\n constructor(cluster, name) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: name\n });\n }\n /**\n *\n * @param folderPath folder path that is searched for files defining kubernetes resources.\n * @param templateContext sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.\n */\n async kubectlApplyFolder(folderPath, templateContext, extraArgs) {\n const resources = await this.renderTemplates(folderPath, templateContext);\n return this.applyResources(resources, extraArgs);\n }\n /**\n *\n * @param folderPath folder path that is searched for files defining kubernetes resources.\n * @param templateContext sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.\n */\n async kubectlDeleteFolder(folderPath, templateContext, extraArgs) {\n const resources = await this.renderTemplates(folderPath, templateContext);\n return this.deleteResources(resources, extraArgs);\n }\n async applyResources(resources, extraArgs) {\n var _a;\n const clusterModel = _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_6__.ClusterStore.getInstance().getById(this.cluster.getId());\n if (!clusterModel) {\n throw new Error(`cluster not found`);\n }\n let kubectlArgs = extraArgs || [];\n kubectlArgs = this.appendKubectlArgs(kubectlArgs);\n if (electron__WEBPACK_IMPORTED_MODULE_5__.app) {\n return await new _main_resource_applier__WEBPACK_IMPORTED_MODULE_3__.ResourceApplier(clusterModel).kubectlApplyAll(resources, kubectlArgs);\n }\n else {\n const response = await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_8__.requestKubectlApplyAll)(this.cluster.getId(), resources, kubectlArgs);\n if (response.stderr) {\n throw new Error(response.stderr);\n }\n return (_a = response.stdout) !== null && _a !== void 0 ? _a : \"\";\n }\n }\n async deleteResources(resources, extraArgs) {\n var _a;\n const clusterModel = _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_6__.ClusterStore.getInstance().getById(this.cluster.getId());\n if (!clusterModel) {\n throw new Error(`cluster not found`);\n }\n let kubectlArgs = extraArgs || [];\n kubectlArgs = this.appendKubectlArgs(kubectlArgs);\n if (electron__WEBPACK_IMPORTED_MODULE_5__.app) {\n return await new _main_resource_applier__WEBPACK_IMPORTED_MODULE_3__.ResourceApplier(clusterModel).kubectlDeleteAll(resources, kubectlArgs);\n }\n else {\n const response = await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_8__.requestKubectlDeleteAll)(this.cluster.getId(), resources, kubectlArgs);\n if (response.stderr) {\n throw new Error(response.stderr);\n }\n return (_a = response.stdout) !== null && _a !== void 0 ? _a : \"\";\n }\n }\n appendKubectlArgs(kubectlArgs) {\n if (!kubectlArgs.includes(\"-l\") && !kubectlArgs.includes(\"--label\")) {\n return kubectlArgs.concat([\"-l\", `app.kubernetes.io/name=${this.name}`]);\n }\n return kubectlArgs;\n }\n async renderTemplates(folderPath, templateContext) {\n var _a;\n var _b;\n const resources = [];\n const di = (0,_extensions_as_legacy_globals_for_extension_api_legacy_global_di_for_extension_api__WEBPACK_IMPORTED_MODULE_9__.getLegacyGlobalDiForExtensionApi)();\n const productName = di.inject(_vars_product_name_injectable__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[RESOURCE-STACK]: render templates from ${folderPath}`);\n const files = await fs_extra__WEBPACK_IMPORTED_MODULE_0___default().readdir(folderPath);\n for (const filename of files) {\n const file = path__WEBPACK_IMPORTED_MODULE_1___default().join(folderPath, filename);\n const raw = await fs_extra__WEBPACK_IMPORTED_MODULE_0___default().readFile(file);\n const data = (filename.endsWith(\".hb\")\n ? handlebars__WEBPACK_IMPORTED_MODULE_2___default().compile(raw.toString())(templateContext)\n : raw.toString()).trim();\n if (!data) {\n continue;\n }\n for (const entry of js_yaml__WEBPACK_IMPORTED_MODULE_7__[\"default\"].loadAll(data)) {\n if (typeof entry !== \"object\" || !entry) {\n continue;\n }\n const resource = entry;\n if (typeof resource.metadata === \"object\") {\n (_a = (_b = resource.metadata).labels) !== null && _a !== void 0 ? _a : (_b.labels = {});\n resource.metadata.labels[\"app.kubernetes.io/name\"] = this.name;\n resource.metadata.labels[\"app.kubernetes.io/managed-by\"] = productName;\n resource.metadata.labels[\"app.kubernetes.io/created-by\"] = \"resource-stack\";\n }\n resources.push(js_yaml__WEBPACK_IMPORTED_MODULE_7__[\"default\"].dump(resource));\n }\n }\n return resources;\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s/resource-stack.ts?");
31600
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResourceStack\": () => (/* binding */ ResourceStack)\n/* harmony export */ });\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var handlebars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! handlebars */ \"./node_modules/handlebars/lib/index.js\");\n/* harmony import */ var handlebars__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(handlebars__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cluster-store/cluster-store */ \"./src/common/cluster-store/cluster-store.ts\");\n/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! js-yaml */ \"./node_modules/js-yaml/dist/js-yaml.mjs\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/* harmony import */ var _extensions_as_legacy_globals_for_extension_api_legacy_global_di_for_extension_api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api */ \"./src/extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api.ts\");\n/* harmony import */ var _vars_product_name_injectable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../vars/product-name.injectable */ \"./src/common/vars/product-name.injectable.ts\");\n/* harmony import */ var _extensions_as_legacy_globals_for_extension_api_as_legacy_global_function_for_extension_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api */ \"./src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api.ts\");\n/* harmony import */ var _main_resource_applier_create_resource_applier_injectable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../main/resource-applier/create-resource-applier.injectable */ \"./src/main/resource-applier/create-resource-applier.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\n\n\n\nclass ResourceStack {\n constructor(cluster, name) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: name\n });\n }\n /**\n *\n * @param folderPath folder path that is searched for files defining kubernetes resources.\n * @param templateContext sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.\n */\n async kubectlApplyFolder(folderPath, templateContext, extraArgs) {\n const resources = await this.renderTemplates(folderPath, templateContext);\n return this.applyResources(resources, extraArgs);\n }\n /**\n *\n * @param folderPath folder path that is searched for files defining kubernetes resources.\n * @param templateContext sets the template parameters that are to be applied to any templated kubernetes resources that are to be applied.\n */\n async kubectlDeleteFolder(folderPath, templateContext, extraArgs) {\n const resources = await this.renderTemplates(folderPath, templateContext);\n return this.deleteResources(resources, extraArgs);\n }\n async applyResources(resources, extraArgs) {\n var _a;\n const clusterModel = _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_5__.ClusterStore.getInstance().getById(this.cluster.getId());\n if (!clusterModel) {\n throw new Error(`cluster not found`);\n }\n let kubectlArgs = extraArgs || [];\n kubectlArgs = this.appendKubectlArgs(kubectlArgs);\n if (electron__WEBPACK_IMPORTED_MODULE_4__.app) {\n const createResourceApplier = (0,_extensions_as_legacy_globals_for_extension_api_as_legacy_global_function_for_extension_api__WEBPACK_IMPORTED_MODULE_10__.asLegacyGlobalFunctionForExtensionApi)(_main_resource_applier_create_resource_applier_injectable__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\n return await createResourceApplier(clusterModel).kubectlApplyAll(resources, kubectlArgs);\n }\n else {\n const response = await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_7__.requestKubectlApplyAll)(this.cluster.getId(), resources, kubectlArgs);\n if (response.stderr) {\n throw new Error(response.stderr);\n }\n return (_a = response.stdout) !== null && _a !== void 0 ? _a : \"\";\n }\n }\n async deleteResources(resources, extraArgs) {\n var _a;\n const clusterModel = _cluster_store_cluster_store__WEBPACK_IMPORTED_MODULE_5__.ClusterStore.getInstance().getById(this.cluster.getId());\n if (!clusterModel) {\n throw new Error(`cluster not found`);\n }\n let kubectlArgs = extraArgs || [];\n kubectlArgs = this.appendKubectlArgs(kubectlArgs);\n if (electron__WEBPACK_IMPORTED_MODULE_4__.app) {\n const createResourceApplier = (0,_extensions_as_legacy_globals_for_extension_api_as_legacy_global_function_for_extension_api__WEBPACK_IMPORTED_MODULE_10__.asLegacyGlobalFunctionForExtensionApi)(_main_resource_applier_create_resource_applier_injectable__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\n return await createResourceApplier(clusterModel).kubectlDeleteAll(resources, kubectlArgs);\n }\n else {\n const response = await (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_7__.requestKubectlDeleteAll)(this.cluster.getId(), resources, kubectlArgs);\n if (response.stderr) {\n throw new Error(response.stderr);\n }\n return (_a = response.stdout) !== null && _a !== void 0 ? _a : \"\";\n }\n }\n appendKubectlArgs(kubectlArgs) {\n if (!kubectlArgs.includes(\"-l\") && !kubectlArgs.includes(\"--label\")) {\n return kubectlArgs.concat([\"-l\", `app.kubernetes.io/name=${this.name}`]);\n }\n return kubectlArgs;\n }\n async renderTemplates(folderPath, templateContext) {\n var _a;\n var _b;\n const resources = [];\n const di = (0,_extensions_as_legacy_globals_for_extension_api_legacy_global_di_for_extension_api__WEBPACK_IMPORTED_MODULE_8__.getLegacyGlobalDiForExtensionApi)();\n const productName = di.inject(_vars_product_name_injectable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[RESOURCE-STACK]: render templates from ${folderPath}`);\n const files = await fs_extra__WEBPACK_IMPORTED_MODULE_0___default().readdir(folderPath);\n for (const filename of files) {\n const file = path__WEBPACK_IMPORTED_MODULE_1___default().join(folderPath, filename);\n const raw = await fs_extra__WEBPACK_IMPORTED_MODULE_0___default().readFile(file);\n const data = (filename.endsWith(\".hb\")\n ? handlebars__WEBPACK_IMPORTED_MODULE_2___default().compile(raw.toString())(templateContext)\n : raw.toString()).trim();\n if (!data) {\n continue;\n }\n for (const entry of js_yaml__WEBPACK_IMPORTED_MODULE_6__[\"default\"].loadAll(data)) {\n if (typeof entry !== \"object\" || !entry) {\n continue;\n }\n const resource = entry;\n if (typeof resource.metadata === \"object\") {\n (_a = (_b = resource.metadata).labels) !== null && _a !== void 0 ? _a : (_b.labels = {});\n resource.metadata.labels[\"app.kubernetes.io/name\"] = this.name;\n resource.metadata.labels[\"app.kubernetes.io/managed-by\"] = productName;\n resource.metadata.labels[\"app.kubernetes.io/created-by\"] = \"resource-stack\";\n }\n resources.push(js_yaml__WEBPACK_IMPORTED_MODULE_6__[\"default\"].dump(resource));\n }\n }\n return resources;\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s/resource-stack.ts?");
31568
31601
 
31569
31602
  /***/ }),
31570
31603
 
@@ -31718,7 +31751,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
31718
31751
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31719
31752
 
31720
31753
  "use strict";
31721
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _user_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user-store */ \"./src/common/user-store/user-store.ts\");\n/* harmony import */ var _features_application_update_common_selected_update_channel_selected_update_channel_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../features/application-update/common/selected-update-channel/selected-update-channel.injectable */ \"./src/features/application-update/common/selected-update-channel/selected-update-channel.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\nconst userStoreInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"user-store\",\n instantiate: (di) => {\n _user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.resetInstance();\n return _user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.createInstance({\n selectedUpdateChannel: di.inject(_features_application_update_common_selected_update_channel_selected_update_channel_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n });\n },\n causesSideEffects: true,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (userStoreInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/user-store/user-store.injectable.ts?");
31754
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _user_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user-store */ \"./src/common/user-store/user-store.ts\");\n/* harmony import */ var _features_application_update_common_selected_update_channel_selected_update_channel_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../features/application-update/common/selected-update-channel/selected-update-channel.injectable */ \"./src/features/application-update/common/selected-update-channel/selected-update-channel.injectable.ts\");\n/* harmony import */ var _app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app-event-bus/emit-event.injectable */ \"./src/common/app-event-bus/emit-event.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\nconst userStoreInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"user-store\",\n instantiate: (di) => {\n _user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.resetInstance();\n return _user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.createInstance({\n selectedUpdateChannel: di.inject(_features_application_update_common_selected_update_channel_selected_update_channel_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n emitAppEvent: di.inject(_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n });\n },\n causesSideEffects: true,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (userStoreInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/common/user-store/user-store.injectable.ts?");
31722
31755
 
31723
31756
  /***/ }),
31724
31757
 
@@ -32499,7 +32532,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
32499
32532
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32500
32533
 
32501
32534
  "use strict";
32502
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"appEventBus\": () => (/* reexport safe */ _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_0__.appEventBus)\n/* harmony export */ });\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/common-api/event-bus.ts?");
32535
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"appEventBus\": () => (/* binding */ appEventBus)\n/* harmony export */ });\n/* harmony import */ var _common_app_event_bus_app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/app-event-bus/app-event-bus.injectable */ \"./src/common/app-event-bus/app-event-bus.injectable.ts\");\n/* harmony import */ var _as_legacy_globals_for_extension_api_as_legacy_global_object_for_extension_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api */ \"./src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst appEventBus = (0,_as_legacy_globals_for_extension_api_as_legacy_global_object_for_extension_api__WEBPACK_IMPORTED_MODULE_1__.asLegacyGlobalForExtensionApi)(_common_app_event_bus_app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/common-api/event-bus.ts?");
32503
32536
 
32504
32537
  /***/ }),
32505
32538
 
@@ -32965,14 +32998,25 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
32965
32998
 
32966
32999
  /***/ }),
32967
33000
 
32968
- /***/ "./src/main/resource-applier.ts":
32969
- /*!**************************************!*\
32970
- !*** ./src/main/resource-applier.ts ***!
32971
- \**************************************/
33001
+ /***/ "./src/main/resource-applier/create-resource-applier.injectable.ts":
33002
+ /*!*************************************************************************!*\
33003
+ !*** ./src/main/resource-applier/create-resource-applier.injectable.ts ***!
33004
+ \*************************************************************************/
33005
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33006
+
33007
+ "use strict";
33008
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _common_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/app-event-bus/emit-event.injectable */ \"./src/common/app-event-bus/emit-event.injectable.ts\");\n/* harmony import */ var _common_fs_delete_file_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/fs/delete-file.injectable */ \"./src/common/fs/delete-file.injectable.ts\");\n/* harmony import */ var _common_fs_exec_file_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/fs/exec-file.injectable */ \"./src/common/fs/exec-file.injectable.ts\");\n/* harmony import */ var _common_fs_write_file_injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/fs/write-file.injectable */ \"./src/common/fs/write-file.injectable.ts\");\n/* harmony import */ var _common_logger_injectable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/logger.injectable */ \"./src/common/logger.injectable.ts\");\n/* harmony import */ var _common_path_join_paths_injectable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/path/join-paths.injectable */ \"./src/common/path/join-paths.injectable.ts\");\n/* harmony import */ var _resource_applier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./resource-applier */ \"./src/main/resource-applier/resource-applier.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\nconst createResourceApplierInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"create-resource-applier\",\n instantiate: (di) => {\n const deps = {\n deleteFile: di.inject(_common_fs_delete_file_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n emitAppEvent: di.inject(_common_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n execFile: di.inject(_common_fs_exec_file_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n joinPaths: di.inject(_common_path_join_paths_injectable__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n logger: di.inject(_common_logger_injectable__WEBPACK_IMPORTED_MODULE_5__[\"default\"]),\n writeFile: di.inject(_common_fs_write_file_injectable__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n };\n return (cluster) => new _resource_applier__WEBPACK_IMPORTED_MODULE_7__.ResourceApplier(deps, cluster);\n },\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createResourceApplierInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/main/resource-applier/create-resource-applier.injectable.ts?");
33009
+
33010
+ /***/ }),
33011
+
33012
+ /***/ "./src/main/resource-applier/resource-applier.ts":
33013
+ /*!*******************************************************!*\
33014
+ !*** ./src/main/resource-applier/resource-applier.ts ***!
33015
+ \*******************************************************/
32972
33016
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32973
33017
 
32974
33018
  "use strict";
32975
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResourceApplier\": () => (/* binding */ ResourceApplier)\n/* harmony export */ });\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! js-yaml */ \"./node_modules/js-yaml/dist/js-yaml.mjs\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var tempy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tempy */ \"./node_modules/tempy/index.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_utils_promise_exec__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/utils/promise-exec */ \"./src/common/utils/promise-exec.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\nclass ResourceApplier {\n constructor(cluster) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n }\n /**\n * Patch a kube resource's manifest, throwing any error that occurs.\n * @param name The name of the kube resource\n * @param kind The kind of the kube resource\n * @param patch The list of JSON operations\n * @param ns The optional namespace of the kube resource\n */\n async patch(name, kind, patch, ns) {\n var _a;\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"resource\", action: \"patch\" });\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n const args = [\n \"--kubeconfig\", proxyKubeconfigPath,\n \"patch\",\n kind,\n name,\n ];\n if (ns) {\n args.push(\"--namespace\", ns);\n }\n args.push(\"--type\", \"json\", \"--patch\", JSON.stringify(patch), \"-o\", \"json\");\n try {\n const { stdout } = await (0,_common_utils_promise_exec__WEBPACK_IMPORTED_MODULE_8__.promiseExecFile)(kubectlPath, args);\n return stdout;\n }\n catch (error) {\n if ((0,_common_utils__WEBPACK_IMPORTED_MODULE_7__.isChildProcessError)(error)) {\n throw (_a = error.stderr) !== null && _a !== void 0 ? _a : error;\n }\n throw error;\n }\n }\n async create(resource) {\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"resource\", action: \"apply\" });\n console.log({ resource });\n return this.kubectlApply(this.sanitizeObject(resource));\n }\n async kubectlApply(content) {\n var _a, _b;\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n const fileName = tempy__WEBPACK_IMPORTED_MODULE_4__.file({ name: \"resource.yaml\" });\n const args = [\n \"apply\",\n \"--kubeconfig\", proxyKubeconfigPath,\n \"-o\", \"json\",\n \"-f\", fileName,\n ];\n _logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].debug(`shooting manifests with ${kubectlPath}`, { args });\n const execEnv = { ...process.env };\n const httpsProxy = (_a = this.cluster.preferences) === null || _a === void 0 ? void 0 : _a.httpsProxy;\n if (httpsProxy) {\n execEnv.HTTPS_PROXY = httpsProxy;\n }\n try {\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default().writeFile(fileName, content);\n const { stdout } = await (0,_common_utils_promise_exec__WEBPACK_IMPORTED_MODULE_8__.promiseExecFile)(kubectlPath, args);\n return stdout;\n }\n catch (error) {\n if ((0,_common_utils__WEBPACK_IMPORTED_MODULE_7__.isChildProcessError)(error)) {\n throw (_b = error.stderr) !== null && _b !== void 0 ? _b : error;\n }\n throw error;\n }\n finally {\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default().unlink(fileName);\n }\n }\n async kubectlApplyAll(resources, extraArgs = [\"-o\", \"json\"]) {\n return this.kubectlCmdAll(\"apply\", resources, extraArgs);\n }\n async kubectlDeleteAll(resources, extraArgs) {\n return this.kubectlCmdAll(\"delete\", resources, extraArgs);\n }\n async kubectlCmdAll(subCmd, resources, args = []) {\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n return new Promise((resolve, reject) => {\n const tmpDir = tempy__WEBPACK_IMPORTED_MODULE_4__.directory();\n // Dump each resource into tmpDir\n resources.forEach((resource, index) => {\n fs_extra__WEBPACK_IMPORTED_MODULE_1___default().writeFileSync(path__WEBPACK_IMPORTED_MODULE_3___default().join(tmpDir, `${index}.yaml`), resource);\n });\n args.push(\"-f\", `\"${tmpDir}\"`);\n const cmd = `\"${kubectlPath}\" ${subCmd} --kubeconfig \"${proxyKubeconfigPath}\" ${args.join(\" \")}`;\n _logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].info(`[RESOURCE-APPLIER] running cmd ${cmd}`);\n (0,child_process__WEBPACK_IMPORTED_MODULE_0__.exec)(cmd, (error, stdout) => {\n if (error) {\n _logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].error(`[RESOURCE-APPLIER] cmd errored: ${error}`);\n const splitError = error.toString().split(`.yaml\": `);\n if (splitError[1]) {\n reject(splitError[1]);\n }\n else {\n reject(error);\n }\n return;\n }\n resolve(stdout);\n });\n });\n }\n sanitizeObject(resource) {\n var _a, _b, _c;\n const res = js_yaml__WEBPACK_IMPORTED_MODULE_2__.load(resource);\n delete res.status;\n (_a = res.metadata) === null || _a === void 0 ? true : delete _a.resourceVersion;\n (_c = (_b = res.metadata) === null || _b === void 0 ? void 0 : _b.annotations) === null || _c === void 0 ? true : delete _c[\"kubectl.kubernetes.io/last-applied-configuration\"];\n return js_yaml__WEBPACK_IMPORTED_MODULE_2__.dump(res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/resource-applier.ts?");
33019
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResourceApplier\": () => (/* binding */ ResourceApplier)\n/* harmony export */ });\n/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! js-yaml */ \"./node_modules/js-yaml/dist/js-yaml.mjs\");\n/* harmony import */ var tempy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tempy */ \"./node_modules/tempy/index.js\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nclass ResourceApplier {\n constructor(dependencies, cluster) {\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n }\n /**\n * Patch a kube resource's manifest, throwing any error that occurs.\n * @param name The name of the kube resource\n * @param kind The kind of the kube resource\n * @param patch The list of JSON operations\n * @param ns The optional namespace of the kube resource\n */\n async patch(name, kind, patch, ns) {\n this.dependencies.emitAppEvent({ name: \"resource\", action: \"patch\" });\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n const args = [\n \"--kubeconfig\", proxyKubeconfigPath,\n \"patch\",\n kind,\n name,\n ];\n if (ns) {\n args.push(\"--namespace\", ns);\n }\n args.push(\"--type\", \"json\", \"--patch\", JSON.stringify(patch), \"-o\", \"json\");\n const result = await this.dependencies.execFile(kubectlPath, args);\n if (result.callWasSuccessful) {\n return result.response;\n }\n throw result.error.stderr || result.error.message;\n }\n async create(resource) {\n this.dependencies.emitAppEvent({ name: \"resource\", action: \"apply\" });\n return this.kubectlApply(this.sanitizeObject(resource));\n }\n async kubectlApply(content) {\n var _a;\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n const fileName = tempy__WEBPACK_IMPORTED_MODULE_1__.file({ name: \"resource.yaml\" });\n const args = [\n \"apply\",\n \"--kubeconfig\", proxyKubeconfigPath,\n \"-o\", \"json\",\n \"-f\", fileName,\n ];\n this.dependencies.logger.debug(`shooting manifests with ${kubectlPath}`, { args });\n const execEnv = { ...process.env };\n const httpsProxy = (_a = this.cluster.preferences) === null || _a === void 0 ? void 0 : _a.httpsProxy;\n if (httpsProxy) {\n execEnv.HTTPS_PROXY = httpsProxy;\n }\n try {\n await this.dependencies.writeFile(fileName, content);\n const result = await this.dependencies.execFile(kubectlPath, args);\n if (result.callWasSuccessful) {\n return result.response;\n }\n throw result.error.stderr || result.error.message;\n }\n finally {\n await this.dependencies.deleteFile(fileName);\n }\n }\n async kubectlApplyAll(resources, extraArgs = [\"-o\", \"json\"]) {\n return this.kubectlCmdAll(\"apply\", resources, extraArgs);\n }\n async kubectlDeleteAll(resources, extraArgs) {\n return this.kubectlCmdAll(\"delete\", resources, extraArgs);\n }\n async kubectlCmdAll(subCmd, resources, parentArgs = []) {\n const kubectl = await this.cluster.ensureKubectl();\n const kubectlPath = await kubectl.getPath();\n const proxyKubeconfigPath = await this.cluster.getProxyKubeconfigPath();\n const tmpDir = tempy__WEBPACK_IMPORTED_MODULE_1__.directory();\n await Promise.all(resources.map((resource, index) => this.dependencies.writeFile(this.dependencies.joinPaths(tmpDir, `${index}.yaml`), resource)));\n const args = [\n subCmd,\n \"--kubeconfig\", `\"${proxyKubeconfigPath}\"`,\n ...parentArgs,\n \"-f\", `\"${tmpDir}\"`,\n ];\n this.dependencies.logger.info(`[RESOURCE-APPLIER] running kubectl`, { args });\n const result = await this.dependencies.execFile(kubectlPath, args);\n if (result.callWasSuccessful) {\n return result.response;\n }\n this.dependencies.logger.error(`[RESOURCE-APPLIER] kubectl errored: ${result.error.message}`);\n const splitError = result.error.stderr.split(`.yaml\": `);\n throw splitError[1] || result.error.message;\n }\n sanitizeObject(resource) {\n var _a, _b, _c;\n const res = js_yaml__WEBPACK_IMPORTED_MODULE_0__.load(resource);\n delete res.status;\n (_a = res.metadata) === null || _a === void 0 ? true : delete _a.resourceVersion;\n (_c = (_b = res.metadata) === null || _b === void 0 ? void 0 : _b.annotations) === null || _c === void 0 ? true : delete _c[\"kubectl.kubernetes.io/last-applied-configuration\"];\n return js_yaml__WEBPACK_IMPORTED_MODULE_0__.dump(res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/resource-applier/resource-applier.ts?");
32976
33020
 
32977
33021
  /***/ }),
32978
33022
 
@@ -33005,7 +33049,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
33005
33049
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33006
33050
 
33007
33051
  "use strict";
33008
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _create_lens_window_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-lens-window.injectable */ \"./src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.ts\");\n/* harmony import */ var _lens_proxy_lens_proxy_port_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../lens-proxy/lens-proxy-port.injectable */ \"./src/main/lens-proxy/lens-proxy-port.injectable.ts\");\n/* harmony import */ var _common_vars_is_mac_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../common/vars/is-mac.injectable */ \"./src/common/vars/is-mac.injectable.ts\");\n/* harmony import */ var _common_app_event_bus_app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../common/app-event-bus/app-event-bus.injectable */ \"./src/common/app-event-bus/app-event-bus.injectable.ts\");\n/* harmony import */ var _wait_until_bundled_extensions_are_loaded_injectable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./wait-until-bundled-extensions-are-loaded.injectable */ \"./src/main/start-main-application/lens-window/application-window/wait-until-bundled-extensions-are-loaded.injectable.ts\");\n/* harmony import */ var _application_window_injection_token__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./application-window-injection-token */ \"./src/main/start-main-application/lens-window/application-window/application-window-injection-token.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_vars_app_name_injectable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../common/vars/app-name.injectable */ \"./src/common/vars/app-name.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\nconst createApplicationWindowInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"create-application-window\",\n instantiate: (parentDi) => (id) => {\n const windowInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: `application-window-for-${id}`,\n instantiate: (di) => {\n const createLensWindow = di.inject(_create_lens_window_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n const isMac = di.inject(_common_vars_is_mac_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n const applicationName = di.inject(_common_vars_app_name_injectable__WEBPACK_IMPORTED_MODULE_7__[\"default\"]);\n const appEventBus = di.inject(_common_app_event_bus_app_event_bus_injectable__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n const waitUntilBundledExtensionsAreLoaded = di.inject(_wait_until_bundled_extensions_are_loaded_injectable__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\n const lensProxyPort = di.inject(_lens_proxy_lens_proxy_port_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n return createLensWindow({\n id,\n title: applicationName,\n defaultHeight: 900,\n defaultWidth: 1440,\n getContentSource: () => ({\n url: `http://localhost:${lensProxyPort.get()}`,\n }),\n resizable: true,\n windowFrameUtilitiesAreShown: isMac,\n titleBarStyle: isMac ? \"hiddenInset\" : \"hidden\",\n centered: false,\n onFocus: () => {\n appEventBus.emit({ name: \"app\", action: \"focus\" });\n },\n onBlur: () => {\n appEventBus.emit({ name: \"app\", action: \"blur\" });\n },\n onDomReady: () => {\n appEventBus.emit({ name: \"app\", action: \"dom-ready\" });\n },\n onClose: () => {\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.runInAction)(() => {\n parentDi.deregister(windowInjectable);\n });\n },\n beforeOpen: waitUntilBundledExtensionsAreLoaded,\n });\n },\n injectionToken: _application_window_injection_token__WEBPACK_IMPORTED_MODULE_6__.applicationWindowInjectionToken,\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.runInAction)(() => {\n parentDi.register(windowInjectable);\n });\n return parentDi.inject(windowInjectable);\n },\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createApplicationWindowInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/main/start-main-application/lens-window/application-window/create-application-window.injectable.ts?");
33052
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _create_lens_window_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-lens-window.injectable */ \"./src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.ts\");\n/* harmony import */ var _lens_proxy_lens_proxy_port_injectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../lens-proxy/lens-proxy-port.injectable */ \"./src/main/lens-proxy/lens-proxy-port.injectable.ts\");\n/* harmony import */ var _common_vars_is_mac_injectable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../common/vars/is-mac.injectable */ \"./src/common/vars/is-mac.injectable.ts\");\n/* harmony import */ var _wait_until_bundled_extensions_are_loaded_injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./wait-until-bundled-extensions-are-loaded.injectable */ \"./src/main/start-main-application/lens-window/application-window/wait-until-bundled-extensions-are-loaded.injectable.ts\");\n/* harmony import */ var _application_window_injection_token__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./application-window-injection-token */ \"./src/main/start-main-application/lens-window/application-window/application-window-injection-token.ts\");\n/* harmony import */ var _common_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../common/app-event-bus/emit-event.injectable */ \"./src/common/app-event-bus/emit-event.injectable.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_vars_app_name_injectable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../common/vars/app-name.injectable */ \"./src/common/vars/app-name.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\nconst createApplicationWindowInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"create-application-window\",\n instantiate: (parentDi) => (id) => {\n const windowInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: `application-window-for-${id}`,\n instantiate: (di) => {\n const createLensWindow = di.inject(_create_lens_window_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n const isMac = di.inject(_common_vars_is_mac_injectable__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n const applicationName = di.inject(_common_vars_app_name_injectable__WEBPACK_IMPORTED_MODULE_7__[\"default\"]);\n const waitUntilBundledExtensionsAreLoaded = di.inject(_wait_until_bundled_extensions_are_loaded_injectable__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n const lensProxyPort = di.inject(_lens_proxy_lens_proxy_port_injectable__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n const emitAppEvent = di.inject(_common_app_event_bus_emit_event_injectable__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n return createLensWindow({\n id,\n title: applicationName,\n defaultHeight: 900,\n defaultWidth: 1440,\n getContentSource: () => ({\n url: `http://localhost:${lensProxyPort.get()}`,\n }),\n resizable: true,\n windowFrameUtilitiesAreShown: isMac,\n titleBarStyle: isMac ? \"hiddenInset\" : \"hidden\",\n centered: false,\n onFocus: () => {\n emitAppEvent({ name: \"app\", action: \"focus\" });\n },\n onBlur: () => {\n emitAppEvent({ name: \"app\", action: \"blur\" });\n },\n onDomReady: () => {\n emitAppEvent({ name: \"app\", action: \"dom-ready\" });\n },\n onClose: () => {\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.runInAction)(() => {\n parentDi.deregister(windowInjectable);\n });\n },\n beforeOpen: waitUntilBundledExtensionsAreLoaded,\n });\n },\n injectionToken: _application_window_injection_token__WEBPACK_IMPORTED_MODULE_5__.applicationWindowInjectionToken,\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.runInAction)(() => {\n parentDi.register(windowInjectable);\n });\n return parentDi.inject(windowInjectable);\n },\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createApplicationWindowInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/main/start-main-application/lens-window/application-window/create-application-window.injectable.ts?");
33009
33053
 
33010
33054
  /***/ }),
33011
33055
 
@@ -40771,7 +40815,7 @@ eval("module.exports = JSON.parse('{\"name\":\"winston\",\"description\":\"A log
40771
40815
  /***/ ((module) => {
40772
40816
 
40773
40817
  "use strict";
40774
- eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"6.2.0-alpha.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2022 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"adr:create\":\"echo \\\\\"What is the title?\\\\\"; read title; adr new \\\\\"$title\\\\\"\",\"adr:change-status\":\"echo \\\\\"Decision number?:\\\\\"; read decision; adr status $decision\",\"adr:update-readme\":\"adr update\",\"adr:list\":\"adr list\",\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch ./static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run ts-node webpack/dev-server.ts\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack/main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack/renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack/extensions.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"test:unit\":\"func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func\",\"test:integration\":\"func() { jest ${1:-xyz} --watch --runInBand --detectOpenHandles --forceExit --modulePaths=[\\\\\"<rootDir>/integration/\\\\\"]; }; func\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download:binaries\":\"yarn run ts-node build/download_binaries.ts\",\"build:tray-icons\":\"yarn run ts-node build/generate-tray-icons.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\",\"precreate-release-pr\":\"npx swc ./scripts/create-release-pr.ts -o ./scripts/create-release-pr.mjs\",\"create-release-pr\":\"node ./scripts/create-release-pr.mjs\"},\"config\":{\"k8sProxyVersion\":\"0.3.0\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\",\"contentSecurityPolicy\":\"script-src \\'unsafe-eval\\' \\'self\\'; frame-src http://*.localhost:*/; img-src * data:\",\"welcomeRoute\":\"/welcome\"},\"engines\":{\"node\":\">=16 <17\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.(t|j)sx?$\":[\"@swc/jest\"]},\"testEnvironment\":\"jsdom\",\"resolver\":\"<rootDir>/src/jest-28-resolver.js\",\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"identity-obj-proxy\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globalSetup\":\"<rootDir>/src/jest.timezone.ts\",\"setupFilesAfterEnv\":[\"<rootDir>/src/jest-after-env.setup.ts\"],\"runtime\":\"@side/jest-runtime\"},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/linux/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/darwin/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/${arch}/kubectl.exe\",\"to\":\"./${arch}/kubectl.exe\"},{\"from\":\"binaries/client/windows/${arch}/lens-k8s-proxy.exe\",\"to\":\"./${arch}/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/${arch}/helm.exe\",\"to\":\"./${arch}/helm.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"resolutions\":{\"@astronautlabs/jsonpath/underscore\":\"^1.12.1\"},\"dependencies\":{\"@astronautlabs/jsonpath\":\"^1.1.0\",\"@hapi/call\":\"^9.0.0\",\"@hapi/subtext\":\"^7.0.4\",\"@kubernetes/client-node\":\"^0.17.1\",\"@material-ui/styles\":\"^4.11.5\",\"@ogre-tools/fp\":\"^12.0.1\",\"@ogre-tools/injectable\":\"^12.0.1\",\"@ogre-tools/injectable-extension-for-auto-registration\":\"^12.0.1\",\"@ogre-tools/injectable-extension-for-mobx\":\"^12.0.1\",\"@ogre-tools/injectable-react\":\"^12.0.1\",\"@sentry/electron\":\"^3.0.8\",\"@sentry/integrations\":\"^6.19.3\",\"@side/jest-runtime\":\"^1.0.1\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"await-lock\":\"^2.2.2\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.5.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.5\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.6\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.5\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"history\":\"^4.10.1\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.16\",\"joi\":\"^17.6.4\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.1.1\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.6.2\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.5.3\",\"mobx-utils\":\"^6.0.4\",\"mock-fs\":\"^5.1.4\",\"moment\":\"^2.29.4\",\"moment-timezone\":\"^0.5.38\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"^2.6.7\",\"node-pty\":\"0.10.1\",\"npm\":\"^8.19.2\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.11\",\"react-router\":\"^5.3.4\",\"react-virtualized-auto-sizer\":\"^1.0.7\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"selfsigned\":\"^2.1.1\",\"semver\":\"^7.3.8\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"typed-regex\":\"^0.0.8\",\"url-parse\":\"^1.5.10\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.5.0\",\"winston\":\"^3.8.2\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^8.10.0\",\"xterm-link-provider\":\"^1.3.1\"},\"devDependencies\":{\"@async-fn/jest\":\"1.6.4\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.8\",\"@sentry/types\":\"^6.19.7\",\"@swc/cli\":\"^0.1.57\",\"@swc/core\":\"^1.3.11\",\"@swc/jest\":\"^0.2.23\",\"@testing-library/dom\":\"^7.31.2\",\"@testing-library/jest-dom\":\"^5.16.5\",\"@testing-library/react\":\"^12.1.5\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.36\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"@types/cli-progress\":\"^3.11.0\",\"@types/color\":\"^3.0.3\",\"@types/command-line-args\":\"^5.2.0\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.4\",\"@types/electron-devtools-installer\":\"^2.2.1\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/gunzip-maybe\":\"^1.4.0\",\"@types/hapi__call\":\"^9.0.0\",\"@types/hapi__subtext\":\"^7.0.0\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.9\",\"@types/jest\":\"^28.1.6\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.14\",\"@types/lodash\":\"^4.14.186\",\"@types/marked\":\"^4.0.7\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"^16.18.2\",\"@types/node-fetch\":\"^2.6.2\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.45\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.16\",\"@types/react-router\":\"^5.1.19\",\"@types/react-router-dom\":\"^5.3.3\",\"@types/react-table\":\"^7.7.12\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.13\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.13\",\"@types/sharp\":\"^0.31.0\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^6.1.3\",\"@types/tar-stream\":\"^2.2.2\",\"@types/tcp-port-used\":\"^1.0.1\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.8\",\"@types/uuid\":\"^8.3.4\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.18.0\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.41.0\",\"@typescript-eslint/parser\":\"^5.41.0\",\"adr\":\"^1.4.3\",\"ansi_up\":\"^5.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"cli-progress\":\"^3.11.2\",\"color\":\"^3.2.1\",\"command-line-args\":\"^5.2.1\",\"concurrently\":\"^7.5.0\",\"css-loader\":\"^6.7.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.4.0\",\"electron\":\"^19.1.3\",\"electron-builder\":\"^23.6.0\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.15.12\",\"esbuild-loader\":\"^2.20.0\",\"eslint\":\"^8.26.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.26.0\",\"eslint-plugin-react\":\"7.31.10\",\"eslint-plugin-react-hooks\":\"^4.6.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"fork-ts-checker-webpack-plugin\":\"^6.5.2\",\"gunzip-maybe\":\"^1.4.2\",\"html-webpack-plugin\":\"^5.5.0\",\"identity-obj-proxy\":\"^3.0.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"^28.1.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-environment-jsdom\":\"^28.1.3\",\"jest-mock-extended\":\"^2.0.9\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.6.1\",\"mock-http\":\"^1.1.0\",\"node-gyp\":\"^8.3.0\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.20\",\"playwright\":\"^1.27.1\",\"postcss\":\"^8.4.18\",\"postcss-loader\":\"^6.2.1\",\"query-string\":\"^7.1.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.1\",\"react-refresh\":\"^0.14.0\",\"react-refresh-typescript\":\"^2.0.7\",\"react-router-dom\":\"^5.3.4\",\"react-select\":\"^5.5.7\",\"react-select-event\":\"^5.5.1\",\"react-table\":\"^7.8.0\",\"react-window\":\"^1.8.7\",\"sass\":\"^1.55.0\",\"sass-loader\":\"^12.6.0\",\"sharp\":\"^0.31.1\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.2.1\",\"tar-stream\":\"^2.2.0\",\"ts-loader\":\"^9.4.1\",\"ts-node\":\"^10.9.1\",\"type-fest\":\"^2.14.0\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.23.19\",\"typedoc-plugin-markdown\":\"^3.13.6\",\"typescript\":\"^4.8.4\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.74.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.11.1\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.19.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
40818
+ eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"6.2.0-alpha.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2022 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"adr:create\":\"echo \\\\\"What is the title?\\\\\"; read title; adr new \\\\\"$title\\\\\"\",\"adr:change-status\":\"echo \\\\\"Decision number?:\\\\\"; read decision; adr status $decision\",\"adr:update-readme\":\"adr update\",\"adr:list\":\"adr list\",\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch ./static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run ts-node webpack/dev-server.ts\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack/main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack/renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack/extensions.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"test:unit\":\"func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func\",\"test:integration\":\"func() { jest ${1:-xyz} --watch --runInBand --detectOpenHandles --forceExit --modulePaths=[\\\\\"<rootDir>/integration/\\\\\"]; }; func\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download:binaries\":\"yarn run ts-node build/download_binaries.ts\",\"build:tray-icons\":\"yarn run ts-node build/generate-tray-icons.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\",\"precreate-release-pr\":\"npx swc ./scripts/create-release-pr.ts -o ./scripts/create-release-pr.mjs\",\"create-release-pr\":\"node ./scripts/create-release-pr.mjs\"},\"config\":{\"k8sProxyVersion\":\"0.3.0\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\",\"contentSecurityPolicy\":\"script-src \\'unsafe-eval\\' \\'self\\'; frame-src http://*.localhost:*/; img-src * data:\",\"welcomeRoute\":\"/welcome\"},\"engines\":{\"node\":\">=16 <17\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.(t|j)sx?$\":[\"@swc/jest\"]},\"testEnvironment\":\"jsdom\",\"resolver\":\"<rootDir>/src/jest-28-resolver.js\",\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"identity-obj-proxy\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globalSetup\":\"<rootDir>/src/jest.timezone.ts\",\"setupFilesAfterEnv\":[\"<rootDir>/src/jest-after-env.setup.ts\"],\"runtime\":\"@side/jest-runtime\"},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/linux/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/darwin/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/${arch}/kubectl.exe\",\"to\":\"./${arch}/kubectl.exe\"},{\"from\":\"binaries/client/windows/${arch}/lens-k8s-proxy.exe\",\"to\":\"./${arch}/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/${arch}/helm.exe\",\"to\":\"./${arch}/helm.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"resolutions\":{\"@astronautlabs/jsonpath/underscore\":\"^1.12.1\"},\"dependencies\":{\"@astronautlabs/jsonpath\":\"^1.1.0\",\"@hapi/call\":\"^9.0.0\",\"@hapi/subtext\":\"^7.0.4\",\"@kubernetes/client-node\":\"^0.17.1\",\"@material-ui/styles\":\"^4.11.5\",\"@ogre-tools/fp\":\"^12.0.1\",\"@ogre-tools/injectable\":\"^12.0.1\",\"@ogre-tools/injectable-extension-for-auto-registration\":\"^12.0.1\",\"@ogre-tools/injectable-extension-for-mobx\":\"^12.0.1\",\"@ogre-tools/injectable-react\":\"^12.0.1\",\"@sentry/electron\":\"^3.0.8\",\"@sentry/integrations\":\"^6.19.3\",\"@side/jest-runtime\":\"^1.0.1\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"await-lock\":\"^2.2.2\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.5.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.5\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.6\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.5\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"history\":\"^4.10.1\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.16\",\"joi\":\"^17.6.4\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.1.1\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.6.2\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.5.3\",\"mobx-utils\":\"^6.0.4\",\"mock-fs\":\"^5.2.0\",\"moment\":\"^2.29.4\",\"moment-timezone\":\"^0.5.38\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"^2.6.7\",\"node-pty\":\"0.10.1\",\"npm\":\"^8.19.2\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.11\",\"react-router\":\"^5.3.4\",\"react-virtualized-auto-sizer\":\"^1.0.7\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"selfsigned\":\"^2.1.1\",\"semver\":\"^7.3.8\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"typed-regex\":\"^0.0.8\",\"url-parse\":\"^1.5.10\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.5.0\",\"winston\":\"^3.8.2\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^8.10.0\",\"xterm-link-provider\":\"^1.3.1\"},\"devDependencies\":{\"@async-fn/jest\":\"1.6.4\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.8\",\"@sentry/types\":\"^6.19.7\",\"@swc/cli\":\"^0.1.57\",\"@swc/core\":\"^1.3.11\",\"@swc/jest\":\"^0.2.23\",\"@testing-library/dom\":\"^7.31.2\",\"@testing-library/jest-dom\":\"^5.16.5\",\"@testing-library/react\":\"^12.1.5\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.36\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"@types/cli-progress\":\"^3.11.0\",\"@types/color\":\"^3.0.3\",\"@types/command-line-args\":\"^5.2.0\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.4\",\"@types/electron-devtools-installer\":\"^2.2.1\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/gunzip-maybe\":\"^1.4.0\",\"@types/hapi__call\":\"^9.0.0\",\"@types/hapi__subtext\":\"^7.0.0\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.9\",\"@types/jest\":\"^28.1.6\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.14\",\"@types/lodash\":\"^4.14.187\",\"@types/marked\":\"^4.0.7\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"^16.18.3\",\"@types/node-fetch\":\"^2.6.2\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.45\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.16\",\"@types/react-router\":\"^5.1.19\",\"@types/react-router-dom\":\"^5.3.3\",\"@types/react-table\":\"^7.7.12\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.13\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.13\",\"@types/sharp\":\"^0.31.0\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^6.1.3\",\"@types/tar-stream\":\"^2.2.2\",\"@types/tcp-port-used\":\"^1.0.1\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.8\",\"@types/uuid\":\"^8.3.4\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.18.0\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.41.0\",\"@typescript-eslint/parser\":\"^5.42.0\",\"adr\":\"^1.4.3\",\"ansi_up\":\"^5.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"cli-progress\":\"^3.11.2\",\"color\":\"^3.2.1\",\"command-line-args\":\"^5.2.1\",\"concurrently\":\"^7.5.0\",\"css-loader\":\"^6.7.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.4.0\",\"electron\":\"^19.1.3\",\"electron-builder\":\"^23.6.0\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.15.12\",\"esbuild-loader\":\"^2.20.0\",\"eslint\":\"^8.26.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.26.0\",\"eslint-plugin-react\":\"7.31.10\",\"eslint-plugin-react-hooks\":\"^4.6.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"fork-ts-checker-webpack-plugin\":\"^6.5.2\",\"gunzip-maybe\":\"^1.4.2\",\"html-webpack-plugin\":\"^5.5.0\",\"identity-obj-proxy\":\"^3.0.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"^28.1.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-environment-jsdom\":\"^28.1.3\",\"jest-mock-extended\":\"^2.0.9\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.6.1\",\"mock-http\":\"^1.1.0\",\"node-gyp\":\"^8.3.0\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.20\",\"playwright\":\"^1.27.1\",\"postcss\":\"^8.4.18\",\"postcss-loader\":\"^6.2.1\",\"query-string\":\"^7.1.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.1\",\"react-refresh\":\"^0.14.0\",\"react-refresh-typescript\":\"^2.0.7\",\"react-router-dom\":\"^5.3.4\",\"react-select\":\"^5.5.7\",\"react-select-event\":\"^5.5.1\",\"react-table\":\"^7.8.0\",\"react-window\":\"^1.8.8\",\"sass\":\"^1.55.0\",\"sass-loader\":\"^12.6.0\",\"sharp\":\"^0.31.1\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.2.1\",\"tar-stream\":\"^2.2.0\",\"ts-loader\":\"^9.4.1\",\"ts-node\":\"^10.9.1\",\"type-fest\":\"^2.14.0\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.23.19\",\"typedoc-plugin-markdown\":\"^3.13.6\",\"typescript\":\"^4.8.4\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.74.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.11.1\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.19.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
40775
40819
 
40776
40820
  /***/ }),
40777
40821