in TABLE offset (see also export outerHeight)\n // http://jsperf.com/offset-vs-getboundingclientrect/8\n box = elementToCheck.getBoundingClientRect();\n return {\n top: box.top + (rootWindow.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),\n left: box.left + (rootWindow.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0)\n };\n }\n offsetLeft = elementToCheck.offsetLeft;\n offsetTop = elementToCheck.offsetTop;\n lastElem = elementToCheck;\n\n /* eslint-disable no-cond-assign */\n while (elementToCheck = elementToCheck.offsetParent) {\n // from my observation, document.body always has scrollLeft/scrollTop == 0\n if (elementToCheck === rootDocument.body) {\n break;\n }\n offsetLeft += elementToCheck.offsetLeft;\n offsetTop += elementToCheck.offsetTop;\n lastElem = elementToCheck;\n }\n\n // slow - http://jsperf.com/offset-vs-getboundingclientrect/6\n if (lastElem && lastElem.style.position === 'fixed') {\n // if(lastElem !== document.body) { //faster but does gives false positive in Firefox\n offsetLeft += rootWindow.pageXOffset || documentElement.scrollLeft;\n offsetTop += rootWindow.pageYOffset || documentElement.scrollTop;\n }\n return {\n left: offsetLeft,\n top: offsetTop\n };\n}\n\n/**\n * Returns the document's scrollTop property.\n *\n * @param {Window} [rootWindow] The document window owner.\n * @returns {number}\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getWindowScrollTop() {\n var rootWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n var res = rootWindow.scrollY;\n if (res === void 0) {\n // IE8-11\n res = rootWindow.document.documentElement.scrollTop;\n }\n return res;\n}\n\n/**\n * Returns the document's scrollLeft property.\n *\n * @param {Window} [rootWindow] The document window owner.\n * @returns {number}\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getWindowScrollLeft() {\n var rootWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n var res = rootWindow.scrollX;\n if (res === void 0) {\n // IE8-11\n res = rootWindow.document.documentElement.scrollLeft;\n }\n return res;\n}\n\n/**\n * Returns the provided element's scrollTop property.\n *\n * @param {HTMLElement} element An element to get the scroll top position from.\n * @param {Window} [rootWindow] The document window owner.\n * @returns {number}\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getScrollTop(element) {\n var rootWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;\n if (element === rootWindow) {\n return getWindowScrollTop(rootWindow);\n }\n return element.scrollTop;\n}\n\n/**\n * Returns the provided element's scrollLeft property.\n *\n * @param {HTMLElement} element An element to get the scroll left position from.\n * @param {Window} [rootWindow] The document window owner.\n * @returns {number}\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getScrollLeft(element) {\n var rootWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;\n if (element === rootWindow) {\n return getWindowScrollLeft(rootWindow);\n }\n return element.scrollLeft;\n}\n\n/**\n * Returns a DOM element responsible for scrolling of the provided element.\n *\n * @param {HTMLElement} element An element to get the scrollable element from.\n * @returns {HTMLElement} Element's scrollable parent.\n */\nexport function getScrollableElement(element) {\n var rootDocument = element.ownerDocument;\n var rootWindow = rootDocument ? rootDocument.defaultView : void 0;\n if (!rootDocument) {\n rootDocument = element.document ? element.document : element;\n rootWindow = rootDocument.defaultView;\n }\n var props = ['auto', 'scroll'];\n var supportedGetComputedStyle = isGetComputedStyleSupported();\n var el = element.parentNode;\n while (el && el.style && rootDocument.body !== el) {\n var _el$style = el.style,\n overflow = _el$style.overflow,\n overflowX = _el$style.overflowX,\n overflowY = _el$style.overflowY;\n if ([overflow, overflowX, overflowY].includes('scroll')) {\n return el;\n } else if (supportedGetComputedStyle) {\n var _rootWindow$getComput = rootWindow.getComputedStyle(el);\n overflow = _rootWindow$getComput.overflow;\n overflowX = _rootWindow$getComput.overflowX;\n overflowY = _rootWindow$getComput.overflowY;\n if (props.includes(overflow) || props.includes(overflowX) || props.includes(overflowY)) {\n return el;\n }\n }\n\n // The '+ 1' after the scrollHeight/scrollWidth is to prevent problems with zoomed out Chrome.\n if (el.clientHeight <= el.scrollHeight + 1 && (props.includes(overflowY) || props.includes(overflow))) {\n return el;\n }\n if (el.clientWidth <= el.scrollWidth + 1 && (props.includes(overflowX) || props.includes(overflow))) {\n return el;\n }\n el = el.parentNode;\n }\n return rootWindow;\n}\n\n/**\n * Returns a DOM element responsible for trimming the provided element.\n *\n * @param {HTMLElement} base Base element.\n * @returns {HTMLElement} Base element's trimming parent.\n */\nexport function getTrimmingContainer(base) {\n var rootDocument = base.ownerDocument;\n var rootWindow = rootDocument.defaultView;\n var el = base.parentNode;\n while (el && el.style && rootDocument.body !== el) {\n if (el.style.overflow !== 'visible' && el.style.overflow !== '') {\n return el;\n }\n var computedStyle = getComputedStyle(el, rootWindow);\n var allowedProperties = ['scroll', 'hidden', 'auto'];\n var property = computedStyle.getPropertyValue('overflow');\n var propertyY = computedStyle.getPropertyValue('overflow-y');\n var propertyX = computedStyle.getPropertyValue('overflow-x');\n if (allowedProperties.includes(property) || allowedProperties.includes(propertyY) || allowedProperties.includes(propertyX)) {\n return el;\n }\n el = el.parentNode;\n }\n return rootWindow;\n}\n\n/**\n * Returns a style property for the provided element. (Be it an inline or external style).\n *\n * @param {HTMLElement} element An element to get the style from.\n * @param {string} prop Wanted property.\n * @param {Window} [rootWindow] The document window owner.\n * @returns {string|undefined} Element's style property.\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getStyle(element, prop) {\n var rootWindow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : window;\n if (!element) {\n return;\n } else if (element === rootWindow) {\n if (prop === 'width') {\n return \"\".concat(rootWindow.innerWidth, \"px\");\n } else if (prop === 'height') {\n return \"\".concat(rootWindow.innerHeight, \"px\");\n }\n return;\n }\n var styleProp = element.style[prop];\n if (styleProp !== '' && styleProp !== void 0) {\n return styleProp;\n }\n var computedStyle = getComputedStyle(element, rootWindow);\n if (computedStyle[prop] !== '' && computedStyle[prop] !== void 0) {\n return computedStyle[prop];\n }\n}\n\n/**\n * Verifies if element fit to provided CSSRule.\n *\n * @param {Element} element Element to verify with selector text.\n * @param {CSSRule} rule Selector text from CSSRule.\n * @returns {boolean}\n */\nexport function matchesCSSRules(element, rule) {\n var selectorText = rule.selectorText;\n var result = false;\n if (rule.type === CSSRule.STYLE_RULE && selectorText) {\n if (element.msMatchesSelector) {\n result = element.msMatchesSelector(selectorText);\n } else if (element.matches) {\n result = element.matches(selectorText);\n }\n }\n return result;\n}\n\n/**\n * Returns a computed style object for the provided element. (Needed if style is declared in external stylesheet).\n *\n * @param {HTMLElement} element An element to get style from.\n * @param {Window} [rootWindow] The document window owner.\n * @returns {IEElementStyle|CssStyle} Elements computed style object.\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getComputedStyle(element) {\n var rootWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;\n return element.currentStyle || rootWindow.getComputedStyle(element);\n}\n\n/**\n * Returns the element's outer width.\n *\n * @param {HTMLElement} element An element to get the width from.\n * @returns {number} Element's outer width.\n */\nexport function outerWidth(element) {\n return element.offsetWidth;\n}\n\n/**\n * Returns the element's outer height.\n *\n * @param {HTMLElement} element An element to get the height from.\n * @returns {number} Element's outer height.\n */\nexport function outerHeight(element) {\n if (hasCaptionProblem() && element.firstChild && element.firstChild.nodeName === 'CAPTION') {\n // fixes problem with Firefox ignoring
in TABLE.offsetHeight\n // jQuery (1.10.1) still has this unsolved\n // may be better to just switch to getBoundingClientRect\n // http://bililite.com/blog/2009/03/27/finding-the-size-of-a-table/\n // http://lists.w3.org/Archives/Public/www-style/2009Oct/0089.html\n // http://bugs.jquery.com/ticket/2196\n // http://lists.w3.org/Archives/Public/www-style/2009Oct/0140.html#start140\n return element.offsetHeight + element.firstChild.offsetHeight;\n }\n return element.offsetHeight;\n}\n\n/**\n * Returns the element's inner height.\n *\n * @param {HTMLElement} element An element to get the height from.\n * @returns {number} Element's inner height.\n */\nexport function innerHeight(element) {\n return element.clientHeight || element.innerHeight;\n}\n\n/**\n * Returns the element's inner width.\n *\n * @param {HTMLElement} element An element to get the width from.\n * @returns {number} Element's inner width.\n */\nexport function innerWidth(element) {\n return element.clientWidth || element.innerWidth;\n}\n\n/**\n * @param {HTMLElement} element An element to which the event is added.\n * @param {string} event The event name.\n * @param {Function} callback The callback to add.\n */\nexport function addEvent(element, event, callback) {\n element.addEventListener(event, callback, false);\n}\n\n/**\n * @param {HTMLElement} element An element from which the event is removed.\n * @param {string} event The event name.\n * @param {Function} callback The function reference to remove.\n */\nexport function removeEvent(element, event, callback) {\n element.removeEventListener(event, callback, false);\n}\n\n/**\n * Returns caret position in text input.\n *\n * @author https://stackoverflow.com/questions/263743/how-to-get-caret-position-in-textarea\n * @param {HTMLElement} el An element to check.\n * @returns {number}\n */\nexport function getCaretPosition(el) {\n var rootDocument = el.ownerDocument;\n if (el.selectionStart) {\n return el.selectionStart;\n } else if (rootDocument.selection) {\n // IE8\n el.focus();\n var r = rootDocument.selection.createRange();\n if (r === null) {\n return 0;\n }\n var re = el.createTextRange();\n var rc = re.duplicate();\n re.moveToBookmark(r.getBookmark());\n rc.setEndPoint('EndToStart', re);\n return rc.text.length;\n }\n return 0;\n}\n\n/**\n * Returns end of the selection in text input.\n *\n * @param {HTMLElement} el An element to check.\n * @returns {number}\n */\nexport function getSelectionEndPosition(el) {\n var rootDocument = el.ownerDocument;\n if (el.selectionEnd) {\n return el.selectionEnd;\n } else if (rootDocument.selection) {\n // IE8\n var r = rootDocument.selection.createRange();\n if (r === null) {\n return 0;\n }\n var re = el.createTextRange();\n return re.text.indexOf(r.text) + r.text.length;\n }\n return 0;\n}\n\n/**\n * Returns text under selection.\n *\n * @param {Window} [rootWindow] The document window owner.\n * @returns {string}\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getSelectionText() {\n var rootWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n var rootDocument = rootWindow.document;\n var text = '';\n if (rootWindow.getSelection) {\n text = rootWindow.getSelection().toString();\n } else if (rootDocument.selection && rootDocument.selection.type !== 'Control') {\n text = rootDocument.selection.createRange().text;\n }\n return text;\n}\n\n/**\n * Cross-platform helper to clear text selection.\n *\n * @param {Window} [rootWindow] The document window owner.\n */\n// eslint-disable-next-line no-restricted-globals\nexport function clearTextSelection() {\n var rootWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n var rootDocument = rootWindow.document;\n\n // http://stackoverflow.com/questions/3169786/clear-text-selection-with-javascript\n if (rootWindow.getSelection) {\n if (rootWindow.getSelection().empty) {\n // Chrome\n rootWindow.getSelection().empty();\n } else if (rootWindow.getSelection().removeAllRanges) {\n // Firefox\n rootWindow.getSelection().removeAllRanges();\n }\n } else if (rootDocument.selection) {\n // IE?\n rootDocument.selection.empty();\n }\n}\n\n/**\n * Sets caret position in text input.\n *\n * @author http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/\n * @param {Element} element An element to process.\n * @param {number} pos The selection start position.\n * @param {number} endPos The selection end position.\n */\nexport function setCaretPosition(element, pos, endPos) {\n if (endPos === void 0) {\n endPos = pos;\n }\n if (element.setSelectionRange) {\n element.focus();\n try {\n element.setSelectionRange(pos, endPos);\n } catch (err) {\n var elementParent = element.parentNode;\n var parentDisplayValue = elementParent.style.display;\n elementParent.style.display = 'block';\n element.setSelectionRange(pos, endPos);\n elementParent.style.display = parentDisplayValue;\n }\n }\n}\nvar cachedScrollbarWidth;\n\n/**\n * Helper to calculate scrollbar width.\n * Source: https://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes.\n *\n * @private\n * @param {Document} rootDocument The onwer of the document.\n * @returns {number}\n */\n// eslint-disable-next-line no-restricted-globals\nfunction walkontableCalculateScrollbarWidth() {\n var rootDocument = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n var inner = rootDocument.createElement('div');\n inner.style.height = '200px';\n inner.style.width = '100%';\n var outer = rootDocument.createElement('div');\n outer.style.boxSizing = 'content-box';\n outer.style.height = '150px';\n outer.style.left = '0px';\n outer.style.overflow = 'hidden';\n outer.style.position = 'absolute';\n outer.style.top = '0px';\n outer.style.width = '200px';\n outer.style.visibility = 'hidden';\n outer.appendChild(inner);\n (rootDocument.body || rootDocument.documentElement).appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var w2 = inner.offsetWidth;\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n (rootDocument.body || rootDocument.documentElement).removeChild(outer);\n return w1 - w2;\n}\n\n/**\n * Returns the computed width of the native browser scroll bar.\n *\n * @param {Document} [rootDocument] The owner of the document.\n * @returns {number} Width.\n */\n// eslint-disable-next-line no-restricted-globals\nexport function getScrollbarWidth() {\n var rootDocument = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n if (cachedScrollbarWidth === void 0) {\n cachedScrollbarWidth = walkontableCalculateScrollbarWidth(rootDocument);\n }\n return cachedScrollbarWidth;\n}\n\n/**\n * Checks if the provided element has a vertical scrollbar.\n *\n * @param {HTMLElement} element An element to check.\n * @returns {boolean}\n */\nexport function hasVerticalScrollbar(element) {\n return element.offsetWidth !== element.clientWidth;\n}\n\n/**\n * Checks if the provided element has a vertical scrollbar.\n *\n * @param {HTMLElement} element An element to check.\n * @returns {boolean}\n */\nexport function hasHorizontalScrollbar(element) {\n return element.offsetHeight !== element.clientHeight;\n}\n\n/**\n * Sets overlay position depending on it's type and used browser.\n *\n * @param {HTMLElement} overlayElem An element to process.\n * @param {number|string} left The left position of the overlay.\n * @param {number|string} top The top position of the overlay.\n */\nexport function setOverlayPosition(overlayElem, left, top) {\n if (isIE9()) {\n overlayElem.style.top = top;\n overlayElem.style.left = left;\n } else if (isSafari()) {\n overlayElem.style['-webkit-transform'] = \"translate3d(\".concat(left, \",\").concat(top, \",0)\");\n } else {\n overlayElem.style.transform = \"translate3d(\".concat(left, \",\").concat(top, \",0)\");\n }\n}\n\n/**\n * @param {HTMLElement} element An element to process.\n * @returns {number|Array}\n */\nexport function getCssTransform(element) {\n var transform;\n if (element.style.transform && (transform = element.style.transform) !== '') {\n return ['transform', transform];\n } else if (element.style['-webkit-transform'] && (transform = element.style['-webkit-transform']) !== '') {\n return ['-webkit-transform', transform];\n }\n return -1;\n}\n\n/**\n * @param {HTMLElement} element An element to process.\n */\nexport function resetCssTransform(element) {\n if (element.style.transform && element.style.transform !== '') {\n element.style.transform = '';\n } else if (element.style['-webkit-transform'] && element.style['-webkit-transform'] !== '') {\n element.style['-webkit-transform'] = '';\n }\n}\n\n/**\n * Determines if the given DOM element is an input field.\n * Notice: By 'input' we mean input, textarea and select nodes.\n *\n * @param {HTMLElement} element - DOM element.\n * @returns {boolean}\n */\nexport function isInput(element) {\n var inputs = ['INPUT', 'SELECT', 'TEXTAREA'];\n return element && (inputs.indexOf(element.nodeName) > -1 || element.contentEditable === 'true');\n}\n\n/**\n * Determines if the given DOM element is an input field placed OUTSIDE of HOT.\n * Notice: By 'input' we mean input, textarea and select nodes which have defined 'data-hot-input' attribute.\n *\n * @param {HTMLElement} element - DOM element.\n * @returns {boolean}\n */\nexport function isOutsideInput(element) {\n return isInput(element) && element.hasAttribute('data-hot-input') === false;\n}\n\n/**\n * Check if the given DOM element can be focused (by using \"select\" method).\n *\n * @param {HTMLElement} element - DOM element.\n */\nexport function selectElementIfAllowed(element) {\n var activeElement = element.ownerDocument.activeElement;\n if (!isOutsideInput(activeElement)) {\n element.select();\n }\n}\n\n/**\n * Check if the provided element is detached from DOM.\n *\n * @param {HTMLElement} element HTML element to be checked.\n * @returns {boolean} `true` if the element is detached, `false` otherwise.\n */\nexport function isDetached(element) {\n return !element.parentNode;\n}\n\n/**\n * Set up an observer to recognize when the provided element first becomes visible and trigger a callback when it\n * happens.\n *\n * @param {HTMLElement} elementToBeObserved Element to be observed.\n * @param {Function} callback The callback function.\n */\nexport function observeVisibilityChangeOnce(elementToBeObserved, callback) {\n var visibilityObserver = new IntersectionObserver(function (entries, observer) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting && elementToBeObserved.offsetParent !== null) {\n callback();\n observer.unobserve(elementToBeObserved);\n }\n });\n }, {\n root: elementToBeObserved.ownerDocument.body\n });\n visibilityObserver.observe(elementToBeObserved);\n}","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport DOMPurify from 'dompurify';\nimport { stringify } from \"./mixed.mjs\";\n/**\n * Convert string to upper case first letter.\n *\n * @param {string} string String to convert.\n * @returns {string}\n */\nexport function toUpperCaseFirst(string) {\n return string[0].toUpperCase() + string.substr(1);\n}\n\n/**\n * Compare strings case insensitively.\n *\n * @param {...string} strings Strings to compare.\n * @returns {boolean}\n */\nexport function equalsIgnoreCase() {\n var unique = [];\n for (var _len = arguments.length, strings = new Array(_len), _key = 0; _key < _len; _key++) {\n strings[_key] = arguments[_key];\n }\n var length = strings.length;\n while (length) {\n length -= 1;\n var string = stringify(strings[length]).toLowerCase();\n if (unique.indexOf(string) === -1) {\n unique.push(string);\n }\n }\n return unique.length === 1;\n}\n\n/**\n * Generates a random hex string. Used as namespace for Handsontable instance events.\n *\n * @returns {string} Returns 16-long character random string (eq. `'92b1bfc74ec4'`).\n */\nexport function randomString() {\n /**\n * @returns {string}\n */\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return s4() + s4() + s4() + s4();\n}\n\n/**\n * Checks if value is valid percent.\n *\n * @param {string} value The value to check.\n * @returns {boolean}\n */\nexport function isPercentValue(value) {\n return /^([0-9][0-9]?%$)|(^100%$)/.test(value);\n}\n\n/**\n * Substitute strings placed beetwen square brackets into value defined in `variables` object. String names defined in\n * square brackets must be the same as property name of `variables` object.\n *\n * @param {string} template Template string.\n * @param {object} variables Object which contains all available values which can be injected into template.\n * @returns {string}\n */\nexport function substitute(template) {\n var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return \"\".concat(template).replace(/(?:\\\\)?\\[([^[\\]]+)]/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.substr(1, match.length - 1);\n }\n return variables[name] === void 0 ? '' : variables[name];\n });\n}\n\n/**\n * Strip any HTML tag from the string.\n *\n * @param {string} string String to cut HTML from.\n * @returns {string}\n */\nexport function stripTags(string) {\n return sanitize(\"\".concat(string), {\n ALLOWED_TAGS: []\n });\n}\n\n/**\n * Sanitizes string from potential security vulnerabilities.\n *\n * @param {string} string String to sanitize.\n * @param {object} [options] DOMPurify's configuration object.\n * @returns {string}\n */\nexport function sanitize(string, options) {\n return DOMPurify.sanitize(string, options);\n}","import \"core-js/modules/web.timers.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.reverse.js\";\nimport { arrayReduce } from \"./array.mjs\";\nimport { isDefined } from \"./mixed.mjs\";\n/**\n * Checks if given variable is function.\n *\n * @param {*} func Variable to check.\n * @returns {boolean}\n */\nexport function isFunction(func) {\n return typeof func === 'function';\n}\n\n/**\n * Creates throttle function that enforces a maximum number of times a function (`func`) can be called over time (`wait`).\n *\n * @param {Function} func Function to invoke.\n * @param {number} wait Delay in miliseconds.\n * @returns {Function}\n */\nexport function throttle(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;\n var lastCalled = 0;\n var result = {\n lastCallThrottled: true\n };\n var lastTimer = null;\n\n /**\n * @param {...*} args The list of arguments passed during the function invocation.\n * @returns {object}\n */\n function _throttle() {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var stamp = Date.now();\n var needCall = false;\n result.lastCallThrottled = true;\n if (!lastCalled) {\n lastCalled = stamp;\n needCall = true;\n }\n var remaining = wait - (stamp - lastCalled);\n if (needCall) {\n result.lastCallThrottled = false;\n func.apply(this, args);\n } else {\n if (lastTimer) {\n clearTimeout(lastTimer);\n }\n lastTimer = setTimeout(function () {\n result.lastCallThrottled = false;\n func.apply(_this, args);\n lastCalled = 0;\n lastTimer = void 0;\n }, remaining);\n }\n return result;\n }\n return _throttle;\n}\n\n/**\n * Creates throttle function that enforces a maximum number of times a function (`func`) can be called over\n * time (`wait`) after specified hits.\n *\n * @param {Function} func Function to invoke.\n * @param {number} wait Delay in miliseconds.\n * @param {number} hits Number of hits after throttling will be applied.\n * @returns {Function}\n */\nexport function throttleAfterHits(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;\n var hits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n var funcThrottle = throttle(func, wait);\n var remainHits = hits;\n\n /**\n *\n */\n function _clearHits() {\n remainHits = hits;\n }\n /**\n * @param {*} args The list of arguments passed during the function invocation.\n * @returns {*}\n */\n function _throttleAfterHits() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (remainHits) {\n remainHits -= 1;\n return func.apply(this, args);\n }\n return funcThrottle.apply(this, args);\n }\n _throttleAfterHits.clearHits = _clearHits;\n return _throttleAfterHits;\n}\n\n/**\n * Creates debounce function that enforces a function (`func`) not be called again until a certain amount of time (`wait`)\n * has passed without it being called.\n *\n * @param {Function} func Function to invoke.\n * @param {number} wait Delay in milliseconds.\n * @returns {Function}\n */\nexport function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;\n var lastTimer = null;\n var result;\n\n /**\n * @param {*} args The list of arguments passed during the function invocation.\n * @returns {*}\n */\n function _debounce() {\n var _this2 = this;\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n if (lastTimer) {\n clearTimeout(lastTimer);\n }\n lastTimer = setTimeout(function () {\n result = func.apply(_this2, args);\n }, wait);\n return result;\n }\n return _debounce;\n}\n\n/**\n * Creates the function that returns the result of calling the given functions. Result of the first function is passed to\n * the second as an argument and so on. Only first function in the chain can handle multiple arguments.\n *\n * @param {Function} functions Functions to compose.\n * @returns {Function}\n */\nexport function pipe() {\n for (var _len4 = arguments.length, functions = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n functions[_key4] = arguments[_key4];\n }\n var firstFunc = functions[0],\n restFunc = functions.slice(1);\n return function _pipe() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n return arrayReduce(restFunc, function (acc, fn) {\n return fn(acc);\n }, firstFunc.apply(this, args));\n };\n}\n\n/**\n * Creates the function that returns the function with cached arguments.\n *\n * @param {Function} func Function to partialization.\n * @param {Array} params Function arguments to cache.\n * @returns {Function}\n */\nexport function partial(func) {\n for (var _len6 = arguments.length, params = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n params[_key6 - 1] = arguments[_key6];\n }\n return function _partial() {\n for (var _len7 = arguments.length, restParams = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n restParams[_key7] = arguments[_key7];\n }\n return func.apply(this, params.concat(restParams));\n };\n}\n\n/**\n * Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched\n * to the arguments defined in `func` then function will be invoked.\n * Arguments are added to the stack in direction from the left to the right.\n *\n * @example\n * ```\n * var replace = curry(function(find, replace, string) {\n * return string.replace(find, replace);\n * });\n *\n * // returns function with bounded first argument\n * var replace = replace('foo')\n *\n * // returns replaced string - all arguments was passed so function was invoked\n * replace('bar', 'Some test with foo...');\n *\n * ```\n *\n * @param {Function} func Function to currying.\n * @returns {Function}\n */\nexport function curry(func) {\n var argsLength = func.length;\n\n /**\n * @param {*} argsSoFar The list of arguments passed during the function invocation.\n * @returns {Function}\n */\n function given(argsSoFar) {\n return function _curry() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n var passedArgsSoFar = argsSoFar.concat(params);\n var result;\n if (passedArgsSoFar.length >= argsLength) {\n result = func.apply(this, passedArgsSoFar);\n } else {\n result = given(passedArgsSoFar);\n }\n return result;\n };\n }\n return given([]);\n}\n\n/**\n * Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched\n * to the arguments defined in `func` then function will be invoked.\n * Arguments are added to the stack in direction from the right to the left.\n *\n * @example\n * ```\n * var replace = curry(function(find, replace, string) {\n * return string.replace(find, replace);\n * });\n *\n * // returns function with bounded first argument\n * var replace = replace('Some test with foo...')\n *\n * // returns replaced string - all arguments was passed so function was invoked\n * replace('bar', 'foo');\n *\n * ```\n *\n * @param {Function} func Function to currying.\n * @returns {Function}\n */\nexport function curryRight(func) {\n var argsLength = func.length;\n\n /**\n * @param {*} argsSoFar The list of arguments passed during the function invocation.\n * @returns {Function}\n */\n function given(argsSoFar) {\n return function _curry() {\n for (var _len9 = arguments.length, params = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n params[_key9] = arguments[_key9];\n }\n var passedArgsSoFar = argsSoFar.concat(params.reverse());\n var result;\n if (passedArgsSoFar.length >= argsLength) {\n result = func.apply(this, passedArgsSoFar);\n } else {\n result = given(passedArgsSoFar);\n }\n return result;\n };\n }\n return given([]);\n}\n\n/**\n * Calls a function in the quickest way available.\n *\n * In contrast to the `apply()` method that passes arguments as an array,\n * the `call()` method passes arguments directly, to avoid garbage collection costs.\n *\n * @param {Function} func The function to call.\n * @param {*} context The value to use as `this` when calling the `func` function.\n * @param {*} [arg1] An argument passed to the `func` function.\n * @param {*} [arg2] An argument passed to `func` function.\n * @param {*} [arg3] An argument passed to `func` function.\n * @param {*} [arg4] An argument passed to `func` function.\n * @param {*} [arg5] An argument passed to `func` function.\n * @param {*} [arg6] An argument passed to `func` function.\n * @returns {*}\n */\nexport function fastCall(func, context, arg1, arg2, arg3, arg4, arg5, arg6) {\n if (isDefined(arg6)) {\n return func.call(context, arg1, arg2, arg3, arg4, arg5, arg6);\n } else if (isDefined(arg5)) {\n return func.call(context, arg1, arg2, arg3, arg4, arg5);\n } else if (isDefined(arg4)) {\n return func.call(context, arg1, arg2, arg3, arg4);\n } else if (isDefined(arg3)) {\n return func.call(context, arg1, arg2, arg3);\n } else if (isDefined(arg2)) {\n return func.call(context, arg1, arg2);\n } else if (isDefined(arg1)) {\n return func.call(context, arg1);\n }\n return func.call(context);\n}","/* eslint-disable no-console */\n/* eslint-disable no-restricted-globals */\n/**\n * \"In Internet Explorer 9 (and 8), the console object is only exposed when the developer tools are opened\n * for a particular tab.\".\n *\n * Source: https://stackoverflow.com/a/5473193.\n */\nimport { isDefined } from \"./mixed.mjs\";\n/**\n * Logs message to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function log() {\n if (isDefined(console)) {\n var _console;\n (_console = console).log.apply(_console, arguments);\n }\n}\n\n/**\n * Logs warn to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function warn() {\n if (isDefined(console)) {\n var _console2;\n (_console2 = console).warn.apply(_console2, arguments);\n }\n}\n\n/**\n * Logs info to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function info() {\n if (isDefined(console)) {\n var _console3;\n (_console3 = console).info.apply(_console3, arguments);\n }\n}\n\n/**\n * Logs error to the console if the `console` object is exposed.\n *\n * @param {...*} args Values which will be logged.\n */\nexport function error() {\n if (isDefined(console)) {\n var _console4;\n (_console4 = console).error.apply(_console4, arguments);\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nvar _templateObject;\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.splice.js\";\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\nimport { arrayEach } from \"./helpers/array.mjs\";\nimport { objectEach } from \"./helpers/object.mjs\";\nimport { substitute } from \"./helpers/string.mjs\";\nimport { warn } from \"./helpers/console.mjs\";\nimport { toSingleLine } from \"./helpers/templateLiteralTag.mjs\";\nimport { fastCall } from \"./helpers/function.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @description\n *\n * ::: only-for javascript\n * Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__.\n * :::\n *\n * ::: only-for react\n * This page lists all the **Handsontable hooks** – callbacks that let you react before or after an action occurs.\n *\n * Read more on the [Events and hooks](@/guides/getting-started/events-and-hooks.md) page.\n * :::\n *\n * @example\n *\n * ::: only-for javascript\n * ```js\n * // using events as callbacks\n * ...\n * const hot1 = new Handsontable(document.getElementById('example1'), {\n * afterChange: function(changes, source) {\n * $.ajax({\n * url: \"save.php',\n * data: change\n * });\n * }\n * });\n * ...\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * {\n * fetch('save.php', {\n * method: 'POST',\n * headers: {\n * 'Accept': 'application/json',\n * 'Content-Type': 'application/json'\n * },\n * body: JSON.stringify(changes)\n * });\n * }}\n * />\n * :::\n *\n * ::: only-for javascript\n * ```js\n * // using events as plugin hooks\n * ...\n * const hot1 = new Handsontable(document.getElementById('example1'), {\n * myPlugin: true\n * });\n *\n * const hot2 = new Handsontable(document.getElementById('example2'), {\n * myPlugin: false\n * });\n *\n * // global hook\n * Handsontable.hooks.add('afterChange', function() {\n * // Fired twice - for hot1 and hot2\n * if (this.getSettings().myPlugin) {\n * // function body - will only run for hot1\n * }\n * });\n *\n * // local hook (has same effect as a callback)\n * hot2.addHook('afterChange', function() {\n * // function body - will only run in #example2\n * });\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * const hotRef1 = useRef(null);\n * const hotRef2 = useRef(null);\n *\n * // Using events as plugin hooks:\n * ...\n *\n * {\n * changes?.forEach(([row, prop, oldValue, newValue]) => {\n * // Some logic...\n * });\n * }\n * })\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * {\n * changes?.forEach(([row, prop, oldValue, newValue]) => {\n * // Some logic...\n * });\n * }}\n * />\n * ```\n * :::\n */\n'afterChange',\n/**\n * Fired each time user opens {@link ContextMenu} and after setting up the Context Menu's default options. These options are a collection\n * which user can select by setting an array of keys or an array of objects in {@link Options#contextMenu} option.\n *\n * @event Hooks#afterContextMenuDefaultOptions\n * @param {Array} predefinedItems An array of objects containing information about the pre-defined Context Menu items.\n */\n'afterContextMenuDefaultOptions',\n/**\n * Fired each time user opens {@link ContextMenu} plugin before setting up the Context Menu's items but after filtering these options by\n * user (`contextMenu` option). This hook can by helpful to determine if user use specified menu item or to set up\n * one of the menu item to by always visible.\n *\n * @event Hooks#beforeContextMenuSetItems\n * @param {object[]} menuItems An array of objects containing information about to generated Context Menu items.\n */\n'beforeContextMenuSetItems',\n/**\n * Fired by {@link DropdownMenu} plugin after setting up the Dropdown Menu's default options. These options are a\n * collection which user can select by setting an array of keys or an array of objects in {@link Options#dropdownMenu}\n * option.\n *\n * @event Hooks#afterDropdownMenuDefaultOptions\n * @param {object[]} predefinedItems An array of objects containing information about the pre-defined Context Menu items.\n */\n'afterDropdownMenuDefaultOptions',\n/**\n * Fired by {@link DropdownMenu} plugin before setting up the Dropdown Menu's items but after filtering these options\n * by user (`dropdownMenu` option). This hook can by helpful to determine if user use specified menu item or to set\n * up one of the menu item to by always visible.\n *\n * @event Hooks#beforeDropdownMenuSetItems\n * @param {object[]} menuItems An array of objects containing information about to generated Dropdown Menu items.\n */\n'beforeDropdownMenuSetItems',\n/**\n * Fired by {@link ContextMenu} plugin after hiding the Context Menu. This hook is fired when {@link Options#contextMenu}\n * option is enabled.\n *\n * @event Hooks#afterContextMenuHide\n * @param {object} context The Context Menu plugin instance.\n */\n'afterContextMenuHide',\n/**\n * Fired by {@link ContextMenu} plugin before opening the Context Menu. This hook is fired when {@link Options#contextMenu}\n * option is enabled.\n *\n * @event Hooks#beforeContextMenuShow\n * @param {object} context The Context Menu instance.\n */\n'beforeContextMenuShow',\n/**\n * Fired by {@link ContextMenu} plugin after opening the Context Menu. This hook is fired when {@link Options#contextMenu}\n * option is enabled.\n *\n * @event Hooks#afterContextMenuShow\n * @param {object} context The Context Menu plugin instance.\n */\n'afterContextMenuShow',\n/**\n * Fired by {@link CopyPaste} plugin after reaching the copy limit while copying data. This hook is fired when\n * {@link Options#copyPaste} option is enabled.\n *\n * @event Hooks#afterCopyLimit\n * @param {number} selectedRows Count of selected copyable rows.\n * @param {number} selectedColumns Count of selected copyable columns.\n * @param {number} copyRowsLimit Current copy rows limit.\n * @param {number} copyColumnsLimit Current copy columns limit.\n */\n'afterCopyLimit',\n/**\n * Fired before created a new column.\n *\n * @event Hooks#beforeCreateCol\n * @param {number} index Represents the visual index of first newly created column in the data source array.\n * @param {number} amount Number of newly created columns in the data source array.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {*} If `false` then creating columns is cancelled.\n * @example\n * ::: only-for javascript\n * ```js\n * // Return `false` to cancel column inserting.\n * new Handsontable(element, {\n * beforeCreateCol: function(data, coords) {\n * return false;\n * }\n * });\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * // Return `false` to cancel column inserting.\n * {\n * return false;\n * }}\n * />\n * ```\n * :::\n */\n'beforeCreateCol',\n/**\n * Fired after the order of columns has changed.\n * This hook is fired by changing column indexes of any type supported by the {@link IndexMapper}.\n *\n * @event Hooks#afterColumnSequenceChange\n * @param {'init'|'remove'|'insert'|'move'|'update'} [source] A string that indicates what caused the change to the order of columns.\n */\n'afterColumnSequenceChange',\n/**\n * Fired after created a new column.\n *\n * @event Hooks#afterCreateCol\n * @param {number} index Represents the visual index of first newly created column in the data source.\n * @param {number} amount Number of newly created columns in the data source.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterCreateCol',\n/**\n * Fired before created a new row.\n *\n * @event Hooks#beforeCreateRow\n * @param {number} index Represents the visual index of first newly created row in the data source array.\n * @param {number} amount Number of newly created rows in the data source array.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeCreateRow',\n/**\n * Fired after created a new row.\n *\n * @event Hooks#afterCreateRow\n * @param {number} index Represents the visual index of first newly created row in the data source array.\n * @param {number} amount Number of newly created rows in the data source array.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterCreateRow',\n/**\n * Fired after all selected cells are deselected.\n *\n * @event Hooks#afterDeselect\n */\n'afterDeselect',\n/**\n * Fired after destroying the Handsontable instance.\n *\n * @event Hooks#afterDestroy\n */\n'afterDestroy',\n/**\n * Hook fired after keydown event is handled.\n *\n * @event Hooks#afterDocumentKeyDown\n * @param {Event} event A native `keydown` event object.\n */\n'afterDocumentKeyDown',\n/**\n * Fired inside the Walkontable's selection `draw` method. Can be used to add additional class names to cells, depending on the current selection.\n *\n * @event Hooks#afterDrawSelection\n * @param {number} currentRow Row index of the currently processed cell.\n * @param {number} currentColumn Column index of the currently cell.\n * @param {number[]} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow, endColumn]`.\n * @param {number|undefined} layerLevel Number indicating which layer of selection is currently processed.\n * @since 0.38.1\n * @returns {string|undefined} Can return a `String`, which will act as an additional `className` to be added to the currently processed cell.\n */\n'afterDrawSelection',\n/**\n * Fired inside the Walkontable's `refreshSelections` method. Can be used to remove additional class names from all cells in the table.\n *\n * @event Hooks#beforeRemoveCellClassNames\n * @since 0.38.1\n * @returns {string[]|undefined} Can return an `Array` of `String`s. Each of these strings will act like class names to be removed from all the cells in the table.\n */\n'beforeRemoveCellClassNames',\n/**\n * Fired after getting the cell settings.\n *\n * @event Hooks#afterGetCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} cellProperties Object containing the cell properties.\n */\n'afterGetCellMeta',\n/**\n * Fired after retrieving information about a column header and appending it to the table header.\n *\n * @event Hooks#afterGetColHeader\n * @param {number} column Visual column index.\n * @param {HTMLTableCellElement} TH Header's TH element.\n * @param {number} [headerLevel=0] (Since 12.2.0) Header level index. Accepts positive (0 to n)\n * and negative (-1 to -n) values. For positive values, 0 points to the\n * topmost header. For negative values, -1 points to the bottom-most\n * header (the header closest to the cells).\n */\n'afterGetColHeader',\n/**\n * Fired after retrieving information about a row header and appending it to the table header.\n *\n * @event Hooks#afterGetRowHeader\n * @param {number} row Visual row index.\n * @param {HTMLTableCellElement} TH Header's TH element.\n */\n'afterGetRowHeader',\n/**\n * Fired after the Handsontable instance is initiated.\n *\n * @event Hooks#afterInit\n */\n'afterInit',\n/**\n * Fired after Handsontable's [`data`](@/api/options.md#data)\n * gets modified by the [`loadData()`](@/api/core.md#loaddata) method\n * or the [`updateSettings()`](@/api/core.md#updatesettings) method.\n *\n * Read more:\n * - [Binding to data](@/guides/getting-started/binding-to-data.md)\n * - [Saving data](@/guides/getting-started/saving-data.md)\n *\n * @event Hooks#afterLoadData\n * @param {Array} sourceData An [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), or an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), that contains Handsontable's data\n * @param {boolean} initialLoad A flag that indicates whether the data was loaded at Handsontable's initialization (`true`) or later (`false`)\n * @param {string} source The source of the call\n */\n'afterLoadData',\n/**\n * Fired after the [`updateData()`](@/api/core.md#updatedata) method\n * modifies Handsontable's [`data`](@/api/options.md#data).\n *\n * Read more:\n * - [Binding to data](@/guides/getting-started/binding-to-data.md)\n * - [Saving data](@/guides/getting-started/saving-data.md)\n *\n * @event Hooks#afterUpdateData\n * @since 11.1.0\n * @param {Array} sourceData An [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), or an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), that contains Handsontable's data\n * @param {boolean} initialLoad A flag that indicates whether the data was loaded at Handsontable's initialization (`true`) or later (`false`)\n * @param {string} source The source of the call\n */\n'afterUpdateData',\n/**\n * Fired after a scroll event, which is identified as a momentum scroll (e.g. On an iPad).\n *\n * @event Hooks#afterMomentumScroll\n */\n'afterMomentumScroll',\n/**\n * Fired after a `mousedown` event is triggered on the cell corner (the drag handle).\n *\n * @event Hooks#afterOnCellCornerMouseDown\n * @param {Event} event `mousedown` event object.\n */\n'afterOnCellCornerMouseDown',\n/**\n * Fired after a `dblclick` event is triggered on the cell corner (the drag handle).\n *\n * @event Hooks#afterOnCellCornerDblClick\n * @param {Event} event `dblclick` event object.\n */\n'afterOnCellCornerDblClick',\n/**\n * Fired after clicking on a cell or row/column header. In case the row/column header was clicked, the coordinate\n * indexes are negative.\n *\n * For example clicking on the row header of cell (0, 0) results with `afterOnCellMouseDown` called\n * with coordinates `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellMouseDown\n * @param {Event} event `mousedown` event object.\n * @param {CellCoords} coords Coordinates object containing the visual row and visual column indexes of the clicked cell.\n * @param {HTMLTableCellElement} TD Cell's TD (or TH) element.\n */\n'afterOnCellMouseDown',\n/**\n * Fired after clicking on a cell or row/column header. In case the row/column header was clicked, the coordinate\n * indexes are negative.\n *\n * For example clicking on the row header of cell (0, 0) results with `afterOnCellMouseUp` called\n * with coordinates `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellMouseUp\n * @param {Event} event `mouseup` event object.\n * @param {CellCoords} coords Coordinates object containing the visual row and visual column indexes of the clicked cell.\n * @param {HTMLTableCellElement} TD Cell's TD (or TH) element.\n */\n'afterOnCellMouseUp',\n/**\n * Fired after clicking right mouse button on a cell or row/column header.\n *\n * For example clicking on the row header of cell (0, 0) results with `afterOnCellContextMenu` called\n * with coordinates `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellContextMenu\n * @since 4.1.0\n * @param {Event} event `contextmenu` event object.\n * @param {CellCoords} coords Coordinates object containing the visual row and visual column indexes of the clicked cell.\n * @param {HTMLTableCellElement} TD Cell's TD (or TH) element.\n */\n'afterOnCellContextMenu',\n/**\n * Fired after hovering a cell or row/column header with the mouse cursor. In case the row/column header was\n * hovered, the index is negative.\n *\n * For example, hovering over the row header of cell (0, 0) results with `afterOnCellMouseOver` called\n * with coords `{row: 0, col: -1}`.\n *\n * @event Hooks#afterOnCellMouseOver\n * @param {Event} event `mouseover` event object.\n * @param {CellCoords} coords Hovered cell's visual coordinate object.\n * @param {HTMLTableCellElement} TD Cell's TD (or TH) element.\n */\n'afterOnCellMouseOver',\n/**\n * Fired after leaving a cell or row/column header with the mouse cursor.\n *\n * @event Hooks#afterOnCellMouseOut\n * @param {Event} event `mouseout` event object.\n * @param {CellCoords} coords Leaved cell's visual coordinate object.\n * @param {HTMLTableCellElement} TD Cell's TD (or TH) element.\n */\n'afterOnCellMouseOut',\n/**\n * Fired after one or more columns are removed.\n *\n * @event Hooks#afterRemoveCol\n * @param {number} index Visual index of starter column.\n * @param {number} amount An amount of removed columns.\n * @param {number[]} physicalColumns An array of physical columns removed from the data source.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterRemoveCol',\n/**\n * Fired after one or more rows are removed.\n *\n * @event Hooks#afterRemoveRow\n * @param {number} index Visual index of starter row.\n * @param {number} amount An amount of removed rows.\n * @param {number[]} physicalRows An array of physical rows removed from the data source.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterRemoveRow',\n/**\n * Fired before starting rendering the cell.\n *\n * @event Hooks#beforeRenderer\n * @param {HTMLTableCellElement} TD Currently rendered cell's TD element.\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string|number} prop Column property name or a column index, if datasource is an array of arrays.\n * @param {*} value Value of the rendered cell.\n * @param {object} cellProperties Object containing the cell's properties.\n */\n'beforeRenderer',\n/**\n * Fired after finishing rendering the cell (after the renderer finishes).\n *\n * @event Hooks#afterRenderer\n * @param {HTMLTableCellElement} TD Currently rendered cell's TD element.\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string|number} prop Column property name or a column index, if datasource is an array of arrays.\n * @param {*} value Value of the rendered cell.\n * @param {object} cellProperties Object containing the cell's properties.\n */\n'afterRenderer',\n/**\n * Fired after the order of rows has changed.\n * This hook is fired by changing row indexes of any type supported by the {@link IndexMapper}.\n *\n * @event Hooks#afterRowSequenceChange\n * @param {'init'|'remove'|'insert'|'move'|'update'} [source] A string that indicates what caused the change to the order of rows.\n */\n'afterRowSequenceChange',\n/**\n * Fired after the horizontal scroll event.\n *\n * @event Hooks#afterScrollHorizontally\n */\n'afterScrollHorizontally',\n/**\n * Fired after the vertical scroll event.\n *\n * @event Hooks#afterScrollVertically\n */\n'afterScrollVertically',\n/**\n * Fired after one or more cells are selected (e.g. During mouse move).\n *\n * @event Hooks#afterSelection\n * @param {number} row Selection start visual row index.\n * @param {number} column Selection start visual column index.\n * @param {number} row2 Selection end visual row index.\n * @param {number} column2 Selection end visual column index.\n * @param {object} preventScrolling A reference to the observable object with the `value` property.\n * Property `preventScrolling.value` expects a boolean value that\n * Handsontable uses to control scroll behavior after selection.\n * @param {object} preventScrolling Object with `value` property where its value change will be observed.\n * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.\n * @example\n * ::: only-for javascript\n * ```js\n * new Handsontable(element, {\n * afterSelection: (row, column, row2, column2, preventScrolling, selectionLayerLevel) => {\n * // If set to `false` (default): when cell selection is outside the viewport,\n * // Handsontable scrolls the viewport to cell selection's end corner.\n * // If set to `true`: when cell selection is outside the viewport,\n * // Handsontable doesn't scroll to cell selection's end corner.\n * preventScrolling.value = true;\n * }\n * })\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * {\n * // If set to `false` (default): when cell selection is outside the viewport,\n * // Handsontable scrolls the viewport to cell selection's end corner.\n * // If set to `true`: when cell selection is outside the viewport,\n * // Handsontable doesn't scroll to cell selection's end corner.\n * preventScrolling.value = true;\n * }}\n * />\n * ```\n * :::\n */\n'afterSelection',\n/**\n * Fired after one or more cells are selected.\n *\n * The `prop` and `prop2` arguments represent the source object property name instead of the column number.\n *\n * @event Hooks#afterSelectionByProp\n * @param {number} row Selection start visual row index.\n * @param {string} prop Selection start data source object property name.\n * @param {number} row2 Selection end visual row index.\n * @param {string} prop2 Selection end data source object property name.\n * @param {object} preventScrolling Object with `value` property where its value change will be observed.\n * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.\n * @example\n * ```js\n * ::: only-for javascript\n * new Handsontable(element, {\n * afterSelectionByProp: (row, column, row2, column2, preventScrolling, selectionLayerLevel) => {\n * // setting if prevent scrolling after selection\n * preventScrolling.value = true;\n * }\n * })\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * {\n * // setting if prevent scrolling after selection\n * preventScrolling.value = true;\n * }}\n * />\n * ```\n * :::\n */\n'afterSelectionByProp',\n/**\n * Fired after one or more cells are selected (e.g. On mouse up).\n *\n * @event Hooks#afterSelectionEnd\n * @param {number} row Selection start visual row index.\n * @param {number} column Selection start visual column index.\n * @param {number} row2 Selection end visual row index.\n * @param {number} column2 Selection end visual column index.\n * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.\n */\n'afterSelectionEnd',\n/**\n * Fired after one or more cells are selected (e.g. On mouse up).\n *\n * The `prop` and `prop2` arguments represent the source object property name instead of the column number.\n *\n * @event Hooks#afterSelectionEndByProp\n * @param {number} row Selection start visual row index.\n * @param {string} prop Selection start data source object property index.\n * @param {number} row2 Selection end visual row index.\n * @param {string} prop2 Selection end data source object property index.\n * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.\n */\n'afterSelectionEndByProp',\n/**\n * Fired after cell meta is changed.\n *\n * @event Hooks#afterSetCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key The updated meta key.\n * @param {*} value The updated meta value.\n */\n'afterSetCellMeta',\n/**\n * Fired after cell meta is removed.\n *\n * @event Hooks#afterRemoveCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key The removed meta key.\n * @param {*} value Value which was under removed key of cell meta.\n */\n'afterRemoveCellMeta',\n/**\n * Fired after cell data was changed.\n *\n * @event Hooks#afterSetDataAtCell\n * @param {Array} changes An array of changes in format `[[row, column, oldValue, value], ...]`.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterSetDataAtCell',\n/**\n * Fired after cell data was changed.\n * Called only when `setDataAtRowProp` was executed.\n *\n * @event Hooks#afterSetDataAtRowProp\n * @param {Array} changes An array of changes in format `[[row, prop, oldValue, value], ...]`.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'afterSetDataAtRowProp',\n/**\n * Fired after cell source data was changed.\n *\n * @event Hooks#afterSetSourceDataAtCell\n * @since 8.0.0\n * @param {Array} changes An array of changes in format `[[row, column, oldValue, value], ...]`.\n * @param {string} [source] String that identifies source of hook call.\n */\n'afterSetSourceDataAtCell',\n/**\n * Fired after calling the `updateSettings` method.\n *\n * @event Hooks#afterUpdateSettings\n * @param {object} newSettings New settings object.\n */\n'afterUpdateSettings',\n/**\n * @description\n * A plugin hook executed after validator function, only if validator function is defined.\n * Validation result is the first parameter. This can be used to determinate if validation passed successfully or not.\n *\n * __Returning false from the callback will mark the cell as invalid__.\n *\n * @event Hooks#afterValidate\n * @param {boolean} isValid `true` if valid, `false` if not.\n * @param {*} value The value in question.\n * @param {number} row Visual row index.\n * @param {string|number} prop Property name / visual column index.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {undefined | boolean} If `false` the cell will be marked as invalid, `true` otherwise.\n */\n'afterValidate',\n/**\n * Fired before successful change of language (when proper language code was set).\n *\n * @event Hooks#beforeLanguageChange\n * @since 0.35.0\n * @param {string} languageCode New language code.\n */\n'beforeLanguageChange',\n/**\n * Fired after successful change of language (when proper language code was set).\n *\n * @event Hooks#afterLanguageChange\n * @since 0.35.0\n * @param {string} languageCode New language code.\n */\n'afterLanguageChange',\n/**\n * Fired by {@link Autofill} plugin before populating the data in the autofill feature. This hook is fired when\n * {@link Options#fillHandle} option is enabled.\n *\n * @event Hooks#beforeAutofill\n * @param {Array[]} selectionData Data the autofill operation will start from.\n * @param {CellRange} sourceRange The range values will be filled from.\n * @param {CellRange} targetRange The range new values will be filled into.\n * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.\n *\n * @returns {boolean|Array[]} If false, the operation is cancelled. If array of arrays, the returned data\n * will be passed into `populateFromArray` instead of the default autofill\n * algorithm's result.\n */\n'beforeAutofill',\n/**\n * Fired by {@link Autofill} plugin after populating the data in the autofill feature. This hook is fired when\n * {@link Options#fillHandle} option is enabled.\n *\n * @event Hooks#afterAutofill\n * @since 8.0.0\n * @param {Array[]} fillData The data that was used to fill the `targetRange`. If `beforeAutofill` was used\n * and returned `[[]]`, this will be the same object that was returned from `beforeAutofill`.\n * @param {CellRange} sourceRange The range values will be filled from.\n * @param {CellRange} targetRange The range new values will be filled into.\n * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.\n */\n'afterAutofill',\n/**\n * Fired before aligning the cell contents.\n *\n * @event Hooks#beforeCellAlignment\n * @param {object} stateBefore An object with class names defining the cell alignment.\n * @param {CellRange[]} range An array of CellRange coordinates where the alignment will be applied.\n * @param {string} type Type of the alignment - either `horizontal` or `vertical`.\n * @param {string} alignmentClass String defining the alignment class added to the cell.\n * Possible values:\n * * `htLeft`\n * * `htCenter`\n * * `htRight`\n * * `htJustify`\n * * `htTop`\n * * `htMiddle`\n * * `htBottom`.\n */\n'beforeCellAlignment',\n/**\n * Fired before one or more cells are changed.\n *\n * Use this hook to silently alter the user's changes before Handsontable re-renders.\n *\n * To ignore the user's changes, use a nullified array or return `false`.\n *\n * @event Hooks#beforeChange\n * @param {Array[]} changes 2D array containing information about each of the edited cells `[[row, prop, oldVal, newVal], ...]`. `row` is a visual row index.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {undefined | boolean} If `false` all changes were cancelled, `true` otherwise.\n * @example\n * ::: only-for javascript\n * ```js\n * // to alter a single change, overwrite the value with `changes[i][3]`\n * new Handsontable(element, {\n * beforeChange: (changes, source) => {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0][3] = 10;\n * }\n * });\n *\n * // to ignore a single change, set `changes[i]` to `null`\n * // or remove `changes[i]` from the array, by using `changes.splice(i, 1)`\n * new Handsontable(element, {\n * beforeChange: (changes, source) => {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0] = null;\n * }\n * });\n *\n * // to ignore all changes, return `false`\n * // or set the array's length to 0, by using `changes.length = 0`\n * new Handsontable(element, {\n * beforeChange: (changes, source) => {\n * // [[row, prop, oldVal, newVal], ...]\n * return false;\n * }\n * });\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * // to alter a single change, overwrite the desired value with `changes[i][3]`\n * {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0][3] = 10;\n * }}\n * />\n *\n * // to ignore a single change, set `changes[i]` to `null`\n * // or remove `changes[i]` from the array, by using changes.splice(i, 1).\n * {\n * // [[row, prop, oldVal, newVal], ...]\n * changes[0] = null;\n * }}\n * />\n *\n * // to ignore all changes, return `false`\n * // or set the array's length to 0 (`changes.length = 0`)\n * {\n * // [[row, prop, oldVal, newVal], ...]\n * return false;\n * }}\n * />\n * ```\n * :::\n */\n'beforeChange',\n/**\n * Fired right before rendering the changes.\n *\n * @event Hooks#beforeChangeRender\n * @param {Array[]} changes Array in form of `[row, prop, oldValue, newValue]`.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'beforeChangeRender',\n/**\n * Fired before drawing the borders.\n *\n * @event Hooks#beforeDrawBorders\n * @param {Array} corners Array specifying the current selection borders.\n * @param {string} borderClassName Specifies the border class name.\n */\n'beforeDrawBorders',\n/**\n * Fired before getting cell settings.\n *\n * @event Hooks#beforeGetCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} cellProperties Object containing the cell's properties.\n */\n'beforeGetCellMeta',\n/**\n * Fired before cell meta is removed.\n *\n * @event Hooks#beforeRemoveCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key The removed meta key.\n * @param {*} value Value which is under removed key of cell meta.\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeRemoveCellMeta',\n/**\n * Fired before the Handsontable instance is initiated.\n *\n * @event Hooks#beforeInit\n */\n'beforeInit',\n/**\n * Fired before the Walkontable instance is initiated.\n *\n * @event Hooks#beforeInitWalkontable\n * @param {object} walkontableConfig Walkontable configuration object.\n */\n'beforeInitWalkontable',\n/**\n * Fired before Handsontable's [`data`](@/api/options.md#data)\n * gets modified by the [`loadData()`](@/api/core.md#loaddata) method\n * or the [`updateSettings()`](@/api/core.md#updatesettings) method.\n *\n * Read more:\n * - [Binding to data](@/guides/getting-started/binding-to-data.md)\n * - [Saving data](@/guides/getting-started/saving-data.md)\n *\n * @event Hooks#beforeLoadData\n * @since 8.0.0\n * @param {Array} sourceData An [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), or an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), that contains Handsontable's data\n * @param {boolean} initialLoad A flag that indicates whether the data was loaded at Handsontable's initialization (`true`) or later (`false`)\n * @param {string} source The source of the call\n * @returns {Array} The returned array will be used as Handsontable's new dataset.\n */\n'beforeLoadData',\n/**\n * Fired before the [`updateData()`](@/api/core.md#updatedata) method\n * modifies Handsontable's [`data`](@/api/options.md#data).\n *\n * Read more:\n * - [Binding to data](@/guides/getting-started/binding-to-data.md)\n * - [Saving data](@/guides/getting-started/saving-data.md)\n *\n * @event Hooks#beforeUpdateData\n * @since 11.1.0\n * @param {Array} sourceData An [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), or an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), that contains Handsontable's data\n * @param {boolean} initialLoad A flag that indicates whether the data was loaded at Handsontable's initialization (`true`) or later (`false`)\n * @param {string} source The source of the call\n * @returns {Array} The returned array will be used as Handsontable's new dataset.\n */\n'beforeUpdateData',\n/**\n * Hook fired before keydown event is handled. It can be used to stop default key bindings.\n *\n * __Note__: To prevent default behavior you need to call `false` in your `beforeKeyDown` handler.\n *\n * @event Hooks#beforeKeyDown\n * @param {Event} event Original DOM event.\n */\n'beforeKeyDown',\n/**\n * Fired after the user clicked a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseDown\n * @param {Event} event The `mousedown` event object.\n * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.\n * @param {HTMLTableCellElement} TD TD element.\n * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains\n * a boolean value that allows or disallows changing the selection for that particular area.\n */\n'beforeOnCellMouseDown',\n/**\n * Fired after the user clicked a cell.\n *\n * @event Hooks#beforeOnCellMouseUp\n * @param {Event} event The `mouseup` event object.\n * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.\n * @param {HTMLTableCellElement} TD TD element.\n */\n'beforeOnCellMouseUp',\n/**\n * Fired after the user clicked a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellContextMenu\n * @since 4.1.0\n * @param {Event} event The `contextmenu` event object.\n * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.\n * @param {HTMLTableCellElement} TD TD element.\n */\n'beforeOnCellContextMenu',\n/**\n * Fired after the user moved cursor over a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseOver\n * @param {Event} event The `mouseover` event object.\n * @param {CellCoords} coords CellCoords object containing the visual coordinates of the clicked cell.\n * @param {HTMLTableCellElement} TD TD element.\n * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains\n * a boolean value that allows or disallows changing the selection for that particular area.\n */\n'beforeOnCellMouseOver',\n/**\n * Fired after the user moved cursor out from a cell, but before all the calculations related with it.\n *\n * @event Hooks#beforeOnCellMouseOut\n * @param {Event} event The `mouseout` event object.\n * @param {CellCoords} coords CellCoords object containing the visual coordinates of the leaved cell.\n * @param {HTMLTableCellElement} TD TD element.\n */\n'beforeOnCellMouseOut',\n/**\n * Fired before one or more columns are about to be removed.\n *\n * @event Hooks#beforeRemoveCol\n * @param {number} index Visual index of starter column.\n * @param {number} amount Amount of columns to be removed.\n * @param {number[]} physicalColumns An array of physical columns removed from the data source.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeRemoveCol',\n/**\n * Fired when one or more rows are about to be removed.\n *\n * @event Hooks#beforeRemoveRow\n * @param {number} index Visual index of starter row.\n * @param {number} amount Amount of rows to be removed.\n * @param {number[]} physicalRows An array of physical rows removed from the data source.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeRemoveRow',\n/**\n * Fired before Handsontable's view-rendering engine is rendered.\n *\n * __Note:__ In Handsontable 9.x and earlier, the `beforeViewRender` hook was named `beforeRender`.\n *\n * @event Hooks#beforeViewRender\n * @since 10.0.0\n * @param {boolean} isForced If set to `true`, the rendering gets triggered by a change of settings, a change of\n * data, or a logic that needs a full Handsontable render cycle.\n * If set to `false`, the rendering gets triggered by scrolling or moving the selection.\n * @param {object} skipRender Object with `skipRender` property, if it is set to `true ` the next rendering cycle will be skipped.\n */\n'beforeViewRender',\n/**\n * Fired after Handsontable's view-rendering engine is rendered,\n * but before redrawing the selection borders and before scroll syncing.\n *\n * __Note:__ In Handsontable 9.x and earlier, the `afterViewRender` hook was named `afterRender`.\n *\n * @event Hooks#afterViewRender\n * @since 10.0.0\n * @param {boolean} isForced If set to `true`, the rendering gets triggered by a change of settings, a change of\n * data, or a logic that needs a full Handsontable render cycle.\n * If set to `false`, the rendering gets triggered by scrolling or moving the selection.\n */\n'afterViewRender',\n/**\n * Fired before Handsontable's view-rendering engine updates the view.\n *\n * The `beforeRender` event is fired right after the Handsontable\n * business logic is executed and right before the rendering engine starts calling\n * the Core logic, renderers, cell meta objects etc. to update the view.\n *\n * @event Hooks#beforeRender\n * @param {boolean} isForced If set to `true`, the rendering gets triggered by a change of settings, a change of\n * data, or a logic that needs a full Handsontable render cycle.\n * If set to `false`, the rendering gets triggered by scrolling or moving the selection.\n */\n'beforeRender',\n/**\n * Fired after Handsontable's view-rendering engine updates the view.\n *\n * @event Hooks#afterRender\n * @param {boolean} isForced If set to `true`, the rendering gets triggered by a change of settings, a change of\n * data, or a logic that needs a full Handsontable render cycle.\n * If set to `false`, the rendering gets triggered by scrolling or moving the selection.\n */\n'afterRender',\n/**\n * Fired before cell meta is changed.\n *\n * @event Hooks#beforeSetCellMeta\n * @since 8.0.0\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key The updated meta key.\n * @param {*} value The updated meta value.\n * @returns {boolean|undefined} If false is returned the action is canceled.\n */\n'beforeSetCellMeta',\n/**\n * Fired before setting range is started but not finished yet.\n *\n * @event Hooks#beforeSetRangeStartOnly\n * @param {CellCoords} coords CellCoords instance.\n */\n'beforeSetRangeStartOnly',\n/**\n * Fired before setting range is started.\n *\n * @event Hooks#beforeSetRangeStart\n * @param {CellCoords} coords CellCoords instance.\n */\n'beforeSetRangeStart',\n/**\n * Fired before setting range is ended.\n *\n * @event Hooks#beforeSetRangeEnd\n * @param {CellCoords} coords CellCoords instance.\n */\n'beforeSetRangeEnd',\n/**\n * Fired before the logic of handling a touch scroll, when user started scrolling on a touch-enabled device.\n *\n * @event Hooks#beforeTouchScroll\n */\n'beforeTouchScroll',\n/**\n * Fired before cell validation, only if validator function is defined. This can be used to manipulate the value\n * of changed cell before it is applied to the validator function.\n *\n * __Note:__ this will not affect values of changes. This will change value *ONLY* for validation.\n *\n * @event Hooks#beforeValidate\n * @param {*} value Value of the cell.\n * @param {number} row Visual row index.\n * @param {string|number} prop Property name / column index.\n * @param {string} [source] String that identifies source of hook call\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n */\n'beforeValidate',\n/**\n * Fired before cell value is rendered into the DOM (through renderer function). This can be used to manipulate the\n * value which is passed to the renderer without modifying the renderer itself.\n *\n * @event Hooks#beforeValueRender\n * @param {*} value Cell value to render.\n * @param {object} cellProperties An object containing the cell properties.\n */\n'beforeValueRender',\n/**\n * Fired after Handsontable instance is constructed (using `new` operator).\n *\n * @event Hooks#construct\n */\n'construct',\n/**\n * Fired after Handsontable instance is initiated but before table is rendered.\n *\n * @event Hooks#init\n */\n'init',\n/**\n * Fired when a column header index is about to be modified by a callback function.\n *\n * @event Hooks#modifyColHeader\n * @param {number} column Visual column header index.\n */\n'modifyColHeader',\n/**\n * Fired when a column width is about to be modified by a callback function.\n *\n * @event Hooks#modifyColWidth\n * @param {number} width Current column width.\n * @param {number} column Visual column index.\n */\n'modifyColWidth',\n/**\n * Fired when a row header index is about to be modified by a callback function.\n *\n * @event Hooks#modifyRowHeader\n * @param {number} row Visual row header index.\n */\n'modifyRowHeader',\n/**\n * Fired when a row height is about to be modified by a callback function.\n *\n * @event Hooks#modifyRowHeight\n * @param {number} height Row height.\n * @param {number} row Visual row index.\n */\n'modifyRowHeight',\n/**\n * Fired when a data was retrieved or modified.\n *\n * @event Hooks#modifyData\n * @param {number} row Physical row index.\n * @param {number} column Visual column index.\n * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value` property.\n * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).\n */\n'modifyData',\n/**\n * Fired when a data was retrieved or modified from the source data set.\n *\n * @event Hooks#modifySourceData\n * @since 8.0.0\n * @param {number} row Physical row index.\n * @param {number} column Physical column index or property name.\n * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value` property.\n * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).\n */\n'modifySourceData',\n/**\n * Fired when a data was retrieved or modified.\n *\n * @event Hooks#modifyRowData\n * @param {number} row Physical row index.\n */\n'modifyRowData',\n/**\n * Used to modify the cell coordinates when using the `getCell` method, opening editor, getting value from the editor\n * and saving values from the closed editor.\n *\n * @event Hooks#modifyGetCellCoords\n * @since 0.36.0\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {boolean} topmost If set to `true`, it returns the TD element from the topmost overlay. For example,\n * if the wanted cell is in the range of fixed rows, it will return a TD element\n * from the `top` overlay.\n * @returns {undefined|number[]}\n */\n'modifyGetCellCoords',\n/**\n * Allows modify the visual row index that is used to retrieve the row header element (TH) before it's\n * highlighted (proper CSS class names are added). Modifying the visual row index allows building a custom\n * implementation of the nested headers feature or other features that require highlighting other DOM\n * elements than that the rendering engine, by default, would have highlighted.\n *\n * @event Hooks#beforeHighlightingRowHeader\n * @since 8.4.0\n * @param {number} row Visual row index.\n * @param {number} headerLevel Column header level (0 = most distant to the table).\n * @param {object} highlightMeta An object that contains additional information about processed selection.\n * @returns {number|undefined}\n */\n'beforeHighlightingRowHeader',\n/**\n * Allows modify the visual column index that is used to retrieve the column header element (TH) before it's\n * highlighted (proper CSS class names are added). Modifying the visual column index allows building a custom\n * implementation of the nested headers feature or other features that require highlighting other DOM\n * elements than that the rendering engine, by default, would have highlighted.\n *\n * @event Hooks#beforeHighlightingColumnHeader\n * @since 8.4.0\n * @param {number} column Visual column index.\n * @param {number} headerLevel Row header level (0 = most distant to the table).\n * @param {object} highlightMeta An object that contains additional information about processed selection.\n * @returns {number|undefined}\n */\n'beforeHighlightingColumnHeader',\n/**\n * Fired by {@link PersistentState} plugin, after loading value, saved under given key, from browser local storage.\n *\n * The `persistentStateLoad` hook is fired even when the {@link Options#persistentState} option is disabled.\n *\n * @event Hooks#persistentStateLoad\n * @param {string} key Key.\n * @param {object} valuePlaceholder Object containing the loaded value under `valuePlaceholder.value` (if no value have been saved, `value` key will be undefined).\n */\n'persistentStateLoad',\n/**\n * Fired by {@link PersistentState} plugin after resetting data from local storage. If no key is given, all values associated with table will be cleared.\n * This hook is fired when {@link Options#persistentState} option is enabled.\n *\n * @event Hooks#persistentStateReset\n * @param {string} [key] Key.\n */\n'persistentStateReset',\n/**\n * Fired by {@link PersistentState} plugin, after saving value under given key in browser local storage.\n *\n * The `persistentStateSave` hook is fired even when the {@link Options#persistentState} option is disabled.\n *\n * @event Hooks#persistentStateSave\n * @param {string} key Key.\n * @param {Mixed} value Value to save.\n */\n'persistentStateSave',\n/**\n * Fired by {@link ColumnSorting} and {@link MultiColumnSorting} plugins before sorting the column. If you return `false` value inside callback for hook, then sorting\n * will be not applied by the Handsontable (useful for server-side sorting).\n *\n * This hook is fired when {@link Options#columnSorting} or {@link Options#multiColumnSorting} option is enabled.\n *\n * @event Hooks#beforeColumnSort\n * @param {Array} currentSortConfig Current sort configuration (for all sorted columns).\n * @param {Array} destinationSortConfigs Destination sort configuration (for all sorted columns).\n * @returns {boolean | undefined} If `false` the column will not be sorted, `true` otherwise.\n */\n'beforeColumnSort',\n/**\n * Fired by {@link ColumnSorting} and {@link MultiColumnSorting} plugins after sorting the column. This hook is fired when {@link Options#columnSorting}\n * or {@link Options#multiColumnSorting} option is enabled.\n *\n * @event Hooks#afterColumnSort\n * @param {Array} currentSortConfig Current sort configuration (for all sorted columns).\n * @param {Array} destinationSortConfigs Destination sort configuration (for all sorted columns).\n */\n'afterColumnSort',\n/**\n * Fired by {@link Autofill} plugin after setting range of autofill. This hook is fired when {@link Options#fillHandle}\n * option is enabled.\n *\n * @event Hooks#modifyAutofillRange\n * @param {Array} startArea Array of visual coordinates of the starting point for the drag-down operation (`[startRow, startColumn, endRow, endColumn]`).\n * @param {Array} entireArea Array of visual coordinates of the entire area of the drag-down operation (`[startRow, startColumn, endRow, endColumn]`).\n */\n'modifyAutofillRange',\n/**\n * Fired to allow modifying the copyable range with a callback function.\n *\n * @event Hooks#modifyCopyableRange\n * @param {Array[]} copyableRanges Array of objects defining copyable cells.\n */\n'modifyCopyableRange',\n/**\n * Fired by {@link CopyPaste} plugin before copying the values to the clipboard and before clearing values of\n * the selected cells. This hook is fired when {@link Options#copyPaste} option is enabled.\n *\n * @event Hooks#beforeCut\n * @param {Array[]} data An array of arrays which contains data to cut.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which will be cut out.\n * @returns {*} If returns `false` then operation of the cutting out is canceled.\n * @example\n * ::: only-for javascript\n * ```js\n * // To disregard a single row, remove it from the array using data.splice(i, 1).\n * new Handsontable(element, {\n * beforeCut: function(data, coords) {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * // To cancel a cutting action, just return `false`.\n * new Handsontable(element, {\n * beforeCut: function(data, coords) {\n * return false;\n * }\n * });\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * // To disregard a single row, remove it from the array using data.splice(i, 1).\n * {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }}\n * />\n * // To cancel a cutting action, just return `false`.\n * {\n * return false;\n * }}\n * />\n * ```\n * :::\n */\n'beforeCut',\n/**\n * Fired by {@link CopyPaste} plugin after data was cut out from the table. This hook is fired when\n * {@link Options#copyPaste} option is enabled.\n *\n * @event Hooks#afterCut\n * @param {Array[]} data An array of arrays with the cut data.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which was cut out.\n */\n'afterCut',\n/**\n * Fired before values are copied to the clipboard.\n *\n * @event Hooks#beforeCopy\n * @param {Array[]} data An array of arrays which contains data to copied.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which will copied.\n * @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.\n * @returns {*} If returns `false` then copying is canceled.\n *\n * @example\n * ::: only-for javascript\n * ```js\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCopy: (data, coords) => {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * ...\n *\n * // To cancel copying, return false from the callback.\n * ...\n * new Handsontable(document.getElementById('example'), {\n * beforeCopy: (data, coords) => {\n * return false;\n * }\n * });\n * ...\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * ...\n * {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }}\n * />\n * ...\n *\n * // To cancel copying, return false from the callback.\n * ...\n * {\n * return false;\n * }}\n * />\n * ...\n * ```\n * :::\n */\n'beforeCopy',\n/**\n * Fired by {@link CopyPaste} plugin after data are pasted into table. This hook is fired when {@link Options#copyPaste}\n * option is enabled.\n *\n * @event Hooks#afterCopy\n * @param {Array[]} data An array of arrays which contains the copied data.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * which was copied.\n * @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.\n */\n'afterCopy',\n/**\n * Fired by {@link CopyPaste} plugin before values are pasted into table. This hook is fired when\n * {@link Options#copyPaste} option is enabled.\n *\n * @event Hooks#beforePaste\n * @param {Array[]} data An array of arrays which contains data to paste.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * that correspond to the previously selected area.\n * @returns {*} If returns `false` then pasting is canceled.\n * @example\n * ```js\n * ::: only-for javascript\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * new Handsontable(example, {\n * beforePaste: (data, coords) => {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }\n * });\n * // To cancel pasting, return false from the callback.\n * new Handsontable(example, {\n * beforePaste: (data, coords) => {\n * return false;\n * }\n * });\n * ```\n * :::\n *\n * ::: only-for react\n * ```jsx\n * // To disregard a single row, remove it from array using data.splice(i, 1).\n * {\n * // data -> [[1, 2, 3], [4, 5, 6]]\n * data.splice(0, 1);\n * // data -> [[4, 5, 6]]\n * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]\n * }}\n * />\n * // To cancel pasting, return false from the callback.\n * {\n * return false;\n * }}\n * />\n * ```\n * :::\n */\n'beforePaste',\n/**\n * Fired by {@link CopyPaste} plugin after values are pasted into table. This hook is fired when\n * {@link Options#copyPaste} option is enabled.\n *\n * @event Hooks#afterPaste\n * @param {Array[]} data An array of arrays with the pasted data.\n * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)\n * that correspond to the previously selected area.\n */\n'afterPaste',\n/**\n * Fired by the {@link ManualColumnFreeze} plugin, before freezing a column.\n *\n * @event Hooks#beforeColumnFreeze\n * @since 12.1.0\n * @param {number} column The visual index of the column that is going to freeze.\n * @param {boolean} freezePerformed If `true`: the column is going to freeze. If `false`: the column is not going to freeze (which might happen if the column is already frozen).\n * @returns {boolean|undefined} If `false`: the column is not going to freeze, and the `afterColumnFreeze` hook won't fire.\n */\n'beforeColumnFreeze',\n/**\n * Fired by the {@link ManualColumnFreeze} plugin, right after freezing a column.\n *\n * @event Hooks#afterColumnFreeze\n * @since 12.1.0\n * @param {number} column The visual index of the frozen column.\n * @param {boolean} freezePerformed If `true`: the column got successfully frozen. If `false`: the column didn't get frozen.\n */\n'afterColumnFreeze',\n/**\n * Fired by {@link ManualColumnMove} plugin before change order of the visual indexes. This hook is fired when\n * {@link Options#manualColumnMove} option is enabled.\n *\n * @event Hooks#beforeColumnMove\n * @param {Array} movedColumns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns.\n * Points to where the elements will be placed after the moving action.\n * To check visualization of final index please take a look at\n * [documentation](@/guides/columns/column-moving.md).\n * @param {number|undefined} dropIndex Visual column index, being a drop index for the moved columns.\n * Points to where we are going to drop the moved elements. To check\n * visualization of drop index please take a look at\n * [documentation](@/guides/columns/column-moving.md).\n * It's `undefined` when `dragColumns` function wasn't called.\n * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.\n * @returns {undefined | boolean} If `false` the column will not be moved, `true` otherwise.\n */\n'beforeColumnMove',\n/**\n * Fired by {@link ManualColumnMove} plugin after changing order of the visual indexes.\n * This hook is fired when {@link Options#manualColumnMove} option is enabled.\n *\n * @event Hooks#afterColumnMove\n * @param {Array} movedColumns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns.\n * Points to where the elements will be placed after the moving action.\n * To check visualization of final index please take a look at\n * [documentation](@/guides/columns/column-moving.md).\n * @param {number|undefined} dropIndex Visual column index, being a drop index for the moved columns.\n * Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at\n * [documentation](@/guides/columns/column-moving.md).\n * It's `undefined` when `dragColumns` function wasn't called.\n * @param {boolean} movePossible Indicates if it was possible to move columns to the desired position.\n * @param {boolean} orderChanged Indicates if order of columns was changed by move.\n */\n'afterColumnMove',\n/**\n * Fired by the {@link ManualColumnFreeze} plugin, before unfreezing a column.\n *\n * @event Hooks#beforeColumnUnfreeze\n * @since 12.1.0\n * @param {number} column The visual index of the column that is going to unfreeze.\n * @param {boolean} unfreezePerformed If `true`: the column is going to unfreeze. If `false`: the column is not going to unfreeze (which might happen if the column is already unfrozen).\n * @returns {boolean|undefined} If `false`: the column is not going to unfreeze, and the `afterColumnUnfreeze` hook won't fire.\n */\n'beforeColumnUnfreeze',\n/**\n * Fired by the {@link ManualColumnFreeze} plugin, right after unfreezing a column.\n *\n * @event Hooks#afterColumnUnfreeze\n * @since 12.1.0\n * @param {number} column The visual index of the unfrozen column.\n * @param {boolean} unfreezePerformed If `true`: the column got successfully unfrozen. If `false`: the column didn't get unfrozen.\n */\n'afterColumnUnfreeze',\n/**\n * Fired by {@link ManualRowMove} plugin before changing the order of the visual indexes. This hook is fired when\n * {@link Options#manualRowMove} option is enabled.\n *\n * @event Hooks#beforeRowMove\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows.\n * Points to where the elements will be placed after the moving action.\n * To check visualization of final index please take a look at\n * [documentation](@/guides/rows/row-moving.md).\n * @param {number|undefined} dropIndex Visual row index, being a drop index for the moved rows.\n * Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at\n * [documentation](@/guides/rows/row-moving.md).\n * It's `undefined` when `dragRows` function wasn't called.\n * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeRowMove',\n/**\n * Fired by {@link ManualRowMove} plugin after changing the order of the visual indexes.\n * This hook is fired when {@link Options#manualRowMove} option is enabled.\n *\n * @event Hooks#afterRowMove\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows.\n * Points to where the elements will be placed after the moving action.\n * To check visualization of final index please take a look at\n * [documentation](@/guides/rows/row-moving.md).\n * @param {number|undefined} dropIndex Visual row index, being a drop index for the moved rows.\n * Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at\n * [documentation](@/guides/rows/row-moving.md).\n * It's `undefined` when `dragRows` function wasn't called.\n * @param {boolean} movePossible Indicates if it was possible to move rows to the desired position.\n * @param {boolean} orderChanged Indicates if order of rows was changed by move.\n */\n'afterRowMove',\n/**\n * Fired by {@link ManualColumnResize} plugin before rendering the table with modified column sizes. This hook is\n * fired when {@link Options#manualColumnResize} option is enabled.\n *\n * @event Hooks#beforeColumnResize\n * @param {number} newSize Calculated new column width.\n * @param {number} column Visual index of the resized column.\n * @param {boolean} isDoubleClick Flag that determines whether there was a double-click.\n * @returns {number} Returns a new column size or `undefined`, if column size should be calculated automatically.\n */\n'beforeColumnResize',\n/**\n * Fired by {@link ManualColumnResize} plugin after rendering the table with modified column sizes. This hook is\n * fired when {@link Options#manualColumnResize} option is enabled.\n *\n * @event Hooks#afterColumnResize\n * @param {number} newSize Calculated new column width.\n * @param {number} column Visual index of the resized column.\n * @param {boolean} isDoubleClick Flag that determines whether there was a double-click.\n */\n'afterColumnResize',\n/**\n * Fired by {@link ManualRowResize} plugin before rendering the table with modified row sizes. This hook is\n * fired when {@link Options#manualRowResize} option is enabled.\n *\n * @event Hooks#beforeRowResize\n * @param {number} newSize Calculated new row height.\n * @param {number} row Visual index of the resized row.\n * @param {boolean} isDoubleClick Flag that determines whether there was a double-click.\n * @returns {number|undefined} Returns the new row size or `undefined` if row size should be calculated automatically.\n */\n'beforeRowResize',\n/**\n * Fired by {@link ManualRowResize} plugin after rendering the table with modified row sizes. This hook is\n * fired when {@link Options#manualRowResize} option is enabled.\n *\n * @event Hooks#afterRowResize\n * @param {number} newSize Calculated new row height.\n * @param {number} row Visual index of the resized row.\n * @param {boolean} isDoubleClick Flag that determines whether there was a double-click.\n */\n'afterRowResize',\n/**\n * Fired after getting the column header renderers.\n *\n * @event Hooks#afterGetColumnHeaderRenderers\n * @param {Function[]} renderers An array of the column header renderers.\n */\n'afterGetColumnHeaderRenderers',\n/**\n * Fired after getting the row header renderers.\n *\n * @event Hooks#afterGetRowHeaderRenderers\n * @param {Function[]} renderers An array of the row header renderers.\n */\n'afterGetRowHeaderRenderers',\n/**\n * Fired before applying stretched column width to column.\n *\n * @event Hooks#beforeStretchingColumnWidth\n * @param {number} stretchedWidth Calculated width.\n * @param {number} column Visual column index.\n * @returns {number|undefined} Returns new width which will be applied to the column element.\n */\n'beforeStretchingColumnWidth',\n/**\n * Fired by the [`Filters`](@/api/filters.md) plugin,\n * before a [column filter](@/guides/columns/column-filter.md) gets applied.\n *\n * [`beforeFilter`](#beforefilter) takes one argument (`conditionsStack`), which is an array of objects.\n * Each object represents one of your [column filters](@/api/filters.md#addcondition),\n * and consists of the following properties:\n *\n * | Property | Possible values | Description |\n * | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n * | `column` | Number | A visual index of the column to which the filter will be applied. |\n * | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |\n * | `operation` | `'conjunction'` \\| `'disjunction'` \\| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |\n *\n * An example of the format of the `conditionsStack` argument:\n *\n * ```js\n * [\n * {\n * column: 2,\n * conditions: [\n * {name: 'begins_with', args: [['S']]}\n * ],\n * operation: 'conjunction'\n * },\n * {\n * column: 4,\n * conditions: [\n * {name: 'not_empty', args: []}\n * ],\n * operation: 'conjunction'\n * },\n * ]\n * ```\n *\n * To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI),\n * set [`beforeFilter`](#beforefilter) to return `false`:\n *\n * ```js\n * new Handsontable(document.getElementById('example'), {\n * beforeFilter: (conditionsStack) => {\n * return false;\n * }\n * });\n *```\n *\n * Read more:\n * - [Guides: Column filter](@/guides/columns/column-filter.md)\n * - [Hooks: `afterFilter`](#afterfilter)\n * - [Options: `filters`](@/api/options.md#filters)\n * - [Plugins: `Filters`](@/api/filters.md)\n * – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)\n *\n * @event Hooks#beforeFilter\n * @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).\n * @returns {boolean} To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI), return `false`.\n */\n'beforeFilter',\n/**\n * Fired by the [`Filters`](@/api/filters.md) plugin,\n * after a [column filter](@/guides/columns/column-filter.md) gets applied.\n *\n * [`afterFilter`](#afterfilter) takes one argument (`conditionsStack`), which is an array of objects.\n * Each object represents one of your [column filters](@/api/filters.md#addcondition),\n * and consists of the following properties:\n *\n * | Property | Possible values | Description |\n * | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n * | `column` | Number | A visual index of the column to which the filter was applied. |\n * | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |\n * | `operation` | `'conjunction'` \\| `'disjunction'` \\| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |\n *\n * An example of the format of the `conditionsStack` argument:\n *\n * ```js\n * [\n * {\n * column: 2,\n * conditions: [\n * {name: 'begins_with', args: [['S']]}\n * ],\n * operation: 'conjunction'\n * },\n * {\n * column: 4,\n * conditions: [\n * {name: 'not_empty', args: []}\n * ],\n * operation: 'conjunction'\n * },\n * ]\n * ```\n *\n * Read more:\n * - [Guides: Column filter](@/guides/columns/column-filter.md)\n * - [Hooks: `beforeFilter`](#beforefilter)\n * - [Options: `filters`](@/api/options.md#filters)\n * - [Plugins: `Filters`](@/api/filters.md)\n * – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)\n *\n * @event Hooks#afterFilter\n * @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).\n */\n'afterFilter',\n/**\n * Fired by the {@link Formulas} plugin, when any cell value changes.\n *\n * Returns an array of objects that contains:\n * - The addresses (`sheet`, `row`, `col`) and new values (`newValue`) of the changed cells.\n * - The addresses and new values of any cells that had to be recalculated (because their formulas depend on the cells that changed).\n *\n * This hook gets also fired on Handsontable's initialization, returning the addresses and values of all cells.\n *\n * Read more:\n * - [Guides: Formula calculation](@/guides/formulas/formula-calculation.md)\n * - [HyperFormula documentation: `valuesUpdated`](https://hyperformula.handsontable.com/api/interfaces/listeners.html#valuesupdated)\n *\n * @since 9.0.0\n * @event Hooks#afterFormulasValuesUpdate\n * @param {Array} changes The addresses and new values of all the changed and recalculated cells.\n */\n'afterFormulasValuesUpdate',\n/**\n * Fired when a named expression is added to the Formulas' engine instance.\n *\n * @since 9.0.0\n * @event Hooks#afterNamedExpressionAdded\n * @param {string} namedExpressionName The name of the added expression.\n * @param {Array} changes The values and location of applied changes.\n */\n'afterNamedExpressionAdded',\n/**\n * Fired when a named expression is removed from the Formulas' engine instance.\n *\n * @since 9.0.0\n * @event Hooks#afterNamedExpressionRemoved\n * @param {string} namedExpressionName The name of the removed expression.\n * @param {Array} changes The values and location of applied changes.\n */\n'afterNamedExpressionRemoved',\n/**\n * Fired when a new sheet is added to the Formulas' engine instance.\n *\n * @since 9.0.0\n * @event Hooks#afterSheetAdded\n * @param {string} addedSheetDisplayName The name of the added sheet.\n */\n'afterSheetAdded',\n/**\n * Fired when a sheet in the Formulas' engine instance is renamed.\n *\n * @since 9.0.0\n * @event Hooks#afterSheetRenamed\n * @param {string} oldDisplayName The old name of the sheet.\n * @param {string} newDisplayName The new name of the sheet.\n */\n'afterSheetRenamed',\n/**\n * Fired when a sheet is removed from the Formulas' engine instance.\n *\n * @since 9.0.0\n * @event Hooks#afterSheetRemoved\n * @param {string} removedSheetDisplayName The removed sheet name.\n * @param {Array} changes The values and location of applied changes.\n */\n'afterSheetRemoved',\n/**\n * Fired while retrieving the column header height.\n *\n * @event Hooks#modifyColumnHeaderHeight\n */\n'modifyColumnHeaderHeight',\n/**\n * Fired while retrieving a column header's value.\n *\n * @since 12.3.0\n * @event Hooks#modifyColumnHeaderValue\n * @param {string} value A column header value.\n * @param {number} visualColumnIndex A visual column index.\n * @param {number} [headerLevel=0] Header level index. Accepts positive (0 to n)\n * and negative (-1 to -n) values. For positive values, 0 points to the\n * topmost header. For negative values, -1 points to the bottom-most\n * header (the header closest to the cells).\n * @returns {string} The column header value to be updated.\n */\n'modifyColumnHeaderValue',\n/**\n * Fired by {@link UndoRedo} plugin before the undo action. Contains information about the action that is being undone.\n * This hook is fired when {@link Options#undo} option is enabled.\n *\n * @event Hooks#beforeUndo\n * @param {object} action The action object. Contains information about the action being undone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeUndo',\n/**\n * Fired by {@link UndoRedo} plugin before changing undo stack.\n *\n * @event Hooks#beforeUndoStackChange\n * @since 8.4.0\n * @param {Array} doneActions Stack of actions which may be undone.\n * @param {string} [source] String that identifies source of action\n * ([list of all available sources](@/guides/getting-started/events-and-hooks.md#definition-for-source-argument)).\n * @returns {*|boolean} If false is returned the action of changing undo stack is canceled.\n */\n'beforeUndoStackChange',\n/**\n * Fired by {@link UndoRedo} plugin after the undo action. Contains information about the action that is being undone.\n * This hook is fired when {@link Options#undo} option is enabled.\n *\n * @event Hooks#afterUndo\n * @param {object} action The action object. Contains information about the action being undone. The `actionType`\n * property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).\n */\n'afterUndo',\n/**\n * Fired by {@link UndoRedo} plugin after changing undo stack.\n *\n * @event Hooks#afterUndoStackChange\n * @since 8.4.0\n * @param {Array} doneActionsBefore Stack of actions which could be undone before performing new action.\n * @param {Array} doneActionsAfter Stack of actions which can be undone after performing new action.\n */\n'afterUndoStackChange',\n/**\n * Fired by {@link UndoRedo} plugin before the redo action. Contains information about the action that is being redone.\n * This hook is fired when {@link Options#undo} option is enabled.\n *\n * @event Hooks#beforeRedo\n * @param {object} action The action object. Contains information about the action being redone. The `actionType`\n * property of the object specifies the type of the action in a String format (e.g. `'remove_row'`).\n * @returns {*|boolean} If false is returned the action is canceled.\n */\n'beforeRedo',\n/**\n * Fired by {@link UndoRedo} plugin before changing redo stack.\n *\n * @event Hooks#beforeRedoStackChange\n * @since 8.4.0\n * @param {Array} undoneActions Stack of actions which may be redone.\n */\n'beforeRedoStackChange',\n/**\n * Fired by {@link UndoRedo} plugin after the redo action. Contains information about the action that is being redone.\n * This hook is fired when {@link Options#undo} option is enabled.\n *\n * @event Hooks#afterRedo\n * @param {object} action The action object. Contains information about the action being redone. The `actionType`\n * property of the object specifies the type of the action in a String format (e.g. `'remove_row'`).\n */\n'afterRedo',\n/**\n * Fired by {@link UndoRedo} plugin after changing redo stack.\n *\n * @event Hooks#afterRedoStackChange\n * @since 8.4.0\n * @param {Array} undoneActionsBefore Stack of actions which could be redone before performing new action.\n * @param {Array} undoneActionsAfter Stack of actions which can be redone after performing new action.\n */\n'afterRedoStackChange',\n/**\n * Fired while retrieving the row header width.\n *\n * @event Hooks#modifyRowHeaderWidth\n * @param {number} rowHeaderWidth Row header width.\n */\n'modifyRowHeaderWidth',\n/**\n * Fired from the `populateFromArray` method during the `autofill` process. Fired for each \"autofilled\" cell individually.\n *\n * @deprecated\n * @event Hooks#beforeAutofillInsidePopulate\n * @param {object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.\n * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.\n * @param {Array[]} input Contains an array of rows with data being used in the autofill.\n * @param {Array} deltas The deltas array passed to the `populateFromArray` method.\n */\n'beforeAutofillInsidePopulate',\n/**\n * Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).\n *\n * @event Hooks#modifyTransformStart\n * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.\n */\n'modifyTransformStart',\n/**\n * Fired when the end of the selection is being modified (e.g. Moving the selection with the arrow keys).\n *\n * @event Hooks#modifyTransformEnd\n * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.\n */\n'modifyTransformEnd',\n/**\n * Fired after the start of the selection is being modified (e.g. Moving the selection with the arrow keys).\n *\n * @event Hooks#afterModifyTransformStart\n * @param {CellCoords} coords Coords of the freshly selected cell.\n * @param {number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.\n * @param {number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.\n */\n'afterModifyTransformStart',\n/**\n * Fired after the end of the selection is being modified (e.g. Moving the selection with the arrow keys).\n *\n * @event Hooks#afterModifyTransformEnd\n * @param {CellCoords} coords Visual coords of the freshly selected cell.\n * @param {number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.\n * @param {number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.\n */\n'afterModifyTransformEnd',\n/**\n * Fired inside the `viewportRowCalculatorOverride` method. Allows modifying the row calculator parameters.\n *\n * @event Hooks#afterViewportRowCalculatorOverride\n * @param {object} calc The row calculator.\n */\n'afterViewportRowCalculatorOverride',\n/**\n * Fired inside the `viewportColumnCalculatorOverride` method. Allows modifying the row calculator parameters.\n *\n * @event Hooks#afterViewportColumnCalculatorOverride\n * @param {object} calc The row calculator.\n */\n'afterViewportColumnCalculatorOverride',\n/**\n * Fired after initializing all the plugins.\n * This hook should be added before Handsontable is initialized.\n *\n * @event Hooks#afterPluginsInitialized\n *\n * @example\n * ```js\n * Handsontable.hooks.add('afterPluginsInitialized', myCallback);\n * ```\n */\n'afterPluginsInitialized',\n/**\n * Fired by {@link HiddenRows} plugin before marking the rows as hidden. Fired only if the {@link Options#hiddenRows} option is enabled.\n * Returning `false` in the callback will prevent the hiding action from completing.\n *\n * @event Hooks#beforeHideRows\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical row indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical row indexes.\n * @param {boolean} actionPossible `true`, if provided row indexes are valid, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the hiding action will not be completed.\n */\n'beforeHideRows',\n/**\n * Fired by {@link HiddenRows} plugin after marking the rows as hidden. Fired only if the {@link Options#hiddenRows} option is enabled.\n *\n * @event Hooks#afterHideRows\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical row indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical row indexes.\n * @param {boolean} actionPossible `true`, if provided row indexes are valid, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any non-hidden rows, `false` otherwise.\n */\n'afterHideRows',\n/**\n * Fired by {@link HiddenRows} plugin before marking the rows as not hidden. Fired only if the {@link Options#hiddenRows} option is enabled.\n * Returning `false` in the callback will prevent the row revealing action from completing.\n *\n * @event Hooks#beforeUnhideRows\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical row indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical row indexes.\n * @param {boolean} actionPossible `true`, if provided row indexes are valid, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the revealing action will not be completed.\n */\n'beforeUnhideRows',\n/**\n * Fired by {@link HiddenRows} plugin after marking the rows as not hidden. Fired only if the {@link Options#hiddenRows} option is enabled.\n *\n * @event Hooks#afterUnhideRows\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical row indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical row indexes.\n * @param {boolean} actionPossible `true`, if provided row indexes are valid, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any hidden rows, `false` otherwise.\n */\n'afterUnhideRows',\n/**\n * Fired by {@link HiddenColumns} plugin before marking the columns as hidden. Fired only if the {@link Options#hiddenColumns} option is enabled.\n * Returning `false` in the callback will prevent the hiding action from completing.\n *\n * @event Hooks#beforeHideColumns\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical column indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical column indexes.\n * @param {boolean} actionPossible `true`, if the provided column indexes are valid, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the hiding action will not be completed.\n */\n'beforeHideColumns',\n/**\n * Fired by {@link HiddenColumns} plugin after marking the columns as hidden. Fired only if the {@link Options#hiddenColumns} option is enabled.\n *\n * @event Hooks#afterHideColumns\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical column indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical column indexes.\n * @param {boolean} actionPossible `true`, if the provided column indexes are valid, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any non-hidden columns, `false` otherwise.\n */\n'afterHideColumns',\n/**\n * Fired by {@link HiddenColumns} plugin before marking the columns as not hidden. Fired only if the {@link Options#hiddenColumns} option is enabled.\n * Returning `false` in the callback will prevent the column revealing action from completing.\n *\n * @event Hooks#beforeUnhideColumns\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical column indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical column indexes.\n * @param {boolean} actionPossible `true`, if the provided column indexes are valid, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the hiding action will not be completed.\n */\n'beforeUnhideColumns',\n/**\n * Fired by {@link HiddenColumns} plugin after marking the columns as not hidden. Fired only if the {@link Options#hiddenColumns} option is enabled.\n *\n * @event Hooks#afterUnhideColumns\n * @param {Array} currentHideConfig Current hide configuration - a list of hidden physical column indexes.\n * @param {Array} destinationHideConfig Destination hide configuration - a list of hidden physical column indexes.\n * @param {boolean} actionPossible `true`, if the provided column indexes are valid, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any hidden columns, `false` otherwise.\n */\n'afterUnhideColumns',\n/**\n * Fired by {@link TrimRows} plugin before trimming rows. This hook is fired when {@link Options#trimRows} option is enabled.\n *\n * @event Hooks#beforeTrimRow\n * @param {Array} currentTrimConfig Current trim configuration - a list of trimmed physical row indexes.\n * @param {Array} destinationTrimConfig Destination trim configuration - a list of trimmed physical row indexes.\n * @param {boolean} actionPossible `true`, if all of the row indexes are withing the bounds of the table, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the trimming action will not be completed.\n */\n'beforeTrimRow',\n/**\n * Fired by {@link TrimRows} plugin after trimming rows. This hook is fired when {@link Options#trimRows} option is enabled.\n *\n * @event Hooks#afterTrimRow\n * @param {Array} currentTrimConfig Current trim configuration - a list of trimmed physical row indexes.\n * @param {Array} destinationTrimConfig Destination trim configuration - a list of trimmed physical row indexes.\n * @param {boolean} actionPossible `true`, if all of the row indexes are withing the bounds of the table, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any non-trimmed rows, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the trimming action will not be completed.\n */\n'afterTrimRow',\n/**\n * Fired by {@link TrimRows} plugin before untrimming rows. This hook is fired when {@link Options#trimRows} option is enabled.\n *\n * @event Hooks#beforeUntrimRow\n * @param {Array} currentTrimConfig Current trim configuration - a list of trimmed physical row indexes.\n * @param {Array} destinationTrimConfig Destination trim configuration - a list of trimmed physical row indexes.\n * @param {boolean} actionPossible `true`, if all of the row indexes are withing the bounds of the table, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the untrimming action will not be completed.\n */\n'beforeUntrimRow',\n/**\n * Fired by {@link TrimRows} plugin after untrimming rows. This hook is fired when {@link Options#trimRows} option is enabled.\n *\n * @event Hooks#afterUntrimRow\n * @param {Array} currentTrimConfig Current trim configuration - a list of trimmed physical row indexes.\n * @param {Array} destinationTrimConfig Destination trim configuration - a list of trimmed physical row indexes.\n * @param {boolean} actionPossible `true`, if all of the row indexes are withing the bounds of the table, `false` otherwise.\n * @param {boolean} stateChanged `true`, if the action affected any trimmed rows, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the untrimming action will not be completed.\n */\n'afterUntrimRow',\n/**\n * Fired by {@link DropdownMenu} plugin before opening the dropdown menu. This hook is fired when {@link Options#dropdownMenu}\n * option is enabled.\n *\n * @event Hooks#beforeDropdownMenuShow\n * @param {DropdownMenu} dropdownMenu The DropdownMenu instance.\n */\n'beforeDropdownMenuShow',\n/**\n * Fired by {@link DropdownMenu} plugin after opening the Dropdown Menu. This hook is fired when {@link Options#dropdownMenu}\n * option is enabled.\n *\n * @event Hooks#afterDropdownMenuShow\n * @param {DropdownMenu} dropdownMenu The DropdownMenu instance.\n */\n'afterDropdownMenuShow',\n/**\n * Fired by {@link DropdownMenu} plugin after hiding the Dropdown Menu. This hook is fired when {@link Options#dropdownMenu}\n * option is enabled.\n *\n * @event Hooks#afterDropdownMenuHide\n * @param {DropdownMenu} instance The DropdownMenu instance.\n */\n'afterDropdownMenuHide',\n/**\n * Fired by {@link NestedRows} plugin before adding a children to the NestedRows structure. This hook is fired when\n * {@link Options#nestedRows} option is enabled.\n *\n * @event Hooks#beforeAddChild\n * @param {object} parent The parent object.\n * @param {object|undefined} element The element added as a child. If `undefined`, a blank child was added.\n * @param {number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.\n */\n'beforeAddChild',\n/**\n * Fired by {@link NestedRows} plugin after adding a children to the NestedRows structure. This hook is fired when\n * {@link Options#nestedRows} option is enabled.\n *\n * @event Hooks#afterAddChild\n * @param {object} parent The parent object.\n * @param {object|undefined} element The element added as a child. If `undefined`, a blank child was added.\n * @param {number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.\n */\n'afterAddChild',\n/**\n * Fired by {@link NestedRows} plugin before detaching a child from its parent. This hook is fired when\n * {@link Options#nestedRows} option is enabled.\n *\n * @event Hooks#beforeDetachChild\n * @param {object} parent An object representing the parent from which the element is to be detached.\n * @param {object} element The detached element.\n */\n'beforeDetachChild',\n/**\n * Fired by {@link NestedRows} plugin after detaching a child from its parent. This hook is fired when\n * {@link Options#nestedRows} option is enabled.\n *\n * @event Hooks#afterDetachChild\n * @param {object} parent An object representing the parent from which the element was detached.\n * @param {object} element The detached element.\n * @param {number} finalElementPosition The final row index of the detached element.\n */\n'afterDetachChild',\n/**\n * Fired after the editor is opened and rendered.\n *\n * @event Hooks#afterBeginEditing\n * @param {number} row Visual row index of the edited cell.\n * @param {number} column Visual column index of the edited cell.\n */\n'afterBeginEditing',\n/**\n * Fired by {@link MergeCells} plugin before cell merging. This hook is fired when {@link Options#mergeCells}\n * option is enabled.\n *\n * @event Hooks#beforeMergeCells\n * @param {CellRange} cellRange Selection cell range.\n * @param {boolean} [auto=false] `true` if called automatically by the plugin.\n */\n'beforeMergeCells',\n/**\n * Fired by {@link MergeCells} plugin after cell merging. This hook is fired when {@link Options#mergeCells}\n * option is enabled.\n *\n * @event Hooks#afterMergeCells\n * @param {CellRange} cellRange Selection cell range.\n * @param {object} mergeParent The parent collection of the provided cell range.\n * @param {boolean} [auto=false] `true` if called automatically by the plugin.\n */\n'afterMergeCells',\n/**\n * Fired by {@link MergeCells} plugin before unmerging the cells. This hook is fired when {@link Options#mergeCells}\n * option is enabled.\n *\n * @event Hooks#beforeUnmergeCells\n * @param {CellRange} cellRange Selection cell range.\n * @param {boolean} [auto=false] `true` if called automatically by the plugin.\n */\n'beforeUnmergeCells',\n/**\n * Fired by {@link MergeCells} plugin after unmerging the cells. This hook is fired when {@link Options#mergeCells}\n * option is enabled.\n *\n * @event Hooks#afterUnmergeCells\n * @param {CellRange} cellRange Selection cell range.\n * @param {boolean} [auto=false] `true` if called automatically by the plugin.\n */\n'afterUnmergeCells',\n/**\n * Fired after the table was switched into listening mode. This allows Handsontable to capture keyboard events and\n * respond in the right way.\n *\n * @event Hooks#afterListen\n */\n'afterListen',\n/**\n * Fired after the table was switched off from the listening mode. This makes the Handsontable inert for any\n * keyboard events.\n *\n * @event Hooks#afterUnlisten\n */\n'afterUnlisten',\n/**\n * Fired after the window was resized or the size of the Handsontable root element was changed.\n *\n * @event Hooks#afterRefreshDimensions\n * @param {object} previousDimensions Previous dimensions of the container.\n * @param {object} currentDimensions Current dimensions of the container.\n * @param {boolean} stateChanged `true`, if the container was re-render, `false` otherwise.\n */\n'afterRefreshDimensions',\n/**\n * Cancellable hook, called after resizing a window or after detecting size change of the\n * Handsontable root element, but before redrawing a table.\n *\n * @event Hooks#beforeRefreshDimensions\n * @param {object} previousDimensions Previous dimensions of the container.\n * @param {object} currentDimensions Current dimensions of the container.\n * @param {boolean} actionPossible `true`, if current and previous dimensions are different, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the refresh action will not be completed.\n */\n'beforeRefreshDimensions',\n/**\n * Fired by {@link CollapsibleColumns} plugin before columns collapse. This hook is fired when {@link Options#collapsibleColumns} option is enabled.\n *\n * @event Hooks#beforeColumnCollapse\n * @since 8.0.0\n * @param {Array} currentCollapsedColumns Current collapsible configuration - a list of collapsible physical column indexes.\n * @param {Array} destinationCollapsedColumns Destination collapsible configuration - a list of collapsible physical column indexes.\n * @param {boolean} collapsePossible `true`, if all of the column indexes are withing the bounds of the collapsed sections, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the collapsing action will not be completed.\n */\n'beforeColumnCollapse',\n/**\n * Fired by {@link CollapsibleColumns} plugin before columns collapse. This hook is fired when {@link Options#collapsibleColumns} option is enabled.\n *\n * @event Hooks#afterColumnCollapse\n * @since 8.0.0\n * @param {Array} currentCollapsedColumns Current collapsible configuration - a list of collapsible physical column indexes.\n * @param {Array} destinationCollapsedColumns Destination collapsible configuration - a list of collapsible physical column indexes.\n * @param {boolean} collapsePossible `true`, if all of the column indexes are withing the bounds of the collapsed sections, `false` otherwise.\n * @param {boolean} successfullyCollapsed `true`, if the action affected any non-collapsible column, `false` otherwise.\n */\n'afterColumnCollapse',\n/**\n * Fired by {@link CollapsibleColumns} plugin before columns expand. This hook is fired when {@link Options#collapsibleColumns} option is enabled.\n *\n * @event Hooks#beforeColumnExpand\n * @since 8.0.0\n * @param {Array} currentCollapsedColumns Current collapsible configuration - a list of collapsible physical column indexes.\n * @param {Array} destinationCollapsedColumns Destination collapsible configuration - a list of collapsible physical column indexes.\n * @param {boolean} expandPossible `true`, if all of the column indexes are withing the bounds of the collapsed sections, `false` otherwise.\n * @returns {undefined|boolean} If the callback returns `false`, the expanding action will not be completed.\n */\n'beforeColumnExpand',\n/**\n * Fired by {@link CollapsibleColumns} plugin before columns expand. This hook is fired when {@link Options#collapsibleColumns} option is enabled.\n *\n * @event Hooks#afterColumnExpand\n * @since 8.0.0\n * @param {Array} currentCollapsedColumns Current collapsible configuration - a list of collapsible physical column indexes.\n * @param {Array} destinationCollapsedColumns Destination collapsible configuration - a list of collapsible physical column indexes.\n * @param {boolean} expandPossible `true`, if all of the column indexes are withing the bounds of the collapsed sections, `false` otherwise.\n * @param {boolean} successfullyExpanded `true`, if the action affected any non-collapsible column, `false` otherwise.\n */\n'afterColumnExpand',\n/**\n * Fired by {@link AutoColumnSize} plugin within SampleGenerator utility.\n *\n * @event Hooks#modifyAutoColumnSizeSeed\n * @since 8.4.0\n * @param {string|undefined} seed Seed ID, unique name to categorize samples.\n * @param {object} cellProperties Object containing the cell properties.\n * @param {*} cellValue Value of the cell.\n */\n'modifyAutoColumnSizeSeed'];\n\n/**\n * Template warning message for removed hooks.\n *\n * @type {string}\n */\nvar REMOVED_MESSAGE = toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The plugin hook \\\"[hookName]\\\" was removed in Handsontable [removedInVersion]. \\n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to \\n learn about the migration path.\"], [\"The plugin hook \\\"[hookName]\\\" was removed in Handsontable [removedInVersion].\\\\x20\\n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\\\\x20\\n learn about the migration path.\"])));\n\n/**\n * The list of the hooks which are removed from the API. The warning message is printed out in\n * the developer console when the hook is used.\n *\n * The Map key is represented by hook name and its value points to the Handsontable version\n * in which it was removed.\n *\n * @type {Map}\n */\nvar REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['unmodifyRow', '8.0.0'], ['unmodifyCol', '8.0.0'], ['skipLengthCache', '8.0.0'], ['hiddenColumn', '8.0.0'], ['hiddenRow', '8.0.0']]);\n\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * The list of the hooks which are deprecated. The warning message is printed out in\n * the developer console when the hook is used.\n *\n * The Map key is represented by hook name and its value keeps message which whould be\n * printed out when the hook is used.\n *\n * Usage:\n * ```js\n * ...\n * New Map([\n * ['beforeColumnExpand', 'The plugin hook \"beforeColumnExpand\" is deprecated. Use \"beforeColumnExpand2\" instead.'],\n * ])\n * ...\n * ```\n *\n *\n * @type {Map}\n */\n/* eslint-enable jsdoc/require-description-complete-sentence */\nvar DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook \"beforeAutofillInsidePopulate\" is deprecated and will be removed in the next major release.']]);\nvar Hooks = /*#__PURE__*/function () {\n /**\n *\n */\n function Hooks() {\n _classCallCheck(this, Hooks);\n this.globalBucket = this.createEmptyBucket();\n }\n\n /**\n * Returns a new object with empty handlers related to every registered hook name.\n *\n * @returns {object} The empty bucket object.\n *\n * @example\n * ```js\n * Handsontable.hooks.createEmptyBucket();\n * // Results:\n * {\n * ...\n * afterCreateCol: [],\n * afterCreateRow: [],\n * beforeInit: [],\n * ...\n * }\n * ```\n */\n _createClass(Hooks, [{\n key: \"createEmptyBucket\",\n value: function createEmptyBucket() {\n var bucket = Object.create(null);\n\n // eslint-disable-next-line no-return-assign\n arrayEach(REGISTERED_HOOKS, function (hook) {\n return bucket[hook] = [];\n });\n return bucket;\n }\n\n /**\n * Get hook bucket based on the context of the object or if argument is `undefined`, get the global hook bucket.\n *\n * @param {object} [context=null] A Handsontable instance.\n * @returns {object} Returns a global or Handsontable instance bucket.\n */\n }, {\n key: \"getBucket\",\n value: function getBucket() {\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (context) {\n if (!context.pluginHookBucket) {\n context.pluginHookBucket = this.createEmptyBucket();\n }\n return context.pluginHookBucket;\n }\n return this.globalBucket;\n }\n\n /**\n * Adds a listener (globally or locally) to a specified hook name.\n * If the `context` parameter is provided, the hook will be added only to the instance it references.\n * Otherwise, the callback will be used everytime the hook fires on any Handsontable instance.\n * You can provide an array of callback functions as the `callback` argument, this way they will all be fired\n * once the hook is triggered.\n *\n * @see Core#addHook\n * @param {string} key Hook name.\n * @param {Function|Array} callback Callback function or an array of functions.\n * @param {object} [context=null] The context for the hook callback to be added - a Handsontable instance or leave empty.\n * @returns {Hooks} Instance of Hooks.\n *\n * @example\n * ```js\n * // single callback, added locally\n * Handsontable.hooks.add('beforeInit', myCallback, hotInstance);\n *\n * // single callback, added globally\n * Handsontable.hooks.add('beforeInit', myCallback);\n *\n * // multiple callbacks, added locally\n * Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback], hotInstance);\n *\n * // multiple callbacks, added globally\n * Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback]);\n * ```\n */\n }, {\n key: \"add\",\n value: function add(key, callback) {\n var _this = this;\n var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n if (Array.isArray(callback)) {\n arrayEach(callback, function (c) {\n return _this.add(key, c, context);\n });\n } else {\n if (REMOVED_HOOKS.has(key)) {\n warn(substitute(REMOVED_MESSAGE, {\n hookName: key,\n removedInVersion: REMOVED_HOOKS.get(key)\n }));\n }\n if (DEPRECATED_HOOKS.has(key)) {\n warn(DEPRECATED_HOOKS.get(key));\n }\n var bucket = this.getBucket(context);\n if (typeof bucket[key] === 'undefined') {\n this.register(key);\n bucket[key] = [];\n }\n callback.skip = false;\n if (bucket[key].indexOf(callback) === -1) {\n // only add a hook if it has not already been added (adding the same hook twice is now silently ignored)\n var foundInitialHook = false;\n if (callback.initialHook) {\n arrayEach(bucket[key], function (cb, i) {\n if (cb.initialHook) {\n bucket[key][i] = callback;\n foundInitialHook = true;\n return false;\n }\n });\n }\n if (!foundInitialHook) {\n bucket[key].push(callback);\n }\n }\n }\n return this;\n }\n\n /**\n * Adds a listener to a specified hook. After the hook runs this listener will be automatically removed from the bucket.\n *\n * @see Core#addHookOnce\n * @param {string} key Hook/Event name.\n * @param {Function|Array} callback Callback function.\n * @param {object} [context=null] A Handsontable instance.\n *\n * @example\n * ```js\n * Handsontable.hooks.once('beforeInit', myCallback, hotInstance);\n * ```\n */\n }, {\n key: \"once\",\n value: function once(key, callback) {\n var _this2 = this;\n var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n if (Array.isArray(callback)) {\n arrayEach(callback, function (c) {\n return _this2.once(key, c, context);\n });\n } else {\n callback.runOnce = true;\n this.add(key, callback, context);\n }\n }\n\n /**\n * Removes a listener from a hook with a given name. If the `context` argument is provided, it removes a listener from a local hook assigned to the given Handsontable instance.\n *\n * @see Core#removeHook\n * @param {string} key Hook/Event name.\n * @param {Function} callback Callback function (needs the be the function that was previously added to the hook).\n * @param {object} [context=null] Handsontable instance.\n * @returns {boolean} Returns `true` if hook was removed, `false` otherwise.\n *\n * @example\n * ```js\n * Handsontable.hooks.remove('beforeInit', myCallback);\n * ```\n */\n }, {\n key: \"remove\",\n value: function remove(key, callback) {\n var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var bucket = this.getBucket(context);\n if (typeof bucket[key] !== 'undefined') {\n if (bucket[key].indexOf(callback) >= 0) {\n callback.skip = true;\n return true;\n }\n }\n return false;\n }\n\n /**\n * Checks whether there are any registered listeners for the provided hook name.\n * If the `context` parameter is provided, it only checks for listeners assigned to the given Handsontable instance.\n *\n * @param {string} key Hook name.\n * @param {object} [context=null] A Handsontable instance.\n * @returns {boolean} `true` for success, `false` otherwise.\n */\n }, {\n key: \"has\",\n value: function has(key) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var bucket = this.getBucket(context);\n return !!(bucket[key] !== void 0 && bucket[key].length);\n }\n\n /**\n * Runs all local and global callbacks assigned to the hook identified by the `key` parameter.\n * It returns either a return value from the last called callback or the first parameter (`p1`) passed to the `run` function.\n *\n * @see Core#runHooks\n * @param {object} context Handsontable instance.\n * @param {string} key Hook/Event name.\n * @param {*} [p1] Parameter to be passed as an argument to the callback function.\n * @param {*} [p2] Parameter to be passed as an argument to the callback function.\n * @param {*} [p3] Parameter to be passed as an argument to the callback function.\n * @param {*} [p4] Parameter to be passed as an argument to the callback function.\n * @param {*} [p5] Parameter to be passed as an argument to the callback function.\n * @param {*} [p6] Parameter to be passed as an argument to the callback function.\n * @returns {*} Either a return value from the last called callback or `p1`.\n *\n * @example\n * ```js\n * Handsontable.hooks.run(hot, 'beforeInit');\n * ```\n */\n }, {\n key: \"run\",\n value: function run(context, key, p1, p2, p3, p4, p5, p6) {\n {\n var globalHandlers = this.globalBucket[key];\n var length = globalHandlers ? globalHandlers.length : 0;\n var index = 0;\n if (length) {\n // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.\n while (index < length) {\n if (!globalHandlers[index] || globalHandlers[index].skip) {\n index += 1;\n /* eslint-disable no-continue */\n continue;\n }\n var res = fastCall(globalHandlers[index], context, p1, p2, p3, p4, p5, p6);\n if (res !== void 0) {\n // eslint-disable-next-line no-param-reassign\n p1 = res;\n }\n if (globalHandlers[index] && globalHandlers[index].runOnce) {\n this.remove(key, globalHandlers[index]);\n }\n index += 1;\n }\n }\n }\n {\n var localHandlers = this.getBucket(context)[key];\n var _length = localHandlers ? localHandlers.length : 0;\n var _index = 0;\n if (_length) {\n // Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.\n while (_index < _length) {\n if (!localHandlers[_index] || localHandlers[_index].skip) {\n _index += 1;\n /* eslint-disable no-continue */\n continue;\n }\n var _res = fastCall(localHandlers[_index], context, p1, p2, p3, p4, p5, p6);\n if (_res !== void 0) {\n // eslint-disable-next-line no-param-reassign\n p1 = _res;\n }\n if (localHandlers[_index] && localHandlers[_index].runOnce) {\n this.remove(key, localHandlers[_index], context);\n }\n _index += 1;\n }\n }\n }\n return p1;\n }\n\n /**\n * Destroy all listeners connected to the context. If no context is provided, the global listeners will be destroyed.\n *\n * @param {object} [context=null] A Handsontable instance.\n * @example\n * ```js\n * // destroy the global listeners\n * Handsontable.hooks.destroy();\n *\n * // destroy the local listeners\n * Handsontable.hooks.destroy(hotInstance);\n * ```\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // eslint-disable-next-line no-return-assign\n objectEach(this.getBucket(context), function (value, key, bucket) {\n return bucket[key].length = 0;\n });\n }\n\n /**\n * Registers a hook name (adds it to the list of the known hook names). Used by plugins.\n * It is not necessary to call register, but if you use it, your plugin hook will be used returned by\n * the `getRegistered` method. (which itself is used in the [demo](@/guides/getting-started/events-and-hooks.md)).\n *\n * @param {string} key The hook name.\n *\n * @example\n * ```js\n * Handsontable.hooks.register('myHook');\n * ```\n */\n }, {\n key: \"register\",\n value: function register(key) {\n if (!this.isRegistered(key)) {\n REGISTERED_HOOKS.push(key);\n }\n }\n\n /**\n * Deregisters a hook name (removes it from the list of known hook names).\n *\n * @param {string} key The hook name.\n *\n * @example\n * ```js\n * Handsontable.hooks.deregister('myHook');\n * ```\n */\n }, {\n key: \"deregister\",\n value: function deregister(key) {\n if (this.isRegistered(key)) {\n REGISTERED_HOOKS.splice(REGISTERED_HOOKS.indexOf(key), 1);\n }\n }\n\n /**\n * Returns a boolean value depending on if a hook by such name has been removed or deprecated.\n *\n * @param {string} hookName The hook name to check.\n * @returns {boolean} Returns `true` if the provided hook name was marked as deprecated or\n * removed from API, `false` otherwise.\n * @example\n * ```js\n * Handsontable.hooks.isDeprecated('skipLengthCache');\n *\n * // Results:\n * true\n * ```\n */\n }, {\n key: \"isDeprecated\",\n value: function isDeprecated(hookName) {\n return DEPRECATED_HOOKS.has(hookName) || REMOVED_HOOKS.has(hookName);\n }\n\n /**\n * Returns a boolean depending on if a hook by such name has been registered.\n *\n * @param {string} hookName The hook name to check.\n * @returns {boolean} `true` for success, `false` otherwise.\n * @example\n * ```js\n * Handsontable.hooks.isRegistered('beforeInit');\n *\n * // Results:\n * true\n * ```\n */\n }, {\n key: \"isRegistered\",\n value: function isRegistered(hookName) {\n return REGISTERED_HOOKS.indexOf(hookName) >= 0;\n }\n\n /**\n * Returns an array of registered hooks.\n *\n * @returns {Array} An array of registered hooks.\n *\n * @example\n * ```js\n * Handsontable.hooks.getRegistered();\n *\n * // Results:\n * [\n * ...\n * 'beforeInit',\n * 'beforeRender',\n * 'beforeSetRangeEnd',\n * 'beforeDrawBorders',\n * 'beforeChange',\n * ...\n * ]\n * ```\n */\n }, {\n key: \"getRegistered\",\n value: function getRegistered() {\n return REGISTERED_HOOKS;\n }\n }], [{\n key: \"getSingleton\",\n value: function getSingleton() {\n return getGlobalSingleton();\n }\n }]);\n return Hooks;\n}();\nvar globalSingleton = new Hooks();\n\n/**\n * @returns {Hooks}\n */\nfunction getGlobalSingleton() {\n return globalSingleton;\n}\nexport default Hooks;","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport { arrayEach } from \"./array.mjs\";\nimport { isMacOS, isFirefox } from \"./browser.mjs\";\nexport var KEY_CODES = {\n ALT: 18,\n ARROW_DOWN: 40,\n ARROW_LEFT: 37,\n ARROW_RIGHT: 39,\n ARROW_UP: 38,\n AUDIO_DOWN: isFirefox() ? 182 : 174,\n AUDIO_MUTE: isFirefox() ? 181 : 173,\n AUDIO_UP: isFirefox() ? 183 : 175,\n BACKSPACE: 8,\n CAPS_LOCK: 20,\n COMMA: 188,\n COMMAND_LEFT: 91,\n COMMAND_RIGHT: 93,\n COMMAND_FIREFOX: 224,\n CONTROL: 17,\n DELETE: 46,\n END: 35,\n ENTER: 13,\n ESCAPE: 27,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123,\n F13: 124,\n F14: 125,\n F15: 126,\n F16: 127,\n F17: 128,\n F18: 129,\n F19: 130,\n HOME: 36,\n INSERT: 45,\n MEDIA_NEXT: 176,\n MEDIA_PLAY_PAUSE: 179,\n MEDIA_PREV: 177,\n MEDIA_STOP: 178,\n NULL: 0,\n NUM_LOCK: 144,\n PAGE_DOWN: 34,\n PAGE_UP: 33,\n PAUSE: 19,\n PERIOD: 190,\n SCROLL_LOCK: 145,\n SHIFT: 16,\n SPACE: 32,\n TAB: 9,\n A: 65,\n C: 67,\n D: 68,\n F: 70,\n L: 76,\n O: 79,\n P: 80,\n S: 83,\n V: 86,\n X: 88,\n Y: 89,\n Z: 90\n};\nvar FUNCTION_KEYS = [KEY_CODES.ALT, KEY_CODES.ARROW_DOWN, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_UP, KEY_CODES.AUDIO_DOWN, KEY_CODES.AUDIO_MUTE, KEY_CODES.AUDIO_UP, KEY_CODES.BACKSPACE, KEY_CODES.CAPS_LOCK, KEY_CODES.DELETE, KEY_CODES.END, KEY_CODES.ENTER, KEY_CODES.ESCAPE, KEY_CODES.F1, KEY_CODES.F2, KEY_CODES.F3, KEY_CODES.F4, KEY_CODES.F5, KEY_CODES.F6, KEY_CODES.F7, KEY_CODES.F8, KEY_CODES.F9, KEY_CODES.F10, KEY_CODES.F11, KEY_CODES.F12, KEY_CODES.F13, KEY_CODES.F14, KEY_CODES.F15, KEY_CODES.F16, KEY_CODES.F17, KEY_CODES.F18, KEY_CODES.F19, KEY_CODES.HOME, KEY_CODES.INSERT, KEY_CODES.MEDIA_NEXT, KEY_CODES.MEDIA_PLAY_PAUSE, KEY_CODES.MEDIA_PREV, KEY_CODES.MEDIA_STOP, KEY_CODES.NULL, KEY_CODES.NUM_LOCK, KEY_CODES.PAGE_DOWN, KEY_CODES.PAGE_UP, KEY_CODES.PAUSE, KEY_CODES.SCROLL_LOCK, KEY_CODES.SHIFT, KEY_CODES.TAB];\n\n/**\n * Returns true if keyCode represents a printable character.\n *\n * @param {number} keyCode The keyboard key code.\n * @returns {boolean}\n */\nexport function isPrintableChar(keyCode) {\n return keyCode === 32 ||\n // space\n keyCode >= 48 && keyCode <= 57 ||\n // 0-9\n keyCode >= 96 && keyCode <= 111 ||\n // numpad\n keyCode >= 186 && keyCode <= 192 ||\n // ;=,-./`\n keyCode >= 219 && keyCode <= 222 ||\n // []{}\\|\"'\n keyCode >= 226 ||\n // special chars (229 for Asian chars)\n keyCode >= 65 && keyCode <= 90; // a-z\n}\n\n/**\n * @param {number} keyCode The keyboard key code.\n * @returns {boolean}\n */\nexport function isFunctionKey(keyCode) {\n return FUNCTION_KEYS.includes(keyCode);\n}\n\n/**\n * Checks if passed key code is ctrl or cmd key. Depends on what OS the code runs it check key code based on\n * different meta key codes.\n *\n * @param {number} keyCode The keyboard key code.\n * @returns {boolean}\n */\nexport function isCtrlKey(keyCode) {\n var keys = [];\n if (isMacOS()) {\n keys.push(KEY_CODES.COMMAND_LEFT, KEY_CODES.COMMAND_RIGHT, KEY_CODES.COMMAND_FIREFOX);\n } else {\n keys.push(KEY_CODES.CONTROL);\n }\n return keys.includes(keyCode);\n}\n\n/**\n * Checks if passed key code is ctrl or cmd key. This helper checks if the key code matches to meta keys\n * regardless of the OS on which it is running.\n *\n * @param {number} keyCode The keyboard key code.\n * @returns {boolean}\n */\nexport function isCtrlMetaKey(keyCode) {\n return [KEY_CODES.CONTROL, KEY_CODES.COMMAND_LEFT, KEY_CODES.COMMAND_RIGHT, KEY_CODES.COMMAND_FIREFOX].includes(keyCode);\n}\n\n/**\n * @param {number} keyCode The keyboard key code.\n * @param {string} baseCode The list of the key codes to compare with.\n * @returns {boolean}\n */\nexport function isKey(keyCode, baseCode) {\n var keys = baseCode.split('|');\n var result = false;\n arrayEach(keys, function (key) {\n if (keyCode === KEY_CODES[key]) {\n result = true;\n return false;\n }\n });\n return result;\n}","/**\n * Prevent other listeners of the same event from being called.\n *\n * @param {Event} event The mouse event object.\n */\nexport function stopImmediatePropagation(event) {\n event.isImmediatePropagationEnabled = false;\n event.cancelBubble = true;\n}\n\n/**\n * Check if event was stopped by `stopImmediatePropagation`.\n *\n * @param {Event} event The mouse event object.\n * @returns {boolean}\n */\nexport function isImmediatePropagationStopped(event) {\n return event.isImmediatePropagationEnabled === false;\n}\n\n/**\n * Check if provided event was triggered by clicking the right mouse button.\n *\n * @param {Event} event The mouse event object.\n * @returns {boolean}\n */\nexport function isRightClick(event) {\n return event.button === 2;\n}\n\n/**\n * Check if provided event was triggered by clicking the left mouse button.\n *\n * @param {Event} event The mouse event object.\n * @returns {boolean}\n */\nexport function isLeftClick(event) {\n return event.button === 0;\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nexport var collection = new Map();\n\n/**\n * @param {string} namespace The namespace for the storage.\n * @returns {object}\n */\nexport default function staticRegister() {\n var namespace = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'common';\n if (!collection.has(namespace)) {\n collection.set(namespace, new Map());\n }\n var subCollection = collection.get(namespace);\n\n /**\n * Register an item to the collection. If the item under the same was exist earlier then this item will be replaced with new one.\n *\n * @param {string} name Identification of the item.\n * @param {*} item Item to save in the collection.\n */\n function register(name, item) {\n subCollection.set(name, item);\n }\n\n /**\n * Retrieve the item from the collection.\n *\n * @param {string} name Identification of the item.\n * @returns {*} Returns item which was saved in the collection.\n */\n function getItem(name) {\n return subCollection.get(name);\n }\n\n /**\n * Check if item under specified name is exists.\n *\n * @param {string} name Identification of the item.\n * @returns {boolean} Returns `true` or `false` depends on if element exists in the collection.\n */\n function hasItem(name) {\n return subCollection.has(name);\n }\n\n /**\n * Retrieve list of names registered from the collection.\n *\n * @returns {Array} Returns an array of strings with all names under which objects are stored.\n */\n function getNames() {\n return _toConsumableArray(subCollection.keys());\n }\n\n /**\n * Retrieve all registered values from the collection.\n *\n * @returns {Array} Returns an array with all values stored in the collection.\n */\n function getValues() {\n return _toConsumableArray(subCollection.values());\n }\n return {\n register: register,\n getItem: getItem,\n hasItem: hasItem,\n getNames: getNames,\n getValues: getValues\n };\n}","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n/**\n * Utility to register editors and common namespace for keeping reference to all editor classes.\n */\nimport Hooks from \"../pluginHooks.mjs\";\nimport staticRegister from \"../utils/staticRegister.mjs\";\nvar registeredEditorClasses = new WeakMap();\nvar _staticRegister = staticRegister('editors'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem,\n hasItem = _staticRegister.hasItem,\n getNames = _staticRegister.getNames,\n getValues = _staticRegister.getValues;\n\n/**\n * @param {BaseEditor} editorClass The editor constructor.\n */\nexport function RegisteredEditor(editorClass) {\n var instances = {};\n var Clazz = editorClass;\n this.getConstructor = function () {\n return editorClass;\n };\n this.getInstance = function (hotInstance) {\n if (!(hotInstance.guid in instances)) {\n instances[hotInstance.guid] = new Clazz(hotInstance);\n }\n return instances[hotInstance.guid];\n };\n Hooks.getSingleton().add('afterDestroy', function () {\n instances[this.guid] = null;\n });\n}\n\n/**\n * Returns instance (singleton) of editor class.\n *\n * @param {string} name Name of an editor under which it has been stored.\n * @param {object} hotInstance Instance of Handsontable.\n * @returns {Function} Returns instance of editor.\n */\nexport function _getEditorInstance(name, hotInstance) {\n var editor;\n if (typeof name === 'function') {\n if (!registeredEditorClasses.get(name)) {\n _register(null, name);\n }\n editor = registeredEditorClasses.get(name);\n } else if (typeof name === 'string') {\n editor = getItem(name);\n } else {\n throw Error('Only strings and functions can be passed as \"editor\" parameter');\n }\n if (!editor) {\n throw Error(\"No editor registered under name \\\"\".concat(name, \"\\\"\"));\n }\n return editor.getInstance(hotInstance);\n}\n\n/**\n * Retrieve editor class.\n *\n * @param {string} name Editor identification.\n * @returns {Function} Returns editor class.\n */\nfunction _getItem(name) {\n if (typeof name === 'function') {\n return name;\n }\n if (!hasItem(name)) {\n throw Error(\"No registered editor found under \\\"\".concat(name, \"\\\" name\"));\n }\n return getItem(name).getConstructor();\n}\n\n/**\n * Register editor class under specified name.\n *\n * @param {string} name Editor identification.\n * @param {Function} editorClass Editor class.\n */\nfunction _register(name, editorClass) {\n if (name && typeof name !== 'string') {\n editorClass = name;\n name = editorClass.EDITOR_TYPE;\n }\n var editorWrapper = new RegisteredEditor(editorClass);\n if (typeof name === 'string') {\n register(name, editorWrapper);\n }\n registeredEditorClasses.set(editorClass, editorWrapper);\n}\nexport { _register as registerEditor, _getItem as getEditor, _getEditorInstance as getEditorInstance, hasItem as hasEditor, getNames as getRegisteredEditorNames, getValues as getRegisteredEditors };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isPassiveEventSupported } from \"./helpers/feature.mjs\";\nimport { stopImmediatePropagation as _stopImmediatePropagation } from \"./helpers/dom/event.mjs\";\n/**\n * Counter which tracks unregistered listeners (useful for detecting memory leaks).\n *\n * @type {number}\n */\nvar listenersCounter = 0;\n\n/**\n * Event DOM manager for internal use in Handsontable.\n *\n * @class EventManager\n * @util\n */\nvar EventManager = /*#__PURE__*/function () {\n /**\n * @param {object} [context=null] An object to which event listeners will be stored.\n * @private\n */\n function EventManager() {\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n _classCallCheck(this, EventManager);\n this.context = context || this;\n\n // TODO it modify external object. Rethink that.\n if (!this.context.eventListeners) {\n this.context.eventListeners = []; // TODO perf It would be more performant if every instance of EventManager tracked its own listeners only\n }\n }\n\n /**\n * Register specified listener (`eventName`) to the element.\n *\n * @param {Element} element Target element.\n * @param {string} eventName Event name.\n * @param {Function} callback Function which will be called after event occur.\n * @param {AddEventListenerOptions|boolean} [options] Listener options if object or useCapture if boolean.\n * @returns {Function} Returns function which you can easily call to remove that event.\n */\n _createClass(EventManager, [{\n key: \"addEventListener\",\n value: function addEventListener(element, eventName, callback) {\n var _this = this;\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n /**\n * @param {Event} event The event object.\n */\n function callbackProxy(event) {\n callback.call(this, extendEvent(event));\n }\n if (typeof options !== 'boolean' && !isPassiveEventSupported()) {\n options = false;\n }\n this.context.eventListeners.push({\n element: element,\n event: eventName,\n callback: callback,\n callbackProxy: callbackProxy,\n options: options,\n eventManager: this\n });\n element.addEventListener(eventName, callbackProxy, options);\n listenersCounter += 1;\n return function () {\n _this.removeEventListener(element, eventName, callback);\n };\n }\n\n /**\n * Remove the event listener previously registered.\n *\n * @param {Element} element Target element.\n * @param {string} eventName Event name.\n * @param {Function} callback Function to remove from the event target. It must be the same as during registration listener.\n * @param {boolean} [onlyOwnEvents] Whether whould remove only events registered using this instance of EventManager.\n */\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(element, eventName, callback) {\n var onlyOwnEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var len = this.context.eventListeners.length;\n var tmpEvent;\n while (len) {\n len -= 1;\n tmpEvent = this.context.eventListeners[len];\n if (tmpEvent.event === eventName && tmpEvent.element === element) {\n if (callback && callback !== tmpEvent.callback) {\n /* eslint-disable no-continue */\n continue;\n }\n // TODO rethink that, main bulk is that it needs multi instances to handle same context, but with a different scopes.\n // TODO I suppose much more efficient way will be comparing string with scope id, or any similar approach.\n if (onlyOwnEvents && tmpEvent.eventManager !== this) {\n continue;\n }\n this.context.eventListeners.splice(len, 1);\n tmpEvent.element.removeEventListener(tmpEvent.event, tmpEvent.callbackProxy, tmpEvent.options);\n listenersCounter -= 1;\n }\n }\n }\n\n /**\n * Clear all previously registered events.\n *\n * @private\n * @since 0.15.0-beta3\n * @param {boolean} [onlyOwnEvents] Whether whould remove only events registered using this instance of EventManager.\n */\n }, {\n key: \"clearEvents\",\n value: function clearEvents() {\n var onlyOwnEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!this.context) {\n return;\n }\n var len = this.context.eventListeners.length;\n while (len) {\n len -= 1;\n var event = this.context.eventListeners[len];\n if (onlyOwnEvents && event.eventManager !== this) {\n continue;\n }\n this.context.eventListeners.splice(len, 1);\n event.element.removeEventListener(event.event, event.callbackProxy, event.options);\n listenersCounter -= 1;\n }\n }\n\n /**\n * Clear all previously registered events.\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.clearEvents();\n }\n\n /**\n * Destroy instance of EventManager, clearing all events of the context.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.clearEvents();\n this.context = null;\n }\n\n /**\n * Destroy instance of EventManager, clearing only the own events.\n */\n }, {\n key: \"destroyWithOwnEventsOnly\",\n value: function destroyWithOwnEventsOnly() {\n this.clearEvents(true);\n this.context = null;\n }\n\n /**\n * Trigger event at the specified target element.\n *\n * @param {Element} element Target element.\n * @param {string} eventName Event name.\n */\n }, {\n key: \"fireEvent\",\n value: function fireEvent(element, eventName) {\n var rootDocument = element.document;\n var rootWindow = element;\n if (!rootDocument) {\n rootDocument = element.ownerDocument ? element.ownerDocument : element;\n rootWindow = rootDocument.defaultView;\n }\n var options = {\n bubbles: true,\n cancelable: eventName !== 'mousemove',\n view: rootWindow,\n detail: 0,\n screenX: 0,\n screenY: 0,\n clientX: 1,\n clientY: 1,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: undefined\n };\n var event;\n if (rootDocument.createEvent) {\n event = rootDocument.createEvent('MouseEvents');\n event.initMouseEvent(eventName, options.bubbles, options.cancelable, options.view, options.detail, options.screenX, options.screenY, options.clientX, options.clientY, options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, options.relatedTarget || rootDocument.body.parentNode);\n } else {\n event = rootDocument.createEventObject();\n }\n if (element.dispatchEvent) {\n element.dispatchEvent(event);\n } else {\n element.fireEvent(\"on\".concat(eventName), event);\n }\n }\n }]);\n return EventManager;\n}();\n/**\n * @private\n * @param {Event} event The event object.\n * @returns {Event}\n */\nfunction extendEvent(event) {\n var nativeStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function () {\n nativeStopImmediatePropagation.apply(this);\n _stopImmediatePropagation(this);\n };\n return event;\n}\nexport default EventManager;\n\n/**\n * @returns {number}\n */\nexport function getListenersCounter() {\n return listenersCounter;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isFunctionKey, isCtrlMetaKey } from \"./helpers/unicode.mjs\";\nimport { stopImmediatePropagation } from \"./helpers/dom/event.mjs\";\nimport { isOutsideInput } from \"./helpers/dom/element.mjs\";\nimport { getEditorInstance } from \"./editors/registry.mjs\";\nimport EventManager from \"./eventManager.mjs\";\nimport { isDefined } from \"./helpers/mixed.mjs\";\nexport var SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';\nexport var SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';\nvar EditorManager = /*#__PURE__*/function () {\n /**\n * @param {Core} instance The Handsontable instance.\n * @param {TableMeta} tableMeta The table meta instance.\n * @param {Selection} selection The selection instance.\n */\n function EditorManager(instance, tableMeta, selection) {\n var _this = this;\n _classCallCheck(this, EditorManager);\n /**\n * Instance of {@link Handsontable}.\n *\n * @private\n * @type {Handsontable}\n */\n this.instance = instance;\n /**\n * Reference to an instance's private GridSettings object.\n *\n * @private\n * @type {GridSettings}\n */\n this.tableMeta = tableMeta;\n /**\n * Instance of {@link Selection}.\n *\n * @private\n * @type {Selection}\n */\n this.selection = selection;\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n this.eventManager = new EventManager(instance);\n /**\n * Determines if EditorManager is destroyed.\n *\n * @private\n * @type {boolean}\n */\n this.destroyed = false;\n /**\n * Determines if EditorManager is locked.\n *\n * @private\n * @type {boolean}\n */\n this.lock = false;\n /**\n * A reference to an instance of the activeEditor.\n *\n * @private\n * @type {BaseEditor}\n */\n this.activeEditor = void 0;\n /**\n * Keeps a reference to the cell's properties object.\n *\n * @type {object}\n */\n this.cellProperties = void 0;\n var shortcutManager = this.instance.getShortcutManager();\n shortcutManager.addContext('editor');\n this.registerShortcuts();\n this.instance.addHook('afterDocumentKeyDown', function (event) {\n return _this.onAfterDocumentKeyDown(event);\n });\n\n // Open editor when text composition is started (IME editor)\n this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'compositionstart', function (event) {\n if (!_this.destroyed && _this.instance.isListening()) {\n _this.openEditor('', event);\n }\n });\n this.instance.view._wt.update('onCellDblClick', function (event, coords, elem) {\n return _this.onCellDblClick(event, coords, elem);\n });\n }\n\n /**\n * Register shortcuts responsible for handling some actions related to an editor.\n *\n * @private\n */\n _createClass(EditorManager, [{\n key: \"registerShortcuts\",\n value: function registerShortcuts() {\n var _this2 = this;\n var shortcutManager = this.instance.getShortcutManager();\n var gridContext = shortcutManager.getContext('grid');\n var editorContext = shortcutManager.getContext('editor');\n var config = {\n group: SHORTCUTS_GROUP_EDITOR\n };\n editorContext.addShortcuts([{\n keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],\n callback: function callback(event, keys) {\n _this2.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());\n _this2.moveSelectionAfterEnter(keys.includes('shift'));\n }\n }, {\n keys: [['Escape'], ['Escape', 'Control/Meta']],\n callback: function callback() {\n _this2.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());\n _this2.activeEditor.focus();\n }\n }], config);\n gridContext.addShortcuts([{\n keys: [['F2']],\n callback: function callback(event) {\n _this2.openEditor(null, event, true);\n }\n }, {\n keys: [['Backspace'], ['Delete']],\n callback: function callback() {\n _this2.instance.emptySelectedCells();\n _this2.prepareEditor();\n }\n }, {\n keys: [['Enter'], ['Enter', 'Shift']],\n callback: function callback(event, keys) {\n if (_this2.instance.getSettings().enterBeginsEditing) {\n if (_this2.cellProperties.readOnly) {\n _this2.moveSelectionAfterEnter();\n } else {\n _this2.openEditor(null, event, true);\n }\n } else {\n _this2.moveSelectionAfterEnter(keys.includes('shift'));\n }\n stopImmediatePropagation(event); // required by HandsontableEditor\n }\n }], config);\n }\n\n /**\n * Lock the editor from being prepared and closed. Locking the editor prevents its closing and\n * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.\n */\n }, {\n key: \"lockEditor\",\n value: function lockEditor() {\n this.lock = true;\n }\n\n /**\n * Unlock the editor from being prepared and closed. This method restores the original behavior of\n * the editors where for every new selection its instances are closed.\n */\n }, {\n key: \"unlockEditor\",\n value: function unlockEditor() {\n this.lock = false;\n }\n\n /**\n * Destroy current editor, if exists.\n *\n * @param {boolean} revertOriginal If `false` and the cell using allowInvalid option,\n * then an editor won't be closed until validation is passed.\n */\n }, {\n key: \"destroyEditor\",\n value: function destroyEditor(revertOriginal) {\n if (!this.lock) {\n this.closeEditor(revertOriginal);\n }\n }\n\n /**\n * Get active editor.\n *\n * @returns {BaseEditor}\n */\n }, {\n key: \"getActiveEditor\",\n value: function getActiveEditor() {\n return this.activeEditor;\n }\n\n /**\n * Prepare text input to be displayed at given grid cell.\n */\n }, {\n key: \"prepareEditor\",\n value: function prepareEditor() {\n var _this3 = this;\n if (this.lock) {\n return;\n }\n if (this.activeEditor && this.activeEditor.isWaiting()) {\n this.closeEditor(false, false, function (dataSaved) {\n if (dataSaved) {\n _this3.prepareEditor();\n }\n });\n return;\n }\n var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,\n row = _this$instance$getSel.row,\n col = _this$instance$getSel.col;\n var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);\n var visualRowToCheck = row;\n var visualColumnToCheck = col;\n if (Array.isArray(modifiedCellCoords)) {\n var _modifiedCellCoords = _slicedToArray(modifiedCellCoords, 2);\n visualRowToCheck = _modifiedCellCoords[0];\n visualColumnToCheck = _modifiedCellCoords[1];\n }\n\n // Getting values using the modified coordinates.\n this.cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);\n var activeElement = this.instance.rootDocument.activeElement;\n\n // Blurring the `activeElement` removes the unwanted border around the focusable element (#6877)\n // and resets the `document.activeElement` property. The blurring should happen only when the\n // previously selected input element has not belonged to the Handsontable editor. If blurring is\n // triggered for all elements, there is a problem with the disappearing IME editor (#9672).\n if (activeElement && isOutsideInput(activeElement)) {\n activeElement.blur();\n }\n if (!this.isCellEditable()) {\n this.clearActiveEditor();\n return;\n }\n var td = this.instance.getCell(row, col, true);\n\n // Skip the preparation when the cell is not rendered in the DOM. The cell is scrolled out of\n // the table's viewport.\n if (td) {\n var editorClass = this.instance.getCellEditor(this.cellProperties);\n var prop = this.instance.colToProp(visualColumnToCheck);\n var originalValue = this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(visualRowToCheck), visualColumnToCheck);\n this.activeEditor = getEditorInstance(editorClass, this.instance);\n // Using not modified coordinates, as we need to get the table element using selection coordinates.\n // There is an extra translation in the editor for saving value.\n this.activeEditor.prepare(row, col, prop, td, originalValue, this.cellProperties);\n }\n }\n\n /**\n * Check is editor is opened/showed.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isEditorOpened\",\n value: function isEditorOpened() {\n return this.activeEditor && this.activeEditor.isOpened();\n }\n\n /**\n * Open editor with initial value.\n *\n * @param {null|string} newInitialValue New value from which editor will start if handled property it's not the `null`.\n * @param {Event} event The event object.\n * @param {boolean} [enableFullEditMode=false] When true, an editor works in full editing mode. Mode disallows closing an editor\n * when arrow keys are pressed.\n */\n }, {\n key: \"openEditor\",\n value: function openEditor(newInitialValue, event) {\n var enableFullEditMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n if (!this.isCellEditable()) {\n this.clearActiveEditor();\n return;\n }\n if (!this.activeEditor) {\n var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,\n row = _this$instance$getSel2.row,\n col = _this$instance$getSel2.col;\n var renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);\n var renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);\n this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));\n this.instance.view.render();\n this.prepareEditor();\n }\n if (this.activeEditor) {\n if (enableFullEditMode) {\n this.activeEditor.enableFullEditMode();\n }\n this.activeEditor.beginEditing(newInitialValue, event);\n }\n }\n\n /**\n * Close editor, finish editing cell.\n *\n * @param {boolean} restoreOriginalValue If `true`, then closes editor without saving value from the editor into a cell.\n * @param {boolean} isCtrlPressed If `true`, then editor will save value to each cell in the last selected range.\n * @param {Function} callback The callback function, fired after editor closing.\n */\n }, {\n key: \"closeEditor\",\n value: function closeEditor(restoreOriginalValue, isCtrlPressed, callback) {\n if (this.activeEditor) {\n this.activeEditor.finishEditing(restoreOriginalValue, isCtrlPressed, callback);\n } else if (callback) {\n callback(false);\n }\n }\n\n /**\n * Close editor and save changes.\n *\n * @param {boolean} isCtrlPressed If `true`, then editor will save value to each cell in the last selected range.\n */\n }, {\n key: \"closeEditorAndSaveChanges\",\n value: function closeEditorAndSaveChanges(isCtrlPressed) {\n this.closeEditor(false, isCtrlPressed);\n }\n\n /**\n * Close editor and restore original value.\n *\n * @param {boolean} isCtrlPressed Indication of whether the CTRL button is pressed.\n */\n }, {\n key: \"closeEditorAndRestoreOriginalValue\",\n value: function closeEditorAndRestoreOriginalValue(isCtrlPressed) {\n this.closeEditor(true, isCtrlPressed);\n }\n\n /**\n * Clears reference to an instance of the active editor.\n *\n * @private\n */\n }, {\n key: \"clearActiveEditor\",\n value: function clearActiveEditor() {\n this.activeEditor = void 0;\n }\n\n /**\n * Checks if the currently selected cell (pointed by selection highlight coords) is editable.\n * Editable cell is when:\n * - the cell has defined an editor type;\n * - the cell is not marked as read-only;\n * - the cell is not hidden.\n *\n * @private\n * @returns {boolean}\n */\n }, {\n key: \"isCellEditable\",\n value: function isCellEditable() {\n var editorClass = this.instance.getCellEditor(this.cellProperties);\n var _this$instance$getSel3 = this.instance.getSelectedRangeLast().highlight,\n row = _this$instance$getSel3.row,\n col = _this$instance$getSel3.col;\n var _this$instance = this.instance,\n rowIndexMapper = _this$instance.rowIndexMapper,\n columnIndexMapper = _this$instance.columnIndexMapper;\n var isCellHidden = rowIndexMapper.isHidden(this.instance.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.instance.toPhysicalColumn(col));\n if (this.cellProperties.readOnly || !editorClass || isCellHidden) {\n return false;\n }\n return true;\n }\n\n /**\n * Controls selection's behaviour after clicking `Enter`.\n *\n * @private\n * @param {boolean} isShiftPressed If `true`, then the selection will move up after hit enter.\n */\n }, {\n key: \"moveSelectionAfterEnter\",\n value: function moveSelectionAfterEnter(isShiftPressed) {\n var enterMoves = typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves;\n if (isShiftPressed) {\n // move selection up\n this.selection.transformStart(-enterMoves.row, -enterMoves.col);\n } else {\n // move selection down (add a new row if needed)\n this.selection.transformStart(enterMoves.row, enterMoves.col, true);\n }\n }\n\n /**\n * OnAfterDocumentKeyDown callback.\n *\n * @private\n * @param {KeyboardEvent} event The keyboard event object.\n */\n }, {\n key: \"onAfterDocumentKeyDown\",\n value: function onAfterDocumentKeyDown(event) {\n var _this4 = this;\n if (!this.instance.isListening()) {\n return;\n }\n var keyCode = event.keyCode;\n if (!this.selection.isSelected()) {\n return;\n }\n\n // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)\n var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;\n if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {\n if (!isFunctionKey(keyCode) && !isCtrlMetaKey(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {\n var shortcutManager = this.instance.getShortcutManager();\n var editorContext = shortcutManager.getContext('editor');\n var runOnlySelectedConfig = {\n runOnlyIf: function runOnlyIf() {\n return isDefined(_this4.instance.getSelected());\n },\n group: SHORTCUTS_GROUP_NAVIGATION\n };\n editorContext.addShortcuts([{\n keys: [['ArrowUp']],\n callback: function callback() {\n _this4.instance.selection.transformStart(-1, 0);\n }\n }, {\n keys: [['ArrowDown']],\n callback: function callback() {\n _this4.instance.selection.transformStart(1, 0);\n }\n }, {\n keys: [['ArrowLeft']],\n callback: function callback() {\n _this4.instance.selection.transformStart(0, -1 * _this4.instance.getDirectionFactor());\n }\n }, {\n keys: [['ArrowRight']],\n callback: function callback() {\n _this4.instance.selection.transformStart(0, _this4.instance.getDirectionFactor());\n }\n }], runOnlySelectedConfig);\n this.openEditor('', event);\n }\n }\n }\n\n /**\n * OnCellDblClick callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n * @param {object} coords The cell coordinates.\n * @param {HTMLTableCellElement|HTMLTableHeaderCellElement} elem The element which triggers the action.\n */\n }, {\n key: \"onCellDblClick\",\n value: function onCellDblClick(event, coords, elem) {\n // may be TD or TH\n if (elem.nodeName === 'TD') {\n this.openEditor(null, event, true);\n }\n }\n\n /**\n * Destroy the instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.destroyed = true;\n this.eventManager.destroy();\n }\n }]);\n return EditorManager;\n}();\nvar instances = new WeakMap();\n\n/**\n * @param {Core} hotInstance The Handsontable instance.\n * @param {TableMeta} tableMeta The table meta class instance.\n * @param {Selection} selection The selection instance.\n * @returns {EditorManager}\n */\nEditorManager.getInstance = function (hotInstance, tableMeta, selection) {\n var editorManager = instances.get(hotInstance);\n if (!editorManager) {\n editorManager = new EditorManager(hotInstance, tableMeta, selection);\n instances.set(hotInstance, editorManager);\n }\n return editorManager;\n};\nexport default EditorManager;","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.string.repeat.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.array.last-index-of.js\";\nimport \"core-js/modules/es.array.reduce.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find-index.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport { isEmpty } from \"./../helpers/mixed.mjs\";\nvar ESCAPED_HTML_CHARS = {\n ' ': '\\x20',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nvar regEscapedChars = new RegExp(Object.keys(ESCAPED_HTML_CHARS).map(function (key) {\n return \"(\".concat(key, \")\");\n}).join('|'), 'gi');\n\n/**\n * Verifies if node is an HTMLTable element.\n *\n * @param {Node} element Node to verify if it's an HTMLTable.\n * @returns {boolean}\n */\nfunction isHTMLTable(element) {\n return (element && element.nodeName || '') === 'TABLE';\n}\n\n/**\n * Converts Handsontable into HTMLTableElement.\n *\n * @param {Core} instance The Handsontable instance.\n * @returns {string} OuterHTML of the HTMLTableElement.\n */\nexport function instanceToHTML(instance) {\n var hasColumnHeaders = instance.hasColHeaders();\n var hasRowHeaders = instance.hasRowHeaders();\n var coords = [hasColumnHeaders ? -1 : 0, hasRowHeaders ? -1 : 0, instance.countRows() - 1, instance.countCols() - 1];\n var data = instance.getData.apply(instance, coords);\n var countRows = data.length;\n var countCols = countRows > 0 ? data[0].length : 0;\n var TABLE = ['
', '
'];\n var THEAD = hasColumnHeaders ? ['', ''] : [];\n var TBODY = ['', ''];\n var rowModifier = hasRowHeaders ? 1 : 0;\n var columnModifier = hasColumnHeaders ? 1 : 0;\n for (var row = 0; row < countRows; row += 1) {\n var isColumnHeadersRow = hasColumnHeaders && row === 0;\n var CELLS = [];\n for (var column = 0; column < countCols; column += 1) {\n var isRowHeadersColumn = !isColumnHeadersRow && hasRowHeaders && column === 0;\n var cell = '';\n if (isColumnHeadersRow) {\n cell = \"
');\n return result.join('');\n}\n\n/**\n * Converts HTMLTable or string into Handsontable configuration object.\n *\n * @param {Element|string} element Node element which should contain `
...
`.\n * @param {Document} [rootDocument] The document window owner.\n * @returns {object} Return configuration object. Contains keys as DefaultSettings.\n */\n// eslint-disable-next-line no-restricted-globals\nexport function htmlToGridSettings(element) {\n var rootDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n var settingsObj = {};\n var fragment = rootDocument.createDocumentFragment();\n var tempElem = rootDocument.createElement('div');\n fragment.appendChild(tempElem);\n var checkElement = element;\n if (typeof checkElement === 'string') {\n var escapedAdjacentHTML = checkElement.replace(/
]*?>([\\s\\S]*?)<\\/\\s*td>/g, function (cellFragment) {\n var openingTag = cellFragment.match(/
]*?>/g)[0];\n var cellValue = cellFragment.substring(openingTag.length, cellFragment.lastIndexOf('<')).replace(/(<(?!br)([^>]+)>)/gi, '');\n var closingTag = '
';\n return \"\".concat(openingTag).concat(cellValue).concat(closingTag);\n });\n tempElem.insertAdjacentHTML('afterbegin', \"\".concat(escapedAdjacentHTML));\n checkElement = tempElem.querySelector('table');\n }\n if (!checkElement || !isHTMLTable(checkElement)) {\n return;\n }\n var generator = tempElem.querySelector('meta[name$=\"enerator\"]');\n var hasRowHeaders = checkElement.querySelector('tbody th') !== null;\n var trElement = checkElement.querySelector('tr');\n var countCols = !trElement ? 0 : Array.from(trElement.cells).reduce(function (cols, cell) {\n return cols + cell.colSpan;\n }, 0) - (hasRowHeaders ? 1 : 0);\n var fixedRowsBottom = checkElement.tFoot && Array.from(checkElement.tFoot.rows) || [];\n var fixedRowsTop = [];\n var hasColHeaders = false;\n var thRowsLen = 0;\n var countRows = 0;\n if (checkElement.tHead) {\n var thRows = Array.from(checkElement.tHead.rows).filter(function (tr) {\n var isDataRow = tr.querySelector('td') !== null;\n if (isDataRow) {\n fixedRowsTop.push(tr);\n }\n return !isDataRow;\n });\n thRowsLen = thRows.length;\n hasColHeaders = thRowsLen > 0;\n if (thRowsLen > 1) {\n settingsObj.nestedHeaders = Array.from(thRows).reduce(function (rows, row) {\n var headersRow = Array.from(row.cells).reduce(function (headers, header, currentIndex) {\n if (hasRowHeaders && currentIndex === 0) {\n return headers;\n }\n var colspan = header.colSpan,\n innerHTML = header.innerHTML;\n var nextHeader = colspan > 1 ? {\n label: innerHTML,\n colspan: colspan\n } : innerHTML;\n headers.push(nextHeader);\n return headers;\n }, []);\n rows.push(headersRow);\n return rows;\n }, []);\n } else if (hasColHeaders) {\n settingsObj.colHeaders = Array.from(thRows[0].children).reduce(function (headers, header, index) {\n if (hasRowHeaders && index === 0) {\n return headers;\n }\n headers.push(header.innerHTML);\n return headers;\n }, []);\n }\n }\n if (fixedRowsTop.length) {\n settingsObj.fixedRowsTop = fixedRowsTop.length;\n }\n if (fixedRowsBottom.length) {\n settingsObj.fixedRowsBottom = fixedRowsBottom.length;\n }\n var dataRows = [].concat(fixedRowsTop, _toConsumableArray(Array.from(checkElement.tBodies).reduce(function (sections, section) {\n sections.push.apply(sections, _toConsumableArray(Array.from(section.rows)));\n return sections;\n }, [])), _toConsumableArray(fixedRowsBottom));\n countRows = dataRows.length;\n var dataArr = new Array(countRows);\n for (var r = 0; r < countRows; r++) {\n dataArr[r] = new Array(countCols);\n }\n var mergeCells = [];\n var rowHeaders = [];\n for (var row = 0; row < countRows; row++) {\n var tr = dataRows[row];\n var cells = Array.from(tr.cells);\n var cellsLen = cells.length;\n for (var cellId = 0; cellId < cellsLen; cellId++) {\n var cell = cells[cellId];\n var nodeName = cell.nodeName,\n innerHTML = cell.innerHTML,\n rowspan = cell.rowSpan,\n colspan = cell.colSpan;\n var col = dataArr[row].findIndex(function (value) {\n return value === void 0;\n });\n if (nodeName === 'TD') {\n if (rowspan > 1 || colspan > 1) {\n for (var rstart = row; rstart < row + rowspan; rstart++) {\n if (rstart < countRows) {\n for (var cstart = col; cstart < col + colspan; cstart++) {\n dataArr[rstart][cstart] = null;\n }\n }\n }\n var styleAttr = cell.getAttribute('style');\n var ignoreMerge = styleAttr && styleAttr.includes('mso-ignore:colspan');\n if (!ignoreMerge) {\n mergeCells.push({\n col: col,\n row: row,\n rowspan: rowspan,\n colspan: colspan\n });\n }\n }\n var cellValue = '';\n if (generator && /excel/gi.test(generator.content)) {\n cellValue = innerHTML.replace(/[\\r\\n][\\x20]{0,2}/g, '\\x20').replace(/ [\\r\\n]?[\\x20]{0,3}/gim, '\\r\\n');\n } else {\n cellValue = innerHTML.replace(/ [\\r\\n]?/gim, '\\r\\n');\n }\n dataArr[row][col] = cellValue.replace(regEscapedChars, function (match) {\n return ESCAPED_HTML_CHARS[match];\n });\n } else {\n rowHeaders.push(innerHTML);\n }\n }\n }\n if (mergeCells.length) {\n settingsObj.mergeCells = mergeCells;\n }\n if (rowHeaders.length) {\n settingsObj.rowHeaders = rowHeaders;\n }\n if (dataArr.length) {\n settingsObj.data = dataArr;\n }\n return settingsObj;\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.trim.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * Checks if the passed value is numeric one. For example these values (passed as string or number)\n * are considered as numeric values:\n * - 0.001\n * - .001\n * - - 10000\n * - 10000\n * - 1e+26\n * - 22e-26\n * - .45e+26\n * - 0xabcdef (hex)\n * - 0x1 (hex)\n *\n * @param {*} value The value to check.\n * @param {string[]} additionalDelimiters An additional delimiters to be used while checking the numeric value.\n * @returns {boolean}\n */\nexport function isNumeric(value) {\n var additionalDelimiters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var type = _typeof(value);\n if (type === 'number') {\n return !isNaN(value) && isFinite(value);\n } else if (type === 'string') {\n if (value.length === 0) {\n return false;\n } else if (value.length === 1) {\n return /\\d/.test(value);\n }\n var delimiter = Array.from(new Set(['.'].concat(_toConsumableArray(additionalDelimiters)))).map(function (d) {\n return \"\\\\\".concat(d);\n }).join('|');\n return new RegExp(\"^[+-]?\\\\s*(((\".concat(delimiter, \")?\\\\d+((\").concat(delimiter, \")\\\\d+)?(e[+-]?\\\\d+)?)|(0x[a-f\\\\d]+))$\"), 'i').test(value.trim());\n } else if (type === 'object') {\n return !!value && typeof value.valueOf() === 'number' && !(value instanceof Date);\n }\n return false;\n}\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\n/**\n * Checks if the passed value is numeric-like value. The helper returns `true` for the same\n * values as for the `isNumeric` function plus `true` for numbers delimited by comma.\n *\n * @param {*} value The value to check.\n * @returns {boolean}\n */\nexport function isNumericLike(value) {\n return isNumeric(value, [',']);\n}\n\n/**\n * A specialized version of `.forEach` defined by ranges.\n *\n * @param {number} rangeFrom The number from start iterate.\n * @param {number|Function} rangeTo The number where finish iterate or function as a iteratee.\n * @param {Function} [iteratee] The function invoked per iteration.\n */\nexport function rangeEach(rangeFrom, rangeTo, iteratee) {\n var index = -1;\n if (typeof rangeTo === 'function') {\n iteratee = rangeTo;\n rangeTo = rangeFrom;\n } else {\n index = rangeFrom - 1;\n }\n\n /* eslint-disable-next-line no-plusplus */\n while (++index <= rangeTo) {\n if (iteratee(index) === false) {\n break;\n }\n }\n}\n\n/**\n * A specialized version of `.forEach` defined by ranges iterable in reverse order.\n *\n * @param {number} rangeFrom The number from start iterate.\n * @param {number|Function} rangeTo The number where finish iterate or function as a iteratee.\n * @param {Function} [iteratee] The function invoked per iteration.\n */\nexport function rangeEachReverse(rangeFrom, rangeTo, iteratee) {\n var index = rangeFrom + 1;\n if (typeof rangeTo === 'function') {\n iteratee = rangeTo;\n rangeTo = 0;\n }\n /* eslint-disable-next-line no-plusplus */\n while (--index >= rangeTo) {\n if (iteratee(index) === false) {\n break;\n }\n }\n}\n\n/**\n * Calculate value from percent.\n *\n * @param {number} value Base value from percent will be calculated.\n * @param {string|number} percent Can be number or string (eq. `'33%'`).\n * @returns {number}\n */\nexport function valueAccordingPercent(value, percent) {\n percent = parseInt(percent.toString().replace('%', ''), 10);\n percent = isNaN(percent) ? 0 : percent;\n return parseInt(value * percent / 100, 10);\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { isNumeric } from \"../../helpers/number.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nexport var ASC = 'asc';\nexport var DESC = 'desc';\nvar ORDER_MAP = new Map([[ASC, [-1, 1]], [DESC, [1, -1]]]);\nvar DEFAULT_ERROR_PRIORITY_EXISTS = function DEFAULT_ERROR_PRIORITY_EXISTS(priority) {\n return \"The priority '\".concat(priority, \"' is already declared in a map.\");\n};\nvar DEFAULT_ERROR_PRIORITY_NAN = function DEFAULT_ERROR_PRIORITY_NAN(priority) {\n return \"The priority '\".concat(priority, \"' is not a number.\");\n};\n\n/**\n * @typedef {object} PriorityMap\n * @property {Function} addItem Adds items to the priority map.\n * @property {Function} getItems Gets items from the passed map in a ASC or DESC order of priorities.\n */\n/**\n * Creates a new priority map.\n *\n * @param {object} config The config for priority map.\n * @param {Function} config.errorPriorityExists The function to generate a custom error message if priority is already taken.\n * @param {Function} config.errorPriorityNaN The function to generate a custom error message if priority is not a number.\n * @returns {PriorityMap}\n */\nexport function createPriorityMap() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n errorPriorityExists = _ref.errorPriorityExists,\n errorPriorityNaN = _ref.errorPriorityNaN;\n var priorityMap = new Map();\n errorPriorityExists = isFunction(errorPriorityExists) ? errorPriorityExists : DEFAULT_ERROR_PRIORITY_EXISTS;\n errorPriorityNaN = isFunction(errorPriorityNaN) ? errorPriorityNaN : DEFAULT_ERROR_PRIORITY_NAN;\n\n /**\n * Adds items to priority map. Throws an error if `priority` is not a number or if is already added.\n *\n * @param {number} priority The priority for adding item.\n * @param {*} item The adding item.\n */\n function addItem(priority, item) {\n if (!isNumeric(priority)) {\n throw new Error(errorPriorityNaN(priority));\n }\n if (priorityMap.has(priority)) {\n throw new Error(errorPriorityExists(priority));\n }\n priorityMap.set(priority, item);\n }\n\n /**\n * Gets items from the passed map in a ASC or DESC order of priorities.\n *\n * @param {string} [order] The order for getting items. ASC is an default.\n * @returns {*}\n */\n function getItems() {\n var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ASC;\n var _ref2 = ORDER_MAP.get(order) || ORDER_MAP.get(ASC),\n _ref3 = _slicedToArray(_ref2, 2),\n left = _ref3[0],\n right = _ref3[1];\n return _toConsumableArray(priorityMap) // we want to be sure we sort over a priority key\n // if we are sure we can remove custom compare function\n // then we should replace next line with a default `.sort()`\n .sort(function (a, b) {\n return a[0] < b[0] ? left : right;\n }).map(function (item) {\n return item[1];\n });\n }\n return {\n addItem: addItem,\n getItems: getItems\n };\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nvar DEFAULT_ERROR_ID_EXISTS = function DEFAULT_ERROR_ID_EXISTS(id) {\n return \"The id '\".concat(id, \"' is already declared in a map.\");\n};\n\n/**\n * @typedef {object} UniqueMap\n * @property {Function} addItem Adds a new item to the unique map.\n * @property {Function} clear Clears the map.\n * @property {Function} getId Returns ID for the passed item.\n * @property {Function} getItem Gets item from the passed ID.\n * @property {Function} getItems Gets all items from the map.\n * @property {Function} hasItem Verifies if the passed ID exists in a map.\n * @property {Function} removeItem Removes item from the passed id if exists.\n */\n/**\n * Creates a new unique map.\n *\n * @param {object} config The config for priority queue.\n * @param {Function} config.errorIdExists The function to generate custom message if ID is already taken.\n * @returns {UniqueMap}\n */\nexport function createUniqueMap() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n errorIdExists = _ref.errorIdExists;\n var uniqueMap = new Map();\n errorIdExists = isFunction(errorIdExists) ? errorIdExists : DEFAULT_ERROR_ID_EXISTS;\n\n /**\n * Adds a new item to the unique map. Throws error if `id` is already added.\n *\n * @param {*} id The ID of the adding item.\n * @param {*} item The adding item.\n */\n function addItem(id, item) {\n if (hasItem(id)) {\n throw new Error(errorIdExists(id));\n }\n uniqueMap.set(id, item);\n }\n\n /**\n * Removes item from the passed id if exists.\n *\n * @param {*} id The ID to remove.\n * @returns {boolean}\n */\n function removeItem(id) {\n return uniqueMap.delete(id);\n }\n\n /**\n * Clears the map.\n */\n function clear() {\n uniqueMap.clear();\n }\n\n /**\n * Returns ID for the passed item.\n *\n * @param {*} item The item of the getting ID.\n * @returns {*}\n */\n function getId(item) {\n var _ref2 = getItems().find(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n id = _ref5[0],\n element = _ref5[1];\n if (item === element) {\n return id;\n }\n return false;\n }) || [null],\n _ref3 = _slicedToArray(_ref2, 1),\n itemId = _ref3[0];\n return itemId;\n }\n\n /**\n * Returns item from the passed ID.\n *\n * @param {*} id The ID of the getting item.\n * @returns {*}\n */\n function getItem(id) {\n return uniqueMap.get(id);\n }\n\n /**\n * Gets all items from the map.\n *\n * @returns {Array}\n */\n function getItems() {\n return _toConsumableArray(uniqueMap);\n }\n\n /**\n * Verifies if the passed ID exists in a map.\n *\n * @param {*} id The ID to check if registered.\n * @returns {boolean}\n */\n function hasItem(id) {\n return uniqueMap.has(id);\n }\n return {\n addItem: addItem,\n clear: clear,\n getId: getId,\n getItem: getItem,\n getItems: getItems,\n hasItem: hasItem,\n removeItem: removeItem\n };\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nvar DEFAULT_ERROR_ITEM_EXISTS = function DEFAULT_ERROR_ITEM_EXISTS(item) {\n return \"'\".concat(item, \"' value is already declared in a unique set.\");\n};\n\n/**\n * @typedef {object} UniqueSet\n * @property {Function} addItem Adds items to the priority set.\n * @property {Function} getItems Gets items from the set in order of addition.\n */\n/**\n * Creates a new unique set.\n *\n * @param {object} config The config for priority set.\n * @param {Function} config.errorItemExists The function to generate custom error message if item is already in the set.\n * @returns {UniqueSet}\n */\nexport function createUniqueSet() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n errorItemExists = _ref.errorItemExists;\n var uniqueSet = new Set();\n errorItemExists = isFunction(errorItemExists) ? errorItemExists : DEFAULT_ERROR_ITEM_EXISTS;\n\n /**\n * Adds items to the unique set. Throws an error if `item` is already added.\n *\n * @param {*} item The adding item.\n */\n function addItem(item) {\n if (uniqueSet.has(item)) {\n throw new Error(errorItemExists(item));\n }\n uniqueSet.add(item);\n }\n\n /**\n * Gets items from the set in order of addition.\n *\n * @returns {*}\n */\n function getItems() {\n return _toConsumableArray(uniqueSet);\n }\n\n /**\n * Clears the unique set.\n */\n function clear() {\n uniqueSet.clear();\n }\n return {\n addItem: addItem,\n clear: clear,\n getItems: getItems\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * Utility to register plugins and common namespace for keeping the reference to all plugins classes.\n */\nimport { toUpperCaseFirst } from \"../helpers/string.mjs\";\nimport { createPriorityMap } from \"../utils/dataStructures/priorityMap.mjs\";\nimport { createUniqueMap } from \"../utils/dataStructures/uniqueMap.mjs\";\nimport { createUniqueSet } from \"../utils/dataStructures/uniqueSet.mjs\";\nvar ERROR_PLUGIN_REGISTERED = function ERROR_PLUGIN_REGISTERED(pluginName) {\n return \"There is already registered \\\"\".concat(pluginName, \"\\\" plugin.\");\n};\nvar ERROR_PRIORITY_REGISTERED = function ERROR_PRIORITY_REGISTERED(priority) {\n return \"There is already registered plugin on priority \\\"\".concat(priority, \"\\\".\");\n};\nvar ERROR_PRIORITY_NAN = function ERROR_PRIORITY_NAN(priority) {\n return \"The priority \\\"\".concat(priority, \"\\\" is not a number.\");\n};\n\n/**\n * Stores plugins' names' queue with their priorities.\n */\nvar priorityPluginsQueue = createPriorityMap({\n errorPriorityExists: ERROR_PRIORITY_REGISTERED,\n errorPriorityNaN: ERROR_PRIORITY_NAN\n});\n/**\n * Stores plugins names' queue by registration order.\n */\nvar uniquePluginsQueue = createUniqueSet({\n errorItemExists: ERROR_PLUGIN_REGISTERED\n});\n/**\n * Stores plugins references between their name and class.\n */\nvar uniquePluginsList = createUniqueMap({\n errorIdExists: ERROR_PLUGIN_REGISTERED\n});\n\n/**\n * Gets registered plugins' names in the following order:\n * 1) Plugins registered with a defined priority attribute, in the ascending order of priority.\n * 2) Plugins registered without a defined priority attribute, in the registration order.\n *\n * @returns {string[]}\n */\nexport function getPluginsNames() {\n return [].concat(_toConsumableArray(priorityPluginsQueue.getItems()), _toConsumableArray(uniquePluginsQueue.getItems()));\n}\n\n/**\n * Gets registered plugin's class based on the given name.\n *\n * @param {string} pluginName Plugin's name.\n * @returns {BasePlugin}\n */\nexport function getPlugin(pluginName) {\n var unifiedPluginName = toUpperCaseFirst(pluginName);\n return uniquePluginsList.getItem(unifiedPluginName);\n}\n\n/**\n * Checks if the plugin under the name is already registered.\n *\n * @param {string} pluginName Plugin's name.\n * @returns {boolean}\n */\nexport function hasPlugin(pluginName) {\n /* eslint-disable no-unneeded-ternary */\n return getPlugin(pluginName) ? true : false;\n}\n\n/**\n * Registers plugin under the given name only once.\n *\n * @param {string|Function} pluginName The plugin name or plugin class.\n * @param {Function} [pluginClass] The plugin class.\n * @param {number} [priority] The plugin priority.\n */\nexport function registerPlugin(pluginName, pluginClass, priority) {\n var _unifyPluginArguments = unifyPluginArguments(pluginName, pluginClass, priority);\n var _unifyPluginArguments2 = _slicedToArray(_unifyPluginArguments, 3);\n pluginName = _unifyPluginArguments2[0];\n pluginClass = _unifyPluginArguments2[1];\n priority = _unifyPluginArguments2[2];\n if (getPlugin(pluginName) === void 0) {\n _registerPlugin(pluginName, pluginClass, priority);\n }\n}\n\n/**\n * Registers plugin under the given name.\n *\n * @param {string|Function} pluginName The plugin name or plugin class.\n * @param {Function} [pluginClass] The plugin class.\n * @param {number} [priority] The plugin priority.\n */\nfunction _registerPlugin(pluginName, pluginClass, priority) {\n var unifiedPluginName = toUpperCaseFirst(pluginName);\n if (uniquePluginsList.hasItem(unifiedPluginName)) {\n throw new Error(ERROR_PLUGIN_REGISTERED(unifiedPluginName));\n }\n if (priority === void 0) {\n uniquePluginsQueue.addItem(unifiedPluginName);\n } else {\n priorityPluginsQueue.addItem(priority, unifiedPluginName);\n }\n uniquePluginsList.addItem(unifiedPluginName, pluginClass);\n}\n\n/**\n * Unifies arguments to register the plugin.\n *\n * @param {string|Function} pluginName The plugin name or plugin class.\n * @param {Function} [pluginClass] The plugin class.\n * @param {number} [priority] The plugin priority.\n * @returns {Array}\n */\nfunction unifyPluginArguments(pluginName, pluginClass, priority) {\n if (typeof pluginName === 'function') {\n pluginClass = pluginName;\n pluginName = pluginClass.PLUGIN_KEY;\n priority = pluginClass.PLUGIN_PRIORITY;\n }\n return [pluginName, pluginClass, priority];\n}","import staticRegister from \"../utils/staticRegister.mjs\";\nvar _staticRegister = staticRegister('renderers'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem,\n hasItem = _staticRegister.hasItem,\n getNames = _staticRegister.getNames,\n getValues = _staticRegister.getValues;\n\n/**\n * Retrieve renderer function.\n *\n * @param {string} name Renderer identification.\n * @returns {Function} Returns renderer function.\n */\nfunction _getItem(name) {\n if (typeof name === 'function') {\n return name;\n }\n if (!hasItem(name)) {\n throw Error(\"No registered renderer found under \\\"\".concat(name, \"\\\" name\"));\n }\n return getItem(name);\n}\n\n/**\n * Register renderer under its alias.\n *\n * @param {string|Function} name Renderer's alias or renderer function with its descriptor.\n * @param {Function} [renderer] Renderer function.\n */\nfunction _register(name, renderer) {\n if (typeof name !== 'string') {\n renderer = name;\n name = renderer.RENDERER_TYPE;\n }\n register(name, renderer);\n}\nexport { _register as registerRenderer, _getItem as getRenderer, hasItem as hasRenderer, getNames as getRegisteredRendererNames, getValues as getRegisteredRenderers };","import staticRegister from \"../utils/staticRegister.mjs\";\nvar _staticRegister = staticRegister('validators'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem,\n hasItem = _staticRegister.hasItem,\n getNames = _staticRegister.getNames,\n getValues = _staticRegister.getValues;\n\n/**\n * Retrieve validator function.\n *\n * @param {string} name Validator identification.\n * @returns {Function} Returns validator function.\n */\nfunction _getItem(name) {\n if (typeof name === 'function') {\n return name;\n }\n if (!hasItem(name)) {\n throw Error(\"No registered validator found under \\\"\".concat(name, \"\\\" name\"));\n }\n return getItem(name);\n}\n\n/**\n * Register validator under its alias.\n *\n * @param {string|Function} name Validator's alias or validator function with its descriptor.\n * @param {Function} [validator] Validator function.\n */\nfunction _register(name, validator) {\n if (typeof name !== 'string') {\n validator = name;\n name = validator.VALIDATOR_TYPE;\n }\n register(name, validator);\n}\nexport { _register as registerValidator, _getItem as getValidator, hasItem as hasValidator, getNames as getRegisteredValidatorNames, getValues as getRegisteredValidators };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport { closestDown, hasClass, isChildOf, getParent } from \"../../../helpers/dom/element.mjs\";\nimport { partial } from \"../../../helpers/function.mjs\";\nimport { isTouchSupported } from \"../../../helpers/feature.mjs\";\nimport { isMobileBrowser, isChromeWebKit, isFirefoxWebKit, isIOS } from \"../../../helpers/browser.mjs\";\nimport { isDefined } from \"../../../helpers/mixed.mjs\";\nvar privatePool = new WeakMap();\n\n/**\n * @class Event\n */\nvar Event = /*#__PURE__*/function () {\n /**\n * @param {FacadeGetter} facadeGetter Gets an instance facade.\n * @param {DomBindings} domBindings Bindings into dom.\n * @param {Settings} wtSettings The walkontable settings.\n * @param {EventManager} eventManager The walkontable event manager.\n * @param {Table} wtTable The table.\n * @param {Selections} selections Selections.\n * @param {Event} [parent=null] The main Event instance.\n */\n function Event(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selections) {\n var parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n _classCallCheck(this, Event);\n this.wtSettings = wtSettings;\n this.domBindings = domBindings;\n this.wtTable = wtTable;\n this.selections = selections;\n this.parent = parent;\n\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n this.eventManager = eventManager;\n\n /**\n * Should be use only for passing face called external origin methods, like registered event listeners.\n * It provides backward compatibility by getting instance facade.\n *\n * @todo Consider about removing this from Event class, because it make relationship into facade (implicit circular dependency).\n * @todo Con. Maybe passing listener caller as an ioc from faced resolves this issue. To rethink later.\n *\n * @type {FacadeGetter}\n * @private\n */\n this.facadeGetter = facadeGetter;\n privatePool.set(this, {\n selectedCellBeforeTouchEnd: void 0,\n dblClickTimeout: [null, null],\n dblClickOrigin: [null, null]\n });\n this.registerEvents();\n }\n\n /**\n * Adds listeners for mouse and touch events.\n *\n * @private\n */\n _createClass(Event, [{\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this = this;\n this.eventManager.addEventListener(this.wtTable.holder, 'contextmenu', function (event) {\n return _this.onContextMenu(event);\n });\n this.eventManager.addEventListener(this.wtTable.TABLE, 'mouseover', function (event) {\n return _this.onMouseOver(event);\n });\n this.eventManager.addEventListener(this.wtTable.TABLE, 'mouseout', function (event) {\n return _this.onMouseOut(event);\n });\n var initTouchEvents = function initTouchEvents() {\n _this.eventManager.addEventListener(_this.wtTable.holder, 'touchstart', function (event) {\n return _this.onTouchStart(event);\n });\n _this.eventManager.addEventListener(_this.wtTable.holder, 'touchend', function (event) {\n return _this.onTouchEnd(event);\n });\n if (!_this.momentumScrolling) {\n _this.momentumScrolling = {};\n }\n _this.eventManager.addEventListener(_this.wtTable.holder, 'scroll', function () {\n clearTimeout(_this.momentumScrolling._timeout);\n if (!_this.momentumScrolling.ongoing) {\n _this.wtSettings.getSetting('onBeforeTouchScroll');\n }\n _this.momentumScrolling.ongoing = true;\n _this.momentumScrolling._timeout = setTimeout(function () {\n if (!_this.touchApplied) {\n _this.momentumScrolling.ongoing = false;\n _this.wtSettings.getSetting('onAfterMomentumScroll');\n }\n }, 200);\n });\n };\n var initMouseEvents = function initMouseEvents() {\n _this.eventManager.addEventListener(_this.wtTable.holder, 'mouseup', function (event) {\n return _this.onMouseUp(event);\n });\n _this.eventManager.addEventListener(_this.wtTable.holder, 'mousedown', function (event) {\n return _this.onMouseDown(event);\n });\n };\n if (isMobileBrowser()) {\n initTouchEvents();\n } else {\n // PC like devices which support both methods (touchscreen and ability to plug-in mouse).\n if (isTouchSupported()) {\n initTouchEvents();\n }\n initMouseEvents();\n }\n }\n\n /**\n * Checks if an element is already selected.\n *\n * @private\n * @param {Element} touchTarget An element to check.\n * @returns {boolean}\n */\n }, {\n key: \"selectedCellWasTouched\",\n value: function selectedCellWasTouched(touchTarget) {\n var priv = privatePool.get(this);\n var cellUnderFinger = this.parentCell(touchTarget);\n var coordsOfCellUnderFinger = cellUnderFinger.coords;\n if (priv.selectedCellBeforeTouchEnd && coordsOfCellUnderFinger) {\n var _ref = [coordsOfCellUnderFinger.row, priv.selectedCellBeforeTouchEnd.from.row],\n rowTouched = _ref[0],\n rowSelected = _ref[1];\n var _ref2 = [coordsOfCellUnderFinger.col, priv.selectedCellBeforeTouchEnd.from.col],\n colTouched = _ref2[0],\n colSelected = _ref2[1];\n return rowTouched === rowSelected && colTouched === colSelected;\n }\n return false;\n }\n\n /**\n * Gets closest TD or TH element.\n *\n * @private\n * @param {Element} elem An element from the traversing starts.\n * @returns {object} Contains coordinates and reference to TD or TH if it exists. Otherwise it's empty object.\n */\n }, {\n key: \"parentCell\",\n value: function parentCell(elem) {\n var cell = {};\n var TABLE = this.wtTable.TABLE;\n var TD = closestDown(elem, ['TD', 'TH'], TABLE);\n if (TD) {\n cell.coords = this.wtTable.getCoords(TD);\n cell.TD = TD;\n } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {\n cell.coords = this.selections.getCell().cellRange.highlight;\n cell.TD = this.wtTable.getCell(cell.coords);\n } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {\n if (this.selections.createOrGetArea().cellRange) {\n cell.coords = this.selections.createOrGetArea().cellRange.to;\n cell.TD = this.wtTable.getCell(cell.coords);\n }\n }\n return cell;\n }\n\n /**\n * OnMouseDown callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown(event) {\n var priv = privatePool.get(this);\n var activeElement = this.domBindings.rootDocument.activeElement;\n var getParentNode = partial(getParent, event.target);\n var realTarget = event.target;\n\n // ignore focusable element from mouse down processing (https://github.com/handsontable/handsontable/issues/3555)\n if (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement) {\n return;\n }\n var cell = this.parentCell(realTarget);\n if (hasClass(realTarget, 'corner')) {\n this.wtSettings.getSetting('onCellCornerMouseDown', event, realTarget);\n } else if (cell.TD && this.wtSettings.has('onCellMouseDown')) {\n this.callListener('onCellMouseDown', event, cell.coords, cell.TD);\n }\n\n // doubleclick reacts only for left mouse button or from touch events\n if ((event.button === 0 || this.touchApplied) && cell.TD) {\n priv.dblClickOrigin[0] = cell.TD;\n clearTimeout(priv.dblClickTimeout[0]);\n priv.dblClickTimeout[0] = setTimeout(function () {\n priv.dblClickOrigin[0] = null;\n }, 1000);\n }\n }\n\n /**\n * OnContextMenu callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onContextMenu\",\n value: function onContextMenu(event) {\n if (this.wtSettings.has('onCellContextMenu')) {\n var cell = this.parentCell(event.target);\n if (cell.TD) {\n this.callListener('onCellContextMenu', event, cell.coords, cell.TD);\n }\n }\n }\n\n /**\n * OnMouseOver callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onMouseOver\",\n value: function onMouseOver(event) {\n if (!this.wtSettings.has('onCellMouseOver')) {\n return;\n }\n var table = this.wtTable.TABLE;\n var td = closestDown(event.target, ['TD', 'TH'], table);\n var parent = this.parent || this;\n if (td && td !== parent.lastMouseOver && isChildOf(td, table)) {\n parent.lastMouseOver = td;\n this.callListener('onCellMouseOver', event, this.wtTable.getCoords(td), td);\n }\n }\n\n /**\n * OnMouseOut callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onMouseOut\",\n value: function onMouseOut(event) {\n if (!this.wtSettings.has('onCellMouseOut')) {\n return;\n }\n var table = this.wtTable.TABLE;\n var lastTD = closestDown(event.target, ['TD', 'TH'], table);\n var nextTD = closestDown(event.relatedTarget, ['TD', 'TH'], table);\n var parent = this.parent || this;\n if (lastTD && lastTD !== nextTD && isChildOf(lastTD, table)) {\n this.callListener('onCellMouseOut', event, this.wtTable.getCoords(lastTD), lastTD);\n if (nextTD === null) {\n parent.lastMouseOver = null;\n }\n }\n }\n\n /**\n * OnMouseUp callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp(event) {\n var priv = privatePool.get(this);\n var cell = this.parentCell(event.target);\n if (cell.TD && this.wtSettings.has('onCellMouseUp')) {\n this.callListener('onCellMouseUp', event, cell.coords, cell.TD);\n }\n\n // if not left mouse button, and the origin event is not comes from touch\n if (event.button !== 0 && !this.touchApplied) {\n return;\n }\n if (cell.TD === priv.dblClickOrigin[0] && cell.TD === priv.dblClickOrigin[1]) {\n if (hasClass(event.target, 'corner')) {\n this.callListener('onCellCornerDblClick', event, cell.coords, cell.TD);\n } else {\n this.callListener('onCellDblClick', event, cell.coords, cell.TD);\n }\n priv.dblClickOrigin[0] = null;\n priv.dblClickOrigin[1] = null;\n } else if (cell.TD === priv.dblClickOrigin[0]) {\n priv.dblClickOrigin[1] = cell.TD;\n clearTimeout(priv.dblClickTimeout[1]);\n priv.dblClickTimeout[1] = setTimeout(function () {\n priv.dblClickOrigin[1] = null;\n }, 500);\n }\n }\n\n /**\n * OnTouchStart callback. Simulates mousedown event.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onTouchStart\",\n value: function onTouchStart(event) {\n var priv = privatePool.get(this);\n priv.selectedCellBeforeTouchEnd = this.selections.getCell().cellRange;\n this.touchApplied = true;\n this.onMouseDown(event);\n }\n\n /**\n * OnTouchEnd callback. Simulates mouseup event.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n }, {\n key: \"onTouchEnd\",\n value: function onTouchEnd(event) {\n var _this$parentCell;\n var target = event.target;\n var parentCellCoords = (_this$parentCell = this.parentCell(target)) === null || _this$parentCell === void 0 ? void 0 : _this$parentCell.coords;\n var isCellsRange = isDefined(parentCellCoords) && parentCellCoords.row >= 0 && parentCellCoords.col >= 0;\n var isEventCancelable = event.cancelable && isCellsRange && this.wtSettings.getSetting('isDataViewInstance');\n\n // To prevent accidental redirects or other actions that the interactive elements (e.q \"A\" link) do\n // while the cell is highlighted, all touch events that are triggered on different cells are\n // \"preventDefault\"'ed. The user can interact with the element (e.q. click on the link that opens\n // a new page) only when the same cell was previously selected (see related PR #7980).\n if (isEventCancelable) {\n var interactiveElements = ['A', 'BUTTON', 'INPUT'];\n\n // For browsers that use the WebKit as an engine (excluding Safari), there is a bug. The prevent\n // default has to be called all the time. Otherwise, the second tap won't be triggered (probably\n // caused by the native ~300ms delay - https://webkit.org/blog/5610/more-responsive-tapping-on-ios/).\n // To make the interactive elements work, the event target element has to be check. If the element\n // matches the allow-list, the event is not prevented.\n if (isIOS() && (isChromeWebKit() || isFirefoxWebKit()) && this.selectedCellWasTouched(target) && !interactiveElements.includes(target.tagName)) {\n event.preventDefault();\n } else if (!this.selectedCellWasTouched(target)) {\n // For other browsers, prevent default is fired only for the first tap and only when the previous\n // highlighted cell was different.\n event.preventDefault();\n }\n }\n this.onMouseUp(event);\n this.touchApplied = false;\n }\n\n /**\n * Call listener with backward compatibility.\n *\n * @private\n * @param {string} name Name of listener.\n * @param {MouseEvent} event The event object.\n * @param {CellCoords} coords Coordinates.\n * @param {HTMLElement} target Event target.\n */\n }, {\n key: \"callListener\",\n value: function callListener(name, event, coords, target) {\n var listener = this.wtSettings.getSettingPure(name);\n if (listener) {\n listener(event, coords, target, this.facadeGetter());\n }\n }\n\n /**\n * Clears double-click timeouts and destroys the internal eventManager instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n var priv = privatePool.get(this);\n clearTimeout(priv.dblClickTimeout[0]);\n clearTimeout(priv.dblClickTimeout[1]);\n this.eventManager.destroy();\n }\n }]);\n return Event;\n}();\nexport default Event;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * @class ColumnFilter\n */\nvar ColumnFilter = /*#__PURE__*/function () {\n /**\n * @param {number} offset The scroll horizontal offset.\n * @param {number} total The total width of the table.\n * @param {number} countTH The number of rendered row headers.\n */\n function ColumnFilter(offset, total, countTH) {\n _classCallCheck(this, ColumnFilter);\n this.offset = offset;\n this.total = total;\n this.countTH = countTH;\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n _createClass(ColumnFilter, [{\n key: \"offsetted\",\n value: function offsetted(index) {\n return index + this.offset;\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"unOffsetted\",\n value: function unOffsetted(index) {\n return index - this.offset;\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"renderedToSource\",\n value: function renderedToSource(index) {\n return this.offsetted(index);\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"sourceToRendered\",\n value: function sourceToRendered(index) {\n return this.unOffsetted(index);\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"offsettedTH\",\n value: function offsettedTH(index) {\n return index - this.countTH;\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"unOffsettedTH\",\n value: function unOffsettedTH(index) {\n return index + this.countTH;\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"visibleRowHeadedColumnToSourceColumn\",\n value: function visibleRowHeadedColumnToSourceColumn(index) {\n return this.renderedToSource(this.offsettedTH(index));\n }\n\n /**\n * @param {number} index The visual column index.\n * @returns {number}\n */\n }, {\n key: \"sourceColumnToVisibleRowHeadedColumn\",\n value: function sourceColumnToVisibleRowHeadedColumn(index) {\n return this.unOffsettedTH(this.sourceToRendered(index));\n }\n }]);\n return ColumnFilter;\n}();\nexport default ColumnFilter;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * @class RowFilter\n */\nvar RowFilter = /*#__PURE__*/function () {\n /**\n * @param {number} offset The scroll vertical offset.\n * @param {number} total The total height of the table.\n * @param {number} countTH The number of rendered column headers.\n */\n function RowFilter(offset, total, countTH) {\n _classCallCheck(this, RowFilter);\n this.offset = offset;\n this.total = total;\n this.countTH = countTH;\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n _createClass(RowFilter, [{\n key: \"offsetted\",\n value: function offsetted(index) {\n return index + this.offset;\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"unOffsetted\",\n value: function unOffsetted(index) {\n return index - this.offset;\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"renderedToSource\",\n value: function renderedToSource(index) {\n return this.offsetted(index);\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"sourceToRendered\",\n value: function sourceToRendered(index) {\n return this.unOffsetted(index);\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"offsettedTH\",\n value: function offsettedTH(index) {\n return index - this.countTH;\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"unOffsettedTH\",\n value: function unOffsettedTH(index) {\n return index + this.countTH;\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"visibleColHeadedRowToSourceRow\",\n value: function visibleColHeadedRowToSourceRow(index) {\n return this.renderedToSource(this.offsettedTH(index));\n }\n\n /**\n * @param {number} index The visual row index.\n * @returns {number}\n */\n }, {\n key: \"sourceRowToVisibleColHeadedRow\",\n value: function sourceRowToVisibleColHeadedRow(index) {\n return this.unOffsettedTH(this.sourceToRendered(index));\n }\n }]);\n return RowFilter;\n}();\nexport default RowFilter;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * Holder for current and next size (count of rendered and to render DOM elements) and offset.\n *\n * @class {ViewSize}\n */\nvar ViewSize = /*#__PURE__*/function () {\n function ViewSize() {\n _classCallCheck(this, ViewSize);\n /**\n * Current size of the rendered DOM elements.\n *\n * @type {number}\n */\n this.currentSize = 0;\n /**\n * Next size of the rendered DOM elements which should be fulfilled.\n *\n * @type {number}\n */\n this.nextSize = 0;\n /**\n * Current offset.\n *\n * @type {number}\n */\n this.currentOffset = 0;\n /**\n * Next ofset.\n *\n * @type {number}\n */\n this.nextOffset = 0;\n }\n\n /**\n * Sets new size of the rendered DOM elements.\n *\n * @param {number} size The size.\n */\n _createClass(ViewSize, [{\n key: \"setSize\",\n value: function setSize(size) {\n this.currentSize = this.nextSize;\n this.nextSize = size;\n }\n\n /**\n * Sets new offset.\n *\n * @param {number} offset The offset.\n */\n }, {\n key: \"setOffset\",\n value: function setOffset(offset) {\n this.currentOffset = this.nextOffset;\n this.nextOffset = offset;\n }\n }]);\n return ViewSize;\n}();\nexport { ViewSize as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport ViewSize from \"./viewSize.mjs\";\nimport { WORKING_SPACE_ALL, WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from \"./constants.mjs\";\n/**\n * The class is a source of the truth of information about the current and\n * next size of the rendered DOM elements and current and next offset of\n * the view. That information allows us to calculate diff between current\n * DOM order and this which should be rendered without touching the DOM API at all.\n *\n * Mostly the ViewSizeSet is created for each individual renderer. But in\n * the table, there is one case where this size information should be shared\n * between two different instances (different table renderers). This is a TR\n * element which can contain TH elements - managed by own renderer and\n * TD elements - managed by another renderer. To generate correct DOM order\n * for them it is required to connect these two instances by reference\n * through `sharedSize`.\n *\n * @class {ViewSizeSet}\n */\nvar ViewSizeSet = /*#__PURE__*/function () {\n function ViewSizeSet() {\n _classCallCheck(this, ViewSizeSet);\n /**\n * Holder for current and next view size and offset.\n *\n * @type {ViewSize}\n */\n this.size = new ViewSize();\n /**\n * Defines if this instance shares its size with another instance. If it's in the shared\n * mode it defines what space it occupies ('top' or 'bottom').\n *\n * @type {number}\n */\n this.workingSpace = WORKING_SPACE_ALL;\n /**\n * Shared Size instance.\n *\n * @type {ViewSize}\n */\n this.sharedSize = null;\n }\n\n /**\n * Sets the size for rendered elements. It can be a size for rows, cells or size for row\n * headers etc.\n *\n * @param {number} size The size.\n */\n _createClass(ViewSizeSet, [{\n key: \"setSize\",\n value: function setSize(size) {\n this.size.setSize(size);\n }\n\n /**\n * Sets the offset for rendered elements. The offset describes the shift between 0 and\n * the first rendered element according to the scroll position.\n *\n * @param {number} offset The offset.\n */\n }, {\n key: \"setOffset\",\n value: function setOffset(offset) {\n this.size.setOffset(offset);\n }\n\n /**\n * Returns ViewSize instance.\n *\n * @returns {ViewSize}\n */\n }, {\n key: \"getViewSize\",\n value: function getViewSize() {\n return this.size;\n }\n\n /**\n * Checks if this ViewSizeSet is sharing the size with another instance.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isShared\",\n value: function isShared() {\n return this.sharedSize instanceof ViewSize;\n }\n\n /**\n * Checks what working space describes this size instance.\n *\n * @param {number} workingSpace The number which describes the type of the working space (see constants.js).\n * @returns {boolean}\n */\n }, {\n key: \"isPlaceOn\",\n value: function isPlaceOn(workingSpace) {\n return this.workingSpace === workingSpace;\n }\n\n /**\n * Appends the ViewSizeSet instance to this instance that turns it into a shared mode.\n *\n * @param {ViewSizeSet} viewSize The instance of the ViewSizeSet class.\n */\n }, {\n key: \"append\",\n value: function append(viewSize) {\n this.workingSpace = WORKING_SPACE_TOP;\n viewSize.workingSpace = WORKING_SPACE_BOTTOM;\n this.sharedSize = viewSize.getViewSize();\n }\n\n /**\n * Prepends the ViewSize instance to this instance that turns it into a shared mode.\n *\n * @param {ViewSizeSet} viewSize The instance of the ViewSizeSet class.\n */\n }, {\n key: \"prepend\",\n value: function prepend(viewSize) {\n this.workingSpace = WORKING_SPACE_BOTTOM;\n viewSize.workingSpace = WORKING_SPACE_TOP;\n this.sharedSize = viewSize.getViewSize();\n }\n }]);\n return ViewSizeSet;\n}();\nexport { ViewSizeSet as default };","/**\n * Describes that ViewSizeSet instance doesn't share sizes with another\n * instance (root node can contain only one type of children nodes).\n *\n * @type {number}\n */\nexport var WORKING_SPACE_ALL = 0;\n/**\n * Describes that ViewSizeSet instance share sizes with another instance and\n * set working space for this instance to 'top' (root node can contain multiple\n * types of children and this instance will be occupied top space of the root node).\n *\n * @type {number}\n */\nexport var WORKING_SPACE_TOP = 1;\n/**\n * Describes that ViewSizeSet instance share sizes with another instance and\n * set working space for this instance to 'bottom' (root node can contain multiple\n * types of children and this instance will be occupied bottom space of the root node).\n *\n * @type {number}\n */\nexport var WORKING_SPACE_BOTTOM = 2;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from \"./constants.mjs\";\nimport ViewSizeSet from \"./viewSizeSet.mjs\";\n/**\n * Executive model for each table renderer. It's responsible for injecting DOM nodes in a\n * specified order and adjusting the number of elements in the root node.\n *\n * Only this class have rights to juggling DOM elements within the root node (see render method).\n *\n * @class {OrderView}\n */\nvar OrderView = /*#__PURE__*/function () {\n function OrderView(rootNode, nodesPool, childNodeType) {\n _classCallCheck(this, OrderView);\n /**\n * The root node to manage with.\n *\n * @type {HTMLElement}\n */\n this.rootNode = rootNode;\n /**\n * Factory for newly created DOM elements.\n *\n * @type {Function}\n */\n this.nodesPool = nodesPool;\n /**\n * Holder for sizing and positioning of the view.\n *\n * @type {ViewSizeSet}\n */\n this.sizeSet = new ViewSizeSet();\n /**\n * Node type which the order view will manage while rendering the DOM elements.\n *\n * @type {string}\n */\n this.childNodeType = childNodeType.toUpperCase();\n /**\n * The visual index of currently processed row.\n *\n * @type {number}\n */\n this.visualIndex = 0;\n /**\n * The list of DOM elements which are rendered for this render cycle.\n *\n * @type {HTMLElement[]}\n */\n this.collectedNodes = [];\n }\n\n /**\n * Sets the size for rendered elements. It can be a size for rows, cells or size for row\n * headers etc. It depends for what table renderer this instance was created.\n *\n * @param {number} size The size.\n * @returns {OrderView}\n */\n _createClass(OrderView, [{\n key: \"setSize\",\n value: function setSize(size) {\n this.sizeSet.setSize(size);\n return this;\n }\n\n /**\n * Sets the offset for rendered elements. The offset describes the shift between 0 and\n * the first rendered element according to the scroll position.\n *\n * @param {number} offset The offset.\n * @returns {OrderView}\n */\n }, {\n key: \"setOffset\",\n value: function setOffset(offset) {\n this.sizeSet.setOffset(offset);\n return this;\n }\n\n /**\n * Checks if this instance of the view shares the root node with another instance. This happens only once when\n * a row (TR) as a root node is managed by two OrderView instances. If this happens another DOM injection\n * algorithm is performed to achieve consistent order.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isSharedViewSet\",\n value: function isSharedViewSet() {\n return this.sizeSet.isShared();\n }\n\n /**\n * Returns rendered DOM element based on visual index.\n *\n * @param {number} visualIndex The visual index.\n * @returns {HTMLElement}\n */\n }, {\n key: \"getNode\",\n value: function getNode(visualIndex) {\n return visualIndex < this.collectedNodes.length ? this.collectedNodes[visualIndex] : null;\n }\n\n /**\n * Returns currently processed DOM element.\n *\n * @returns {HTMLElement}\n */\n }, {\n key: \"getCurrentNode\",\n value: function getCurrentNode() {\n var length = this.collectedNodes.length;\n return length > 0 ? this.collectedNodes[length - 1] : null;\n }\n\n /**\n * Returns rendered child count for this instance.\n *\n * @returns {number}\n */\n }, {\n key: \"getRenderedChildCount\",\n value: function getRenderedChildCount() {\n var rootNode = this.rootNode,\n sizeSet = this.sizeSet;\n var childElementCount = 0;\n if (this.isSharedViewSet()) {\n var element = rootNode.firstElementChild;\n while (element) {\n if (element.tagName === this.childNodeType) {\n childElementCount += 1;\n } else if (sizeSet.isPlaceOn(WORKING_SPACE_TOP)) {\n break;\n }\n element = element.nextElementSibling;\n }\n } else {\n childElementCount = rootNode.childElementCount;\n }\n return childElementCount;\n }\n\n /**\n * Setups and prepares all necessary properties and start the rendering process.\n * This method has to be called only once (at the start) for the render cycle.\n */\n }, {\n key: \"start\",\n value: function start() {\n this.collectedNodes.length = 0;\n this.visualIndex = 0;\n var rootNode = this.rootNode,\n sizeSet = this.sizeSet;\n var isShared = this.isSharedViewSet();\n var _sizeSet$getViewSize = sizeSet.getViewSize(),\n nextSize = _sizeSet$getViewSize.nextSize;\n var childElementCount = this.getRenderedChildCount();\n while (childElementCount < nextSize) {\n var newNode = this.nodesPool();\n if (!isShared || isShared && sizeSet.isPlaceOn(WORKING_SPACE_BOTTOM)) {\n rootNode.appendChild(newNode);\n } else {\n rootNode.insertBefore(newNode, rootNode.firstChild);\n }\n childElementCount += 1;\n }\n var isSharedPlacedOnTop = isShared && sizeSet.isPlaceOn(WORKING_SPACE_TOP);\n while (childElementCount > nextSize) {\n rootNode.removeChild(isSharedPlacedOnTop ? rootNode.firstChild : rootNode.lastChild);\n childElementCount -= 1;\n }\n }\n\n /**\n * Renders the DOM element based on visual index (which is calculated internally).\n * This method has to be called as many times as the size count is met (to cover all previously rendered DOM elements).\n */\n }, {\n key: \"render\",\n value: function render() {\n var rootNode = this.rootNode,\n sizeSet = this.sizeSet;\n var visualIndex = this.visualIndex;\n if (this.isSharedViewSet() && sizeSet.isPlaceOn(WORKING_SPACE_BOTTOM)) {\n visualIndex += sizeSet.sharedSize.nextSize;\n }\n var node = rootNode.childNodes[visualIndex];\n if (node.tagName !== this.childNodeType) {\n var newNode = this.nodesPool();\n rootNode.replaceChild(newNode, node);\n node = newNode;\n }\n this.collectedNodes.push(node);\n this.visualIndex += 1;\n }\n\n /**\n * Ends the render process.\n * This method has to be called only once (at the end) for the render cycle.\n */\n }, {\n key: \"end\",\n value: function end() {}\n }]);\n return OrderView;\n}();\nexport { OrderView as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport OrderView from \"./view.mjs\";\n/**\n * Executive model for TR root nodes.\n *\n * @class {SharedOrderView}\n */\nvar SharedOrderView = /*#__PURE__*/function (_OrderView) {\n _inherits(SharedOrderView, _OrderView);\n var _super = _createSuper(SharedOrderView);\n function SharedOrderView() {\n _classCallCheck(this, SharedOrderView);\n return _super.apply(this, arguments);\n }\n _createClass(SharedOrderView, [{\n key: \"prependView\",\n value:\n /**\n * The method results in merging external order view into the current order. This happens only for order views which\n * operate on the same root node.\n *\n * In the table, there is only one scenario when this happens. TR root element\n * has a common root node with cells order view and row headers order view. Both classes have to share\n * information about their order sizes to make proper diff calculations.\n *\n * @param {OrderView} orderView The order view to merging with. The view will be added at the beginning of the list.\n * @returns {SharedOrderView}\n */\n function prependView(orderView) {\n this.sizeSet.prepend(orderView.sizeSet);\n orderView.sizeSet.append(this.sizeSet);\n return this;\n }\n\n /**\n * The method results in merging external order view into the current order. This happens only for order views which\n * operate on the same root node.\n *\n * In the table, there is only one scenario when this happens. TR root element\n * has a common root node with cells order view and row headers order view. Both classes have to share\n * information about their order sizes to make proper diff calculations.\n *\n * @param {OrderView} orderView The order view to merging with. The view will be added at the end of the list.\n * @returns {SharedOrderView}\n */\n }, {\n key: \"appendView\",\n value: function appendView(orderView) {\n this.sizeSet.append(orderView.sizeSet);\n orderView.sizeSet.prepend(this.sizeSet);\n return this;\n }\n }]);\n return SharedOrderView;\n}(OrderView);\nexport { SharedOrderView as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * Factory for newly created DOM elements.\n *\n * @class {NodesPool}\n */\nvar NodesPool = /*#__PURE__*/function () {\n function NodesPool(nodeType) {\n _classCallCheck(this, NodesPool);\n /**\n * Node type to generate (ew 'th', 'td').\n *\n * @type {string}\n */\n this.nodeType = nodeType.toUpperCase();\n }\n\n /**\n * Set document owner for this instance.\n *\n * @param {HTMLDocument} rootDocument The document window owner.\n */\n _createClass(NodesPool, [{\n key: \"setRootDocument\",\n value: function setRootDocument(rootDocument) {\n this.rootDocument = rootDocument;\n }\n\n /**\n * Obtains an element. The returned elements in the feature can be cached.\n *\n * @returns {HTMLElement}\n */\n }, {\n key: \"obtain\",\n value: function obtain() {\n return this.rootDocument.createElement(this.nodeType);\n }\n }]);\n return NodesPool;\n}();\nexport { NodesPool as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport NodesPool from \"./../utils/nodesPool.mjs\";\n/**\n * Base renderer class, abstract logic for specialized renderers.\n *\n * @class BaseRenderer\n */\nvar BaseRenderer = /*#__PURE__*/function () {\n function BaseRenderer(nodeType, rootNode) {\n _classCallCheck(this, BaseRenderer);\n /**\n * Factory for newly created DOM elements.\n *\n * NodePool should be used for each renderer. For the first stage of the refactoring\n * process, only some of the renderers are implemented a new approach.\n *\n * @type {NodesPool|null}\n */\n this.nodesPool = typeof nodeType === 'string' ? new NodesPool(nodeType) : null;\n /**\n * Node type which the renderer will manage while building the table (eg. 'TD', 'TR', 'TH').\n *\n * @type {string}\n */\n this.nodeType = nodeType;\n /**\n * The root node to which newly created elements will be inserted.\n *\n * @type {HTMLElement}\n */\n this.rootNode = rootNode;\n /**\n * The instance of the Table class, a wrapper for all renderers and holder for properties describe table state.\n *\n * @type {TableRenderer}\n */\n this.table = null;\n /**\n * Counter of nodes already added.\n *\n * @type {number}\n */\n this.renderedNodes = 0;\n }\n\n /**\n * Sets the table renderer instance to the current renderer.\n *\n * @param {TableRenderer} table The TableRenderer instance.\n */\n _createClass(BaseRenderer, [{\n key: \"setTable\",\n value: function setTable(table) {\n if (this.nodesPool) {\n this.nodesPool.setRootDocument(table.rootDocument);\n }\n this.table = table;\n }\n\n /**\n * Adjusts the number of rendered nodes.\n */\n }, {\n key: \"adjust\",\n value: function adjust() {}\n\n /**\n * Renders the contents to the elements.\n */\n }, {\n key: \"render\",\n value: function render() {}\n }]);\n return BaseRenderer;\n}();\nexport { BaseRenderer as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { SharedOrderView } from \"./../utils/orderView/index.mjs\";\nimport BaseRenderer from \"./_base.mjs\";\n/**\n * Row headers renderer responsible for managing (inserting, tracking, rendering) TR elements belongs to TR.\n *\n *
(root node)\n * ├
--- RowHeadersRenderer\n * ├
\\\n * ├
\\\n * ├
- CellsRenderer\n * ├
/\n * └
/.\n *\n * @class {CellsRenderer}\n */\nvar RowHeadersRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(RowHeadersRenderer, _BaseRenderer);\n var _super = _createSuper(RowHeadersRenderer);\n function RowHeadersRenderer() {\n var _this;\n _classCallCheck(this, RowHeadersRenderer);\n _this = _super.call(this, 'TH');\n /**\n * Cache for OrderView classes connected to specified node.\n *\n * @type {WeakMap}\n */\n _this.orderViews = new WeakMap();\n /**\n * Row index which specifies the row position of the processed row header.\n *\n * @type {number}\n */\n _this.sourceRowIndex = 0;\n return _this;\n }\n\n /**\n * Obtains the instance of the SharedOrderView class which is responsible for rendering the nodes to the root node.\n *\n * @param {HTMLTableRowElement} rootNode The TR element, which is root element for row headers (TH).\n * @returns {SharedOrderView}\n */\n _createClass(RowHeadersRenderer, [{\n key: \"obtainOrderView\",\n value: function obtainOrderView(rootNode) {\n var _this2 = this;\n var orderView;\n if (this.orderViews.has(rootNode)) {\n orderView = this.orderViews.get(rootNode);\n } else {\n orderView = new SharedOrderView(rootNode, function (sourceColumnIndex) {\n return _this2.nodesPool.obtain(_this2.sourceRowIndex, sourceColumnIndex);\n }, this.nodeType);\n this.orderViews.set(rootNode, orderView);\n }\n return orderView;\n }\n\n /**\n * Renders the cells.\n */\n }, {\n key: \"render\",\n value: function render() {\n var _this$table = this.table,\n rowsToRender = _this$table.rowsToRender,\n rowHeaderFunctions = _this$table.rowHeaderFunctions,\n rowHeadersCount = _this$table.rowHeadersCount,\n rows = _this$table.rows,\n cells = _this$table.cells;\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var sourceRowIndex = this.table.renderedRowToSource(visibleRowIndex);\n var TR = rows.getRenderedNode(visibleRowIndex);\n this.sourceRowIndex = sourceRowIndex;\n var orderView = this.obtainOrderView(TR);\n var cellsView = cells.obtainOrderView(TR);\n orderView.appendView(cellsView).setSize(rowHeadersCount).setOffset(this.table.renderedColumnToSource(0)).start();\n for (var visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {\n orderView.render();\n var TH = orderView.getCurrentNode();\n TH.className = '';\n TH.removeAttribute('style');\n rowHeaderFunctions[visibleColumnIndex](sourceRowIndex, TH, visibleColumnIndex);\n }\n orderView.end();\n }\n }\n }]);\n return RowHeadersRenderer;\n}(BaseRenderer);\nexport { RowHeadersRenderer as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { empty } from \"./../../../../helpers/dom/element.mjs\";\nimport BaseRenderer from \"./_base.mjs\";\n/**\n * Column headers renderer responsible for managing (inserting, tracking, rendering) TR and TH elements.\n *\n * (root node)\n * ├
\\\n * ├
\\\n * ├
- ColumnHeadersRenderer\n * ├
/\n * └
/.\n *\n * @class {ColumnHeadersRenderer}\n */\nvar ColumnHeadersRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(ColumnHeadersRenderer, _BaseRenderer);\n var _super = _createSuper(ColumnHeadersRenderer);\n function ColumnHeadersRenderer(rootNode) {\n _classCallCheck(this, ColumnHeadersRenderer);\n return _super.call(this, null, rootNode); // NodePool is not implemented for this renderer yet\n }\n\n /**\n * Adjusts the number of the rendered elements.\n */\n _createClass(ColumnHeadersRenderer, [{\n key: \"adjust\",\n value: function adjust() {\n var _this$table = this.table,\n columnHeadersCount = _this$table.columnHeadersCount,\n rowHeadersCount = _this$table.rowHeadersCount;\n var TR = this.rootNode.firstChild;\n if (columnHeadersCount) {\n var columnsToRender = this.table.columnsToRender;\n var allColumnsToRender = columnsToRender + rowHeadersCount;\n for (var i = 0, len = columnHeadersCount; i < len; i++) {\n TR = this.rootNode.childNodes[i];\n if (!TR) {\n TR = this.table.rootDocument.createElement('tr');\n this.rootNode.appendChild(TR);\n }\n this.renderedNodes = TR.childNodes.length;\n while (this.renderedNodes < allColumnsToRender) {\n TR.appendChild(this.table.rootDocument.createElement('th'));\n this.renderedNodes += 1;\n }\n while (this.renderedNodes > allColumnsToRender) {\n TR.removeChild(TR.lastChild);\n this.renderedNodes -= 1;\n }\n }\n var theadChildrenLength = this.rootNode.childNodes.length;\n if (theadChildrenLength > columnHeadersCount) {\n for (var _i = columnHeadersCount; _i < theadChildrenLength; _i++) {\n this.rootNode.removeChild(this.rootNode.lastChild);\n }\n }\n } else if (TR) {\n empty(TR);\n }\n }\n\n /**\n * Renders the TH elements.\n */\n }, {\n key: \"render\",\n value: function render() {\n var columnHeadersCount = this.table.columnHeadersCount;\n for (var rowHeaderIndex = 0; rowHeaderIndex < columnHeadersCount; rowHeaderIndex += 1) {\n var _this$table2 = this.table,\n columnHeaderFunctions = _this$table2.columnHeaderFunctions,\n columnsToRender = _this$table2.columnsToRender,\n rowHeadersCount = _this$table2.rowHeadersCount;\n var TR = this.rootNode.childNodes[rowHeaderIndex];\n for (var renderedColumnIndex = -1 * rowHeadersCount; renderedColumnIndex < columnsToRender; renderedColumnIndex += 1) {\n // eslint-disable-line max-len\n var sourceColumnIndex = this.table.renderedColumnToSource(renderedColumnIndex);\n var TH = TR.childNodes[renderedColumnIndex + rowHeadersCount];\n TH.className = '';\n TH.removeAttribute('style');\n columnHeaderFunctions[rowHeaderIndex](sourceColumnIndex, TH, rowHeaderIndex);\n }\n }\n }\n }]);\n return ColumnHeadersRenderer;\n}(BaseRenderer);\nexport { ColumnHeadersRenderer as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport BaseRenderer from \"./_base.mjs\";\nimport { addClass } from \"./../../../../helpers/dom/element.mjs\";\n/**\n * Colgroup renderer responsible for managing (inserting, tracking, rendering) COL elements.\n *\n *
(root node)\n * ├
\\\n * ├
\\\n * ├
- ColGroupRenderer\n * ├
/\n * └
/.\n *\n * @class {ColGroupRenderer}\n */\nvar ColGroupRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(ColGroupRenderer, _BaseRenderer);\n var _super = _createSuper(ColGroupRenderer);\n function ColGroupRenderer(rootNode) {\n _classCallCheck(this, ColGroupRenderer);\n return _super.call(this, null, rootNode); // NodePool is not implemented for this renderer yet\n }\n\n /**\n * Adjusts the number of the rendered elements.\n */\n _createClass(ColGroupRenderer, [{\n key: \"adjust\",\n value: function adjust() {\n var _this$table = this.table,\n columnsToRender = _this$table.columnsToRender,\n rowHeadersCount = _this$table.rowHeadersCount;\n var allColumnsToRender = columnsToRender + rowHeadersCount;\n while (this.renderedNodes < allColumnsToRender) {\n this.rootNode.appendChild(this.table.rootDocument.createElement('col'));\n this.renderedNodes += 1;\n }\n while (this.renderedNodes > allColumnsToRender) {\n this.rootNode.removeChild(this.rootNode.lastChild);\n this.renderedNodes -= 1;\n }\n }\n\n /**\n * Renders the col group elements.\n */\n }, {\n key: \"render\",\n value: function render() {\n this.adjust();\n var _this$table2 = this.table,\n columnsToRender = _this$table2.columnsToRender,\n rowHeadersCount = _this$table2.rowHeadersCount;\n\n // Render column nodes for row headers\n for (var visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {\n var sourceColumnIndex = this.table.renderedColumnToSource(visibleColumnIndex);\n var width = this.table.columnUtils.getHeaderWidth(sourceColumnIndex);\n this.rootNode.childNodes[visibleColumnIndex].style.width = \"\".concat(width, \"px\");\n }\n\n // Render column nodes for cells\n for (var _visibleColumnIndex = 0; _visibleColumnIndex < columnsToRender; _visibleColumnIndex++) {\n var _sourceColumnIndex = this.table.renderedColumnToSource(_visibleColumnIndex);\n var _width = this.table.columnUtils.getStretchedColumnWidth(_sourceColumnIndex);\n this.rootNode.childNodes[_visibleColumnIndex + rowHeadersCount].style.width = \"\".concat(_width, \"px\");\n }\n var firstChild = this.rootNode.firstChild;\n if (firstChild) {\n addClass(firstChild, 'rowHeader');\n }\n }\n }]);\n return ColGroupRenderer;\n}(BaseRenderer);\nexport { ColGroupRenderer as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _templateObject;\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { warn } from \"./../../../../helpers/console.mjs\";\nimport { toSingleLine } from \"./../../../../helpers/templateLiteralTag.mjs\";\nimport { OrderView } from \"./../utils/orderView/index.mjs\";\nimport BaseRenderer from \"./_base.mjs\";\nvar performanceWarningAppeared = false;\n\n/**\n * Rows renderer responsible for managing (inserting, tracking, rendering) TR elements belongs to TBODY.\n *\n *
(root node)\n * ├
\\\n * ├
\\\n * ├
- RowsRenderer\n * ├
/\n * └
/.\n *\n * @class {RowsRenderer}\n */\nvar RowsRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(RowsRenderer, _BaseRenderer);\n var _super = _createSuper(RowsRenderer);\n function RowsRenderer(rootNode) {\n var _this;\n _classCallCheck(this, RowsRenderer);\n _this = _super.call(this, 'TR', rootNode);\n /**\n * Cache for OrderView classes connected to specified node.\n *\n * @type {WeakMap}\n */\n _this.orderView = new OrderView(rootNode, function (sourceRowIndex) {\n return _this.nodesPool.obtain(sourceRowIndex);\n }, _this.nodeType);\n return _this;\n }\n\n /**\n * Returns currently rendered node.\n *\n * @param {string} visualIndex Visual index of the rendered node (it always goeas from 0 to N).\n * @returns {HTMLTableRowElement}\n */\n _createClass(RowsRenderer, [{\n key: \"getRenderedNode\",\n value: function getRenderedNode(visualIndex) {\n return this.orderView.getNode(visualIndex);\n }\n\n /**\n * Renders the cells.\n */\n }, {\n key: \"render\",\n value: function render() {\n var rowsToRender = this.table.rowsToRender;\n if (!performanceWarningAppeared && rowsToRender > 1000) {\n performanceWarningAppeared = true;\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting \\n the number of rendered rows by specifying the table height and/or turning off the \\\"renderAllRows\\\" option.\"], [\"Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\\\\x20\\n the number of rendered rows by specifying the table height and/or turning off the \\\"renderAllRows\\\" option.\"]))));\n }\n this.orderView.setSize(rowsToRender).setOffset(this.table.renderedRowToSource(0)).start();\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n this.orderView.render();\n }\n this.orderView.end();\n }\n }]);\n return RowsRenderer;\n}(BaseRenderer);\nexport { RowsRenderer as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { hasClass } from \"./../../../../helpers/dom/element.mjs\";\nimport { SharedOrderView } from \"./../utils/orderView/index.mjs\";\nimport BaseRenderer from \"./_base.mjs\";\n/**\n * Cell renderer responsible for managing (inserting, tracking, rendering) TD elements.\n *\n *
(root node)\n * ├
--- RowHeadersRenderer\n * ├
\\\n * ├
\\\n * ├
- CellsRenderer\n * ├
/\n * └
/.\n *\n * @class {CellsRenderer}\n */\nvar CellsRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(CellsRenderer, _BaseRenderer);\n var _super = _createSuper(CellsRenderer);\n function CellsRenderer() {\n var _this;\n _classCallCheck(this, CellsRenderer);\n _this = _super.call(this, 'TD');\n /**\n * Cache for OrderView classes connected to specified node.\n *\n * @type {WeakMap}\n */\n _this.orderViews = new WeakMap();\n /**\n * Row index which specifies the row position of the processed cell.\n *\n * @type {number}\n */\n _this.sourceRowIndex = 0;\n return _this;\n }\n\n /**\n * Obtains the instance of the SharedOrderView class which is responsible for rendering the nodes to the root node.\n *\n * @param {HTMLTableRowElement} rootNode The TR element, which is root element for cells (TD).\n * @returns {SharedOrderView}\n */\n _createClass(CellsRenderer, [{\n key: \"obtainOrderView\",\n value: function obtainOrderView(rootNode) {\n var _this2 = this;\n var orderView;\n if (this.orderViews.has(rootNode)) {\n orderView = this.orderViews.get(rootNode);\n } else {\n orderView = new SharedOrderView(rootNode, function (sourceColumnIndex) {\n return _this2.nodesPool.obtain(_this2.sourceRowIndex, sourceColumnIndex);\n }, this.nodeType);\n this.orderViews.set(rootNode, orderView);\n }\n return orderView;\n }\n\n /**\n * Renders the cells.\n */\n }, {\n key: \"render\",\n value: function render() {\n var _this$table = this.table,\n rowsToRender = _this$table.rowsToRender,\n columnsToRender = _this$table.columnsToRender,\n rows = _this$table.rows,\n rowHeaders = _this$table.rowHeaders;\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var sourceRowIndex = this.table.renderedRowToSource(visibleRowIndex);\n var TR = rows.getRenderedNode(visibleRowIndex);\n this.sourceRowIndex = sourceRowIndex;\n var orderView = this.obtainOrderView(TR);\n var rowHeadersView = rowHeaders.obtainOrderView(TR);\n\n // @TODO(perf-tip): For cells other than \"visual 0\" generating diff leads/commands can be skipped. New order view\n // should share state between next orderViews.\n orderView.prependView(rowHeadersView).setSize(columnsToRender).setOffset(this.table.renderedColumnToSource(0)).start();\n for (var visibleColumnIndex = 0; visibleColumnIndex < columnsToRender; visibleColumnIndex++) {\n orderView.render();\n var TD = orderView.getCurrentNode();\n var sourceColumnIndex = this.table.renderedColumnToSource(visibleColumnIndex);\n if (!hasClass(TD, 'hide')) {\n // Workaround for hidden columns plugin\n TD.className = '';\n }\n TD.removeAttribute('style');\n TD.removeAttribute('dir');\n this.table.cellRenderer(sourceRowIndex, sourceColumnIndex, TD);\n }\n orderView.end();\n }\n }\n }]);\n return CellsRenderer;\n}(BaseRenderer);\nexport { CellsRenderer as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * TableRenderer class collects all renderers and properties necessary for table creation. It's\n * responsible for adjusting and rendering each renderer.\n *\n * Below is a diagram of the renderers together with an indication of what they are responisble for.\n *
\n *
\\ (root node)\n *
\\\n *
\\___ ColGroupRenderer\n *
/\n *
/\n *
/\n * \\ (root node)\n *
\\\n *
\\\n *
\\____ ColumnHeadersRenderer\n *
/\n *
/\n *
/\n * /\n * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\ (root node)\n *
(root node) \\\n *
--- RowHeadersRenderer\n *
\\ \\\n *
-- CellsRenderer \\\n *
/ \\\n *
\\\n *
(root node) \\\n *
--- RowHeadersRenderer \\\n *
\\ \\___ RowsRenderer\n *
-- CellsRenderer /\n *
/ /\n *
/\n *
(root node) /\n *
--- RowHeadersRenderer /\n *
\\ /\n *
-- CellsRenderer /\n *
/ /\n *
/\n * ___________________/\n *
.\n *\n * @class {RowsRenderer}\n */\nvar TableRenderer = /*#__PURE__*/function () {\n function TableRenderer(rootNode) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n cellRenderer = _ref.cellRenderer;\n _classCallCheck(this, TableRenderer);\n /**\n * Table element which will be used to render the children element.\n *\n * @type {HTMLTableElement}\n */\n this.rootNode = rootNode;\n /**\n * Document owner of the root node.\n *\n * @type {HTMLDocument}\n */\n this.rootDocument = this.rootNode.ownerDocument;\n /**\n * Renderer class responsible for rendering row headers.\n *\n * @type {RowsRenderer}\n */\n this.rowHeaders = null;\n /**\n * Renderer class responsible for rendering column headers.\n *\n * @type {ColumnHeadersRenderer}\n */\n this.columnHeaders = null;\n /**\n * Renderer class responsible for rendering col in colgroup.\n *\n * @type {ColGroupRenderer}\n */\n this.colGroup = null;\n /**\n * Renderer class responsible for rendering rows in tbody.\n *\n * @type {RowsRenderer}\n */\n this.rows = null;\n /**\n * Renderer class responsible for rendering cells.\n *\n * @type {CellsRenderer}\n */\n this.cells = null;\n /**\n * Row filter which contains all necessary information about row index transformation.\n *\n * @type {RowFilter}\n */\n this.rowFilter = null;\n /**\n * Column filter which contains all necessary information about column index transformation.\n *\n * @type {ColumnFilter}\n */\n this.columnFilter = null;\n /**\n * Row utils class which contains all necessary information about sizes of the rows.\n *\n * @type {RowUtils}\n */\n this.rowUtils = null;\n /**\n * Column utils class which contains all necessary information about sizes of the columns.\n *\n * @type {ColumnUtils}\n */\n this.columnUtils = null;\n /**\n * Indicates how much rows should be rendered to fill whole table viewport.\n *\n * @type {number}\n */\n this.rowsToRender = 0;\n /**\n * Indicates how much columns should be rendered to fill whole table viewport.\n *\n * @type {number}\n */\n this.columnsToRender = 0;\n /**\n * An array of functions to be used as a content factory to row headers.\n *\n * @type {Function[]}\n */\n this.rowHeaderFunctions = [];\n /**\n * Count of the function used to render row headers.\n *\n * @type {number}\n */\n this.rowHeadersCount = 0;\n /**\n * An array of functions to be used as a content factory to column headers.\n *\n * @type {Function[]}\n */\n this.columnHeaderFunctions = [];\n /**\n * Count of the function used to render column headers.\n *\n * @type {number}\n */\n this.columnHeadersCount = 0;\n /**\n * Cell renderer used to render cells content.\n *\n * @type {Function}\n */\n this.cellRenderer = cellRenderer;\n }\n\n /**\n * Set row and column util classes.\n *\n * @param {RowUtils} rowUtils RowUtils instance which provides useful methods related to row sizes.\n * @param {ColumnUtils} columnUtils ColumnUtils instance which provides useful methods related to row sizes.\n */\n _createClass(TableRenderer, [{\n key: \"setAxisUtils\",\n value: function setAxisUtils(rowUtils, columnUtils) {\n this.rowUtils = rowUtils;\n this.columnUtils = columnUtils;\n }\n\n /**\n * Sets viewport size of the table.\n *\n * @param {number} rowsCount An amount of rows to render.\n * @param {number} columnsCount An amount of columns to render.\n */\n }, {\n key: \"setViewportSize\",\n value: function setViewportSize(rowsCount, columnsCount) {\n this.rowsToRender = rowsCount;\n this.columnsToRender = columnsCount;\n }\n\n /**\n * Sets row and column filter instances.\n *\n * @param {RowFilter} rowFilter Row filter instance which contains all necessary information about row index transformation.\n * @param {ColumnFilter} columnFilter Column filter instance which contains all necessary information about row\n * index transformation.\n */\n }, {\n key: \"setFilters\",\n value: function setFilters(rowFilter, columnFilter) {\n this.rowFilter = rowFilter;\n this.columnFilter = columnFilter;\n }\n\n /**\n * Sets row and column header functions.\n *\n * @param {Function[]} rowHeaders Row header functions. Factories for creating content for row headers.\n * @param {Function[]} columnHeaders Column header functions. Factories for creating content for column headers.\n */\n }, {\n key: \"setHeaderContentRenderers\",\n value: function setHeaderContentRenderers(rowHeaders, columnHeaders) {\n this.rowHeaderFunctions = rowHeaders;\n this.rowHeadersCount = rowHeaders.length;\n this.columnHeaderFunctions = columnHeaders;\n this.columnHeadersCount = columnHeaders.length;\n }\n\n /**\n * Sets table renderers.\n *\n * @param {renderers} renderers The renderer units.\n * @param {RowHeadersRenderer} renderers.rowHeaders Row headers renderer.\n * @param {ColumnHeadersRenderer} renderers.columnHeaders Column headers renderer.\n * @param {ColGroupRenderer} renderers.colGroup Col group renderer.\n * @param {RowsRenderer} renderers.rows Rows renderer.\n * @param {CellsRenderer} renderers.cells Cells renderer.\n */\n }, {\n key: \"setRenderers\",\n value: function setRenderers() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n rowHeaders = _ref2.rowHeaders,\n columnHeaders = _ref2.columnHeaders,\n colGroup = _ref2.colGroup,\n rows = _ref2.rows,\n cells = _ref2.cells;\n rowHeaders.setTable(this);\n columnHeaders.setTable(this);\n colGroup.setTable(this);\n rows.setTable(this);\n cells.setTable(this);\n this.rowHeaders = rowHeaders;\n this.columnHeaders = columnHeaders;\n this.colGroup = colGroup;\n this.rows = rows;\n this.cells = cells;\n }\n\n /**\n * Transforms visual/rendered row index to source index.\n *\n * @param {number} rowIndex Rendered index.\n * @returns {number}\n */\n }, {\n key: \"renderedRowToSource\",\n value: function renderedRowToSource(rowIndex) {\n return this.rowFilter.renderedToSource(rowIndex);\n }\n\n /**\n * Transforms visual/rendered column index to source index.\n *\n * @param {number} columnIndex Rendered index.\n * @returns {number}\n */\n }, {\n key: \"renderedColumnToSource\",\n value: function renderedColumnToSource(columnIndex) {\n return this.columnFilter.renderedToSource(columnIndex);\n }\n\n /**\n * Renders the table.\n */\n }, {\n key: \"render\",\n value: function render() {\n this.colGroup.adjust();\n this.columnHeaders.adjust();\n this.rows.adjust();\n this.rowHeaders.adjust();\n this.columnHeaders.render();\n this.rows.render();\n this.rowHeaders.render();\n this.cells.render();\n\n // After the cells are rendered calculate columns width (or columns stretch width) to prepare proper values\n // for colGroup renderer (which renders COL elements).\n this.columnUtils.calculateWidths();\n this.colGroup.render();\n var rowsToRender = this.rowsToRender,\n rows = this.rows;\n\n // Fix for multi-line content and for supporting `rowHeights` option.\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var TR = rows.getRenderedNode(visibleRowIndex);\n if (TR.firstChild) {\n var sourceRowIndex = this.renderedRowToSource(visibleRowIndex);\n var rowHeight = this.rowUtils.getHeight(sourceRowIndex);\n if (rowHeight) {\n // Decrease height. 1 pixel will be \"replaced\" by 1px border top\n TR.firstChild.style.height = \"\".concat(rowHeight - 1, \"px\");\n } else {\n TR.firstChild.style.height = '';\n }\n }\n }\n }\n }]);\n return TableRenderer;\n}();\nexport { TableRenderer as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport RowHeadersRenderer from \"./rowHeaders.mjs\";\nimport ColumnHeadersRenderer from \"./columnHeaders.mjs\";\nimport ColGroupRenderer from \"./colGroup.mjs\";\nimport RowsRenderer from \"./rows.mjs\";\nimport CellsRenderer from \"./cells.mjs\";\nimport TableRenderer from \"./table.mjs\";\n/**\n * Content renderer.\n *\n * @class Renderer\n */\nvar Renderer = /*#__PURE__*/function () {\n function Renderer() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n TABLE = _ref.TABLE,\n THEAD = _ref.THEAD,\n COLGROUP = _ref.COLGROUP,\n TBODY = _ref.TBODY,\n rowUtils = _ref.rowUtils,\n columnUtils = _ref.columnUtils,\n cellRenderer = _ref.cellRenderer;\n _classCallCheck(this, Renderer);\n /**\n * General renderer class used to render Walkontable content on screen.\n *\n * @type {TableRenderer}\n */\n this.renderer = new TableRenderer(TABLE, {\n cellRenderer: cellRenderer\n });\n this.renderer.setRenderers({\n rowHeaders: new RowHeadersRenderer(),\n columnHeaders: new ColumnHeadersRenderer(THEAD),\n colGroup: new ColGroupRenderer(COLGROUP),\n rows: new RowsRenderer(TBODY),\n cells: new CellsRenderer()\n });\n this.renderer.setAxisUtils(rowUtils, columnUtils);\n }\n\n /**\n * Sets filter calculators for newly calculated row and column position. The filters are used to transform visual\n * indexes (0 to N) to source indexes provided by Handsontable.\n *\n * @param {RowFilter} rowFilter The row filter instance.\n * @param {ColumnFilter} columnFilter The column filter instance.\n * @returns {Renderer}\n */\n _createClass(Renderer, [{\n key: \"setFilters\",\n value: function setFilters(rowFilter, columnFilter) {\n this.renderer.setFilters(rowFilter, columnFilter);\n return this;\n }\n\n /**\n * Sets the viewport size of the rendered table.\n *\n * @param {number} rowsCount An amount of rows to render.\n * @param {number} columnsCount An amount of columns to render.\n * @returns {Renderer}\n */\n }, {\n key: \"setViewportSize\",\n value: function setViewportSize(rowsCount, columnsCount) {\n this.renderer.setViewportSize(rowsCount, columnsCount);\n return this;\n }\n\n /**\n * Sets row and column header functions.\n *\n * @param {Function[]} rowHeaders Row header functions. Factories for creating content for row headers.\n * @param {Function[]} columnHeaders Column header functions. Factories for creating content for column headers.\n * @returns {Renderer}\n */\n }, {\n key: \"setHeaderContentRenderers\",\n value: function setHeaderContentRenderers(rowHeaders, columnHeaders) {\n this.renderer.setHeaderContentRenderers(rowHeaders, columnHeaders);\n return this;\n }\n\n /**\n * Adjusts the table (preparing for render).\n */\n }, {\n key: \"adjust\",\n value: function adjust() {\n this.renderer.adjust();\n }\n\n /**\n * Renders the table.\n */\n }, {\n key: \"render\",\n value: function render() {\n this.renderer.render();\n }\n }]);\n return Renderer;\n}();\nexport { RowHeadersRenderer, ColumnHeadersRenderer, ColGroupRenderer, RowsRenderer, CellsRenderer, TableRenderer, Renderer };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getScrollbarWidth } from \"./../../../../helpers/dom/element.mjs\";\n/**\n * Column utils class contains all necessary information about sizes of the columns.\n *\n * @class {ColumnUtils}\n */\nvar ColumnUtils = /*#__PURE__*/function () {\n /**\n * @param {TableDao} dataAccessObject The table Data Access Object.\n * @param {Settings} wtSettings The walkontable settings.\n */\n function ColumnUtils(dataAccessObject, wtSettings) {\n _classCallCheck(this, ColumnUtils);\n this.dataAccessObject = dataAccessObject;\n this.wtSettings = wtSettings;\n this.headerWidths = new Map();\n }\n\n /**\n * Returns column width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n _createClass(ColumnUtils, [{\n key: \"getWidth\",\n value: function getWidth(sourceIndex) {\n return this.wtSettings.getSetting('columnWidth', sourceIndex) || this.wtSettings.getSetting('defaultColumnWidth');\n }\n\n /**\n * Returns stretched column width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(sourceIndex) {\n var calculator = this.dataAccessObject.wtViewport.columnsRenderCalculator;\n var width = this.getWidth(sourceIndex);\n if (calculator) {\n var stretchedWidth = calculator.getStretchedColumnWidth(sourceIndex, width);\n if (stretchedWidth) {\n width = stretchedWidth;\n }\n }\n return width;\n }\n\n /**\n * Returns column header height based on passed header level.\n *\n * @param {number} level Column header level.\n * @returns {number}\n */\n }, {\n key: \"getHeaderHeight\",\n value: function getHeaderHeight(level) {\n var height = this.wtSettings.getSetting('defaultRowHeight');\n var oversizedHeight = this.dataAccessObject.wtViewport.oversizedColumnHeaders[level];\n if (oversizedHeight !== void 0) {\n height = height ? Math.max(height, oversizedHeight) : oversizedHeight;\n }\n return height;\n }\n\n /**\n * Returns column header width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n }, {\n key: \"getHeaderWidth\",\n value: function getHeaderWidth(sourceIndex) {\n return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(sourceIndex));\n }\n\n /**\n * Calculates column header widths that can be retrieved from the cache.\n */\n }, {\n key: \"calculateWidths\",\n value: function calculateWidths() {\n var wtSettings = this.wtSettings;\n var _this$dataAccessObjec = this.dataAccessObject,\n wtTable = _this$dataAccessObjec.wtTable,\n wtViewport = _this$dataAccessObjec.wtViewport,\n cloneSource = _this$dataAccessObjec.cloneSource;\n var mainHolder = cloneSource ? cloneSource.wtTable.holder : wtTable.holder;\n var scrollbarCompensation = mainHolder.offsetHeight < mainHolder.scrollHeight ? getScrollbarWidth() : 0;\n var rowHeaderWidthSetting = wtSettings.getSetting('rowHeaderWidth');\n wtViewport.columnsRenderCalculator.refreshStretching(wtViewport.getViewportWidth() - scrollbarCompensation);\n rowHeaderWidthSetting = wtSettings.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);\n if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== void 0) {\n var rowHeadersCount = wtSettings.getSetting('rowHeaders').length;\n var defaultColumnWidth = wtSettings.getSetting('defaultColumnWidth');\n for (var visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {\n var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[visibleColumnIndex] : rowHeaderWidthSetting;\n width = width === null || width === void 0 ? defaultColumnWidth : width;\n this.headerWidths.set(visibleColumnIndex, width);\n }\n }\n }\n }]);\n return ColumnUtils;\n}();\nexport { ColumnUtils as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * Row utils class contains all necessary information about sizes of the rows.\n *\n * @class {RowUtils}\n */\nvar RowUtils = /*#__PURE__*/function () {\n /**\n * @param {TableDao} dataAccessObject The table Data Access Object.\n * @param {Settings} wtSettings The walkontable settings.\n */\n function RowUtils(dataAccessObject, wtSettings) {\n _classCallCheck(this, RowUtils);\n this.dataAccessObject = dataAccessObject;\n this.wtSettings = wtSettings;\n }\n\n /**\n * Returns row height based on passed source index.\n *\n * @param {number} sourceIndex Row source index.\n * @returns {number}\n */\n _createClass(RowUtils, [{\n key: \"getHeight\",\n value: function getHeight(sourceIndex) {\n var height = this.wtSettings.getSetting('rowHeight', sourceIndex);\n var oversizedHeight = this.dataAccessObject.wtViewport.oversizedRows[sourceIndex];\n if (oversizedHeight !== void 0) {\n height = height === void 0 ? oversizedHeight : Math.max(height, oversizedHeight);\n }\n return height;\n }\n }]);\n return RowUtils;\n}();\nexport { RowUtils as default };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n/**\n * @typedef {'top'|'bottom'|'inline_start'|'top_inline_start_corner'|'bottom_inline_start_corner'} CLONE_TYPES_ENUM\n */\nexport var CLONE_TOP = 'top';\nexport var CLONE_BOTTOM = 'bottom';\nexport var CLONE_INLINE_START = 'inline_start';\nexport var CLONE_TOP_INLINE_START_CORNER = 'top_inline_start_corner';\nexport var CLONE_BOTTOM_INLINE_START_CORNER = 'bottom_inline_start_corner';\nexport var CLONE_TYPES = [CLONE_TOP, CLONE_BOTTOM, CLONE_INLINE_START, CLONE_TOP_INLINE_START_CORNER, CLONE_BOTTOM_INLINE_START_CORNER];\nexport var CLONE_CLASS_NAMES = new Map([[CLONE_TOP, \"ht_clone_\".concat(CLONE_TOP)], [CLONE_BOTTOM, \"ht_clone_\".concat(CLONE_BOTTOM)], [CLONE_INLINE_START, \"ht_clone_\".concat(CLONE_INLINE_START, \" ht_clone_left\")], [CLONE_TOP_INLINE_START_CORNER, \"ht_clone_\".concat(CLONE_TOP_INLINE_START_CORNER, \" ht_clone_top_left_corner\")], [CLONE_BOTTOM_INLINE_START_CORNER, \"ht_clone_\".concat(CLONE_BOTTOM_INLINE_START_CORNER, \" ht_clone_bottom_left_corner\")]]);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { hasClass, index, offset, removeClass, removeTextNodes, overlayContainsElement, closest, outerHeight, outerWidth, innerHeight, isVisible as _isVisible } from \"../../../helpers/dom/element.mjs\";\nimport { isFunction } from \"../../../helpers/function.mjs\";\nimport ColumnFilter from \"./filter/column.mjs\";\nimport RowFilter from \"./filter/row.mjs\";\nimport { Renderer } from \"./renderer/index.mjs\";\nimport ColumnUtils from \"./utils/column.mjs\";\nimport RowUtils from \"./utils/row.mjs\";\nimport { CLONE_TOP, CLONE_BOTTOM, CLONE_INLINE_START, CLONE_TOP_INLINE_START_CORNER, CLONE_BOTTOM_INLINE_START_CORNER } from \"./overlay/index.mjs\";\n/**\n * @todo These mixes are never added to the class Table, however their members are used here.\n * @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.\n * @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.\n * @mixes stickyColumnsStart\n * @mixes stickyRowsBottom\n * @mixes stickyRowsTop\n * @mixes calculatedRows\n * @mixes calculatedColumns\n * @abstract\n */\nvar Table = /*#__PURE__*/function () {\n /**\n *\n * @abstract\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {'master'|CLONE_TYPES_ENUM} name Overlay name.\n */\n function Table(dataAccessObject, facadeGetter, domBindings, wtSettings, name) {\n var _this = this;\n _classCallCheck(this, Table);\n /**\n * The walkontable settings.\n *\n * @protected\n * @type {Settings}\n */\n _defineProperty(this, \"wtSettings\", null);\n _defineProperty(this, \"domBindings\", void 0);\n _defineProperty(this, \"TBODY\", null);\n _defineProperty(this, \"THEAD\", null);\n _defineProperty(this, \"COLGROUP\", null);\n /**\n * Indicates if the table has height bigger than 0px.\n *\n * @type {boolean}\n */\n _defineProperty(this, \"hasTableHeight\", true);\n /**\n * Indicates if the table has width bigger than 0px.\n *\n * @type {boolean}\n */\n _defineProperty(this, \"hasTableWidth\", true);\n /**\n * Indicates if the table is visible. By visible, it means that the holder\n * element has CSS 'display' property different than 'none'.\n *\n * @type {boolean}\n */\n _defineProperty(this, \"isTableVisible\", false);\n _defineProperty(this, \"tableOffset\", 0);\n _defineProperty(this, \"holderOffset\", 0);\n this.domBindings = domBindings;\n /**\n * Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).\n *\n * @type {boolean}\n */\n this.isMaster = name === 'master';\n this.name = name;\n this.dataAccessObject = dataAccessObject;\n this.facadeGetter = facadeGetter;\n this.wtSettings = wtSettings;\n\n // legacy support\n this.instance = this.dataAccessObject.wot; // TODO refactoring: it might be removed here, and provides legacy support through facade.\n this.wot = this.dataAccessObject.wot;\n this.TABLE = domBindings.rootTable;\n removeTextNodes(this.TABLE);\n\n // TODO refactoring, to recognize the legitimacy of moving them into domBidings\n this.spreader = this.createSpreader(this.TABLE);\n this.hider = this.createHider(this.spreader);\n this.holder = this.createHolder(this.hider);\n this.wtRootElement = this.holder.parentNode;\n if (this.isMaster) {\n this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).\n }\n\n this.fixTableDomTree();\n this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.\n this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.\n this.correctHeaderWidth = false;\n var origRowHeaderWidth = this.wtSettings.getSettingPure('rowHeaderWidth');\n\n // Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)\n this.wtSettings.update('rowHeaderWidth', function () {\n return _this._modifyRowHeaderWidth(origRowHeaderWidth);\n });\n this.rowUtils = new RowUtils(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.\n this.columnUtils = new ColumnUtils(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.\n\n this.tableRenderer = new Renderer({\n // TODO refactoring, It can be passed through IOC.\n TABLE: this.TABLE,\n THEAD: this.THEAD,\n COLGROUP: this.COLGROUP,\n TBODY: this.TBODY,\n rowUtils: this.rowUtils,\n columnUtils: this.columnUtils,\n cellRenderer: this.wtSettings.getSettingPure('cellRenderer')\n });\n }\n\n /**\n * Returns a boolean that is true if this Table represents a specific overlay, identified by the overlay name.\n * For MasterTable, it returns false.\n *\n * @param {string} overlayTypeName The overlay type.\n * @returns {boolean}\n */\n _createClass(Table, [{\n key: \"is\",\n value: function is(overlayTypeName) {\n // todo refactoring: eliminate all protected and private usages\n return this.name === overlayTypeName;\n }\n\n /**\n *\n */\n }, {\n key: \"fixTableDomTree\",\n value: function fixTableDomTree() {\n var rootDocument = this.domBindings.rootDocument;\n this.TBODY = this.TABLE.querySelector('tbody');\n if (!this.TBODY) {\n this.TBODY = rootDocument.createElement('tbody');\n this.TABLE.appendChild(this.TBODY);\n }\n this.THEAD = this.TABLE.querySelector('thead');\n if (!this.THEAD) {\n this.THEAD = rootDocument.createElement('thead');\n this.TABLE.insertBefore(this.THEAD, this.TBODY);\n }\n this.COLGROUP = this.TABLE.querySelector('colgroup');\n if (!this.COLGROUP) {\n this.COLGROUP = rootDocument.createElement('colgroup');\n this.TABLE.insertBefore(this.COLGROUP, this.THEAD);\n }\n }\n\n /**\n * @param {HTMLTableElement} table An element to process.\n * @returns {HTMLElement}\n */\n }, {\n key: \"createSpreader\",\n value: function createSpreader(table) {\n var parent = table.parentNode;\n var spreader;\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n spreader = this.domBindings.rootDocument.createElement('div');\n spreader.className = 'wtSpreader';\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(spreader, table);\n }\n spreader.appendChild(table);\n }\n spreader.style.position = 'relative';\n return spreader;\n }\n\n /**\n * @param {HTMLElement} spreader An element to the hider element is injected.\n * @returns {HTMLElement}\n */\n }, {\n key: \"createHider\",\n value: function createHider(spreader) {\n var parent = spreader.parentNode;\n var hider;\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n hider = this.domBindings.rootDocument.createElement('div');\n hider.className = 'wtHider';\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(hider, spreader);\n }\n hider.appendChild(spreader);\n }\n return hider;\n }\n\n /**\n *\n * @param {HTMLElement} hider An element to the holder element is injected.\n * @returns {HTMLElement}\n */\n }, {\n key: \"createHolder\",\n value: function createHolder(hider) {\n var parent = hider.parentNode;\n var holder;\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n holder = this.domBindings.rootDocument.createElement('div');\n holder.style.position = 'relative';\n holder.className = 'wtHolder';\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(holder, hider);\n }\n if (this.isMaster) {\n holder.parentNode.className += 'ht_master handsontable';\n holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');\n }\n holder.appendChild(hider);\n }\n return holder;\n }\n\n /**\n * Redraws the table.\n *\n * @param {boolean} [fastDraw=false] If TRUE, will try to avoid full redraw and only update the border positions.\n * If FALSE or UNDEFINED, will perform a full redraw.\n * @returns {Table}\n */\n }, {\n key: \"draw\",\n value: function draw() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var wtSettings = this.wtSettings;\n var _this$dataAccessObjec = this.dataAccessObject,\n wtOverlays = _this$dataAccessObjec.wtOverlays,\n wtViewport = _this$dataAccessObjec.wtViewport;\n var totalRows = wtSettings.getSetting('totalRows');\n var totalColumns = wtSettings.getSetting('totalColumns');\n var rowHeaders = wtSettings.getSetting('rowHeaders');\n var rowHeadersCount = rowHeaders.length;\n var columnHeaders = wtSettings.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n var syncScroll = false;\n var runFastDraw = fastDraw;\n if (this.isMaster) {\n this.holderOffset = offset(this.holder);\n runFastDraw = wtViewport.createRenderCalculators(runFastDraw);\n if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {\n var leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();\n var previousState = this.correctHeaderWidth;\n this.correctHeaderWidth = leftScrollPos !== 0;\n if (previousState !== this.correctHeaderWidth) {\n runFastDraw = false;\n }\n }\n }\n if (this.isMaster) {\n syncScroll = wtOverlays.updateStateOfRendering();\n }\n if (runFastDraw) {\n if (this.isMaster) {\n // in case we only scrolled without redraw, update visible rows information in oldRowsCalculator\n wtViewport.createVisibleCalculators();\n }\n if (wtOverlays) {\n wtOverlays.refresh(true);\n }\n } else {\n if (this.isMaster) {\n this.tableOffset = offset(this.TABLE);\n } else {\n this.tableOffset = this.dataAccessObject.parentTableOffset;\n }\n var startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;\n var startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;\n this.rowFilter = new RowFilter(startRow, totalRows, columnHeadersCount);\n this.columnFilter = new ColumnFilter(startColumn, totalColumns, rowHeadersCount);\n var performRedraw = true;\n\n // Only master table rendering can be skipped\n if (this.isMaster) {\n this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).\n var skipRender = {};\n this.wtSettings.getSetting('beforeDraw', true, skipRender);\n performRedraw = skipRender.skipRender !== true;\n }\n if (performRedraw) {\n this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);\n if (this.is(CLONE_BOTTOM) || this.is(CLONE_BOTTOM_INLINE_START_CORNER)) {\n // do NOT render headers on the bottom or bottom-left corner overlay\n this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);\n }\n this.resetOversizedRows();\n this.tableRenderer.setViewportSize(this.getRenderedRowsCount(), this.getRenderedColumnsCount()).setFilters(this.rowFilter, this.columnFilter).render();\n var workspaceWidth;\n if (this.isMaster) {\n workspaceWidth = this.dataAccessObject.workspaceWidth;\n this.dataAccessObject.wtViewport.containerWidth = null;\n this.markOversizedColumnHeaders();\n }\n this.adjustColumnHeaderHeights();\n if (this.isMaster || this.is(CLONE_BOTTOM)) {\n this.markOversizedRows();\n }\n if (this.isMaster) {\n this.dataAccessObject.wtViewport.createVisibleCalculators();\n this.dataAccessObject.wtOverlays.refresh(false);\n this.dataAccessObject.wtOverlays.applyToDOM();\n var hiderWidth = outerWidth(this.hider);\n var tableWidth = outerWidth(this.TABLE);\n if (hiderWidth !== 0 && tableWidth !== hiderWidth) {\n // Recalculate the column widths, if width changes made in the overlays removed the scrollbar, thus changing the viewport width.\n this.columnUtils.calculateWidths();\n this.tableRenderer.renderer.colGroup.render();\n }\n if (workspaceWidth !== this.dataAccessObject.wtViewport.getWorkspaceWidth()) {\n // workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching\n this.dataAccessObject.wtViewport.containerWidth = null;\n this.columnUtils.calculateWidths();\n this.tableRenderer.renderer.colGroup.render();\n }\n this.wtSettings.getSetting('onDraw', true);\n } else if (this.is(CLONE_BOTTOM)) {\n this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();\n }\n }\n }\n var positionChanged = false;\n if (this.isMaster) {\n positionChanged = wtOverlays.topOverlay.resetFixedPosition();\n if (wtOverlays.bottomOverlay.clone) {\n positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;\n }\n positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;\n if (wtOverlays.topInlineStartCornerOverlay) {\n wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();\n }\n if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {\n wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();\n }\n }\n if (positionChanged) {\n // It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or\n // remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens\n // when there is a switch between rendering from 0 to N rows/columns and vice versa).\n wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method\n wtOverlays.adjustElementsSize();\n } else {\n this.refreshSelections(runFastDraw);\n }\n if (syncScroll) {\n wtOverlays.syncScrollWithMaster();\n }\n this.dataAccessObject.drawn = true;\n return this;\n }\n\n /**\n * @param {number} col The visual column index.\n */\n }, {\n key: \"markIfOversizedColumnHeader\",\n value: function markIfOversizedColumnHeader(col) {\n var sourceColIndex = this.columnFilter.renderedToSource(col);\n var level = this.wtSettings.getSetting('columnHeaders').length;\n var defaultRowHeight = this.wtSettings.getSetting('defaultRowHeight');\n var previousColHeaderHeight;\n var currentHeader;\n var currentHeaderHeight;\n var columnHeaderHeightSetting = this.wtSettings.getSetting('columnHeaderHeight') || [];\n while (level) {\n level -= 1;\n previousColHeaderHeight = this.getColumnHeaderHeight(level);\n currentHeader = this.getColumnHeader(sourceColIndex, level);\n if (!currentHeader) {\n /* eslint-disable no-continue */\n continue;\n }\n currentHeaderHeight = innerHeight(currentHeader);\n if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {\n this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;\n }\n if (Array.isArray(columnHeaderHeightSetting)) {\n if (columnHeaderHeightSetting[level] !== null && columnHeaderHeightSetting[level] !== void 0) {\n this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];\n }\n } else if (!isNaN(columnHeaderHeightSetting)) {\n this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;\n }\n if (this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {\n this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level] || columnHeaderHeightSetting; // eslint-disable-line max-len\n }\n }\n }\n\n /**\n *\n */\n }, {\n key: \"adjustColumnHeaderHeights\",\n value: function adjustColumnHeaderHeights() {\n var wtSettings = this.wtSettings;\n var children = this.THEAD.childNodes;\n var oversizedColumnHeaders = this.dataAccessObject.wtViewport.oversizedColumnHeaders;\n var columnHeaders = wtSettings.getSetting('columnHeaders');\n for (var i = 0, len = columnHeaders.length; i < len; i++) {\n if (oversizedColumnHeaders[i]) {\n if (!children[i] || children[i].childNodes.length === 0) {\n return;\n }\n children[i].childNodes[0].style.height = \"\".concat(oversizedColumnHeaders[i], \"px\");\n }\n }\n }\n\n /**\n * Resets cache of row heights. The cache should be cached for each render cycle in a case\n * when new cell values have content which increases/decreases cell height.\n */\n }, {\n key: \"resetOversizedRows\",\n value: function resetOversizedRows() {\n var wtSettings = this.wtSettings;\n var wtViewport = this.dataAccessObject.wtViewport;\n if (!this.isMaster && !this.is(CLONE_BOTTOM)) {\n return;\n }\n if (!wtSettings.getSetting('externalRowCalculator')) {\n var rowsToRender = this.getRenderedRowsCount();\n\n // Reset the oversized row cache for rendered rows\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var sourceRow = this.rowFilter.renderedToSource(visibleRowIndex);\n if (wtViewport.oversizedRows && wtViewport.oversizedRows[sourceRow]) {\n wtViewport.oversizedRows[sourceRow] = void 0;\n }\n }\n }\n }\n\n /**\n * @param {string} className The CSS class name to remove from the table cells.\n */\n }, {\n key: \"removeClassFromCells\",\n value: function removeClassFromCells(className) {\n var nodes = this.TABLE.querySelectorAll(\".\".concat(className));\n for (var i = 0, len = nodes.length; i < len; i++) {\n removeClass(nodes[i], className);\n }\n }\n\n /**\n * Refresh the table selection by re-rendering Selection instances connected with that instance.\n *\n * @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.\n */\n }, {\n key: \"refreshSelections\",\n value: function refreshSelections(fastDraw) {\n var wtSettings = this.wtSettings;\n var selections = this.dataAccessObject.selections;\n if (!selections) {\n return;\n }\n var highlights = Array.from(selections);\n var len = highlights.length;\n if (fastDraw) {\n var classesToRemove = [];\n for (var i = 0; i < len; i++) {\n var _highlights$i$setting = highlights[i].settings,\n highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,\n highlightRowClassName = _highlights$i$setting.highlightRowClassName,\n highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;\n var classNames = highlights[i].classNames;\n var classNamesLength = classNames.length;\n for (var j = 0; j < classNamesLength; j++) {\n if (!classesToRemove.includes(classNames[j])) {\n classesToRemove.push(classNames[j]);\n }\n }\n if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {\n classesToRemove.push(highlightHeaderClassName);\n }\n if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {\n classesToRemove.push(highlightRowClassName);\n }\n if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {\n classesToRemove.push(highlightColumnClassName);\n }\n }\n var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');\n if (Array.isArray(additionalClassesToRemove)) {\n for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {\n classesToRemove.push(additionalClassesToRemove[_i]);\n }\n }\n var classesToRemoveLength = classesToRemove.length;\n for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {\n // there was no rerender, so we need to remove classNames by ourselves\n this.removeClassFromCells(classesToRemove[_i2]);\n }\n }\n for (var _i3 = 0; _i3 < len; _i3++) {\n highlights[_i3].draw(this.facadeGetter(), fastDraw);\n }\n }\n\n /**\n * Get cell element at coords.\n * Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the\n * negative value corresponds to the distance from the working area. For example, when there are 3 levels of column\n * headers, coords.col=-1 corresponds to the most inner header element, while coords.col=-3 corresponds to the\n * outmost header element.\n *\n * In case an element for the coords is not rendered, the method returns an error code.\n * To produce the error code, the input parameters are validated in the order in which they\n * are given. Thus, if both the row and the column coords are out of the rendered bounds,\n * the method returns the error code for the row.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @returns {HTMLElement|number} HTMLElement on success or Number one of the exit codes on error:\n * -1 row before viewport\n * -2 row after viewport\n * -3 column before viewport\n * -4 column after viewport.\n */\n }, {\n key: \"getCell\",\n value: function getCell(coords) {\n var row = coords.row;\n var column = coords.col;\n var hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column);\n if (hookResult && Array.isArray(hookResult)) {\n var _hookResult = _slicedToArray(hookResult, 2);\n row = _hookResult[0];\n column = _hookResult[1];\n }\n if (this.isRowBeforeRenderedRows(row)) {\n // row before rendered rows\n return -1;\n } else if (this.isRowAfterRenderedRows(row)) {\n // row after rendered rows\n return -2;\n } else if (this.isColumnBeforeRenderedColumns(column)) {\n // column before rendered columns\n return -3;\n } else if (this.isColumnAfterRenderedColumns(column)) {\n // column after rendered columns\n return -4;\n }\n var TR = this.getRow(row);\n if (!TR && row >= 0) {\n throw new Error('TR was expected to be rendered but is not');\n }\n var TD = TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(column)];\n if (!TD && column >= 0) {\n throw new Error('TD or TH was expected to be rendered but is not');\n }\n return TD;\n }\n\n /**\n * Get the DOM element of the row with the provided index.\n *\n * @param {number} rowIndex Row index.\n * @returns {HTMLTableRowElement|boolean} Return the row's DOM element or `false` if the row with the provided\n * index doesn't exist.\n */\n }, {\n key: \"getRow\",\n value: function getRow(rowIndex) {\n var renderedRowIndex = null;\n var parentElement = null;\n if (rowIndex < 0) {\n var _this$rowFilter;\n renderedRowIndex = (_this$rowFilter = this.rowFilter) === null || _this$rowFilter === void 0 ? void 0 : _this$rowFilter.sourceRowToVisibleColHeadedRow(rowIndex);\n parentElement = this.THEAD;\n } else {\n var _this$rowFilter2;\n renderedRowIndex = (_this$rowFilter2 = this.rowFilter) === null || _this$rowFilter2 === void 0 ? void 0 : _this$rowFilter2.sourceToRendered(rowIndex);\n parentElement = this.TBODY;\n }\n if (renderedRowIndex !== void 0 && parentElement !== void 0) {\n if (parentElement.childNodes.length < renderedRowIndex + 1) {\n return false;\n } else {\n return parentElement.childNodes[renderedRowIndex];\n }\n } else {\n return false;\n }\n }\n\n /**\n * GetColumnHeader.\n *\n * @param {number} col Column index.\n * @param {number} [level=0] Header level (0 = most distant to the table).\n * @returns {object} HTMLElement on success or undefined on error.\n */\n }, {\n key: \"getColumnHeader\",\n value: function getColumnHeader(col) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var TR = this.THEAD.childNodes[level];\n return TR === null || TR === void 0 ? void 0 : TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(col)];\n }\n\n /**\n * Gets all columns headers (TH elements) from the table.\n *\n * @param {number} column A source column index.\n * @returns {HTMLTableCellElement[]}\n */\n }, {\n key: \"getColumnHeaders\",\n value: function getColumnHeaders(column) {\n var THs = [];\n var visibleColumn = this.columnFilter.sourceColumnToVisibleRowHeadedColumn(column);\n this.THEAD.childNodes.forEach(function (TR) {\n var TH = TR.childNodes[visibleColumn];\n if (TH) {\n THs.push(TH);\n }\n });\n return THs;\n }\n\n /**\n * GetRowHeader.\n *\n * @param {number} row Row index.\n * @param {number} [level=0] Header level (0 = most distant to the table).\n * @returns {HTMLElement} HTMLElement on success or Number one of the exit codes on error: `null table doesn't have\n * row headers`.\n */\n }, {\n key: \"getRowHeader\",\n value: function getRowHeader(row) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {\n return;\n }\n var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;\n if (level >= rowHeadersCount) {\n return;\n }\n var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n return TR === null || TR === void 0 ? void 0 : TR.childNodes[level];\n }\n\n /**\n * Gets all rows headers (TH elements) from the table.\n *\n * @param {number} row A source row index.\n * @returns {HTMLTableCellElement[]}\n */\n }, {\n key: \"getRowHeaders\",\n value: function getRowHeaders(row) {\n if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {\n return [];\n }\n var THs = [];\n var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;\n for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {\n var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n var TH = TR === null || TR === void 0 ? void 0 : TR.childNodes[renderedRowIndex];\n if (TH) {\n THs.push(TH);\n }\n }\n return THs;\n }\n\n /**\n * Returns cell coords object for a given TD (or a child element of a TD element).\n *\n * @param {HTMLTableCellElement} TD A cell DOM element (or a child of one).\n * @returns {CellCoords|null} The coordinates of the provided TD element (or the closest TD element) or null, if the\n * provided element is not applicable.\n */\n }, {\n key: \"getCoords\",\n value: function getCoords(TD) {\n var cellElement = TD;\n if (cellElement.nodeName !== 'TD' && cellElement.nodeName !== 'TH') {\n cellElement = closest(cellElement, ['TD', 'TH']);\n }\n if (cellElement === null) {\n return null;\n }\n var TR = cellElement.parentNode;\n var CONTAINER = TR.parentNode;\n var row = index(TR);\n var col = cellElement.cellIndex;\n if (overlayContainsElement(CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_TOP, cellElement, this.wtRootElement)) {\n if (CONTAINER.nodeName === 'THEAD') {\n row -= CONTAINER.childNodes.length;\n }\n } else if (overlayContainsElement(CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM, cellElement, this.wtRootElement)) {\n var totalRows = this.wtSettings.getSetting('totalRows');\n row = totalRows - CONTAINER.childNodes.length + row;\n } else if (CONTAINER === this.THEAD) {\n row = this.rowFilter.visibleColHeadedRowToSourceRow(row);\n } else {\n row = this.rowFilter.renderedToSource(row);\n }\n if (overlayContainsElement(CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_INLINE_START, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement)) {\n col = this.columnFilter.offsettedTH(col);\n } else {\n col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);\n }\n return this.wot.createCellCoords(row, col);\n }\n\n /**\n * Check if any of the rendered rows is higher than expected, and if so, cache them.\n */\n }, {\n key: \"markOversizedRows\",\n value: function markOversizedRows() {\n if (this.wtSettings.getSetting('externalRowCalculator')) {\n return;\n }\n var rowCount = this.TBODY.childNodes.length;\n var expectedTableHeight = rowCount * this.wtSettings.getSetting('defaultRowHeight');\n var actualTableHeight = innerHeight(this.TBODY) - 1;\n var previousRowHeight;\n var rowInnerHeight;\n var sourceRowIndex;\n var currentTr;\n var rowHeader;\n if (expectedTableHeight === actualTableHeight && !this.wtSettings.getSetting('fixedRowsBottom')) {\n // If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them\n return;\n }\n while (rowCount) {\n rowCount -= 1;\n sourceRowIndex = this.rowFilter.renderedToSource(rowCount);\n previousRowHeight = this.getRowHeight(sourceRowIndex);\n currentTr = this.getTrForRow(sourceRowIndex);\n rowHeader = currentTr.querySelector('th');\n if (rowHeader) {\n rowInnerHeight = innerHeight(rowHeader);\n } else {\n rowInnerHeight = innerHeight(currentTr) - 1;\n }\n if (!previousRowHeight && this.wtSettings.getSetting('defaultRowHeight') < rowInnerHeight || previousRowHeight < rowInnerHeight) {\n rowInnerHeight += 1;\n this.dataAccessObject.wtViewport.oversizedRows[sourceRowIndex] = rowInnerHeight;\n }\n }\n }\n\n /**\n * @param {number} row The visual row index.\n * @returns {HTMLTableElement}\n */\n }, {\n key: \"getTrForRow\",\n value: function getTrForRow(row) {\n return this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n }\n\n /**\n * Checks if the column index (negative value from -1 to N) is rendered.\n *\n * @param {number} column The column index (negative value from -1 to N).\n * @returns {boolean}\n */\n }, {\n key: \"isColumnHeaderRendered\",\n value: function isColumnHeaderRendered(column) {\n if (column >= 0) {\n return false;\n }\n var rowHeaders = this.wtSettings.getSetting('rowHeaders');\n var rowHeadersCount = rowHeaders.length;\n return Math.abs(column) <= rowHeadersCount;\n }\n\n /**\n * Checks if the row index (negative value from -1 to N) is rendered.\n *\n * @param {number} row The row index (negative value from -1 to N).\n * @returns {boolean}\n */\n }, {\n key: \"isRowHeaderRendered\",\n value: function isRowHeaderRendered(row) {\n if (row >= 0) {\n return false;\n }\n var columnHeaders = this.wtSettings.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n return Math.abs(row) <= columnHeadersCount;\n }\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n /**\n * Check if the given row index is lower than the index of the first row that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * Negative row index is used to check the columns' headers.\n *\n * Headers\n * +--------------+ │\n * -3 │ │ │ │ │\n * +--------------+ │\n * -2 │ │ │ │ │ TRUE\n * +--------------+ │\n * -1 │ │ │ │ │\n * Cells +==================+ │\n * 0 ┇ ┇ ┇ ┇ <--- For fixedRowsTop: 1 │\n * +--------------+ the master overlay do ---+ first rendered row (index 1)\n * 1 │ A2 │ B2 │ C2 │ not render the first row. │\n * +--------------+ │ FALSE\n * 2 │ A3 │ B3 │ C3 │ │\n * +--------------+ ---+ last rendered row\n * │\n * │ FALSE\n *\n * @param {number} row The visual row index.\n * @memberof Table#\n * @function isRowBeforeRenderedRows\n * @returns {boolean}\n */\n /* eslint-enable jsdoc/require-description-complete-sentence */\n }, {\n key: \"isRowBeforeRenderedRows\",\n value: function isRowBeforeRenderedRows(row) {\n var first = this.getFirstRenderedRow();\n\n // Check the headers only in case when the first rendered row is -1 or 0.\n // This is an indication that the overlay is placed on the most top position.\n if (row < 0 && first <= 0) {\n return !this.isRowHeaderRendered(row);\n }\n return row < first;\n }\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n /**\n * Check if the given column index is greater than the index of the last column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * The negative row index is used to check the columns' headers. However,\n * keep in mind that for negative indexes, the method always returns FALSE as\n * it is not possible to render headers partially. The \"after\" index can not be\n * lower than -1.\n *\n * Headers\n * +--------------+ │\n * -3 │ │ │ │ │\n * +--------------+ │\n * -2 │ │ │ │ │ FALSE\n * +--------------+ │\n * -1 │ │ │ │ │\n * Cells +==================+ │\n * 0 ┇ ┇ ┇ ┇ <--- For fixedRowsTop: 1 │\n * +--------------+ the master overlay do ---+ first rendered row (index 1)\n * 1 │ A2 │ B2 │ C2 │ not render the first rows │\n * +--------------+ │ FALSE\n * 2 │ A3 │ B3 │ C3 │ │\n * +--------------+ ---+ last rendered row\n * │\n * │ TRUE\n *\n * @param {number} row The visual row index.\n * @memberof Table#\n * @function isRowAfterRenderedRows\n * @returns {boolean}\n */\n /* eslint-enable jsdoc/require-description-complete-sentence */\n }, {\n key: \"isRowAfterRenderedRows\",\n value: function isRowAfterRenderedRows(row) {\n return row > this.getLastRenderedRow();\n }\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n /**\n * Check if the given column index is lower than the index of the first column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * Negative column index is used to check the rows' headers.\n *\n * For fixedColumnsStart: 1 the master overlay\n * do not render this first columns.\n * Headers -3 -2 -1 |\n * +----+----+----║┄ ┄ +------+------+\n * │ │ │ ║ │ B1 │ C1 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B2 │ C2 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B3 │ C3 │\n * +----+----+----║┄ ┄ +------+------+\n * ╷ ╷\n * -------------------------+-------------+---------------->\n * TRUE first FALSE last FALSE\n * rendered rendered\n * column column\n *\n * @param {number} column The visual column index.\n * @memberof Table#\n * @function isColumnBeforeRenderedColumns\n * @returns {boolean}\n */\n /* eslint-enable jsdoc/require-description-complete-sentence */\n }, {\n key: \"isColumnBeforeRenderedColumns\",\n value: function isColumnBeforeRenderedColumns(column) {\n var first = this.getFirstRenderedColumn();\n\n // Check the headers only in case when the first rendered column is -1 or 0.\n // This is an indication that the overlay is placed on the most left position.\n if (column < 0 && first <= 0) {\n return !this.isColumnHeaderRendered(column);\n }\n return column < first;\n }\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n /**\n * Check if the given column index is greater than the index of the last column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * The negative column index is used to check the rows' headers. However,\n * keep in mind that for negative indexes, the method always returns FALSE as\n * it is not possible to render headers partially. The \"after\" index can not be\n * lower than -1.\n *\n * For fixedColumnsStart: 1 the master overlay\n * do not render this first columns.\n * Headers -3 -2 -1 |\n * +----+----+----║┄ ┄ +------+------+\n * │ │ │ ║ │ B1 │ C1 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B2 │ C2 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B3 │ C3 │\n * +----+----+----║┄ ┄ +------+------+\n * ╷ ╷\n * -------------------------+-------------+---------------->\n * FALSE first FALSE last TRUE\n * rendered rendered\n * column column\n *\n * @param {number} column The visual column index.\n * @memberof Table#\n * @function isColumnAfterRenderedColumns\n * @returns {boolean}\n */\n /* eslint-enable jsdoc/require-description-complete-sentence */\n }, {\n key: \"isColumnAfterRenderedColumns\",\n value: function isColumnAfterRenderedColumns(column) {\n return this.columnFilter && column > this.getLastRenderedColumn();\n }\n }, {\n key: \"isColumnAfterViewport\",\n value: function isColumnAfterViewport(column) {\n return this.columnFilter && column > this.getLastVisibleColumn();\n }\n }, {\n key: \"isRowAfterViewport\",\n value: function isRowAfterViewport(row) {\n return this.rowFilter && row > this.getLastVisibleRow();\n }\n }, {\n key: \"isColumnBeforeViewport\",\n value: function isColumnBeforeViewport(column) {\n return this.columnFilter && this.columnFilter.sourceToRendered(column) < 0 && column >= 0;\n }\n }, {\n key: \"isLastRowFullyVisible\",\n value: function isLastRowFullyVisible() {\n return this.getLastVisibleRow() === this.getLastRenderedRow();\n }\n }, {\n key: \"isLastColumnFullyVisible\",\n value: function isLastColumnFullyVisible() {\n return this.getLastVisibleColumn() === this.getLastRenderedColumn();\n }\n }, {\n key: \"allRowsInViewport\",\n value: function allRowsInViewport() {\n return this.wtSettings.getSetting('totalRows') === this.getVisibleRowsCount();\n }\n }, {\n key: \"allColumnsInViewport\",\n value: function allColumnsInViewport() {\n return this.wtSettings.getSetting('totalColumns') === this.getVisibleColumnsCount();\n }\n\n /**\n * Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height.\n *\n * @param {number} sourceRow The physical row index.\n * @returns {number}\n */\n }, {\n key: \"getRowHeight\",\n value: function getRowHeight(sourceRow) {\n return this.rowUtils.getHeight(sourceRow);\n }\n\n /**\n * @param {number} level The column level.\n * @returns {number}\n */\n }, {\n key: \"getColumnHeaderHeight\",\n value: function getColumnHeaderHeight(level) {\n return this.columnUtils.getHeaderHeight(level);\n }\n\n /**\n * @param {number} sourceColumn The physical column index.\n * @returns {number}\n */\n }, {\n key: \"getColumnWidth\",\n value: function getColumnWidth(sourceColumn) {\n return this.columnUtils.getWidth(sourceColumn);\n }\n\n /**\n * @param {number} sourceColumn The physical column index.\n * @returns {number}\n */\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(sourceColumn) {\n return this.columnUtils.getStretchedColumnWidth(sourceColumn);\n }\n\n /**\n * Checks if the table has defined size. It returns `true` when the table has width and height\n * set bigger than `0px`.\n *\n * @returns {boolean}\n */\n }, {\n key: \"hasDefinedSize\",\n value: function hasDefinedSize() {\n return this.hasTableHeight && this.hasTableWidth;\n }\n\n /**\n * Gets table's width. The returned width is the width of the rendered cells that fit in the\n * current viewport. The value may change depends on the viewport position (scroll position).\n *\n * @returns {number}\n */\n }, {\n key: \"getWidth\",\n value: function getWidth() {\n return outerWidth(this.TABLE);\n }\n\n /**\n * Gets table's height. The returned height is the height of the rendered cells that fit in the\n * current viewport. The value may change depends on the viewport position (scroll position).\n *\n * @returns {number}\n */\n }, {\n key: \"getHeight\",\n value: function getHeight() {\n return outerHeight(this.TABLE);\n }\n\n /**\n * Gets table's total width. The returned width is the width of all rendered cells (including headers)\n * that can be displayed in the table.\n *\n * @returns {number}\n */\n }, {\n key: \"getTotalWidth\",\n value: function getTotalWidth() {\n var width = outerWidth(this.hider);\n\n // when the overlay's table does not have any cells the hider returns 0, get then width from the table element\n return width !== 0 ? width : this.getWidth();\n }\n\n /**\n * Gets table's total height. The returned height is the height of all rendered cells (including headers)\n * that can be displayed in the table.\n *\n * @returns {number}\n */\n }, {\n key: \"getTotalHeight\",\n value: function getTotalHeight() {\n var height = outerHeight(this.hider);\n\n // when the overlay's table does not have any cells the hider returns 0, get then height from the table element\n return height !== 0 ? height : this.getHeight();\n }\n\n /**\n * Checks if the table is visible. It returns `true` when the holder element (or its parents)\n * has CSS 'display' property different than 'none'.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isVisible\",\n value: function isVisible() {\n return _isVisible(this.TABLE);\n }\n\n /**\n * Modify row header widths provided by user in class contructor.\n *\n * @private\n * @param {Function} rowHeaderWidthFactory The function which can provide default width values for rows..\n * @returns {number}\n */\n }, {\n key: \"_modifyRowHeaderWidth\",\n value: function _modifyRowHeaderWidth(rowHeaderWidthFactory) {\n var widths = isFunction(rowHeaderWidthFactory) ? rowHeaderWidthFactory() : null;\n if (Array.isArray(widths)) {\n widths = _toConsumableArray(widths);\n widths[widths.length - 1] = this._correctRowHeaderWidth(widths[widths.length - 1]);\n } else {\n widths = this._correctRowHeaderWidth(widths);\n }\n return widths;\n }\n\n /**\n * Correct row header width if necessary.\n *\n * @private\n * @param {number} width The width to process.\n * @returns {number}\n */\n }, {\n key: \"_correctRowHeaderWidth\",\n value: function _correctRowHeaderWidth(width) {\n var rowHeaderWidth = width;\n if (typeof width !== 'number') {\n rowHeaderWidth = this.wtSettings.getSetting('defaultColumnWidth');\n }\n if (this.correctHeaderWidth) {\n rowHeaderWidth += 1;\n }\n return rowHeaderWidth;\n }\n }]);\n return Table;\n}();\nexport default Table;","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyRowsTop';\n\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the top rows in the vertical axis.\n *\n * @type {object}\n */\nvar stickyRowsTop = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var totalRows = this.wtSettings.getSetting('totalRows');\n if (totalRows === 0) {\n return -1;\n }\n return 0;\n },\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n return this.getFirstRenderedRow();\n },\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastRenderedRow: function getLastRenderedRow() {\n return this.getRenderedRowsCount() - 1;\n },\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getLastVisibleRow: function getLastVisibleRow() {\n return this.getLastRenderedRow();\n },\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n * @this Table\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n var totalRows = this.wtSettings.getSetting('totalRows');\n return Math.min(this.wtSettings.getSetting('fixedRowsTop'), totalRows);\n },\n /**\n * Get the number of fully visible rows in the viewport.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.getRenderedRowsCount();\n }\n};\ndefineGetter(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyRowsTop;","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'calculatedColumns';\n\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to columns.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use virtual rendering in the horizontal axis.\n *\n * @type {object}\n */\nvar calculatedColumns = {\n /**\n * Get the source index of the first rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstRenderedColumn: function getFirstRenderedColumn() {\n var startColumn = this.dataAccessObject.startColumnRendered;\n if (startColumn === null) {\n return -1;\n }\n return startColumn;\n },\n /**\n * Get the source index of the first column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstVisibleColumn: function getFirstVisibleColumn() {\n var startColumn = this.dataAccessObject.startColumnVisible;\n if (startColumn === null) {\n return -1;\n }\n return startColumn;\n },\n /**\n * Get the source index of the last rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastRenderedColumn: function getLastRenderedColumn() {\n var endColumn = this.dataAccessObject.endColumnRendered;\n if (endColumn === null) {\n return -1;\n }\n return endColumn;\n },\n /**\n * Get the source index of the last column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastVisibleColumn: function getLastVisibleColumn() {\n var endColumn = this.dataAccessObject.endColumnVisible;\n if (endColumn === null) {\n return -1;\n }\n return endColumn;\n },\n /**\n * Get the number of rendered columns.\n *\n * @returns {number}\n * @this Table\n */\n getRenderedColumnsCount: function getRenderedColumnsCount() {\n return this.dataAccessObject.countColumnsRendered;\n },\n /**\n * Get the number of fully visible columns in the viewport.\n *\n * @returns {number}\n * @this Table\n */\n getVisibleColumnsCount: function getVisibleColumnsCount() {\n return this.dataAccessObject.countColumnsVisible;\n }\n};\ndefineGetter(calculatedColumns, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default calculatedColumns;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Table from \"../table.mjs\";\nimport stickyRowsTop from \"./mixin/stickyRowsTop.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"../../../../helpers/object.mjs\";\nimport { CLONE_TOP } from \"../overlay/index.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to TopOverlay, implemented through mixins.\n *\n * @mixes stickyRowsTop\n * @mixes calculatedColumns\n */\nvar TopOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(TopOverlayTable, _Table);\n var _super = _createSuper(TopOverlayTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function TopOverlayTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, TopOverlayTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, CLONE_TOP);\n }\n return _createClass(TopOverlayTable);\n}(Table);\nmixin(TopOverlayTable, stickyRowsTop);\nmixin(TopOverlayTable, calculatedColumns);\nexport default TopOverlayTable;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { innerHeight, innerWidth, getScrollLeft, getScrollTop, offset } from \"../../../helpers/dom/element.mjs\";\n/**\n * @class Scroll\n */\nvar Scroll = /*#__PURE__*/function () {\n /**\n * @param {ScrollDao} dataAccessObject Tha data access object.\n */\n function Scroll(dataAccessObject) {\n _classCallCheck(this, Scroll);\n /**\n * The data access object.\n *\n * @protected\n * @type {ScrollDao}\n */\n _defineProperty(this, \"dataAccessObject\", void 0);\n /**\n * Holds the last column reached by the scroll, which determines the scroll snapping direction\n * (left or right) for a next horizontal scroll.\n *\n * @protected\n * @type {number}\n */\n _defineProperty(this, \"lastScrolledColumnPos\", -1);\n /**\n * Holds the last row reached by the scroll, which determines the scroll snapping direction\n * (top or bottom) for a next vertical scroll.\n *\n * @protected\n * @type {number}\n */\n _defineProperty(this, \"lastScrolledRowPos\", -1);\n this.dataAccessObject = dataAccessObject;\n }\n\n /**\n * Scrolls viewport to a cell.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n _createClass(Scroll, [{\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n var scrolledHorizontally = this.scrollViewportHorizontally(coords.col, snapToRight, snapToLeft);\n var scrolledVertically = this.scrollViewportVertically(coords.row, snapToTop, snapToBottom);\n return scrolledHorizontally || scrolledVertically;\n }\n\n /**\n * Scrolls viewport to a column.\n *\n * @param {number} column Visual column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n var _this$dataAccessObjec = this.dataAccessObject,\n drawn = _this$dataAccessObjec.drawn,\n totalColumns = _this$dataAccessObjec.totalColumns;\n\n // do not scroll the viewport when the column points to a range outside of the dataset\n if (!drawn || !Number.isInteger(column) || column < 0 || column > totalColumns) {\n return false;\n }\n var firstVisibleColumn = this.getFirstVisibleColumn();\n var lastVisibleColumn = this.getLastVisibleColumn();\n var autoSnapping = snapToRight === void 0 && snapToLeft === void 0;\n var _this$dataAccessObjec2 = this.dataAccessObject,\n fixedColumnsStart = _this$dataAccessObjec2.fixedColumnsStart,\n inlineStartOverlay = _this$dataAccessObjec2.inlineStartOverlay;\n\n // for auto-snapping (both snap* arguments are undefined) do not scroll the viewport\n // when the columns points to the overlays\n if (autoSnapping && column < fixedColumnsStart) {\n return false;\n }\n var result = false;\n\n // if there is no fully visible columns use the supporting variable (lastScrolledColumnPos) to\n // determine the snapping direction (left or right)\n if (firstVisibleColumn === -1) {\n result = inlineStartOverlay.scrollTo(column, autoSnapping ? column > this.lastScrolledColumnPos : snapToRight);\n } else if (autoSnapping && (column < firstVisibleColumn || column > lastVisibleColumn) || !autoSnapping) {\n // if there is at least one fully visible column determine the snapping direction based on\n // that columns or by snapToRight/snapToLeft flags, if provided.\n result = inlineStartOverlay.scrollTo(column, autoSnapping ? column > lastVisibleColumn : snapToRight);\n }\n if (result) {\n this.lastScrolledColumnPos = column;\n }\n return result;\n }\n\n /**\n * Scrolls viewport to a row.\n *\n * @param {number} row Visual row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n var _this$dataAccessObjec3 = this.dataAccessObject,\n drawn = _this$dataAccessObjec3.drawn,\n totalRows = _this$dataAccessObjec3.totalRows;\n\n // do not scroll the viewport when the row points to a range outside of the dataset\n if (!drawn || !Number.isInteger(row) || row < 0 || row > totalRows) {\n return false;\n }\n var firstVisibleRow = this.getFirstVisibleRow();\n var lastVisibleRow = this.getLastVisibleRow();\n var autoSnapping = snapToTop === void 0 && snapToBottom === void 0;\n var _this$dataAccessObjec4 = this.dataAccessObject,\n fixedRowsBottom = _this$dataAccessObjec4.fixedRowsBottom,\n fixedRowsTop = _this$dataAccessObjec4.fixedRowsTop,\n topOverlay = _this$dataAccessObjec4.topOverlay;\n\n // for auto-snapping (both snap* arguments are undefined) do not scroll the viewport\n // when the rows points to the overlays\n if (autoSnapping && (row < fixedRowsTop || row > totalRows - fixedRowsBottom - 1)) {\n return false;\n }\n var result = false;\n\n // if there is no fully visible rows use the supporting variable (lastScrolledRowPos) to\n // determine the snapping direction (top or bottom)\n if (firstVisibleRow === -1) {\n result = topOverlay.scrollTo(row, autoSnapping ? row > this.lastScrolledRowPos : snapToBottom);\n } else if (autoSnapping && (row < firstVisibleRow || row > lastVisibleRow) || !autoSnapping) {\n // if there is at least one fully visible row determine the snapping direction based on\n // that rows or by snapToTop/snapToBottom flags, if provided.\n result = topOverlay.scrollTo(row, autoSnapping ? row > lastVisibleRow : snapToBottom);\n }\n if (result) {\n this.lastScrolledRowPos = row;\n }\n return result;\n }\n\n /**\n * Get first visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getFirstVisibleRow\",\n value: function getFirstVisibleRow() {\n var _this$dataAccessObjec5 = this.dataAccessObject,\n topOverlay = _this$dataAccessObjec5.topOverlay,\n wtTable = _this$dataAccessObjec5.wtTable,\n wtViewport = _this$dataAccessObjec5.wtViewport,\n totalRows = _this$dataAccessObjec5.totalRows,\n fixedRowsTop = _this$dataAccessObjec5.fixedRowsTop,\n rootWindow = _this$dataAccessObjec5.rootWindow;\n var firstVisibleRow = wtTable.getFirstVisibleRow();\n if (topOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var totalTableHeight = innerHeight(wtTable.hider);\n var windowHeight = innerHeight(rootWindow);\n var windowScrollTop = getScrollTop(rootWindow, rootWindow);\n\n // Only calculate firstVisibleRow when table didn't filled (from up) whole viewport space\n if (rootElementOffset.top + totalTableHeight - windowHeight <= windowScrollTop) {\n var rowsHeight = wtViewport.getColumnHeaderHeight();\n rowsHeight += topOverlay.sumCellSizes(0, fixedRowsTop);\n for (var row = totalRows; row > 0; row--) {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n if (rootElementOffset.top + totalTableHeight - rowsHeight <= windowScrollTop) {\n // Return physical row + 1\n firstVisibleRow = row;\n break;\n }\n }\n }\n }\n return firstVisibleRow;\n }\n\n /**\n * Get last visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getLastVisibleRow\",\n value: function getLastVisibleRow() {\n var _this$dataAccessObjec6 = this.dataAccessObject,\n topOverlay = _this$dataAccessObjec6.topOverlay,\n wtTable = _this$dataAccessObjec6.wtTable,\n wtViewport = _this$dataAccessObjec6.wtViewport,\n totalRows = _this$dataAccessObjec6.totalRows,\n rootWindow = _this$dataAccessObjec6.rootWindow;\n var lastVisibleRow = wtTable.getLastVisibleRow();\n if (topOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var windowScrollTop = getScrollTop(rootWindow, rootWindow);\n\n // Only calculate lastVisibleRow when table didn't filled (from bottom) whole viewport space\n if (rootElementOffset.top > windowScrollTop) {\n var windowHeight = innerHeight(rootWindow);\n var rowsHeight = wtViewport.getColumnHeaderHeight();\n for (var row = 1; row <= totalRows; row++) {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n if (rootElementOffset.top + rowsHeight - windowScrollTop >= windowHeight) {\n // Return physical row - 1 (-2 because rangeEach gives row index + 1 - sumCellSizes requirements)\n lastVisibleRow = row - 2;\n break;\n }\n }\n }\n }\n return lastVisibleRow;\n }\n\n /**\n * Get first visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getFirstVisibleColumn\",\n value: function getFirstVisibleColumn() {\n var _this$dataAccessObjec7 = this.dataAccessObject,\n inlineStartOverlay = _this$dataAccessObjec7.inlineStartOverlay,\n wtTable = _this$dataAccessObjec7.wtTable,\n wtViewport = _this$dataAccessObjec7.wtViewport,\n totalColumns = _this$dataAccessObjec7.totalColumns,\n rootWindow = _this$dataAccessObjec7.rootWindow;\n var firstVisibleColumn = wtTable.getFirstVisibleColumn();\n if (inlineStartOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var totalTableWidth = innerWidth(wtTable.hider);\n var windowWidth = innerWidth(rootWindow);\n var windowScrollLeft = Math.abs(getScrollLeft(rootWindow, rootWindow));\n\n // Only calculate firstVisibleColumn when table didn't filled (from left) whole viewport space\n if (rootElementOffset.left + totalTableWidth - windowWidth <= windowScrollLeft) {\n var columnsWidth = wtViewport.getRowHeaderWidth();\n for (var column = totalColumns; column > 0; column--) {\n columnsWidth += inlineStartOverlay.sumCellSizes(column - 1, column);\n if (rootElementOffset.left + totalTableWidth - columnsWidth <= windowScrollLeft) {\n // Return physical column + 1\n firstVisibleColumn = column;\n break;\n }\n }\n }\n }\n return firstVisibleColumn;\n }\n\n /**\n * Get last visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getLastVisibleColumn\",\n value: function getLastVisibleColumn() {\n var _this$dataAccessObjec8 = this.dataAccessObject,\n wtSettings = _this$dataAccessObjec8.wtSettings,\n inlineStartOverlay = _this$dataAccessObjec8.inlineStartOverlay,\n wtTable = _this$dataAccessObjec8.wtTable,\n wtViewport = _this$dataAccessObjec8.wtViewport,\n totalColumns = _this$dataAccessObjec8.totalColumns,\n rootWindow = _this$dataAccessObjec8.rootWindow;\n var lastVisibleColumn = wtTable.getLastVisibleColumn();\n if (inlineStartOverlay.mainTableScrollableElement === rootWindow) {\n var isRtl = wtSettings.getSetting('rtlMode');\n var inlineStartRootElementOffset = null;\n if (isRtl) {\n var tableRect = wtTable.TABLE.getBoundingClientRect();\n var rootDocument = this.dataAccessObject.rootWindow.document;\n var docOffsetWidth = rootDocument.documentElement.offsetWidth;\n inlineStartRootElementOffset = Math.abs(tableRect.right - docOffsetWidth);\n } else {\n var rootElementOffset = offset(wtTable.wtRootElement);\n inlineStartRootElementOffset = rootElementOffset.left;\n }\n var windowScrollLeft = Math.abs(getScrollLeft(rootWindow, rootWindow));\n\n // Only calculate lastVisibleColumn when table didn't filled (from right) whole viewport space\n if (inlineStartRootElementOffset > windowScrollLeft) {\n var windowWidth = innerWidth(rootWindow);\n var columnsWidth = wtViewport.getRowHeaderWidth();\n for (var column = 1; column <= totalColumns; column++) {\n columnsWidth += inlineStartOverlay.sumCellSizes(column - 1, column);\n if (inlineStartRootElementOffset + columnsWidth - windowScrollLeft >= windowWidth) {\n // Return physical column - 1 (-2 because rangeEach gives column index + 1 - sumCellSizes requirements)\n lastVisibleColumn = column - 2;\n break;\n }\n }\n }\n }\n return lastVisibleColumn;\n }\n }]);\n return Scroll;\n}();\nexport default Scroll;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nvar _isRtl = /*#__PURE__*/new WeakMap();\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @description\n *\n * The `CellCoords` class holds the coordinates (`row`, `col`) of a single cell.\n *\n * It also contains methods for validating the coordinates\n * and retrieving them as an object.\n *\n * To import the `CellCoords` class:\n *\n * ```js\n * import Handsontable, { CellCoords } from '/handsontable';\n *\n * // or, using modules\n * import Handsontable, { CellCoords } from '/handsontable/base';\n * ```\n */\nvar CellCoords = /*#__PURE__*/function () {\n function CellCoords(row, column) {\n var isRtl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n _classCallCheck(this, CellCoords);\n /**\n * A visual row index.\n *\n * @type {number}\n */\n _defineProperty(this, \"row\", null);\n /**\n * A visual column index.\n *\n * @type {number}\n */\n _defineProperty(this, \"col\", null);\n /**\n * @type {boolean}\n */\n _classPrivateFieldInitSpec(this, _isRtl, {\n writable: true,\n value: false\n });\n _classPrivateFieldSet(this, _isRtl, isRtl);\n if (typeof row !== 'undefined' && typeof column !== 'undefined') {\n this.row = row;\n this.col = column;\n }\n }\n\n /**\n * Checks if the coordinates in your `CellCoords` instance are valid\n * in the context of a given Walkontable instance.\n *\n * The `row` index:\n * - Can't be negative.\n * - Can't be higher than the total number of rows in the Walkontable instance.\n *\n * The `col` index:\n * - Can't be negative.\n * - Can't be higher than the total number of columns in the Walkontable instance.\n *\n * @param {Walkontable} wot A Walkontable instance.\n * @returns {boolean} `true`: The coordinates are valid.\n */\n _createClass(CellCoords, [{\n key: \"isValid\",\n value: function isValid(wot) {\n // check if the row and column indexes are valid (0 or higher)\n if (this.row < 0 || this.col < 0) {\n return false;\n }\n // check if the selection fits in the total of rows and columns\n if (this.row >= wot.getSetting('totalRows') || this.col >= wot.getSetting('totalColumns')) {\n return false;\n }\n return true;\n }\n\n /**\n * Checks if another set of coordinates (`cellCoords`)\n * is equal to the coordinates in your `CellCoords` instance.\n *\n * @param {CellCoords} cellCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"isEqual\",\n value: function isEqual(cellCoords) {\n if (cellCoords === this) {\n return true;\n }\n return this.row === cellCoords.row && this.col === cellCoords.col;\n }\n\n /**\n * Checks if another set of coordinates (`testedCoords`)\n * is south-east of the coordinates in your `CellCoords` instance.\n *\n * @param {CellCoords} testedCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"isSouthEastOf\",\n value: function isSouthEastOf(testedCoords) {\n return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);\n }\n\n /**\n * Checks if another set of coordinates (`testedCoords`)\n * is north-west of the coordinates in your `CellCoords` instance.\n *\n * @param {CellCoords} testedCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"isNorthWestOf\",\n value: function isNorthWestOf(testedCoords) {\n return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);\n }\n\n /**\n * Checks if another set of coordinates (`testedCoords`)\n * is south-west of the coordinates in your `CellCoords` instance.\n *\n * @param {CellCoords} testedCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"isSouthWestOf\",\n value: function isSouthWestOf(testedCoords) {\n return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);\n }\n\n /**\n * Checks if another set of coordinates (`testedCoords`)\n * is north-east of the coordinates in your `CellCoords` instance.\n *\n * @param {CellCoords} testedCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"isNorthEastOf\",\n value: function isNorthEastOf(testedCoords) {\n return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);\n }\n\n /**\n * Normalizes the coordinates in your `CellCoords` instance to the nearest valid position.\n *\n * Coordinates that point to headers (negative values) are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"normalize\",\n value: function normalize() {\n this.row = this.row === null ? this.row : Math.max(this.row, 0);\n this.col = this.col === null ? this.col : Math.max(this.col, 0);\n return this;\n }\n\n /**\n * Clones your `CellCoords` instance.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"clone\",\n value: function clone() {\n return new CellCoords(this.row, this.col, _classPrivateFieldGet(this, _isRtl));\n }\n\n /**\n * Converts your `CellCoords` instance into an object literal with `row` and `col` properties.\n *\n * @returns {{row: number, col: number}} An object literal with `row` and `col` properties.\n */\n }, {\n key: \"toObject\",\n value: function toObject() {\n return {\n row: this.row,\n col: this.col\n };\n }\n }]);\n return CellCoords;\n}();\nexport default CellCoords;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nimport CellCoords from \"./../cell/coords.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @description\n *\n * The `CellRange` class holds a set of cell coordinates ([`CellCoords`](@/api/cellCoords.md) instances)\n * that form a [selection range](@/guides/cell-features/selection.md#select-ranges).\n *\n * A single `CellRange` instance represents a single unit of selection\n * that contains either a single cell or multiple adjacent cells.\n *\n * To import the `CellRange` class:\n *\n * ```js\n * import Handsontable, { CellRange } from '/handsontable';\n *\n * // or, using modules\n * import Handsontable, { CellRange } from '/handsontable/base';\n * ```\n */\nvar _isRtl = /*#__PURE__*/new WeakMap();\nvar CellRange = /*#__PURE__*/function () {\n function CellRange(highlight) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;\n var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;\n var isRtl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n _classCallCheck(this, CellRange);\n /**\n * Used to draw bold border around a cell where selection was started and to edit the cell\n * when you press Enter. The highlight cannot point to headers (negative values) so its\n * coordinates object is normalized while assigning.\n *\n * @private\n * @type {CellCoords}\n */\n _defineProperty(this, \"highlight\", null);\n /**\n * Usually the same as highlight, but in Excel there is distinction - one can change\n * highlight within a selection.\n *\n * @private\n * @type {CellCoords}\n */\n _defineProperty(this, \"from\", null);\n /**\n * End selection.\n *\n * @private\n * @type {CellCoords}\n */\n _defineProperty(this, \"to\", null);\n /**\n * @type {boolean}\n */\n _classPrivateFieldInitSpec(this, _isRtl, {\n writable: true,\n value: false\n });\n this.highlight = highlight.clone().normalize();\n this.from = from.clone();\n this.to = to.clone();\n _classPrivateFieldSet(this, _isRtl, isRtl);\n }\n\n /**\n * Highlights cell selection at the `coords` coordinates.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n _createClass(CellRange, [{\n key: \"setHighlight\",\n value: function setHighlight(coords) {\n this.highlight = coords.clone().normalize();\n return this;\n }\n\n /**\n * Sets the `coords` coordinates as the start of your range.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n }, {\n key: \"setFrom\",\n value: function setFrom(coords) {\n this.from = coords.clone();\n return this;\n }\n\n /**\n * Sets the `coords` coordinates as the end of your range.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n }, {\n key: \"setTo\",\n value: function setTo(coords) {\n this.to = coords.clone();\n return this;\n }\n\n /**\n * Checks if the coordinates in your `CellRange` instance are valid\n * in the context of a given Walkontable instance.\n *\n * See the [`isValid()`](@/api/cellCoords.md#isvalid) method of the [`CellCoords`](@/api/cellCoords.md) class.\n *\n * @param {Walkontable} wot A Walkontable instance.\n * @returns {boolean}\n */\n }, {\n key: \"isValid\",\n value: function isValid(wot) {\n return this.from.isValid(wot) && this.to.isValid(wot);\n }\n\n /**\n * Checks if your range is just a single cell.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isSingle\",\n value: function isSingle() {\n return this.from.row >= 0 && this.from.row === this.to.row && this.from.col >= 0 && this.from.col === this.to.col;\n }\n\n /**\n * Returns the height of your range (as a number of rows, including row headers).\n *\n * @returns {number}\n */\n }, {\n key: \"getOuterHeight\",\n value: function getOuterHeight() {\n return Math.max(this.from.row, this.to.row) - Math.min(this.from.row, this.to.row) + 1;\n }\n\n /**\n * Returns the width of your range (as a number of columns, including column headers).\n *\n * @returns {number}\n */\n }, {\n key: \"getOuterWidth\",\n value: function getOuterWidth() {\n return Math.max(this.from.col, this.to.col) - Math.min(this.from.col, this.to.col) + 1;\n }\n\n /**\n * Returns the height of your range (as a number of rows, excluding row headers).\n *\n * @returns {number}\n */\n }, {\n key: \"getHeight\",\n value: function getHeight() {\n // if the selection contains only row headers, return 0\n if (this.from.row < 0 && this.to.row < 0) {\n return 0;\n }\n var fromRow = Math.max(this.from.row, 0);\n var toRow = Math.max(this.to.row, 0);\n return Math.max(fromRow, toRow) - Math.min(fromRow, toRow) + 1;\n }\n\n /**\n * Returns the width of your range (as a number of columns, excluding column headers).\n *\n * @returns {number}\n */\n }, {\n key: \"getWidth\",\n value: function getWidth() {\n // if the selection contains only column headers, return 0\n if (this.from.col < 0 && this.to.col < 0) {\n return 0;\n }\n var fromCol = Math.max(this.from.col, 0);\n var toCol = Math.max(this.to.col, 0);\n return Math.max(fromCol, toCol) - Math.min(fromCol, toCol) + 1;\n }\n\n /**\n * Returns the number of cells within your range (excluding column and row headers).\n *\n * @returns {number}\n */\n }, {\n key: \"getCellsCount\",\n value: function getCellsCount() {\n return this.getWidth() * this.getHeight();\n }\n\n /**\n * Checks if another set of coordinates (`cellCoords`)\n * is within the `from` and `to` coordinates of your range.\n *\n * @param {CellCoords} cellCoords Coordinates to check.\n * @returns {boolean}\n */\n }, {\n key: \"includes\",\n value: function includes(cellCoords) {\n var row = cellCoords.row,\n col = cellCoords.col;\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n return topStart.row <= row && bottomEnd.row >= row && topStart.col <= col && bottomEnd.col >= col;\n }\n\n /**\n * Checks if another range (`cellRange`) is within your range.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"includesRange\",\n value: function includesRange(cellRange) {\n return this.includes(cellRange.getOuterTopStartCorner()) && this.includes(cellRange.getOuterBottomEndCorner());\n }\n\n /**\n * Checks if another range (`cellRange`) is equal to your range.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"isEqual\",\n value: function isEqual(cellRange) {\n return Math.min(this.from.row, this.to.row) === Math.min(cellRange.from.row, cellRange.to.row) && Math.max(this.from.row, this.to.row) === Math.max(cellRange.from.row, cellRange.to.row) && Math.min(this.from.col, this.to.col) === Math.min(cellRange.from.col, cellRange.to.col) && Math.max(this.from.col, this.to.col) === Math.max(cellRange.from.col, cellRange.to.col);\n }\n\n /**\n * Checks if another range (`cellRange`) overlaps your range.\n *\n * Range A overlaps range B if the intersection of A and B (or B and A) is not empty.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"overlaps\",\n value: function overlaps(cellRange) {\n return cellRange.isSouthEastOf(this.getOuterTopLeftCorner()) && cellRange.isNorthWestOf(this.getOuterBottomRightCorner());\n }\n\n /**\n * Checks if another range (`cellRange`) is south-east of your range.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"isSouthEastOf\",\n value: function isSouthEastOf(cellRange) {\n return this.getOuterTopLeftCorner().isSouthEastOf(cellRange) || this.getOuterBottomRightCorner().isSouthEastOf(cellRange);\n }\n\n /**\n * Checks if another range (`cellRange`) is north-west of your range.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"isNorthWestOf\",\n value: function isNorthWestOf(cellRange) {\n return this.getOuterTopLeftCorner().isNorthWestOf(cellRange) || this.getOuterBottomRightCorner().isNorthWestOf(cellRange);\n }\n\n /**\n * Checks if another range (`cellRange`) overlaps your range horizontally.\n *\n * For example: returns `true` if the last column of your range is `5`\n * and the first column of the `cellRange` range is `3`.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"isOverlappingHorizontally\",\n value: function isOverlappingHorizontally(cellRange) {\n return this.getOuterTopRightCorner().col >= cellRange.getOuterTopLeftCorner().col && this.getOuterTopRightCorner().col <= cellRange.getOuterTopRightCorner().col || this.getOuterTopLeftCorner().col <= cellRange.getOuterTopRightCorner().col && this.getOuterTopLeftCorner().col >= cellRange.getOuterTopLeftCorner().col;\n }\n\n /**\n * Checks if another range (`cellRange`) overlaps your range vertically.\n *\n * For example: returns `true` if the last row of your range is `5`\n * and the first row of the `cellRange` range is `3`.\n *\n * @param {CellRange} cellRange A range to check.\n * @returns {boolean}\n */\n }, {\n key: \"isOverlappingVertically\",\n value: function isOverlappingVertically(cellRange) {\n return this.getOuterBottomRightCorner().row >= cellRange.getOuterTopRightCorner().row && this.getOuterBottomRightCorner().row <= cellRange.getOuterBottomRightCorner().row || this.getOuterTopRightCorner().row <= cellRange.getOuterBottomRightCorner().row && this.getOuterTopRightCorner().row >= cellRange.getOuterTopRightCorner().row;\n }\n\n /**\n * Adds a cell to your range, at `cellCoords` coordinates.\n *\n * The `cellCoords` coordinates must exceed a corner of your range.\n *\n * @param {CellCoords} cellCoords A new cell's coordinates.\n * @returns {boolean}\n */\n }, {\n key: \"expand\",\n value: function expand(cellCoords) {\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n if (cellCoords.row < topStart.row || cellCoords.col < topStart.col || cellCoords.row > bottomEnd.row || cellCoords.col > bottomEnd.col) {\n this.from = this._createCellCoords(Math.min(topStart.row, cellCoords.row), Math.min(topStart.col, cellCoords.col));\n this.to = this._createCellCoords(Math.max(bottomEnd.row, cellCoords.row), Math.max(bottomEnd.col, cellCoords.col));\n return true;\n }\n return false;\n }\n\n /**\n * Expand your range with another range (`expandingRange`).\n *\n * @param {CellRange} expandingRange A new range.\n * @returns {boolean}\n */\n }, {\n key: \"expandByRange\",\n value: function expandByRange(expandingRange) {\n if (this.includesRange(expandingRange) || !this.overlaps(expandingRange)) {\n return false;\n }\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n var initialDirection = this.getDirection();\n var expandingTopStart = expandingRange.getOuterTopStartCorner();\n var expandingBottomEnd = expandingRange.getOuterBottomEndCorner();\n var resultTopRow = Math.min(topStart.row, expandingTopStart.row);\n var resultTopCol = Math.min(topStart.col, expandingTopStart.col);\n var resultBottomRow = Math.max(bottomEnd.row, expandingBottomEnd.row);\n var resultBottomCol = Math.max(bottomEnd.col, expandingBottomEnd.col);\n var finalFrom = this._createCellCoords(resultTopRow, resultTopCol);\n var finalTo = this._createCellCoords(resultBottomRow, resultBottomCol);\n this.from = finalFrom;\n this.to = finalTo;\n this.setDirection(initialDirection);\n if (this.highlight.row === this.getOuterBottomRightCorner().row && this.getVerticalDirection() === 'N-S') {\n this.flipDirectionVertically();\n }\n if (this.highlight.col === this.getOuterTopRightCorner().col && this.getHorizontalDirection() === 'W-E') {\n this.flipDirectionHorizontally();\n }\n return true;\n }\n\n /**\n * Gets the direction of the selection.\n *\n * @returns {string} Returns one of the values: `'NW-SE'`, `'NE-SW'`, `'SE-NW'`, `'SW-NE'`.\n */\n }, {\n key: \"getDirection\",\n value: function getDirection() {\n if (this.from.isNorthWestOf(this.to)) {\n // NorthWest - SouthEast\n return 'NW-SE';\n } else if (this.from.isNorthEastOf(this.to)) {\n // NorthEast - SouthWest\n return 'NE-SW';\n } else if (this.from.isSouthEastOf(this.to)) {\n // SouthEast - NorthWest\n return 'SE-NW';\n } else if (this.from.isSouthWestOf(this.to)) {\n // SouthWest - NorthEast\n return 'SW-NE';\n }\n }\n\n /**\n * Sets the direction of the selection.\n *\n * @param {string} direction One of the values: `'NW-SE'`, `'NE-SW'`, `'SE-NW'`, `'SW-NE'`.\n */\n }, {\n key: \"setDirection\",\n value: function setDirection(direction) {\n switch (direction) {\n case 'NW-SE':\n var _ref = [this.getOuterTopLeftCorner(), this.getOuterBottomRightCorner()];\n this.from = _ref[0];\n this.to = _ref[1];\n break;\n case 'NE-SW':\n var _ref2 = [this.getOuterTopRightCorner(), this.getOuterBottomLeftCorner()];\n this.from = _ref2[0];\n this.to = _ref2[1];\n break;\n case 'SE-NW':\n var _ref3 = [this.getOuterBottomRightCorner(), this.getOuterTopLeftCorner()];\n this.from = _ref3[0];\n this.to = _ref3[1];\n break;\n case 'SW-NE':\n var _ref4 = [this.getOuterBottomLeftCorner(), this.getOuterTopRightCorner()];\n this.from = _ref4[0];\n this.to = _ref4[1];\n break;\n default:\n break;\n }\n }\n\n /**\n * Gets the vertical direction of the selection.\n *\n * @returns {string} Returns one of the values: `N-S` (north->south), `S-N` (south->north).\n */\n }, {\n key: \"getVerticalDirection\",\n value: function getVerticalDirection() {\n return ['NE-SW', 'NW-SE'].indexOf(this.getDirection()) > -1 ? 'N-S' : 'S-N';\n }\n\n /**\n * Gets the horizontal direction of the selection.\n *\n * @returns {string} Returns one of the values: `W-E` (west->east), `E-W` (east->west).\n */\n }, {\n key: \"getHorizontalDirection\",\n value: function getHorizontalDirection() {\n return ['NW-SE', 'SW-NE'].indexOf(this.getDirection()) > -1 ? 'W-E' : 'E-W';\n }\n\n /**\n * Flips the direction of your range vertically (e.g., `NW-SE` changes to `SW-NE`).\n */\n }, {\n key: \"flipDirectionVertically\",\n value: function flipDirectionVertically() {\n var direction = this.getDirection();\n switch (direction) {\n case 'NW-SE':\n this.setDirection('SW-NE');\n break;\n case 'NE-SW':\n this.setDirection('SE-NW');\n break;\n case 'SE-NW':\n this.setDirection('NE-SW');\n break;\n case 'SW-NE':\n this.setDirection('NW-SE');\n break;\n default:\n break;\n }\n }\n\n /**\n * Flips the direction of your range horizontally (e.g., `NW-SE` changes to `NE-SW`).\n */\n }, {\n key: \"flipDirectionHorizontally\",\n value: function flipDirectionHorizontally() {\n var direction = this.getDirection();\n switch (direction) {\n case 'NW-SE':\n this.setDirection('NE-SW');\n break;\n case 'NE-SW':\n this.setDirection('NW-SE');\n break;\n case 'SE-NW':\n this.setDirection('SW-NE');\n break;\n case 'SW-NE':\n this.setDirection('SE-NW');\n break;\n default:\n break;\n }\n }\n\n /**\n * Gets the top-left (in LTR) or top-right (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getTopStartCorner\",\n value: function getTopStartCorner() {\n return this._createCellCoords(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col)).normalize();\n }\n\n /**\n * Gets the top-left corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getTopLeftCorner\",\n value: function getTopLeftCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getTopEndCorner() : this.getTopStartCorner();\n }\n\n /**\n * Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getBottomEndCorner\",\n value: function getBottomEndCorner() {\n return this._createCellCoords(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col)).normalize();\n }\n\n /**\n * Gets the bottom right corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getBottomRightCorner\",\n value: function getBottomRightCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getBottomStartCorner() : this.getBottomEndCorner();\n }\n\n /**\n * Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getTopEndCorner\",\n value: function getTopEndCorner() {\n return this._createCellCoords(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col)).normalize();\n }\n\n /**\n * Gets the top right corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getTopRightCorner\",\n value: function getTopRightCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getTopStartCorner() : this.getTopEndCorner();\n }\n\n /**\n * Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getBottomStartCorner\",\n value: function getBottomStartCorner() {\n return this._createCellCoords(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col)).normalize();\n }\n\n /**\n * Gets the bottom left corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the corner coordinates are normalized to `0`.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getBottomLeftCorner\",\n value: function getBottomLeftCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getBottomEndCorner() : this.getBottomStartCorner();\n }\n\n /**\n * Gets the top left (in LTR) or top right (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the top and start coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterTopStartCorner\",\n value: function getOuterTopStartCorner() {\n return this._createCellCoords(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n\n /**\n * Gets the top left corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the top and left coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterTopLeftCorner\",\n value: function getOuterTopLeftCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopEndCorner() : this.getOuterTopStartCorner();\n }\n\n /**\n * Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the top and start coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterBottomEndCorner\",\n value: function getOuterBottomEndCorner() {\n return this._createCellCoords(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n\n /**\n * Gets the bottom right corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the top and left coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterBottomRightCorner\",\n value: function getOuterBottomRightCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomStartCorner() : this.getOuterBottomEndCorner();\n }\n\n /**\n * Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the top and start coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterTopEndCorner\",\n value: function getOuterTopEndCorner() {\n return this._createCellCoords(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n\n /**\n * Gets the top right corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the top and left coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterTopRightCorner\",\n value: function getOuterTopRightCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopStartCorner() : this.getOuterTopEndCorner();\n }\n\n /**\n * Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.\n *\n * If the corner contains header coordinates (negative values),\n * the top and start coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterBottomStartCorner\",\n value: function getOuterBottomStartCorner() {\n return this._createCellCoords(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n\n /**\n * Gets the bottom left corner coordinates of your range,\n * both in the LTR and RTL layout direction.\n *\n * If the corner contains header coordinates (negative values),\n * the top and left coordinates are pointed to that header.\n *\n * @returns {CellCoords}\n */\n }, {\n key: \"getOuterBottomLeftCorner\",\n value: function getOuterBottomLeftCorner() {\n return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomEndCorner() : this.getOuterBottomStartCorner();\n }\n\n /**\n * Checks if a set of coordinates (`coords`) matches one of the 4 corners of your range.\n *\n * @param {CellCoords} coords Coordinates to check.\n * @param {CellRange} [expandedRange] A range to compare with.\n * @returns {boolean}\n */\n }, {\n key: \"isCorner\",\n value: function isCorner(coords, expandedRange) {\n if (expandedRange && expandedRange.includes(coords) && (this.getOuterTopLeftCorner().isEqual(this._createCellCoords(expandedRange.from.row, expandedRange.from.col)) || this.getOuterTopRightCorner().isEqual(this._createCellCoords(expandedRange.from.row, expandedRange.to.col)) || this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(expandedRange.to.row, expandedRange.from.col)) || this.getOuterBottomRightCorner().isEqual(this._createCellCoords(expandedRange.to.row, expandedRange.to.col)))) {\n return true;\n }\n return coords.isEqual(this.getOuterTopLeftCorner()) || coords.isEqual(this.getOuterTopRightCorner()) || coords.isEqual(this.getOuterBottomLeftCorner()) || coords.isEqual(this.getOuterBottomRightCorner());\n }\n\n /**\n * Gets the coordinates of a range corner opposite to the provided `coords`.\n *\n * For example: if the `coords` coordinates match the bottom-right corner of your range,\n * the coordinates of the top-left corner of your range are returned.\n *\n * @param {CellCoords} coords Coordinates to check.\n * @param {CellRange} [expandedRange] A range to compare with.\n * @returns {CellCoords}\n */\n }, {\n key: \"getOppositeCorner\",\n value: function getOppositeCorner(coords, expandedRange) {\n if (!(coords instanceof CellCoords)) {\n return false;\n }\n if (expandedRange) {\n var from = expandedRange.from,\n to = expandedRange.to;\n if (expandedRange.includes(coords)) {\n if (this.getOuterTopStartCorner().isEqual(this._createCellCoords(from.row, from.col))) {\n return this.getOuterBottomEndCorner();\n }\n if (this.getOuterTopEndCorner().isEqual(this._createCellCoords(from.row, to.col))) {\n return this.getOuterBottomStartCorner();\n }\n if (this.getOuterBottomStartCorner().isEqual(this._createCellCoords(to.row, from.col))) {\n return this.getOuterTopEndCorner();\n }\n if (this.getOuterBottomEndCorner().isEqual(this._createCellCoords(to.row, to.col))) {\n return this.getOuterTopStartCorner();\n }\n }\n }\n if (coords.isEqual(this.getOuterBottomEndCorner())) {\n return this.getOuterTopStartCorner();\n } else if (coords.isEqual(this.getOuterTopStartCorner())) {\n return this.getOuterBottomEndCorner();\n } else if (coords.isEqual(this.getOuterTopEndCorner())) {\n return this.getOuterBottomStartCorner();\n } else if (coords.isEqual(this.getOuterBottomStartCorner())) {\n return this.getOuterTopEndCorner();\n }\n }\n\n /**\n * Indicates which borders (top, right, bottom, left) are shared between\n * your `CellRange`instance and another `range` that's within your range.\n *\n * @param {CellRange} range A range to compare with.\n * @returns {Array<'top' | 'right' | 'bottom' | 'left'>}\n */\n }, {\n key: \"getBordersSharedWith\",\n value: function getBordersSharedWith(range) {\n if (!this.includesRange(range)) {\n return [];\n }\n var thisBorders = {\n top: Math.min(this.from.row, this.to.row),\n bottom: Math.max(this.from.row, this.to.row),\n left: Math.min(this.from.col, this.to.col),\n right: Math.max(this.from.col, this.to.col)\n };\n var rangeBorders = {\n top: Math.min(range.from.row, range.to.row),\n bottom: Math.max(range.from.row, range.to.row),\n left: Math.min(range.from.col, range.to.col),\n right: Math.max(range.from.col, range.to.col)\n };\n var result = [];\n if (thisBorders.top === rangeBorders.top) {\n result.push('top');\n }\n if (thisBorders.right === rangeBorders.right) {\n result.push('right');\n }\n if (thisBorders.bottom === rangeBorders.bottom) {\n result.push('bottom');\n }\n if (thisBorders.left === rangeBorders.left) {\n result.push('left');\n }\n return result;\n }\n\n /**\n * Gets the coordinates of the inner cells of your range.\n *\n * @returns {CellCoords[]}\n */\n }, {\n key: \"getInner\",\n value: function getInner() {\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n var out = [];\n for (var r = topStart.row; r <= bottomEnd.row; r++) {\n for (var c = topStart.col; c <= bottomEnd.col; c++) {\n if (!(this.from.row === r && this.from.col === c) && !(this.to.row === r && this.to.col === c)) {\n out.push(this._createCellCoords(r, c));\n }\n }\n }\n return out;\n }\n\n /**\n * Gets the coordinates of all cells of your range.\n *\n * @returns {CellCoords[]}\n */\n }, {\n key: \"getAll\",\n value: function getAll() {\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n var out = [];\n for (var r = topStart.row; r <= bottomEnd.row; r++) {\n for (var c = topStart.col; c <= bottomEnd.col; c++) {\n if (topStart.row === r && topStart.col === c) {\n out.push(topStart);\n } else if (bottomEnd.row === r && bottomEnd.col === c) {\n out.push(bottomEnd);\n } else {\n out.push(this._createCellCoords(r, c));\n }\n }\n }\n return out;\n }\n\n /**\n * Runs a callback function on all cells within your range.\n *\n * You can break the iteration by returning `false` in the callback function.\n *\n * @param {function(number, number): boolean} callback A callback function.\n */\n }, {\n key: \"forAll\",\n value: function forAll(callback) {\n var topStart = this.getOuterTopStartCorner();\n var bottomEnd = this.getOuterBottomEndCorner();\n for (var r = topStart.row; r <= bottomEnd.row; r++) {\n for (var c = topStart.col; c <= bottomEnd.col; c++) {\n var breakIteration = callback(r, c);\n if (breakIteration === false) {\n return;\n }\n }\n }\n }\n\n /**\n * Clones your `CellRange` instance.\n *\n * @returns {CellRange}\n */\n }, {\n key: \"clone\",\n value: function clone() {\n return new CellRange(this.highlight, this.from, this.to, _classPrivateFieldGet(this, _isRtl));\n }\n\n /**\n * Converts your `CellRange` instance into an object literal with the following properties:\n *\n * - `from`\n * - `row`\n * - `col`\n * - `to`\n * - `row`\n * - `col`\n *\n * @returns {{from: {row: number, col: number}, to: {row: number, col: number}}} An object literal with `from` and `to` properties.\n */\n }, {\n key: \"toObject\",\n value: function toObject() {\n return {\n from: this.from.toObject(),\n to: this.to.toObject()\n };\n }\n\n /**\n * Creates and returns a new instance of the `CellCoords` class.\n *\n * The new `CellCoords` instance automatically inherits the LTR/RTL flag\n * from your `CellRange` instance.\n *\n * @private\n * @param {number} row A row index.\n * @param {number} column A column index.\n * @returns {CellCoords}\n */\n }, {\n key: \"_createCellCoords\",\n value: function _createCellCoords(row, column) {\n return new CellCoords(row, column, _classPrivateFieldGet(this, _isRtl));\n }\n }]);\n return CellRange;\n}();\nexport default CellRange;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { fastInnerText } from \"../../../../helpers/dom/element.mjs\";\nimport { randomString } from \"../../../../helpers/string.mjs\";\nimport EventManager from \"../../../../eventManager.mjs\";\nimport Scroll from \"../scroll.mjs\";\nimport CellCoords from \"../cell/coords.mjs\";\nimport CellRange from \"../cell/range.mjs\";\n/**\n * @abstract\n * @class Walkontable\n */\nvar CoreAbstract = /*#__PURE__*/function () {\n /**\n * @param {HTMLTableElement} table Main table.\n * @param {Settings} settings The Walkontable settings.\n */\n function CoreAbstract(table, settings) {\n _classCallCheck(this, CoreAbstract);\n _defineProperty(this, \"wtTable\", void 0);\n _defineProperty(this, \"wtScroll\", void 0);\n _defineProperty(this, \"wtViewport\", void 0);\n _defineProperty(this, \"wtOverlays\", void 0);\n _defineProperty(this, \"selections\", void 0);\n _defineProperty(this, \"wtEvent\", void 0);\n /**\n * The walkontable instance id.\n *\n * @public\n * @type {Readonly}\n */\n _defineProperty(this, \"guid\", \"wt_\".concat(randomString()));\n _defineProperty(this, \"drawInterrupted\", false);\n _defineProperty(this, \"drawn\", false);\n /**\n * The DOM bindings.\n *\n * @public\n * @type {DomBindings}\n */\n _defineProperty(this, \"domBindings\", void 0);\n /**\n * Settings.\n *\n * @public\n * @type {Settings}\n */\n _defineProperty(this, \"wtSettings\", void 0);\n this.domBindings = {\n rootTable: table,\n rootDocument: table.ownerDocument,\n rootWindow: table.ownerDocument.defaultView\n };\n this.wtSettings = settings;\n this.wtScroll = new Scroll(this.createScrollDao());\n }\n _createClass(CoreAbstract, [{\n key: \"eventManager\",\n get: function get() {\n return new EventManager(this);\n }\n }, {\n key: \"findOriginalHeaders\",\n value: function findOriginalHeaders() {\n var originalHeaders = [];\n\n // find original headers\n if (this.wtTable.THEAD.childNodes.length && this.wtTable.THEAD.childNodes[0].childNodes.length) {\n for (var c = 0, clen = this.wtTable.THEAD.childNodes[0].childNodes.length; c < clen; c++) {\n originalHeaders.push(this.wtTable.THEAD.childNodes[0].childNodes[c].innerHTML);\n }\n if (!this.wtSettings.getSetting('columnHeaders').length) {\n this.wtSettings.update('columnHeaders', [function (column, TH) {\n fastInnerText(TH, originalHeaders[column]);\n }]);\n }\n }\n }\n\n /**\n * Creates and returns the CellCoords object.\n *\n * @param {*} row The row index.\n * @param {*} column The column index.\n * @returns {CellCoords}\n */\n }, {\n key: \"createCellCoords\",\n value: function createCellCoords(row, column) {\n return new CellCoords(row, column, this.wtSettings.getSetting('rtlMode'));\n }\n\n /**\n * Creates and returns the CellRange object.\n *\n * @param {CellCoords} highlight The highlight coordinates.\n * @param {CellCoords} from The from coordinates.\n * @param {CellCoords} to The to coordinates.\n * @returns {CellRange}\n */\n }, {\n key: \"createCellRange\",\n value: function createCellRange(highlight, from, to) {\n return new CellRange(highlight, from, to, this.wtSettings.getSetting('rtlMode'));\n }\n\n /**\n * Force rerender of Walkontable.\n *\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n * @returns {Walkontable}\n */\n }, {\n key: \"draw\",\n value: function draw() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.drawInterrupted = false;\n if (!fastDraw && !this.wtTable.isVisible()) {\n // draw interrupted because TABLE is not visible\n this.drawInterrupted = true;\n } else {\n this.wtTable.draw(fastDraw);\n }\n return this;\n }\n\n /**\n * Returns the TD at coords. If topmost is set to true, returns TD from the topmost overlay layer,\n * if not set or set to false, returns TD from the master table.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @param {boolean} [topmost=false] If set to `true`, it returns the TD element from the topmost overlay. For example,\n * if the wanted cell is in the range of fixed rows, it will return a TD element\n * from the top overlay.\n * @returns {HTMLElement}\n */\n }, {\n key: \"getCell\",\n value: function getCell(coords) {\n var topmost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!topmost) {\n return this.wtTable.getCell(coords);\n }\n var totalRows = this.wtSettings.getSetting('totalRows');\n var fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');\n var fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n var fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');\n if (coords.row < fixedRowsTop && coords.col < fixedColumnsStart) {\n return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(coords);\n } else if (coords.row < fixedRowsTop) {\n return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);\n } else if (coords.col < fixedColumnsStart && coords.row >= totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomInlineStartCornerOverlay && this.wtOverlays.bottomInlineStartCornerOverlay.clone) {\n return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(coords);\n }\n } else if (coords.col < fixedColumnsStart) {\n return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(coords);\n } else if (coords.row < totalRows && coords.row >= totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {\n return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);\n }\n }\n return this.wtTable.getCell(coords);\n }\n\n /**\n * Scrolls the viewport to a cell (rerenders if needed).\n *\n * @param {CellCoords} coords The cell coordinates to scroll to.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n if (coords.col < 0 || coords.row < 0) {\n return false;\n }\n return this.wtScroll.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n\n /**\n * Scrolls the viewport to a column (rerenders if needed).\n *\n * @param {number} column Visual column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n if (column < 0) {\n return false;\n }\n return this.wtScroll.scrollViewportHorizontally(column, snapToRight, snapToLeft);\n }\n\n /**\n * Scrolls the viewport to a row (rerenders if needed).\n *\n * @param {number} row Visual row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n if (row < 0) {\n return false;\n }\n return this.wtScroll.scrollViewportVertically(row, snapToTop, snapToBottom);\n }\n\n /**\n * @returns {Array}\n */\n }, {\n key: \"getViewport\",\n value: function getViewport() {\n return [this.wtTable.getFirstVisibleRow(), this.wtTable.getFirstVisibleColumn(), this.wtTable.getLastVisibleRow(), this.wtTable.getLastVisibleColumn()];\n }\n\n /**\n * Destroy instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.wtOverlays.destroy();\n this.wtEvent.destroy();\n }\n\n /**\n * Create data access object for scroll.\n *\n * @protected\n * @returns {ScrollDao}\n */\n }, {\n key: \"createScrollDao\",\n value: function createScrollDao() {\n var wot = this;\n return {\n get drawn() {\n return wot.drawn; // TODO refactoring: consider about injecting `isDrawn` function : ()=>return wot.drawn. (it'll enables remove dao layer)\n },\n\n get topOverlay() {\n return wot.wtOverlays.topOverlay; // TODO refactoring: move outside dao, use IOC\n },\n\n get inlineStartOverlay() {\n return wot.wtOverlays.inlineStartOverlay; // TODO refactoring: move outside dao, use IOC\n },\n\n get wtTable() {\n return wot.wtTable; // TODO refactoring: move outside dao, use IOC\n },\n\n get wtViewport() {\n return wot.wtViewport; // TODO refactoring: move outside dao, use IOC\n },\n\n get wtSettings() {\n return wot.wtSettings;\n },\n get rootWindow() {\n return wot.domBindings.rootWindow; // TODO refactoring: move outside dao\n },\n\n // TODO refactoring, consider about using injecting wtSettings into scroll (it'll enables remove dao layer)\n get totalRows() {\n return wot.wtSettings.getSetting('totalRows');\n },\n get totalColumns() {\n return wot.wtSettings.getSetting('totalColumns');\n },\n get fixedRowsTop() {\n return wot.wtSettings.getSetting('fixedRowsTop');\n },\n get fixedRowsBottom() {\n return wot.wtSettings.getSetting('fixedRowsBottom');\n },\n get fixedColumnsStart() {\n return wot.wtSettings.getSetting('fixedColumnsStart');\n }\n };\n }\n // TODO refactoring: it will be much better to not use DAO objects. They are needed for now to provide\n // dynamically access to related objects\n /**\n * Create data access object for wtTable.\n *\n * @protected\n * @returns {TableDao}\n */\n }, {\n key: \"getTableDao\",\n value: function getTableDao() {\n var wot = this;\n return {\n get wot() {\n return wot;\n },\n get parentTableOffset() {\n return wot.cloneSource.wtTable.tableOffset; // TODO rethink: cloneSource exists only in Clone type.\n },\n\n get cloneSource() {\n return wot.cloneSource; // TODO rethink: cloneSource exists only in Clone type.\n },\n\n get workspaceWidth() {\n return wot.wtViewport.getWorkspaceWidth();\n },\n get wtViewport() {\n return wot.wtViewport; // TODO refactoring: move outside dao, use IOC\n },\n\n get wtOverlays() {\n return wot.wtOverlays; // TODO refactoring: move outside dao, use IOC\n },\n\n get selections() {\n return wot.selections; // TODO refactoring: move outside dao, use IOC\n },\n\n get drawn() {\n return wot.drawn;\n },\n set drawn(v) {\n // TODO rethink: this breaks assumes of data access object, however it is required until invent better way to handle WOT state.\n wot.drawn = v;\n },\n get wtTable() {\n return wot.wtTable; // TODO refactoring: it provides itself\n },\n\n get startColumnRendered() {\n return wot.wtViewport.columnsRenderCalculator.startColumn;\n },\n get startColumnVisible() {\n return wot.wtViewport.columnsVisibleCalculator.startColumn;\n },\n get endColumnRendered() {\n return wot.wtViewport.columnsRenderCalculator.endColumn;\n },\n get endColumnVisible() {\n return wot.wtViewport.columnsVisibleCalculator.endColumn;\n },\n get countColumnsRendered() {\n return wot.wtViewport.columnsRenderCalculator.count;\n },\n get countColumnsVisible() {\n return wot.wtViewport.columnsVisibleCalculator.count;\n },\n get startRowRendered() {\n return wot.wtViewport.rowsRenderCalculator.startRow;\n },\n get startRowVisible() {\n return wot.wtViewport.rowsVisibleCalculator.startRow;\n },\n get endRowRendered() {\n return wot.wtViewport.rowsRenderCalculator.endRow;\n },\n get endRowVisible() {\n return wot.wtViewport.rowsVisibleCalculator.endRow;\n },\n get countRowsRendered() {\n return wot.wtViewport.rowsRenderCalculator.count;\n },\n get countRowsVisible() {\n return wot.wtViewport.rowsVisibleCalculator.count;\n }\n };\n }\n }]);\n return CoreAbstract;\n}();\nexport { CoreAbstract as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport Event from \"../event.mjs\";\nimport CoreAbstract from \"./_base.mjs\";\n/**\n * @class Walkontable\n */\nvar Clone = /*#__PURE__*/function (_CoreAbstract) {\n _inherits(Clone, _CoreAbstract);\n var _super = _createSuper(Clone);\n /**\n * @param {HTMLTableElement} table Main table.\n * @param {SettingsPure|Settings} settings The Walkontable settings.\n * @param {WalkontableCloneOptions} clone Clone data.\n */\n function Clone(table, settings, clone) {\n var _this;\n _classCallCheck(this, Clone);\n _this = _super.call(this, table, settings);\n _defineProperty(_assertThisInitialized(_this), \"cloneSource\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"cloneOverlay\", void 0);\n var facadeGetter = _this.wtSettings.getSetting('facade', _assertThisInitialized(_this));\n _this.cloneSource = clone.source;\n _this.cloneOverlay = clone.overlay;\n _this.wtTable = _this.cloneOverlay.createTable(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);\n _this.wtViewport = clone.viewport;\n _this.selections = clone.selections;\n _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections, clone.event);\n _this.findOriginalHeaders();\n return _this;\n }\n return _createClass(Clone);\n}(CoreAbstract);\nexport { Clone as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getScrollableElement, getTrimmingContainer, getScrollbarWidth } from \"../../../../helpers/dom/element.mjs\";\nimport { defineGetter } from \"../../../../helpers/object.mjs\";\nimport { arrayEach } from \"../../../../helpers/array.mjs\";\nimport { warn } from \"../../../../helpers/console.mjs\";\nimport { CLONE_TYPES, CLONE_CLASS_NAMES, CLONE_TOP, CLONE_INLINE_START } from \"./constants.mjs\";\nimport Clone from \"../core/clone.mjs\";\n/**\n * Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable\n * and (optionally) implements behavior needed for native horizontal and vertical scrolling.\n *\n * @abstract\n * @class Overlay\n * @property {Walkontable} wot The Walkontable instance.\n */\nexport var Overlay = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {CLONE_TYPES_ENUM} type The overlay type name (clone name).\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n */\n function Overlay(wotInstance, facadeGetter, type, wtSettings, domBindings) {\n _classCallCheck(this, Overlay);\n /**\n * The Walkontable settings.\n *\n * @private\n * @type {Settings}\n */\n _defineProperty(this, \"wtSettings\", null);\n defineGetter(this, 'wot', wotInstance, {\n writable: false\n });\n this.domBindings = domBindings;\n this.facadeGetter = facadeGetter;\n this.wtSettings = wtSettings;\n var _this$wot$wtTable = this.wot.wtTable,\n TABLE = _this$wot$wtTable.TABLE,\n hider = _this$wot$wtTable.hider,\n spreader = _this$wot$wtTable.spreader,\n holder = _this$wot$wtTable.holder,\n wtRootElement = _this$wot$wtTable.wtRootElement; // todo ioc\n\n // legacy support, deprecated in the future\n this.instance = this.wot;\n this.type = type;\n this.mainTableScrollableElement = null;\n this.TABLE = TABLE;\n this.hider = hider;\n this.spreader = spreader;\n this.holder = holder;\n this.wtRootElement = wtRootElement;\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n this.updateStateOfRendering();\n this.clone = this.makeClone();\n }\n\n /**\n * Update internal state of object with an information about the need of full rendering of the overlay.\n *\n * @returns {boolean} Returns `true` if the state has changed since the last check.\n */\n _createClass(Overlay, [{\n key: \"updateStateOfRendering\",\n value: function updateStateOfRendering() {\n // todo refactoring: conceive introducing final state machine, normal -> changed (once) -> needs-full-render -> ...? -> normal\n var previousState = this.needFullRender;\n this.needFullRender = this.shouldBeRendered();\n var changed = previousState !== this.needFullRender;\n if (changed && !this.needFullRender) {\n this.reset();\n }\n return changed;\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return true;\n }\n\n /**\n * Update the trimming container.\n */\n }, {\n key: \"updateTrimmingContainer\",\n value: function updateTrimmingContainer() {\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n }\n\n /**\n * Update the main scrollable element.\n */\n }, {\n key: \"updateMainScrollableElement\",\n value: function updateMainScrollableElement() {\n var wtTable = this.wot.wtTable;\n var rootWindow = this.domBindings.rootWindow;\n if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {\n this.mainTableScrollableElement = this.wot.wtTable.holder;\n } else {\n this.mainTableScrollableElement = getScrollableElement(wtTable.TABLE);\n }\n }\n\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element.\n * NOTE: The element needs to be a child of the overlay in order for the method to work correctly.\n *\n * @param {HTMLElement} element The cell element to calculate the position for.\n * @param {number} rowIndex Visual row index.\n * @param {number} columnIndex Visual column index.\n * @returns {{top: number, start: number}|undefined}\n */\n }, {\n key: \"getRelativeCellPosition\",\n value: function getRelativeCellPosition(element, rowIndex, columnIndex) {\n if (this.clone.wtTable.holder.contains(element) === false) {\n warn(\"The provided element is not a child of the \".concat(this.type, \" overlay\"));\n return;\n }\n var windowScroll = this.mainTableScrollableElement === this.domBindings.rootWindow;\n var fixedColumnStart = columnIndex < this.wtSettings.getSetting('fixedColumnsStart');\n var fixedRowTop = rowIndex < this.wtSettings.getSetting('fixedRowsTop');\n var fixedRowBottom = rowIndex >= this.wtSettings.getSetting('totalRows') - this.wtSettings.getSetting('fixedRowsBottom');\n var spreader = this.clone.wtTable.spreader;\n var spreaderOffset = {\n start: this.getRelativeStartPosition(spreader),\n top: spreader.offsetTop\n };\n var elementOffset = {\n start: this.getRelativeStartPosition(element),\n top: element.offsetTop\n };\n var offsetObject = null;\n if (windowScroll) {\n offsetObject = this.getRelativeCellPositionWithinWindow(fixedRowTop, fixedColumnStart, elementOffset, spreaderOffset);\n } else {\n offsetObject = this.getRelativeCellPositionWithinHolder(fixedRowTop, fixedRowBottom, fixedColumnStart, elementOffset, spreaderOffset);\n }\n return offsetObject;\n }\n\n /**\n * Get inline start value depending of direction.\n *\n * @param {HTMLElement} el Element.\n * @returns {number}\n */\n }, {\n key: \"getRelativeStartPosition\",\n value: function getRelativeStartPosition(el) {\n return this.isRtl() ? el.offsetParent.offsetWidth - el.offsetLeft - el.offsetWidth : el.offsetLeft;\n }\n\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element within a table with window\n * as a scrollable element.\n *\n * @private\n * @param {boolean} onFixedRowTop `true` if the coordinates point to a place within the top fixed rows.\n * @param {boolean} onFixedColumn `true` if the coordinates point to a place within the fixed columns.\n * @param {number} elementOffset Offset position of the cell element.\n * @param {number} spreaderOffset Offset position of the spreader element.\n * @returns {{top: number, left: number}}\n */\n }, {\n key: \"getRelativeCellPositionWithinWindow\",\n value: function getRelativeCellPositionWithinWindow(onFixedRowTop, onFixedColumn, elementOffset, spreaderOffset) {\n var absoluteRootElementPosition = this.wot.wtTable.wtRootElement.getBoundingClientRect(); // todo refactoring: DEMETER\n var horizontalOffset = 0;\n var verticalOffset = 0;\n if (!onFixedColumn) {\n horizontalOffset = spreaderOffset.start;\n } else {\n var absoluteRootElementStartPosition = absoluteRootElementPosition.left;\n if (this.isRtl()) {\n absoluteRootElementStartPosition = this.domBindings.rootWindow.innerWidth - (absoluteRootElementPosition.left + absoluteRootElementPosition.width + getScrollbarWidth());\n }\n horizontalOffset = absoluteRootElementStartPosition <= 0 ? -1 * absoluteRootElementStartPosition : 0;\n }\n if (onFixedRowTop) {\n var absoluteOverlayPosition = this.clone.wtTable.TABLE.getBoundingClientRect();\n verticalOffset = absoluteOverlayPosition.top - absoluteRootElementPosition.top;\n } else {\n verticalOffset = spreaderOffset.top;\n }\n return {\n start: elementOffset.start + horizontalOffset,\n top: elementOffset.top + verticalOffset\n };\n }\n\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element within a table with window\n * as a scrollable element.\n *\n * @private\n * @param {boolean} onFixedRowTop `true` if the coordinates point to a place within the top fixed rows.\n * @param {boolean} onFixedRowBottom `true` if the coordinates point to a place within the bottom fixed rows.\n * @param {boolean} onFixedColumn `true` if the coordinates point to a place within the fixed columns.\n * @param {number} elementOffset Offset position of the cell element.\n * @param {number} spreaderOffset Offset position of the spreader element.\n * @returns {{top: number, left: number}}\n */\n }, {\n key: \"getRelativeCellPositionWithinHolder\",\n value: function getRelativeCellPositionWithinHolder(onFixedRowTop, onFixedRowBottom, onFixedColumn, elementOffset, spreaderOffset) {\n var tableScrollPosition = {\n horizontal: this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),\n vertical: this.wot.wtOverlays.topOverlay.getScrollPosition()\n };\n var horizontalOffset = 0;\n var verticalOffset = 0;\n if (!onFixedColumn) {\n horizontalOffset = tableScrollPosition.horizontal - spreaderOffset.start;\n }\n if (onFixedRowBottom) {\n var absoluteRootElementPosition = this.wot.wtTable.wtRootElement.getBoundingClientRect(); // todo refactoring: DEMETER\n var absoluteOverlayPosition = this.clone.wtTable.TABLE.getBoundingClientRect(); // todo refactoring: DEMETER\n\n verticalOffset = absoluteOverlayPosition.top * -1 + absoluteRootElementPosition.top;\n } else if (!onFixedRowTop) {\n verticalOffset = tableScrollPosition.vertical - spreaderOffset.top;\n }\n return {\n start: elementOffset.start - horizontalOffset,\n top: elementOffset.top - verticalOffset\n };\n }\n\n /**\n * Make a clone of table for overlay.\n *\n * @returns {Clone}\n */\n }, {\n key: \"makeClone\",\n value: function makeClone() {\n if (CLONE_TYPES.indexOf(this.type) === -1) {\n throw new Error(\"Clone type \\\"\".concat(this.type, \"\\\" is not supported.\"));\n }\n var wtTable = this.wot.wtTable;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n var clone = rootDocument.createElement('DIV');\n var clonedTable = rootDocument.createElement('TABLE');\n var tableParent = wtTable.wtRootElement.parentNode;\n clone.className = \"\".concat(CLONE_CLASS_NAMES.get(this.type), \" handsontable\");\n clone.setAttribute('dir', this.isRtl() ? 'rtl' : 'ltr');\n clone.style.position = 'absolute';\n clone.style.top = 0;\n clone.style.overflow = 'visible';\n if (this.isRtl()) {\n clone.style.right = 0;\n } else {\n clone.style.left = 0;\n }\n clonedTable.className = wtTable.TABLE.className;\n clone.appendChild(clonedTable);\n tableParent.appendChild(clone);\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === CLONE_TOP || preventOverflow === 'vertical' && this.type === CLONE_INLINE_START) {\n this.mainTableScrollableElement = rootWindow;\n } else if (rootWindow.getComputedStyle(tableParent).getPropertyValue('overflow') === 'hidden') {\n this.mainTableScrollableElement = wtTable.holder;\n } else {\n this.mainTableScrollableElement = getScrollableElement(wtTable.TABLE);\n }\n\n // Create a new instance of the Walkontable class\n return new Clone(clonedTable, this.wtSettings, {\n // todo ioc factory\n source: this.wot,\n overlay: this,\n viewport: this.wot.wtViewport,\n // todo ioc , or factor func if used only here\n event: this.wot.wtEvent,\n // todo ioc , or factory func if used only here\n selections: this.wot.selections // todo ioc , or factory func if used only here\n });\n }\n\n /**\n * Refresh/Redraw overlay.\n *\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n // When hot settings are changed we allow to refresh overlay once before blocking\n var nextCycleRenderFlag = this.shouldBeRendered();\n if (this.clone && (this.needFullRender || nextCycleRenderFlag)) {\n this.clone.draw(fastDraw);\n }\n this.needFullRender = nextCycleRenderFlag;\n }\n\n /**\n * Reset overlay styles to initial values.\n */\n }, {\n key: \"reset\",\n value: function reset() {\n if (!this.clone) {\n return;\n }\n var holder = this.clone.wtTable.holder; // todo refactoring: DEMETER\n var hider = this.clone.wtTable.hider; // todo refactoring: DEMETER\n var holderStyle = holder.style;\n var hiderStyle = hider.style;\n var rootStyle = holder.parentNode.style;\n arrayEach([holderStyle, hiderStyle, rootStyle], function (style) {\n style.width = '';\n style.height = '';\n });\n }\n\n /**\n * Determine if Walkontable is running in RTL mode.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isRtl\",\n value: function isRtl() {\n return this.wtSettings.getSetting('rtlMode');\n }\n\n /**\n * Destroy overlay instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.clone.eventManager.destroy(); // todo check if it is good place for that operation\n }\n }]);\n return Overlay;\n}();","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from \"../../../../helpers/dom/element.mjs\";\nimport TopOverlayTable from \"./../table/top.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_TOP } from \"./constants.mjs\";\n/**\n * @class TopOverlay\n */\nexport var TopOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(TopOverlay, _Overlay);\n var _super = _createSuper(TopOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n */\n function TopOverlay(wotInstance, facadeGetter, wtSettings, domBindings) {\n var _this;\n _classCallCheck(this, TopOverlay);\n _this = _super.call(this, wotInstance, facadeGetter, CLONE_TOP, wtSettings, domBindings);\n /**\n * Cached value which holds the previous value of the `fixedRowsTop` option.\n * It is used as a comparison value that can be used to detect changes in this value.\n *\n * @type {number}\n */\n _defineProperty(_assertThisInitialized(_this), \"cachedFixedRowsTop\", -1);\n _this.cachedFixedRowsTop = _this.wtSettings.getSetting('fixedRowsTop');\n return _this;\n }\n\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {TopOverlayTable}\n */\n _createClass(TopOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(TopOverlayTable, args);\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wtSettings.getSetting('shouldRenderTopOverlay');\n }\n\n /**\n * Updates the top overlay position.\n *\n * @returns {boolean}\n */\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return false;\n }\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var rootWindow = this.domBindings.rootWindow;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var overlayPosition = 0;\n var skipInnerBorderAdjusting = false;\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n var wtTable = this.wot.wtTable;\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var bottom = Math.ceil(hiderRect.bottom);\n var rootHeight = overlayRoot.offsetHeight;\n\n // This checks if the overlay is going to an infinite loop caused by added (or removed)\n // `innerBorderTop` class name. Toggling the class name shifts the viewport by 1px and\n // triggers the `scroll` event. It causes the table to render. The new render cycle takes into,\n // account the shift and toggles the class name again. This causes the next loops. This\n // happens only on Chrome (#7256).\n //\n // When we detect that the table bottom position is the same as the overlay bottom,\n // do not toggle the class name.\n //\n // This workaround will be able to be cleared after merging the SVG borders, which introduces\n // frozen lines (no more `innerBorderTop` workaround).\n skipInnerBorderAdjusting = bottom === rootHeight;\n overlayPosition = this.getOverlayOffset();\n setOverlayPosition(overlayRoot, '0px', \"\".concat(overlayPosition, \"px\"));\n } else {\n overlayPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n var positionChanged = this.adjustHeaderBordersPosition(overlayPosition, skipInnerBorderAdjusting);\n this.adjustElementsSize();\n return positionChanged;\n }\n\n /**\n * Sets the main overlay's vertical scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.domBindings.rootWindow;\n var result = false;\n if (this.mainTableScrollableElement === rootWindow && rootWindow.scrollY !== pos) {\n rootWindow.scrollTo(getWindowScrollLeft(rootWindow), pos);\n result = true;\n } else if (this.mainTableScrollableElement.scrollTop !== pos) {\n this.mainTableScrollableElement.scrollTop = pos;\n result = true;\n }\n return result;\n }\n\n /**\n * Triggers onScroll hook callback.\n */\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wtSettings.getSetting('onScrollHorizontally');\n }\n\n /**\n * Calculates total sum cells height.\n *\n * @param {number} from Row index which calculates started from.\n * @param {number} to Row index where calculation is finished.\n * @returns {number} Height sum.\n */\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var defaultRowHeight = this.wtSettings.getSetting('defaultRowHeight');\n var row = from;\n var sum = 0;\n while (row < to) {\n var height = this.wot.wtTable.getRowHeight(row);\n sum += height === void 0 ? defaultRowHeight : height;\n row += 1;\n }\n return sum;\n }\n\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n\n /**\n * Adjust overlay root element size (width and height).\n */\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var wtTable = this.wot.wtTable;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'horizontal') {\n var width = this.wot.wtViewport.getWorkspaceWidth();\n if (this.wot.wtOverlays.hasScrollbarRight) {\n width -= scrollbarWidth;\n }\n width = Math.min(width, wtTable.wtRootElement.scrollWidth);\n overlayRootStyle.width = \"\".concat(width, \"px\");\n } else {\n overlayRootStyle.width = '';\n }\n this.clone.wtTable.holder.style.width = overlayRootStyle.width;\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n overlayRootStyle.height = \"\".concat(tableHeight, \"px\");\n }\n\n /**\n * Adjust overlay root childs size.\n */\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var _selections$getCell$g;\n var holder = this.clone.wtTable.holder;\n var selections = this.wot.selections;\n var facade = this.facadeGetter();\n var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);\n this.clone.wtTable.hider.style.width = this.hider.style.width;\n holder.style.width = holder.parentNode.style.width;\n // Add selection corner protruding part to the holder total height to make sure that\n // borders' corner won't be cut after vertical scroll (#6937).\n holder.style.height = \"\".concat(parseInt(holder.parentNode.style.height, 10) + selectionCornerOffset, \"px\");\n }\n\n /**\n * Adjust the overlay dimensions and position.\n */\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wtSettings.getSetting('totalRows');\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n // can happen if there are 0 rows\n this.spreader.style.top = '0';\n } else {\n throw new Error('Incorrect value of the rowsRenderCalculator');\n }\n this.spreader.style.bottom = '';\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n\n /**\n * Synchronize calculated left position to an element.\n */\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n var styleProperty = this.isRtl() ? 'right' : 'left';\n var spreader = this.clone.wtTable.spreader;\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n spreader.style[styleProperty] = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else {\n spreader.style[styleProperty] = '';\n }\n }\n\n /**\n * Scrolls vertically to a row.\n *\n * @param {number} sourceRow Row index which you want to scroll to.\n * @param {boolean} [bottomEdge] If `true`, scrolls according to the bottom edge (top edge is by default).\n * @returns {boolean}\n */\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceRow, bottomEdge) {\n var wot = this.wot,\n wtSettings = this.wtSettings;\n var sourceInstance = wot.cloneSource ? wot.cloneSource : wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var newY = this.getTableParentOffset();\n var scrollbarCompensation = 0;\n if (bottomEdge) {\n var rowHeight = this.wot.wtTable.getRowHeight(sourceRow);\n var viewportHeight = this.wot.wtViewport.getViewportHeight();\n if (rowHeight > viewportHeight) {\n bottomEdge = false;\n }\n }\n if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {\n scrollbarCompensation = getScrollbarWidth(this.domBindings.rootDocument);\n }\n if (bottomEdge) {\n var fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');\n var totalRows = wtSettings.getSetting('totalRows');\n newY += this.sumCellSizes(0, sourceRow + 1);\n newY -= wot.wtViewport.getViewportHeight() - this.sumCellSizes(totalRows - fixedRowsBottom, totalRows);\n // Fix 1 pixel offset when cell is selected\n newY += 1;\n } else {\n newY += this.sumCellSizes(wtSettings.getSetting('fixedRowsTop'), sourceRow);\n }\n newY += scrollbarCompensation;\n return this.setScrollPosition(newY);\n }\n\n /**\n * Gets table parent top position.\n *\n * @returns {number}\n */\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n if (this.mainTableScrollableElement === this.domBindings.rootWindow) {\n return this.wot.wtTable.holderOffset.top;\n }\n return 0;\n }\n\n /**\n * Gets the main overlay's vertical scroll position.\n *\n * @returns {number} Main table's vertical scroll position.\n */\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return getScrollTop(this.mainTableScrollableElement, this.domBindings.rootWindow);\n }\n\n /**\n * Gets the main overlay's vertical overlay offset.\n *\n * @returns {number} Main table's vertical overlay offset.\n */\n }, {\n key: \"getOverlayOffset\",\n value: function getOverlayOffset() {\n var rootWindow = this.domBindings.rootWindow;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var overlayOffset = 0;\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n var rootHeight = this.wot.wtTable.getTotalHeight();\n var overlayRootHeight = this.clone.wtTable.getTotalHeight();\n var maxOffset = rootHeight - overlayRootHeight;\n overlayOffset = Math.max(this.getScrollPosition() - this.getTableParentOffset(), 0);\n if (overlayOffset > maxOffset) {\n overlayOffset = 0;\n }\n }\n return overlayOffset;\n }\n\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header Y position if trimming container is window or scroll top if not.\n * @param {boolean} [skipInnerBorderAdjusting=false] If `true` the inner border adjusting will be skipped.\n * @returns {boolean}\n */\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var skipInnerBorderAdjusting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var masterParent = this.wot.wtTable.holder.parentNode;\n var totalColumns = this.wtSettings.getSetting('totalColumns');\n if (totalColumns) {\n removeClass(masterParent, 'emptyColumns');\n } else {\n addClass(masterParent, 'emptyColumns');\n }\n var positionChanged = false;\n if (!skipInnerBorderAdjusting) {\n var fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');\n var areFixedRowsTopChanged = this.cachedFixedRowsTop !== fixedRowsTop;\n var columnHeaders = this.wtSettings.getSetting('columnHeaders');\n if ((areFixedRowsTopChanged || fixedRowsTop === 0) && columnHeaders.length > 0) {\n var previousState = hasClass(masterParent, 'innerBorderTop');\n this.cachedFixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');\n if (position || this.wtSettings.getSetting('totalRows') === 0) {\n addClass(masterParent, 'innerBorderTop');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderTop');\n positionChanged = previousState;\n }\n }\n }\n return positionChanged;\n }\n }]);\n return TopOverlay;\n}(Overlay);","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyRowsBottom';\n\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the bottom rows in the vertical axis.\n *\n * @type {object}\n */\nvar stickyRowsBottom = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var totalRows = this.wtSettings.getSetting('totalRows');\n var fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n var index = totalRows - fixedRowsBottom;\n if (totalRows === 0 || fixedRowsBottom === 0) {\n return -1;\n }\n if (index < 0) {\n return 0;\n }\n return index;\n },\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n return this.getFirstRenderedRow();\n },\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastRenderedRow: function getLastRenderedRow() {\n return this.wtSettings.getSetting('totalRows') - 1;\n },\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getLastVisibleRow: function getLastVisibleRow() {\n return this.getLastRenderedRow();\n },\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n * @this Table\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n var totalRows = this.wtSettings.getSetting('totalRows');\n return Math.min(this.wtSettings.getSetting('fixedRowsBottom'), totalRows);\n },\n /**\n * Get the number of fully visible rows in the viewport.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.getRenderedRowsCount();\n }\n};\ndefineGetter(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyRowsBottom;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Table from \"../table.mjs\";\nimport stickyRowsBottom from \"./mixin/stickyRowsBottom.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"../../../../helpers/object.mjs\";\nimport { CLONE_BOTTOM } from \"../overlay/index.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to BottomOverlay, implemented through mixins.\n *\n * @mixes stickyRowsBottom\n * @mixes calculatedColumns\n */\nvar BottomOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(BottomOverlayTable, _Table);\n var _super = _createSuper(BottomOverlayTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function BottomOverlayTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, BottomOverlayTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, CLONE_BOTTOM);\n }\n return _createClass(BottomOverlayTable);\n}(Table);\nmixin(BottomOverlayTable, stickyRowsBottom);\nmixin(BottomOverlayTable, calculatedColumns);\nexport default BottomOverlayTable;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass } from \"../../../../helpers/dom/element.mjs\";\nimport BottomOverlayTable from \"./../table/bottom.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_BOTTOM } from \"./constants.mjs\";\n/**\n * @class BottomOverlay\n */\nexport var BottomOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(BottomOverlay, _Overlay);\n var _super = _createSuper(BottomOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n */\n function BottomOverlay(wotInstance, facadeGetter, wtSettings, domBindings) {\n var _this;\n _classCallCheck(this, BottomOverlay);\n _this = _super.call(this, wotInstance, facadeGetter, CLONE_BOTTOM, wtSettings, domBindings);\n /**\n * Cached value which holds the previous value of the `fixedRowsBottom` option.\n * It is used as a comparison value that can be used to detect changes in that value.\n *\n * @type {number}\n */\n _defineProperty(_assertThisInitialized(_this), \"cachedFixedRowsBottom\", -1);\n _this.cachedFixedRowsBottom = _this.wtSettings.getSetting('fixedRowsBottom');\n return _this;\n }\n\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {BottomOverlayTable}\n */\n _createClass(BottomOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(BottomOverlayTable, args);\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wtSettings.getSetting('shouldRenderBottomOverlay');\n }\n\n /**\n * Updates the top overlay position.\n *\n * @returns {boolean}\n */\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return false;\n }\n var rootWindow = this.domBindings.rootWindow;\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n overlayRoot.style.top = '';\n var overlayPosition = 0;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n overlayPosition = this.getOverlayOffset();\n overlayRoot.style.bottom = \"\".concat(overlayPosition, \"px\");\n } else {\n overlayPosition = this.getScrollPosition();\n this.repositionOverlay();\n }\n var positionChanged = this.adjustHeaderBordersPosition(overlayPosition);\n this.adjustElementsSize();\n return positionChanged;\n }\n\n /**\n * Updates the bottom overlay position.\n */\n }, {\n key: \"repositionOverlay\",\n value: function repositionOverlay() {\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n wtViewport = _this$wot.wtViewport;\n var rootDocument = this.domBindings.rootDocument;\n var cloneRoot = this.clone.wtTable.holder.parentNode;\n var bottomOffset = 0;\n if (!wtViewport.hasVerticalScroll()) {\n bottomOffset += wtViewport.getWorkspaceHeight() - wtTable.getTotalHeight();\n }\n if (wtViewport.hasVerticalScroll() && wtViewport.hasHorizontalScroll()) {\n bottomOffset += getScrollbarWidth(rootDocument);\n }\n cloneRoot.style.bottom = \"\".concat(bottomOffset, \"px\");\n }\n\n /**\n * Sets the main overlay's vertical scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.domBindings.rootWindow;\n var result = false;\n if (this.mainTableScrollableElement === rootWindow) {\n rootWindow.scrollTo(getWindowScrollLeft(rootWindow), pos);\n result = true;\n } else if (this.mainTableScrollableElement.scrollTop !== pos) {\n this.mainTableScrollableElement.scrollTop = pos;\n result = true;\n }\n return result;\n }\n\n /**\n * Triggers onScroll hook callback.\n */\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wtSettings.getSetting('onScrollHorizontally');\n }\n\n /**\n * Calculates total sum cells height.\n *\n * @param {number} from Row index which calculates started from.\n * @param {number} to Row index where calculation is finished.\n * @returns {number} Height sum.\n */\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var _this$wot2 = this.wot,\n wtTable = _this$wot2.wtTable,\n wtSettings = _this$wot2.wtSettings;\n var defaultRowHeight = wtSettings.getSetting('defaultRowHeight');\n var row = from;\n var sum = 0;\n while (row < to) {\n var height = wtTable.getRowHeight(row);\n sum += height === void 0 ? defaultRowHeight : height;\n row += 1;\n }\n return sum;\n }\n\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n\n /**\n * Adjust overlay root element size (width and height).\n */\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var _this$wot3 = this.wot,\n wtTable = _this$wot3.wtTable,\n wtViewport = _this$wot3.wtViewport;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'horizontal') {\n var width = wtViewport.getWorkspaceWidth();\n if (this.wot.wtOverlays.hasScrollbarRight) {\n width -= scrollbarWidth;\n }\n width = Math.min(width, wtTable.wtRootElement.scrollWidth);\n overlayRootStyle.width = \"\".concat(width, \"px\");\n } else {\n overlayRootStyle.width = '';\n }\n this.clone.wtTable.holder.style.width = overlayRootStyle.width;\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n overlayRootStyle.height = \"\".concat(tableHeight, \"px\");\n }\n\n /**\n * Adjust overlay root childs size.\n */\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var holder = this.clone.wtTable.holder;\n this.clone.wtTable.hider.style.width = this.hider.style.width;\n holder.style.width = holder.parentNode.style.width;\n holder.style.height = holder.parentNode.style.height;\n }\n\n /**\n * Adjust the overlay dimensions and position.\n */\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wtSettings.getSetting('totalRows');\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n // can happen if there are 0 rows\n this.spreader.style.top = '0';\n } else {\n throw new Error('Incorrect value of the rowsRenderCalculator');\n }\n this.spreader.style.bottom = '';\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n\n /**\n * Synchronize calculated left position to an element.\n */\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n var styleProperty = this.isRtl() ? 'right' : 'left';\n var spreader = this.clone.wtTable.spreader;\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n spreader.style[styleProperty] = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else {\n spreader.style[styleProperty] = '';\n }\n }\n\n /**\n * Scrolls vertically to a row.\n *\n * @param {number} sourceRow Row index which you want to scroll to.\n * @param {boolean} [bottomEdge=false] If `true`, scrolls according to the bottom edge (top edge is by default).\n */\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceRow, bottomEdge) {\n var newY = this.getTableParentOffset();\n var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var scrollbarCompensation = 0;\n if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {\n scrollbarCompensation = getScrollbarWidth(this.domBindings.rootDocument);\n }\n if (bottomEdge) {\n newY += this.sumCellSizes(0, sourceRow + 1);\n newY -= this.wot.wtViewport.getViewportHeight();\n // Fix 1 pixel offset when cell is selected\n newY += 1;\n } else {\n newY += this.sumCellSizes(this.wtSettings.getSetting('fixedRowsBottom'), sourceRow);\n }\n newY += scrollbarCompensation;\n this.setScrollPosition(newY);\n }\n\n /**\n * Gets table parent top position.\n *\n * @returns {number}\n */\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n if (this.mainTableScrollableElement === this.domBindings.rootWindow) {\n return this.wot.wtTable.holderOffset.top;\n }\n return 0;\n }\n\n /**\n * Gets the main overlay's vertical scroll position.\n *\n * @returns {number} Main table's vertical scroll position.\n */\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return getScrollTop(this.mainTableScrollableElement, this.domBindings.rootWindow);\n }\n\n /**\n * Gets the main overlay's vertical overlay offset.\n *\n * @returns {number} Main table's vertical overlay offset.\n */\n }, {\n key: \"getOverlayOffset\",\n value: function getOverlayOffset() {\n var rootWindow = this.domBindings.rootWindow;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var overlayOffset = 0;\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n var rootHeight = this.wot.wtTable.getTotalHeight();\n var overlayRootHeight = this.clone.wtTable.getTotalHeight();\n var maxOffset = rootHeight - overlayRootHeight;\n var docClientHeight = this.domBindings.rootDocument.documentElement.clientHeight;\n overlayOffset = Math.max(this.getTableParentOffset() - this.getScrollPosition() - docClientHeight + rootHeight, 0);\n if (overlayOffset > maxOffset) {\n overlayOffset = 0;\n }\n }\n return overlayOffset;\n }\n\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header Y position if trimming container is window or scroll top if not.\n * @returns {boolean}\n */\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n var areFixedRowsBottomChanged = this.cachedFixedRowsBottom !== fixedRowsBottom;\n var columnHeaders = this.wtSettings.getSetting('columnHeaders');\n var positionChanged = false;\n if ((areFixedRowsBottomChanged || fixedRowsBottom === 0) && columnHeaders.length > 0) {\n var masterParent = this.wot.wtTable.holder.parentNode;\n var previousState = hasClass(masterParent, 'innerBorderBottom');\n this.cachedFixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n if (position || this.wtSettings.getSetting('totalRows') === 0) {\n addClass(masterParent, 'innerBorderBottom');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderBottom');\n positionChanged = previousState;\n }\n }\n return positionChanged;\n }\n }]);\n return BottomOverlay;\n}(Overlay);","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'calculatedRows';\n\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use virtual rendering in the vertical axis.\n *\n * @type {object}\n */\nvar calculatedRows = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var startRow = this.dataAccessObject.startRowRendered;\n if (startRow === null) {\n return -1;\n }\n return startRow;\n },\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n var startRow = this.dataAccessObject.startRowVisible;\n if (startRow === null) {\n return -1;\n }\n return startRow;\n },\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastRenderedRow: function getLastRenderedRow() {\n var endRow = this.dataAccessObject.endRowRendered;\n if (endRow === null) {\n return -1;\n }\n return endRow;\n },\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastVisibleRow: function getLastVisibleRow() {\n var endRow = this.dataAccessObject.endRowVisible;\n if (endRow === null) {\n return -1;\n }\n return endRow;\n },\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n * @this Table\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n return this.dataAccessObject.countRowsRendered;\n },\n /**\n * Get the number of fully visible rows in the viewport.\n *\n * @returns {number}\n * @this Table\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.dataAccessObject.countRowsVisible;\n }\n};\ndefineGetter(calculatedRows, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default calculatedRows;","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyColumnsStart';\n\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to columns.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the first columns in the horizontal axis.\n *\n * @type {object}\n */\nvar stickyColumnsStart = {\n /**\n * Get the source index of the first rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getFirstRenderedColumn: function getFirstRenderedColumn() {\n var totalColumns = this.wtSettings.getSetting('totalColumns');\n if (totalColumns === 0) {\n return -1;\n }\n return 0;\n },\n /**\n * Get the source index of the first column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getFirstVisibleColumn: function getFirstVisibleColumn() {\n return this.getFirstRenderedColumn();\n },\n /**\n * Get the source index of the last rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n * @this Table\n */\n getLastRenderedColumn: function getLastRenderedColumn() {\n return this.getRenderedColumnsCount() - 1;\n },\n /**\n * Get the source index of the last column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getLastVisibleColumn: function getLastVisibleColumn() {\n return this.getLastRenderedColumn();\n },\n /**\n * Get the number of rendered columns.\n *\n * @returns {number}\n * @this Table\n */\n getRenderedColumnsCount: function getRenderedColumnsCount() {\n var totalColumns = this.wtSettings.getSetting('totalColumns');\n return Math.min(this.wtSettings.getSetting('fixedColumnsStart'), totalColumns);\n },\n /**\n * Get the number of fully visible columns in the viewport.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n * @this Table\n */\n getVisibleColumnsCount: function getVisibleColumnsCount() {\n return this.getRenderedColumnsCount();\n }\n};\ndefineGetter(stickyColumnsStart, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyColumnsStart;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Table from \"../table.mjs\";\nimport calculatedRows from \"./mixin/calculatedRows.mjs\";\nimport stickyColumnsStart from \"./mixin/stickyColumnsStart.mjs\";\nimport { mixin } from \"../../../../helpers/object.mjs\";\nimport { CLONE_INLINE_START } from \"../overlay/index.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to InlineStartOverlayTable, implemented through mixins.\n */\nvar InlineStartOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(InlineStartOverlayTable, _Table);\n var _super = _createSuper(InlineStartOverlayTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function InlineStartOverlayTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, InlineStartOverlayTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, CLONE_INLINE_START);\n }\n return _createClass(InlineStartOverlayTable);\n}(Table);\nmixin(InlineStartOverlayTable, calculatedRows);\nmixin(InlineStartOverlayTable, stickyColumnsStart);\nexport default InlineStartOverlayTable;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from \"../../../../helpers/dom/element.mjs\";\nimport InlineStartOverlayTable from \"../table/inlineStart.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_INLINE_START } from \"./constants.mjs\";\n/**\n * @class InlineStartOverlay\n */\nexport var InlineStartOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(InlineStartOverlay, _Overlay);\n var _super = _createSuper(InlineStartOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n */\n function InlineStartOverlay(wotInstance, facadeGetter, wtSettings, domBindings) {\n _classCallCheck(this, InlineStartOverlay);\n return _super.call(this, wotInstance, facadeGetter, CLONE_INLINE_START, wtSettings, domBindings);\n }\n\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {InlineStartOverlayTable}\n */\n _createClass(InlineStartOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(InlineStartOverlayTable, args);\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wtSettings.getSetting('shouldRenderInlineStartOverlay');\n }\n\n /**\n * Updates the left overlay position.\n *\n * @returns {boolean}\n */\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n var wtTable = this.wot.wtTable;\n if (!this.needFullRender || !wtTable.holder.parentNode) {\n // removed from DOM\n return false;\n }\n var rootWindow = this.domBindings.rootWindow;\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var overlayPosition = 0;\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'horizontal')) {\n overlayPosition = this.getOverlayOffset() * (this.isRtl() ? -1 : 1);\n setOverlayPosition(overlayRoot, \"\".concat(overlayPosition, \"px\"), '0px');\n } else {\n overlayPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n var positionChanged = this.adjustHeaderBordersPosition(overlayPosition);\n this.adjustElementsSize();\n return positionChanged;\n }\n\n /**\n * Sets the main overlay's horizontal scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.domBindings.rootWindow;\n var result = false;\n if (this.isRtl()) {\n pos = -pos;\n }\n if (this.mainTableScrollableElement === rootWindow && rootWindow.scrollX !== pos) {\n rootWindow.scrollTo(pos, getWindowScrollTop(rootWindow));\n result = true;\n } else if (this.mainTableScrollableElement.scrollLeft !== pos) {\n this.mainTableScrollableElement.scrollLeft = pos;\n result = true;\n }\n return result;\n }\n\n /**\n * Triggers onScroll hook callback.\n */\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wtSettings.getSetting('onScrollVertically');\n }\n\n /**\n * Calculates total sum cells width.\n *\n * @param {number} from Column index which calculates started from.\n * @param {number} to Column index where calculation is finished.\n * @returns {number} Width sum.\n */\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var defaultColumnWidth = this.wtSettings.getSetting('defaultColumnWidth');\n var column = from;\n var sum = 0;\n while (column < to) {\n sum += this.wot.wtTable.getStretchedColumnWidth(column) || defaultColumnWidth;\n column += 1;\n }\n return sum;\n }\n\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n\n /**\n * Adjust overlay root element size (width and height).\n */\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var wtTable = this.wot.wtTable;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n var scrollbarHeight = getScrollbarWidth(rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'vertical') {\n var height = this.wot.wtViewport.getWorkspaceHeight();\n if (this.wot.wtOverlays.hasScrollbarBottom) {\n height -= scrollbarHeight;\n }\n height = Math.min(height, wtTable.wtRootElement.scrollHeight);\n overlayRootStyle.height = \"\".concat(height, \"px\");\n } else {\n overlayRootStyle.height = '';\n }\n this.clone.wtTable.holder.style.height = overlayRootStyle.height;\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n overlayRootStyle.width = \"\".concat(tableWidth, \"px\");\n }\n\n /**\n * Adjust overlay root childs size.\n */\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var _selections$getCell$g;\n var holder = this.clone.wtTable.holder;\n var selections = this.wot.selections;\n var facade = this.facadeGetter();\n var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(facade).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);\n this.clone.wtTable.hider.style.height = this.hider.style.height;\n holder.style.height = holder.parentNode.style.height;\n // Add selection corner protruding part to the holder total width to make sure that\n // borders' corner won't be cut after horizontal scroll (#6937).\n holder.style.width = \"\".concat(parseInt(holder.parentNode.style.width, 10) + selectionCornerOffset, \"px\");\n }\n\n /**\n * Adjust the overlay dimensions and position.\n */\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wtSettings.getSetting('totalColumns');\n var styleProperty = this.isRtl() ? 'right' : 'left';\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.spreader.style[styleProperty] = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n this.spreader.style[styleProperty] = '0';\n } else {\n throw new Error('Incorrect value of the columnsRenderCalculator');\n }\n if (this.isRtl()) {\n this.spreader.style.left = '';\n } else {\n this.spreader.style.right = '';\n }\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n\n /**\n * Synchronize calculated top position to an element.\n */\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else {\n this.clone.wtTable.spreader.style.top = '';\n }\n }\n\n /**\n * Scrolls horizontally to a column at the left edge of the viewport.\n *\n * @param {number} sourceCol Column index which you want to scroll to.\n * @param {boolean} [beyondRendered] If `true`, scrolls according to the right\n * edge (left edge is by default).\n * @returns {boolean}\n */\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceCol, beyondRendered) {\n var newX = this.getTableParentOffset();\n var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var scrollbarCompensation = 0;\n if (beyondRendered) {\n var columnWidth = this.wot.wtTable.getColumnWidth(sourceCol);\n var viewportWidth = this.wot.wtViewport.getViewportWidth();\n if (columnWidth > viewportWidth) {\n beyondRendered = false;\n }\n }\n if (beyondRendered && mainHolder.offsetWidth !== mainHolder.clientWidth) {\n scrollbarCompensation = getScrollbarWidth(this.domBindings.rootDocument);\n }\n if (beyondRendered) {\n newX += this.sumCellSizes(0, sourceCol + 1);\n newX -= this.wot.wtViewport.getViewportWidth();\n } else {\n newX += this.sumCellSizes(this.wtSettings.getSetting('fixedColumnsStart'), sourceCol);\n }\n newX += scrollbarCompensation;\n return this.setScrollPosition(newX);\n }\n\n /**\n * Gets table parent left position.\n *\n * @returns {number}\n */\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var offset = 0;\n if (!preventOverflow && this.trimmingContainer === this.domBindings.rootWindow) {\n offset = this.wot.wtTable.holderOffset.left;\n }\n return offset;\n }\n\n /**\n * Gets the main overlay's horizontal scroll position.\n *\n * @returns {number} Main table's horizontal scroll position.\n */\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return Math.abs(getScrollLeft(this.mainTableScrollableElement, this.domBindings.rootWindow));\n }\n\n /**\n * Gets the main overlay's horizontal overlay offset.\n *\n * @returns {number} Main table's horizontal overlay offset.\n */\n }, {\n key: \"getOverlayOffset\",\n value: function getOverlayOffset() {\n var rootWindow = this.domBindings.rootWindow;\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n var overlayOffset = 0;\n if (this.trimmingContainer === rootWindow && (!preventOverflow || preventOverflow !== 'horizontal')) {\n if (this.isRtl()) {\n overlayOffset = Math.abs(Math.min(this.getTableParentOffset() - this.getScrollPosition(), 0));\n } else {\n overlayOffset = Math.max(this.getScrollPosition() - this.getTableParentOffset(), 0);\n }\n var rootWidth = this.wot.wtTable.getTotalWidth();\n var overlayRootWidth = this.clone.wtTable.getTotalWidth();\n var maxOffset = rootWidth - overlayRootWidth;\n if (overlayOffset > maxOffset) {\n overlayOffset = 0;\n }\n }\n return overlayOffset;\n }\n\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header X position if trimming container is window or scroll top if not.\n * @returns {boolean}\n */\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var masterParent = this.wot.wtTable.holder.parentNode;\n var rowHeaders = this.wtSettings.getSetting('rowHeaders');\n var fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');\n var totalRows = this.wtSettings.getSetting('totalRows');\n if (totalRows) {\n removeClass(masterParent, 'emptyRows');\n } else {\n addClass(masterParent, 'emptyRows');\n }\n var positionChanged = false;\n if (fixedColumnsStart && !rowHeaders.length) {\n // \"innerBorderLeft\" is for backward compatibility\n addClass(masterParent, 'innerBorderLeft innerBorderInlineStart');\n } else if (!fixedColumnsStart && rowHeaders.length) {\n var previousState = hasClass(masterParent, 'innerBorderInlineStart');\n if (position) {\n addClass(masterParent, 'innerBorderLeft innerBorderInlineStart');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderLeft innerBorderInlineStart');\n positionChanged = previousState;\n }\n }\n return positionChanged;\n }\n }]);\n return InlineStartOverlay;\n}(Overlay);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Table from \"../table.mjs\";\nimport stickyRowsTop from \"./mixin/stickyRowsTop.mjs\";\nimport stickyColumnsStart from \"./mixin/stickyColumnsStart.mjs\";\nimport { mixin } from \"../../../../helpers/object.mjs\";\nimport { CLONE_TOP_INLINE_START_CORNER } from \"../overlay/index.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to topInlineStartCornerOverlay\n * (in RTL mode the overlay sits on the right of the screen), implemented through mixins.\n *\n * @mixes stickyRowsTop\n * @mixes stickyColumnsStart\n */\nvar TopInlineStartCornerOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(TopInlineStartCornerOverlayTable, _Table);\n var _super = _createSuper(TopInlineStartCornerOverlayTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function TopInlineStartCornerOverlayTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, TopInlineStartCornerOverlayTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, CLONE_TOP_INLINE_START_CORNER);\n }\n return _createClass(TopInlineStartCornerOverlayTable);\n}(Table);\nmixin(TopInlineStartCornerOverlayTable, stickyRowsTop);\nmixin(TopInlineStartCornerOverlayTable, stickyColumnsStart);\nexport default TopInlineStartCornerOverlayTable;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { outerHeight, outerWidth, setOverlayPosition, resetCssTransform } from \"../../../../helpers/dom/element.mjs\";\nimport TopInlineStartCornerOverlayTable from \"../table/topInlineStartCorner.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_TOP_INLINE_START_CORNER } from \"./constants.mjs\";\n/**\n * @class TopInlineStartCornerOverlay\n */\nexport var TopInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(TopInlineStartCornerOverlay, _Overlay);\n var _super = _createSuper(TopInlineStartCornerOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n * @param {TopOverlay} topOverlay The instance of the Top overlay.\n * @param {InlineStartOverlay} inlineStartOverlay The instance of the InlineStart overlay.\n */\n function TopInlineStartCornerOverlay(wotInstance, facadeGetter, wtSettings, domBindings, topOverlay, inlineStartOverlay) {\n var _this;\n _classCallCheck(this, TopInlineStartCornerOverlay);\n _this = _super.call(this, wotInstance, facadeGetter, CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);\n /**\n * The instance of the Top overlay.\n *\n * @type {TopOverlay}\n */\n _defineProperty(_assertThisInitialized(_this), \"topOverlay\", void 0);\n /**\n * The instance of the InlineStart overlay.\n *\n * @type {InlineStartOverlay}\n */\n _defineProperty(_assertThisInitialized(_this), \"inlineStartOverlay\", void 0);\n _this.topOverlay = topOverlay;\n _this.inlineStartOverlay = inlineStartOverlay;\n return _this;\n }\n\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {TopInlineStartCornerOverlayTable}\n */\n _createClass(TopInlineStartCornerOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(TopInlineStartCornerOverlayTable, args);\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');\n }\n\n /**\n * Updates the corner overlay position.\n *\n * @returns {boolean}\n */\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n this.updateTrimmingContainer();\n if (!this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return false;\n }\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n if (this.trimmingContainer === this.domBindings.rootWindow) {\n var left = this.inlineStartOverlay.getOverlayOffset() * (this.isRtl() ? -1 : 1);\n var top = this.topOverlay.getOverlayOffset();\n setOverlayPosition(overlayRoot, \"\".concat(left, \"px\"), \"\".concat(top, \"px\"));\n } else {\n resetCssTransform(overlayRoot);\n }\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n overlayRoot.style.height = \"\".concat(tableHeight, \"px\");\n overlayRoot.style.width = \"\".concat(tableWidth, \"px\");\n return false;\n }\n }]);\n return TopInlineStartCornerOverlay;\n}(Overlay);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Table from \"../table.mjs\";\nimport stickyRowsBottom from \"./mixin/stickyRowsBottom.mjs\";\nimport stickyColumnsStart from \"./mixin/stickyColumnsStart.mjs\";\nimport { mixin } from \"../../../../helpers/object.mjs\";\nimport { CLONE_BOTTOM_INLINE_START_CORNER } from \"../overlay/index.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to bottomInlineStartCornerOverlay\n * (in RTL mode the overlay sits on the right of the screen), implemented through mixins.\n *\n * @mixes stickyRowsBottom\n * @mixes stickyColumnsStart\n */\nvar BottomInlineStartCornerOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(BottomInlineStartCornerOverlayTable, _Table);\n var _super = _createSuper(BottomInlineStartCornerOverlayTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function BottomInlineStartCornerOverlayTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, BottomInlineStartCornerOverlayTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, CLONE_BOTTOM_INLINE_START_CORNER);\n }\n return _createClass(BottomInlineStartCornerOverlayTable);\n}(Table);\nmixin(BottomInlineStartCornerOverlayTable, stickyRowsBottom);\nmixin(BottomInlineStartCornerOverlayTable, stickyColumnsStart);\nexport default BottomInlineStartCornerOverlayTable;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { getScrollbarWidth, outerHeight, outerWidth, resetCssTransform } from \"../../../../helpers/dom/element.mjs\";\nimport BottomInlineStartCornerOverlayTable from \"../table/bottomInlineStartCorner.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_BOTTOM_INLINE_START_CORNER } from \"./constants.mjs\";\n/**\n * @class BottomInlineStartCornerOverlay\n */\nexport var BottomInlineStartCornerOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(BottomInlineStartCornerOverlay, _Overlay);\n var _super = _createSuper(BottomInlineStartCornerOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {DomBindings} domBindings Dom elements bound to the current instance.\n * @param {BottomOverlay} bottomOverlay The instance of the Top overlay.\n * @param {InlineStartOverlay} inlineStartOverlay The instance of the InlineStart overlay.\n */\n function BottomInlineStartCornerOverlay(wotInstance, facadeGetter, wtSettings, domBindings, bottomOverlay, inlineStartOverlay) {\n var _this;\n _classCallCheck(this, BottomInlineStartCornerOverlay);\n _this = _super.call(this, wotInstance, facadeGetter, CLONE_BOTTOM_INLINE_START_CORNER, wtSettings, domBindings);\n _this.bottomOverlay = bottomOverlay;\n _this.inlineStartOverlay = inlineStartOverlay;\n return _this;\n }\n\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {BottomInlineStartCornerOverlayTable}\n */\n _createClass(BottomInlineStartCornerOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(BottomInlineStartCornerOverlayTable, args);\n }\n\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');\n }\n\n /**\n * Updates the corner overlay position.\n *\n * @returns {boolean}\n */\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n var wot = this.wot;\n this.updateTrimmingContainer();\n if (!wot.wtTable.holder.parentNode) {\n // removed from DOM\n return false;\n }\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n overlayRoot.style.top = '';\n if (this.trimmingContainer === this.domBindings.rootWindow) {\n var inlineStartOffset = this.inlineStartOverlay.getOverlayOffset();\n var bottom = this.bottomOverlay.getOverlayOffset();\n overlayRoot.style[this.isRtl() ? 'right' : 'left'] = \"\".concat(inlineStartOffset, \"px\");\n overlayRoot.style.bottom = \"\".concat(bottom, \"px\");\n } else {\n resetCssTransform(overlayRoot);\n this.repositionOverlay();\n }\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n overlayRoot.style.height = \"\".concat(tableHeight, \"px\");\n overlayRoot.style.width = \"\".concat(tableWidth, \"px\");\n return false;\n }\n\n /**\n * Reposition the overlay.\n */\n }, {\n key: \"repositionOverlay\",\n value: function repositionOverlay() {\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n wtViewport = _this$wot.wtViewport;\n var rootDocument = this.domBindings.rootDocument;\n var cloneRoot = this.clone.wtTable.holder.parentNode;\n var bottomOffset = 0;\n if (!wtViewport.hasVerticalScroll()) {\n bottomOffset += wtViewport.getWorkspaceHeight() - wtTable.getTotalHeight();\n }\n if (wtViewport.hasVerticalScroll() && wtViewport.hasHorizontalScroll()) {\n bottomOffset += getScrollbarWidth(rootDocument);\n }\n cloneRoot.style.bottom = \"\".concat(bottomOffset, \"px\");\n }\n }]);\n return BottomInlineStartCornerOverlay;\n}(Overlay);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.timers.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getScrollableElement, getScrollbarWidth } from \"../../../helpers/dom/element.mjs\";\nimport { requestAnimationFrame } from \"../../../helpers/feature.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { isKey } from \"../../../helpers/unicode.mjs\";\nimport { isChrome } from \"../../../helpers/browser.mjs\";\nimport { InlineStartOverlay, TopOverlay, TopInlineStartCornerOverlay, BottomOverlay, BottomInlineStartCornerOverlay } from \"./overlay/index.mjs\";\n/**\n * @class Overlays\n */\nvar Overlays = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance. @todo refactoring remove.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {EventManager} eventManager The walkontable event manager.\n * @param {MasterTable} wtTable The master table.\n */\n function Overlays(wotInstance, facadeGetter, domBindings, wtSettings, eventManager, wtTable) {\n var _this = this;\n _classCallCheck(this, Overlays);\n /**\n * Walkontable instance's reference.\n *\n * @protected\n * @type {Walkontable}\n */\n _defineProperty(this, \"wot\", null);\n /**\n * Refer to the TopOverlay instance.\n *\n * @protected\n * @type {TopOverlay}\n */\n _defineProperty(this, \"topOverlay\", null);\n /**\n * Refer to the BottomOverlay instance.\n *\n * @protected\n * @type {BottomOverlay}\n */\n _defineProperty(this, \"bottomOverlay\", null);\n /**\n * Refer to the InlineStartOverlay or instance.\n *\n * @protected\n * @type {InlineStartOverlay}\n */\n _defineProperty(this, \"inlineStartOverlay\", null);\n /**\n * Refer to the TopInlineStartCornerOverlay instance.\n *\n * @protected\n * @type {TopInlineStartCornerOverlay}\n */\n _defineProperty(this, \"topInlineStartCornerOverlay\", null);\n /**\n * Refer to the BottomInlineStartCornerOverlay instance.\n *\n * @protected\n * @type {BottomInlineStartCornerOverlay}\n */\n _defineProperty(this, \"bottomInlineStartCornerOverlay\", null);\n /**\n * Browser line height for purposes of translating mouse wheel.\n *\n * @private\n * @type {number}\n */\n _defineProperty(this, \"browserLineHeight\", undefined);\n /**\n * The walkontable settings.\n *\n * @protected\n * @type {Settings}\n */\n _defineProperty(this, \"wtSettings\", null);\n /**\n * The instance of the ResizeObserver that observes the size of the Walkontable wrapper element.\n * In case of the size change detection the `onContainerElementResize` is fired.\n *\n * @private\n * @type {ResizeObserver}\n */\n _defineProperty(this, \"resizeObserver\", new ResizeObserver(function (entries) {\n requestAnimationFrame(function () {\n if (!Array.isArray(entries) || !entries.length) {\n return;\n }\n _this.wtSettings.getSetting('onContainerElementResize');\n });\n }));\n this.wot = wotInstance;\n this.wtSettings = wtSettings;\n this.domBindings = domBindings;\n this.facadeGetter = facadeGetter;\n this.wtTable = wtTable;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n\n // legacy support\n this.instance = this.wot; // todo refactoring: move to facade\n this.eventManager = eventManager;\n\n // TODO refactoring: probably invalid place to this logic\n this.scrollbarSize = getScrollbarWidth(rootDocument);\n var isOverflowHidden = rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden';\n this.scrollableElement = isOverflowHidden ? wtTable.holder : getScrollableElement(wtTable.TABLE);\n this.initOverlays();\n this.hasScrollbarBottom = false;\n this.hasScrollbarRight = false;\n this.destroyed = false;\n this.keyPressed = false;\n this.spreaderLastSize = {\n width: null,\n height: null\n };\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n this.initBrowserLineHeight();\n this.registerListeners();\n this.lastScrollX = rootWindow.scrollX;\n this.lastScrollY = rootWindow.scrollY;\n }\n\n /**\n * Get the list of references to all overlays.\n *\n * @param {boolean} [includeMaster = false] If set to `true`, the list will contain the master table as the last\n * element.\n * @returns {(TopOverlay|TopInlineStartCornerOverlay|InlineStartOverlay|BottomOverlay|BottomInlineStartCornerOverlay)[]}\n */\n _createClass(Overlays, [{\n key: \"getOverlays\",\n value: function getOverlays() {\n var includeMaster = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var overlays = [this.topOverlay, this.topInlineStartCornerOverlay, this.inlineStartOverlay, this.bottomOverlay, this.bottomInlineStartCornerOverlay];\n if (includeMaster) {\n overlays.push(this.wtTable);\n }\n return overlays;\n }\n\n /**\n * Retrieve browser line height and apply its value to `browserLineHeight`.\n *\n * @private\n */\n }, {\n key: \"initBrowserLineHeight\",\n value: function initBrowserLineHeight() {\n var _this$domBindings2 = this.domBindings,\n rootWindow = _this$domBindings2.rootWindow,\n rootDocument = _this$domBindings2.rootDocument;\n var computedStyle = rootWindow.getComputedStyle(rootDocument.body);\n /**\n * Sometimes `line-height` might be set to 'normal'. In that case, a default `font-size` should be multiplied by roughly 1.2.\n * Https://developer.mozilla.org/pl/docs/Web/CSS/line-height#Values.\n */\n var lineHeight = parseInt(computedStyle.lineHeight, 10);\n var lineHeightFalback = parseInt(computedStyle.fontSize, 10) * 1.2;\n this.browserLineHeight = lineHeight || lineHeightFalback;\n }\n\n /**\n * Prepare overlays based on user settings.\n *\n * @private\n */\n }, {\n key: \"initOverlays\",\n value: function initOverlays() {\n var args = [this.wot, this.facadeGetter, this.wtSettings, this.domBindings];\n\n // todo refactoring: IOC, collection or factories.\n // TODO refactoring, conceive about using generic collection of overlays.\n this.topOverlay = _construct(TopOverlay, args);\n this.bottomOverlay = _construct(BottomOverlay, args);\n this.inlineStartOverlay = _construct(InlineStartOverlay, args);\n\n // TODO discuss, the controversial here would be removing the lazy creation mechanism for corners.\n // TODO cond. Has no any visual impact. They're initially hidden in same way like left, top, and bottom overlays.\n this.topInlineStartCornerOverlay = _construct(TopInlineStartCornerOverlay, args.concat([this.topOverlay, this.inlineStartOverlay]));\n this.bottomInlineStartCornerOverlay = _construct(BottomInlineStartCornerOverlay, args.concat([this.bottomOverlay, this.inlineStartOverlay]));\n }\n\n /**\n * Update state of rendering, check if changed.\n *\n * @package\n * @returns {boolean} Returns `true` if changes applied to overlay needs scroll synchronization.\n */\n }, {\n key: \"updateStateOfRendering\",\n value: function updateStateOfRendering() {\n var syncScroll = this.topOverlay.updateStateOfRendering();\n syncScroll = this.bottomOverlay.updateStateOfRendering() || syncScroll;\n syncScroll = this.inlineStartOverlay.updateStateOfRendering() || syncScroll;\n\n // todo refactoring: move conditions into updateStateOfRendering(),\n if (this.inlineStartOverlay.needFullRender) {\n if (this.topOverlay.needFullRender) {\n syncScroll = this.topInlineStartCornerOverlay.updateStateOfRendering() || syncScroll;\n }\n if (this.bottomOverlay.needFullRender) {\n syncScroll = this.bottomInlineStartCornerOverlay.updateStateOfRendering() || syncScroll;\n }\n }\n return syncScroll;\n }\n\n /**\n * Refresh and redraw table.\n */\n }, {\n key: \"refreshAll\",\n value: function refreshAll() {\n if (!this.wot.drawn) {\n return;\n }\n if (!this.wtTable.holder.parentNode) {\n // Walkontable was detached from DOM, but this handler was not removed\n this.destroy();\n return;\n }\n this.wot.draw(true);\n if (this.verticalScrolling) {\n this.inlineStartOverlay.onScroll(); // todo the inlineStartOverlay.onScroll() fires hook. Why is it needed there, not in any another place?\n }\n\n if (this.horizontalScrolling) {\n this.topOverlay.onScroll();\n }\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n }\n\n /**\n * Register all necessary event listeners.\n */\n }, {\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this2 = this;\n var _this$domBindings3 = this.domBindings,\n rootDocument = _this$domBindings3.rootDocument,\n rootWindow = _this$domBindings3.rootWindow;\n var topOverlayScrollableElement = this.topOverlay.mainTableScrollableElement;\n var inlineStartOverlayScrollableElement = this.inlineStartOverlay.mainTableScrollableElement;\n this.eventManager.addEventListener(rootDocument.documentElement, 'keydown', function (event) {\n return _this2.onKeyDown(event);\n });\n this.eventManager.addEventListener(rootDocument.documentElement, 'keyup', function () {\n return _this2.onKeyUp();\n });\n this.eventManager.addEventListener(rootDocument, 'visibilitychange', function () {\n return _this2.onKeyUp();\n });\n this.eventManager.addEventListener(topOverlayScrollableElement, 'scroll', function (event) {\n return _this2.onTableScroll(event);\n }, {\n passive: true\n });\n if (topOverlayScrollableElement !== inlineStartOverlayScrollableElement) {\n this.eventManager.addEventListener(inlineStartOverlayScrollableElement, 'scroll', function (event) {\n return _this2.onTableScroll(event);\n }, {\n passive: true\n });\n }\n var isHighPixelRatio = rootWindow.devicePixelRatio && rootWindow.devicePixelRatio > 1;\n var isScrollOnWindow = this.scrollableElement === rootWindow;\n var preventWheel = this.wtSettings.getSetting('preventWheel');\n var wheelEventOptions = {\n passive: isScrollOnWindow\n };\n if (preventWheel || isHighPixelRatio || !isChrome()) {\n this.eventManager.addEventListener(this.wtTable.wtRootElement, 'wheel', function (event) {\n return _this2.onCloneWheel(event, preventWheel);\n }, wheelEventOptions);\n }\n var overlays = [this.topOverlay, this.bottomOverlay, this.inlineStartOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];\n overlays.forEach(function (overlay) {\n if (overlay && overlay.needFullRender) {\n var holder = overlay.clone.wtTable.holder; // todo rethink, maybe: overlay.getHolder()\n\n _this2.eventManager.addEventListener(holder, 'wheel', function (event) {\n return _this2.onCloneWheel(event, preventWheel);\n }, wheelEventOptions);\n }\n });\n var resizeTimeout;\n this.eventManager.addEventListener(rootWindow, 'resize', function () {\n clearTimeout(resizeTimeout);\n resizeTimeout = setTimeout(function () {\n _this2.wtSettings.getSetting('onWindowResize');\n }, 200);\n });\n if (!isScrollOnWindow) {\n this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement);\n }\n }\n\n /**\n * Deregister all previously registered listeners.\n */\n }, {\n key: \"deregisterListeners\",\n value: function deregisterListeners() {\n this.eventManager.clearEvents(true);\n }\n\n /**\n * Scroll listener.\n *\n * @param {Event} event The mouse event object.\n */\n }, {\n key: \"onTableScroll\",\n value: function onTableScroll(event) {\n // There was if statement which controlled flow of this function. It avoided the execution of the next lines\n // on mobile devices. It was changed. Broader description of this case is included within issue #4856.\n var rootWindow = this.domBindings.rootWindow;\n var masterHorizontal = this.inlineStartOverlay.mainTableScrollableElement;\n var masterVertical = this.topOverlay.mainTableScrollableElement;\n var target = event.target;\n\n // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered\n // by hot.refreshBorder\n if (this.keyPressed) {\n if (masterVertical !== rootWindow && target !== rootWindow && !event.target.contains(masterVertical) || masterHorizontal !== rootWindow && target !== rootWindow && !event.target.contains(masterHorizontal)) {\n return;\n }\n }\n this.syncScrollPositions(event);\n }\n\n /**\n * Wheel listener for cloned overlays.\n *\n * @param {Event} event The mouse event object.\n * @param {boolean} preventDefault If `true`, the `preventDefault` will be called on event object.\n */\n }, {\n key: \"onCloneWheel\",\n value: function onCloneWheel(event, preventDefault) {\n var rootWindow = this.domBindings.rootWindow;\n\n // There was if statement which controlled flow of this function. It avoided the execution of the next lines\n // on mobile devices. It was changed. Broader description of this case is included within issue #4856.\n\n var masterHorizontal = this.inlineStartOverlay.mainTableScrollableElement;\n var masterVertical = this.topOverlay.mainTableScrollableElement;\n var target = event.target;\n\n // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered\n // by hot.refreshBorder\n var shouldNotWheelVertically = masterVertical !== rootWindow && target !== rootWindow && !target.contains(masterVertical);\n var shouldNotWheelHorizontally = masterHorizontal !== rootWindow && target !== rootWindow && !target.contains(masterHorizontal);\n if (this.keyPressed && (shouldNotWheelVertically || shouldNotWheelHorizontally)) {\n return;\n }\n var isScrollPossible = this.translateMouseWheelToScroll(event);\n if (preventDefault || this.scrollableElement !== rootWindow && isScrollPossible) {\n event.preventDefault();\n }\n }\n\n /**\n * Key down listener.\n *\n * @param {Event} event The keyboard event object.\n */\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n this.keyPressed = isKey(event.keyCode, 'ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT');\n }\n\n /**\n * Key up listener.\n */\n }, {\n key: \"onKeyUp\",\n value: function onKeyUp() {\n this.keyPressed = false;\n }\n\n /**\n * Translate wheel event into scroll event and sync scroll overlays position.\n *\n * @private\n * @param {Event} event The mouse event object.\n * @returns {boolean}\n */\n }, {\n key: \"translateMouseWheelToScroll\",\n value: function translateMouseWheelToScroll(event) {\n var deltaY = isNaN(event.deltaY) ? -1 * event.wheelDeltaY : event.deltaY;\n var deltaX = isNaN(event.deltaX) ? -1 * event.wheelDeltaX : event.deltaX;\n if (event.deltaMode === 1) {\n deltaX += deltaX * this.browserLineHeight;\n deltaY += deltaY * this.browserLineHeight;\n }\n var isScrollVerticallyPossible = this.scrollVertically(deltaY);\n var isScrollHorizontallyPossible = this.scrollHorizontally(deltaX);\n return isScrollVerticallyPossible || isScrollHorizontallyPossible;\n }\n\n /**\n * Scrolls main scrollable element horizontally.\n *\n * @param {number} delta Relative value to scroll.\n * @returns {boolean}\n */\n }, {\n key: \"scrollVertically\",\n value: function scrollVertically(delta) {\n var previousScroll = this.scrollableElement.scrollTop;\n this.scrollableElement.scrollTop += delta;\n return previousScroll !== this.scrollableElement.scrollTop;\n }\n\n /**\n * Scrolls main scrollable element horizontally.\n *\n * @param {number} delta Relative value to scroll.\n * @returns {boolean}\n */\n }, {\n key: \"scrollHorizontally\",\n value: function scrollHorizontally(delta) {\n var previousScroll = this.scrollableElement.scrollLeft;\n this.scrollableElement.scrollLeft += delta;\n return previousScroll !== this.scrollableElement.scrollLeft;\n }\n\n /**\n * Synchronize scroll position between master table and overlay table.\n *\n * @private\n */\n }, {\n key: \"syncScrollPositions\",\n value: function syncScrollPositions() {\n if (this.destroyed) {\n return;\n }\n var rootWindow = this.domBindings.rootWindow;\n var topHolder = this.topOverlay.clone.wtTable.holder; // todo rethink\n var leftHolder = this.inlineStartOverlay.clone.wtTable.holder; // todo rethink\n\n var _ref = [this.scrollableElement.scrollLeft, this.scrollableElement.scrollTop],\n scrollLeft = _ref[0],\n scrollTop = _ref[1];\n this.horizontalScrolling = topHolder.scrollLeft !== scrollLeft || this.lastScrollX !== rootWindow.scrollX;\n this.verticalScrolling = leftHolder.scrollTop !== scrollTop || this.lastScrollY !== rootWindow.scrollY;\n this.lastScrollX = rootWindow.scrollX;\n this.lastScrollY = rootWindow.scrollY;\n if (this.horizontalScrolling) {\n topHolder.scrollLeft = scrollLeft;\n var bottomHolder = this.bottomOverlay.needFullRender ? this.bottomOverlay.clone.wtTable.holder : null; // todo rethink\n\n if (bottomHolder) {\n bottomHolder.scrollLeft = scrollLeft;\n }\n }\n if (this.verticalScrolling) {\n leftHolder.scrollTop = scrollTop;\n }\n this.refreshAll();\n }\n\n /**\n * Synchronize overlay scrollbars with the master scrollbar.\n */\n }, {\n key: \"syncScrollWithMaster\",\n value: function syncScrollWithMaster() {\n var master = this.topOverlay.mainTableScrollableElement;\n var scrollLeft = master.scrollLeft,\n scrollTop = master.scrollTop;\n if (this.topOverlay.needFullRender) {\n this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()\n }\n\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()\n }\n\n if (this.inlineStartOverlay.needFullRender) {\n this.inlineStartOverlay.clone.wtTable.holder.scrollTop = scrollTop; // todo rethink, *overlay.setScroll*()\n }\n }\n\n /**\n * Update the main scrollable elements for all the overlays.\n */\n }, {\n key: \"updateMainScrollableElements\",\n value: function updateMainScrollableElements() {\n this.deregisterListeners();\n this.inlineStartOverlay.updateMainScrollableElement();\n this.topOverlay.updateMainScrollableElement();\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.updateMainScrollableElement();\n }\n var wtTable = this.wtTable;\n var rootWindow = this.domBindings.rootWindow;\n if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {\n this.scrollableElement = wtTable.holder;\n } else {\n this.scrollableElement = getScrollableElement(wtTable.TABLE);\n }\n this.registerListeners();\n }\n\n /**\n *\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.resizeObserver.disconnect();\n this.eventManager.destroy();\n // todo, probably all below `destory` calls has no sense. To analyze\n this.topOverlay.destroy();\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.destroy();\n }\n this.inlineStartOverlay.destroy();\n if (this.topInlineStartCornerOverlay) {\n this.topInlineStartCornerOverlay.destroy();\n }\n if (this.bottomInlineStartCornerOverlay && this.bottomInlineStartCornerOverlay.clone) {\n this.bottomInlineStartCornerOverlay.destroy();\n }\n this.destroyed = true;\n }\n\n /**\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var wasSpreaderSizeUpdated = this.updateLastSpreaderSize();\n if (wasSpreaderSizeUpdated) {\n this.adjustElementsSize();\n }\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.refresh(fastDraw);\n }\n this.inlineStartOverlay.refresh(fastDraw);\n this.topOverlay.refresh(fastDraw);\n if (this.topInlineStartCornerOverlay) {\n this.topInlineStartCornerOverlay.refresh(fastDraw);\n }\n if (this.bottomInlineStartCornerOverlay && this.bottomInlineStartCornerOverlay.clone) {\n this.bottomInlineStartCornerOverlay.refresh(fastDraw);\n }\n }\n\n /**\n * Update the last cached spreader size with the current size.\n *\n * @returns {boolean} `true` if the lastSpreaderSize cache was updated, `false` otherwise.\n */\n }, {\n key: \"updateLastSpreaderSize\",\n value: function updateLastSpreaderSize() {\n var spreader = this.wtTable.spreader;\n var width = spreader.clientWidth;\n var height = spreader.clientHeight;\n var needsUpdating = width !== this.spreaderLastSize.width || height !== this.spreaderLastSize.height;\n if (needsUpdating) {\n this.spreaderLastSize.width = width;\n this.spreaderLastSize.height = height;\n }\n return needsUpdating;\n }\n\n /**\n * Adjust overlays elements size and master table size.\n *\n * @param {boolean} [force=false] When `true`, it adjust the DOM nodes sizes for all overlays.\n */\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var wtViewport = this.wot.wtViewport;\n var wtTable = this.wtTable;\n var totalColumns = this.wtSettings.getSetting('totalColumns');\n var totalRows = this.wtSettings.getSetting('totalRows');\n var headerRowSize = wtViewport.getRowHeaderWidth();\n var headerColumnSize = wtViewport.getColumnHeaderHeight();\n var hiderStyle = wtTable.hider.style;\n hiderStyle.width = \"\".concat(headerRowSize + this.inlineStartOverlay.sumCellSizes(0, totalColumns), \"px\");\n hiderStyle.height = \"\".concat(headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + 1, \"px\");\n if (this.scrollbarSize > 0) {\n // todo refactoring, looking as a part of logic which should be moved outside the class\n var _wtTable$wtRootElemen = wtTable.wtRootElement,\n rootElemScrollHeight = _wtTable$wtRootElemen.scrollHeight,\n rootElemScrollWidth = _wtTable$wtRootElemen.scrollWidth;\n var _wtTable$holder = wtTable.holder,\n holderScrollHeight = _wtTable$holder.scrollHeight,\n holderScrollWidth = _wtTable$holder.scrollWidth;\n this.hasScrollbarRight = rootElemScrollHeight < holderScrollHeight;\n this.hasScrollbarBottom = rootElemScrollWidth < holderScrollWidth;\n if (this.hasScrollbarRight && wtTable.hider.scrollWidth + this.scrollbarSize > rootElemScrollWidth) {\n this.hasScrollbarBottom = true;\n } else if (this.hasScrollbarBottom && wtTable.hider.scrollHeight + this.scrollbarSize > rootElemScrollHeight) {\n this.hasScrollbarRight = true;\n }\n }\n this.topOverlay.adjustElementsSize(force);\n this.inlineStartOverlay.adjustElementsSize(force);\n this.bottomOverlay.adjustElementsSize(force);\n }\n\n /**\n *\n */\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n if (!this.wtTable.isVisible()) {\n return;\n }\n this.topOverlay.applyToDOM();\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.applyToDOM();\n }\n this.inlineStartOverlay.applyToDOM();\n }\n\n /**\n * Get the parent overlay of the provided element.\n *\n * @param {HTMLElement} element An element to process.\n * @returns {object|null}\n */\n }, {\n key: \"getParentOverlay\",\n value: function getParentOverlay(element) {\n if (!element) {\n return null;\n }\n var overlays = [this.topOverlay, this.inlineStartOverlay, this.bottomOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];\n var result = null;\n arrayEach(overlays, function (overlay) {\n if (!overlay) {\n return;\n }\n if (overlay.clone && overlay.clone.wtTable.TABLE.contains(element)) {\n // todo demeter\n result = overlay.clone;\n }\n });\n return result;\n }\n\n /**\n * Synchronize the class names between the main overlay table and the tables on the other overlays.\n *\n */\n }, {\n key: \"syncOverlayTableClassNames\",\n value: function syncOverlayTableClassNames() {\n var masterTable = this.wtTable.TABLE;\n var overlays = [this.topOverlay, this.inlineStartOverlay, this.bottomOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];\n arrayEach(overlays, function (elem) {\n if (!elem) {\n return;\n }\n elem.clone.wtTable.TABLE.className = masterTable.className; // todo demeter\n });\n }\n }]);\n return Overlays;\n}();\nexport default Overlays;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { fastInnerText } from \"../../../helpers/dom/element.mjs\";\nimport { objectEach } from \"../../../helpers/object.mjs\";\n/**\n * @todo Describe options.\n * @typedef SettingsPure\n *\n * @property {Option} facade @todo desc.\n * @property {Option} cellRenderer Option `cellRenderer`.\n * @property {Option} columnHeaders Option `columnHeaders`.\n * @property {Option} columnWidth Option `columnWidth`.\n * @property {Option} currentRowClassName Option `currentRowClassName`.\n * @property {Option} data Option `data`.\n * @property {Option} defaultColumnWidth Option `defaultColumnWidth`.\n * @property {Option} defaultRowHeight Option `defaultRowHeight`.\n * @property {Option} externalRowCalculator Option `externalRowCalculator`.\n * @property {Option} fixedColumnsStart Option `fixedColumnsStart`.\n * @property {Option} fixedRowsBottom Option `fixedRowsBottom`.\n * @property {Option} fixedRowsTop Option `fixedRowsTop`.\n * @property {Option} freezeOverlays Option `freezeOverlays`.\n * @property {Option} groups Option `groups`.\n * @property {Option} hideBorderOnMouseDownOver Option `hideBorderOnMouseDownOver`.\n * @property {Option} isRtl Option `isRtl`.\n * @property {Option} isDataViewInstance Option `isDataViewInstance`.\n * @property {Option} minSpareRows Option `minSpareRows`.\n * @property {Option} onBeforeHighlightingColumnHeader Option `onBeforeHighlightingColumnHeader`.\n * @property {Option} onBeforeHighlightingRowHeader Option `onBeforeHighlightingRowHeader`.\n * @property {Option} onBeforeRemoveCellClassNames Option `onBeforeRemoveCellClassNames`.\n * @property {Option} onBeforeStretchingColumnWidth Option `onBeforeStretchingColumnWidth`.\n * @property {Option} preventOverflow Option `preventOverflow`.\n * @property {Option} preventWheel Option `preventWheel`.\n * @property {Option} renderAllRows Option `renderAllRows`.\n * @property {Option} rowHeaders Option `rowHeaders`.\n * @property {Option} rowHeight Option `,`.\n * @property {Option} shouldRenderBottomOverlay Option `shouldRenderBottomOverlay`.\n * @property {Option} shouldRenderInlineStartOverlay Option `shouldRenderInlineStartOverlay`.\n * @property {Option} shouldRenderTopOverlay Option `shouldRenderTopOverlay`.\n * @property {Option} stretchH Option `stretchH`.\n * @property {Option} table Option `table`.\n * @property {Option} totalColumns Option `totalColumns`.\n * @property {Option} totalRows Option `totalRows`.\n * @property {?Option} beforeDraw Option `beforeDraw`.\n * @property {?Option} columnHeaderHeight Option `columnHeaderHeight`.\n * @property {?Option} currentColumnClassName Option `currentColumnClassName`.\n * @property {?Option} headerClassName Option `headerClassName`.\n * @property {?Option} onAfterDrawSelection Option `onAfterDrawSelection`.\n * @property {?Option} onAfterMomentumScroll Option `onAfterMomentumScroll`.\n * @property {?Option} onBeforeDrawBorders Option `onBeforeDrawBorders`.\n * @property {?Option} onBeforeTouchScroll Option `onBeforeTouchScroll`.\n * @property {?Option} onCellContextMenu Option `onCellContextMenu`.\n * @property {?Option} onCellCornerDblClick Option `onCellCornerDblClick`.\n * @property {?Option} onCellCornerMouseDown Option `onCellCornerMouseDown`.\n * @property {?Option} onCellDblClick Option `onCellDblClick`.\n * @property {?Option} onCellMouseDown Option `onCellMouseDown`.\n * @property {?Option} onCellMouseOut Option `onCellMouseOut`.\n * @property {?Option} onCellMouseOver Option `onCellMouseOver`.\n * @property {?Option} onCellMouseUp Option `onCellMouseUp`.\n * @property {?Option} onDraw Option `onDraw`.\n * @property {?Option} onModifyGetCellCoords Option `onModifyGetCellCoords`.\n * @property {?Option} onModifyRowHeaderWidth Option `onModifyRowHeaderWidth`.\n * @property {?Option} onScrollHorizontally Option `onScrollHorizontally`.\n * @property {?Option} onScrollVertically Option `onScrollVertically`.\n * @property {?Option} onWindowResize Option `onWindowResize`.\n * @property {?Option} rowHeaderWidth Option `rowHeaderWidth`.\n * @property {?Option} selections Option `selections`.\n * @property {?Option} viewportColumnCalculatorOverride Option `viewportColumnCalculatorOverride`.\n * @property {?Option} viewportRowCalculatorOverride Option `viewportRowCalculatorOverride`.\n */\n/**\n * @template TValue.\n * @typedef { TValue | Array. | (function(...*): TValue) } Option\n */\n/**\n * @class Settings\n */\nvar Settings = /*#__PURE__*/function () {\n /**\n * @param {SettingsPure} settings The user defined settings.\n */\n function Settings(settings) {\n var _this = this;\n _classCallCheck(this, Settings);\n /**\n * Reference to settings.\n *\n * @protected\n * @type {SettingsPure}\n */\n _defineProperty(this, \"settings\", {});\n /**\n * The defaults values of settings.\n * Void 0 means it is required, null means it can be empty.\n *\n * @public\n * @type {Readonly}\n */\n _defineProperty(this, \"defaults\", Object.freeze(this.getDefaults()));\n objectEach(this.defaults, function (value, key) {\n if (settings[key] !== void 0) {\n _this.settings[key] = settings[key];\n } else if (value === void 0) {\n throw new Error(\"A required setting \\\"\".concat(key, \"\\\" was not provided\"));\n } else {\n _this.settings[key] = value;\n }\n });\n }\n\n /**\n * Generate defaults for a settings.\n * Void 0 means it is required, null means it can be empty.\n *\n * @private\n * @returns {SettingsPure}\n */\n _createClass(Settings, [{\n key: \"getDefaults\",\n value: function getDefaults() {\n var _this2 = this;\n return {\n facade: void 0,\n table: void 0,\n // Determines whether the Walkontable instance is used as dataset viewer. When its instance is used as\n // a context menu, autocomplete list, etc, the returned value is `false`.\n isDataViewInstance: true,\n // presentation mode\n externalRowCalculator: false,\n stretchH: 'none',\n // values: all, last, none\n currentRowClassName: null,\n currentColumnClassName: null,\n preventOverflow: function preventOverflow() {\n return false;\n },\n preventWheel: false,\n // data source\n data: void 0,\n freezeOverlays: false,\n // Number of renderable columns for the left overlay.\n fixedColumnsStart: 0,\n // Number of renderable rows for the top overlay.\n fixedRowsTop: 0,\n // Number of renderable rows for the bottom overlay.\n fixedRowsBottom: 0,\n // Enable the inline start overlay when conditions are met (left for LTR and right for RTL document mode).\n shouldRenderInlineStartOverlay: function shouldRenderInlineStartOverlay() {\n return _this2.getSetting('fixedColumnsStart') > 0 || _this2.getSetting('rowHeaders').length > 0;\n },\n // Enable the top overlay when conditions are met.\n shouldRenderTopOverlay: function shouldRenderTopOverlay() {\n return _this2.getSetting('fixedRowsTop') > 0 || _this2.getSetting('columnHeaders').length > 0;\n },\n // Enable the bottom overlay when conditions are met.\n shouldRenderBottomOverlay: function shouldRenderBottomOverlay() {\n return _this2.getSetting('fixedRowsBottom') > 0;\n },\n minSpareRows: 0,\n // this must be array of functions: [function (row, TH) {}]\n rowHeaders: function rowHeaders() {\n return [];\n },\n // this must be array of functions: [function (column, TH) {}]\n columnHeaders: function columnHeaders() {\n return [];\n },\n totalRows: void 0,\n totalColumns: void 0,\n cellRenderer: function cellRenderer(row, column, TD) {\n var cellData = _this2.getSetting('data', row, column);\n fastInnerText(TD, cellData === void 0 || cellData === null ? '' : cellData);\n },\n // columnWidth: 50,\n columnWidth: function columnWidth() {\n // return undefined means use default size for the rendered cell content\n },\n rowHeight: function rowHeight() {\n // return undefined means use default size for the rendered cell content\n },\n defaultRowHeight: 23,\n defaultColumnWidth: 50,\n selections: null,\n hideBorderOnMouseDownOver: false,\n viewportRowCalculatorOverride: null,\n viewportColumnCalculatorOverride: null,\n // callbacks\n onCellMouseDown: null,\n onCellContextMenu: null,\n onCellMouseOver: null,\n onCellMouseOut: null,\n onCellMouseUp: null,\n // onCellMouseOut: null,\n onCellDblClick: null,\n onCellCornerMouseDown: null,\n onCellCornerDblClick: null,\n beforeDraw: null,\n onDraw: null,\n onBeforeRemoveCellClassNames: null,\n onAfterDrawSelection: null,\n onBeforeDrawBorders: null,\n onScrollVertically: null,\n onScrollHorizontally: null,\n onBeforeTouchScroll: null,\n onAfterMomentumScroll: null,\n onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(width) {\n return width;\n },\n onModifyRowHeaderWidth: null,\n onModifyGetCellCoords: null,\n onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(sourceRow) {\n return sourceRow;\n },\n onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(sourceCol) {\n return sourceCol;\n },\n onWindowResize: null,\n onContainerElementResize: null,\n renderAllRows: false,\n groups: false,\n rowHeaderWidth: null,\n columnHeaderHeight: null,\n headerClassName: null,\n rtlMode: false\n };\n }\n\n /**\n * Update settings.\n *\n * @param {object} settings The singular settings to update or if passed as object to merge with.\n * @param {*} value The value to set if the first argument is passed as string.\n * @returns {Settings}\n */\n }, {\n key: \"update\",\n value: function update(settings, value) {\n var _this3 = this;\n if (value === void 0) {\n // settings is object\n objectEach(settings, function (settingValue, key) {\n _this3.settings[key] = settingValue;\n });\n } else {\n // if value is defined then settings is the key\n this.settings[settings] = value;\n }\n return this;\n }\n\n /**\n * Get setting by name.\n *\n * @param {$Keys} key The settings key to retrieve.\n * @param {*} [param1] Additional parameter passed to the options defined as function.\n * @param {*} [param2] Additional parameter passed to the options defined as function.\n * @param {*} [param3] Additional parameter passed to the options defined as function.\n * @param {*} [param4] Additional parameter passed to the options defined as function.\n * @returns {*}\n */\n }, {\n key: \"getSetting\",\n value: function getSetting(key, param1, param2, param3, param4) {\n if (typeof this.settings[key] === 'function') {\n return this.settings[key](param1, param2, param3, param4);\n } else if (param1 !== void 0 && Array.isArray(this.settings[key])) {\n return this.settings[key][param1];\n }\n return this.settings[key];\n }\n\n /**\n * Get a setting value without any evaluation.\n *\n * @param {string} key The settings key to retrieve.\n * @returns {*}\n */\n }, {\n key: \"getSettingPure\",\n value: function getSettingPure(key) {\n return this.settings[key];\n }\n\n /**\n * Checks if setting exists.\n *\n * @param {boolean} key The settings key to check.\n * @returns {boolean}\n */\n }, {\n key: \"has\",\n value: function has(key) {\n return !!this.settings[key];\n }\n }]);\n return Settings;\n}();\nexport { Settings as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { getStyle, getComputedStyle, getTrimmingContainer, isVisible } from \"./../../../../helpers/dom/element.mjs\";\nimport Table from \"../table.mjs\";\nimport calculatedRows from \"./mixin/calculatedRows.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to the master table (not overlays), implemented through mixins.\n *\n * @mixes calculatedRows\n * @mixes calculatedColumns\n */\nvar MasterTable = /*#__PURE__*/function (_Table) {\n _inherits(MasterTable, _Table);\n var _super = _createSuper(MasterTable);\n /**\n * @param {TableDao} dataAccessObject The data access object.\n * @param {FacadeGetter} facadeGetter Function which return proper facade.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n */\n function MasterTable(dataAccessObject, facadeGetter, domBindings, wtSettings) {\n _classCallCheck(this, MasterTable);\n return _super.call(this, dataAccessObject, facadeGetter, domBindings, wtSettings, 'master');\n }\n _createClass(MasterTable, [{\n key: \"alignOverlaysWithTrimmingContainer\",\n value: function alignOverlaysWithTrimmingContainer() {\n var trimmingElement = getTrimmingContainer(this.wtRootElement);\n var rootWindow = this.domBindings.rootWindow;\n if (trimmingElement === rootWindow) {\n var preventOverflow = this.wtSettings.getSetting('preventOverflow');\n if (!preventOverflow) {\n this.holder.style.overflow = 'visible';\n this.wtRootElement.style.overflow = 'visible';\n }\n } else {\n var trimmingElementParent = trimmingElement.parentElement;\n var trimmingHeight = getStyle(trimmingElement, 'height', rootWindow);\n var trimmingOverflow = getStyle(trimmingElement, 'overflow', rootWindow);\n var holderStyle = this.holder.style;\n var scrollWidth = trimmingElement.scrollWidth,\n scrollHeight = trimmingElement.scrollHeight;\n var _trimmingElement$getB = trimmingElement.getBoundingClientRect(),\n width = _trimmingElement$getB.width,\n height = _trimmingElement$getB.height;\n var overflow = ['auto', 'hidden', 'scroll'];\n if (trimmingElementParent && overflow.includes(trimmingOverflow)) {\n var cloneNode = trimmingElement.cloneNode(false);\n\n // Before calculating the height of the trimming element, set overflow: auto to hide scrollbars.\n // An issue occurred on Firefox, where an empty element with overflow: scroll returns an element height higher than 0px\n // despite an empty content within.\n cloneNode.style.overflow = 'auto';\n // Issue #9545 shows problem with calculating height for HOT on Firefox while placing instance in some\n // flex containers and setting overflow for some `div` section.\n cloneNode.style.position = 'absolute';\n if (trimmingElement.nextElementSibling) {\n trimmingElementParent.insertBefore(cloneNode, trimmingElement.nextElementSibling);\n } else {\n trimmingElementParent.appendChild(cloneNode);\n }\n var cloneHeight = parseInt(getComputedStyle(cloneNode, rootWindow).height, 10);\n trimmingElementParent.removeChild(cloneNode);\n if (cloneHeight === 0) {\n height = 0;\n }\n }\n height = Math.min(height, scrollHeight);\n holderStyle.height = trimmingHeight === 'auto' ? 'auto' : \"\".concat(height, \"px\");\n width = Math.min(width, scrollWidth);\n holderStyle.width = \"\".concat(width, \"px\");\n holderStyle.overflow = '';\n this.hasTableHeight = holderStyle.height === 'auto' ? true : height > 0;\n this.hasTableWidth = width > 0;\n }\n this.isTableVisible = isVisible(this.TABLE);\n }\n }, {\n key: \"markOversizedColumnHeaders\",\n value: function markOversizedColumnHeaders() {\n var wtSettings = this.wtSettings;\n var wtViewport = this.dataAccessObject.wtViewport;\n var overlayName = 'master';\n var columnHeaders = wtSettings.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n if (columnHeadersCount && !wtViewport.hasOversizedColumnHeadersMarked[overlayName]) {\n var rowHeaders = wtSettings.getSetting('rowHeaders');\n var rowHeaderCount = rowHeaders.length;\n var columnCount = this.getRenderedColumnsCount();\n for (var i = 0; i < columnHeadersCount; i++) {\n for (var renderedColumnIndex = -1 * rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {\n // eslint-disable-line max-len\n this.markIfOversizedColumnHeader(renderedColumnIndex);\n }\n }\n wtViewport.hasOversizedColumnHeadersMarked[overlayName] = true;\n }\n }\n }]);\n return MasterTable;\n}(Table);\nmixin(MasterTable, calculatedRows);\nmixin(MasterTable, calculatedColumns);\nexport default MasterTable;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE } from \"./constants.mjs\";\nvar privatePool = new WeakMap();\n\n/**\n * Calculates indexes of rows to render OR rows that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportRowsCalculator\n */\nvar ViewportRowsCalculator = /*#__PURE__*/function () {\n /**\n * @param {object} options Object with all options specified for row viewport calculation.\n * @param {number} options.viewportSize Height of the viewport.\n * @param {number} options.scrollOffset Current vertical scroll position of the viewport.\n * @param {number} options.totalItems Total number of rows.\n * @param {Function} options.itemSizeFn Function that returns the height of the row at a given index (in px).\n * @param {Function} options.overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin).\n * @param {string} options.calculationType String which describes types of calculation which will be performed.\n * @param {number} options.scrollbarHeight The scrollbar height.\n */\n function ViewportRowsCalculator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n viewportSize = _ref.viewportSize,\n scrollOffset = _ref.scrollOffset,\n totalItems = _ref.totalItems,\n itemSizeFn = _ref.itemSizeFn,\n overrideFn = _ref.overrideFn,\n calculationType = _ref.calculationType,\n scrollbarHeight = _ref.scrollbarHeight;\n _classCallCheck(this, ViewportRowsCalculator);\n privatePool.set(this, {\n viewportHeight: viewportSize,\n scrollOffset: scrollOffset,\n totalRows: totalItems,\n rowHeightFn: itemSizeFn,\n overrideFn: overrideFn,\n calculationType: calculationType,\n horizontalScrollbarHeight: scrollbarHeight\n });\n\n /**\n * Number of rendered/visible rows.\n *\n * @type {number}\n */\n this.count = 0;\n\n /**\n * Index of the first rendered/visible row (can be overwritten using overrideFn).\n *\n * @type {number|null}\n */\n this.startRow = null;\n\n /**\n * Index of the last rendered/visible row (can be overwritten using overrideFn).\n *\n * @type {null}\n */\n this.endRow = null;\n\n /**\n * Position of the first rendered/visible row (in px).\n *\n * @type {number|null}\n */\n this.startPosition = null;\n this.isVisibleInTrimmingContainer = false;\n this.calculate();\n }\n\n /**\n * Calculates viewport.\n */\n _createClass(ViewportRowsCalculator, [{\n key: \"calculate\",\n value: function calculate() {\n var priv = privatePool.get(this);\n var calculationType = priv.calculationType;\n var overrideFn = priv.overrideFn;\n var rowHeightFn = priv.rowHeightFn;\n var scrollOffset = priv.scrollOffset;\n var zeroBasedScrollOffset = Math.max(priv.scrollOffset, 0);\n var totalRows = priv.totalRows;\n var viewportHeight = priv.viewportHeight;\n var horizontalScrollbarHeight = priv.horizontalScrollbarHeight || 0;\n var sum = 0;\n var needReverse = true;\n var startPositions = [];\n var rowHeight;\n var firstVisibleRowHeight = 0;\n var lastVisibleRowHeight = 0;\n\n // Calculate the number (start and end index) of rows needed\n for (var i = 0; i < totalRows; i++) {\n rowHeight = rowHeightFn(i);\n if (isNaN(rowHeight)) {\n rowHeight = ViewportRowsCalculator.DEFAULT_HEIGHT;\n }\n if (sum <= zeroBasedScrollOffset && calculationType !== FULLY_VISIBLE_TYPE) {\n this.startRow = i;\n firstVisibleRowHeight = rowHeight;\n }\n if (sum >= zeroBasedScrollOffset && sum + (calculationType === FULLY_VISIBLE_TYPE ? rowHeight : 0) <= zeroBasedScrollOffset + viewportHeight - horizontalScrollbarHeight) {\n // eslint-disable-line max-len\n if (this.startRow === null) {\n this.startRow = i;\n firstVisibleRowHeight = rowHeight;\n }\n this.endRow = i;\n }\n startPositions.push(sum);\n sum += rowHeight;\n lastVisibleRowHeight = rowHeight;\n if (calculationType !== FULLY_VISIBLE_TYPE) {\n this.endRow = i;\n }\n if (sum >= zeroBasedScrollOffset + viewportHeight - horizontalScrollbarHeight) {\n needReverse = false;\n break;\n }\n }\n var mostBottomScrollOffset = scrollOffset + viewportHeight - horizontalScrollbarHeight;\n var topRowOffset = calculationType === FULLY_VISIBLE_TYPE ? firstVisibleRowHeight : 0;\n var bottomRowOffset = calculationType === FULLY_VISIBLE_TYPE ? 0 : lastVisibleRowHeight;\n if (mostBottomScrollOffset < topRowOffset || scrollOffset > startPositions.at(-1) + bottomRowOffset) {\n this.isVisibleInTrimmingContainer = false;\n } else {\n this.isVisibleInTrimmingContainer = true;\n }\n\n // If the estimation has reached the last row and there is still some space available in the viewport,\n // we need to render in reverse in order to fill the whole viewport with rows\n if (this.endRow === totalRows - 1 && needReverse) {\n this.startRow = this.endRow;\n while (this.startRow > 0) {\n // rowHeight is the height of the last row\n var viewportSum = startPositions[this.endRow] + rowHeight - startPositions[this.startRow - 1];\n if (viewportSum <= viewportHeight - horizontalScrollbarHeight || calculationType !== FULLY_VISIBLE_TYPE) {\n this.startRow -= 1;\n }\n if (viewportSum >= viewportHeight - horizontalScrollbarHeight) {\n break;\n }\n }\n }\n if (calculationType === RENDER_TYPE && this.startRow !== null && overrideFn) {\n overrideFn(this);\n }\n this.startPosition = startPositions[this.startRow];\n if (this.startPosition === void 0) {\n this.startPosition = null;\n }\n\n // If totalRows exceeded its total rows size set endRow to the latest item\n if (totalRows < this.endRow) {\n this.endRow = totalRows - 1;\n }\n if (this.startRow !== null) {\n this.count = this.endRow - this.startRow + 1;\n }\n }\n }], [{\n key: \"DEFAULT_HEIGHT\",\n get:\n /**\n * Default row height.\n *\n * @type {number}\n */\n function get() {\n return 23;\n }\n }]);\n return ViewportRowsCalculator;\n}();\nexport default ViewportRowsCalculator;","/**\n * Render type calculation calculates how many DOM nodes should be created and where placed\n * based on `startRow` and `endRow` properties.\n *\n * @type {number}\n */\nexport var RENDER_TYPE = 1;\n/**\n * Fully visible type calculation calculates rows that are fully visible in the viewport.\n * This type of calculation is used in scrolling by arrow keys navigation.\n *\n * @type {number}\n */\nexport var FULLY_VISIBLE_TYPE = 2;\n/**\n * Partially visible type calculation calculates rows that are fully and partially visible in\n * the viewport. This type of calculation is used to check `endRow` (or `startRow`) with properties\n * calculated in render calculator. If checking met the criteria slow render is\n * performed (which render calculator with new data).\n *\n * @type {number}\n */\nexport var PARTIALLY_VISIBLE_TYPE = 3;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE } from \"./constants.mjs\";\nvar privatePool = new WeakMap();\n\n/**\n * Calculates indexes of columns to render OR columns that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportColumnsCalculator\n */\nvar ViewportColumnsCalculator = /*#__PURE__*/function () {\n /**\n * @param {object} options Object with all options specified for column viewport calculation.\n * @param {number} options.viewportSize Width of the viewport.\n * @param {number} options.scrollOffset Current horizontal scroll position of the viewport.\n * @param {number} options.totalItems Total number of columns.\n * @param {Function} options.itemSizeFn Function that returns the width of the column at a given index (in px).\n * @param {Function} options.overrideFn Function that changes calculated this.startRow, this.endRow (used by\n * MergeCells plugin).\n * @param {string} options.calculationType String which describes types of calculation which will be performed.\n * @param {string} options.inlineStartOffset Inline-start offset of the parent container.\n * @param {string} [options.stretchMode] Stretch mode 'all' or 'last'.\n * @param {Function} [options.stretchingItemWidthFn] Function that returns the new width of the stretched column.\n */\n function ViewportColumnsCalculator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n viewportSize = _ref.viewportSize,\n scrollOffset = _ref.scrollOffset,\n totalItems = _ref.totalItems,\n itemSizeFn = _ref.itemSizeFn,\n overrideFn = _ref.overrideFn,\n calculationType = _ref.calculationType,\n stretchMode = _ref.stretchMode,\n _ref$stretchingItemWi = _ref.stretchingItemWidthFn,\n stretchingItemWidthFn = _ref$stretchingItemWi === void 0 ? function (width) {\n return width;\n } : _ref$stretchingItemWi,\n inlineStartOffset = _ref.inlineStartOffset;\n _classCallCheck(this, ViewportColumnsCalculator);\n privatePool.set(this, {\n viewportWidth: viewportSize,\n scrollOffset: scrollOffset,\n totalColumns: totalItems,\n columnWidthFn: itemSizeFn,\n overrideFn: overrideFn,\n calculationType: calculationType,\n stretchingColumnWidthFn: stretchingItemWidthFn,\n inlineStartOffset: inlineStartOffset\n });\n\n /**\n * Number of rendered/visible columns.\n *\n * @type {number}\n */\n this.count = 0;\n\n /**\n * Index of the first rendered/visible column (can be overwritten using overrideFn).\n *\n * @type {number|null}\n */\n this.startColumn = null;\n\n /**\n * Index of the last rendered/visible column (can be overwritten using overrideFn).\n *\n * @type {null}\n */\n this.endColumn = null;\n\n /**\n * Position of the first rendered/visible column (in px).\n *\n * @type {number|null}\n */\n this.startPosition = null;\n this.isVisibleInTrimmingContainer = false;\n this.stretchAllRatio = 0;\n this.stretchLastWidth = 0;\n this.stretch = stretchMode;\n this.totalTargetWidth = 0;\n this.needVerifyLastColumnWidth = true;\n this.stretchAllColumnsWidth = [];\n this.calculate();\n }\n\n /**\n * Calculates viewport.\n */\n _createClass(ViewportColumnsCalculator, [{\n key: \"calculate\",\n value: function calculate() {\n var sum = 0;\n var needReverse = true;\n var startPositions = [];\n var columnWidth;\n var firstVisibleColumnWidth = 0;\n var lastVisibleColumnWidth = 0;\n var priv = privatePool.get(this);\n var calculationType = priv.calculationType;\n var overrideFn = priv.overrideFn;\n var scrollOffset = priv.scrollOffset;\n var zeroBasedScrollOffset = Math.max(priv.scrollOffset, 0);\n var totalColumns = priv.totalColumns;\n var viewportWidth = priv.viewportWidth;\n // +1 pixel for row header width compensation for horizontal scroll > 0\n var compensatedViewportWidth = zeroBasedScrollOffset > 0 ? viewportWidth + 1 : viewportWidth;\n for (var i = 0; i < totalColumns; i++) {\n columnWidth = this._getColumnWidth(i);\n if (sum <= zeroBasedScrollOffset && calculationType !== FULLY_VISIBLE_TYPE) {\n this.startColumn = i;\n firstVisibleColumnWidth = columnWidth;\n }\n if (sum >= zeroBasedScrollOffset && sum + (calculationType === FULLY_VISIBLE_TYPE ? columnWidth : 0) <= zeroBasedScrollOffset + compensatedViewportWidth) {\n if (this.startColumn === null || this.startColumn === void 0) {\n this.startColumn = i;\n firstVisibleColumnWidth = columnWidth;\n }\n this.endColumn = i;\n }\n startPositions.push(sum);\n sum += columnWidth;\n lastVisibleColumnWidth = columnWidth;\n if (calculationType !== FULLY_VISIBLE_TYPE) {\n this.endColumn = i;\n }\n if (sum >= zeroBasedScrollOffset + viewportWidth) {\n needReverse = false;\n break;\n }\n }\n var mostRightScrollOffset = scrollOffset + viewportWidth - compensatedViewportWidth;\n var inlineEndColumnOffset = calculationType === FULLY_VISIBLE_TYPE ? 0 : lastVisibleColumnWidth;\n var inlineStartColumnOffset = calculationType === FULLY_VISIBLE_TYPE ? firstVisibleColumnWidth : 0;\n if (\n // the table is to the left of the viewport\n mostRightScrollOffset < -1 * priv.inlineStartOffset || scrollOffset > startPositions.at(-1) + inlineEndColumnOffset ||\n // the table is to the right of the viewport\n -1 * priv.scrollOffset - priv.viewportWidth > -1 * inlineStartColumnOffset) {\n this.isVisibleInTrimmingContainer = false;\n } else {\n this.isVisibleInTrimmingContainer = true;\n }\n if (this.endColumn === totalColumns - 1 && needReverse) {\n this.startColumn = this.endColumn;\n while (this.startColumn > 0) {\n var viewportSum = startPositions[this.endColumn] + columnWidth - startPositions[this.startColumn - 1];\n if (viewportSum <= viewportWidth || calculationType !== FULLY_VISIBLE_TYPE) {\n this.startColumn -= 1;\n }\n if (viewportSum > viewportWidth) {\n break;\n }\n }\n }\n if (calculationType === RENDER_TYPE && this.startColumn !== null && overrideFn) {\n overrideFn(this);\n }\n this.startPosition = startPositions[this.startColumn];\n if (this.startPosition === void 0) {\n this.startPosition = null;\n }\n\n // If totalColumns exceeded its total columns size set endColumn to the latest item\n if (totalColumns < this.endColumn) {\n this.endColumn = totalColumns - 1;\n }\n if (this.startColumn !== null) {\n this.count = this.endColumn - this.startColumn + 1;\n }\n }\n\n /**\n * Recalculate columns stretching.\n *\n * @param {number} totalWidth The total width of the table.\n */\n }, {\n key: \"refreshStretching\",\n value: function refreshStretching(totalWidth) {\n if (this.stretch === 'none') {\n return;\n }\n var totalColumnsWidth = totalWidth;\n this.totalTargetWidth = totalColumnsWidth;\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n var sumAll = 0;\n for (var i = 0; i < totalColumns; i++) {\n var columnWidth = this._getColumnWidth(i);\n var permanentColumnWidth = priv.stretchingColumnWidthFn(void 0, i);\n if (typeof permanentColumnWidth === 'number') {\n totalColumnsWidth -= permanentColumnWidth;\n } else {\n sumAll += columnWidth;\n }\n }\n var remainingSize = totalColumnsWidth - sumAll;\n if (this.stretch === 'all' && remainingSize > 0) {\n this.stretchAllRatio = totalColumnsWidth / sumAll;\n this.stretchAllColumnsWidth = [];\n this.needVerifyLastColumnWidth = true;\n } else if (this.stretch === 'last' && totalColumnsWidth !== Infinity) {\n var _columnWidth = this._getColumnWidth(totalColumns - 1);\n var lastColumnWidth = remainingSize + _columnWidth;\n this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : _columnWidth;\n }\n }\n\n /**\n * Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.\n *\n * @param {number} column The visual column index.\n * @param {number} baseWidth The default column width.\n * @returns {number|null}\n */\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(column, baseWidth) {\n var result = null;\n if (this.stretch === 'all' && this.stretchAllRatio !== 0) {\n result = this._getStretchedAllColumnWidth(column, baseWidth);\n } else if (this.stretch === 'last' && this.stretchLastWidth !== 0) {\n result = this._getStretchedLastColumnWidth(column);\n }\n return result;\n }\n\n /**\n * @param {number} column The visual column index.\n * @param {number} baseWidth The default column width.\n * @returns {number}\n * @private\n */\n }, {\n key: \"_getStretchedAllColumnWidth\",\n value: function _getStretchedAllColumnWidth(column, baseWidth) {\n var sumRatioWidth = 0;\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n if (!this.stretchAllColumnsWidth[column]) {\n var stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);\n var newStretchedWidth = priv.stretchingColumnWidthFn(stretchedWidth, column);\n if (newStretchedWidth === void 0) {\n this.stretchAllColumnsWidth[column] = stretchedWidth;\n } else {\n this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;\n }\n }\n if (this.stretchAllColumnsWidth.length === totalColumns && this.needVerifyLastColumnWidth) {\n this.needVerifyLastColumnWidth = false;\n for (var i = 0; i < this.stretchAllColumnsWidth.length; i++) {\n sumRatioWidth += this.stretchAllColumnsWidth[i];\n }\n if (sumRatioWidth !== this.totalTargetWidth) {\n this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += this.totalTargetWidth - sumRatioWidth;\n }\n }\n return this.stretchAllColumnsWidth[column];\n }\n\n /**\n * @param {number} column The visual column index.\n * @returns {number|null}\n * @private\n */\n }, {\n key: \"_getStretchedLastColumnWidth\",\n value: function _getStretchedLastColumnWidth(column) {\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n if (column === totalColumns - 1) {\n return this.stretchLastWidth;\n }\n return null;\n }\n\n /**\n * @param {number} column The visual column index.\n * @returns {number}\n * @private\n */\n }, {\n key: \"_getColumnWidth\",\n value: function _getColumnWidth(column) {\n var width = privatePool.get(this).columnWidthFn(column);\n if (isNaN(width)) {\n width = ViewportColumnsCalculator.DEFAULT_WIDTH;\n }\n return width;\n }\n }], [{\n key: \"DEFAULT_WIDTH\",\n get:\n /**\n * Default column width.\n *\n * @type {number}\n */\n function get() {\n return 50;\n }\n }]);\n return ViewportColumnsCalculator;\n}();\nexport default ViewportColumnsCalculator;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getScrollbarWidth, getStyle, offset, outerHeight, outerWidth } from \"../../../helpers/dom/element.mjs\";\nimport { objectEach } from \"../../../helpers/object.mjs\";\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE, ViewportColumnsCalculator, ViewportRowsCalculator } from \"./calculator/index.mjs\";\n/**\n * @class Viewport\n */\nvar Viewport = /*#__PURE__*/function () {\n /**\n * @param {ViewportDao} dataAccessObject The Walkontable instance.\n * @param {DomBindings} domBindings Bindings into DOM.\n * @param {Settings} wtSettings The Walkontable settings.\n * @param {EventManager} eventManager The instance event manager.\n * @param {Table} wtTable The table.\n */\n function Viewport(dataAccessObject, domBindings, wtSettings, eventManager, wtTable) {\n var _this = this;\n _classCallCheck(this, Viewport);\n this.dataAccessObject = dataAccessObject;\n // legacy support\n this.wot = dataAccessObject.wot;\n this.instance = this.wot;\n this.domBindings = domBindings;\n this.wtSettings = wtSettings;\n this.wtTable = wtTable;\n this.oversizedRows = [];\n this.oversizedColumnHeaders = [];\n this.hasOversizedColumnHeadersMarked = {};\n this.clientHeight = 0;\n this.containerWidth = NaN;\n this.rowHeaderWidth = NaN;\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n this.eventManager = eventManager;\n this.eventManager.addEventListener(this.domBindings.rootWindow, 'resize', function () {\n _this.clientHeight = _this.getWorkspaceHeight();\n });\n }\n\n /**\n * @returns {number}\n */\n _createClass(Viewport, [{\n key: \"getWorkspaceHeight\",\n value: function getWorkspaceHeight() {\n var currentDocument = this.domBindings.rootDocument;\n var trimmingContainer = this.dataAccessObject.topOverlayTrimmingContainer;\n var height = 0;\n if (trimmingContainer === this.domBindings.rootWindow) {\n height = currentDocument.documentElement.clientHeight;\n } else {\n var elemHeight = outerHeight(trimmingContainer);\n\n // returns height without DIV scrollbar\n height = elemHeight > 0 && trimmingContainer.clientHeight > 0 ? trimmingContainer.clientHeight : Infinity;\n }\n return height;\n }\n }, {\n key: \"getWorkspaceWidth\",\n value: function getWorkspaceWidth() {\n var wtSettings = this.wtSettings;\n var _this$domBindings = this.domBindings,\n rootDocument = _this$domBindings.rootDocument,\n rootWindow = _this$domBindings.rootWindow;\n var trimmingContainer = this.dataAccessObject.inlineStartOverlayTrimmingContainer;\n var docOffsetWidth = rootDocument.documentElement.offsetWidth;\n var totalColumns = wtSettings.getSetting('totalColumns');\n var preventOverflow = wtSettings.getSetting('preventOverflow');\n var isRtl = wtSettings.getSetting('rtlMode');\n var tableRect = this.wtTable.TABLE.getBoundingClientRect();\n var inlineStart = isRtl ? tableRect.right - docOffsetWidth : tableRect.left;\n var tableOffset = docOffsetWidth - inlineStart;\n var width;\n var overflow;\n if (preventOverflow) {\n return outerWidth(this.wtTable.wtRootElement);\n }\n if (wtSettings.getSetting('freezeOverlays')) {\n width = Math.min(tableOffset, docOffsetWidth);\n } else {\n width = Math.min(this.getContainerFillWidth(), tableOffset, docOffsetWidth);\n }\n if (trimmingContainer === rootWindow && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {\n // in case sum of column widths is higher than available stylesheet width, let's assume using the whole window\n // otherwise continue below, which will allow stretching\n // this is used in `scroll_window.html`\n // TODO test me\n return rootDocument.documentElement.clientWidth;\n }\n if (trimmingContainer !== rootWindow) {\n overflow = getStyle(this.dataAccessObject.inlineStartOverlayTrimmingContainer, 'overflow', rootWindow);\n if (overflow === 'scroll' || overflow === 'hidden' || overflow === 'auto') {\n // this is used in `scroll.html`\n // TODO test me\n return Math.max(width, trimmingContainer.clientWidth);\n }\n }\n var stretchSetting = wtSettings.getSetting('stretchH');\n if (stretchSetting === 'none' || !stretchSetting) {\n // if no stretching is used, return the maximum used workspace width\n return Math.max(width, outerWidth(this.wtTable.TABLE));\n }\n\n // if stretching is used, return the actual container width, so the columns can fit inside it\n return width;\n }\n\n /**\n * Checks if viewport has vertical scroll.\n *\n * @returns {boolean}\n */\n }, {\n key: \"hasVerticalScroll\",\n value: function hasVerticalScroll() {\n return this.wtTable.hider.offsetHeight > this.getWorkspaceHeight();\n }\n\n /**\n * Checks if viewport has horizontal scroll.\n *\n * @returns {boolean}\n */\n }, {\n key: \"hasHorizontalScroll\",\n value: function hasHorizontalScroll() {\n return this.wtTable.hider.offsetWidth > this.getWorkspaceWidth();\n }\n\n /**\n * @param {number} from The visual column index from the width sum is start calculated.\n * @param {number} length The length of the column to traverse.\n * @returns {number}\n */\n }, {\n key: \"sumColumnWidths\",\n value: function sumColumnWidths(from, length) {\n var sum = 0;\n var column = from;\n while (column < length) {\n sum += this.wtTable.getColumnWidth(column);\n column += 1;\n }\n return sum;\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getContainerFillWidth\",\n value: function getContainerFillWidth() {\n if (this.containerWidth) {\n return this.containerWidth;\n }\n var mainContainer = this.wtTable.holder;\n var dummyElement = this.domBindings.rootDocument.createElement('div');\n dummyElement.style.width = '100%';\n dummyElement.style.height = '1px';\n mainContainer.appendChild(dummyElement);\n var fillWidth = dummyElement.offsetWidth;\n this.containerWidth = fillWidth;\n mainContainer.removeChild(dummyElement);\n return fillWidth;\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getWorkspaceOffset\",\n value: function getWorkspaceOffset() {\n return offset(this.wtTable.TABLE);\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getColumnHeaderHeight\",\n value: function getColumnHeaderHeight() {\n var columnHeaders = this.wtSettings.getSetting('columnHeaders');\n if (!columnHeaders.length) {\n this.columnHeaderHeight = 0;\n } else if (isNaN(this.columnHeaderHeight)) {\n this.columnHeaderHeight = outerHeight(this.wtTable.THEAD);\n }\n return this.columnHeaderHeight;\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getViewportHeight\",\n value: function getViewportHeight() {\n var containerHeight = this.getWorkspaceHeight();\n if (containerHeight === Infinity) {\n return containerHeight;\n }\n var columnHeaderHeight = this.getColumnHeaderHeight();\n if (columnHeaderHeight > 0) {\n containerHeight -= columnHeaderHeight;\n }\n return containerHeight;\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getRowHeaderWidth\",\n value: function getRowHeaderWidth() {\n var rowHeadersWidthSetting = this.wtSettings.getSetting('rowHeaderWidth');\n var rowHeaders = this.wtSettings.getSetting('rowHeaders');\n if (rowHeadersWidthSetting) {\n this.rowHeaderWidth = 0;\n for (var i = 0, len = rowHeaders.length; i < len; i++) {\n this.rowHeaderWidth += rowHeadersWidthSetting[i] || rowHeadersWidthSetting;\n }\n }\n if (isNaN(this.rowHeaderWidth)) {\n if (rowHeaders.length) {\n var TH = this.wtTable.TABLE.querySelector('TH');\n this.rowHeaderWidth = 0;\n for (var _i = 0, _len = rowHeaders.length; _i < _len; _i++) {\n if (TH) {\n this.rowHeaderWidth += outerWidth(TH);\n TH = TH.nextSibling;\n } else {\n // yes this is a cheat but it worked like that before, just taking assumption from CSS instead of measuring.\n // TODO: proper fix\n this.rowHeaderWidth += 50;\n }\n }\n } else {\n this.rowHeaderWidth = 0;\n }\n }\n this.rowHeaderWidth = this.wtSettings.getSetting('onModifyRowHeaderWidth', this.rowHeaderWidth) || this.rowHeaderWidth;\n return this.rowHeaderWidth;\n }\n\n /**\n * @returns {number}\n */\n }, {\n key: \"getViewportWidth\",\n value: function getViewportWidth() {\n var containerWidth = this.getWorkspaceWidth();\n if (containerWidth === Infinity) {\n return containerWidth;\n }\n var rowHeaderWidth = this.getRowHeaderWidth();\n if (rowHeaderWidth > 0) {\n return containerWidth - rowHeaderWidth;\n }\n return containerWidth;\n }\n\n /**\n * Creates:\n * - rowsRenderCalculator (before draw, to qualify rows for rendering)\n * - rowsVisibleCalculator (after draw, to measure which rows are actually visible).\n *\n * @param {number} calculationType The render type ID, which determines for what type of\n * calculation calculator is created.\n * @returns {ViewportRowsCalculator}\n */\n }, {\n key: \"createRowsCalculator\",\n value: function createRowsCalculator() {\n var calculationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RENDER_TYPE;\n var wtSettings = this.wtSettings,\n wtTable = this.wtTable;\n var height;\n var scrollbarHeight;\n var fixedRowsHeight;\n this.rowHeaderWidth = NaN;\n if (wtSettings.getSetting('renderAllRows') && calculationType === RENDER_TYPE) {\n height = Infinity;\n } else {\n height = this.getViewportHeight();\n }\n var pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;\n var fixedRowsTop = wtSettings.getSetting('fixedRowsTop');\n var fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');\n var totalRows = wtSettings.getSetting('totalRows');\n if (fixedRowsTop && pos >= 0) {\n fixedRowsHeight = this.dataAccessObject.topOverlay.sumCellSizes(0, fixedRowsTop);\n pos += fixedRowsHeight;\n height -= fixedRowsHeight;\n }\n if (fixedRowsBottom && this.dataAccessObject.bottomOverlay.clone) {\n fixedRowsHeight = this.dataAccessObject.bottomOverlay.sumCellSizes(totalRows - fixedRowsBottom, totalRows);\n height -= fixedRowsHeight;\n }\n if (wtTable.holder.clientHeight === wtTable.holder.offsetHeight) {\n scrollbarHeight = 0;\n } else {\n scrollbarHeight = getScrollbarWidth(this.domBindings.rootDocument);\n }\n return new ViewportRowsCalculator({\n viewportSize: height,\n scrollOffset: pos,\n totalItems: wtSettings.getSetting('totalRows'),\n itemSizeFn: function itemSizeFn(sourceRow) {\n return wtTable.getRowHeight(sourceRow);\n },\n overrideFn: wtSettings.getSettingPure('viewportRowCalculatorOverride'),\n calculationType: calculationType,\n scrollbarHeight: scrollbarHeight\n });\n }\n\n /**\n * Creates:\n * - columnsRenderCalculator (before draw, to qualify columns for rendering)\n * - columnsVisibleCalculator (after draw, to measure which columns are actually visible).\n *\n * @param {number} calculationType The render type ID, which determines for what type of\n * calculation calculator is created.\n * @returns {ViewportColumnsCalculator}\n */\n }, {\n key: \"createColumnsCalculator\",\n value: function createColumnsCalculator() {\n var calculationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RENDER_TYPE;\n var wtSettings = this.wtSettings,\n wtTable = this.wtTable;\n var width = this.getViewportWidth();\n var pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;\n this.columnHeaderHeight = NaN;\n var fixedColumnsStart = wtSettings.getSetting('fixedColumnsStart');\n if (fixedColumnsStart && pos >= 0) {\n var fixedColumnsWidth = this.dataAccessObject.inlineStartOverlay.sumCellSizes(0, fixedColumnsStart);\n pos += fixedColumnsWidth;\n width -= fixedColumnsWidth;\n }\n if (wtTable.holder.clientWidth !== wtTable.holder.offsetWidth) {\n width -= getScrollbarWidth(this.domBindings.rootDocument);\n }\n return new ViewportColumnsCalculator({\n viewportSize: width,\n scrollOffset: pos,\n totalItems: wtSettings.getSetting('totalColumns'),\n itemSizeFn: function itemSizeFn(sourceCol) {\n return wtTable.getColumnWidth(sourceCol);\n },\n overrideFn: wtSettings.getSettingPure('viewportColumnCalculatorOverride'),\n calculationType: calculationType,\n stretchMode: wtSettings.getSetting('stretchH'),\n stretchingItemWidthFn: function stretchingItemWidthFn(stretchedWidth, column) {\n return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);\n },\n inlineStartOffset: this.dataAccessObject.inlineStartParentOffset\n });\n }\n\n /**\n * Creates rowsRenderCalculator and columnsRenderCalculator (before draw, to determine what rows and\n * cols should be rendered).\n *\n * @param {boolean} fastDraw If `true`, will try to avoid full redraw and only update the border positions.\n * If `false` or `undefined`, will perform a full redraw.\n * @returns {boolean} The fastDraw value, possibly modified.\n */\n }, {\n key: \"createRenderCalculators\",\n value: function createRenderCalculators() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var runFastDraw = fastDraw;\n if (runFastDraw) {\n var proposedRowsVisibleCalculator = this.createRowsCalculator(FULLY_VISIBLE_TYPE);\n var proposedColumnsVisibleCalculator = this.createColumnsCalculator(FULLY_VISIBLE_TYPE);\n if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) && this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) {\n runFastDraw = false;\n }\n }\n if (!runFastDraw) {\n this.rowsRenderCalculator = this.createRowsCalculator(RENDER_TYPE);\n this.columnsRenderCalculator = this.createColumnsCalculator(RENDER_TYPE);\n }\n // delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n return runFastDraw;\n }\n\n /**\n * Creates rowsVisibleCalculator and columnsVisibleCalculator (after draw, to determine what are\n * the actually fully visible rows and columns).\n */\n }, {\n key: \"createVisibleCalculators\",\n value: function createVisibleCalculators() {\n this.rowsVisibleCalculator = this.createRowsCalculator(FULLY_VISIBLE_TYPE);\n this.columnsVisibleCalculator = this.createColumnsCalculator(FULLY_VISIBLE_TYPE);\n }\n\n /**\n * Returns information whether proposedRowsVisibleCalculator viewport\n * is contained inside rows rendered in previous draw (cached in rowsRenderCalculator).\n *\n * @param {ViewportRowsCalculator} proposedRowsVisibleCalculator The instance of the viewport calculator to compare with.\n * @returns {boolean} Returns `true` if all proposed visible rows are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible row is not already rendered (meaning: redraw is needed).\n */\n }, {\n key: \"areAllProposedVisibleRowsAlreadyRendered\",\n value: function areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) {\n if (!this.rowsVisibleCalculator) {\n return false;\n }\n var startRow = proposedRowsVisibleCalculator.startRow,\n endRow = proposedRowsVisibleCalculator.endRow,\n isVisibleInTrimmingContainer = proposedRowsVisibleCalculator.isVisibleInTrimmingContainer;\n\n // if there are no fully visible rows at all, return false\n if (startRow === null && endRow === null) {\n return !isVisibleInTrimmingContainer;\n }\n var _this$rowsRenderCalcu = this.rowsRenderCalculator,\n renderedStartRow = _this$rowsRenderCalcu.startRow,\n renderedEndRow = _this$rowsRenderCalcu.endRow;\n if (startRow < renderedStartRow || startRow === renderedStartRow && startRow > 0) {\n return false;\n } else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow < this.wtSettings.getSetting('totalRows') - 1) {\n return false;\n }\n return true;\n }\n\n /**\n * Returns information whether proposedColumnsVisibleCalculator viewport\n * is contained inside column rendered in previous draw (cached in columnsRenderCalculator).\n *\n * @param {ViewportRowsCalculator} proposedColumnsVisibleCalculator The instance of the viewport calculator to compare with.\n * @returns {boolean} Returns `true` if all proposed visible columns are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible column is not already rendered (meaning: redraw is needed).\n */\n }, {\n key: \"areAllProposedVisibleColumnsAlreadyRendered\",\n value: function areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator) {\n if (!this.columnsVisibleCalculator) {\n return false;\n }\n var startColumn = proposedColumnsVisibleCalculator.startColumn,\n endColumn = proposedColumnsVisibleCalculator.endColumn,\n isVisibleInTrimmingContainer = proposedColumnsVisibleCalculator.isVisibleInTrimmingContainer;\n\n // if there are no fully visible columns at all, return false\n if (startColumn === null && endColumn === null) {\n return !isVisibleInTrimmingContainer;\n }\n var _this$columnsRenderCa = this.columnsRenderCalculator,\n renderedStartColumn = _this$columnsRenderCa.startColumn,\n renderedEndColumn = _this$columnsRenderCa.endColumn;\n if (startColumn < renderedStartColumn || startColumn === renderedStartColumn && startColumn > 0) {\n return false;\n } else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn < this.wtSettings.getSetting('totalColumns') - 1) {\n return false;\n }\n return true;\n }\n\n /**\n * Resets values in keys of the hasOversizedColumnHeadersMarked object after updateSettings.\n */\n }, {\n key: \"resetHasOversizedColumnHeadersMarked\",\n value: function resetHasOversizedColumnHeadersMarked() {\n objectEach(this.hasOversizedColumnHeadersMarked, function (value, key, object) {\n object[key] = void 0;\n });\n }\n }]);\n return Viewport;\n}();\nexport default Viewport;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport Event from \"../event.mjs\";\nimport Overlays from \"../overlays.mjs\";\nimport Settings from \"../settings.mjs\";\nimport MasterTable from \"../table/master.mjs\";\nimport Viewport from \"../viewport.mjs\";\nimport CoreAbstract from \"./_base.mjs\";\nimport { objectEach } from \"../../../../helpers/object.mjs\";\nimport { addClass, removeClass } from \"../../../../helpers/dom/element.mjs\";\n/**\n * @class Walkontable\n */\nvar Walkontable = /*#__PURE__*/function (_CoreAbstract) {\n _inherits(Walkontable, _CoreAbstract);\n var _super = _createSuper(Walkontable);\n /**\n * @param {HTMLTableElement} table Main table.\n * @param {SettingsPure} settings The Walkontable settings.\n */\n function Walkontable(table, settings) {\n var _this;\n _classCallCheck(this, Walkontable);\n _this = _super.call(this, table, new Settings(settings));\n var facadeGetter = _this.wtSettings.getSetting('facade', _assertThisInitialized(_this)); // todo rethink. I would like to have no access to facade from the internal scope.\n\n _this.wtTable = new MasterTable(_this.getTableDao(), facadeGetter, _this.domBindings, _this.wtSettings);\n _this.wtViewport = new Viewport(_this.getViewportDao(), _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);\n _this.selections = _this.wtSettings.getSetting('selections');\n _this.wtEvent = new Event(facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable, _this.selections);\n _this.wtOverlays = new Overlays( // TODO create DAO and remove reference to the Walkontable instance.\n _assertThisInitialized(_this), facadeGetter, _this.domBindings, _this.wtSettings, _this.eventManager, _this.wtTable);\n _this.exportSettingsAsClassNames();\n _this.findOriginalHeaders();\n return _this;\n }\n\n /**\n * Export settings as class names added to the parent element of the table.\n */\n _createClass(Walkontable, [{\n key: \"exportSettingsAsClassNames\",\n value: function exportSettingsAsClassNames() {\n var _this2 = this;\n var toExport = {\n rowHeaders: 'htRowHeaders',\n columnHeaders: 'htColumnHeaders'\n };\n var allClassNames = [];\n var newClassNames = [];\n objectEach(toExport, function (className, key) {\n if (_this2.wtSettings.getSetting(key).length) {\n newClassNames.push(className);\n }\n allClassNames.push(className);\n });\n removeClass(this.wtTable.wtRootElement.parentNode, allClassNames);\n addClass(this.wtTable.wtRootElement.parentNode, newClassNames);\n }\n\n /**\n * @returns {ViewportDao}\n */\n }, {\n key: \"getViewportDao\",\n value: function getViewportDao() {\n var wot = this;\n return {\n get wot() {\n return wot;\n },\n get topOverlayTrimmingContainer() {\n return wot.wtOverlays.topOverlay.trimmingContainer;\n },\n get inlineStartOverlayTrimmingContainer() {\n return wot.wtOverlays.inlineStartOverlay.trimmingContainer;\n },\n get topScrollPosition() {\n return wot.wtOverlays.topOverlay.getScrollPosition();\n },\n get topParentOffset() {\n return wot.wtOverlays.topOverlay.getTableParentOffset();\n },\n get inlineStartScrollPosition() {\n return wot.wtOverlays.inlineStartOverlay.getScrollPosition();\n },\n get inlineStartParentOffset() {\n return wot.wtOverlays.inlineStartOverlay.getTableParentOffset();\n },\n get topOverlay() {\n return wot.wtOverlays.topOverlay; // TODO refactoring: move outside dao, use IOC\n },\n\n get inlineStartOverlay() {\n return wot.wtOverlays.inlineStartOverlay; // TODO refactoring: move outside dao, use IOC\n },\n\n get bottomOverlay() {\n return wot.wtOverlays.bottomOverlay; // TODO refactoring: move outside dao, use IOC\n }\n };\n }\n }]);\n return Walkontable;\n}(CoreAbstract);\nexport { Walkontable as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport Walkontable from \"../core/core.mjs\";\nimport CoreAbstract from \"../core/_base.mjs\";\n/**\n * This layer cares about backward compatibility.\n *\n * @class WalkontableFacade\n * @augments Walkontable\n * @inheritDoc\n */\nvar WalkontableFacade = /*#__PURE__*/function () {\n /**\n * @param {SettingsPure|Walkontable} settingsOrInstance The Walkontable settings.\n */\n function WalkontableFacade(settingsOrInstance) {\n _classCallCheck(this, WalkontableFacade);\n if (settingsOrInstance instanceof CoreAbstract) {\n this._wot = settingsOrInstance;\n } else {\n this._initFromSettings(settingsOrInstance);\n }\n }\n _createClass(WalkontableFacade, [{\n key: \"_initFromSettings\",\n value: function _initFromSettings(settings) {\n settings.facade = function (instance) {\n var facade = new WalkontableFacade(instance);\n return function () {\n return facade;\n };\n };\n this._wot = new Walkontable(settings.table, settings);\n }\n }, {\n key: \"guid\",\n get: function get() {\n return this._wot.guid;\n }\n }, {\n key: \"rootDocument\",\n get: function get() {\n return this._wot.domBindings.rootDocument;\n }\n }, {\n key: \"rootWindow\",\n get: function get() {\n return this._wot.domBindings.rootWindow;\n }\n }, {\n key: \"wtSettings\",\n get: function get() {\n return this._wot.wtSettings; // todo create facade\n }\n }, {\n key: \"cloneSource\",\n get: function get() {\n return this._wot.cloneSource; // todo create facade\n }\n }, {\n key: \"cloneOverlay\",\n get: function get() {\n return this._wot.cloneOverlay; // todo create facade\n }\n }, {\n key: \"selections\",\n get: function get() {\n return this._wot.selections; // todo create facade\n }\n }, {\n key: \"wtViewport\",\n get: function get() {\n return this._wot.wtViewport; // todo create facade\n }\n }, {\n key: \"wtOverlays\",\n get: function get() {\n return this._wot.wtOverlays; // todo create facade\n }\n }, {\n key: \"wtTable\",\n get: function get() {\n return this._wot.wtTable; // todo create facade\n }\n }, {\n key: \"wtEvent\",\n get: function get() {\n return this._wot.wtEvent; // todo create facade\n }\n }, {\n key: \"wtScroll\",\n get: function get() {\n return this._wot.wtScroll; // todo create facade\n }\n }, {\n key: \"drawn\",\n get: function get() {\n return this._wot.drawn;\n },\n set: function set(value) {\n this._wot.drawn = value;\n }\n }, {\n key: \"drawInterrupted\",\n get: function get() {\n return this._wot.drawInterrupted;\n },\n set: function set(value) {\n this._wot.drawInterrupted = value;\n }\n }, {\n key: \"lastMouseOver\",\n get: function get() {\n return this._wot.lastMouseOver;\n },\n set: function set(value) {\n this._wot.lastMouseOver = value;\n }\n }, {\n key: \"momentumScrolling\",\n get: function get() {\n return this._wot.momentumScrolling;\n },\n set: function set(value) {\n this._wot.momentumScrolling = value;\n }\n }, {\n key: \"touchApplied\",\n get: function get() {\n return this._wot.touchApplied;\n },\n set: function set(value) {\n this._wot.touchApplied = value;\n }\n }, {\n key: \"domBindings\",\n get: function get() {\n return this._wot.domBindings;\n }\n }, {\n key: \"eventListeners\",\n get: function get() {\n return this._wot.eventListeners;\n },\n set: function set(value) {\n this._wot.eventListeners = value;\n }\n }, {\n key: \"eventManager\",\n get: function get() {\n return this._wot.eventManager;\n }\n }, {\n key: \"createCellCoords\",\n value: function createCellCoords(row, column) {\n return this._wot.createCellCoords(row, column);\n }\n }, {\n key: \"createCellRange\",\n value: function createCellRange(highlight, from, to) {\n return this._wot.createCellRange(highlight, from, to);\n }\n }, {\n key: \"draw\",\n value: function draw() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this._wot.draw(fastDraw);\n return this;\n }\n }, {\n key: \"getCell\",\n value: function getCell(coords) {\n var topmost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return this._wot.getCell(coords, topmost);\n }\n }, {\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n return this._wot.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n return this._wot.scrollViewportHorizontally(column, snapToRight, snapToLeft);\n }\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n return this._wot.scrollViewportVertically(row, snapToTop, snapToBottom);\n }\n }, {\n key: \"getViewport\",\n value: function getViewport() {\n return this._wot.getViewport();\n }\n }, {\n key: \"getOverlayName\",\n value: function getOverlayName() {\n return this._wot.cloneOverlay ? this._wot.cloneOverlay.type : 'master';\n }\n }, {\n key: \"exportSettingsAsClassNames\",\n value: function exportSettingsAsClassNames() {\n return this._wot.exportSettingsAsClassNames();\n }\n }, {\n key: \"update\",\n value: function update(settings, value) {\n this._wot.wtSettings.update(settings, value);\n return this;\n }\n }, {\n key: \"getSetting\",\n value: function getSetting(key, param1, param2, param3, param4) {\n return this._wot.wtSettings.getSetting(key, param1, param2, param3, param4);\n }\n }, {\n key: \"hasSetting\",\n value: function hasSetting(key) {\n return this._wot.wtSettings.hasSetting(key);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._wot.destroy();\n }\n }]);\n return WalkontableFacade;\n}();\nexport { WalkontableFacade as default };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { isRightClick as isRightClickEvent, isLeftClick as isLeftClickEvent } from \"./../helpers/dom/event.mjs\";\n/**\n * MouseDown handler.\n *\n * @param {object} options The handler options.\n * @param {boolean} options.isShiftKey The flag which indicates if the shift key is pressed.\n * @param {boolean} options.isLeftClick The flag which indicates if the left mouse button is pressed.\n * @param {boolean} options.isRightClick The flag which indicates if the right mouse button is pressed.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n * @param {Function} options.cellCoordsFactory The function factory for CellCoords objects.\n */\nexport function mouseDown(_ref) {\n var isShiftKey = _ref.isShiftKey,\n isLeftClick = _ref.isLeftClick,\n isRightClick = _ref.isRightClick,\n coords = _ref.coords,\n selection = _ref.selection,\n controller = _ref.controller,\n cellCoordsFactory = _ref.cellCoordsFactory;\n var currentSelection = selection.isSelected() ? selection.getSelectedRange().current() : null;\n var selectedCorner = selection.isSelectedByCorner();\n var selectedRow = selection.isSelectedByRowHeader();\n if (isShiftKey && currentSelection) {\n if (coords.row >= 0 && coords.col >= 0 && !controller.cell) {\n selection.setRangeEnd(coords);\n } else if ((selectedCorner || selectedRow) && coords.row >= 0 && coords.col >= 0 && !controller.cell) {\n selection.setRangeEnd(cellCoordsFactory(coords.row, coords.col));\n } else if (selectedCorner && coords.row < 0 && !controller.column) {\n selection.setRangeEnd(cellCoordsFactory(currentSelection.to.row, coords.col));\n } else if (selectedRow && coords.col < 0 && !controller.row) {\n selection.setRangeEnd(cellCoordsFactory(coords.row, currentSelection.to.col));\n } else if ((!selectedCorner && !selectedRow && coords.col < 0 || selectedCorner && coords.col < 0) && !controller.row) {\n selection.selectRows(Math.max(currentSelection.from.row, 0), coords.row, coords.col);\n } else if ((!selectedCorner && !selectedRow && coords.row < 0 || selectedRow && coords.row < 0) && !controller.column) {\n selection.selectColumns(Math.max(currentSelection.from.col, 0), coords.col, coords.row);\n }\n } else {\n var allowRightClickSelection = !selection.inInSelection(coords);\n var performSelection = isLeftClick || isRightClick && allowRightClickSelection;\n\n // clicked row header and when some column was selected\n if (coords.row < 0 && coords.col >= 0 && !controller.column) {\n if (performSelection) {\n selection.selectColumns(coords.col, coords.col, coords.row);\n }\n\n // clicked column header and when some row was selected\n } else if (coords.col < 0 && coords.row >= 0 && !controller.row) {\n if (performSelection) {\n selection.selectRows(coords.row, coords.row, coords.col);\n }\n } else if (coords.col >= 0 && coords.row >= 0 && !controller.cell) {\n if (performSelection) {\n selection.setRangeStart(coords);\n }\n } else if (coords.col < 0 && coords.row < 0) {\n selection.selectAll(true, true);\n }\n }\n}\n\n/**\n * MouseOver handler.\n *\n * @param {object} options The handler options.\n * @param {boolean} options.isLeftClick Indicates that event was fired using the left mouse button.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n * @param {Function} options.cellCoordsFactory The function factory for CellCoords objects.\n */\nexport function mouseOver(_ref2) {\n var isLeftClick = _ref2.isLeftClick,\n coords = _ref2.coords,\n selection = _ref2.selection,\n controller = _ref2.controller,\n cellCoordsFactory = _ref2.cellCoordsFactory;\n if (!isLeftClick) {\n return;\n }\n var selectedRow = selection.isSelectedByRowHeader();\n var selectedColumn = selection.isSelectedByColumnHeader();\n var countCols = selection.tableProps.countCols();\n var countRows = selection.tableProps.countRows();\n if (selectedColumn && !controller.column) {\n selection.setRangeEnd(cellCoordsFactory(countRows - 1, coords.col));\n } else if (selectedRow && !controller.row) {\n selection.setRangeEnd(cellCoordsFactory(coords.row, countCols - 1));\n } else if (!controller.cell) {\n selection.setRangeEnd(coords);\n }\n}\nvar handlers = new Map([['mousedown', mouseDown], ['mouseover', mouseOver], ['touchstart', mouseDown]]);\n\n/**\n * Mouse handler for selection functionality.\n *\n * @param {Event} event An native event to handle.\n * @param {object} options The handler options.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n * @param {Function} options.cellCoordsFactory The function factory for CellCoords objects.\n */\nexport function handleMouseEvent(event, _ref3) {\n var coords = _ref3.coords,\n selection = _ref3.selection,\n controller = _ref3.controller,\n cellCoordsFactory = _ref3.cellCoordsFactory;\n handlers.get(event.type)({\n coords: coords,\n selection: selection,\n controller: controller,\n cellCoordsFactory: cellCoordsFactory,\n isShiftKey: event.shiftKey,\n isLeftClick: isLeftClickEvent(event) || event.type === 'touchstart',\n isRightClick: isRightClickEvent(event)\n });\n}","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nexport var holder = new WeakMap();\nexport var rootInstanceSymbol = Symbol('rootInstance');\n\n/**\n * Register an object as a root instance.\n *\n * @param {object} object An object to associate with root instance flag.\n */\nexport function registerAsRootInstance(object) {\n holder.set(object, true);\n}\n\n/**\n * Check if the source of the root indication call is valid.\n *\n * @param {symbol} rootSymbol A symbol as a source of truth.\n * @returns {boolean}\n */\nexport function hasValidParameter(rootSymbol) {\n return rootSymbol === rootInstanceSymbol;\n}\n\n/**\n * Check if passed an object was flagged as a root instance.\n *\n * @param {object} object An object to check.\n * @returns {boolean}\n */\nexport function isRootInstance(object) {\n return holder.has(object);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput } from \"./helpers/dom/element.mjs\";\nimport EventManager from \"./eventManager.mjs\";\nimport { isImmediatePropagationStopped, isRightClick, isLeftClick } from \"./helpers/dom/event.mjs\";\nimport Walkontable from \"./3rdparty/walkontable/src/index.mjs\";\nimport { handleMouseEvent } from \"./selection/mouseEventHandler.mjs\";\nimport { isRootInstance } from \"./utils/rootInstance.mjs\";\nvar privatePool = new WeakMap();\n\n/**\n * @class TableView\n * @private\n */\nvar _columnHeadersCount = /*#__PURE__*/new WeakMap();\nvar _rowHeadersCount = /*#__PURE__*/new WeakMap();\nvar TableView = /*#__PURE__*/function () {\n /**\n * @param {Hanstontable} instance Instance of {@link Handsontable}.\n */\n function TableView(instance) {\n _classCallCheck(this, TableView);\n /**\n * Instance of {@link Handsontable}.\n *\n * @private\n * @type {Handsontable}\n */\n _defineProperty(this, \"instance\", void 0);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n _defineProperty(this, \"eventManager\", void 0);\n /**\n * Current Handsontable's GridSettings object.\n *\n * @private\n * @type {GridSettings}\n */\n _defineProperty(this, \"settings\", void 0);\n /**\n * Main element.\n *\n * @private\n * @type {HTMLTableSectionElement}\n */\n _defineProperty(this, \"THEAD\", void 0);\n /**\n * Main element.\n *\n * @private\n * @type {HTMLTableSectionElement}\n */\n _defineProperty(this, \"TBODY\", void 0);\n /**\n * Main Walkontable instance.\n *\n * @private\n * @type {Walkontable}\n */\n _defineProperty(this, \"_wt\", void 0);\n /**\n * Main Walkontable instance.\n *\n * @private\n * @type {Walkontable}\n */\n _defineProperty(this, \"activeWt\", void 0);\n /**\n * The total number of the column header renderers applied to the table through the\n * `afterGetColumnHeaderRenderers` hook.\n *\n * @type {number}\n */\n _classPrivateFieldInitSpec(this, _columnHeadersCount, {\n writable: true,\n value: 0\n });\n /**\n * The total number of the row header renderers applied to the table through the\n * `afterGetRowHeaderRenderers` hook.\n *\n * @type {number}\n */\n _classPrivateFieldInitSpec(this, _rowHeadersCount, {\n writable: true,\n value: 0\n });\n /**\n * The flag determines if the `adjustElementsSize` method call was made during\n * the render suspending. If true, the method has to be triggered once after render\n * resuming.\n *\n * @private\n * @type {boolean}\n */\n _defineProperty(this, \"postponedAdjustElementsSize\", false);\n this.instance = instance;\n this.eventManager = new EventManager(this.instance);\n this.settings = this.instance.getSettings();\n privatePool.set(this, {\n /**\n * Defines if the text should be selected during mousemove.\n *\n * @private\n * @type {boolean}\n */\n selectionMouseDown: false,\n /**\n * @private\n * @type {boolean}\n */\n mouseDown: void 0,\n /**\n * Main
element.\n *\n * @private\n * @type {HTMLTableElement}\n */\n table: void 0,\n /**\n * Cached width of the rootElement.\n *\n * @type {number}\n */\n lastWidth: 0,\n /**\n * Cached height of the rootElement.\n *\n * @type {number}\n */\n lastHeight: 0\n });\n this.createElements();\n this.registerEvents();\n this.initializeWalkontable();\n }\n\n /**\n * Renders WalkontableUI.\n */\n _createClass(TableView, [{\n key: \"render\",\n value: function render() {\n if (!this.instance.isRenderSuspended()) {\n this.instance.runHooks('beforeRender', this.instance.forceFullRender);\n if (this.postponedAdjustElementsSize) {\n this.postponedAdjustElementsSize = false;\n this.adjustElementsSize(true);\n }\n this._wt.draw(!this.instance.forceFullRender);\n this.instance.runHooks('afterRender', this.instance.forceFullRender);\n this.instance.forceFullRender = false;\n this.instance.renderCall = false;\n }\n }\n\n /**\n * Adjust overlays elements size and master table size.\n *\n * @param {boolean} [force=false] When `true`, it adjust the DOM nodes sizes for all overlays.\n */\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (this.instance.isRenderSuspended()) {\n this.postponedAdjustElementsSize = true;\n } else {\n this._wt.wtOverlays.adjustElementsSize(force);\n }\n }\n\n /**\n * Returns td object given coordinates.\n *\n * @param {CellCoords} coords Renderable cell coordinates.\n * @param {boolean} topmost Indicates whether the cell should be calculated from the topmost.\n * @returns {HTMLTableCellElement|null}\n */\n }, {\n key: \"getCellAtCoords\",\n value: function getCellAtCoords(coords, topmost) {\n var td = this._wt.getCell(coords, topmost);\n if (td < 0) {\n // there was an exit code (cell is out of bounds)\n return null;\n }\n return td;\n }\n\n /**\n * Scroll viewport to a cell.\n *\n * @param {CellCoords} coords Renderable cell coordinates.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n return this._wt.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n\n /**\n * Scroll viewport to a column.\n *\n * @param {number} column Renderable column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n return this._wt.scrollViewportHorizontally(column, snapToRight, snapToLeft);\n }\n\n /**\n * Scroll viewport to a row.\n *\n * @param {number} row Renderable row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.\n * @returns {boolean}\n */\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n return this._wt.scrollViewportVertically(row, snapToTop, snapToBottom);\n }\n\n /**\n * Prepares DOMElements and adds correct className to the root element.\n *\n * @private\n */\n }, {\n key: \"createElements\",\n value: function createElements() {\n var priv = privatePool.get(this);\n var _this$instance = this.instance,\n rootElement = _this$instance.rootElement,\n rootDocument = _this$instance.rootDocument;\n var originalStyle = rootElement.getAttribute('style');\n if (originalStyle) {\n rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions\n }\n\n addClass(rootElement, 'handsontable');\n priv.table = rootDocument.createElement('TABLE');\n addClass(priv.table, 'htCore');\n if (this.instance.getSettings().tableClassName) {\n addClass(priv.table, this.instance.getSettings().tableClassName);\n }\n this.THEAD = rootDocument.createElement('THEAD');\n priv.table.appendChild(this.THEAD);\n this.TBODY = rootDocument.createElement('TBODY');\n priv.table.appendChild(this.TBODY);\n this.instance.table = priv.table;\n this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);\n }\n\n /**\n * Attaches necessary listeners.\n *\n * @private\n */\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this = this;\n var priv = privatePool.get(this);\n var _this$instance2 = this.instance,\n rootElement = _this$instance2.rootElement,\n rootDocument = _this$instance2.rootDocument,\n selection = _this$instance2.selection;\n var documentElement = rootDocument.documentElement;\n this.eventManager.addEventListener(rootElement, 'mousedown', function (event) {\n priv.selectionMouseDown = true;\n if (!_this.isTextSelectionAllowed(event.target)) {\n var rootWindow = _this.instance.rootWindow;\n clearTextSelection(rootWindow);\n event.preventDefault();\n rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.\n }\n });\n\n this.eventManager.addEventListener(rootElement, 'mouseup', function () {\n priv.selectionMouseDown = false;\n });\n this.eventManager.addEventListener(rootElement, 'mousemove', function (event) {\n if (priv.selectionMouseDown && !_this.isTextSelectionAllowed(event.target)) {\n // Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.\n if (_this.settings.fragmentSelection) {\n clearTextSelection(_this.instance.rootWindow);\n }\n event.preventDefault();\n }\n });\n this.eventManager.addEventListener(documentElement, 'keyup', function (event) {\n // TODO: is it the best place and way to finish cell selection?\n if (selection.isInProgress() && !event.shiftKey) {\n selection.finish();\n }\n });\n this.eventManager.addEventListener(documentElement, 'mouseup', function (event) {\n if (selection.isInProgress() && isLeftClick(event)) {\n // is left mouse button\n selection.finish();\n }\n priv.mouseDown = false;\n if (isOutsideInput(rootDocument.activeElement) || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !isRightClick(event)) {\n _this.instance.unlisten();\n }\n });\n this.eventManager.addEventListener(documentElement, 'contextmenu', function (event) {\n if (selection.isInProgress() && isRightClick(event)) {\n selection.finish();\n priv.mouseDown = false;\n }\n });\n this.eventManager.addEventListener(documentElement, 'touchend', function () {\n if (selection.isInProgress()) {\n selection.finish();\n }\n priv.mouseDown = false;\n });\n this.eventManager.addEventListener(documentElement, 'mousedown', function (event) {\n var originalTarget = event.target;\n var eventX = event.x || event.clientX;\n var eventY = event.y || event.clientY;\n var next = event.target;\n if (priv.mouseDown || !rootElement || !_this.instance.view) {\n return; // it must have been started in a cell\n }\n\n // immediate click on \"holder\" means click on the right side of vertical scrollbar\n var holder = _this.instance.view._wt.wtTable.holder;\n if (next === holder) {\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {\n return;\n }\n } else {\n while (next !== documentElement) {\n if (next === null) {\n if (event.isTargetWebComponent) {\n break;\n }\n\n // click on something that was a row but now is detached (possibly because your click triggered a rerender)\n return;\n }\n if (next === rootElement) {\n // click inside container\n return;\n }\n next = next.parentNode;\n }\n }\n\n // function did not return until here, we have an outside click!\n var outsideClickDeselects = typeof _this.settings.outsideClickDeselects === 'function' ? _this.settings.outsideClickDeselects(originalTarget) : _this.settings.outsideClickDeselects;\n if (outsideClickDeselects) {\n _this.instance.deselectCell();\n } else {\n _this.instance.destroyEditor(false, false);\n }\n });\n this.eventManager.addEventListener(priv.table, 'selectstart', function (event) {\n if (_this.settings.fragmentSelection || isInput(event.target)) {\n return;\n }\n // https://github.com/handsontable/handsontable/issues/160\n // Prevent text from being selected when performing drag down.\n event.preventDefault();\n });\n }\n\n /**\n * Translate renderable cell coordinates to visual coordinates.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @returns {CellCoords}\n */\n }, {\n key: \"translateFromRenderableToVisualCoords\",\n value: function translateFromRenderableToVisualCoords(_ref) {\n var _this$instance3;\n var row = _ref.row,\n col = _ref.col;\n // TODO: To consider an idea to reusing the CellCoords instance instead creating new one.\n return (_this$instance3 = this.instance)._createCellCoords.apply(_this$instance3, _toConsumableArray(this.translateFromRenderableToVisualIndex(row, col)));\n }\n\n /**\n * Translate renderable row and column indexes to visual row and column indexes.\n *\n * @param {number} renderableRow Renderable row index.\n * @param {number} renderableColumn Renderable columnIndex.\n * @returns {number[]}\n */\n }, {\n key: \"translateFromRenderableToVisualIndex\",\n value: function translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {\n // TODO: Some helper may be needed.\n // We perform translation for indexes (without headers).\n var visualRow = renderableRow >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;\n var visualColumn = renderableColumn >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;\n if (visualRow === null) {\n visualRow = renderableRow;\n }\n if (visualColumn === null) {\n visualColumn = renderableColumn;\n }\n return [visualRow, visualColumn];\n }\n\n /**\n * Returns the number of renderable indexes.\n *\n * @private\n * @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.\n * @param {number} maxElements Maximum number of elements (rows or columns).\n *\n * @returns {number|*}\n */\n }, {\n key: \"countRenderableIndexes\",\n value: function countRenderableIndexes(indexMapper, maxElements) {\n var consideredElements = Math.min(indexMapper.getNotTrimmedIndexesLength(), maxElements);\n // Don't take hidden indexes into account. We are looking just for renderable indexes.\n var firstNotHiddenIndex = indexMapper.getNearestNotHiddenIndex(consideredElements - 1, -1);\n\n // There are no renderable indexes.\n if (firstNotHiddenIndex === null) {\n return 0;\n }\n return indexMapper.getRenderableFromVisualIndex(firstNotHiddenIndex) + 1;\n }\n\n /**\n * Returns the number of renderable columns.\n *\n * @returns {number}\n */\n }, {\n key: \"countRenderableColumns\",\n value: function countRenderableColumns() {\n return this.countRenderableIndexes(this.instance.columnIndexMapper, this.settings.maxCols);\n }\n\n /**\n * Returns the number of renderable rows.\n *\n * @returns {number}\n */\n }, {\n key: \"countRenderableRows\",\n value: function countRenderableRows() {\n return this.countRenderableIndexes(this.instance.rowIndexMapper, this.settings.maxRows);\n }\n\n /**\n * Returns number of not hidden row indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenRowIndexes\",\n value: function countNotHiddenRowIndexes(visualIndex, incrementBy) {\n return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.rowIndexMapper, this.countRenderableRows());\n }\n\n /**\n * Returns number of not hidden column indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenColumnIndexes\",\n value: function countNotHiddenColumnIndexes(visualIndex, incrementBy) {\n return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.columnIndexMapper, this.countRenderableColumns());\n }\n\n /**\n * Returns number of not hidden indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.\n * @param {number} renderableIndexesCount Total count of renderable indexes for specific axis.\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenIndexes\",\n value: function countNotHiddenIndexes(visualIndex, incrementBy, indexMapper, renderableIndexesCount) {\n if (isNaN(visualIndex) || visualIndex < 0) {\n return 0;\n }\n var firstVisibleIndex = indexMapper.getNearestNotHiddenIndex(visualIndex, incrementBy);\n var renderableIndex = indexMapper.getRenderableFromVisualIndex(firstVisibleIndex);\n if (!Number.isInteger(renderableIndex)) {\n return 0;\n }\n var notHiddenIndexes = 0;\n if (incrementBy < 0) {\n // Zero-based numbering for renderable indexes corresponds to a number of not hidden indexes.\n notHiddenIndexes = renderableIndex + 1;\n } else if (incrementBy > 0) {\n notHiddenIndexes = renderableIndexesCount - renderableIndex;\n }\n return notHiddenIndexes;\n }\n\n /**\n * The function returns the number of not hidden column indexes that fit between the first and\n * last fixed column in the left (or right in RTL mode) overlay.\n *\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenFixedColumnsStart\",\n value: function countNotHiddenFixedColumnsStart() {\n var countCols = this.instance.countCols();\n var visualFixedColumnsStart = Math.min(parseInt(this.settings.fixedColumnsStart, 10), countCols) - 1;\n return this.countNotHiddenColumnIndexes(visualFixedColumnsStart, -1);\n }\n\n /**\n * The function returns the number of not hidden row indexes that fit between the first and\n * last fixed row in the top overlay.\n *\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenFixedRowsTop\",\n value: function countNotHiddenFixedRowsTop() {\n var countRows = this.instance.countRows();\n var visualFixedRowsTop = Math.min(parseInt(this.settings.fixedRowsTop, 10), countRows) - 1;\n return this.countNotHiddenRowIndexes(visualFixedRowsTop, -1);\n }\n\n /**\n * The function returns the number of not hidden row indexes that fit between the first and\n * last fixed row in the bottom overlay.\n *\n * @returns {number}\n */\n }, {\n key: \"countNotHiddenFixedRowsBottom\",\n value: function countNotHiddenFixedRowsBottom() {\n var countRows = this.instance.countRows();\n var visualFixedRowsBottom = Math.max(countRows - parseInt(this.settings.fixedRowsBottom, 10), 0);\n return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);\n }\n\n /**\n * Checks if at least one cell than belongs to the main table is not covered by the top, left or\n * bottom overlay.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isMainTableNotFullyCoveredByOverlays\",\n value: function isMainTableNotFullyCoveredByOverlays() {\n var fixedAllRows = this.countNotHiddenFixedRowsTop() + this.countNotHiddenFixedRowsBottom();\n var fixedAllColumns = this.countNotHiddenFixedColumnsStart();\n return this.instance.countRenderedRows() > fixedAllRows && this.instance.countRenderedCols() > fixedAllColumns;\n }\n\n /**\n * Defines default configuration and initializes WalkOnTable instance.\n *\n * @private\n */\n }, {\n key: \"initializeWalkontable\",\n value: function initializeWalkontable() {\n var _this2 = this;\n var priv = privatePool.get(this);\n var walkontableConfig = {\n rtlMode: this.instance.isRtl(),\n externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),\n table: priv.table,\n isDataViewInstance: function isDataViewInstance() {\n return isRootInstance(_this2.instance);\n },\n preventOverflow: function preventOverflow() {\n return _this2.settings.preventOverflow;\n },\n preventWheel: function preventWheel() {\n return _this2.settings.preventWheel;\n },\n stretchH: function stretchH() {\n return _this2.settings.stretchH;\n },\n data: function data(renderableRow, renderableColumn) {\n var _this2$instance;\n return (_this2$instance = _this2.instance).getDataAtCell.apply(_this2$instance, _toConsumableArray(_this2.translateFromRenderableToVisualIndex(renderableRow, renderableColumn)));\n },\n totalRows: function totalRows() {\n return _this2.countRenderableRows();\n },\n totalColumns: function totalColumns() {\n return _this2.countRenderableColumns();\n },\n // Number of renderable columns for the left overlay.\n fixedColumnsStart: function fixedColumnsStart() {\n return _this2.countNotHiddenFixedColumnsStart();\n },\n // Number of renderable rows for the top overlay.\n fixedRowsTop: function fixedRowsTop() {\n return _this2.countNotHiddenFixedRowsTop();\n },\n // Number of renderable rows for the bottom overlay.\n fixedRowsBottom: function fixedRowsBottom() {\n return _this2.countNotHiddenFixedRowsBottom();\n },\n // Enable the inline start overlay when conditions are met.\n shouldRenderInlineStartOverlay: function shouldRenderInlineStartOverlay() {\n return _this2.settings.fixedColumnsStart > 0 || walkontableConfig.rowHeaders().length > 0;\n },\n // Enable the top overlay when conditions are met.\n shouldRenderTopOverlay: function shouldRenderTopOverlay() {\n return _this2.settings.fixedRowsTop > 0 || walkontableConfig.columnHeaders().length > 0;\n },\n // Enable the bottom overlay when conditions are met.\n shouldRenderBottomOverlay: function shouldRenderBottomOverlay() {\n return _this2.settings.fixedRowsBottom > 0;\n },\n minSpareRows: function minSpareRows() {\n return _this2.settings.minSpareRows;\n },\n renderAllRows: this.settings.renderAllRows,\n rowHeaders: function rowHeaders() {\n var headerRenderers = [];\n if (_this2.instance.hasRowHeaders()) {\n headerRenderers.push(function (renderableRowIndex, TH) {\n // TODO: Some helper may be needed.\n // We perform translation for row indexes (without row headers).\n var visualRowIndex = renderableRowIndex >= 0 ? _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;\n _this2.appendRowHeader(visualRowIndex, TH);\n });\n }\n _this2.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);\n _classPrivateFieldSet(_this2, _rowHeadersCount, headerRenderers.length);\n return headerRenderers;\n },\n columnHeaders: function columnHeaders() {\n var headerRenderers = [];\n if (_this2.instance.hasColHeaders()) {\n headerRenderers.push(function (renderedColumnIndex, TH) {\n // TODO: Some helper may be needed.\n // We perform translation for columns indexes (without column headers).\n var visualColumnsIndex = renderedColumnIndex >= 0 ? _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;\n _this2.appendColHeader(visualColumnsIndex, TH);\n });\n }\n _this2.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);\n _classPrivateFieldSet(_this2, _columnHeadersCount, headerRenderers.length);\n return headerRenderers;\n },\n columnWidth: function columnWidth(renderedColumnIndex) {\n var visualIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);\n\n // It's not a bug that we can't find visual index for some handled by method indexes. The function is called also\n // for indexes that are not displayed (indexes that are beyond the grid's boundaries), i.e. when `fixedColumnsStart` > `startCols` (wrong config?) or\n // scrolling and dataset is empty (scroll should handle that?).\n return _this2.instance.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);\n },\n rowHeight: function rowHeight(renderedRowIndex) {\n var visualIndex = _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);\n return _this2.instance.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);\n },\n cellRenderer: function cellRenderer(renderedRowIndex, renderedColumnIndex, TD) {\n var _this2$translateFromR = _this2.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex),\n _this2$translateFromR2 = _slicedToArray(_this2$translateFromR, 2),\n visualRowIndex = _this2$translateFromR2[0],\n visualColumnIndex = _this2$translateFromR2[1];\n\n // Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.\n var modifiedCellCoords = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);\n var visualRowToCheck = visualRowIndex;\n var visualColumnToCheck = visualColumnIndex;\n if (Array.isArray(modifiedCellCoords)) {\n var _modifiedCellCoords = _slicedToArray(modifiedCellCoords, 2);\n visualRowToCheck = _modifiedCellCoords[0];\n visualColumnToCheck = _modifiedCellCoords[1];\n }\n var cellProperties = _this2.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);\n var prop = _this2.instance.colToProp(visualColumnToCheck);\n var value = _this2.instance.getDataAtRowProp(visualRowToCheck, prop);\n if (_this2.instance.hasHook('beforeValueRender')) {\n value = _this2.instance.runHooks('beforeValueRender', value, cellProperties);\n }\n _this2.instance.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n _this2.instance.getCellRenderer(cellProperties)(_this2.instance, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n _this2.instance.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n },\n selections: this.instance.selection.highlight,\n hideBorderOnMouseDownOver: function hideBorderOnMouseDownOver() {\n return _this2.settings.fragmentSelection;\n },\n onWindowResize: function onWindowResize() {\n if (_this2.instance && !_this2.instance.isDestroyed) {\n _this2.instance.refreshDimensions();\n }\n },\n onContainerElementResize: function onContainerElementResize() {\n if (_this2.instance && !_this2.instance.isDestroyed) {\n _this2.instance.refreshDimensions();\n }\n },\n onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n var controller = {\n row: false,\n column: false,\n cell: false\n };\n _this2.instance.listen();\n _this2.activeWt = wt;\n priv.mouseDown = true;\n _this2.instance.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n handleMouseEvent(event, {\n coords: visualCoords,\n selection: _this2.instance.selection,\n controller: controller,\n cellCoordsFactory: function cellCoordsFactory(row, column) {\n return _this2.instance._createCellCoords(row, column);\n }\n });\n _this2.instance.runHooks('afterOnCellMouseDown', event, visualCoords, TD);\n _this2.activeWt = _this2._wt;\n },\n onCellContextMenu: function onCellContextMenu(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n _this2.activeWt = wt;\n priv.mouseDown = false;\n if (_this2.instance.selection.isInProgress()) {\n _this2.instance.selection.finish();\n }\n _this2.instance.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n _this2.instance.runHooks('afterOnCellContextMenu', event, visualCoords, TD);\n _this2.activeWt = _this2._wt;\n },\n onCellMouseOut: function onCellMouseOut(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n _this2.activeWt = wt;\n _this2.instance.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n _this2.instance.runHooks('afterOnCellMouseOut', event, visualCoords, TD);\n _this2.activeWt = _this2._wt;\n },\n onCellMouseOver: function onCellMouseOver(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n var controller = {\n row: false,\n column: false,\n cell: false\n };\n _this2.activeWt = wt;\n _this2.instance.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n if (priv.mouseDown) {\n handleMouseEvent(event, {\n coords: visualCoords,\n selection: _this2.instance.selection,\n controller: controller,\n cellCoordsFactory: function cellCoordsFactory(row, column) {\n return _this2.instance._createCellCoords(row, column);\n }\n });\n }\n _this2.instance.runHooks('afterOnCellMouseOver', event, visualCoords, TD);\n _this2.activeWt = _this2._wt;\n },\n onCellMouseUp: function onCellMouseUp(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n _this2.activeWt = wt;\n _this2.instance.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);\n\n // TODO: The second condition check is a workaround. Callback corresponding the method `updateSettings`\n // disable plugin and enable it again. Disabling plugin closes the menu. Thus, calling the\n // `updateSettings` in a body of any callback executed right after some context-menu action\n // breaks the table (#7231).\n if (isImmediatePropagationStopped(event) || _this2.instance.isDestroyed) {\n return;\n }\n _this2.instance.runHooks('afterOnCellMouseUp', event, visualCoords, TD);\n _this2.activeWt = _this2._wt;\n },\n onCellCornerMouseDown: function onCellCornerMouseDown(event) {\n event.preventDefault();\n _this2.instance.runHooks('afterOnCellCornerMouseDown', event);\n },\n onCellCornerDblClick: function onCellCornerDblClick(event) {\n event.preventDefault();\n _this2.instance.runHooks('afterOnCellCornerDblClick', event);\n },\n beforeDraw: function beforeDraw(force, skipRender) {\n return _this2.beforeRender(force, skipRender);\n },\n onDraw: function onDraw(force) {\n return _this2.afterRender(force);\n },\n onScrollVertically: function onScrollVertically() {\n return _this2.instance.runHooks('afterScrollVertically');\n },\n onScrollHorizontally: function onScrollHorizontally() {\n return _this2.instance.runHooks('afterScrollHorizontally');\n },\n onBeforeRemoveCellClassNames: function onBeforeRemoveCellClassNames() {\n return _this2.instance.runHooks('beforeRemoveCellClassNames');\n },\n onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {\n var rowMapper = _this2.instance.rowIndexMapper;\n var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);\n var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);\n return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));\n },\n onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {\n var columnMapper = _this2.instance.columnIndexMapper;\n var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);\n var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);\n return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));\n },\n onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {\n var cornersOfSelection;\n var _this2$translateFromR3 = _this2.translateFromRenderableToVisualIndex(currentRow, currentColumn),\n _this2$translateFromR4 = _slicedToArray(_this2$translateFromR3, 2),\n visualRowIndex = _this2$translateFromR4[0],\n visualColumnIndex = _this2$translateFromR4[1];\n var selectedRange = _this2.instance.selection.getSelectedRange();\n var selectionRangeSize = selectedRange.size();\n if (selectionRangeSize > 0) {\n // Selection layers are stored from the \"oldest\" to the \"newest\". We should calculate the offset.\n // Please look at the `SelectedRange` class and it's method for getting selection's layer for more information.\n var selectionOffset = (layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0) + 1 - selectionRangeSize;\n var selectionForLayer = selectedRange.peekByIndex(selectionOffset);\n cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];\n }\n return _this2.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);\n },\n onBeforeDrawBorders: function onBeforeDrawBorders(corners, borderClassName) {\n var _corners = _slicedToArray(corners, 4),\n startRenderableRow = _corners[0],\n startRenderableColumn = _corners[1],\n endRenderableRow = _corners[2],\n endRenderableColumn = _corners[3];\n var visualCorners = [_this2.instance.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];\n return _this2.instance.runHooks('beforeDrawBorders', visualCorners, borderClassName);\n },\n onBeforeTouchScroll: function onBeforeTouchScroll() {\n return _this2.instance.runHooks('beforeTouchScroll');\n },\n onAfterMomentumScroll: function onAfterMomentumScroll() {\n return _this2.instance.runHooks('afterMomentumScroll');\n },\n onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(stretchedWidth, renderedColumnIndex) {\n var visualColumnIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);\n return _this2.instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);\n },\n onModifyRowHeaderWidth: function onModifyRowHeaderWidth(rowHeaderWidth) {\n return _this2.instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth);\n },\n onModifyGetCellCoords: function onModifyGetCellCoords(renderableRowIndex, renderableColumnIndex, topmost) {\n var rowMapper = _this2.instance.rowIndexMapper;\n var columnMapper = _this2.instance.columnIndexMapper;\n\n // Callback handle also headers. We shouldn't translate them.\n var visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;\n var visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;\n var visualIndexes = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);\n if (Array.isArray(visualIndexes)) {\n var _visualIndexes = _slicedToArray(visualIndexes, 4),\n visualRowFrom = _visualIndexes[0],\n visualColumnFrom = _visualIndexes[1],\n visualRowTo = _visualIndexes[2],\n visualColumnTo = _visualIndexes[3];\n\n // Result of the hook is handled by the Walkontable (renderable indexes).\n return [visualRowFrom >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowFrom, 1)) : visualRowFrom, visualColumnFrom >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnFrom, 1)) : visualColumnFrom, visualRowTo >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowTo, -1)) : visualRowTo, visualColumnTo >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnTo, -1)) : visualColumnTo];\n }\n },\n viewportRowCalculatorOverride: function viewportRowCalculatorOverride(calc) {\n var viewportOffset = _this2.settings.viewportRowRenderingOffset;\n if (viewportOffset === 'auto' && _this2.settings.fixedRowsTop) {\n viewportOffset = 10;\n }\n if (viewportOffset > 0 || viewportOffset === 'auto') {\n var renderableRows = _this2.countRenderableRows();\n var firstRenderedRow = calc.startRow;\n var lastRenderedRow = calc.endRow;\n if (typeof viewportOffset === 'number') {\n calc.startRow = Math.max(firstRenderedRow - viewportOffset, 0);\n calc.endRow = Math.min(lastRenderedRow + viewportOffset, renderableRows - 1);\n } else if (viewportOffset === 'auto') {\n var offset = Math.ceil(lastRenderedRow / renderableRows * 12);\n calc.startRow = Math.max(firstRenderedRow - offset, 0);\n calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);\n }\n }\n _this2.instance.runHooks('afterViewportRowCalculatorOverride', calc);\n },\n viewportColumnCalculatorOverride: function viewportColumnCalculatorOverride(calc) {\n var viewportOffset = _this2.settings.viewportColumnRenderingOffset;\n if (viewportOffset === 'auto' && _this2.settings.fixedColumnsStart) {\n viewportOffset = 10;\n }\n if (viewportOffset > 0 || viewportOffset === 'auto') {\n var renderableColumns = _this2.countRenderableColumns();\n var firstRenderedColumn = calc.startColumn;\n var lastRenderedColumn = calc.endColumn;\n if (typeof viewportOffset === 'number') {\n calc.startColumn = Math.max(firstRenderedColumn - viewportOffset, 0);\n calc.endColumn = Math.min(lastRenderedColumn + viewportOffset, renderableColumns - 1);\n }\n if (viewportOffset === 'auto') {\n var offset = Math.ceil(lastRenderedColumn / renderableColumns * 6);\n calc.startColumn = Math.max(firstRenderedColumn - offset, 0);\n calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);\n }\n }\n _this2.instance.runHooks('afterViewportColumnCalculatorOverride', calc);\n },\n rowHeaderWidth: function rowHeaderWidth() {\n return _this2.settings.rowHeaderWidth;\n },\n columnHeaderHeight: function columnHeaderHeight() {\n var columnHeaderHeight = _this2.instance.runHooks('modifyColumnHeaderHeight');\n return _this2.settings.columnHeaderHeight || columnHeaderHeight;\n }\n };\n this.instance.runHooks('beforeInitWalkontable', walkontableConfig);\n this._wt = new Walkontable(walkontableConfig);\n this.activeWt = this._wt;\n var spreader = this._wt.wtTable.spreader;\n // We have to cache width and height after Walkontable initialization.\n var _this$instance$rootEl = this.instance.rootElement.getBoundingClientRect(),\n width = _this$instance$rootEl.width,\n height = _this$instance$rootEl.height;\n this.setLastSize(width, height);\n this.eventManager.addEventListener(spreader, 'mousedown', function (event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === spreader && event.which === 3) {\n event.stopPropagation();\n }\n });\n this.eventManager.addEventListener(spreader, 'contextmenu', function (event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === spreader && event.which === 3) {\n event.stopPropagation();\n }\n });\n this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'click', function () {\n if (_this2.settings.observeDOMVisibility) {\n if (_this2._wt.drawInterrupted) {\n _this2.instance.forceFullRender = true;\n _this2.render();\n }\n }\n });\n }\n\n /**\n * Checks if it's possible to create text selection in element.\n *\n * @private\n * @param {HTMLElement} el The element to check.\n * @returns {boolean}\n */\n }, {\n key: \"isTextSelectionAllowed\",\n value: function isTextSelectionAllowed(el) {\n if (isInput(el)) {\n return true;\n }\n var isChildOfTableBody = isChildOf(el, this.instance.view._wt.wtTable.spreader);\n if (this.settings.fragmentSelection === true && isChildOfTableBody) {\n return true;\n }\n if (this.settings.fragmentSelection === 'cell' && this.isSelectedOnlyCell() && isChildOfTableBody) {\n return true;\n }\n if (!this.settings.fragmentSelection && this.isCellEdited() && this.isSelectedOnlyCell()) {\n return true;\n }\n return false;\n }\n\n /**\n * Checks if user's been called mousedown.\n *\n * @private\n * @returns {boolean}\n */\n }, {\n key: \"isMouseDown\",\n value: function isMouseDown() {\n return privatePool.get(this).mouseDown;\n }\n\n /**\n * Check if selected only one cell.\n *\n * @private\n * @returns {boolean}\n */\n }, {\n key: \"isSelectedOnlyCell\",\n value: function isSelectedOnlyCell() {\n var _this$instance$getSel, _this$instance$getSel2;\n return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingle()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;\n }\n\n /**\n * Checks if active cell is editing.\n *\n * @private\n * @returns {boolean}\n */\n }, {\n key: \"isCellEdited\",\n value: function isCellEdited() {\n var activeEditor = this.instance.getActiveEditor();\n return activeEditor && activeEditor.isOpened();\n }\n\n /**\n * `beforeDraw` callback.\n *\n * @private\n * @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if\n * rendering was triggered by scrolling or moving selection.\n * @param {object} skipRender Object with `skipRender` property, if it is set to `true ` the next rendering\n * cycle will be skipped.\n */\n }, {\n key: \"beforeRender\",\n value: function beforeRender(force, skipRender) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('beforeViewRender', this.instance.forceFullRender, skipRender);\n }\n }\n\n /**\n * `afterRender` callback.\n *\n * @private\n * @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if\n * rendering was triggered by scrolling or moving selection.\n */\n }, {\n key: \"afterRender\",\n value: function afterRender(force) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('afterViewRender', this.instance.forceFullRender);\n }\n }\n\n /**\n * Append row header to a TH element.\n *\n * @private\n * @param {number} visualRowIndex The visual row index.\n * @param {HTMLTableHeaderCellElement} TH The table header element.\n */\n }, {\n key: \"appendRowHeader\",\n value: function appendRowHeader(visualRowIndex, TH) {\n if (TH.firstChild) {\n var container = TH.firstChild;\n if (!hasClass(container, 'relative')) {\n empty(TH);\n this.appendRowHeader(visualRowIndex, TH);\n return;\n }\n this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.instance.getRowHeader);\n } else {\n var _this$instance4 = this.instance,\n rootDocument = _this$instance4.rootDocument,\n getRowHeader = _this$instance4.getRowHeader;\n var div = rootDocument.createElement('div');\n var span = rootDocument.createElement('span');\n div.className = 'relative';\n span.className = 'rowHeader';\n this.updateCellHeader(span, visualRowIndex, getRowHeader);\n div.appendChild(span);\n TH.appendChild(div);\n }\n this.instance.runHooks('afterGetRowHeader', visualRowIndex, TH);\n }\n\n /**\n * Append column header to a TH element.\n *\n * @private\n * @param {number} visualColumnIndex Visual column index.\n * @param {HTMLTableCellElement} TH The table header element.\n * @param {Function} [label] The function that returns the header label.\n * @param {number} [headerLevel=0] The index of header level counting from the top (positive\n * values counting from 0 to N).\n */\n }, {\n key: \"appendColHeader\",\n value: function appendColHeader(visualColumnIndex, TH) {\n var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.instance.getColHeader;\n var headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n if (TH.firstChild) {\n var container = TH.firstChild;\n if (hasClass(container, 'relative')) {\n this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label, headerLevel);\n } else {\n empty(TH);\n this.appendColHeader(visualColumnIndex, TH, label, headerLevel);\n }\n } else {\n var rootDocument = this.instance.rootDocument;\n var div = rootDocument.createElement('div');\n var span = rootDocument.createElement('span');\n div.className = 'relative';\n span.className = 'colHeader';\n this.updateCellHeader(span, visualColumnIndex, label, headerLevel);\n div.appendChild(span);\n TH.appendChild(div);\n }\n this.instance.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);\n }\n\n /**\n * Updates header cell content.\n *\n * @private\n * @param {HTMLElement} element Element to update.\n * @param {number} index Row index or column index.\n * @param {Function} content Function which should be returns content for this cell.\n * @param {number} [headerLevel=0] The index of header level counting from the top (positive\n * values counting from 0 to N).\n */\n }, {\n key: \"updateCellHeader\",\n value: function updateCellHeader(element, index, content) {\n var headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var renderedIndex = index;\n var parentOverlay = this._wt.wtOverlays.getParentOverlay(element) || this._wt;\n\n // prevent wrong calculations from SampleGenerator\n if (element.parentNode) {\n if (hasClass(element, 'colHeader')) {\n renderedIndex = parentOverlay.wtTable.columnFilter.sourceToRendered(index);\n } else if (hasClass(element, 'rowHeader')) {\n renderedIndex = parentOverlay.wtTable.rowFilter.sourceToRendered(index);\n }\n }\n if (renderedIndex > -1) {\n fastInnerHTML(element, content(index, headerLevel));\n } else {\n // workaround for https://github.com/handsontable/handsontable/issues/1946\n fastInnerText(element, String.fromCharCode(160));\n addClass(element, 'cornerHeader');\n }\n }\n\n /**\n * Given a element's left (or right in RTL mode) position relative to the viewport, returns maximum\n * element width until the right (or left) edge of the viewport (before scrollbar).\n *\n * @private\n * @param {number} inlineOffset The left (or right in RTL mode) offset.\n * @returns {number}\n */\n }, {\n key: \"maximumVisibleElementWidth\",\n value: function maximumVisibleElementWidth(inlineOffset) {\n var workspaceWidth = this._wt.wtViewport.getWorkspaceWidth();\n var maxWidth = workspaceWidth - inlineOffset;\n return maxWidth > 0 ? maxWidth : 0;\n }\n\n /**\n * Given a element's top position relative to the viewport, returns maximum element height until the bottom\n * edge of the viewport (before scrollbar).\n *\n * @private\n * @param {number} topOffset The top offset.\n * @returns {number}\n */\n }, {\n key: \"maximumVisibleElementHeight\",\n value: function maximumVisibleElementHeight(topOffset) {\n var workspaceHeight = this._wt.wtViewport.getWorkspaceHeight();\n var maxHeight = workspaceHeight - topOffset;\n return maxHeight > 0 ? maxHeight : 0;\n }\n\n /**\n * Sets new dimensions of the container.\n *\n * @param {number} width The table width.\n * @param {number} height The table height.\n */\n }, {\n key: \"setLastSize\",\n value: function setLastSize(width, height) {\n var priv = privatePool.get(this);\n var _ref2 = [width, height];\n priv.lastWidth = _ref2[0];\n priv.lastHeight = _ref2[1];\n }\n\n /**\n * Returns cached dimensions.\n *\n * @returns {object}\n */\n }, {\n key: \"getLastSize\",\n value: function getLastSize() {\n var priv = privatePool.get(this);\n return {\n width: priv.lastWidth,\n height: priv.lastHeight\n };\n }\n\n /**\n * Returns the first fully visible row in the table viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getFirstFullyVisibleRow\",\n value: function getFirstFullyVisibleRow() {\n return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow());\n }\n\n /**\n * Returns the last fully visible row in the table viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getLastFullyVisibleRow\",\n value: function getLastFullyVisibleRow() {\n return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow());\n }\n\n /**\n * Returns the first fully visible column in the table viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getFirstFullyVisibleColumn\",\n value: function getFirstFullyVisibleColumn() {\n return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn());\n }\n\n /**\n * Returns the last fully visible column in the table viewport.\n *\n * @returns {number}\n */\n }, {\n key: \"getLastFullyVisibleColumn\",\n value: function getLastFullyVisibleColumn() {\n return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());\n }\n\n /**\n * Returns the total count of the rendered column headers.\n *\n * @returns {number}\n */\n }, {\n key: \"getColumnHeadersCount\",\n value: function getColumnHeadersCount() {\n return _classPrivateFieldGet(this, _columnHeadersCount);\n }\n\n /**\n * Returns the total count of the rendered row headers.\n *\n * @returns {number}\n */\n }, {\n key: \"getRowHeadersCount\",\n value: function getRowHeadersCount() {\n return _classPrivateFieldGet(this, _rowHeadersCount);\n }\n\n /**\n * Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.\n *\n * @private\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._wt.destroy();\n this.eventManager.destroy();\n }\n }]);\n return TableView;\n}();\nexport default TableView;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { deepObjectSize, isObject } from \"./object.mjs\";\nvar COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nvar COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;\n\n/**\n * Generates spreadsheet-like column names: A, B, C, ..., Z, AA, AB, etc.\n *\n * @param {number} index Column index.\n * @returns {string}\n */\nexport function spreadsheetColumnLabel(index) {\n var dividend = index + 1;\n var columnLabel = '';\n var modulo;\n while (dividend > 0) {\n modulo = (dividend - 1) % COLUMN_LABEL_BASE_LENGTH;\n columnLabel = String.fromCharCode(65 + modulo) + columnLabel;\n dividend = parseInt((dividend - modulo) / COLUMN_LABEL_BASE_LENGTH, 10);\n }\n return columnLabel;\n}\n\n/**\n * Generates spreadsheet-like column index from theirs labels: A, B, C ...., Z, AA, AB, etc.\n *\n * @param {string} label Column label.\n * @returns {number}\n */\nexport function spreadsheetColumnIndex(label) {\n var result = 0;\n if (label) {\n for (var i = 0, j = label.length - 1; i < label.length; i += 1, j -= 1) {\n result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1);\n }\n }\n result -= 1;\n return result;\n}\n\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", ...\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} columns Number of columns to generate.\n * @returns {Array}\n */\nexport function createSpreadsheetData() {\n var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;\n var columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;\n var _rows = [];\n var i;\n var j;\n for (i = 0; i < rows; i++) {\n var row = [];\n for (j = 0; j < columns; j++) {\n row.push(spreadsheetColumnLabel(j) + (i + 1));\n }\n _rows.push(row);\n }\n return _rows;\n}\n\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", as an array of objects.\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} colCount Number of columns to generate.\n * @returns {Array}\n */\nexport function createSpreadsheetObjectData() {\n var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;\n var colCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;\n var _rows = [];\n var i;\n var j;\n for (i = 0; i < rows; i++) {\n var row = {};\n for (j = 0; j < colCount; j++) {\n row[\"prop\".concat(j)] = spreadsheetColumnLabel(j) + (i + 1);\n }\n _rows.push(row);\n }\n return _rows;\n}\n\n/**\n * Generates an empty data object.\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} columns Number of columns to generate.\n * @returns {Array}\n */\nexport function createEmptySpreadsheetData(rows, columns) {\n var data = [];\n var row;\n for (var i = 0; i < rows; i++) {\n row = [];\n for (var j = 0; j < columns; j++) {\n row.push('');\n }\n data.push(row);\n }\n return data;\n}\n\n/**\n * Transform a data row (either an array or an object) or an array of data rows to array of changes in a form of `[row,\n * prop/col, value]`. Convenient to use with `setDataAtRowProp` and `setSourceDataAtCell` methods.\n *\n * @param {Array|object} dataRow Object of row data, array of row data or an array of either.\n * @param {number} rowOffset Row offset to be passed to the resulting change list. Defaults to `0`.\n * @returns {Array} Array of changes (in a form of an array).\n */\nexport function dataRowToChangesArray(dataRow) {\n var rowOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var dataRows = dataRow;\n var changesArray = [];\n if (!Array.isArray(dataRow) || !Array.isArray(dataRow[0])) {\n dataRows = [dataRow];\n }\n dataRows.forEach(function (row, rowIndex) {\n if (Array.isArray(row)) {\n row.forEach(function (value, column) {\n changesArray.push([rowIndex + rowOffset, column, value]);\n });\n } else {\n Object.keys(row).forEach(function (propName) {\n changesArray.push([rowIndex + rowOffset, propName, row[propName]]);\n });\n }\n });\n return changesArray;\n}\n\n/**\n * Count the number of keys (or, basically, columns when the data is an array or arrays) in the first row of the\n * provided dataset.\n *\n * @param {Array} data The dataset.\n * @returns {number} Number of keys in the first row of the dataset.\n */\nexport function countFirstRowKeys(data) {\n var result = 0;\n if (Array.isArray(data)) {\n if (data[0] && Array.isArray(data[0])) {\n result = data[0].length;\n } else if (data[0] && isObject(data[0])) {\n result = deepObjectSize(data[0]);\n }\n }\n return result;\n}\n\n/**\n * Check whether the provided dataset is a *non-empty* array of arrays.\n *\n * @param {Array} data Dataset to be checked.\n * @returns {boolean} `true` if data is an array of arrays, `false` otherwise.\n */\nexport function isArrayOfArrays(data) {\n return !!(Array.isArray(data) && data.length && data.every(function (el) {\n return Array.isArray(el);\n }));\n}\n\n/**\n * Check whether the provided dataset is a *non-empty* array of objects.\n *\n * @param {Array} data Dataset to be checked.\n * @returns {boolean} `true` if data is an array of objects, `false` otherwise.\n */\nexport function isArrayOfObjects(data) {\n return !!(Array.isArray(data) && data.length && data.every(function (el) {\n return _typeof(el) === 'object' && !Array.isArray(el) && el !== null;\n }));\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createObjectPropListener, getProperty, isObject, objectEach, setProperty } from \"../helpers/object.mjs\";\nimport { countFirstRowKeys as _countFirstRowKeys } from \"../helpers/data.mjs\";\nimport { arrayEach } from \"../helpers/array.mjs\";\nimport { rangeEach } from \"../helpers/number.mjs\";\nimport { isFunction } from \"../helpers/function.mjs\";\n/**\n * @class DataSource\n * @private\n */\nvar DataSource = /*#__PURE__*/function () {\n function DataSource(hotInstance) {\n var dataSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n _classCallCheck(this, DataSource);\n /**\n * Instance of Handsontable.\n *\n * @type {Handsontable}\n */\n this.hot = hotInstance;\n /**\n * Data source.\n *\n * @type {Array}\n */\n this.data = dataSource;\n /**\n * Type of data source.\n *\n * @type {string}\n * @default 'array'\n */\n this.dataType = 'array';\n this.colToProp = function () {};\n this.propToCol = function () {};\n }\n\n /**\n * Run the `modifyRowData` hook and return either the modified or the source data for the provided row.\n *\n * @private\n * @param {number} rowIndex Row index.\n * @returns {Array|object} Source or modified row of data.\n */\n _createClass(DataSource, [{\n key: \"modifyRowData\",\n value: function modifyRowData(rowIndex) {\n var modifyRowData;\n if (this.hot.hasHook('modifyRowData')) {\n modifyRowData = this.hot.runHooks('modifyRowData', rowIndex);\n }\n return modifyRowData !== void 0 && !Number.isInteger(modifyRowData) ? modifyRowData : this.data[rowIndex];\n }\n\n /**\n * Get all data.\n *\n * @param {boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n }, {\n key: \"getData\",\n value: function getData() {\n var toArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!this.data || this.data.length === 0) {\n return this.data;\n }\n return this.getByRange(null, null, toArray);\n }\n\n /**\n * Set new data source.\n *\n * @param {Array} data The new data.\n */\n }, {\n key: \"setData\",\n value: function setData(data) {\n this.data = data;\n }\n\n /**\n * Returns array of column values from the data source. `column` is the index of the row in the data source.\n *\n * @param {number} column Visual column index.\n * @returns {Array}\n */\n }, {\n key: \"getAtColumn\",\n value: function getAtColumn(column) {\n var _this = this;\n var result = [];\n arrayEach(this.data, function (row, rowIndex) {\n var value = _this.getAtCell(rowIndex, column);\n result.push(value);\n });\n return result;\n }\n\n /**\n * Returns a single row of the data or a subset of its columns. If a column range or `toArray` arguments are provided, it\n * operates only on the columns declared by the `columns` setting or the data schema.\n *\n * @param {number} row Physical row index.\n * @param {number} [startColumn] Starting index for the column range (optional).\n * @param {number} [endColumn] Ending index for the column range (optional).\n * @param {boolean} [toArray=false] `true` if the returned value should be forced to be presented as an array.\n * @returns {Array|object}\n */\n }, {\n key: \"getAtRow\",\n value: function getAtRow(row, startColumn, endColumn) {\n var _this2 = this;\n var toArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var getAllProps = startColumn === void 0 && endColumn === void 0;\n var dataRow = null;\n var newDataRow = null;\n dataRow = this.modifyRowData(row);\n if (Array.isArray(dataRow)) {\n newDataRow = [];\n if (getAllProps) {\n dataRow.forEach(function (cell, column) {\n newDataRow[column] = _this2.getAtPhysicalCell(row, column, dataRow);\n });\n } else {\n // Only the columns from the provided range\n rangeEach(startColumn, endColumn, function (column) {\n newDataRow[column - startColumn] = _this2.getAtPhysicalCell(row, column, dataRow);\n });\n }\n } else if (isObject(dataRow) || isFunction(dataRow)) {\n if (toArray) {\n newDataRow = [];\n } else {\n newDataRow = {};\n }\n if (!getAllProps || toArray) {\n var rangeStart = 0;\n var rangeEnd = this.countFirstRowKeys() - 1;\n rangeEach(rangeStart, rangeEnd, function (column) {\n var prop = _this2.colToProp(column);\n if (column >= (startColumn || rangeStart) && column <= (endColumn || rangeEnd) && !Number.isInteger(prop)) {\n var cellValue = _this2.getAtPhysicalCell(row, prop, dataRow);\n if (toArray) {\n newDataRow.push(cellValue);\n } else {\n setProperty(newDataRow, prop, cellValue);\n }\n }\n });\n } else {\n objectEach(dataRow, function (value, prop) {\n setProperty(newDataRow, prop, _this2.getAtPhysicalCell(row, prop, dataRow));\n });\n }\n }\n return newDataRow;\n }\n\n /**\n * Set the provided value in the source data set at the provided coordinates.\n *\n * @param {number} row Physical row index.\n * @param {number|string} column Property name / physical column index.\n * @param {*} value The value to be set at the provided coordinates.\n */\n }, {\n key: \"setAtCell\",\n value: function setAtCell(row, column, value) {\n if (row >= this.countRows() || column >= this.countFirstRowKeys()) {\n // Not enough rows and/or columns.\n return;\n }\n if (this.hot.hasHook('modifySourceData')) {\n var valueHolder = createObjectPropListener(value);\n this.hot.runHooks('modifySourceData', row, column, valueHolder, 'set');\n if (valueHolder.isTouched()) {\n value = valueHolder.value;\n }\n }\n if (!Number.isInteger(column)) {\n // column argument is the prop name\n setProperty(this.data[row], column, value);\n } else {\n this.data[row][column] = value;\n }\n }\n\n /**\n * Get data from the source data set using the physical indexes.\n *\n * @private\n * @param {number} row Physical row index.\n * @param {string|number|Function} column Physical column index / property / function.\n * @param {Array|object} dataRow A representation of a data row.\n * @returns {*} Value at the provided coordinates.\n */\n }, {\n key: \"getAtPhysicalCell\",\n value: function getAtPhysicalCell(row, column, dataRow) {\n var result = null;\n if (dataRow) {\n if (typeof column === 'string') {\n result = getProperty(dataRow, column);\n } else if (typeof column === 'function') {\n result = column(dataRow);\n } else {\n result = dataRow[column];\n }\n }\n if (this.hot.hasHook('modifySourceData')) {\n var valueHolder = createObjectPropListener(result);\n this.hot.runHooks('modifySourceData', row, column, valueHolder, 'get');\n if (valueHolder.isTouched()) {\n result = valueHolder.value;\n }\n }\n return result;\n }\n\n /**\n * Returns a single value from the data.\n *\n * @param {number} row Physical row index.\n * @param {number} columnOrProp Visual column index or property.\n * @returns {*}\n */\n }, {\n key: \"getAtCell\",\n value: function getAtCell(row, columnOrProp) {\n var dataRow = this.modifyRowData(row);\n return this.getAtPhysicalCell(row, this.colToProp(columnOrProp), dataRow);\n }\n\n /**\n * Returns source data by passed range.\n *\n * @param {object} [start] Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).\n * @param {object} [end] Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).\n * @param {boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n }, {\n key: \"getByRange\",\n value: function getByRange() {\n var _this3 = this;\n var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var toArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var getAllProps = false;\n var startRow = null;\n var startCol = null;\n var endRow = null;\n var endCol = null;\n if (start === null || end === null) {\n getAllProps = true;\n startRow = 0;\n endRow = this.countRows() - 1;\n } else {\n startRow = Math.min(start.row, end.row);\n startCol = Math.min(start.col, end.col);\n endRow = Math.max(start.row, end.row);\n endCol = Math.max(start.col, end.col);\n }\n var result = [];\n rangeEach(startRow, endRow, function (currentRow) {\n result.push(getAllProps ? _this3.getAtRow(currentRow, void 0, void 0, toArray) : _this3.getAtRow(currentRow, startCol, endCol, toArray));\n });\n return result;\n }\n\n /**\n * Count number of rows.\n *\n * @returns {number}\n */\n }, {\n key: \"countRows\",\n value: function countRows() {\n if (this.hot.hasHook('modifySourceLength')) {\n var modifiedSourceLength = this.hot.runHooks('modifySourceLength');\n if (Number.isInteger(modifiedSourceLength)) {\n return modifiedSourceLength;\n }\n }\n return this.data.length;\n }\n\n /**\n * Count number of columns.\n *\n * @returns {number}\n */\n }, {\n key: \"countFirstRowKeys\",\n value: function countFirstRowKeys() {\n return _countFirstRowKeys(this.data);\n }\n\n /**\n * Destroy instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.data = null;\n this.hot = null;\n }\n }]);\n return DataSource;\n}();\nexport default DataSource;","import { defineGetter } from \"./../helpers/object.mjs\";\nimport { fastCall } from \"./../helpers/function.mjs\";\nvar MIXIN_NAME = 'localHooks';\n\n/**\n * Mixin object to extend objects functionality for local hooks.\n *\n * @type {object}\n */\nvar localHooks = {\n /**\n * Internal hooks storage.\n */\n _localHooks: Object.create(null),\n /**\n * Add hook to the collection.\n *\n * @param {string} key The hook name.\n * @param {Function} callback The hook callback.\n * @returns {object}\n */\n addLocalHook: function addLocalHook(key, callback) {\n if (!this._localHooks[key]) {\n this._localHooks[key] = [];\n }\n this._localHooks[key].push(callback);\n return this;\n },\n /**\n * Run hooks.\n *\n * @param {string} key The name of the hook to run.\n * @param {*} [arg1] An additional parameter passed to the callback function.\n * @param {*} [arg2] An additional parameter passed to the callback function.\n * @param {*} [arg3] An additional parameter passed to the callback function.\n * @param {*} [arg4] An additional parameter passed to the callback function.\n * @param {*} [arg5] An additional parameter passed to the callback function.\n * @param {*} [arg6] An additional parameter passed to the callback function.\n */\n runLocalHooks: function runLocalHooks(key, arg1, arg2, arg3, arg4, arg5, arg6) {\n if (this._localHooks[key]) {\n var length = this._localHooks[key].length;\n\n // don't optimize this loop with the `arrayEach()` method or arrow functions\n // otherwise, performance will decrease because of garbage collection\n // using the `...rest` syntax (ES6 and later) will decrease performance as well\n for (var i = 0; i < length; i++) {\n fastCall(this._localHooks[key][i], this, arg1, arg2, arg3, arg4, arg5, arg6);\n }\n }\n },\n /**\n * Clear all added hooks.\n *\n * @returns {object}\n */\n clearLocalHooks: function clearLocalHooks() {\n this._localHooks = {};\n return this;\n }\n};\ndefineGetter(localHooks, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default localHooks;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\n/**\n * Map for storing mappings from an index to a value.\n *\n * @class IndexMap\n */\nexport var IndexMap = /*#__PURE__*/function () {\n function IndexMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n _classCallCheck(this, IndexMap);\n /**\n * List of values for particular indexes.\n *\n * @private\n * @type {Array}\n */\n this.indexedValues = [];\n /**\n * Initial value or function for each existing index.\n *\n * @private\n * @type {*}\n */\n this.initValueOrFn = initValueOrFn;\n }\n\n /**\n * Get full list of values for particular indexes.\n *\n * @returns {Array}\n */\n _createClass(IndexMap, [{\n key: \"getValues\",\n value: function getValues() {\n return this.indexedValues;\n }\n\n /**\n * Get value for the particular index.\n *\n * @param {number} index Index for which value is got.\n * @returns {*}\n */\n }, {\n key: \"getValueAtIndex\",\n value: function getValueAtIndex(index) {\n var values = this.indexedValues;\n if (index < values.length) {\n return values[index];\n }\n }\n\n /**\n * Set new values for particular indexes.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @param {Array} values List of set values.\n */\n }, {\n key: \"setValues\",\n value: function setValues(values) {\n this.indexedValues = values.slice();\n this.runLocalHooks('change');\n }\n\n /**\n * Set new value for the particular index.\n *\n * @param {number} index The index.\n * @param {*} value The value to save.\n *\n * Note: Please keep in mind that it is not possible to set value beyond the map (not respecting already set\n * map's size). Please use the `setValues` method when you would like to extend the map.\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @returns {boolean}\n */\n }, {\n key: \"setValueAtIndex\",\n value: function setValueAtIndex(index, value) {\n if (index < this.indexedValues.length) {\n this.indexedValues[index] = value;\n this.runLocalHooks('change');\n return true;\n }\n return false;\n }\n\n /**\n * Clear all values to the defaults.\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.setDefaultValues();\n }\n\n /**\n * Get length of the index map.\n *\n * @returns {number}\n */\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.getValues().length;\n }\n\n /**\n * Set default values for elements from `0` to `n`, where `n` is equal to the handled variable.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n * @param {number} [length] Length of list.\n */\n }, {\n key: \"setDefaultValues\",\n value: function setDefaultValues() {\n var _this = this;\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.indexedValues.length;\n this.indexedValues.length = 0;\n if (isFunction(this.initValueOrFn)) {\n rangeEach(length - 1, function (index) {\n return _this.indexedValues.push(_this.initValueOrFn(index));\n });\n } else {\n rangeEach(length - 1, function () {\n return _this.indexedValues.push(_this.initValueOrFn);\n });\n }\n this.runLocalHooks('change');\n }\n\n /**\n * Initialize list with default values for particular indexes.\n *\n * @private\n * @param {number} length New length of indexed list.\n * @returns {IndexMap}\n */\n }, {\n key: \"init\",\n value: function init(length) {\n this.setDefaultValues(length);\n this.runLocalHooks('init');\n return this;\n }\n\n /**\n * Add values to the list.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n */\n }, {\n key: \"insert\",\n value: function insert() {\n this.runLocalHooks('change');\n }\n\n /**\n * Remove values from the list.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n */\n }, {\n key: \"remove\",\n value: function remove() {\n this.runLocalHooks('change');\n }\n\n /**\n * Destroys the Map instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.clearLocalHooks();\n this.indexedValues = null;\n this.initValueOrFn = null;\n }\n }]);\n return IndexMap;\n}();\nmixin(IndexMap, localHooks);","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { arrayFilter } from \"../../../helpers/array.mjs\";\n/**\n * Insert new items to the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @returns {Array} List with new mappings.\n */\nexport function getListWithInsertedItems(indexedValues, insertionIndex, insertedIndexes) {\n return [].concat(_toConsumableArray(indexedValues.slice(0, insertionIndex)), _toConsumableArray(insertedIndexes), _toConsumableArray(indexedValues.slice(insertionIndex)));\n}\n\n/**\n * Filter items from the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} Reduced list of mappings.\n */\nexport function getListWithRemovedItems(indexedValues, removedIndexes) {\n return arrayFilter(indexedValues, function (index) {\n return removedIndexes.includes(index) === false;\n });\n}","import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport { arrayMap } from \"../../../helpers/array.mjs\";\n/**\n * Transform mappings after removal.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} List with decreased indexes.\n */\nexport function getDecreasedIndexes(indexedValues, removedIndexes) {\n return arrayMap(indexedValues, function (index) {\n return index - removedIndexes.filter(function (removedIndex) {\n return removedIndex < index;\n }).length;\n });\n}\n\n/**\n * Transform mappings after insertion.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @returns {Array} List with increased indexes.\n */\nexport function getIncreasedIndexes(indexedValues, insertedIndexes) {\n var firstInsertedIndex = insertedIndexes[0];\n var amountOfIndexes = insertedIndexes.length;\n return arrayMap(indexedValues, function (index) {\n if (index >= firstInsertedIndex) {\n return index + amountOfIndexes;\n }\n return index;\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.reflect.get.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { IndexMap } from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/indexesSequence.mjs\";\nimport { getDecreasedIndexes, getIncreasedIndexes } from \"./utils/index.mjs\";\n/**\n * Map for storing mappings from an index to a physical index.\n *\n * It also updates the physical indexes (remaining in the map) on remove/add row or column action.\n *\n * @class IndexesSequence\n */\nexport var IndexesSequence = /*#__PURE__*/function (_IndexMap) {\n _inherits(IndexesSequence, _IndexMap);\n var _super = _createSuper(IndexesSequence);\n function IndexesSequence() {\n _classCallCheck(this, IndexesSequence);\n // Not handling custom init function or init value.\n return _super.call(this, function (index) {\n return index;\n });\n }\n\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n _createClass(IndexesSequence, [{\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n var listAfterUpdate = getIncreasedIndexes(this.indexedValues, insertedIndexes);\n this.indexedValues = getListWithInsertedItems(listAfterUpdate, insertionIndex, insertedIndexes);\n _get(_getPrototypeOf(IndexesSequence.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n var listAfterUpdate = getListWithRemovedItems(this.indexedValues, removedIndexes);\n this.indexedValues = getDecreasedIndexes(listAfterUpdate, removedIndexes);\n _get(_getPrototypeOf(IndexesSequence.prototype), \"remove\", this).call(this, removedIndexes);\n }\n }]);\n return IndexesSequence;\n}(IndexMap);","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { isFunction } from \"../../../helpers/function.mjs\";\nimport { arrayFilter } from \"../../../helpers/array.mjs\";\n/**\n * Insert new items to the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @param {*} insertedValuesMapping Mapping which may provide value or function returning value for the specific parameters.\n * @returns {Array} List with new mappings.\n */\nexport function getListWithInsertedItems(indexedValues, insertionIndex, insertedIndexes, insertedValuesMapping) {\n var firstInsertedIndex = insertedIndexes.length ? insertedIndexes[0] : void 0;\n return [].concat(_toConsumableArray(indexedValues.slice(0, firstInsertedIndex)), _toConsumableArray(insertedIndexes.map(function (insertedIndex, ordinalNumber) {\n if (isFunction(insertedValuesMapping)) {\n return insertedValuesMapping(insertedIndex, ordinalNumber);\n }\n return insertedValuesMapping;\n })), _toConsumableArray(firstInsertedIndex === void 0 ? [] : indexedValues.slice(firstInsertedIndex)));\n}\n\n/**\n * Filter items from the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} Reduced list of mappings.\n */\nexport function getListWithRemovedItems(indexedValues, removedIndexes) {\n return arrayFilter(indexedValues, function (_, index) {\n return removedIndexes.includes(index) === false;\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.reflect.get.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { IndexMap } from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/physicallyIndexed.mjs\";\n/**\n * Map for storing mappings from an physical index to a value.\n *\n * Does not update stored values on remove/add row or column action.\n *\n * @class PhysicalIndexToValueMap\n */\nexport var PhysicalIndexToValueMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(PhysicalIndexToValueMap, _IndexMap);\n var _super = _createSuper(PhysicalIndexToValueMap);\n function PhysicalIndexToValueMap() {\n _classCallCheck(this, PhysicalIndexToValueMap);\n return _super.apply(this, arguments);\n }\n _createClass(PhysicalIndexToValueMap, [{\n key: \"insert\",\n value:\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n function insert(insertionIndex, insertedIndexes) {\n this.indexedValues = getListWithInsertedItems(this.indexedValues, insertionIndex, insertedIndexes, this.initValueOrFn);\n _get(_getPrototypeOf(PhysicalIndexToValueMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n this.indexedValues = getListWithRemovedItems(this.indexedValues, removedIndexes);\n _get(_getPrototypeOf(PhysicalIndexToValueMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n }]);\n return PhysicalIndexToValueMap;\n}(IndexMap);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { PhysicalIndexToValueMap } from \"./physicalIndexToValueMap.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\n/**\n * Map for storing mappings from an physical index to a boolean value. It stores information whether physical index is\n * included in a dataset, but skipped in the process of rendering.\n *\n * @class HidingMap\n */\nexport var HidingMap = /*#__PURE__*/function (_PhysicalIndexToValue) {\n _inherits(HidingMap, _PhysicalIndexToValue);\n var _super = _createSuper(HidingMap);\n function HidingMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n _classCallCheck(this, HidingMap);\n return _super.call(this, initValueOrFn);\n }\n\n /**\n * Get physical indexes which are hidden.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @returns {Array}\n */\n _createClass(HidingMap, [{\n key: \"getHiddenIndexes\",\n value: function getHiddenIndexes() {\n return arrayReduce(this.getValues(), function (indexesList, isHidden, physicalIndex) {\n if (isHidden) {\n indexesList.push(physicalIndex);\n }\n return indexesList;\n }, []);\n }\n }]);\n return HidingMap;\n}(PhysicalIndexToValueMap);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.reflect.get.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { IndexMap } from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/physicallyIndexed.mjs\";\nimport { getListWithRemovedItems as getListWithoutIndexes } from \"./utils/indexesSequence.mjs\";\nimport { getDecreasedIndexes, getIncreasedIndexes } from \"./utils/actionsOnIndexes.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\n/**\n * Map for storing mappings from an physical index to a value. Those entries are linked and stored in a certain order.\n *\n * It does not update stored values on remove/add row or column action. Otherwise, order of entries is updated after\n * such changes.\n *\n * @class LinkedPhysicalIndexToValueMap\n */\nexport var LinkedPhysicalIndexToValueMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(LinkedPhysicalIndexToValueMap, _IndexMap);\n var _super = _createSuper(LinkedPhysicalIndexToValueMap);\n function LinkedPhysicalIndexToValueMap() {\n var _this;\n _classCallCheck(this, LinkedPhysicalIndexToValueMap);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n /**\n * Indexes and values corresponding to them (entries) are stored in a certain order.\n *\n * @private\n * @type {Array}\n */\n _defineProperty(_assertThisInitialized(_this), \"orderOfIndexes\", []);\n return _this;\n }\n _createClass(LinkedPhysicalIndexToValueMap, [{\n key: \"getValues\",\n value:\n /**\n * Get full list of ordered values for particular indexes.\n *\n * @returns {Array}\n */\n function getValues() {\n var _this2 = this;\n return this.orderOfIndexes.map(function (physicalIndex) {\n return _this2.indexedValues[physicalIndex];\n });\n }\n\n /**\n * Set new values for particular indexes. Entries are linked and stored in a certain order.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @param {Array} values List of set values.\n */\n }, {\n key: \"setValues\",\n value: function setValues(values) {\n this.orderOfIndexes = _toConsumableArray(Array(values.length).keys());\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValues\", this).call(this, values);\n }\n\n /**\n * Set value at index and add it to the linked list of entries. Entries are stored in a certain order.\n *\n * Note: Value will be added at the end of the queue.\n *\n * @param {number} index The index.\n * @param {*} value The value to save.\n * @param {number} position Position to which entry will be added.\n *\n * @returns {boolean}\n */\n }, {\n key: \"setValueAtIndex\",\n value: function setValueAtIndex(index, value) {\n var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.orderOfIndexes.length;\n if (index < this.indexedValues.length) {\n this.indexedValues[index] = value;\n if (this.orderOfIndexes.includes(index) === false) {\n this.orderOfIndexes.splice(position, 0, index);\n }\n this.runLocalHooks('change');\n return true;\n }\n return false;\n }\n\n /**\n * Clear value for particular index.\n *\n * @param {number} physicalIndex Physical index.\n */\n }, {\n key: \"clearValue\",\n value: function clearValue(physicalIndex) {\n this.orderOfIndexes = getListWithoutIndexes(this.orderOfIndexes, [physicalIndex]);\n if (isFunction(this.initValueOrFn)) {\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValueAtIndex\", this).call(this, physicalIndex, this.initValueOrFn(physicalIndex));\n } else {\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValueAtIndex\", this).call(this, physicalIndex, this.initValueOrFn);\n }\n }\n\n /**\n * Get length of the index map.\n *\n * @returns {number}\n */\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.orderOfIndexes.length;\n }\n\n /**\n * Set default values for elements from `0` to `n`, where `n` is equal to the handled variable.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n * @param {number} [length] Length of list.\n */\n }, {\n key: \"setDefaultValues\",\n value: function setDefaultValues() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.indexedValues.length;\n this.orderOfIndexes.length = 0;\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setDefaultValues\", this).call(this, length);\n }\n\n /**\n * Add values to list and reorganize. It updates list of indexes related to ordered values.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n }, {\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n this.indexedValues = getListWithInsertedItems(this.indexedValues, insertionIndex, insertedIndexes, this.initValueOrFn);\n this.orderOfIndexes = getIncreasedIndexes(this.orderOfIndexes, insertedIndexes);\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n\n /**\n * Remove values from the list and reorganize. It updates list of indexes related to ordered values.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n this.indexedValues = getListWithRemovedItems(this.indexedValues, removedIndexes);\n this.orderOfIndexes = getListWithoutIndexes(this.orderOfIndexes, removedIndexes);\n this.orderOfIndexes = getDecreasedIndexes(this.orderOfIndexes, removedIndexes);\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n\n /**\n * Get every entry containing index and value, respecting order of indexes.\n *\n * @returns {Array}\n */\n }, {\n key: \"getEntries\",\n value: function getEntries() {\n var _this3 = this;\n return this.orderOfIndexes.map(function (physicalIndex) {\n return [physicalIndex, _this3.getValueAtIndex(physicalIndex)];\n });\n }\n }]);\n return LinkedPhysicalIndexToValueMap;\n}(IndexMap);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { PhysicalIndexToValueMap } from \"./physicalIndexToValueMap.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\n/**\n * Map for storing mappings from an physical index to a boolean value. It stores information whether physical index is\n * NOT included in a dataset and skipped in the process of rendering.\n *\n * @class TrimmingMap\n */\nexport var TrimmingMap = /*#__PURE__*/function (_PhysicalIndexToValue) {\n _inherits(TrimmingMap, _PhysicalIndexToValue);\n var _super = _createSuper(TrimmingMap);\n function TrimmingMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n _classCallCheck(this, TrimmingMap);\n return _super.call(this, initValueOrFn);\n }\n\n /**\n * Get physical indexes which are trimmed.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @returns {Array}\n */\n _createClass(TrimmingMap, [{\n key: \"getTrimmedIndexes\",\n value: function getTrimmedIndexes() {\n return arrayReduce(this.getValues(), function (indexesList, isTrimmed, physicalIndex) {\n if (isTrimmed) {\n indexesList.push(physicalIndex);\n }\n return indexesList;\n }, []);\n }\n }]);\n return TrimmingMap;\n}(PhysicalIndexToValueMap);","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { HidingMap } from \"./hidingMap.mjs\";\nimport { IndexMap } from \"./indexMap.mjs\";\nimport { LinkedPhysicalIndexToValueMap } from \"./linkedPhysicalIndexToValueMap.mjs\";\nimport { PhysicalIndexToValueMap } from \"./physicalIndexToValueMap.mjs\";\nimport { TrimmingMap } from \"./trimmingMap.mjs\";\nexport * from \"./indexesSequence.mjs\";\nexport * from \"./utils/indexesSequence.mjs\";\nexport { HidingMap, IndexMap, LinkedPhysicalIndexToValueMap, PhysicalIndexToValueMap, TrimmingMap };\nvar availableIndexMapTypes = new Map([['hiding', HidingMap], ['index', IndexMap], ['linkedPhysicalIndexToValue', LinkedPhysicalIndexToValueMap], ['physicalIndexToValue', PhysicalIndexToValueMap], ['trimming', TrimmingMap]]);\n\n/**\n * Creates and returns new IndexMap instance.\n *\n * @param {string} mapType The type of the map.\n * @param {*} [initValueOrFn=null] Initial value or function for index map.\n * @returns {IndexMap}\n */\nexport function createIndexMap(mapType) {\n var initValueOrFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n if (!availableIndexMapTypes.has(mapType)) {\n throw new Error(\"The provided map type (\\\"\".concat(mapType, \"\\\") does not exist.\"));\n }\n return new (availableIndexMapTypes.get(mapType))(initValueOrFn);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isUndefined, isDefined } from \"../../helpers/mixed.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\"; // Counter for checking if there is a memory leak.\nvar registeredMaps = 0;\n\n/**\n * Collection of index maps having unique names. It allow us to perform bulk operations such as init, remove, insert on all index maps that have been registered in the collection.\n */\nexport var MapCollection = /*#__PURE__*/function () {\n function MapCollection() {\n _classCallCheck(this, MapCollection);\n /**\n * Collection of index maps.\n *\n * @type {Map}\n */\n this.collection = new Map();\n }\n\n /**\n * Register custom index map.\n *\n * @param {string} uniqueName Unique name of the index map.\n * @param {IndexMap} indexMap Index map containing miscellaneous (i.e. Meta data, indexes sequence), updated after remove and insert data actions.\n */\n _createClass(MapCollection, [{\n key: \"register\",\n value: function register(uniqueName, indexMap) {\n var _this = this;\n if (this.collection.has(uniqueName) === false) {\n this.collection.set(uniqueName, indexMap);\n indexMap.addLocalHook('change', function () {\n return _this.runLocalHooks('change', indexMap);\n });\n registeredMaps += 1;\n }\n }\n\n /**\n * Unregister custom index map.\n *\n * @param {string} name Name of the index map.\n */\n }, {\n key: \"unregister\",\n value: function unregister(name) {\n var indexMap = this.collection.get(name);\n if (isDefined(indexMap)) {\n indexMap.destroy();\n this.collection.delete(name);\n this.runLocalHooks('change', indexMap);\n registeredMaps -= 1;\n }\n }\n\n /**\n * Unregisters and destroys all collected index map instances.\n */\n }, {\n key: \"unregisterAll\",\n value: function unregisterAll() {\n var _this2 = this;\n this.collection.forEach(function (indexMap, name) {\n return _this2.unregister(name);\n });\n this.collection.clear();\n }\n\n /**\n * Get index map for the provided name.\n *\n * @param {string} [name] Name of the index map.\n * @returns {Array|IndexMap}\n */\n }, {\n key: \"get\",\n value: function get(name) {\n if (isUndefined(name)) {\n return Array.from(this.collection.values());\n }\n return this.collection.get(name);\n }\n\n /**\n * Get collection size.\n *\n * @returns {number}\n */\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.collection.size;\n }\n\n /**\n * Remove some indexes and corresponding mappings and update values of the others within all collection's index maps.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n }, {\n key: \"removeFromEvery\",\n value: function removeFromEvery(removedIndexes) {\n this.collection.forEach(function (indexMap) {\n indexMap.remove(removedIndexes);\n });\n }\n\n /**\n * Insert new indexes and corresponding mapping and update values of the others all collection's index maps.\n *\n * @private\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n }, {\n key: \"insertToEvery\",\n value: function insertToEvery(insertionIndex, insertedIndexes) {\n this.collection.forEach(function (indexMap) {\n indexMap.insert(insertionIndex, insertedIndexes);\n });\n }\n\n /**\n * Set default values to index maps within collection.\n *\n * @param {number} length Destination length for all stored maps.\n */\n }, {\n key: \"initEvery\",\n value: function initEvery(length) {\n this.collection.forEach(function (indexMap) {\n indexMap.init(length);\n });\n }\n }]);\n return MapCollection;\n}();\nmixin(MapCollection, localHooks);\n\n/**\n * @returns {number}\n */\nexport function getRegisteredMapsCounter() {\n return registeredMaps;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nimport { MapCollection } from \"./mapCollection.mjs\";\nimport { arrayMap } from \"../../helpers/array.mjs\";\nimport { isDefined } from \"../../helpers/mixed.mjs\";\n/**\n * Collection of maps. This collection aggregate maps with the same type of values. Values from the registered maps\n * can be used to calculate a single result for particular index.\n */\nexport var AggregatedCollection = /*#__PURE__*/function (_MapCollection) {\n _inherits(AggregatedCollection, _MapCollection);\n var _super = _createSuper(AggregatedCollection);\n function AggregatedCollection(aggregationFunction, fallbackValue) {\n var _this;\n _classCallCheck(this, AggregatedCollection);\n _this = _super.call(this);\n /**\n * List of merged values. Value for each index is calculated using values inside registered maps.\n *\n * @type {Array}\n */\n _this.mergedValuesCache = [];\n /**\n * Function which do aggregation on the values for particular index.\n */\n _this.aggregationFunction = aggregationFunction;\n /**\n * Fallback value when there is no calculated value for particular index.\n */\n _this.fallbackValue = fallbackValue;\n return _this;\n }\n\n /**\n * Get merged values for all indexes.\n *\n * @param {boolean} [readFromCache=true] Determine if read results from the cache.\n * @returns {Array}\n */\n _createClass(AggregatedCollection, [{\n key: \"getMergedValues\",\n value: function getMergedValues() {\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n if (readFromCache === true) {\n return this.mergedValuesCache;\n }\n if (this.getLength() === 0) {\n return [];\n }\n\n // Below variable stores values for every particular map. Example describing situation when we have 2 registered maps,\n // with length equal to 5.\n //\n // +---------+---------------------------------------------+\n // | | indexes |\n // +---------+---------------------------------------------+\n // | maps | 0 | 1 | 2 | 3 | 4 |\n // +---------+----------+-------+-------+-------+----------+\n // | 0 | [[ value, value, value, value, value ], |\n // | 1 | [ value, value, value, value, value ]] |\n // +---------+----------+-------+-------+-------+----------+\n var mapsValuesMatrix = arrayMap(this.get(), function (map) {\n return map.getValues();\n });\n // Below variable stores values for every particular index. Example describing situation when we have 2 registered maps,\n // with length equal to 5.\n //\n // +---------+---------------------+\n // | | maps |\n // +---------+---------------------+\n // | indexes | 0 | 1 |\n // +---------+----------+----------+\n // | 0 | [[ value, value ], |\n // | 1 | [ value, value ], |\n // | 2 | [ value, value ], |\n // | 3 | [ value, value ], |\n // | 4 | [ value, value ]] |\n // +---------+----------+----------+\n var indexesValuesMatrix = [];\n var mapsLength = isDefined(mapsValuesMatrix[0]) && mapsValuesMatrix[0].length || 0;\n for (var index = 0; index < mapsLength; index += 1) {\n var valuesForIndex = [];\n for (var mapIndex = 0; mapIndex < this.getLength(); mapIndex += 1) {\n valuesForIndex.push(mapsValuesMatrix[mapIndex][index]);\n }\n indexesValuesMatrix.push(valuesForIndex);\n }\n return arrayMap(indexesValuesMatrix, this.aggregationFunction);\n }\n\n /**\n * Get merged value for particular index.\n *\n * @param {number} index Index for which we calculate single result.\n * @param {boolean} [readFromCache=true] Determine if read results from the cache.\n * @returns {*}\n */\n }, {\n key: \"getMergedValueAtIndex\",\n value: function getMergedValueAtIndex(index, readFromCache) {\n var valueAtIndex = this.getMergedValues(readFromCache)[index];\n return isDefined(valueAtIndex) ? valueAtIndex : this.fallbackValue;\n }\n\n /**\n * Rebuild cache for the collection.\n */\n }, {\n key: \"updateCache\",\n value: function updateCache() {\n this.mergedValuesCache = this.getMergedValues(false);\n }\n }]);\n return AggregatedCollection;\n}(MapCollection);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nimport { mixin } from \"../../helpers/object.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\n/**\n * The ChangesObserver module is an object that represents a disposable resource\n * provided by the ChangesObservable module.\n *\n * @class ChangesObserver\n */\nvar _currentInitialChanges = /*#__PURE__*/new WeakMap();\nexport var ChangesObserver = /*#__PURE__*/function () {\n function ChangesObserver() {\n _classCallCheck(this, ChangesObserver);\n /**\n * The field holds initial changes that will be used to notify the callbacks added using\n * subscribe method. Regardless of the moment of listening for changes, the subscriber\n * will be notified once with all changes made before subscribing.\n *\n * @type {Array}\n */\n _classPrivateFieldInitSpec(this, _currentInitialChanges, {\n writable: true,\n value: []\n });\n }\n _createClass(ChangesObserver, [{\n key: \"subscribe\",\n value:\n /**\n * Subscribes to the observer.\n *\n * @param {Function} callback A function that will be called when the new changes will appear.\n * @returns {ChangesObserver}\n */\n function subscribe(callback) {\n this.addLocalHook('change', callback);\n this._write(_classPrivateFieldGet(this, _currentInitialChanges));\n return this;\n }\n\n /**\n * Unsubscribes all subscriptions. After the method call, the observer would not produce\n * any new events.\n *\n * @returns {ChangesObserver}\n */\n }, {\n key: \"unsubscribe\",\n value: function unsubscribe() {\n this.runLocalHooks('unsubscribe');\n this.clearLocalHooks();\n return this;\n }\n\n /**\n * The write method is executed by the ChangesObservable module. The module produces all\n * changes events that are distributed further by the observer.\n *\n * @private\n * @param {object} changes The chunk of changes produced by the ChangesObservable module.\n * @returns {ChangesObserver}\n */\n }, {\n key: \"_write\",\n value: function _write(changes) {\n if (changes.length > 0) {\n this.runLocalHooks('change', changes);\n }\n return this;\n }\n\n /**\n * The write method is executed by the ChangesObservable module. The module produces initial\n * changes that will be used to notify new subscribers.\n *\n * @private\n * @param {object} initialChanges The chunk of changes produced by the ChangesObservable module.\n */\n }, {\n key: \"_writeInitialChanges\",\n value: function _writeInitialChanges(initialChanges) {\n _classPrivateFieldSet(this, _currentInitialChanges, initialChanges);\n }\n }]);\n return ChangesObserver;\n}();\nmixin(ChangesObserver, localHooks);","/**\n * An array diff implementation. The function iterates through the arrays and depends\n * on the diff results, collect the changes as a list of the objects.\n *\n * Each object contains information about the differences in the indexes of the arrays.\n * The changes also contain data about the new and previous array values.\n *\n * @private\n * @param {Array} baseArray The base array to diff from.\n * @param {Array} newArray The new array to compare with.\n * @returns {Array}\n */\nexport function arrayDiff(baseArray, newArray) {\n var changes = [];\n var i = 0;\n var j = 0;\n\n /* eslint-disable no-plusplus */\n for (; i < baseArray.length && j < newArray.length; i++, j++) {\n if (baseArray[i] !== newArray[j]) {\n changes.push({\n op: 'replace',\n index: j,\n oldValue: baseArray[i],\n newValue: newArray[j]\n });\n }\n }\n for (; i < newArray.length; i++) {\n changes.push({\n op: 'insert',\n index: i,\n oldValue: void 0,\n newValue: newArray[i]\n });\n }\n for (; j < baseArray.length; j++) {\n changes.push({\n op: 'remove',\n index: j,\n oldValue: baseArray[j],\n newValue: void 0\n });\n }\n return changes;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nimport { ChangesObserver } from \"./observer.mjs\";\nimport { arrayDiff } from \"./utils.mjs\";\n/**\n * The ChangesObservable module is an object that represents a resource that provides\n * the ability to observe the changes that happened in the index map indexes during\n * the code running.\n *\n * @private\n * @class ChangesObservable\n */\nvar _observers = /*#__PURE__*/new WeakMap();\nvar _indexMatrix = /*#__PURE__*/new WeakMap();\nvar _currentIndexState = /*#__PURE__*/new WeakMap();\nvar _isMatrixIndexesInitialized = /*#__PURE__*/new WeakMap();\nvar _initialIndexValue = /*#__PURE__*/new WeakMap();\nexport var ChangesObservable = /*#__PURE__*/function () {\n function ChangesObservable() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n initialIndexValue = _ref.initialIndexValue;\n _classCallCheck(this, ChangesObservable);\n /**\n * The list of registered ChangesObserver instances.\n *\n * @type {ChangesObserver[]}\n */\n _classPrivateFieldInitSpec(this, _observers, {\n writable: true,\n value: new Set()\n });\n /**\n * An array with default values that act as a base array that will be compared with\n * the last saved index state. The changes are generated and immediately send through\n * the newly created ChangesObserver object. Thanks to that, the observer initially has\n * all information about what indexes are currently changed.\n *\n * @type {Array}\n */\n _classPrivateFieldInitSpec(this, _indexMatrix, {\n writable: true,\n value: []\n });\n /**\n * An array that holds the indexes state that is currently valid. The value is changed on every\n * index mapper cache update.\n *\n * @type {Array}\n */\n _classPrivateFieldInitSpec(this, _currentIndexState, {\n writable: true,\n value: []\n });\n /**\n * The flag determines if the observable is initialized or not. Not initialized object creates\n * index matrix once while emitting new changes.\n *\n * @type {boolean}\n */\n _classPrivateFieldInitSpec(this, _isMatrixIndexesInitialized, {\n writable: true,\n value: false\n });\n /**\n * The initial index value allows control from what value the index matrix array will be created.\n * Changing that value changes how the array diff generates the changes for the initial data\n * sent to the subscribers. For example, the changes can be triggered by detecting the changes\n * from `false` to `true` value or vice versa. Generally, it depends on which index map type\n * the Observable will work with. For \"hiding\" or \"trimming\" index types, it will be boolean\n * values. For various index maps, it can be anything, but I suspect that the most appropriate\n * initial value will be \"undefined\" in that case.\n *\n * @type {boolean}\n */\n _classPrivateFieldInitSpec(this, _initialIndexValue, {\n writable: true,\n value: false\n });\n _classPrivateFieldSet(this, _initialIndexValue, initialIndexValue !== null && initialIndexValue !== void 0 ? initialIndexValue : false);\n }\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n /**\n * Creates and returns a new instance of the ChangesObserver object. The resource\n * allows subscribing to the index changes that during the code running may change.\n * Changes are emitted as an array of the index change. Each change is represented\n * separately as an object with `op`, `index`, `oldValue`, and `newValue` props.\n *\n * For example:\n * ```\n * [\n * { op: 'replace', index: 1, oldValue: false, newValue: true },\n * { op: 'replace', index: 3, oldValue: false, newValue: true },\n * { op: 'insert', index: 4, oldValue: false, newValue: true },\n * ]\n * // or when the new index map changes have less indexes\n * [\n * { op: 'replace', index: 1, oldValue: false, newValue: true },\n * { op: 'remove', index: 4, oldValue: false, newValue: true },\n * ]\n * ```\n *\n * @returns {ChangesObserver}\n */\n /* eslint-enable jsdoc/require-description-complete-sentence */\n _createClass(ChangesObservable, [{\n key: \"createObserver\",\n value: function createObserver() {\n var _this = this;\n var observer = new ChangesObserver();\n _classPrivateFieldGet(this, _observers).add(observer);\n observer.addLocalHook('unsubscribe', function () {\n _classPrivateFieldGet(_this, _observers).delete(observer);\n });\n observer._writeInitialChanges(arrayDiff(_classPrivateFieldGet(this, _indexMatrix), _classPrivateFieldGet(this, _currentIndexState)));\n return observer;\n }\n\n /**\n * The method is an entry point for triggering new index map changes. Emitting the\n * changes triggers comparing algorithm which compares last saved state with a new\n * state. When there are some differences, the changes are sent to all subscribers.\n *\n * @param {Array} indexesState An array with index map state.\n */\n }, {\n key: \"emit\",\n value: function emit(indexesState) {\n var currentIndexState = _classPrivateFieldGet(this, _currentIndexState);\n if (!_classPrivateFieldGet(this, _isMatrixIndexesInitialized) || _classPrivateFieldGet(this, _indexMatrix).length !== indexesState.length) {\n if (indexesState.length === 0) {\n indexesState = new Array(currentIndexState.length).fill(_classPrivateFieldGet(this, _initialIndexValue));\n } else {\n _classPrivateFieldSet(this, _indexMatrix, new Array(indexesState.length).fill(_classPrivateFieldGet(this, _initialIndexValue)));\n }\n if (!_classPrivateFieldGet(this, _isMatrixIndexesInitialized)) {\n _classPrivateFieldSet(this, _isMatrixIndexesInitialized, true);\n currentIndexState = _classPrivateFieldGet(this, _indexMatrix);\n }\n }\n var changes = arrayDiff(currentIndexState, indexesState);\n _classPrivateFieldGet(this, _observers).forEach(function (observer) {\n return observer._write(changes);\n });\n _classPrivateFieldSet(this, _currentIndexState, indexesState);\n }\n }]);\n return ChangesObservable;\n}();","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _templateObject;\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.find-index.js\";\nimport \"core-js/modules/es.array.reverse.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { arrayMap } from \"../helpers/array.mjs\";\nimport { toSingleLine } from \"../helpers/templateLiteralTag.mjs\";\nimport { warn } from \"../helpers/console.mjs\";\nimport { createIndexMap, getListWithInsertedItems, getListWithRemovedItems, HidingMap, IndexesSequence, TrimmingMap } from \"./maps/index.mjs\";\nimport { AggregatedCollection, MapCollection } from \"./mapCollections/index.mjs\";\nimport localHooks from \"../mixins/localHooks.mjs\";\nimport { mixin } from \"../helpers/object.mjs\";\nimport { isDefined } from \"../helpers/mixed.mjs\";\nimport { ChangesObservable } from \"./changesObservable/observable.mjs\";\nvar deprecationWarns = new Set(['getFirstNotHiddenIndex']);\n\n/**\n * @class IndexMapper\n * @description\n *\n * Index mapper stores, registers and manages the indexes on the basis of calculations collected from the subsidiary maps.\n * It should be seen as a single source of truth (regarding row and column indexes, for example, their sequence, information if they are skipped in the process of rendering (hidden or trimmed), values linked to them)\n * for any operation that considers CRUD actions such as **insertion**, **movement**, **removal** etc, and is used to properly calculate physical and visual indexes translations in both ways.\n * It has a built-in cache that is updated only when the data or structure changes.\n *\n * **Physical index** is a type of an index from the sequence of indexes assigned to the data source rows or columns\n * (from 0 to n, where n is number of the cells on the axis of data set).\n * **Visual index** is a type of an index from the sequence of indexes assigned to rows or columns existing in {@link DataMap} (from 0 to n, where n is number of the cells on the axis of data set).\n * **Renderable index** is a type of an index from the sequence of indexes assigned to rows or columns whose may be rendered (when they are in a viewport; from 0 to n, where n is number of the cells renderable on the axis).\n *\n * There are different kinds of index maps which may be registered in the collections and can be used by a reference.\n * They also expose public API and trigger two local hooks such as `init` (on initialization) and `change` (on change).\n *\n * These are: {@link IndexesSequence}, {@link PhysicalIndexToValueMap}, {@link LinkedPhysicalIndexToValueMap}, {@link HidingMap}, and {@link TrimmingMap}.\n */\nexport var IndexMapper = /*#__PURE__*/function () {\n function IndexMapper() {\n var _this = this;\n _classCallCheck(this, IndexMapper);\n /**\n * Map for storing the sequence of indexes.\n *\n * It is registered by default and may be used from API methods.\n *\n * @private\n * @type {IndexesSequence}\n */\n this.indexesSequence = new IndexesSequence();\n /**\n * Collection for different trimming maps. Indexes marked as trimmed in any map WILL NOT be included in\n * the {@link DataMap} and won't be rendered.\n *\n * @private\n * @type {MapCollection}\n */\n this.trimmingMapsCollection = new AggregatedCollection(function (valuesForIndex) {\n return valuesForIndex.some(function (value) {\n return value === true;\n });\n }, false);\n /**\n * Collection for different hiding maps. Indexes marked as hidden in any map WILL be included in the {@link DataMap},\n * but won't be rendered.\n *\n * @private\n * @type {MapCollection}\n */\n this.hidingMapsCollection = new AggregatedCollection(function (valuesForIndex) {\n return valuesForIndex.some(function (value) {\n return value === true;\n });\n }, false);\n /**\n * Collection for another kind of maps. There are stored mappings from indexes (visual or physical) to values.\n *\n * @private\n * @type {MapCollection}\n */\n this.variousMapsCollection = new MapCollection();\n /**\n * The class instance collects row and column index changes that happen while the Handsontable\n * is running. The object allows creating observers that you can subscribe. Each event represents\n * the index change (e.g., insert, removing, change index value), which can be consumed by a\n * developer to update its logic.\n *\n * @private\n * @type {ChangesObservable}\n */\n this.hidingChangesObservable = new ChangesObservable({\n initialIndexValue: false\n });\n /**\n * Cache for list of not trimmed indexes, respecting the indexes sequence (physical indexes).\n *\n * Note: Please keep in mind that trimmed index can be also hidden.\n *\n * @private\n * @type {Array}\n */\n this.notTrimmedIndexesCache = [];\n /**\n * Cache for list of not hidden indexes, respecting the indexes sequence (physical indexes).\n *\n * Note: Please keep in mind that hidden index can be also trimmed.\n *\n * @private\n * @type {Array}\n */\n this.notHiddenIndexesCache = [];\n /**\n * Flag determining whether actions performed on index mapper have been batched. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n this.isBatched = false;\n /**\n * Flag determining whether any action on indexes sequence has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n this.indexesSequenceChanged = false;\n /**\n * Flag informing about source of the change.\n *\n * @type {undefined|string}\n */\n this.indexesChangeSource = void 0;\n /**\n * Flag determining whether any action on trimmed indexes has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n this.trimmedIndexesChanged = false;\n /**\n * Flag determining whether any action on hidden indexes has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n this.hiddenIndexesChanged = false;\n /**\n * Physical indexes (respecting the sequence of indexes) which may be rendered (when they are in a viewport).\n *\n * @private\n * @type {Array}\n */\n this.renderablePhysicalIndexesCache = [];\n /**\n * Visual indexes (native map's value) corresponding to physical indexes (native map's index).\n *\n * @private\n * @type {Map}\n */\n this.fromPhysicalToVisualIndexesCache = new Map();\n /**\n * Visual indexes (native map's value) corresponding to physical indexes (native map's index).\n *\n * @private\n * @type {Map}\n */\n this.fromVisualToRenderableIndexesCache = new Map();\n this.indexesSequence.addLocalHook('change', function () {\n _this.indexesSequenceChanged = true;\n\n // Sequence of stored indexes might change.\n _this.updateCache();\n _this.runLocalHooks('indexesSequenceChange', _this.indexesChangeSource);\n _this.runLocalHooks('change', _this.indexesSequence, null);\n });\n this.trimmingMapsCollection.addLocalHook('change', function (changedMap) {\n _this.trimmedIndexesChanged = true;\n\n // Number of trimmed indexes might change.\n _this.updateCache();\n _this.runLocalHooks('change', changedMap, _this.trimmingMapsCollection);\n });\n this.hidingMapsCollection.addLocalHook('change', function (changedMap) {\n _this.hiddenIndexesChanged = true;\n\n // Number of hidden indexes might change.\n _this.updateCache();\n _this.runLocalHooks('change', changedMap, _this.hidingMapsCollection);\n });\n this.variousMapsCollection.addLocalHook('change', function (changedMap) {\n _this.runLocalHooks('change', changedMap, _this.variousMapsCollection);\n });\n }\n\n /**\n * Suspends the cache update for this map. The method is helpful to group multiple\n * operations, which affects the cache. In this case, the cache will be updated once after\n * calling the `resumeOperations` method.\n */\n _createClass(IndexMapper, [{\n key: \"suspendOperations\",\n value: function suspendOperations() {\n this.isBatched = true;\n }\n\n /**\n * Resumes the cache update for this map. It recalculates the cache and restores the\n * default behavior where each map modification updates the cache.\n */\n }, {\n key: \"resumeOperations\",\n value: function resumeOperations() {\n this.isBatched = false;\n this.updateCache();\n }\n\n /**\n * It creates and returns the new instance of the ChangesObserver object. The object\n * allows listening to the index changes that happen while the Handsontable is running.\n *\n * @param {string} indexMapType The index map type which we want to observe.\n * Currently, only the 'hiding' index map types are observable.\n * @returns {ChangesObserver}\n */\n }, {\n key: \"createChangesObserver\",\n value: function createChangesObserver(indexMapType) {\n if (indexMapType !== 'hiding') {\n throw new Error(\"Unsupported index map type \\\"\".concat(indexMapType, \"\\\".\"));\n }\n return this.hidingChangesObservable.createObserver();\n }\n\n /**\n * Creates and registers a new `IndexMap` for a specified `IndexMapper` instance.\n *\n * @param {string} indexName A unique index name.\n * @param {string} mapType The index map type (e.g., \"hiding\", \"trimming\", \"physicalIndexToValue\").\n * @param {*} [initValueOrFn] The initial value for the index map.\n * @returns {IndexMap}\n */\n }, {\n key: \"createAndRegisterIndexMap\",\n value: function createAndRegisterIndexMap(indexName, mapType, initValueOrFn) {\n return this.registerMap(indexName, createIndexMap(mapType, initValueOrFn));\n }\n\n /**\n * Register map which provide some index mappings. Type of map determining to which collection it will be added.\n *\n * @param {string} uniqueName Name of the index map. It should be unique.\n * @param {IndexMap} indexMap Registered index map updated on items removal and insertion.\n * @returns {IndexMap}\n */\n }, {\n key: \"registerMap\",\n value: function registerMap(uniqueName, indexMap) {\n if (this.trimmingMapsCollection.get(uniqueName) || this.hidingMapsCollection.get(uniqueName) || this.variousMapsCollection.get(uniqueName)) {\n throw Error(\"Map with name \\\"\".concat(uniqueName, \"\\\" has been already registered.\"));\n }\n if (indexMap instanceof TrimmingMap) {\n this.trimmingMapsCollection.register(uniqueName, indexMap);\n } else if (indexMap instanceof HidingMap) {\n this.hidingMapsCollection.register(uniqueName, indexMap);\n } else {\n this.variousMapsCollection.register(uniqueName, indexMap);\n }\n var numberOfIndexes = this.getNumberOfIndexes();\n\n /*\n We initialize map ony when we have full information about number of indexes and the dataset is not empty.\n Otherwise it's unnecessary. Initialization of empty array would not give any positive changes. After initializing\n it with number of indexes equal to 0 the map would be still empty. What's more there would be triggered\n not needed hook (no real change have occurred). Number of indexes is known after loading data (the `loadData`\n function from the `Core`).\n */\n if (numberOfIndexes > 0) {\n indexMap.init(numberOfIndexes);\n }\n return indexMap;\n }\n\n /**\n * Unregister a map with given name.\n *\n * @param {string} name Name of the index map.\n */\n }, {\n key: \"unregisterMap\",\n value: function unregisterMap(name) {\n this.trimmingMapsCollection.unregister(name);\n this.hidingMapsCollection.unregister(name);\n this.variousMapsCollection.unregister(name);\n }\n\n /**\n * Unregisters all collected index map instances from all map collection types.\n */\n }, {\n key: \"unregisterAll\",\n value: function unregisterAll() {\n this.trimmingMapsCollection.unregisterAll();\n this.hidingMapsCollection.unregisterAll();\n this.variousMapsCollection.unregisterAll();\n }\n\n /**\n * Get a physical index corresponding to the given visual index.\n *\n * @param {number} visualIndex Visual index.\n * @returns {number|null} Returns translated index mapped by passed visual index.\n */\n }, {\n key: \"getPhysicalFromVisualIndex\",\n value: function getPhysicalFromVisualIndex(visualIndex) {\n // Index in the table boundaries provided by the `DataMap`.\n var physicalIndex = this.notTrimmedIndexesCache[visualIndex];\n if (isDefined(physicalIndex)) {\n return physicalIndex;\n }\n return null;\n }\n\n /**\n * Get a physical index corresponding to the given renderable index.\n *\n * @param {number} renderableIndex Renderable index.\n * @returns {null|number}\n */\n }, {\n key: \"getPhysicalFromRenderableIndex\",\n value: function getPhysicalFromRenderableIndex(renderableIndex) {\n var physicalIndex = this.renderablePhysicalIndexesCache[renderableIndex];\n\n // Index in the renderable table boundaries.\n if (isDefined(physicalIndex)) {\n return physicalIndex;\n }\n return null;\n }\n\n /**\n * Get a visual index corresponding to the given physical index.\n *\n * @param {number} physicalIndex Physical index to search.\n * @returns {number|null} Returns a visual index of the index mapper.\n */\n }, {\n key: \"getVisualFromPhysicalIndex\",\n value: function getVisualFromPhysicalIndex(physicalIndex) {\n var visualIndex = this.fromPhysicalToVisualIndexesCache.get(physicalIndex);\n\n // Index in the table boundaries provided by the `DataMap`.\n if (isDefined(visualIndex)) {\n return visualIndex;\n }\n return null;\n }\n\n /**\n * Get a visual index corresponding to the given renderable index.\n *\n * @param {number} renderableIndex Renderable index.\n * @returns {null|number}\n */\n }, {\n key: \"getVisualFromRenderableIndex\",\n value: function getVisualFromRenderableIndex(renderableIndex) {\n return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(renderableIndex));\n }\n\n /**\n * Get a renderable index corresponding to the given visual index.\n *\n * @param {number} visualIndex Visual index.\n * @returns {null|number}\n */\n }, {\n key: \"getRenderableFromVisualIndex\",\n value: function getRenderableFromVisualIndex(visualIndex) {\n var renderableIndex = this.fromVisualToRenderableIndexesCache.get(visualIndex);\n\n // Index in the renderable table boundaries.\n if (isDefined(renderableIndex)) {\n return renderableIndex;\n }\n return null;\n }\n\n /**\n * Search for the first visible, not hidden index (represented by a visual index).\n *\n * This method is deprecated and will be removed in a next major version of Handsontable.\n * Use the {@link IndexMapper#getNearestNotHiddenIndex} method instead.\n *\n * @deprecated\n * @param {number} fromVisualIndex Visual start index. Starting point for finding destination index. Start point may be destination\n * point when handled index is NOT hidden.\n * @param {number} incrementBy We are searching for a next visible indexes by increasing (to be precise, or decreasing) indexes.\n * This variable represent indexes shift. We are looking for an index:\n * - for rows: from the top to the bottom (increasing indexes, then variable should have value 1) or\n * other way around (decreasing indexes, then variable should have the value -1)\n * - for columns: from the left to the right (increasing indexes, then variable should have value 1)\n * or other way around (decreasing indexes, then variable should have the value -1).\n * @param {boolean} searchAlsoOtherWayAround The argument determine if an additional other way around search should be\n * performed, when the search in the first direction had no effect in finding visual index.\n * @param {number} indexForNextSearch Visual index for next search, when the flag is truthy.\n *\n * @returns {number|null} Visual column index or `null`.\n */\n }, {\n key: \"getFirstNotHiddenIndex\",\n value: function getFirstNotHiddenIndex(fromVisualIndex, incrementBy) {\n var searchAlsoOtherWayAround = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var indexForNextSearch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fromVisualIndex - incrementBy;\n if (deprecationWarns.has('getFirstNotHiddenIndex')) {\n deprecationWarns.delete('getFirstNotHiddenIndex');\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The method \\\"getFirstNotHiddenIndex\\\" is deprecated and will be removed in the next \\n major release. Please use \\\"getNearestNotHiddenIndex\\\" instead.\"], [\"The method \\\"getFirstNotHiddenIndex\\\" is deprecated and will be removed in the next\\\\x20\\n major release. Please use \\\"getNearestNotHiddenIndex\\\" instead.\"]))));\n }\n var physicalIndex = this.getPhysicalFromVisualIndex(fromVisualIndex);\n\n // First or next (it may be end of the table) index is beyond the table boundaries.\n if (physicalIndex === null) {\n // Looking for the next index in the opposite direction. This conditional won't be fulfilled when we STARTED\n // the search from the index beyond the table boundaries.\n if (searchAlsoOtherWayAround === true && indexForNextSearch !== fromVisualIndex - incrementBy) {\n return this.getFirstNotHiddenIndex(indexForNextSearch, -incrementBy, false, indexForNextSearch);\n }\n return null;\n }\n if (this.isHidden(physicalIndex) === false) {\n return fromVisualIndex;\n }\n\n // Looking for the next index, as the current isn't visible.\n return this.getFirstNotHiddenIndex(fromVisualIndex + incrementBy, incrementBy, searchAlsoOtherWayAround, indexForNextSearch);\n }\n\n /**\n * Search for the nearest not-hidden row or column.\n *\n * @param {number} fromVisualIndex The visual index of the row or column from which the search starts.
\n * If the row or column from which the search starts is not hidden, the method simply returns the `fromVisualIndex` number.\n * @param {number} searchDirection The search direction.
`1`: search from `fromVisualIndex` to the end of the dataset.
\n * `-1`: search from `fromVisualIndex` to the beginning of the dataset (i.e., to the row or column at visual index `0`).\n * @param {boolean} searchAlsoOtherWayAround `true`: if a search in a first direction failed, try the opposite direction.
\n * `false`: search in one direction only.\n *\n * @returns {number|null} A visual index of a row or column, or `null`.\n */\n }, {\n key: \"getNearestNotHiddenIndex\",\n value: function getNearestNotHiddenIndex(fromVisualIndex, searchDirection) {\n var searchAlsoOtherWayAround = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var physicalIndex = this.getPhysicalFromVisualIndex(fromVisualIndex);\n if (physicalIndex === null) {\n return null;\n }\n if (this.fromVisualToRenderableIndexesCache.has(fromVisualIndex)) {\n return fromVisualIndex;\n }\n var visibleIndexes = Array.from(this.fromVisualToRenderableIndexesCache.keys());\n var index = -1;\n if (searchDirection > 0) {\n index = visibleIndexes.findIndex(function (visualIndex) {\n return visualIndex > fromVisualIndex;\n });\n } else {\n index = visibleIndexes.reverse().findIndex(function (visualIndex) {\n return visualIndex < fromVisualIndex;\n });\n }\n if (index === -1) {\n if (searchAlsoOtherWayAround) {\n return this.getNearestNotHiddenIndex(fromVisualIndex, -searchDirection, false);\n }\n return null;\n }\n return visibleIndexes[index];\n }\n\n /**\n * Set default values for all indexes in registered index maps.\n *\n * @param {number} [length] Destination length for all stored index maps.\n */\n }, {\n key: \"initToLength\",\n value: function initToLength() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getNumberOfIndexes();\n this.notTrimmedIndexesCache = _toConsumableArray(new Array(length).keys());\n this.notHiddenIndexesCache = _toConsumableArray(new Array(length).keys());\n this.suspendOperations();\n this.indexesChangeSource = 'init';\n this.indexesSequence.init(length);\n this.indexesChangeSource = void 0;\n this.trimmingMapsCollection.initEvery(length);\n this.resumeOperations();\n\n // We move initialization of hidden collection to next batch for purpose of working on sequence of already trimmed indexes.\n this.suspendOperations();\n this.hidingMapsCollection.initEvery(length);\n\n // It shouldn't reset the cache.\n this.variousMapsCollection.initEvery(length);\n this.resumeOperations();\n this.runLocalHooks('init');\n }\n\n /**\n * Trim/extend the mappers to fit the desired length.\n *\n * @param {number} length New mapper length.\n */\n }, {\n key: \"fitToLength\",\n value: function fitToLength(length) {\n var currentIndexCount = this.getNumberOfIndexes();\n if (length < currentIndexCount) {\n var indexesToBeRemoved = _toConsumableArray(Array(this.getNumberOfIndexes() - length).keys()).map(function (i) {\n return i + length;\n });\n this.removeIndexes(indexesToBeRemoved);\n } else {\n this.insertIndexes(currentIndexCount, length - currentIndexCount);\n }\n }\n\n /**\n * Get sequence of indexes.\n *\n * @returns {Array} Physical indexes.\n */\n }, {\n key: \"getIndexesSequence\",\n value: function getIndexesSequence() {\n return this.indexesSequence.getValues();\n }\n\n /**\n * Set completely new indexes sequence.\n *\n * @param {Array} indexes Physical indexes.\n */\n }, {\n key: \"setIndexesSequence\",\n value: function setIndexesSequence(indexes) {\n if (this.indexesChangeSource === void 0) {\n this.indexesChangeSource = 'update';\n }\n this.indexesSequence.setValues(indexes);\n if (this.indexesChangeSource === 'update') {\n this.indexesChangeSource = void 0;\n }\n }\n\n /**\n * Get all NOT trimmed indexes.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Index of this native array is a \"visual index\",\n * value of this native array is a \"physical index\".\n */\n }, {\n key: \"getNotTrimmedIndexes\",\n value: function getNotTrimmedIndexes() {\n var _this2 = this;\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n if (readFromCache === true) {\n return this.notTrimmedIndexesCache;\n }\n var indexesSequence = this.getIndexesSequence();\n return indexesSequence.filter(function (physicalIndex) {\n return _this2.isTrimmed(physicalIndex) === false;\n });\n }\n\n /**\n * Get length of all NOT trimmed indexes.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @returns {number}\n */\n }, {\n key: \"getNotTrimmedIndexesLength\",\n value: function getNotTrimmedIndexesLength() {\n return this.getNotTrimmedIndexes().length;\n }\n\n /**\n * Get all NOT hidden indexes.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Please keep in mind that index of this native array IS NOT a \"visual index\".\n */\n }, {\n key: \"getNotHiddenIndexes\",\n value: function getNotHiddenIndexes() {\n var _this3 = this;\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n if (readFromCache === true) {\n return this.notHiddenIndexesCache;\n }\n var indexesSequence = this.getIndexesSequence();\n return indexesSequence.filter(function (physicalIndex) {\n return _this3.isHidden(physicalIndex) === false;\n });\n }\n\n /**\n * Get length of all NOT hidden indexes.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @returns {number}\n */\n }, {\n key: \"getNotHiddenIndexesLength\",\n value: function getNotHiddenIndexesLength() {\n return this.getNotHiddenIndexes().length;\n }\n\n /**\n * Get list of physical indexes (respecting the sequence of indexes) which may be rendered (when they are in a viewport).\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Index of this native array is a \"renderable index\",\n * value of this native array is a \"physical index\".\n */\n }, {\n key: \"getRenderableIndexes\",\n value: function getRenderableIndexes() {\n var _this4 = this;\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n if (readFromCache === true) {\n return this.renderablePhysicalIndexesCache;\n }\n var notTrimmedIndexes = this.getNotTrimmedIndexes();\n return notTrimmedIndexes.filter(function (physicalIndex) {\n return _this4.isHidden(physicalIndex) === false;\n });\n }\n\n /**\n * Get length of all NOT trimmed and NOT hidden indexes.\n *\n * @returns {number}\n */\n }, {\n key: \"getRenderableIndexesLength\",\n value: function getRenderableIndexesLength() {\n return this.getRenderableIndexes().length;\n }\n\n /**\n * Get number of all indexes.\n *\n * @returns {number}\n */\n }, {\n key: \"getNumberOfIndexes\",\n value: function getNumberOfIndexes() {\n return this.getIndexesSequence().length;\n }\n\n /**\n * Move indexes in the index mapper.\n *\n * @param {number|Array} movedIndexes Visual index(es) to move.\n * @param {number} finalIndex Visual index being a start index for the moved elements.\n */\n }, {\n key: \"moveIndexes\",\n value: function moveIndexes(movedIndexes, finalIndex) {\n var _this5 = this;\n if (typeof movedIndexes === 'number') {\n movedIndexes = [movedIndexes];\n }\n var physicalMovedIndexes = arrayMap(movedIndexes, function (visualIndex) {\n return _this5.getPhysicalFromVisualIndex(visualIndex);\n });\n var notTrimmedIndexesLength = this.getNotTrimmedIndexesLength();\n var movedIndexesLength = movedIndexes.length;\n\n // Removing indexes without re-indexing.\n var listWithRemovedItems = getListWithRemovedItems(this.getIndexesSequence(), physicalMovedIndexes);\n\n // When item(s) are moved after the last visible item we assign the last possible index.\n var destinationPosition = notTrimmedIndexesLength - movedIndexesLength;\n\n // Otherwise, we find proper index for inserted item(s).\n if (finalIndex + movedIndexesLength < notTrimmedIndexesLength) {\n // Physical index at final index position.\n var physicalIndex = listWithRemovedItems.filter(function (index) {\n return _this5.isTrimmed(index) === false;\n })[finalIndex];\n destinationPosition = listWithRemovedItems.indexOf(physicalIndex);\n }\n this.indexesChangeSource = 'move';\n\n // Adding indexes without re-indexing.\n this.setIndexesSequence(getListWithInsertedItems(listWithRemovedItems, destinationPosition, physicalMovedIndexes));\n this.indexesChangeSource = void 0;\n }\n\n /**\n * Get whether index is trimmed. Index marked as trimmed isn't included in a {@link DataMap} and isn't rendered.\n *\n * @param {number} physicalIndex Physical index.\n * @returns {boolean}\n */\n }, {\n key: \"isTrimmed\",\n value: function isTrimmed(physicalIndex) {\n return this.trimmingMapsCollection.getMergedValueAtIndex(physicalIndex);\n }\n\n /**\n * Get whether index is hidden. Index marked as hidden is included in a {@link DataMap}, but isn't rendered.\n *\n * @param {number} physicalIndex Physical index.\n * @returns {boolean}\n */\n }, {\n key: \"isHidden\",\n value: function isHidden(physicalIndex) {\n return this.hidingMapsCollection.getMergedValueAtIndex(physicalIndex);\n }\n\n /**\n * Insert new indexes and corresponding mapping and update values of the others, for all stored index maps.\n *\n * @private\n * @param {number} firstInsertedVisualIndex First inserted visual index.\n * @param {number} amountOfIndexes Amount of inserted indexes.\n */\n }, {\n key: \"insertIndexes\",\n value: function insertIndexes(firstInsertedVisualIndex, amountOfIndexes) {\n var nthVisibleIndex = this.getNotTrimmedIndexes()[firstInsertedVisualIndex];\n var firstInsertedPhysicalIndex = isDefined(nthVisibleIndex) ? nthVisibleIndex : this.getNumberOfIndexes();\n var insertionIndex = this.getIndexesSequence().includes(nthVisibleIndex) ? this.getIndexesSequence().indexOf(nthVisibleIndex) : this.getNumberOfIndexes();\n var insertedIndexes = arrayMap(new Array(amountOfIndexes).fill(firstInsertedPhysicalIndex), function (nextIndex, stepsFromStart) {\n return nextIndex + stepsFromStart;\n });\n this.suspendOperations();\n this.indexesChangeSource = 'insert';\n this.indexesSequence.insert(insertionIndex, insertedIndexes);\n this.indexesChangeSource = void 0;\n this.trimmingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.hidingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.variousMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.resumeOperations();\n }\n\n /**\n * Remove some indexes and corresponding mappings and update values of the others, for all stored index maps.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n }, {\n key: \"removeIndexes\",\n value: function removeIndexes(removedIndexes) {\n this.suspendOperations();\n this.indexesChangeSource = 'remove';\n this.indexesSequence.remove(removedIndexes);\n this.indexesChangeSource = void 0;\n this.trimmingMapsCollection.removeFromEvery(removedIndexes);\n this.hidingMapsCollection.removeFromEvery(removedIndexes);\n this.variousMapsCollection.removeFromEvery(removedIndexes);\n this.resumeOperations();\n }\n\n /**\n * Rebuild cache for some indexes. Every action on indexes sequence or indexes skipped in the process of rendering\n * by default reset cache, thus batching some index maps actions is recommended.\n *\n * @private\n * @param {boolean} [force=false] Determine if force cache update.\n */\n }, {\n key: \"updateCache\",\n value: function updateCache() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var anyCachedIndexChanged = this.indexesSequenceChanged || this.trimmedIndexesChanged || this.hiddenIndexesChanged;\n if (force === true || this.isBatched === false && anyCachedIndexChanged === true) {\n this.trimmingMapsCollection.updateCache();\n this.hidingMapsCollection.updateCache();\n this.notTrimmedIndexesCache = this.getNotTrimmedIndexes(false);\n this.notHiddenIndexesCache = this.getNotHiddenIndexes(false);\n this.renderablePhysicalIndexesCache = this.getRenderableIndexes(false);\n this.cacheFromPhysicalToVisualIndexes();\n this.cacheFromVisualToRenderableIndexes();\n\n // Currently there's support only for the \"hiding\" map type.\n if (this.hiddenIndexesChanged) {\n this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues());\n }\n this.runLocalHooks('cacheUpdated', {\n indexesSequenceChanged: this.indexesSequenceChanged,\n trimmedIndexesChanged: this.trimmedIndexesChanged,\n hiddenIndexesChanged: this.hiddenIndexesChanged\n });\n this.indexesSequenceChanged = false;\n this.trimmedIndexesChanged = false;\n this.hiddenIndexesChanged = false;\n }\n }\n\n /**\n * Update cache for translations from physical to visual indexes.\n *\n * @private\n */\n }, {\n key: \"cacheFromPhysicalToVisualIndexes\",\n value: function cacheFromPhysicalToVisualIndexes() {\n var nrOfNotTrimmedIndexes = this.getNotTrimmedIndexesLength();\n this.fromPhysicalToVisualIndexesCache.clear();\n for (var visualIndex = 0; visualIndex < nrOfNotTrimmedIndexes; visualIndex += 1) {\n var physicalIndex = this.getPhysicalFromVisualIndex(visualIndex);\n\n // Every visual index have corresponding physical index, but some physical indexes may don't have\n // corresponding visual indexes (physical indexes may represent trimmed indexes, beyond the table boundaries)\n this.fromPhysicalToVisualIndexesCache.set(physicalIndex, visualIndex);\n }\n }\n\n /**\n * Update cache for translations from visual to renderable indexes.\n *\n * @private\n */\n }, {\n key: \"cacheFromVisualToRenderableIndexes\",\n value: function cacheFromVisualToRenderableIndexes() {\n var nrOfRenderableIndexes = this.getRenderableIndexesLength();\n this.fromVisualToRenderableIndexesCache.clear();\n for (var renderableIndex = 0; renderableIndex < nrOfRenderableIndexes; renderableIndex += 1) {\n // Can't use getRenderableFromVisualIndex here because we're building the cache here\n var physicalIndex = this.getPhysicalFromRenderableIndex(renderableIndex);\n var visualIndex = this.getVisualFromPhysicalIndex(physicalIndex);\n this.fromVisualToRenderableIndexesCache.set(visualIndex, renderableIndex);\n }\n }\n }]);\n return IndexMapper;\n}();\nmixin(IndexMapper, localHooks);","var _templateObject;\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport { isUndefined, isDefined } from \"./../helpers/mixed.mjs\";\nimport { objectEach } from \"./../helpers/object.mjs\";\nimport { error } from \"./../helpers/console.mjs\";\nimport { toSingleLine } from \"./../helpers/templateLiteralTag.mjs\";\n/**\n * Perform shallow extend of a target object with only this extension's properties which doesn't exist in the target.\n *\n * TODO: Maybe it should be moved to global helpers? It's changed `extend` function.\n *\n * @param {object} target An object that will receive the new properties.\n * @param {object} extension An object containing additional properties to merge into the target.\n * @returns {object}\n */\nexport function extendNotExistingKeys(target, extension) {\n objectEach(extension, function (value, key) {\n if (isUndefined(target[key])) {\n target[key] = value;\n }\n });\n return target;\n}\n\n/**\n * Create range of values basing on cell indexes. For example, it will create below ranges for specified function arguments:\n *\n * createCellHeadersRange(2, 7) => `2-7`\n * createCellHeadersRange(7, 2) => `2-7`\n * createCellHeadersRange(0, 4, 'A', 'D') => `A-D`\n * createCellHeadersRange(4, 0, 'D', 'A') => `A-D`.\n *\n * @param {number} firstRowIndex Index of \"first\" cell.\n * @param {number} nextRowIndex Index of \"next\" cell.\n * @param {*} fromValue Value which will represent \"first\" cell.\n * @param {*} toValue Value which will represent \"next\" cell.\n * @returns {string} Value representing range i.e. A-Z, 11-15.\n */\nexport function createCellHeadersRange(firstRowIndex, nextRowIndex) {\n var fromValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : firstRowIndex;\n var toValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : nextRowIndex;\n // Will swap `fromValue` with `toValue` if it's necessary.\n var from = fromValue,\n to = toValue;\n if (firstRowIndex > nextRowIndex) {\n var _ref = [to, from];\n from = _ref[0];\n to = _ref[1];\n }\n return \"\".concat(from, \"-\").concat(to);\n}\n\n/**\n * Normalize language code. It takes handled languageCode proposition and change it to proper languageCode.\n * For example, when it takes `eN-us` as parameter it return `en-US`.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {string}\n */\nexport function normalizeLanguageCode(languageCode) {\n var languageCodePattern = /^([a-zA-Z]{2})-([a-zA-Z]{2})$/;\n var partsOfLanguageCode = languageCodePattern.exec(languageCode);\n if (partsOfLanguageCode) {\n return \"\".concat(partsOfLanguageCode[1].toLowerCase(), \"-\").concat(partsOfLanguageCode[2].toUpperCase());\n }\n return languageCode;\n}\n\n/**\n *\n * Warn user if there is no registered language.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n */\nexport function warnUserAboutLanguageRegistration(languageCode) {\n if (isDefined(languageCode)) {\n error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Language with code \\\"\", \"\\\" was not found. You should register particular language \\n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.\"], [\"Language with code \\\"\", \"\\\" was not found. You should register particular language\\\\x20\\n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.\"])), languageCode));\n }\n}","import staticRegister from \"./../../utils/staticRegister.mjs\";\nimport pluralizeFn from \"./pluralize.mjs\";\nvar _staticRegister = staticRegister('phraseFormatters'),\n registerGloballyPhraseFormatter = _staticRegister.register,\n getGlobalPhraseFormatters = _staticRegister.getValues;\n\n/**\n * Register phrase formatter.\n *\n * @param {string} name Name of formatter.\n * @param {Function} formatterFn Function which will be applied on phrase propositions. It will transform them if it's possible.\n */\nexport function register(name, formatterFn) {\n registerGloballyPhraseFormatter(name, formatterFn);\n}\n\n/**\n * Get all registered previously formatters.\n *\n * @returns {Array}\n */\nexport function getAll() {\n return getGlobalPhraseFormatters();\n}\nexport { register as registerPhraseFormatter, getAll as getPhraseFormatters };\nregister('pluralize', pluralizeFn);","import \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\n/**\n * Try to choose plural form from available phrase propositions.\n *\n * @param {Array} phrasePropositions List of phrases propositions.\n * @param {number} pluralForm Number determining which phrase form should be used.\n *\n * @returns {string|Array} One particular phrase if it's possible, list of unchanged phrase propositions otherwise.\n */\nexport default function pluralize(phrasePropositions, pluralForm) {\n var isPluralizable = Array.isArray(phrasePropositions) && Number.isInteger(pluralForm);\n if (isPluralizable) {\n return phrasePropositions[pluralForm];\n }\n return phrasePropositions;\n}","/**\n * Constants for parts of translation.\n */\n\nexport var CONTEXT_MENU_ITEMS_NAMESPACE = 'ContextMenu:items';\nvar CM_ALIAS = CONTEXT_MENU_ITEMS_NAMESPACE;\nexport var CONTEXTMENU_ITEMS_NO_ITEMS = \"\".concat(CM_ALIAS, \".noItems\");\nexport var CONTEXTMENU_ITEMS_ROW_ABOVE = \"\".concat(CM_ALIAS, \".insertRowAbove\");\nexport var CONTEXTMENU_ITEMS_ROW_BELOW = \"\".concat(CM_ALIAS, \".insertRowBelow\");\nexport var CONTEXTMENU_ITEMS_INSERT_LEFT = \"\".concat(CM_ALIAS, \".insertColumnOnTheLeft\");\nexport var CONTEXTMENU_ITEMS_INSERT_RIGHT = \"\".concat(CM_ALIAS, \".insertColumnOnTheRight\");\nexport var CONTEXTMENU_ITEMS_REMOVE_ROW = \"\".concat(CM_ALIAS, \".removeRow\");\nexport var CONTEXTMENU_ITEMS_REMOVE_COLUMN = \"\".concat(CM_ALIAS, \".removeColumn\");\nexport var CONTEXTMENU_ITEMS_UNDO = \"\".concat(CM_ALIAS, \".undo\");\nexport var CONTEXTMENU_ITEMS_REDO = \"\".concat(CM_ALIAS, \".redo\");\nexport var CONTEXTMENU_ITEMS_READ_ONLY = \"\".concat(CM_ALIAS, \".readOnly\");\nexport var CONTEXTMENU_ITEMS_CLEAR_COLUMN = \"\".concat(CM_ALIAS, \".clearColumn\");\nexport var CONTEXTMENU_ITEMS_COPY = \"\".concat(CM_ALIAS, \".copy\");\nexport var CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS = \"\".concat(CM_ALIAS, \".copyWithHeaders\");\nexport var CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS = \"\".concat(CM_ALIAS, \".copyWithGroupHeaders\");\nexport var CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY = \"\".concat(CM_ALIAS, \".copyHeadersOnly\");\nexport var CONTEXTMENU_ITEMS_CUT = \"\".concat(CM_ALIAS, \".cut\");\nexport var CONTEXTMENU_ITEMS_FREEZE_COLUMN = \"\".concat(CM_ALIAS, \".freezeColumn\");\nexport var CONTEXTMENU_ITEMS_UNFREEZE_COLUMN = \"\".concat(CM_ALIAS, \".unfreezeColumn\");\nexport var CONTEXTMENU_ITEMS_MERGE_CELLS = \"\".concat(CM_ALIAS, \".mergeCells\");\nexport var CONTEXTMENU_ITEMS_UNMERGE_CELLS = \"\".concat(CM_ALIAS, \".unmergeCells\");\nexport var CONTEXTMENU_ITEMS_ADD_COMMENT = \"\".concat(CM_ALIAS, \".addComment\");\nexport var CONTEXTMENU_ITEMS_EDIT_COMMENT = \"\".concat(CM_ALIAS, \".editComment\");\nexport var CONTEXTMENU_ITEMS_REMOVE_COMMENT = \"\".concat(CM_ALIAS, \".removeComment\");\nexport var CONTEXTMENU_ITEMS_READ_ONLY_COMMENT = \"\".concat(CM_ALIAS, \".readOnlyComment\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT = \"\".concat(CM_ALIAS, \".align\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_LEFT = \"\".concat(CM_ALIAS, \".align.left\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_CENTER = \"\".concat(CM_ALIAS, \".align.center\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT = \"\".concat(CM_ALIAS, \".align.right\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY = \"\".concat(CM_ALIAS, \".align.justify\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_TOP = \"\".concat(CM_ALIAS, \".align.top\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE = \"\".concat(CM_ALIAS, \".align.middle\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM = \"\".concat(CM_ALIAS, \".align.bottom\");\nexport var CONTEXTMENU_ITEMS_BORDERS = \"\".concat(CM_ALIAS, \".borders\");\nexport var CONTEXTMENU_ITEMS_BORDERS_TOP = \"\".concat(CM_ALIAS, \".borders.top\");\nexport var CONTEXTMENU_ITEMS_BORDERS_RIGHT = \"\".concat(CM_ALIAS, \".borders.right\");\nexport var CONTEXTMENU_ITEMS_BORDERS_BOTTOM = \"\".concat(CM_ALIAS, \".borders.bottom\");\nexport var CONTEXTMENU_ITEMS_BORDERS_LEFT = \"\".concat(CM_ALIAS, \".borders.left\");\nexport var CONTEXTMENU_ITEMS_REMOVE_BORDERS = \"\".concat(CM_ALIAS, \".borders.remove\");\nexport var CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD = \"\".concat(CM_ALIAS, \".nestedHeaders.insertChildRow\"); // eslint-disable-line max-len\nexport var CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD = \"\".concat(CM_ALIAS, \".nestedHeaders.detachFromParent\"); // eslint-disable-line max-len\n\nexport var CONTEXTMENU_ITEMS_HIDE_COLUMN = \"\".concat(CM_ALIAS, \".hideColumn\");\nexport var CONTEXTMENU_ITEMS_SHOW_COLUMN = \"\".concat(CM_ALIAS, \".showColumn\");\nexport var CONTEXTMENU_ITEMS_HIDE_ROW = \"\".concat(CM_ALIAS, \".hideRow\");\nexport var CONTEXTMENU_ITEMS_SHOW_ROW = \"\".concat(CM_ALIAS, \".showRow\");\nexport var FILTERS_NAMESPACE = 'Filters:';\nexport var FILTERS_CONDITIONS_NAMESPACE = \"\".concat(FILTERS_NAMESPACE, \"conditions\");\nexport var FILTERS_CONDITIONS_NONE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".none\");\nexport var FILTERS_CONDITIONS_EMPTY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isEmpty\");\nexport var FILTERS_CONDITIONS_NOT_EMPTY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotEmpty\");\nexport var FILTERS_CONDITIONS_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isEqualTo\");\nexport var FILTERS_CONDITIONS_NOT_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotEqualTo\");\nexport var FILTERS_CONDITIONS_BEGINS_WITH = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".beginsWith\");\nexport var FILTERS_CONDITIONS_ENDS_WITH = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".endsWith\");\nexport var FILTERS_CONDITIONS_CONTAINS = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".contains\");\nexport var FILTERS_CONDITIONS_NOT_CONTAIN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".doesNotContain\");\nexport var FILTERS_CONDITIONS_BY_VALUE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".byValue\");\nexport var FILTERS_CONDITIONS_GREATER_THAN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".greaterThan\");\nexport var FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".greaterThanOrEqualTo\");\nexport var FILTERS_CONDITIONS_LESS_THAN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".lessThan\");\nexport var FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".lessThanOrEqualTo\");\nexport var FILTERS_CONDITIONS_BETWEEN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isBetween\");\nexport var FILTERS_CONDITIONS_NOT_BETWEEN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotBetween\");\nexport var FILTERS_CONDITIONS_AFTER = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".after\");\nexport var FILTERS_CONDITIONS_BEFORE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".before\");\nexport var FILTERS_CONDITIONS_TODAY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".today\");\nexport var FILTERS_CONDITIONS_TOMORROW = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".tomorrow\");\nexport var FILTERS_CONDITIONS_YESTERDAY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".yesterday\");\nexport var FILTERS_DIVS_FILTER_BY_CONDITION = \"\".concat(FILTERS_NAMESPACE, \"labels.filterByCondition\");\nexport var FILTERS_DIVS_FILTER_BY_VALUE = \"\".concat(FILTERS_NAMESPACE, \"labels.filterByValue\");\nexport var FILTERS_LABELS_CONJUNCTION = \"\".concat(FILTERS_NAMESPACE, \"labels.conjunction\");\nexport var FILTERS_LABELS_DISJUNCTION = \"\".concat(FILTERS_NAMESPACE, \"labels.disjunction\");\nexport var FILTERS_VALUES_BLANK_CELLS = \"\".concat(FILTERS_NAMESPACE, \"values.blankCells\");\nexport var FILTERS_BUTTONS_SELECT_ALL = \"\".concat(FILTERS_NAMESPACE, \"buttons.selectAll\");\nexport var FILTERS_BUTTONS_CLEAR = \"\".concat(FILTERS_NAMESPACE, \"buttons.clear\");\nexport var FILTERS_BUTTONS_OK = \"\".concat(FILTERS_NAMESPACE, \"buttons.ok\");\nexport var FILTERS_BUTTONS_CANCEL = \"\".concat(FILTERS_NAMESPACE, \"buttons.cancel\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_SEARCH = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.search\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_VALUE = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.value\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.secondValue\");","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _dictionary;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * @preserve\n * Authors: Handsoncode\n * Last updated: Nov 15, 2017\n *\n * Description: Definition file for English - United States language-country.\n */\nimport * as C from \"../constants.mjs\";\nvar dictionary = (_dictionary = {\n languageCode: 'en-US'\n}, _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NO_ITEMS, 'No available options'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_ABOVE, 'Insert row above'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_BELOW, 'Insert row below'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_LEFT, 'Insert column left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_RIGHT, 'Insert column right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_ROW, ['Remove row', 'Remove rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COLUMN, ['Remove column', 'Remove columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNDO, 'Undo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REDO, 'Redo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY, 'Read only'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CLEAR_COLUMN, 'Clear column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT, 'Alignment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER, 'Center'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY, 'Justify'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE, 'Middle'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_FREEZE_COLUMN, 'Freeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN, 'Unfreeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS, 'Borders'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_BORDERS, 'Remove border(s)'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ADD_COMMENT, 'Add comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_EDIT_COMMENT, 'Edit comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COMMENT, 'Delete comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT, 'Read-only comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_MERGE_CELLS, 'Merge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNMERGE_CELLS, 'Unmerge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY, 'Copy'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS, ['Copy with header', 'Copy with headers']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS, ['Copy with group header', 'Copy with group headers']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY, ['Copy header only', 'Copy headers only']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CUT, 'Cut'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD, 'Insert child row'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD, 'Detach from parent'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_COLUMN, ['Hide column', 'Hide columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_COLUMN, ['Show column', 'Show columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_ROW, ['Hide row', 'Hide rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_ROW, ['Show row', 'Show rows']), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NONE, 'None'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EMPTY, 'Is empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EMPTY, 'Is not empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EQUAL, 'Is equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EQUAL, 'Is not equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEGINS_WITH, 'Begins with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_ENDS_WITH, 'Ends with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_CONTAINS, 'Contains'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_CONTAIN, 'Does not contain'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN, 'Greater than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL, 'Greater than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN, 'Less than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL, 'Less than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BETWEEN, 'Is between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_BETWEEN, 'Is not between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_AFTER, 'After'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEFORE, 'Before'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TODAY, 'Today'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TOMORROW, 'Tomorrow'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_YESTERDAY, 'Yesterday'), _defineProperty(_dictionary, C.FILTERS_VALUES_BLANK_CELLS, 'Blank cells'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_CONDITION, 'Filter by condition'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_VALUE, 'Filter by value'), _defineProperty(_dictionary, C.FILTERS_LABELS_CONJUNCTION, 'And'), _defineProperty(_dictionary, C.FILTERS_LABELS_DISJUNCTION, 'Or'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_SELECT_ALL, 'Select all'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CLEAR, 'Clear'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_OK, 'OK'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CANCEL, 'Cancel'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SEARCH, 'Search'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_VALUE, 'Value'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE, 'Second value'), _dictionary);\nexport default dictionary;","import { isObject, deepClone } from \"../helpers/object.mjs\";\nimport { arrayEach } from \"./../helpers/array.mjs\";\nimport { isUndefined } from \"../helpers/mixed.mjs\";\nimport { extendNotExistingKeys, normalizeLanguageCode, warnUserAboutLanguageRegistration } from \"./utils.mjs\";\nimport staticRegister from \"../utils/staticRegister.mjs\";\nimport { getPhraseFormatters } from \"./phraseFormatters/index.mjs\";\nimport DEFAULT_DICTIONARY from \"./languages/en-US.mjs\";\nimport * as _dictionaryKeys from \"./constants.mjs\";\nexport { _dictionaryKeys as dictionaryKeys };\nexport var DEFAULT_LANGUAGE_CODE = DEFAULT_DICTIONARY.languageCode;\nvar _staticRegister = staticRegister('languagesDictionaries'),\n registerGloballyLanguageDictionary = _staticRegister.register,\n getGlobalLanguageDictionary = _staticRegister.getItem,\n hasGlobalLanguageDictionary = _staticRegister.hasItem,\n getGlobalLanguagesDictionaries = _staticRegister.getValues;\n\n/**\n * Register automatically the default language dictionary.\n */\nregisterLanguageDictionary(DEFAULT_DICTIONARY);\n\n/**\n * Register language dictionary for specific language code.\n *\n * @param {string|object} languageCodeOrDictionary Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE' or object representing dictionary.\n * @param {object} dictionary Dictionary for specific language (optional if first parameter has already dictionary).\n * @returns {object}\n */\nexport function registerLanguageDictionary(languageCodeOrDictionary, dictionary) {\n var languageCode = languageCodeOrDictionary;\n var dictionaryObject = dictionary;\n\n // Dictionary passed as first argument.\n if (isObject(languageCodeOrDictionary)) {\n dictionaryObject = languageCodeOrDictionary;\n languageCode = dictionaryObject.languageCode;\n }\n extendLanguageDictionary(languageCode, dictionaryObject);\n registerGloballyLanguageDictionary(languageCode, deepClone(dictionaryObject));\n\n // We do not allow user to work with dictionary by reference, it can cause lot of bugs.\n return deepClone(dictionaryObject);\n}\n\n/**\n * Extend handled dictionary by default language dictionary. As result, if any dictionary key isn't defined for specific language, it will be filled with default language value (\"dictionary gaps\" are supplemented).\n *\n * @private\n * @param {string} languageCode Language code.\n * @param {object} dictionary Dictionary which is extended.\n */\nfunction extendLanguageDictionary(languageCode, dictionary) {\n if (languageCode !== DEFAULT_LANGUAGE_CODE) {\n extendNotExistingKeys(dictionary, getGlobalLanguageDictionary(DEFAULT_LANGUAGE_CODE));\n }\n}\n\n/**\n * Get language dictionary for specific language code.\n *\n * @param {string} languageCode Language code.\n * @returns {object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).\n */\nexport function getLanguageDictionary(languageCode) {\n if (!hasLanguageDictionary(languageCode)) {\n return null;\n }\n return deepClone(getGlobalLanguageDictionary(languageCode));\n}\n\n/**\n *\n * Get if language with specified language code was registered.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {boolean}\n */\nexport function hasLanguageDictionary(languageCode) {\n return hasGlobalLanguageDictionary(languageCode);\n}\n\n/**\n * Get default language dictionary.\n *\n * @returns {object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).\n */\nexport function getDefaultLanguageDictionary() {\n return DEFAULT_DICTIONARY;\n}\n\n/**\n * Get registered language dictionaries.\n *\n * @returns {Array}\n */\nexport function getLanguagesDictionaries() {\n return getGlobalLanguagesDictionaries();\n}\n\n/**\n * Get phrase for specified dictionary key.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @param {string} dictionaryKey Constant which is dictionary key.\n * @param {*} argumentsForFormatters Arguments which will be handled by formatters.\n *\n * @returns {string}\n */\nexport function getTranslatedPhrase(languageCode, dictionaryKey, argumentsForFormatters) {\n var languageDictionary = getLanguageDictionary(languageCode);\n if (languageDictionary === null) {\n return null;\n }\n var phrasePropositions = languageDictionary[dictionaryKey];\n if (isUndefined(phrasePropositions)) {\n return null;\n }\n var formattedPhrase = getFormattedPhrase(phrasePropositions, argumentsForFormatters);\n if (Array.isArray(formattedPhrase)) {\n return formattedPhrase[0];\n }\n return formattedPhrase;\n}\n\n/**\n * Get formatted phrase from phrases propositions for specified dictionary key.\n *\n * @private\n * @param {Array|string} phrasePropositions List of phrase propositions.\n * @param {*} argumentsForFormatters Arguments which will be handled by formatters.\n *\n * @returns {Array|string}\n */\nfunction getFormattedPhrase(phrasePropositions, argumentsForFormatters) {\n var formattedPhrasePropositions = phrasePropositions;\n arrayEach(getPhraseFormatters(), function (formatter) {\n formattedPhrasePropositions = formatter(phrasePropositions, argumentsForFormatters);\n });\n return formattedPhrasePropositions;\n}\n\n/**\n * Returns valid language code. If the passed language code doesn't exist default one will be used.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {string}\n */\nexport function getValidLanguageCode(languageCode) {\n var normalizedLanguageCode = normalizeLanguageCode(languageCode);\n if (!hasLanguageDictionary(normalizedLanguageCode)) {\n normalizedLanguageCode = DEFAULT_LANGUAGE_CODE;\n warnUserAboutLanguageRegistration(languageCode);\n }\n return normalizedLanguageCode;\n}","export var ACTIVE_HEADER_TYPE = 'active-header';\nexport var AREA_TYPE = 'area';\nexport var CELL_TYPE = 'cell';\nexport var FILL_TYPE = 'fill';\nexport var HEADER_TYPE = 'header';\nexport var CUSTOM_SELECTION_TYPE = 'custom-selection';","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from \"../../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation } from \"../../../helpers/dom/event.mjs\";\nimport { objectEach } from \"../../../helpers/object.mjs\";\nimport { isMobileBrowser } from \"../../../helpers/browser.mjs\";\n/**\n *\n */\nvar Border = /*#__PURE__*/function () {\n // TODO As this is an internal class, should be designed for using {Walkontable}. It uses the facade,\n // TODO Con. Because the class is created on place where the instance reference comes from external origin.\n // TODO Imho, the discrimination for handling both, facade and non-facade should be handled.\n /**\n * @param {WalkontableFacade} wotInstance The Walkontable instance.\n * @param {object} settings The border settings.\n */\n function Border(wotInstance, settings) {\n _classCallCheck(this, Border);\n if (!settings) {\n return;\n }\n this.eventManager = wotInstance.eventManager;\n this.instance = wotInstance;\n this.wot = wotInstance;\n this.settings = settings;\n this.mouseDown = false;\n this.main = null;\n this.top = null;\n this.bottom = null;\n this.start = null;\n this.end = null;\n this.topStyle = null;\n this.bottomStyle = null;\n this.startStyle = null;\n this.endStyle = null;\n this.cornerDefaultStyle = {\n width: '6px',\n height: '6px',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#FFF'\n };\n // Offset to moving the corner to be centered relative to the grid.\n this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);\n this.corner = null;\n this.cornerStyle = null;\n this.createBorders(settings);\n this.registerListeners();\n }\n\n /**\n * Register all necessary events.\n */\n _createClass(Border, [{\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this2 = this;\n var documentBody = this.wot.rootDocument.body;\n this.eventManager.addEventListener(documentBody, 'mousedown', function () {\n return _this2.onMouseDown();\n });\n this.eventManager.addEventListener(documentBody, 'mouseup', function () {\n return _this2.onMouseUp();\n });\n var _loop = function _loop(c) {\n var element = _this2.main.childNodes[c];\n _this2.eventManager.addEventListener(element, 'mouseenter', function (event) {\n return _this2.onMouseEnter(event, _this2.main.childNodes[c]);\n });\n };\n for (var c = 0, len = this.main.childNodes.length; c < len; c++) {\n _loop(c);\n }\n }\n\n /**\n * Mouse down listener.\n *\n * @private\n */\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown() {\n this.mouseDown = true;\n }\n\n /**\n * Mouse up listener.\n *\n * @private\n */\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n this.mouseDown = false;\n }\n\n /**\n * Mouse enter listener for fragment selection functionality.\n *\n * @private\n * @param {Event} event Dom event.\n * @param {HTMLElement} parentElement Part of border element.\n */\n }, {\n key: \"onMouseEnter\",\n value: function onMouseEnter(event, parentElement) {\n if (!this.mouseDown || !this.wot.getSetting('hideBorderOnMouseDownOver')) {\n return;\n }\n event.preventDefault();\n stopImmediatePropagation(event);\n var _this = this;\n var documentBody = this.wot.rootDocument.body;\n var bounds = parentElement.getBoundingClientRect();\n\n // Hide border to prevents selection jumping when fragmentSelection is enabled.\n parentElement.style.display = 'none';\n\n /**\n * @param {Event} mouseEvent The mouse event object.\n * @returns {boolean}\n */\n function isOutside(mouseEvent) {\n if (mouseEvent.clientY < Math.floor(bounds.top)) {\n return true;\n }\n if (mouseEvent.clientY > Math.ceil(bounds.top + bounds.height)) {\n return true;\n }\n if (mouseEvent.clientX < Math.floor(bounds.left)) {\n return true;\n }\n if (mouseEvent.clientX > Math.ceil(bounds.left + bounds.width)) {\n return true;\n }\n }\n\n /**\n * @param {Event} handlerEvent The mouse event object.\n */\n function handler(handlerEvent) {\n if (isOutside(handlerEvent)) {\n _this.eventManager.removeEventListener(documentBody, 'mousemove', handler);\n parentElement.style.display = 'block';\n }\n }\n this.eventManager.addEventListener(documentBody, 'mousemove', handler);\n }\n\n /**\n * Create border elements.\n *\n * @param {object} settings The border settings.\n */\n }, {\n key: \"createBorders\",\n value: function createBorders(settings) {\n var rootDocument = this.wot.rootDocument;\n this.main = rootDocument.createElement('div');\n var borderDivs = ['top', 'start', 'bottom', 'end', 'corner'];\n var style = this.main.style;\n style.position = 'absolute';\n style.top = 0;\n style.left = 0;\n for (var i = 0; i < 5; i++) {\n var position = borderDivs[i];\n var div = rootDocument.createElement('div');\n div.className = \"wtBorder \".concat(this.settings.className || ''); // + borderDivs[i];\n\n if (this.settings[position] && this.settings[position].hide) {\n div.className += ' hidden';\n }\n style = div.style;\n style.backgroundColor = this.settings[position] && this.settings[position].color ? this.settings[position].color : settings.border.color;\n style.height = this.settings[position] && this.settings[position].width ? \"\".concat(this.settings[position].width, \"px\") : \"\".concat(settings.border.width, \"px\");\n style.width = this.settings[position] && this.settings[position].width ? \"\".concat(this.settings[position].width, \"px\") : \"\".concat(settings.border.width, \"px\");\n this.main.appendChild(div);\n }\n this.top = this.main.childNodes[0];\n this.start = this.main.childNodes[1];\n this.bottom = this.main.childNodes[2];\n this.end = this.main.childNodes[3];\n this.topStyle = this.top.style;\n this.startStyle = this.start.style;\n this.bottomStyle = this.bottom.style;\n this.endStyle = this.end.style;\n this.corner = this.main.childNodes[4];\n this.corner.className += ' corner';\n this.cornerStyle = this.corner.style;\n this.cornerStyle.width = this.cornerDefaultStyle.width;\n this.cornerStyle.height = this.cornerDefaultStyle.height;\n this.cornerStyle.border = [this.cornerDefaultStyle.borderWidth, this.cornerDefaultStyle.borderStyle, this.cornerDefaultStyle.borderColor].join(' ');\n if (isMobileBrowser()) {\n this.createMultipleSelectorHandles();\n }\n this.disappear();\n var wtTable = this.wot.wtTable;\n var bordersHolder = wtTable.bordersHolder;\n if (!bordersHolder) {\n bordersHolder = rootDocument.createElement('div');\n bordersHolder.className = 'htBorders';\n wtTable.bordersHolder = bordersHolder;\n wtTable.spreader.appendChild(bordersHolder);\n }\n bordersHolder.appendChild(this.main);\n }\n\n /**\n * Create multiple selector handler for mobile devices.\n */\n }, {\n key: \"createMultipleSelectorHandles\",\n value: function createMultipleSelectorHandles() {\n var _this3 = this;\n var rootDocument = this.wot.rootDocument;\n this.selectionHandles = {\n top: rootDocument.createElement('DIV'),\n topHitArea: rootDocument.createElement('DIV'),\n bottom: rootDocument.createElement('DIV'),\n bottomHitArea: rootDocument.createElement('DIV')\n };\n var width = 10;\n var hitAreaWidth = 40;\n this.selectionHandles.top.className = 'topSelectionHandle topLeftSelectionHandle';\n this.selectionHandles.topHitArea.className = 'topSelectionHandle-HitArea topLeftSelectionHandle-HitArea';\n this.selectionHandles.bottom.className = 'bottomSelectionHandle bottomRightSelectionHandle';\n this.selectionHandles.bottomHitArea.className = 'bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea';\n this.selectionHandles.styles = {\n top: this.selectionHandles.top.style,\n topHitArea: this.selectionHandles.topHitArea.style,\n bottom: this.selectionHandles.bottom.style,\n bottomHitArea: this.selectionHandles.bottomHitArea.style\n };\n var hitAreaStyle = {\n position: 'absolute',\n height: \"\".concat(hitAreaWidth, \"px\"),\n width: \"\".concat(hitAreaWidth, \"px\"),\n 'border-radius': \"\".concat(parseInt(hitAreaWidth / 1.5, 10), \"px\")\n };\n objectEach(hitAreaStyle, function (value, key) {\n _this3.selectionHandles.styles.bottomHitArea[key] = value;\n _this3.selectionHandles.styles.topHitArea[key] = value;\n });\n var handleStyle = {\n position: 'absolute',\n height: \"\".concat(width, \"px\"),\n width: \"\".concat(width, \"px\"),\n 'border-radius': \"\".concat(parseInt(width / 1.5, 10), \"px\"),\n background: '#F5F5FF',\n border: '1px solid #4285c8'\n };\n objectEach(handleStyle, function (value, key) {\n _this3.selectionHandles.styles.bottom[key] = value;\n _this3.selectionHandles.styles.top[key] = value;\n });\n this.main.appendChild(this.selectionHandles.top);\n this.main.appendChild(this.selectionHandles.bottom);\n this.main.appendChild(this.selectionHandles.topHitArea);\n this.main.appendChild(this.selectionHandles.bottomHitArea);\n }\n\n /**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @returns {boolean}\n */\n }, {\n key: \"isPartRange\",\n value: function isPartRange(row, col) {\n var areaSelection = this.wot.selections.createOrGetArea();\n if (areaSelection.cellRange) {\n if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number} top The top position of the handler.\n * @param {number} left The left position of the handler.\n * @param {number} width The width of the handler.\n * @param {number} height The height of the handler.\n */\n }, {\n key: \"updateMultipleSelectionHandlesPosition\",\n value: function updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {\n var isRtl = this.wot.wtSettings.getSetting('rtlMode');\n var inlinePosProperty = isRtl ? 'right' : 'left';\n var _this$selectionHandle = this.selectionHandles.styles,\n topStyles = _this$selectionHandle.top,\n topHitAreaStyles = _this$selectionHandle.topHitArea,\n bottomStyles = _this$selectionHandle.bottom,\n bottomHitAreaStyles = _this$selectionHandle.bottomHitArea;\n var handleBorderSize = parseInt(topStyles.borderWidth, 10);\n var handleSize = parseInt(topStyles.width, 10);\n var hitAreaSize = parseInt(topHitAreaStyles.width, 10);\n var totalTableWidth = this.wot.wtTable.getWidth();\n var totalTableHeight = this.wot.wtTable.getHeight();\n topStyles.top = \"\".concat(parseInt(top - handleSize - 1, 10), \"px\");\n topStyles[inlinePosProperty] = \"\".concat(parseInt(left - handleSize - 1, 10), \"px\");\n topHitAreaStyles.top = \"\".concat(parseInt(top - hitAreaSize / 4 * 3, 10), \"px\");\n topHitAreaStyles[inlinePosProperty] = \"\".concat(parseInt(left - hitAreaSize / 4 * 3, 10), \"px\");\n var bottomHandlerInline = Math.min(parseInt(left + width, 10), totalTableWidth - handleSize - handleBorderSize * 2);\n var bottomHandlerAreaInline = Math.min(parseInt(left + width - hitAreaSize / 4, 10), totalTableWidth - hitAreaSize - handleBorderSize * 2);\n bottomStyles[inlinePosProperty] = \"\".concat(bottomHandlerInline, \"px\");\n bottomHitAreaStyles[inlinePosProperty] = \"\".concat(bottomHandlerAreaInline, \"px\");\n var bottomHandlerTop = Math.min(parseInt(top + height, 10), totalTableHeight - handleSize - handleBorderSize * 2);\n var bottomHandlerAreaTop = Math.min(parseInt(top + height - hitAreaSize / 4, 10), totalTableHeight - hitAreaSize - handleBorderSize * 2);\n bottomStyles.top = \"\".concat(bottomHandlerTop, \"px\");\n bottomHitAreaStyles.top = \"\".concat(bottomHandlerAreaTop, \"px\");\n if (this.settings.border.cornerVisible && this.settings.border.cornerVisible()) {\n topStyles.display = 'block';\n topHitAreaStyles.display = 'block';\n if (this.isPartRange(row, col)) {\n bottomStyles.display = 'none';\n bottomHitAreaStyles.display = 'none';\n } else {\n bottomStyles.display = 'block';\n bottomHitAreaStyles.display = 'block';\n }\n } else {\n topStyles.display = 'none';\n bottomStyles.display = 'none';\n topHitAreaStyles.display = 'none';\n bottomHitAreaStyles.display = 'none';\n }\n if (row === this.wot.wtSettings.getSetting('fixedRowsTop') || col === this.wot.wtSettings.getSetting('fixedColumnsStart')) {\n topStyles.zIndex = '9999';\n topHitAreaStyles.zIndex = '9999';\n } else {\n topStyles.zIndex = '';\n topHitAreaStyles.zIndex = '';\n }\n }\n\n /**\n * Show border around one or many cells.\n *\n * @param {Array} corners The corner coordinates.\n */\n }, {\n key: \"appear\",\n value: function appear(corners) {\n if (this.disabled) {\n return;\n }\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n rootDocument = _this$wot.rootDocument,\n rootWindow = _this$wot.rootWindow; // todo refactoring: consider about using internal facade (it is given by external code)\n var fromRow;\n var toRow;\n var fromColumn;\n var toColumn;\n var rowHeader;\n var columnHeader;\n var rowsCount = wtTable.getRenderedRowsCount();\n for (var i = 0; i < rowsCount; i += 1) {\n var s = wtTable.rowFilter.renderedToSource(i);\n if (s >= corners[0] && s <= corners[2]) {\n fromRow = s;\n rowHeader = corners[0];\n break;\n }\n }\n for (var _i = rowsCount - 1; _i >= 0; _i -= 1) {\n var _s = wtTable.rowFilter.renderedToSource(_i);\n if (_s >= corners[0] && _s <= corners[2]) {\n toRow = _s;\n break;\n }\n }\n var columnsCount = wtTable.getRenderedColumnsCount();\n for (var _i2 = 0; _i2 < columnsCount; _i2 += 1) {\n var _s2 = wtTable.columnFilter.renderedToSource(_i2);\n if (_s2 >= corners[1] && _s2 <= corners[3]) {\n fromColumn = _s2;\n columnHeader = corners[1];\n break;\n }\n }\n for (var _i3 = columnsCount - 1; _i3 >= 0; _i3 -= 1) {\n var _s3 = wtTable.columnFilter.renderedToSource(_i3);\n if (_s3 >= corners[1] && _s3 <= corners[3]) {\n toColumn = _s3;\n break;\n }\n }\n if (fromRow === void 0 || fromColumn === void 0) {\n this.disappear();\n return;\n }\n var fromTD = wtTable.getCell(this.wot.createCellCoords(fromRow, fromColumn));\n var isMultiple = fromRow !== toRow || fromColumn !== toColumn;\n var toTD = isMultiple ? wtTable.getCell(this.wot.createCellCoords(toRow, toColumn)) : fromTD;\n var fromOffset = offset(fromTD);\n var toOffset = isMultiple ? offset(toTD) : fromOffset;\n var containerOffset = offset(wtTable.TABLE);\n var containerWidth = outerWidth(wtTable.TABLE);\n var minTop = fromOffset.top;\n var minLeft = fromOffset.left;\n var isRtl = this.wot.wtSettings.getSetting('rtlMode');\n var inlineStartPos = 0;\n var width = 0;\n if (isRtl) {\n var fromWidth = outerWidth(fromTD);\n var gridRightPos = rootWindow.innerWidth - containerOffset.left - containerWidth;\n width = minLeft + fromWidth - toOffset.left;\n inlineStartPos = rootWindow.innerWidth - minLeft - fromWidth - gridRightPos - 1;\n } else {\n width = toOffset.left + outerWidth(toTD) - minLeft;\n inlineStartPos = minLeft - containerOffset.left - 1;\n }\n if (this.isEntireColumnSelected(fromRow, toRow)) {\n var modifiedValues = this.getDimensionsFromHeader('columns', fromColumn, toColumn, rowHeader, containerOffset);\n var fromTH = null;\n if (modifiedValues) {\n var _modifiedValues = _slicedToArray(modifiedValues, 3);\n fromTH = _modifiedValues[0];\n inlineStartPos = _modifiedValues[1];\n width = _modifiedValues[2];\n }\n if (fromTH) {\n fromTD = fromTH;\n }\n }\n var top = minTop - containerOffset.top - 1;\n var height = toOffset.top + outerHeight(toTD) - minTop;\n if (this.isEntireRowSelected(fromColumn, toColumn)) {\n var _modifiedValues2 = this.getDimensionsFromHeader('rows', fromRow, toRow, columnHeader, containerOffset);\n var _fromTH = null;\n if (_modifiedValues2) {\n var _modifiedValues3 = _slicedToArray(_modifiedValues2, 3);\n _fromTH = _modifiedValues3[0];\n top = _modifiedValues3[1];\n height = _modifiedValues3[2];\n }\n if (_fromTH) {\n fromTD = _fromTH;\n }\n }\n var style = getComputedStyle(fromTD, rootWindow);\n if (parseInt(style.borderTopWidth, 10) > 0) {\n top += 1;\n height = height > 0 ? height - 1 : 0;\n }\n if (parseInt(style[isRtl ? 'borderRightWidth' : 'borderLeftWidth'], 10) > 0) {\n inlineStartPos += 1;\n width = width > 0 ? width - 1 : 0;\n }\n var inlinePosProperty = isRtl ? 'right' : 'left';\n this.topStyle.top = \"\".concat(top, \"px\");\n this.topStyle[inlinePosProperty] = \"\".concat(inlineStartPos, \"px\");\n this.topStyle.width = \"\".concat(width, \"px\");\n this.topStyle.display = 'block';\n this.startStyle.top = \"\".concat(top, \"px\");\n this.startStyle[inlinePosProperty] = \"\".concat(inlineStartPos, \"px\");\n this.startStyle.height = \"\".concat(height, \"px\");\n this.startStyle.display = 'block';\n var delta = Math.floor(this.settings.border.width / 2);\n this.bottomStyle.top = \"\".concat(top + height - delta, \"px\");\n this.bottomStyle[inlinePosProperty] = \"\".concat(inlineStartPos, \"px\");\n this.bottomStyle.width = \"\".concat(width, \"px\");\n this.bottomStyle.display = 'block';\n this.endStyle.top = \"\".concat(top, \"px\");\n this.endStyle[inlinePosProperty] = \"\".concat(inlineStartPos + width - delta, \"px\");\n this.endStyle.height = \"\".concat(height + 1, \"px\");\n this.endStyle.display = 'block';\n var cornerVisibleSetting = this.settings.border.cornerVisible;\n cornerVisibleSetting = typeof cornerVisibleSetting === 'function' ? cornerVisibleSetting(this.settings.layerLevel) : cornerVisibleSetting;\n var hookResult = this.wot.getSetting('onModifyGetCellCoords', toRow, toColumn);\n var checkRow = toRow,\n checkCol = toColumn;\n if (hookResult && Array.isArray(hookResult)) {\n var _hookResult = _slicedToArray(hookResult, 4);\n checkRow = _hookResult[2];\n checkCol = _hookResult[3];\n }\n if (isMobileBrowser() || !cornerVisibleSetting || this.isPartRange(checkRow, checkCol)) {\n this.cornerStyle.display = 'none';\n } else {\n this.cornerStyle.top = \"\".concat(top + height + this.cornerCenterPointOffset - 1, \"px\");\n this.cornerStyle[inlinePosProperty] = \"\".concat(inlineStartPos + width + this.cornerCenterPointOffset - 1, \"px\");\n this.cornerStyle.borderRightWidth = this.cornerDefaultStyle.borderWidth;\n this.cornerStyle.width = this.cornerDefaultStyle.width;\n\n // Hide the fill handle, so the possible further adjustments won't force unneeded scrollbars.\n this.cornerStyle.display = 'none';\n var trimmingContainer = getTrimmingContainer(wtTable.TABLE);\n var trimToWindow = trimmingContainer === rootWindow;\n if (trimToWindow) {\n trimmingContainer = rootDocument.documentElement;\n }\n var cornerHalfWidth = parseInt(this.cornerDefaultStyle.width, 10) / 2;\n var cornerHalfHeight = parseInt(this.cornerDefaultStyle.height, 10) / 2;\n if (toColumn === this.wot.getSetting('totalColumns') - 1) {\n var toTdOffsetLeft = trimToWindow ? toTD.getBoundingClientRect().left : toTD.offsetLeft;\n var cornerOverlappingContainer = false;\n var cornerEdge = 0;\n if (isRtl) {\n cornerEdge = toTdOffsetLeft - parseInt(this.cornerDefaultStyle.width, 10) / 2;\n cornerOverlappingContainer = cornerEdge < 0;\n } else {\n cornerEdge = toTdOffsetLeft + outerWidth(toTD) + parseInt(this.cornerDefaultStyle.width, 10) / 2;\n cornerOverlappingContainer = cornerEdge >= innerWidth(trimmingContainer);\n }\n if (cornerOverlappingContainer) {\n this.cornerStyle[inlinePosProperty] = \"\".concat(Math.floor(inlineStartPos + width + this.cornerCenterPointOffset - cornerHalfWidth), \"px\");\n this.cornerStyle[isRtl ? 'borderLeftWidth' : 'borderRightWidth'] = 0;\n }\n }\n if (toRow === this.wot.getSetting('totalRows') - 1) {\n var toTdOffsetTop = trimToWindow ? toTD.getBoundingClientRect().top : toTD.offsetTop;\n var cornerBottomEdge = toTdOffsetTop + outerHeight(toTD) + parseInt(this.cornerDefaultStyle.height, 10) / 2;\n var _cornerOverlappingContainer = cornerBottomEdge >= innerHeight(trimmingContainer);\n if (_cornerOverlappingContainer) {\n this.cornerStyle.top = \"\".concat(Math.floor(top + height + this.cornerCenterPointOffset - cornerHalfHeight), \"px\");\n this.cornerStyle.borderBottomWidth = 0;\n }\n }\n this.cornerStyle.display = 'block';\n }\n if (isMobileBrowser()) {\n this.updateMultipleSelectionHandlesPosition(toRow, toColumn, top, inlineStartPos, width, height);\n }\n }\n\n /**\n * Check whether an entire column of cells is selected.\n *\n * @private\n * @param {number} startRowIndex Start row index.\n * @param {number} endRowIndex End row index.\n * @returns {boolean}\n */\n }, {\n key: \"isEntireColumnSelected\",\n value: function isEntireColumnSelected(startRowIndex, endRowIndex) {\n return startRowIndex === this.wot.wtTable.getFirstRenderedRow() && endRowIndex === this.wot.wtTable.getLastRenderedRow();\n }\n\n /**\n * Check whether an entire row of cells is selected.\n *\n * @private\n * @param {number} startColumnIndex Start column index.\n * @param {number} endColumnIndex End column index.\n * @returns {boolean}\n */\n }, {\n key: \"isEntireRowSelected\",\n value: function isEntireRowSelected(startColumnIndex, endColumnIndex) {\n return startColumnIndex === this.wot.wtTable.getFirstRenderedColumn() && endColumnIndex === this.wot.wtTable.getLastRenderedColumn();\n }\n\n /**\n * Get left/top index and width/height depending on the `direction` provided.\n *\n * @private\n * @param {string} direction `rows` or `columns`, defines if an entire column or row is selected.\n * @param {number} fromIndex Start index of the selection.\n * @param {number} toIndex End index of the selection.\n * @param {number} headerIndex The header index as negative value.\n * @param {number} containerOffset Offset of the container.\n * @returns {Array|boolean} Returns an array of [headerElement, left, width] or [headerElement, top, height], depending on `direction` (`false` in case of an error getting the headers).\n */\n }, {\n key: \"getDimensionsFromHeader\",\n value: function getDimensionsFromHeader(direction, fromIndex, toIndex, headerIndex, containerOffset) {\n var wtTable = this.wot.wtTable;\n var rootHotElement = wtTable.wtRootElement.parentNode;\n var getHeaderFn = null;\n var dimensionFn = null;\n var entireSelectionClassname = null;\n var index = null;\n var dimension = null;\n var dimensionProperty = null;\n var startHeader = null;\n var endHeader = null;\n switch (direction) {\n case 'rows':\n getHeaderFn = function getHeaderFn() {\n return wtTable.getRowHeader.apply(wtTable, arguments);\n };\n dimensionFn = function dimensionFn() {\n return outerHeight.apply(void 0, arguments);\n };\n entireSelectionClassname = 'ht__selection--rows';\n dimensionProperty = 'top';\n break;\n case 'columns':\n getHeaderFn = function getHeaderFn() {\n return wtTable.getColumnHeader.apply(wtTable, arguments);\n };\n dimensionFn = function dimensionFn() {\n return outerWidth.apply(void 0, arguments);\n };\n entireSelectionClassname = 'ht__selection--columns';\n dimensionProperty = 'left';\n break;\n default:\n }\n if (rootHotElement.classList.contains(entireSelectionClassname)) {\n var columnHeaderLevelCount = this.wot.getSetting('columnHeaders').length;\n startHeader = getHeaderFn(fromIndex, columnHeaderLevelCount - headerIndex);\n endHeader = getHeaderFn(toIndex, columnHeaderLevelCount - headerIndex);\n if (!startHeader || !endHeader) {\n return false;\n }\n var startHeaderOffset = offset(startHeader);\n var endOffset = offset(endHeader);\n if (startHeader && endHeader) {\n index = startHeaderOffset[dimensionProperty] - containerOffset[dimensionProperty] - 1;\n dimension = endOffset[dimensionProperty] + dimensionFn(endHeader) - startHeaderOffset[dimensionProperty];\n }\n return [startHeader, index, dimension];\n }\n return false;\n }\n\n /**\n * Change border style.\n *\n * @private\n * @param {string} borderElement Coordinate where add/remove border: top, bottom, start, end.\n * @param {object} border The border object descriptor.\n */\n }, {\n key: \"changeBorderStyle\",\n value: function changeBorderStyle(borderElement, border) {\n var style = this[borderElement].style;\n var borderStyle = border[borderElement];\n if (!borderStyle || borderStyle.hide) {\n addClass(this[borderElement], 'hidden');\n } else {\n if (hasClass(this[borderElement], 'hidden')) {\n removeClass(this[borderElement], 'hidden');\n }\n style.backgroundColor = borderStyle.color;\n if (borderElement === 'top' || borderElement === 'bottom') {\n style.height = \"\".concat(borderStyle.width, \"px\");\n }\n if (borderElement === 'start' || borderElement === 'end') {\n style.width = \"\".concat(borderStyle.width, \"px\");\n }\n }\n }\n\n /**\n * Change border style to default.\n *\n * @private\n * @param {string} position The position type (\"top\", \"bottom\", \"start\", \"end\") to change.\n */\n }, {\n key: \"changeBorderToDefaultStyle\",\n value: function changeBorderToDefaultStyle(position) {\n var defaultBorder = {\n width: 1,\n color: '#000'\n };\n var style = this[position].style;\n style.backgroundColor = defaultBorder.color;\n style.width = \"\".concat(defaultBorder.width, \"px\");\n style.height = \"\".concat(defaultBorder.width, \"px\");\n }\n\n /**\n * Toggle class 'hidden' to element.\n *\n * @private\n * @param {string} borderElement Coordinate where add/remove border: top, bottom, start, end.\n * @param {boolean} [remove] Defines type of the action to perform.\n */\n }, {\n key: \"toggleHiddenClass\",\n value: function toggleHiddenClass(borderElement, remove) {\n this.changeBorderToDefaultStyle(borderElement);\n if (remove) {\n addClass(this[borderElement], 'hidden');\n } else {\n removeClass(this[borderElement], 'hidden');\n }\n }\n\n /**\n * Hide border.\n */\n }, {\n key: \"disappear\",\n value: function disappear() {\n this.topStyle.display = 'none';\n this.bottomStyle.display = 'none';\n this.startStyle.display = 'none';\n this.endStyle.display = 'none';\n this.cornerStyle.display = 'none';\n if (isMobileBrowser()) {\n this.selectionHandles.styles.top.display = 'none';\n this.selectionHandles.styles.topHitArea.display = 'none';\n this.selectionHandles.styles.bottom.display = 'none';\n this.selectionHandles.styles.bottomHitArea.display = 'none';\n }\n }\n\n /**\n * Cleans up all the DOM state related to a Border instance. Call this prior to deleting a Border instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.eventManager.destroyWithOwnEventsOnly();\n this.main.parentNode.removeChild(this.main);\n }\n }]);\n return Border;\n}();\nexport default Border;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.values.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { addClass, hasClass } from \"./../../../helpers/dom/element.mjs\";\nimport Border from \"./border.mjs\";\n/**\n * @class Selection\n */\nvar Selection = /*#__PURE__*/function () {\n /**\n * @param {object} settings The selection settings object. @todo type.\n * @param {CellRange} cellRange The cell range instance.\n */\n function Selection(settings, cellRange) {\n _classCallCheck(this, Selection);\n this.settings = settings;\n this.cellRange = cellRange || null;\n this.instanceBorders = {};\n this.classNames = [this.settings.className];\n this.classNameGenerator = this.linearClassNameGenerator(this.settings.className, this.settings.layerLevel);\n }\n\n /**\n * Each Walkontable clone requires it's own border for every selection. This method creates and returns selection\n * borders per instance.\n *\n * @param {WalkontableFacade} wotInstance The Walkontable instance.\n * @returns {Border}\n */\n _createClass(Selection, [{\n key: \"getBorder\",\n value: function getBorder(wotInstance) {\n if (!this.instanceBorders[wotInstance.guid]) {\n this.instanceBorders[wotInstance.guid] = new Border(wotInstance, this.settings);\n }\n return this.instanceBorders[wotInstance.guid];\n }\n\n /**\n * Checks if selection is empty.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n return this.cellRange === null;\n }\n\n /**\n * Adds a cell coords to the selection.\n *\n * @param {CellCoords} coords The cell coordinates to add.\n * @returns {Selection}\n */\n }, {\n key: \"add\",\n value: function add(coords) {\n if (this.isEmpty()) {\n this.cellRange = this.settings.createCellRange(coords);\n } else {\n this.cellRange.expand(coords);\n }\n return this;\n }\n\n /**\n * If selection range from or to property equals oldCoords, replace it with newCoords. Return boolean\n * information about success.\n *\n * @param {CellCoords} oldCoords An old cell coordinates to replace.\n * @param {CellCoords} newCoords The new cell coordinates.\n * @returns {boolean}\n */\n }, {\n key: \"replace\",\n value: function replace(oldCoords, newCoords) {\n if (!this.isEmpty()) {\n if (this.cellRange.from.isEqual(oldCoords)) {\n this.cellRange.from = newCoords;\n return true;\n }\n if (this.cellRange.to.isEqual(oldCoords)) {\n this.cellRange.to = newCoords;\n return true;\n }\n }\n return false;\n }\n\n /**\n * Clears selection.\n *\n * @returns {Selection}\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.cellRange = null;\n return this;\n }\n\n /**\n * Returns the top left (or top right in RTL) and bottom right (or bottom left in RTL) selection coordinates.\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n }, {\n key: \"getCorners\",\n value: function getCorners() {\n var topStart = this.cellRange.getOuterTopStartCorner();\n var bottomEnd = this.cellRange.getOuterBottomEndCorner();\n return [topStart.row, topStart.col, bottomEnd.row, bottomEnd.col];\n }\n\n /**\n * Adds class name to cell element at given coords.\n *\n * @param {WalkontableFacade} wotInstance Walkontable instance.\n * @param {number} sourceRow Cell row coord.\n * @param {number} sourceColumn Cell column coord.\n * @param {string} className Class name.\n * @param {boolean} [markIntersections=false] If `true`, linear className generator will be used to add CSS classes\n * in a continuous way.\n * @returns {Selection}\n */\n }, {\n key: \"addClassAtCoords\",\n value: function addClassAtCoords(wotInstance, sourceRow, sourceColumn, className) {\n var markIntersections = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var TD = wotInstance.wtTable.getCell(this.settings.createCellCoords(sourceRow, sourceColumn));\n if (_typeof(TD) === 'object') {\n var cellClassName = className;\n if (markIntersections) {\n cellClassName = this.classNameGenerator(TD);\n if (!this.classNames.includes(cellClassName)) {\n this.classNames.push(cellClassName);\n }\n }\n addClass(TD, cellClassName);\n }\n return this;\n }\n\n /**\n * Generate helper for calculating classNames based on previously added base className.\n * The generated className is always generated as a continuation of the previous className. For example, when\n * the currently checked element has 'area-2' className the generated new className will be 'area-3'. When\n * the element doesn't have any classNames than the base className will be returned ('area');.\n *\n * @param {string} baseClassName Base className to be used.\n * @param {number} layerLevelOwner Layer level which the instance of the Selection belongs to.\n * @returns {Function}\n */\n }, {\n key: \"linearClassNameGenerator\",\n value: function linearClassNameGenerator(baseClassName, layerLevelOwner) {\n // TODO: Make this recursive function Proper Tail Calls (TCO/PTC) friendly.\n return function calcClassName(element) {\n var previousIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n if (layerLevelOwner === 0 || previousIndex === 0) {\n return baseClassName;\n }\n var index = previousIndex >= 0 ? previousIndex : layerLevelOwner;\n var className = baseClassName;\n index -= 1;\n var previousClassName = index === 0 ? baseClassName : \"\".concat(baseClassName, \"-\").concat(index);\n if (hasClass(element, previousClassName)) {\n var currentLayer = index + 1;\n className = \"\".concat(baseClassName, \"-\").concat(currentLayer);\n } else {\n className = calcClassName(element, index);\n }\n return className;\n };\n }\n\n /**\n * @param {WalkontableFacade} wotInstance The Walkontable instance.\n */\n }, {\n key: \"draw\",\n value: function draw(wotInstance) {\n if (this.isEmpty()) {\n if (this.settings.border) {\n this.getBorder(wotInstance).disappear();\n }\n return;\n }\n var renderedRows = wotInstance.wtTable.getRenderedRowsCount();\n var renderedColumns = wotInstance.wtTable.getRenderedColumnsCount();\n var corners = this.getCorners();\n var _corners = _slicedToArray(corners, 4),\n topRow = _corners[0],\n topColumn = _corners[1],\n bottomRow = _corners[2],\n bottomColumn = _corners[3];\n var _this$settings = this.settings,\n highlightHeaderClassName = _this$settings.highlightHeaderClassName,\n highlightColumnClassName = _this$settings.highlightColumnClassName,\n highlightRowClassName = _this$settings.highlightRowClassName,\n highlightOnlyClosestHeader = _this$settings.highlightOnlyClosestHeader,\n selectionType = _this$settings.selectionType;\n var isHeaderSelectionType = selectionType === void 0 || ['active-header', 'header'].includes(selectionType);\n if (isHeaderSelectionType && topColumn !== null && bottomColumn !== null) {\n var selectionColumnCursor = 0;\n for (var column = 0; column < renderedColumns; column += 1) {\n var sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(column);\n if (sourceCol >= topColumn && sourceCol <= bottomColumn) {\n var THs = wotInstance.wtTable.getColumnHeaders(sourceCol);\n var closestHeaderLevel = THs.length - 1;\n if (highlightOnlyClosestHeader && THs.length > 1) {\n THs = [THs[closestHeaderLevel]];\n }\n for (var headerLevel = 0; headerLevel < THs.length; headerLevel += 1) {\n var newClasses = [];\n var TH = THs[headerLevel];\n if (highlightHeaderClassName) {\n newClasses.push(highlightHeaderClassName);\n }\n if (highlightColumnClassName) {\n newClasses.push(highlightColumnClassName);\n }\n headerLevel = highlightOnlyClosestHeader ? closestHeaderLevel : headerLevel;\n var newSourceCol = wotInstance.getSetting('onBeforeHighlightingColumnHeader', sourceCol, headerLevel, {\n selectionType: selectionType,\n columnCursor: selectionColumnCursor,\n selectionWidth: bottomColumn - topColumn + 1,\n classNames: newClasses\n });\n if (newSourceCol !== sourceCol) {\n TH = wotInstance.wtTable.getColumnHeader(newSourceCol, headerLevel);\n }\n addClass(TH, newClasses);\n }\n selectionColumnCursor += 1;\n }\n }\n }\n if (topRow !== null && bottomRow !== null) {\n var selectionRowCursor = 0;\n for (var row = 0; row < renderedRows; row += 1) {\n var sourceRow = wotInstance.wtTable.rowFilter.renderedToSource(row);\n if (isHeaderSelectionType && sourceRow >= topRow && sourceRow <= bottomRow) {\n var _THs = wotInstance.wtTable.getRowHeaders(sourceRow);\n var _closestHeaderLevel = _THs.length - 1;\n if (highlightOnlyClosestHeader && _THs.length > 1) {\n _THs = [_THs[_closestHeaderLevel]];\n }\n for (var _headerLevel = 0; _headerLevel < _THs.length; _headerLevel += 1) {\n var _newClasses = [];\n var _TH = _THs[_headerLevel];\n if (highlightHeaderClassName) {\n _newClasses.push(highlightHeaderClassName);\n }\n if (highlightRowClassName) {\n _newClasses.push(highlightRowClassName);\n }\n _headerLevel = highlightOnlyClosestHeader ? _closestHeaderLevel : _headerLevel;\n var newSourceRow = wotInstance.getSetting('onBeforeHighlightingRowHeader', sourceRow, _headerLevel, {\n selectionType: selectionType,\n rowCursor: selectionRowCursor,\n selectionHeight: bottomRow - topRow + 1,\n classNames: _newClasses\n });\n if (newSourceRow !== sourceRow) {\n _TH = wotInstance.wtTable.getRowHeader(newSourceRow, _headerLevel);\n }\n addClass(_TH, _newClasses);\n }\n selectionRowCursor += 1;\n }\n if (topColumn !== null && bottomColumn !== null) {\n for (var _column = 0; _column < renderedColumns; _column += 1) {\n var _sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(_column);\n if (sourceRow >= topRow && sourceRow <= bottomRow && _sourceCol >= topColumn && _sourceCol <= bottomColumn) {\n // selected cell\n if (this.settings.className) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, this.settings.className, this.settings.markIntersections);\n }\n } else if (sourceRow >= topRow && sourceRow <= bottomRow) {\n // selection is in this row\n if (highlightRowClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, highlightRowClassName);\n }\n } else if (_sourceCol >= topColumn && _sourceCol <= bottomColumn) {\n // selection is in this column\n if (highlightColumnClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, highlightColumnClassName);\n }\n }\n var additionalSelectionClass = wotInstance.getSetting('onAfterDrawSelection', sourceRow, _sourceCol, this.settings.layerLevel);\n if (typeof additionalSelectionClass === 'string') {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, additionalSelectionClass);\n }\n }\n }\n }\n }\n wotInstance.getSetting('onBeforeDrawBorders', corners, this.settings.className);\n if (this.settings.border) {\n // warning! border.appear modifies corners!\n this.getBorder(wotInstance).appear(corners);\n }\n }\n\n /**\n * Cleans up all the DOM state related to a Selection instance. Call this prior to deleting a Selection instance.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n Object.values(this.instanceBorders).forEach(function (border) {\n return border.destroy();\n });\n }\n }]);\n return Selection;\n}();\nexport default Selection;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.reflect.construct.js\";\nimport \"core-js/modules/es.reflect.get.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { Selection } from \"./../../3rdparty/walkontable/src/index.mjs\";\nvar VisualSelection = /*#__PURE__*/function (_Selection) {\n _inherits(VisualSelection, _Selection);\n var _super = _createSuper(VisualSelection);\n function VisualSelection(settings, visualCellRange) {\n var _this;\n _classCallCheck(this, VisualSelection);\n _this = _super.call(this, settings, null);\n /**\n * Range of selection visually. Visual representation may have representation in a rendered selection.\n *\n * @type {null|CellRange}\n */\n _defineProperty(_assertThisInitialized(_this), \"visualCellRange\", null);\n _this.visualCellRange = visualCellRange || null;\n _this.commit();\n return _this;\n }\n /**\n * Adds a cell coords to the selection.\n *\n * @param {CellCoords} coords Visual coordinates of a cell.\n * @returns {VisualSelection}\n */\n _createClass(VisualSelection, [{\n key: \"add\",\n value: function add(coords) {\n if (this.visualCellRange === null) {\n this.visualCellRange = this.settings.createCellRange(coords);\n } else {\n this.visualCellRange.expand(coords);\n }\n return this;\n }\n\n /**\n * Clears visual and renderable selection.\n *\n * @returns {VisualSelection}\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.visualCellRange = null;\n return _get(_getPrototypeOf(VisualSelection.prototype), \"clear\", this).call(this);\n }\n\n /**\n * Trims the passed cell range object by removing all coordinates that points to the hidden rows\n * or columns. The result is a new cell range object that points only to the visible indexes or `null`.\n *\n * @private\n * @param {CellRange} cellRange Cells range object to be trimmed.\n * @returns {CellRange} Visual non-hidden cells range coordinates.\n */\n }, {\n key: \"trimToVisibleCellsRangeOnly\",\n value: function trimToVisibleCellsRangeOnly(_ref) {\n var from = _ref.from,\n to = _ref.to;\n var visibleFromCoords = this.getNearestNotHiddenCoords(from, 1);\n var visibleToCoords = this.getNearestNotHiddenCoords(to, -1);\n if (visibleFromCoords === null || visibleToCoords === null) {\n return null;\n }\n if (visibleFromCoords.row > visibleToCoords.row || visibleFromCoords.col > visibleToCoords.col) {\n var isHeaderTypeSelection = this.settings.type === 'header' || this.settings.type === 'active-header';\n if (!isHeaderTypeSelection) {\n return null;\n }\n visibleFromCoords = from;\n visibleToCoords = to;\n }\n return this.settings.createCellRange(visibleFromCoords, visibleFromCoords, visibleToCoords);\n }\n\n /**\n * Gets nearest coordinates that points to the visible row and column indexes. If there are no visible\n * rows and/or columns the `null` value is returned.\n *\n * @private\n * @param {CellCoords} coords The coords object as starting point for finding the nearest visible coordinates.\n * @param {1|-1} rowSearchDirection The search direction. For value 1, it means searching from top to bottom for\n * rows and from left to right for columns. For -1, it is the other way around.\n * @param {1|-1} columnSearchDirection The same as above but for rows.\n * @returns {CellCoords|null} Visual cell coordinates.\n */\n }, {\n key: \"getNearestNotHiddenCoords\",\n value: function getNearestNotHiddenCoords(coords, rowSearchDirection) {\n var columnSearchDirection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : rowSearchDirection;\n var nextVisibleRow = this.getNearestNotHiddenIndex(this.settings.rowIndexMapper(), coords.row, rowSearchDirection);\n\n // There are no more visual rows in the range.\n if (nextVisibleRow === null) {\n return null;\n }\n var nextVisibleColumn = this.getNearestNotHiddenIndex(this.settings.columnIndexMapper(), coords.col, columnSearchDirection);\n\n // There are no more visual columns in the range.\n if (nextVisibleColumn === null) {\n return null;\n }\n return this.settings.createCellCoords(nextVisibleRow, nextVisibleColumn);\n }\n\n /**\n * Gets nearest visual index. If there are no visible rows or columns the `null` value is returned.\n *\n * @private\n * @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.\n * @param {number} visualIndex The index as starting point for finding the nearest visible index.\n * @param {1|-1} searchDirection The search direction. For value 1, it means searching from top to bottom for\n * rows and from left to right for columns. For -1, it is the other way around.\n * @returns {number|null} Visual row/column index.\n */\n }, {\n key: \"getNearestNotHiddenIndex\",\n value: function getNearestNotHiddenIndex(indexMapper, visualIndex, searchDirection) {\n if (visualIndex < 0) {\n return visualIndex;\n }\n var nearestVisualIndex = indexMapper.getNearestNotHiddenIndex(visualIndex, searchDirection);\n var isHeaderSelectionType = this.settings.type === 'header' || this.settings.type === 'active-header';\n if (isHeaderSelectionType && nearestVisualIndex === null) {\n return -1;\n }\n return nearestVisualIndex;\n }\n\n /**\n * Override internally stored visual indexes added by the Selection's `add` function. It should be executed\n * at the end of process of adding visual selection coordinates.\n *\n * @returns {VisualSelection}\n */\n }, {\n key: \"commit\",\n value: function commit() {\n // There is no information about visual ranges, thus no selection may be displayed.\n if (this.visualCellRange === null) {\n return this;\n }\n var trimmedCellRange = this.trimToVisibleCellsRangeOnly(this.visualCellRange);\n\n // There is no visual start point (and also visual end point) in the range.\n if (trimmedCellRange === null) {\n this.cellRange = null;\n } else {\n this.cellRange = this.createRenderableCellRange(trimmedCellRange.from, trimmedCellRange.to);\n }\n return this;\n }\n\n /**\n * Some selection may be a part of broader cell range. This function sync coordinates of current selection\n * and the broader cell range when needed (current selection can't be presented visually).\n *\n * @param {CellRange} broaderCellRange Visual range. Actual cell range may be contained in the broader cell range.\n * When there is no way to represent some cell range visually we try to find range containing just the first visible cell.\n *\n * Warn: Please keep in mind that this function may change coordinates of the handled broader range.\n *\n * @returns {VisualSelection}\n */\n }, {\n key: \"syncWith\",\n value: function syncWith(broaderCellRange) {\n var rowDirection = broaderCellRange.getVerticalDirection() === 'N-S' ? 1 : -1;\n var columnDirection = broaderCellRange.getHorizontalDirection() === 'W-E' ? 1 : -1;\n var singleCellRangeVisual = this.getNearestNotHiddenCoords(broaderCellRange.from.clone().normalize(), rowDirection, columnDirection);\n if (singleCellRangeVisual !== null && broaderCellRange.overlaps(singleCellRangeVisual)) {\n // We can't show selection visually now, but we found fist visible range in the broader cell range.\n if (this.cellRange === null) {\n var singleCellRangeRenderable = this.settings.visualToRenderableCoords(singleCellRangeVisual);\n this.cellRange = this.settings.createCellRange(singleCellRangeRenderable);\n }\n\n // We set new highlight as it might change (for example, when showing/hiding some cells from the broader selection range)\n // TODO: It is also handled by the `MergeCells` plugin while adjusting already modified coordinates. Should it?\n broaderCellRange.setHighlight(singleCellRangeVisual);\n return this;\n }\n\n // Fallback to the start of the range. It resets the previous highlight (for example, when all columns have been hidden).\n broaderCellRange.setHighlight(broaderCellRange.from);\n return this;\n }\n\n /**\n * Returns the top left (TL) and bottom right (BR) selection coordinates (renderable indexes).\n * The method overwrites the original method to support header selection for hidden cells.\n * To make the header selection working, the CellCoords and CellRange have to support not\n * complete coordinates (`null` values for example, `row: null`, `col: 2`).\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n }, {\n key: \"getCorners\",\n value: function getCorners() {\n var _this$cellRange = this.cellRange,\n from = _this$cellRange.from,\n to = _this$cellRange.to;\n var isRowUndefined = from.row === null || to.row === null;\n var isColumnUndefined = from.col === null || to.col === null;\n var topLeftCorner = this.settings.createCellCoords(isRowUndefined ? null : Math.min(from.row, to.row), isColumnUndefined ? null : Math.min(from.col, to.col));\n var bottomRightCorner = this.settings.createCellCoords(isRowUndefined ? null : Math.max(from.row, to.row), isColumnUndefined ? null : Math.max(from.col, to.col));\n return [topLeftCorner.row, topLeftCorner.col, bottomRightCorner.row, bottomRightCorner.col];\n }\n\n /**\n * Returns the top left (or top right in RTL) and bottom right (or bottom left in RTL) selection\n * coordinates (visual indexes).\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n }, {\n key: \"getVisualCorners\",\n value: function getVisualCorners() {\n var topStart = this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner());\n var bottomEnd = this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());\n return [topStart.row, topStart.col, bottomEnd.row, bottomEnd.col];\n }\n\n /**\n * Creates a new CellRange object based on visual coordinates which before object creation are\n * translated to renderable indexes.\n *\n * @param {CellCoords} visualFromCoords The CellCoords object which contains coordinates that\n * points to the beginning of the selection.\n * @param {CellCoords} visualToCoords The CellCoords object which contains coordinates that\n * points to the end of the selection.\n * @returns {CellRange}\n */\n }, {\n key: \"createRenderableCellRange\",\n value: function createRenderableCellRange(visualFromCoords, visualToCoords) {\n var renderableFromCoords = this.settings.visualToRenderableCoords(visualFromCoords);\n var renderableToCoords = this.settings.visualToRenderableCoords(visualToCoords);\n return this.settings.createCellRange(renderableFromCoords, renderableFromCoords, renderableToCoords);\n }\n }]);\n return VisualSelection;\n}(Selection);\nexport default VisualSelection;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"activeHeaderClassName\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { ACTIVE_HEADER_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * @param {object} highlightParams A configuration object to create a highlight.\n * @param {string} highlightParams.activeHeaderClassName Highlighted headers' class name.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var activeHeaderClassName = _ref.activeHeaderClassName,\n restOptions = _objectWithoutProperties(_ref, _excluded);\n var s = new VisualSelection(_objectSpread(_objectSpread({\n highlightHeaderClassName: activeHeaderClassName\n }, restOptions), {}, {\n selectionType: ACTIVE_HEADER_TYPE\n }));\n return s;\n}\nexport default createHighlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"layerLevel\", \"areaCornerVisible\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { AREA_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting area of the selected multiple cells.\n *\n * @param {object} highlightParams A configuration object to create a highlight.\n * @param {number} highlightParams.layerLevel Layer level.\n * @param {object} highlightParams.areaCornerVisible Function to determine if area's corner should be visible.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var layerLevel = _ref.layerLevel,\n areaCornerVisible = _ref.areaCornerVisible,\n restOptions = _objectWithoutProperties(_ref, _excluded);\n var s = new VisualSelection(_objectSpread(_objectSpread({\n className: 'area',\n markIntersections: true,\n layerLevel: Math.min(layerLevel, 7),\n border: {\n width: 1,\n color: '#4b89ff',\n cornerVisible: areaCornerVisible\n }\n }, restOptions), {}, {\n selectionType: AREA_TYPE\n }));\n return s;\n}\nexport default createHighlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"cellCornerVisible\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { CELL_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection\n * can present on the table only one at the time.\n *\n * @param {object} highlightParams A configuration object to create a highlight.\n * @param {Function} highlightParams.cellCornerVisible Function to determine if cell's corner should be visible.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var cellCornerVisible = _ref.cellCornerVisible,\n restOptions = _objectWithoutProperties(_ref, _excluded);\n var s = new VisualSelection(_objectSpread(_objectSpread({\n className: 'current',\n border: {\n width: 2,\n color: '#4b89ff',\n cornerVisible: cellCornerVisible\n }\n }, restOptions), {}, {\n selectionType: CELL_TYPE\n }));\n return s;\n}\nexport default createHighlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"border\", \"visualCellRange\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { CUSTOM_SELECTION_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection\n * can present on the table only one at the time.\n *\n * @param {object} highlightParams A configuration object to create a highlight.\n * @param {object} highlightParams.border Border configuration.\n * @param {object} highlightParams.visualCellRange Function to translate visual to renderable coords.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var border = _ref.border,\n visualCellRange = _ref.visualCellRange,\n restOptions = _objectWithoutProperties(_ref, _excluded);\n var s = new VisualSelection(_objectSpread(_objectSpread(_objectSpread({}, border), restOptions), {}, {\n selectionType: CUSTOM_SELECTION_TYPE\n }), visualCellRange);\n return s;\n}\nexport default createHighlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nimport { FILL_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection, responsible for highlighting cells which are covered by fill handle\n * functionality. This type of selection can present on the table only one at the time.\n *\n * @param {object} highlightParams A configuration object to create a highlight.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var restOptions = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));\n var s = new VisualSelection(_objectSpread(_objectSpread({\n className: 'fill',\n border: {\n width: 1,\n color: '#ff0000'\n }\n }, restOptions), {}, {\n selectionType: FILL_TYPE\n }));\n return s;\n}\nexport default createHighlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nvar _excluded = [\"headerClassName\", \"rowClassName\", \"columnClassName\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { HEADER_TYPE } from \"../constants.mjs\";\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection, responsible for highlighting row and column headers. This type of selection\n * can occur multiple times.\n *\n * @param {object} highlightParams A configuration object to create a highlight.\n * @param {string} highlightParams.headerClassName Highlighted headers' class name.\n * @param {string} highlightParams.rowClassName Highlighted row' class name.\n * @param {string} highlightParams.columnClassName Highlighted column' class name.\n * @returns {Selection}\n */\nfunction createHighlight(_ref) {\n var headerClassName = _ref.headerClassName,\n rowClassName = _ref.rowClassName,\n columnClassName = _ref.columnClassName,\n restOptions = _objectWithoutProperties(_ref, _excluded);\n var s = new VisualSelection(_objectSpread(_objectSpread({\n className: 'highlight',\n highlightHeaderClassName: headerClassName,\n highlightRowClassName: rowClassName,\n highlightColumnClassName: columnClassName\n }, restOptions), {}, {\n highlightOnlyClosestHeader: true,\n selectionType: HEADER_TYPE\n }));\n return s;\n}\nexport default createHighlight;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport staticRegister from \"./../../../utils/staticRegister.mjs\";\nimport { ACTIVE_HEADER_TYPE, AREA_TYPE, CELL_TYPE, CUSTOM_SELECTION_TYPE, FILL_TYPE, HEADER_TYPE } from \"../constants.mjs\";\nimport activeHeaderHighlight from \"./activeHeader.mjs\";\nimport areaHighlight from \"./area.mjs\";\nimport cellHighlight from \"./cell.mjs\";\nimport customSelection from \"./customSelection.mjs\";\nimport fillHighlight from \"./fill.mjs\";\nimport headerHighlight from \"./header.mjs\";\nvar _staticRegister = staticRegister('highlight/types'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem;\nregister(ACTIVE_HEADER_TYPE, activeHeaderHighlight);\nregister(AREA_TYPE, areaHighlight);\nregister(CELL_TYPE, cellHighlight);\nregister(CUSTOM_SELECTION_TYPE, customSelection);\nregister(FILL_TYPE, fillHighlight);\nregister(HEADER_TYPE, headerHighlight);\n\n/**\n * @param {string} highlightType The selection type.\n * @param {object} options The selection options.\n * @returns {Selection}\n */\nfunction createHighlight(highlightType, options) {\n return getItem(highlightType)(_objectSpread({\n type: highlightType\n }, options));\n}\nexport { createHighlight };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createHighlight } from \"./types/index.mjs\";\nimport { ACTIVE_HEADER_TYPE, AREA_TYPE, CELL_TYPE, CUSTOM_SELECTION_TYPE, FILL_TYPE, HEADER_TYPE } from \"./constants.mjs\";\nimport { arrayEach } from \"./../../helpers/array.mjs\";\n/**\n * Highlight class responsible for managing Walkontable Selection classes.\n *\n * With Highlight object you can manipulate four different highlight types:\n * - `cell` can be added only to a single cell at a time and it defines currently selected cell;\n * - `fill` can occur only once and its highlight defines selection of autofill functionality (managed by the plugin with the same name);\n * - `areas` can be added to multiple cells at a time. This type highlights selected cell or multiple cells.\n * The multiple cells have to be defined as an uninterrupted order (regular shape). Otherwise, the new layer of\n * that type should be created to manage not-consecutive selection;\n * - `header` can occur multiple times. This type is designed to highlight only headers. Like `area` type it\n * can appear with multiple highlights (accessed under different level layers).\n *\n * @class Highlight\n * @util\n */\nvar Highlight = /*#__PURE__*/function (_Symbol$iterator) {\n function Highlight(options) {\n _classCallCheck(this, Highlight);\n /**\n * Options consumed by Highlight class and Walkontable Selection classes.\n *\n * @type {object}\n */\n this.options = options;\n /**\n * The property which describes which layer level of the visual selection will be modified.\n * This option is valid only for `area` and `header` highlight types which occurs multiple times on\n * the table (as a non-consecutive selection).\n *\n * An order of the layers is the same as the order of added new non-consecutive selections.\n *\n * @type {number}\n * @default 0\n */\n this.layerLevel = 0;\n /**\n * `cell` highlight object which describes attributes for the currently selected cell.\n * It can only occur only once on the table.\n *\n * @type {Selection}\n */\n this.cell = createHighlight(CELL_TYPE, options);\n /**\n * `fill` highlight object which describes attributes for the borders for autofill functionality.\n * It can only occur only once on the table.\n *\n * @type {Selection}\n */\n this.fill = createHighlight(FILL_TYPE, options);\n /**\n * Collection of the `area` highlights. That objects describes attributes for the borders and selection of\n * the multiple selected cells. It can occur multiple times on the table.\n *\n * @type {Map.}\n */\n this.areas = new Map();\n /**\n * Collection of the `header` highlights. That objects describes attributes for the selection of\n * the multiple selected rows and columns in the table header. It can occur multiple times on the table.\n *\n * @type {Map.}\n */\n this.headers = new Map();\n /**\n * Collection of the `active-header` highlights. That objects describes attributes for the selection of\n * the multiple selected rows and columns in the table header. The table headers which have selected all items in\n * a row will be marked as `active-header`.\n *\n * @type {Map.}\n */\n this.activeHeaders = new Map();\n /**\n * Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.\n *\n * @type {Selection[]}\n */\n this.customSelections = [];\n }\n\n /**\n * Check if highlight cell rendering is disabled for specified highlight type.\n *\n * @param {string} highlightType Highlight type. Possible values are: `cell`, `area`, `fill` or `header`.\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n _createClass(Highlight, [{\n key: \"isEnabledFor\",\n value: function isEnabledFor(highlightType, coords) {\n var type = highlightType;\n\n // Legacy compatibility.\n if (highlightType === CELL_TYPE) {\n type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.\n }\n\n var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);\n if (typeof disableHighlight === 'string') {\n disableHighlight = [disableHighlight];\n }\n return disableHighlight === false || Array.isArray(disableHighlight) && !disableHighlight.includes(type);\n }\n\n /**\n * Set a new layer level to make access to the desire `area` and `header` highlights.\n *\n * @param {number} [level=0] Layer level to use.\n * @returns {Highlight}\n */\n }, {\n key: \"useLayerLevel\",\n value: function useLayerLevel() {\n var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n this.layerLevel = level;\n return this;\n }\n\n /**\n * Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.\n *\n * @returns {Selection}\n */\n }, {\n key: \"getCell\",\n value: function getCell() {\n return this.cell;\n }\n\n /**\n * Get Walkontable Selection instance created for controlling highlight of the autofill functionality.\n *\n * @returns {Selection}\n */\n }, {\n key: \"getFill\",\n value: function getFill() {\n return this.fill;\n }\n\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected cells.\n *\n * @returns {Selection}\n */\n }, {\n key: \"createOrGetArea\",\n value: function createOrGetArea() {\n var layerLevel = this.layerLevel;\n var area;\n if (this.areas.has(layerLevel)) {\n area = this.areas.get(layerLevel);\n } else {\n area = createHighlight(AREA_TYPE, _objectSpread({\n layerLevel: layerLevel\n }, this.options));\n this.areas.set(layerLevel, area);\n }\n return area;\n }\n\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.\n *\n * @returns {Selection[]}\n */\n }, {\n key: \"getAreas\",\n value: function getAreas() {\n return _toConsumableArray(this.areas.values());\n }\n\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected header cells.\n *\n * @returns {Selection}\n */\n }, {\n key: \"createOrGetHeader\",\n value: function createOrGetHeader() {\n var layerLevel = this.layerLevel;\n var header;\n if (this.headers.has(layerLevel)) {\n header = this.headers.get(layerLevel);\n } else {\n header = createHighlight(HEADER_TYPE, _objectSpread({}, this.options));\n this.headers.set(layerLevel, header);\n }\n return header;\n }\n\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.\n *\n * @returns {Selection[]}\n */\n }, {\n key: \"getHeaders\",\n value: function getHeaders() {\n return _toConsumableArray(this.headers.values());\n }\n\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected active header cells.\n *\n * @returns {Selection}\n */\n }, {\n key: \"createOrGetActiveHeader\",\n value: function createOrGetActiveHeader() {\n var layerLevel = this.layerLevel;\n var header;\n if (this.activeHeaders.has(layerLevel)) {\n header = this.activeHeaders.get(layerLevel);\n } else {\n header = createHighlight(ACTIVE_HEADER_TYPE, _objectSpread({}, this.options));\n this.activeHeaders.set(layerLevel, header);\n }\n return header;\n }\n\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.\n *\n * @returns {Selection[]}\n */\n }, {\n key: \"getActiveHeaders\",\n value: function getActiveHeaders() {\n return _toConsumableArray(this.activeHeaders.values());\n }\n\n /**\n * Get Walkontable Selection instance created for controlling highlight of the custom selection functionality.\n *\n * @returns {Selection}\n */\n }, {\n key: \"getCustomSelections\",\n value: function getCustomSelections() {\n return _toConsumableArray(this.customSelections.values());\n }\n\n /**\n * Add selection to the custom selection instance. The new selection are added to the end of the selection collection.\n *\n * @param {object} selectionInstance The selection instance.\n */\n }, {\n key: \"addCustomSelection\",\n value: function addCustomSelection(selectionInstance) {\n this.customSelections.push(createHighlight(CUSTOM_SELECTION_TYPE, _objectSpread(_objectSpread({}, this.options), selectionInstance)));\n }\n\n /**\n * Perform cleaning visual highlights for the whole table.\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.cell.clear();\n this.fill.clear();\n arrayEach(this.areas.values(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.headers.values(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.activeHeaders.values(), function (highlight) {\n return void highlight.clear();\n });\n }\n\n /**\n * This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.\n *\n * @returns {Selection[]}\n */\n }, {\n key: _Symbol$iterator,\n value: function value() {\n return [this.cell, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.headers.values()), _toConsumableArray(this.activeHeaders.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();\n }\n }]);\n return Highlight;\n}(Symbol.iterator);\nexport default Highlight;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * The SelectionRange class is a simple CellRanges collection designed for easy manipulation of the multiple\n * consecutive and non-consecutive selections.\n *\n * @class SelectionRange\n * @util\n */\nvar SelectionRange = /*#__PURE__*/function (_Symbol$iterator) {\n function SelectionRange(createCellRange) {\n _classCallCheck(this, SelectionRange);\n /**\n * List of all CellRanges added to the class instance.\n *\n * @type {CellRange[]}\n */\n this.ranges = [];\n this.createCellRange = createCellRange;\n }\n\n /**\n * Check if selected range is empty.\n *\n * @returns {boolean}\n */\n _createClass(SelectionRange, [{\n key: \"isEmpty\",\n value: function isEmpty() {\n return this.size() === 0;\n }\n\n /**\n * Set coordinates to the class instance. It clears all previously added coordinates and push `coords`\n * to the collection.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {SelectionRange}\n */\n }, {\n key: \"set\",\n value: function set(coords) {\n this.clear();\n this.ranges.push(this.createCellRange(coords));\n return this;\n }\n\n /**\n * Add coordinates to the class instance. The new coordinates are added to the end of the range collection.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {SelectionRange}\n */\n }, {\n key: \"add\",\n value: function add(coords) {\n this.ranges.push(this.createCellRange(coords));\n return this;\n }\n\n /**\n * Removes from the stack the last added coordinates.\n *\n * @returns {SelectionRange}\n */\n }, {\n key: \"pop\",\n value: function pop() {\n this.ranges.pop();\n return this;\n }\n\n /**\n * Get last added coordinates from ranges, it returns a CellRange instance.\n *\n * @returns {CellRange|undefined}\n */\n }, {\n key: \"current\",\n value: function current() {\n return this.peekByIndex(0);\n }\n\n /**\n * Get previously added coordinates from ranges, it returns a CellRange instance.\n *\n * @returns {CellRange|undefined}\n */\n }, {\n key: \"previous\",\n value: function previous() {\n return this.peekByIndex(-1);\n }\n\n /**\n * Returns `true` if coords is within selection coords. This method iterates through all selection layers to check if\n * the coords object is within selection range.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n }, {\n key: \"includes\",\n value: function includes(coords) {\n return this.ranges.some(function (cellRange) {\n return cellRange.includes(coords);\n });\n }\n\n /**\n * Clear collection.\n *\n * @returns {SelectionRange}\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.ranges.length = 0;\n return this;\n }\n\n /**\n * Get count of added all coordinates added to the selection.\n *\n * @returns {number}\n */\n }, {\n key: \"size\",\n value: function size() {\n return this.ranges.length;\n }\n\n /**\n * Peek the coordinates based on the offset where that coordinate resides in the collection.\n *\n * @param {number} [offset=0] An offset where the coordinate will be retrieved from.\n * @returns {CellRange|undefined}\n */\n }, {\n key: \"peekByIndex\",\n value: function peekByIndex() {\n var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var rangeIndex = this.size() + offset - 1;\n var cellRange;\n if (rangeIndex >= 0) {\n cellRange = this.ranges[rangeIndex];\n }\n return cellRange;\n }\n }, {\n key: _Symbol$iterator,\n value: function value() {\n return this.ranges[Symbol.iterator]();\n }\n }]);\n return SelectionRange;\n}(Symbol.iterator);\nexport default SelectionRange;","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { mixin } from \"../helpers/object.mjs\";\nimport localHooks from \"./../mixins/localHooks.mjs\";\n/**\n * The Transformation class implements algorithms for transforming coordinates based on current settings\n * passed to the Handsontable.\n *\n * Transformation is always applied relative to the current selection.\n *\n * @class Transformation\n * @util\n */\nvar Transformation = /*#__PURE__*/function () {\n function Transformation(range, options) {\n _classCallCheck(this, Transformation);\n /**\n * Instance of the SelectionRange, holder for visual coordinates applied to the table.\n *\n * @type {SelectionRange}\n */\n this.range = range;\n /**\n * Additional options which define the state of the settings which can infer transformation and\n * give the possibility to translate indexes.\n *\n * @type {object}\n */\n this.options = options;\n }\n\n /**\n * Selects cell relative to current cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @param {boolean} [force=false] If `true` the new rows/columns will be created if necessary. Otherwise, row/column will\n * be created according to `minSpareRows/minSpareCols` settings of Handsontable.\n * @returns {CellCoords} Visual coordinates after transformation.\n */\n _createClass(Transformation, [{\n key: \"transformStart\",\n value: function transformStart(rowDelta, colDelta) {\n var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var delta = this.options.createCellCoords(rowDelta, colDelta);\n var highlightCoords = this.range.current().highlight;\n var _this$options$visualT = this.options.visualToRenderableCoords(highlightCoords),\n renderableRow = _this$options$visualT.row,\n renderableColumn = _this$options$visualT.col;\n var visualCoords = highlightCoords;\n var rowTransformDir = 0;\n var colTransformDir = 0;\n this.runLocalHooks('beforeTransformStart', delta);\n if (renderableRow !== null && renderableColumn !== null) {\n var totalRows = this.options.countRows();\n var totalCols = this.options.countCols();\n var fixedRowsBottom = this.options.fixedRowsBottom();\n var minSpareRows = this.options.minSpareRows();\n var minSpareCols = this.options.minSpareCols();\n var autoWrapRow = this.options.autoWrapRow();\n var autoWrapCol = this.options.autoWrapCol();\n if (renderableRow + rowDelta > totalRows - 1) {\n if (force && minSpareRows > 0 && !(fixedRowsBottom && renderableRow >= totalRows - fixedRowsBottom - 1)) {\n this.runLocalHooks('insertRowRequire', totalRows);\n totalRows = this.options.countRows();\n } else if (autoWrapCol) {\n delta.row = 1 - totalRows;\n delta.col = renderableColumn + delta.col === totalCols - 1 ? 1 - totalCols : 1;\n }\n } else if (autoWrapCol && renderableRow + delta.row < 0 && renderableColumn + delta.col >= 0) {\n delta.row = totalRows - 1;\n delta.col = renderableColumn + delta.col === 0 ? totalCols - 1 : -1;\n }\n if (renderableColumn + delta.col > totalCols - 1) {\n if (force && minSpareCols > 0) {\n this.runLocalHooks('insertColRequire', totalCols);\n totalCols = this.options.countCols();\n } else if (autoWrapRow) {\n delta.row = renderableRow + delta.row === totalRows - 1 ? 1 - totalRows : 1;\n delta.col = 1 - totalCols;\n }\n } else if (autoWrapRow && renderableColumn + delta.col < 0 && renderableRow + delta.row >= 0) {\n delta.row = renderableRow + delta.row === 0 ? totalRows - 1 : -1;\n delta.col = totalCols - 1;\n }\n var coords = this.options.createCellCoords(renderableRow + delta.row, renderableColumn + delta.col);\n rowTransformDir = 0;\n colTransformDir = 0;\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n visualCoords = this.options.renderableToVisualCoords(coords);\n }\n this.runLocalHooks('afterTransformStart', visualCoords, rowTransformDir, colTransformDir);\n return visualCoords;\n }\n\n /**\n * Sets selection end cell relative to current selection end cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @returns {CellCoords} Visual coordinates after transformation.\n */\n }, {\n key: \"transformEnd\",\n value: function transformEnd(rowDelta, colDelta) {\n var delta = this.options.createCellCoords(rowDelta, colDelta);\n var cellRange = this.range.current();\n var visualCoords = cellRange.to;\n var rowTransformDir = 0;\n var colTransformDir = 0;\n this.runLocalHooks('beforeTransformEnd', delta);\n var _this$options$visualT2 = this.options.visualToRenderableCoords(cellRange.highlight),\n rowHighlight = _this$options$visualT2.row,\n colHighlight = _this$options$visualT2.col;\n\n // We have highlight (start point for the selection).\n if (rowHighlight !== null && colHighlight !== null) {\n var totalRows = this.options.countRows();\n var totalCols = this.options.countCols();\n var _this$options$visualT3 = this.options.visualToRenderableCoords(cellRange.to),\n rowTo = _this$options$visualT3.row,\n colTo = _this$options$visualT3.col;\n var coords = this.options.createCellCoords(rowTo + delta.row, colTo + delta.col);\n rowTransformDir = 0;\n colTransformDir = 0;\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n visualCoords = this.options.renderableToVisualCoords(coords);\n }\n this.runLocalHooks('afterTransformEnd', visualCoords, rowTransformDir, colTransformDir);\n return visualCoords;\n }\n }]);\n return Transformation;\n}();\nmixin(Transformation, localHooks);\nexport default Transformation;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport { CellRange } from \"./../3rdparty/walkontable/src/index.mjs\";\nimport { arrayEach, arrayReduce } from \"./../helpers/array.mjs\";\nimport { isUndefined } from \"./../helpers/mixed.mjs\";\nexport var SELECTION_TYPE_UNRECOGNIZED = 0;\nexport var SELECTION_TYPE_EMPTY = 1;\nexport var SELECTION_TYPE_ARRAY = 2;\nexport var SELECTION_TYPE_OBJECT = 3;\nexport var SELECTION_TYPES = [SELECTION_TYPE_OBJECT, SELECTION_TYPE_ARRAY];\nvar ARRAY_TYPE_PATTERN = [['number'], ['number', 'string'], ['number', 'undefined'], ['number', 'string', 'undefined']];\nvar rootCall = Symbol('root');\nvar childCall = Symbol('child');\n\n/**\n * Detect selection schema structure.\n *\n * @param {*} selectionRanges The selected range or and array of selected ranges. This type of data is produced by\n * `hot.getSelected()`, `hot.getSelectedLast()`, `hot.getSelectedRange()`\n * and `hot.getSelectedRangeLast()` methods.\n * @param {symbol} _callSymbol The symbol object which indicates source of the helper invocation.\n * @returns {number} Returns a number that specifies the type of detected selection schema. If selection schema type\n * is unrecognized than it returns `0`.\n */\nexport function detectSelectionType(selectionRanges) {\n var _callSymbol = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rootCall;\n if (_callSymbol !== rootCall && _callSymbol !== childCall) {\n throw new Error('The second argument is used internally only and cannot be overwritten.');\n }\n var isArray = Array.isArray(selectionRanges);\n var isRootCall = _callSymbol === rootCall;\n var result = SELECTION_TYPE_UNRECOGNIZED;\n if (isArray) {\n var firstItem = selectionRanges[0];\n if (selectionRanges.length === 0) {\n result = SELECTION_TYPE_EMPTY;\n } else if (isRootCall && firstItem instanceof CellRange) {\n result = SELECTION_TYPE_OBJECT;\n } else if (isRootCall && Array.isArray(firstItem)) {\n result = detectSelectionType(firstItem, childCall);\n } else if (selectionRanges.length >= 2 && selectionRanges.length <= 4) {\n var isArrayType = !selectionRanges.some(function (value, index) {\n return !ARRAY_TYPE_PATTERN[index].includes(_typeof(value));\n });\n if (isArrayType) {\n result = SELECTION_TYPE_ARRAY;\n }\n }\n }\n return result;\n}\n\n/**\n * Factory function designed for normalization data schema from different data structures of the selection ranges.\n *\n * @param {number} type Selection type which will be processed.\n * @param {object} [options] The normalization options.\n * @param {boolean} [options.keepDirection=false] If `true`, the coordinates which contain the direction of the\n * selected cells won't be changed. Otherwise, the selection will be\n * normalized to values starting from top-left to bottom-right.\n * @param {Function} [options.propToCol] Pass the converting function (usually `datamap.propToCol`) if the column\n * defined as props should be normalized to the numeric values.\n * @returns {number[]} Returns normalized data about selected range as an array (`[rowStart, columnStart, rowEnd, columnEnd]`).\n */\nexport function normalizeSelectionFactory(type) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$keepDirection = _ref.keepDirection,\n keepDirection = _ref$keepDirection === void 0 ? false : _ref$keepDirection,\n propToCol = _ref.propToCol;\n if (!SELECTION_TYPES.includes(type)) {\n throw new Error('Unsupported selection ranges schema type was provided.');\n }\n return function (selection) {\n var isObjectType = type === SELECTION_TYPE_OBJECT;\n var rowStart = isObjectType ? selection.from.row : selection[0];\n var columnStart = isObjectType ? selection.from.col : selection[1];\n var rowEnd = isObjectType ? selection.to.row : selection[2];\n var columnEnd = isObjectType ? selection.to.col : selection[3];\n if (typeof propToCol === 'function') {\n if (typeof columnStart === 'string') {\n columnStart = propToCol(columnStart);\n }\n if (typeof columnEnd === 'string') {\n columnEnd = propToCol(columnEnd);\n }\n }\n if (isUndefined(rowEnd)) {\n rowEnd = rowStart;\n }\n if (isUndefined(columnEnd)) {\n columnEnd = columnStart;\n }\n if (!keepDirection) {\n var origRowStart = rowStart;\n var origColumnStart = columnStart;\n var origRowEnd = rowEnd;\n var origColumnEnd = columnEnd;\n rowStart = Math.min(origRowStart, origRowEnd);\n columnStart = Math.min(origColumnStart, origColumnEnd);\n rowEnd = Math.max(origRowStart, origRowEnd);\n columnEnd = Math.max(origColumnStart, origColumnEnd);\n }\n return [rowStart, columnStart, rowEnd, columnEnd];\n };\n}\n\n/**\n * Function transform selection ranges (produced by `hot.getSelected()` and `hot.getSelectedRange()`) to normalized\n * data structure. It merges repeated ranges into consecutive coordinates. The returned structure\n * contains an array of arrays. The single item contains at index 0 visual column index from the selection was\n * started and at index 1 distance as a count of selected columns.\n *\n * @param {Array[]|CellRange[]} selectionRanges Selection ranges produced by Handsontable.\n * @returns {Array[]} Returns an array of arrays with ranges defines in that schema:\n * `[[visualColumnStart, distance], [visualColumnStart, distance], ...]`.\n * The column distances are always created starting from the left (zero index) to the\n * right (the latest column index).\n */\nexport function transformSelectionToColumnDistance(selectionRanges) {\n var selectionType = detectSelectionType(selectionRanges);\n if (selectionType === SELECTION_TYPE_UNRECOGNIZED || selectionType === SELECTION_TYPE_EMPTY) {\n return [];\n }\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n var unorderedIndexes = new Set();\n\n // Iterate through all ranges and collect all column indexes which are not saved yet.\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),\n columnStart = _selectionSchemaNorma2[1],\n columnEnd = _selectionSchemaNorma2[3];\n var columnNonHeaderStart = Math.max(columnStart, 0);\n var amount = columnEnd - columnNonHeaderStart + 1;\n arrayEach(Array.from(new Array(amount), function (_, i) {\n return columnNonHeaderStart + i;\n }), function (index) {\n if (!unorderedIndexes.has(index)) {\n unorderedIndexes.add(index);\n }\n });\n });\n\n // Sort indexes in ascending order to easily detecting non-consecutive columns.\n var orderedIndexes = Array.from(unorderedIndexes).sort(function (a, b) {\n return a - b;\n });\n var normalizedColumnRanges = arrayReduce(orderedIndexes, function (acc, visualColumnIndex, index, array) {\n if (index !== 0 && visualColumnIndex === array[index - 1] + 1) {\n acc[acc.length - 1][1] += 1;\n } else {\n acc.push([visualColumnIndex, 1]);\n }\n return acc;\n }, []);\n return normalizedColumnRanges;\n}\n\n/**\n * Function transform selection ranges (produced by `hot.getSelected()` and `hot.getSelectedRange()`) to normalized\n * data structure. It merges repeated ranges into consecutive coordinates. The returned structure\n * contains an array of arrays. The single item contains at index 0 visual column index from the selection was\n * started and at index 1 distance as a count of selected columns.\n *\n * @param {Array[]|CellRange[]} selectionRanges Selection ranges produced by Handsontable.\n * @returns {Array[]} Returns an array of arrays with ranges defines in that schema:\n * `[[visualColumnStart, distance], [visualColumnStart, distance], ...]`.\n * The column distances are always created starting from the left (zero index) to the\n * right (the latest column index).\n */\nexport function transformSelectionToRowDistance(selectionRanges) {\n var selectionType = detectSelectionType(selectionRanges);\n if (selectionType === SELECTION_TYPE_UNRECOGNIZED || selectionType === SELECTION_TYPE_EMPTY) {\n return [];\n }\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n var unorderedIndexes = new Set();\n\n // Iterate through all ranges and collect all column indexes which are not saved yet.\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 3),\n rowStart = _selectionSchemaNorma4[0],\n rowEnd = _selectionSchemaNorma4[2];\n var rowNonHeaderStart = Math.max(rowStart, 0);\n var amount = rowEnd - rowNonHeaderStart + 1;\n arrayEach(Array.from(new Array(amount), function (_, i) {\n return rowNonHeaderStart + i;\n }), function (index) {\n if (!unorderedIndexes.has(index)) {\n unorderedIndexes.add(index);\n }\n });\n });\n\n // Sort indexes in ascending order to easily detecting non-consecutive columns.\n var orderedIndexes = Array.from(unorderedIndexes).sort(function (a, b) {\n return a - b;\n });\n var normalizedRowRanges = arrayReduce(orderedIndexes, function (acc, rowIndex, index, array) {\n if (index !== 0 && rowIndex === array[index - 1] + 1) {\n acc[acc.length - 1][1] += 1;\n } else {\n acc.push([rowIndex, 1]);\n }\n return acc;\n }, []);\n return normalizedRowRanges;\n}\n\n/**\n * Check if passed value can be treated as valid cell coordinate. The second argument is\n * used to check if the value doesn't exceed the defined max table rows/columns count.\n *\n * @param {number} coord The coordinate to validate (row index or column index).\n * @param {number} maxTableItemsCount The value that declares the maximum coordinate that is still validatable.\n * @returns {boolean}\n */\nexport function isValidCoord(coord) {\n var maxTableItemsCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;\n return typeof coord === 'number' && coord >= 0 && coord < maxTableItemsCount;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _templateObject;\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.freeze.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport Highlight from \"./highlight/highlight.mjs\";\nimport { AREA_TYPE, HEADER_TYPE, CELL_TYPE } from \"./highlight/constants.mjs\";\nimport SelectionRange from \"./range.mjs\";\nimport { createObjectPropListener, mixin } from \"./../helpers/object.mjs\";\nimport { isUndefined } from \"./../helpers/mixed.mjs\";\nimport { arrayEach } from \"./../helpers/array.mjs\";\nimport localHooks from \"./../mixins/localHooks.mjs\";\nimport Transformation from \"./transformation.mjs\";\nimport { detectSelectionType, isValidCoord, normalizeSelectionFactory, SELECTION_TYPE_EMPTY, SELECTION_TYPE_UNRECOGNIZED } from \"./utils.mjs\";\nimport { toSingleLine } from \"./../helpers/templateLiteralTag.mjs\";\n/**\n * @class Selection\n * @util\n */\nvar Selection = /*#__PURE__*/function () {\n function Selection(settings, tableProps) {\n var _this = this;\n _classCallCheck(this, Selection);\n /**\n * Handsontable settings instance.\n *\n * @type {GridSettings}\n */\n this.settings = settings;\n /**\n * An additional object with dynamically defined properties which describes table state.\n *\n * @type {object}\n */\n this.tableProps = tableProps;\n /**\n * The flag which determines if the selection is in progress.\n *\n * @type {boolean}\n */\n this.inProgress = false;\n /**\n * The flag indicates that selection was performed by clicking the corner overlay.\n *\n * @type {boolean}\n */\n this.selectedByCorner = false;\n /**\n * The collection of the selection layer levels where the whole row was selected using the row header or\n * the corner header.\n *\n * @type {Set.}\n */\n this.selectedByRowHeader = new Set();\n /**\n * The collection of the selection layer levels where the whole column was selected using the column header or\n * the corner header.\n *\n * @type {Set.}\n */\n this.selectedByColumnHeader = new Set();\n /**\n * Selection data layer (handle visual coordinates).\n *\n * @type {SelectionRange}\n */\n this.selectedRange = new SelectionRange(function (highlight, from, to) {\n return _this.tableProps.createCellRange(highlight, from, to);\n });\n /**\n * Visualization layer.\n *\n * @type {Highlight}\n */\n this.highlight = new Highlight({\n headerClassName: settings.currentHeaderClassName,\n activeHeaderClassName: settings.activeHeaderClassName,\n rowClassName: settings.currentRowClassName,\n columnClassName: settings.currentColClassName,\n disabledCellSelection: function disabledCellSelection(row, column) {\n return _this.tableProps.isDisabledCellSelection(row, column);\n },\n cellCornerVisible: function cellCornerVisible() {\n return _this.isCellCornerVisible.apply(_this, arguments);\n },\n areaCornerVisible: function areaCornerVisible() {\n return _this.isAreaCornerVisible.apply(_this, arguments);\n },\n visualToRenderableCoords: function visualToRenderableCoords(coords) {\n return _this.tableProps.visualToRenderableCoords(coords);\n },\n renderableToVisualCoords: function renderableToVisualCoords(coords) {\n return _this.tableProps.renderableToVisualCoords(coords);\n },\n createCellCoords: function createCellCoords(row, column) {\n return _this.tableProps.createCellCoords(row, column);\n },\n createCellRange: function createCellRange(highlight, from, to) {\n return _this.tableProps.createCellRange(highlight, from, to);\n },\n rowIndexMapper: function rowIndexMapper() {\n return _this.tableProps.rowIndexMapper();\n },\n columnIndexMapper: function columnIndexMapper() {\n return _this.tableProps.columnIndexMapper();\n }\n });\n /**\n * The module for modifying coordinates.\n *\n * @type {Transformation}\n */\n this.transformation = new Transformation(this.selectedRange, {\n countRows: function countRows() {\n return _this.tableProps.countRowsTranslated();\n },\n countCols: function countCols() {\n return _this.tableProps.countColsTranslated();\n },\n visualToRenderableCoords: function visualToRenderableCoords(coords) {\n return _this.tableProps.visualToRenderableCoords(coords);\n },\n renderableToVisualCoords: function renderableToVisualCoords(coords) {\n return _this.tableProps.renderableToVisualCoords(coords);\n },\n createCellCoords: function createCellCoords(row, column) {\n return _this.tableProps.createCellCoords(row, column);\n },\n fixedRowsBottom: function fixedRowsBottom() {\n return settings.fixedRowsBottom;\n },\n minSpareRows: function minSpareRows() {\n return settings.minSpareRows;\n },\n minSpareCols: function minSpareCols() {\n return settings.minSpareCols;\n },\n autoWrapRow: function autoWrapRow() {\n return settings.autoWrapRow;\n },\n autoWrapCol: function autoWrapCol() {\n return settings.autoWrapCol;\n }\n });\n this.transformation.addLocalHook('beforeTransformStart', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _this.runLocalHooks.apply(_this, ['beforeModifyTransformStart'].concat(args));\n });\n this.transformation.addLocalHook('afterTransformStart', function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _this.runLocalHooks.apply(_this, ['afterModifyTransformStart'].concat(args));\n });\n this.transformation.addLocalHook('beforeTransformEnd', function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return _this.runLocalHooks.apply(_this, ['beforeModifyTransformEnd'].concat(args));\n });\n this.transformation.addLocalHook('afterTransformEnd', function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return _this.runLocalHooks.apply(_this, ['afterModifyTransformEnd'].concat(args));\n });\n this.transformation.addLocalHook('insertRowRequire', function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n return _this.runLocalHooks.apply(_this, ['insertRowRequire'].concat(args));\n });\n this.transformation.addLocalHook('insertColRequire', function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n return _this.runLocalHooks.apply(_this, ['insertColRequire'].concat(args));\n });\n }\n\n /**\n * Get data layer for current selection.\n *\n * @returns {SelectionRange}\n */\n _createClass(Selection, [{\n key: \"getSelectedRange\",\n value: function getSelectedRange() {\n return this.selectedRange;\n }\n\n /**\n * Indicate that selection process began. It sets internaly `.inProgress` property to `true`.\n */\n }, {\n key: \"begin\",\n value: function begin() {\n this.inProgress = true;\n }\n\n /**\n * Indicate that selection process finished. It sets internaly `.inProgress` property to `false`.\n */\n }, {\n key: \"finish\",\n value: function finish() {\n this.runLocalHooks('afterSelectionFinished', Array.from(this.selectedRange));\n this.inProgress = false;\n }\n\n /**\n * Check if the process of selecting the cell/cells is in progress.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isInProgress\",\n value: function isInProgress() {\n return this.inProgress;\n }\n\n /**\n * Starts selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n * @param {boolean} [multipleSelection] If `true`, selection will be worked in 'multiple' mode. This option works\n * only when 'selectionMode' is set as 'multiple'. If the argument is not defined\n * the default trigger will be used.\n * @param {boolean} [fragment=false] If `true`, the selection will be treated as a partial selection where the\n * `setRangeEnd` method won't be called on every `setRangeStart` call.\n */\n }, {\n key: \"setRangeStart\",\n value: function setRangeStart(coords, multipleSelection) {\n var fragment = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isMultipleMode = this.settings.selectionMode === 'multiple';\n var isMultipleSelection = isUndefined(multipleSelection) ? this.tableProps.getShortcutManager().isCtrlPressed() : multipleSelection;\n var isRowNegative = coords.row < 0;\n var isColumnNegative = coords.col < 0;\n var selectedByCorner = isRowNegative && isColumnNegative;\n // We are creating copy. We would like to modify just the start of the selection by below hook. Then original coords\n // should be handled by next methods.\n var coordsClone = coords.clone();\n this.selectedByCorner = selectedByCorner;\n this.runLocalHooks(\"beforeSetRangeStart\".concat(fragment ? 'Only' : ''), coordsClone);\n if (!isMultipleMode || isMultipleMode && !isMultipleSelection && isUndefined(multipleSelection)) {\n this.selectedRange.clear();\n }\n this.selectedRange.add(coordsClone);\n if (this.getLayerLevel() === 0) {\n this.selectedByRowHeader.clear();\n this.selectedByColumnHeader.clear();\n }\n if (!selectedByCorner && isColumnNegative) {\n this.selectedByRowHeader.add(this.getLayerLevel());\n }\n if (!selectedByCorner && isRowNegative) {\n this.selectedByColumnHeader.add(this.getLayerLevel());\n }\n if (!fragment) {\n this.setRangeEnd(coords);\n }\n }\n\n /**\n * Starts selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n * @param {boolean} [multipleSelection] If `true`, selection will be worked in 'multiple' mode. This option works\n * only when 'selectionMode' is set as 'multiple'. If the argument is not defined\n * the default trigger will be used.\n */\n }, {\n key: \"setRangeStartOnly\",\n value: function setRangeStartOnly(coords, multipleSelection) {\n this.setRangeStart(coords, multipleSelection, true);\n }\n\n /**\n * Ends selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n */\n }, {\n key: \"setRangeEnd\",\n value: function setRangeEnd(coords) {\n if (this.selectedRange.isEmpty()) {\n return;\n }\n\n // We are creating copy. We would like to modify just the end of the selection by below hook. Then original coords\n // should be handled by next methods.\n var coordsClone = coords.clone();\n this.runLocalHooks('beforeSetRangeEnd', coordsClone);\n this.begin();\n var cellRange = this.selectedRange.current();\n if (this.settings.selectionMode !== 'single') {\n cellRange.setTo(this.tableProps.createCellCoords(coordsClone.row, coordsClone.col));\n }\n\n // Set up current selection.\n this.highlight.getCell().clear();\n if (this.highlight.isEnabledFor(CELL_TYPE, cellRange.highlight)) {\n this.highlight.getCell().add(this.selectedRange.current().highlight).commit().syncWith(cellRange);\n }\n var layerLevel = this.getLayerLevel();\n\n // If the next layer level is lower than previous then clear all area and header highlights. This is the\n // indication that the new selection is performing.\n if (layerLevel < this.highlight.layerLevel) {\n arrayEach(this.highlight.getAreas(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.highlight.getHeaders(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.highlight.getActiveHeaders(), function (highlight) {\n return void highlight.clear();\n });\n }\n this.highlight.useLayerLevel(layerLevel);\n var areaHighlight = this.highlight.createOrGetArea();\n var headerHighlight = this.highlight.createOrGetHeader();\n var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();\n areaHighlight.clear();\n headerHighlight.clear();\n activeHeaderHighlight.clear();\n if (this.highlight.isEnabledFor(AREA_TYPE, cellRange.highlight) && (this.isMultiple() || layerLevel >= 1)) {\n areaHighlight.add(cellRange.from).add(cellRange.to).commit();\n if (layerLevel === 1) {\n // For single cell selection in the same layer, we do not create area selection to prevent blue background.\n // When non-consecutive selection is performed we have to add that missing area selection to the previous layer\n // based on previous coordinates. It only occurs when the previous selection wasn't select multiple cells.\n var previousRange = this.selectedRange.previous();\n this.highlight.useLayerLevel(layerLevel - 1).createOrGetArea().add(previousRange.from).commit()\n // Range may start with hidden indexes. Commit would not found start point (as we add just the `from` coords).\n .syncWith(previousRange);\n this.highlight.useLayerLevel(layerLevel);\n }\n }\n if (this.highlight.isEnabledFor(HEADER_TYPE, cellRange.highlight)) {\n // The header selection generally contains cell selection. In a case when all rows (or columns)\n // are hidden that visual coordinates are translated to renderable coordinates that do not exist.\n // Hence no header highlight is generated. In that case, to make a column (or a row) header\n // highlight, the row and column index has to point to the header (the negative value). See #7052.\n var areAnyRowsRendered = this.tableProps.countRowsTranslated() === 0;\n var areAnyColumnsRendered = this.tableProps.countColsTranslated() === 0;\n var headerCellRange = cellRange;\n if (areAnyRowsRendered || areAnyColumnsRendered) {\n headerCellRange = cellRange.clone();\n }\n if (areAnyRowsRendered) {\n headerCellRange.from.row = -1;\n }\n if (areAnyColumnsRendered) {\n headerCellRange.from.col = -1;\n }\n if (this.settings.selectionMode === 'single') {\n if (this.isSelectedByAnyHeader()) {\n headerCellRange.from.normalize();\n }\n headerHighlight.add(headerCellRange.from).commit();\n } else {\n headerHighlight.add(headerCellRange.from).add(headerCellRange.to).commit();\n }\n if (this.isEntireRowSelected()) {\n var isRowSelected = this.tableProps.countCols() === cellRange.getWidth();\n\n // Make sure that the whole row is selected (in case where selectionMode is set to 'single')\n if (isRowSelected) {\n activeHeaderHighlight.add(this.tableProps.createCellCoords(cellRange.from.row, -1)).add(this.tableProps.createCellCoords(cellRange.to.row, -1)).commit();\n }\n }\n if (this.isEntireColumnSelected()) {\n var isColumnSelected = this.tableProps.countRows() === cellRange.getHeight();\n\n // Make sure that the whole column is selected (in case where selectionMode is set to 'single')\n if (isColumnSelected) {\n activeHeaderHighlight.add(this.tableProps.createCellCoords(-1, cellRange.from.col)).add(this.tableProps.createCellCoords(-1, cellRange.to.col)).commit();\n }\n }\n }\n this.runLocalHooks('afterSetRangeEnd', coords);\n }\n\n /**\n * Returns information if we have a multiselection. This method check multiselection only on the latest layer of\n * the selection.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isMultiple\",\n value: function isMultiple() {\n var isMultipleListener = createObjectPropListener(!this.selectedRange.current().isSingle());\n this.runLocalHooks('afterIsMultipleSelection', isMultipleListener);\n return isMultipleListener.value;\n }\n\n /**\n * Selects cell relative to the current cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @param {boolean} [force=false] If `true` the new rows/columns will be created if necessary. Otherwise, row/column will\n * be created according to `minSpareRows/minSpareCols` settings of Handsontable.\n */\n }, {\n key: \"transformStart\",\n value: function transformStart(rowDelta, colDelta) {\n var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n this.setRangeStart(this.transformation.transformStart(rowDelta, colDelta, force));\n }\n\n /**\n * Sets selection end cell relative to the current selection end cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n */\n }, {\n key: \"transformEnd\",\n value: function transformEnd(rowDelta, colDelta) {\n this.setRangeEnd(this.transformation.transformEnd(rowDelta, colDelta));\n }\n\n /**\n * Returns currently used layer level.\n *\n * @returns {number} Returns layer level starting from 0. If no selection was added to the table -1 is returned.\n */\n }, {\n key: \"getLayerLevel\",\n value: function getLayerLevel() {\n return this.selectedRange.size() - 1;\n }\n\n /**\n * Returns `true` if currently there is a selection on the screen, `false` otherwise.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n return !this.selectedRange.isEmpty();\n }\n\n /**\n * Returns `true` if the selection was applied by clicking to the row header. If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks if any row header\n * was clicked on any selection layer level.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n }, {\n key: \"isSelectedByRowHeader\",\n value: function isSelectedByRowHeader() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return !this.isSelectedByCorner(layerLevel) && this.isEntireRowSelected(layerLevel);\n }\n\n /**\n * Returns `true` if the selection consists of entire rows (including their headers). If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks the selection for all layers.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n }, {\n key: \"isEntireRowSelected\",\n value: function isEntireRowSelected() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return layerLevel === -1 ? this.selectedByRowHeader.size > 0 : this.selectedByRowHeader.has(layerLevel);\n }\n\n /**\n * Returns `true` if the selection was applied by clicking to the column header. If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks if any column header\n * was clicked on any selection layer level.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n }, {\n key: \"isSelectedByColumnHeader\",\n value: function isSelectedByColumnHeader() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return !this.isSelectedByCorner() && this.isEntireColumnSelected(layerLevel);\n }\n\n /**\n * Returns `true` if the selection consists of entire columns (including their headers). If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks the selection for all layers.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n }, {\n key: \"isEntireColumnSelected\",\n value: function isEntireColumnSelected() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return layerLevel === -1 ? this.selectedByColumnHeader.size > 0 : this.selectedByColumnHeader.has(layerLevel);\n }\n\n /**\n * Returns `true` if the selection was applied by clicking on the row or column header on any layer level.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isSelectedByAnyHeader\",\n value: function isSelectedByAnyHeader() {\n return this.isSelectedByRowHeader(-1) || this.isSelectedByColumnHeader(-1) || this.isSelectedByCorner();\n }\n\n /**\n * Returns `true` if the selection was applied by clicking on the left-top corner overlay.\n *\n * @returns {boolean}\n */\n }, {\n key: \"isSelectedByCorner\",\n value: function isSelectedByCorner() {\n return this.selectedByCorner;\n }\n\n /**\n * Returns `true` if coords is within selection coords. This method iterates through all selection layers to check if\n * the coords object is within selection range.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n }, {\n key: \"inInSelection\",\n value: function inInSelection(coords) {\n return this.selectedRange.includes(coords);\n }\n\n /**\n * Returns `true` if the cell corner should be visible.\n *\n * @private\n * @returns {boolean} `true` if the corner element has to be visible, `false` otherwise.\n */\n }, {\n key: \"isCellCornerVisible\",\n value: function isCellCornerVisible() {\n return this.settings.fillHandle && !this.tableProps.isEditorOpened() && !this.isMultiple();\n }\n\n /**\n * Returns `true` if the area corner should be visible.\n *\n * @param {number} layerLevel The layer level.\n * @returns {boolean} `true` if the corner element has to be visible, `false` otherwise.\n */\n }, {\n key: \"isAreaCornerVisible\",\n value: function isAreaCornerVisible(layerLevel) {\n if (Number.isInteger(layerLevel) && layerLevel !== this.getLayerLevel()) {\n return false;\n }\n return this.settings.fillHandle && !this.tableProps.isEditorOpened() && this.isMultiple();\n }\n\n /**\n * Clear the selection by resetting the collected ranges and highlights.\n */\n }, {\n key: \"clear\",\n value: function clear() {\n // TODO: collections selectedByColumnHeader and selectedByRowHeader should be clear too.\n this.selectedRange.clear();\n this.highlight.clear();\n }\n\n /**\n * Deselects all selected cells.\n */\n }, {\n key: \"deselect\",\n value: function deselect() {\n if (!this.isSelected()) {\n return;\n }\n this.inProgress = false;\n this.clear();\n this.runLocalHooks('afterDeselect');\n }\n\n /**\n * Select all cells.\n *\n * @param {boolean} [includeRowHeaders=false] `true` If the selection should include the row headers, `false`\n * otherwise.\n * @param {boolean} [includeColumnHeaders=false] `true` If the selection should include the column headers, `false`\n * otherwise.\n */\n }, {\n key: \"selectAll\",\n value: function selectAll() {\n var includeRowHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var includeColumnHeaders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols();\n\n // We can't select cells when there is no data.\n if (!includeRowHeaders && !includeColumnHeaders && (nrOfRows === 0 || nrOfColumns === 0)) {\n return;\n }\n var startCoords = this.tableProps.createCellCoords(includeColumnHeaders ? -1 : 0, includeRowHeaders ? -1 : 0);\n var endCoords = this.tableProps.createCellCoords(nrOfRows - 1, nrOfColumns - 1);\n this.clear();\n this.setRangeStartOnly(startCoords);\n this.selectedByRowHeader.add(this.getLayerLevel());\n this.selectedByColumnHeader.add(this.getLayerLevel());\n this.setRangeEnd(endCoords);\n this.finish();\n }\n\n /**\n * Make multiple, non-contiguous selection specified by `row` and `column` values or a range of cells\n * finishing at `endRow`, `endColumn`. The method supports two input formats, first as an array of arrays such\n * as `[[rowStart, columnStart, rowEnd, columnEnd]]` and second format as an array of CellRange objects.\n * If the passed ranges have another format the exception will be thrown.\n *\n * @param {Array[]|CellRange[]} selectionRanges The coordinates which define what the cells should be selected.\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n }, {\n key: \"selectCells\",\n value: function selectCells(selectionRanges) {\n var _this2 = this;\n var selectionType = detectSelectionType(selectionRanges);\n if (selectionType === SELECTION_TYPE_EMPTY) {\n return false;\n } else if (selectionType === SELECTION_TYPE_UNRECOGNIZED) {\n throw new Error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Unsupported format of the selection ranges was passed. To select cells pass \\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, \\n columnEnd/columnPropEnd]]) or as an array of CellRange objects.\"], [\"Unsupported format of the selection ranges was passed. To select cells pass\\\\x20\\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\\\\x20\\n columnEnd/columnPropEnd]]) or as an array of CellRange objects.\"]))));\n }\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType, {\n propToCol: function propToCol(prop) {\n return _this2.tableProps.propToCol(prop);\n },\n keepDirection: true\n });\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols();\n\n // Check if every layer of the coordinates are valid.\n var isValid = !selectionRanges.some(function (selection) {\n var _selectionSchemaNorma = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),\n rowStart = _selectionSchemaNorma2[0],\n columnStart = _selectionSchemaNorma2[1],\n rowEnd = _selectionSchemaNorma2[2],\n columnEnd = _selectionSchemaNorma2[3];\n var _isValid = isValidCoord(rowStart, nrOfRows) && isValidCoord(columnStart, nrOfColumns) && isValidCoord(rowEnd, nrOfRows) && isValidCoord(columnEnd, nrOfColumns);\n return !_isValid;\n });\n if (isValid) {\n this.clear();\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 4),\n rowStart = _selectionSchemaNorma4[0],\n columnStart = _selectionSchemaNorma4[1],\n rowEnd = _selectionSchemaNorma4[2],\n columnEnd = _selectionSchemaNorma4[3];\n _this2.setRangeStartOnly(_this2.tableProps.createCellCoords(rowStart, columnStart), false);\n _this2.setRangeEnd(_this2.tableProps.createCellCoords(rowEnd, columnEnd));\n _this2.finish();\n });\n }\n return isValid;\n }\n\n /**\n * Select column specified by `startColumn` visual index or column property or a range of columns finishing at\n * `endColumn`.\n *\n * @param {number|string} startColumn Visual column index or column property from which the selection starts.\n * @param {number|string} [endColumn] Visual column index or column property from to the selection finishes.\n * @param {number} [headerLevel=-1] A row header index that triggers the column selection. The value can\n * take -1 to -N, where -1 means the header closest to the cells.\n *\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n }, {\n key: \"selectColumns\",\n value: function selectColumns(startColumn) {\n var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn;\n var headerLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n var start = typeof startColumn === 'string' ? this.tableProps.propToCol(startColumn) : startColumn;\n var end = typeof endColumn === 'string' ? this.tableProps.propToCol(endColumn) : endColumn;\n var nrOfColumns = this.tableProps.countCols();\n var nrOfRows = this.tableProps.countRows();\n var isValid = isValidCoord(start, nrOfColumns) && isValidCoord(end, nrOfColumns);\n if (isValid) {\n this.setRangeStartOnly(this.tableProps.createCellCoords(headerLevel, start));\n this.setRangeEnd(this.tableProps.createCellCoords(nrOfRows - 1, end));\n this.finish();\n }\n return isValid;\n }\n\n /**\n * Select row specified by `startRow` visual index or a range of rows finishing at `endRow`.\n *\n * @param {number} startRow Visual row index from which the selection starts.\n * @param {number} [endRow] Visual row index from to the selection finishes.\n * @param {number} [headerLevel=-1] A column header index that triggers the row selection.\n * The value can take -1 to -N, where -1 means the header\n * closest to the cells.\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n }, {\n key: \"selectRows\",\n value: function selectRows(startRow) {\n var endRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startRow;\n var headerLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols();\n var isValid = isValidCoord(startRow, nrOfRows) && isValidCoord(endRow, nrOfRows);\n if (isValid) {\n this.setRangeStartOnly(this.tableProps.createCellCoords(startRow, headerLevel));\n this.setRangeEnd(this.tableProps.createCellCoords(endRow, nrOfColumns - 1));\n this.finish();\n }\n return isValid;\n }\n\n /**\n * Rewrite the rendered state of the selection as visual selection may have a new representation in the DOM.\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var customSelections = this.highlight.getCustomSelections();\n customSelections.forEach(function (customSelection) {\n customSelection.commit();\n });\n if (!this.isSelected()) {\n return;\n }\n var cellHighlight = this.highlight.getCell();\n var currentLayer = this.getLayerLevel();\n cellHighlight.commit().syncWith(this.selectedRange.current());\n\n // Rewriting rendered ranges going through all layers.\n for (var layerLevel = 0; layerLevel < this.selectedRange.size(); layerLevel += 1) {\n this.highlight.useLayerLevel(layerLevel);\n var areaHighlight = this.highlight.createOrGetArea();\n var headerHighlight = this.highlight.createOrGetHeader();\n var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();\n areaHighlight.commit();\n headerHighlight.commit();\n activeHeaderHighlight.commit();\n }\n\n // Reverting starting layer for the Highlight.\n this.highlight.useLayerLevel(currentLayer);\n }\n }]);\n return Selection;\n}();\nmixin(Selection, localHooks);\nexport default Selection;","import staticRegister from \"../utils/staticRegister.mjs\";\nimport { registerEditor } from \"../editors/registry.mjs\";\nimport { registerRenderer } from \"../renderers/registry.mjs\";\nimport { registerValidator } from \"../validators/registry.mjs\";\nvar _staticRegister = staticRegister('cellTypes'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem,\n hasItem = _staticRegister.hasItem,\n getNames = _staticRegister.getNames,\n getValues = _staticRegister.getValues;\n\n/**\n * Retrieve cell type object.\n *\n * @param {string} name Cell type identification.\n * @returns {object} Returns cell type object.\n */\nfunction _getItem(name) {\n if (!hasItem(name)) {\n throw Error(\"You declared cell type \\\"\".concat(name, \"\\\" as a string that is not mapped to a known object.\\n Cell type must be an object or a string mapped to an object registered by\\n \\\"Handsontable.cellTypes.registerCellType\\\" method\"));\n }\n return getItem(name);\n}\n\n/**\n * Register cell type under specified name.\n *\n * @param {string} name Cell type identification.\n * @param {object} type An object with contains keys (eq: `editor`, `renderer`, `validator`) which describes specified behaviour of the cell.\n */\nfunction _register(name, type) {\n if (typeof name !== 'string') {\n type = name;\n name = type.CELL_TYPE;\n }\n var _type = type,\n editor = _type.editor,\n renderer = _type.renderer,\n validator = _type.validator;\n if (editor) {\n registerEditor(name, editor);\n }\n if (renderer) {\n registerRenderer(name, renderer);\n }\n if (validator) {\n registerValidator(name, validator);\n }\n register(name, type);\n}\nexport { _register as registerCellType, _getItem as getCellType, hasItem as hasCellType, getNames as getRegisteredCellTypeNames, getValues as getRegisteredCellTypes };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport { hasOwnProperty, isObject, objectEach, inherit, extend } from \"../../helpers/object.mjs\";\nimport { getCellType } from \"../../cellTypes/registry.mjs\";\n/**\n * Checks if the given property can be overwritten.\n *\n * @param {string} propertyName The property name to check.\n * @param {object} metaObject The current object meta settings.\n * @returns {boolean}\n */\nfunction canBeOverwritten(propertyName, metaObject) {\n var _metaObject$_automati;\n if (propertyName === 'CELL_TYPE') {\n return false;\n }\n return ((_metaObject$_automati = metaObject._automaticallyAssignedMetaProps) === null || _metaObject$_automati === void 0 ? void 0 : _metaObject$_automati.has(propertyName)) || !hasOwnProperty(metaObject, propertyName);\n}\n\n/**\n * Expands \"type\" property of the meta object to single values. For example `type: 'numeric'` sets\n * \"renderer\", \"editor\", \"validator\" properties to specific functions designed for numeric values.\n * If \"type\" is passed as an object that object will be returned, excluding properties that\n * already exist in the \"metaObject\".\n *\n * The function utilizes `_automaticallyAssignedMetaProps` meta property that allows tracking what\n * properties are changed by the \"type\" expanding feature. That properties can be always overwritten by\n * the user.\n *\n * @param {object} metaObject The meta object.\n * @param {object} settings The settings object with the \"type\" setting.\n * @param {object} settingsToCompareWith The object to compare which properties need to be updated.\n */\nexport function extendByMetaType(metaObject, settings) {\n var settingsToCompareWith = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : metaObject;\n var validType = typeof settings.type === 'string' ? getCellType(settings.type) : settings.type;\n if (metaObject._automaticallyAssignedMetaProps) {\n objectEach(settings, function (value, key) {\n return void metaObject._automaticallyAssignedMetaProps.delete(key);\n });\n }\n if (!isObject(validType)) {\n return;\n }\n if (settingsToCompareWith === metaObject && !metaObject._automaticallyAssignedMetaProps) {\n metaObject._automaticallyAssignedMetaProps = new Set();\n }\n var expandedType = {};\n objectEach(validType, function (value, property) {\n if (canBeOverwritten(property, settingsToCompareWith)) {\n var _metaObject$_automati2;\n expandedType[property] = value;\n (_metaObject$_automati2 = metaObject._automaticallyAssignedMetaProps) === null || _metaObject$_automati2 === void 0 ? void 0 : _metaObject$_automati2.add(property);\n }\n });\n extend(metaObject, expandedType);\n}\n\n/**\n * Creates new class which extends properties from TableMeta layer class.\n *\n * @param {TableMeta} TableMeta The TableMeta which the new ColumnMeta is created from.\n * @param {string[]} [conflictList] List of the properties which are conflicted with the column meta layer.\n * Conflicted properties are overwritten by `undefined` value, to separate them\n * from the TableMeta layer.\n * @returns {ColumnMeta} Returns constructor ready to initialize with `new` operator.\n */\nexport function columnFactory(TableMeta) {\n var conflictList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n // Do not use ES6 \"class extends\" syntax here. It seems that the babel produces code\n // which drastically decreases the performance of the ColumnMeta class creation.\n\n /**\n * Base \"class\" for column meta.\n */\n function ColumnMeta() {}\n inherit(ColumnMeta, TableMeta);\n\n // Clear conflict settings\n for (var i = 0; i < conflictList.length; i++) {\n ColumnMeta.prototype[conflictList[i]] = void 0;\n }\n return ColumnMeta;\n}\n\n/**\n * Helper which checks if the provided argument is an unsigned number.\n *\n * @param {*} value Value to check.\n * @returns {boolean}\n */\nexport function isUnsignedNumber(value) {\n return Number.isInteger(value) && value >= 0;\n}\n\n/**\n * Function which makes assertion by custom condition. Function throws an error when assertion doesn't meet the spec.\n *\n * @param {Function} condition Function with custom logic. The condition has to return boolean values.\n * @param {string} errorMessage String which describes assertion error.\n */\nexport function assert(condition, errorMessage) {\n if (!condition()) {\n throw new Error(\"Assertion failed: \".concat(errorMessage));\n }\n}\n\n/**\n * Check if given variable is null or undefined.\n *\n * @param {*} variable Variable to check.\n * @returns {boolean}\n */\nexport function isNullish(variable) {\n return variable === null || variable === void 0;\n}","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { isEmpty } from \"../../helpers/mixed.mjs\";\nimport { isObjectEqual } from \"../../helpers/object.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @alias Options\n * @class Options\n * @description\n *\n * [Configuration options](@/guides/getting-started/configuration-options.md) let you heavily customize your Handsontable instance. For example, you can:\n *\n * - Enable and disable built-in features\n * - Enable and configure additional [plugins](@/api/plugins.md)\n * - Personalize Handsontable's look\n * - Adjust Handsontable's behavior\n * - Implement your own custom features\n *\n * ::: only-for javascript\n *\n * To apply [configuration options](@/guides/getting-started/configuration-options.md), pass them as\n * a second argument of the [Handsontable constructor](@/guides/getting-started/installation.md#initialize-handsontable),\n * using the [object literal notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer):\n *\n * Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.\n *\n * ```js\n * const container = document.getElementById('example');\n *\n * const hot = new Handsontable(container, {\n * // configuration options, in the object literal notation\n * licenseKey: 'non-commercial-and-evaluation',\n * data: [\n * ['A1', 'B1', 'C1', 'D1', 'E1'],\n * ['A2', 'B2', 'C2', 'D2', 'E2'],\n * ['A3', 'B3', 'C3', 'D3', 'E3'],\n * ['A4', 'B4', 'C4', 'D4', 'E4'],\n * ['A5', 'B5', 'C5', 'D5', 'E5'],\n * ],\n * width: 400,\n * height: 300,\n * colHeaders: true,\n * rowHeaders: true,\n * customBorders: true,\n * dropdownMenu: true,\n * multiColumnSorting: true,\n * filters: true,\n * manualRowMove: true,\n * });\n * ```\n * :::\n *\n * ::: only-for react\n *\n * To apply configuration options, pass them as individual props\n * of the [`HotTable`](@/guides/getting-started/installation.md#_4-use-the-hottable-component)\n * or [`HotColumn`](@/guides/columns/react-hot-column.md) components.\n *\n * Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.\n *\n * ```jsx\n * \n * ```\n * :::\n *\n * Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:\n * - [The entire grid](@/guides/getting-started/configuration-options.md#set-grid-options)\n * - [Individual columns](@/guides/getting-started/configuration-options.md#set-column-options)\n * - [Individual rows](@/guides/getting-started/configuration-options.md#set-row-options)\n * - [Individual cells](@/guides/getting-started/configuration-options.md#set-cell-options)\n * - [Individual grid elements, based on any logic you implement](@/guides/getting-started/configuration-options.md#implementing-custom-logic)\n *\n * Read more:\n * - [Configuration options](@/guides/getting-started/configuration-options.md)\n */\nexport default (function () {\n return {\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * Information on which of the meta properties were added automatically.\n * For example: setting the `renderer` property directly won't extend the `_automaticallyAssignedMetaProps`\n * entry, but setting a `type` will modify it to `Set(3) {'renderer', 'editor', 'validator', ...}`.\n *\n * @private\n * @type {Set}\n * @default undefined\n */\n _automaticallyAssignedMetaProps: void 0,\n /**\n * The `activeHeaderClassName` option lets you add a CSS class name\n * to every currently-active, currently-selected header (when a whole column or row is selected).\n *\n * Read more:\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @since 0.38.2\n * @default 'ht__active_highlight'\n * @category Core\n *\n * @example\n * ```js\n * // add an `ht__active_highlight` CSS class name\n * // to every currently-active, currently-selected header\n * activeHeaderClassName: 'ht__active_highlight',\n * ```\n */\n activeHeaderClassName: 'ht__active_highlight',\n /**\n * The `allowEmpty` option determines whether Handsontable accepts the following values:\n * - `null`\n * - `undefined`\n * - `''`\n *\n * You can set the `allowEmpty` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n * | `true` (default) | - Accept `null`, `undefined` and `''` values - Mark cells that contain `null`, `undefined` or `''` values as `valid` |\n * | `false` | - Don't accept `null`, `undefined` and `''` values - Mark cells that contain `null`, `undefined` or `''` values with as `invalid` |\n *\n * ::: tip\n * To use the [`allowEmpty`](#allowempty) option, you need to set the [`validator`](#validator) option (or the [`type`](#type) option).\n * :::\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // allow empty values in each cell of the entire grid\n * allowEmpty: true,\n *\n * // or\n * columns: [\n * {\n * type: 'date',\n * dateFormat: 'DD/MM/YYYY',\n * // allow empty values in each cell of the 'date' column\n * allowEmpty: true\n * }\n * ],\n * ```\n */\n allowEmpty: true,\n /**\n * The `allowHtml` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)\n * and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) cells' [`source`](#source) data\n * is treated as HTML.\n *\n * You can set the `allowHtml` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | --------------------------------------------------- |\n * | `false` (default) | The [`source`](#source) data is not treated as HTML |\n * | `true` | The [`source`](#source) data is treated as HTML |\n *\n * __Warning:__ Setting the `allowHtml` option to `true` can cause serious XSS vulnerabilities.\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)\n * - [`source`](#source)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // set options available in every `autocomplete` cell of this column\n * source: ['foo', 'bar']\n * // use HTML in the `source` list\n * allowHtml: true,\n * },\n * ],\n * ```\n */\n allowHtml: false,\n /**\n * If set to `true`, the `allowInsertColumn` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):\n * - **Insert column left**\n * - **Insert column right**\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // hide the 'Insert column left' and 'Insert column right' menu items from the context menu\n * allowInsertColumn: false,\n * ```\n */\n allowInsertColumn: true,\n /**\n * If set to `true`, the `allowInsertRow` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):\n * - **Insert row above**\n * - **Insert row below**\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // hide the 'Insert row above' and 'Insert row below' menu items from the context menu\n * allowInsertRow: false,\n * ```\n */\n allowInsertRow: true,\n /**\n * The `allowInvalid` option determines whether Handsontable accepts values\n * that were marked as `invalid` by the [cell validator](@/guides/cell-functions/cell-validator.md).\n *\n * You can set the `allowInvalid` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | - Accept `invalid` values - Allow the user to close the [cell editor](@/guides/cell-functions/cell-editor.md) with `invalid` values - Save `invalid` values into the data source |\n * | `false` | - Don't accept `invalid` values - Don't allow the user to close the [cell editor](@/guides/cell-functions/cell-editor.md) with `invalid` values - Don't save `invalid` values into the data source |\n *\n * Setting the `allowInvalid` option to `false` can be useful when used with the [Autocomplete strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode).\n *\n * Read more:\n * - [Cell validator](@/guides/cell-functions/cell-validator.md)\n * - [Cell editor](@/guides/cell-functions/cell-editor.md)\n * - [Autocomplete strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // don't accept `invalid` values\n * // don't allow the user to close the cell editor\n * // don't save `invalid` values into the data source\n * allowInvalid: false,\n * ```\n */\n allowInvalid: true,\n /**\n * If set to `true`, the `allowRemoveColumn` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):\n * - **Remove column**\n *\n * Read more:\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // hide the 'Remove column' menu item from the context menu\n * allowRemoveColumn: false,\n * ```\n */\n allowRemoveColumn: true,\n /**\n * If set to `true`, the `allowRemoveRow` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):\n * - **Remove row**\n *\n * Read more:\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // hide the 'Remove row' menu item from the context menu\n * allowRemoveRow: false,\n * ```\n */\n allowRemoveRow: true,\n /**\n * The `autoColumnSize` option configures the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin.\n *\n * You can set the `autoColumnSize` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | -------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin |\n * | `true` | Enable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin with the default configuration |\n * | An object | Enable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin and modify the plugin options |\n *\n * If you set the `autoColumnSize` option to an object, you can set the following [`AutoColumnSize`](@/api/autoColumnSize.md) plugin options:\n *\n * | Property | Possible values | Description |\n * | ----------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n * | `syncLimit` | A number \\| A percentage string | The number/percentage of columns to keep in sync (default: `50`) |\n * | `useHeaders` | `true` \\| `false` | When calculating column widths: `true`: use column headers `false`: don't use column headers |\n * | `samplingRatio` | A number | The number of samples of the same length to be used in column width calculations |\n * | `allowSampleDuplicates` | `true` \\| `false` | When calculating column widths: `true`: Allow duplicate samples `false`: Don't allow duplicate samples |\n *\n * By default, the `autoColumnSize` option is set to `undefined`,\n * but the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin acts as enabled.\n * To disable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin completely,\n * set the `autoColumnSize` option to `false`.\n *\n * Using the [`colWidths`](#colWidths) option forcibly disables the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin.\n *\n * Read more:\n * - [Plugins: `AutoColumnSize`](@/api/autoColumnSize.md)\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default undefined\n * @category AutoColumnSize\n *\n * @example\n * ```js\n * autoColumnSize: {\n * // keep 40% of columns in sync (the rest of columns: async)\n * syncLimit: '40%',\n * // when calculating column widths, use column headers\n * useHeaders: true,\n * // when calculating column widths, use 10 samples of the same length\n * samplingRatio: 10,\n * // when calculating column widths, allow duplicate samples\n * allowSampleDuplicates: true\n * },\n * ```\n */\n autoColumnSize: void 0,\n /**\n * The `autoRowSize` option configures the [`AutoRowSize`](@/api/autoRowSize.md) plugin.\n *\n * You can set the `autoRowSize` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | -------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`AutoRowSize`](@/api/autoRowSize.md) plugin |\n * | `true` | Enable the [`AutoRowSize`](@/api/autoRowSize.md) plugin with the default configuration |\n * | An object | Enable the [`AutoRowSize`](@/api/autoRowSize.md) plugin and modify the plugin options |\n *\n * To give Handsontable's [scrollbar](https://handsontable.com/docs/8.0.0/demo-scrolling.html)\n * a proper size, set the `autoRowSize` option to `true`.\n *\n * If you set the `autoRowSize` option to an object, you can set the following [`AutoRowSize`](@/api/autoRowSize.md) plugin options:\n *\n * | Property | Possible values | Description |\n * | ----------- | ------------------------------- | ----------------------------------------------------------------- |\n * | `syncLimit` | A number \\| A percentage string | The number/percentage of rows to keep in sync (default: `500`) |\n *\n * Using the [`rowHeights`](#rowHeights) option forcibly disables the [`AutoRowSize`](@/api/autoRowSize.md) plugin.\n *\n * Read more:\n * - [Plugins: `AutoRowSize`](@/api/autoRowSize.md)\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default undefined\n * @category AutoRowSize\n *\n * @example\n * ```js\n * autoRowSize: {\n * // keep 40% of rows in sync (the rest of rows: async)\n * syncLimit: '40%'\n * },\n * ```\n */\n autoRowSize: void 0,\n /**\n * With [`autoWrapCol`](#autowrapcol) enabled:\n * - When you select a bottom-most cell, pressing **↓** takes you to the top-most cell of the next column.\n * - When you select a top-most cell, pressing **↑** takes you to the bottom-most cell of the previous column.\n *\n * You can set the [`autoWrapCol`](#autowrapcol) option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` | When you select a bottom-most cell, pressing **↓** takes you to the top-most cell of the next column.
When you select a top-most cell, pressing **↑** takes you to the bottom-most cell of the previous column. |\n * | `false` (default) | When you select a bottom-most cell, pressing **↓** doesn't do anything.
When you select a top-most cell, pressing **↑** doesn't do anything. |\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // when you select a bottom-most cell, pressing ⬇ doesn't do anything\n * // when you select a top-most cell, pressing ⬆ doesn't do anything\n * autoWrapCol: false, // default setting\n *\n * // when you select a bottom-most cell, pressing ⬇ takes you to the top-most cell of the next column\n * // when you select a top-most cell, pressing ⬆ takes you to the bottom-most cell of the previous column\n * autoWrapCol: true,\n * ```\n */\n autoWrapCol: false,\n /**\n * With [`autoWrapRow`](#autoWrapRow) enabled:\n * - When you select the first cell of a row, pressing **←*** takes you to the last cell of the row above.\n * - When you select the last cell of a row, pressing **→*** takes you to the first cell of the row below.\n *\n * You can set the [`autoWrapRow`](#autoWrapRow) option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` | When you select the first cell of a row, pressing **←*** takes you to the last cell of the row above.
When you select the last cell of a row, pressing **→*** takes you to the first cell of the row below. |\n * | `false` (default) | When you select the first cell of a row, pressing **←*** doesn't do anything.
When you select the last cell of a row, pressing **→*** doesn't do anything. |\n *\n * \\* The exact key depends on your [`layoutDirection`](#layoutdirection) configuration.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // when you select the first cell of a row, pressing ⬅ doesn't do anything\n * // when you select the last cell of a row, pressing ➡️ doesn't do anything\n * autoWrapRow: false, // default setting\n *\n * // when you select the first cell of a row, pressing ⬅ takes you to the last cell of the row above\n * // when you select the last cell of a row, pressing ➡️ takes you to the first cell of the row below\n * autoWrapRow: true,\n * ```\n */\n autoWrapRow: false,\n /**\n * @description\n * The `bindRowsWithHeaders` option configures the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin.\n *\n * You can set the `bindRowsWithHeaders` option to one of the following:\n *\n * | Setting | Description |\n * | ------- | ---------------------------------------------------------------------------- |\n * | `false` | Disable the the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin |\n * | `true` | Enable the the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin |\n *\n * Read more:\n * - [Plugins: `BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md)\n *\n * @memberof Options#\n * @type {boolean|string}\n * @default undefined\n * @category BindRowsWithHeaders\n *\n * @example\n * ```js\n * // enable the `BindRowsWithHeaders` plugin\n * bindRowsWithHeaders: true\n * ```\n */\n bindRowsWithHeaders: void 0,\n /**\n * The `cell` option lets you apply [configuration options](@/guides/getting-started/configuration-options.md) to individual cells.\n *\n * The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options),\n * and the [`columns`](#columns) options.\n *\n * Read more:\n * - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#set-cell-options)\n * - [`columns`](#columns)\n *\n * @memberof Options#\n * @type {Array[]}\n * @default []\n * @category Core\n *\n * @example\n * ```js\n * // set the `cell` option to an array of objects\n * cell: [\n * // make the cell with coordinates (0, 0) read-only\n * {\n * row: 0,\n * col: 0,\n * readOnly: true\n * }\n * ],\n * ```\n */\n cell: [],\n /**\n * @description\n * The `cells` option lets you apply any other [configuration options](@/guides/getting-started/configuration-options.md) to\n * individual grid elements (columns, rows, cells), based on any logic you implement.\n *\n * The `cells` option overwrites all other options (including options set by [`columns`](#columns) and [`cell`](#cell)).\n * It takes the following parameters:\n *\n * | Parameter | Required | Type | Description |\n * | --------- | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `row` | Yes | Number | A physical row index |\n * | `column` | Yes | Number | A physical column index |\n * | `prop` | No | String \\| Number | If [`data`](#data) is set to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), `prop` is the same number as `column`.
If [`data`](#data) is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), `prop` is a property name for the column's data object. |\n *\n * Read more:\n * - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#implement-custom-logic)\n * - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)\n * - [`columns`](#columns)\n * - [`cell`](#cell)\n *\n * @memberof Options#\n * @type {Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the `cells` option to your custom function\n * cells(row, column, prop) {\n * const cellProperties = { readOnly: false };\n * const visualRowIndex = this.instance.toVisualRow(row);\n * const visualColIndex = this.instance.toVisualColumn(column);\n *\n * if (visualRowIndex === 0 && visualColIndex === 0) {\n * cellProperties.readOnly = true;\n * }\n *\n * return cellProperties;\n * },\n * ```\n */\n cells: void 0,\n /**\n * The `checkedTemplate` option lets you configure what value\n * a checked [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell has.\n *\n * You can set the `checkedTemplate` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is checked, the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns `true` |\n * | A string | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is checked, the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns a string of your choice |\n *\n * Read more:\n * - [Checkbox cell type: Checkbox template](@/guides/cell-types/checkbox-cell-type.md#checkbox-template)\n * - [`getDataAtCell()`](@/api/core.md#getDataAtCell)\n * - [`uncheckedTemplate`](#uncheckedTemplate)\n *\n * @memberof Options#\n * @type {boolean|string|number}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `checkbox`\n * // when checked, the cell's value is `true`\n * // when unchecked, the cell's value is `false`\n * type: 'checkbox',\n * },\n * {\n * // set the `type` of each cell in this column to `checkbox`\n * type: 'checkbox',\n * // when checked, the cell's value is `'Yes'`\n * checkedTemplate: 'Yes',\n * // when unchecked, the cell's value is `'No'`\n * uncheckedTemplate: 'No'\n * }\n * ],\n * ```\n */\n checkedTemplate: void 0,\n /**\n * The `className` option lets you add CSS class names to every currently-selected element.\n *\n * You can set the `className` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------- | ---------------------------------------------------------------- |\n * | A string | Add a single CSS class name to every currently-selected element |\n * | An array of strings | Add multiple CSS class names to every currently-selected element |\n *\n * ::: tip\n * Don't change the `className` metadata of the [column summary](@/guides/columns/column-summary.md) row.\n * To style the summary row, use the class name assigned automatically by the [`ColumnSummary`](@/api/columnSummary.md) plugin: `columnSummaryResult`.\n * :::\n *\n * To apply different CSS class names on different levels, use Handsontable's [cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration).\n *\n * Read more:\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`TableClassName`](#TableClassName)\n *\n * @memberof Options#\n * @type {string|string[]}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // add a `your-class-name` CSS class name\n * // to every currently-selected element\n * className: 'your-class-name',\n *\n * // add `first-class-name` and `second-class-name` CSS class names\n * // to every currently-selected element\n * className: ['first-class-name', 'second-class-name'],\n * ```\n */\n className: void 0,\n /**\n * The `colHeaders` option configures your grid's column headers.\n *\n * You can set the `colHeaders` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | -------------------------------------------------------------------- |\n * | `true` | Enable the default column headers ('A', 'B', 'C', ...) |\n * | `false` | Disable column headers |\n * | An array | Define your own column headers (e.g. `['One', 'Two', 'Three', ...]`) |\n * | A function | Define your own column headers, using a function |\n *\n * Read more:\n * - [Column header](@/guides/columns/column-header.md)\n *\n * @memberof Options#\n * @type {boolean|string[]|Function}\n * @default null\n * @category Core\n *\n * @example\n * ```js\n * // enable the default column headers\n * colHeaders: true,\n *\n * // set your own column headers\n * colHeaders: ['One', 'Two', 'Three'],\n *\n * // set your own column headers, using a function\n * colHeaders: function(visualColumnIndex) {\n * return `${visualColumnIndex} + : AB`;\n * },\n * ```\n */\n colHeaders: null,\n /**\n * @description\n * The `collapsibleColumns` option configures the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin.\n *\n * You can set the `collapsibleColumns` option to one of the following:\n *\n * | Setting | Description |\n * | -------------------- | ------------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin |\n * | `true` | Enable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin |\n * | An array of objects | Enable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin for selected column headers |\n *\n * Read more:\n * - [Plugins: `CollapsibleColumns`](@/api/collapsibleColumns.md)\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default undefined\n * @category CollapsibleColumns\n *\n * @example\n * ```js\n * // enable column collapsing for all headers\n * collapsibleColumns: true,\n *\n * // enable column collapsing for selected headers\n * collapsibleColumns: [\n * {row: -4, col: 1, collapsible: true},\n * {row: -3, col: 5, collapsible: true}\n * ],\n * ```\n */\n collapsibleColumns: void 0,\n /**\n * @description\n * The `columnHeaderHeight` option configures the height of column headers.\n *\n * You can set the `columnHeaderHeight` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | --------------------------------------------------- |\n * | A number | Set the same height for every column header |\n * | An array | Set different heights for individual column headers |\n *\n * @memberof Options#\n * @type {number|number[]}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the same height for every column header\n * columnHeaderHeight: 25,\n *\n * // set different heights for individual column headers\n * columnHeaderHeight: [25, 30, 55],\n * ```\n */\n columnHeaderHeight: void 0,\n /**\n * @description\n * The `columns` option lets you apply any other [configuration options](@/guides/getting-started/configuration-options.md) to individual columns (or ranges of columns).\n *\n * You can set the `columns` option to one of the following:\n * - An array of objects (each object represents one column)\n * - A function that returns an array of objects\n *\n * The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options).\n *\n * When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.\n *\n * Read more:\n * - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)\n * - [`startCols`](#startCols)\n * - [`minCols`](#minCols)\n * - [`maxCols`](#maxCols)\n * - [`data`](#data)\n *\n * @memberof Options#\n * @type {object[]|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the `columns` option to an array of objects\n * // each object represents one column\n * columns: [\n * {\n * // column options for the first (by physical index) column\n * type: 'numeric',\n * numericFormat: {\n * pattern: '0,0.00 $'\n * }\n * },\n * {\n * // column options for the second (by physical index) column\n * type: 'text',\n * readOnly: true\n * }\n * ],\n *\n * // or set the `columns` option to a function, based on physical indexes\n * columns(index) {\n * return {\n * type: index > 0 ? 'numeric' : 'text',\n * readOnly: index < 1\n * }\n * }\n * ```\n */\n columns: void 0,\n /**\n * @description\n * The `columnSorting` option configures the [`ColumnSorting`](@/api/columnSorting.md) plugin.\n *\n * You can set the `columnSorting` option to one of the following:\n *\n * | Setting | Description |\n * | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`ColumnSorting`](@/api/columnSorting.md) plugin with the default configuration |\n * | `false` | Disable the [`ColumnSorting`](@/api/columnSorting.md) plugin |\n * | An object | - Enable the [`ColumnSorting`](@/api/columnSorting.md) plugin - Modify the [`ColumnSorting`](@/api/columnSorting.md) plugin options |\n *\n * If you set the `columnSorting` option to an object,\n * you can set the following [`ColumnSorting`](@/api/columnSorting.md) plugin options:\n *\n * | Option | Possible settings |\n * | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n * | `indicator` | `true`: Display the arrow icon in the column header, to indicate a sortable column `false`: Don't display the arrow icon in the column header |\n * | `headerAction` | `true`: Enable clicking on the column header to sort the column `false`: Disable clicking on the column header to sort the column |\n * | `sortEmptyCells` | `true`: Sort empty cells as well `false`: Place empty cells at the end |\n * | `compareFunctionFactory` | A [custom compare function](@/guides/rows/rows-sorting.md#add-a-custom-comparator) |\n *\n * If you set the `columnSorting` option to an object,\n * you can also sort individual columns at Handsontable's initialization.\n * In the `columnSorting` object, add an object named `initialConfig`,\n * with the following properties:\n *\n * | Option | Possible settings | Description |\n * | ----------- | ------------------- | ---------------------------------------------------------------- |\n * | `column` | A number | The index of the column that you want to sort at initialization |\n * | `sortOrder` | `'asc'` \\| `'desc'` | The sorting order: `'asc'`: ascending `'desc'`: descending |\n *\n * Read more:\n * - [Rows sorting](@/guides/rows/rows-sorting.md)\n * - [Rows sorting: Custom compare functions](@/guides/rows/rows-sorting.md#add-a-custom-comparator)\n * - [`multiColumnSorting`](#multiColumnSorting)\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n * @category ColumnSorting\n *\n * @example\n * ```js\n * // enable the `ColumnSorting` plugin\n * columnSorting: true\n *\n * // enable the `ColumnSorting` plugin with custom configuration\n * columnSorting: {\n * // sort empty cells as well\n * sortEmptyCells: true,\n * // display the arrow icon in the column header\n * indicator: true,\n * // disable clicking on the column header to sort the column\n * headerAction: false,\n * // add a custom compare function\n * compareFunctionFactory(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }\n *\n * // enable the `ColumnSorting` plugin\n * columnSorting: {\n * // at initialization, sort column 1 in ascending order\n * initialConfig: {\n * column: 1,\n * sortOrder: 'asc'\n * },\n * // at initialization, sort column 2 in descending order\n * initialConfig: {\n * column: 2,\n * sortOrder: 'desc'\n * }\n * }\n * ```\n */\n columnSorting: void 0,\n /**\n * @description\n * The `columnSummary` option configures the [`ColumnSummary`](@/api/columnSummary.md) plugin.\n *\n * You can set the `columnSummary` option to an array of objects.\n * Each object configures a single column summary, using the following properties:\n *\n * | Property | Possible values | Description |\n * | ------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n * | `sourceColumn` | A number | [Column to summarize](@/guides/columns/column-summary.md#step-2-select-cells-that-you-want-to-summarize) |\n * | `ranges` | An array | [Ranges of rows to summarize](@/guides/columns/column-summary.md#step-2-select-cells-that-you-want-to-summarize) |\n * | `type` | `'sum'` \\| `'min'` \\| `'max'` \\| `'count'` \\| `'average'` \\| `'custom'` | [Summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |\n * | `destinationRow` | A number | [Destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |\n * | `destinationColumn` | A number | [Destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |\n * | `forceNumeric` | `true` \\| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |\n * | `reversedRowCoords` | `true` \\| `false` | [Reverse row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |\n * | `suppressDataTypeErrors` | `true` \\| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |\n * | `readOnly` | `true` \\| `false` | Make summary cell read-only |\n * | `roundFloat` | `true` \\| `false` | [Round summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |\n * | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |\n *\n * Read more:\n * - [Column summary](@/guides/columns/column-summary.md)\n * - [Plugins: `ColumnSummary`](@/api/columnSummary.md)\n *\n * @memberof Options#\n * @type {object[]|Function}\n * @default undefined\n * @category ColumnSummary\n *\n * @example\n * ```js\n * columnSummary: [\n * {\n * sourceColumn: 0,\n * ranges: [\n * [0, 2], [4], [6, 8]\n * ],\n * type: 'custom',\n * destinationRow: 4,\n * destinationColumn: 1,\n * forceNumeric: true,\n * reversedRowCoords: true,\n * suppressDataTypeErrors: false,\n * readOnly: true,\n * roundFloat: false,\n * customFunction(endpoint) {\n * return 100;\n * }\n * }\n * ],\n * ```\n */\n columnSummary: void 0,\n /**\n * The `colWidths` option sets columns' widths, in pixels.\n *\n * The default column width is 50px. To change it, set the `colWidths` option to one of the following:\n *\n * | Setting | Description | Example |\n * | ----------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |\n * | A number | Set the same width for every column | `colWidths: 100` |\n * | A string | Set the same width for every column | `colWidths: '100px'` |\n * | An array | Set widths separately for each column | `colWidths: [100, 120, undefined]` |\n * | A function | Set column widths dynamically, on each render | `colWidths(visualColumnIndex) { return visualColumnIndex * 10; }` |\n * | `undefined` | Used by the [modifyColWidth](@/api/hooks.md#modifyColWidth) hook, to detect column width changes. | `colWidths: undefined` |\n *\n * Setting `colWidths` even for a single column disables the {@link AutoColumnSize} plugin\n * for all columns. For this reason, if you use `colWidths`, we recommend you set a width for each one\n * of your columns. Otherwise, every column with an undefined width defaults back to 50px,\n * which may cut longer columns names.\n *\n * Read more:\n * - [Column width](@/guides/columns/column-width.md)\n * - [Hooks: `modifyColWidth`](@/api/hooks.md#modifyColWidth)\n * - [`autoColumnSize`](#autoColumnSize)\n *\n * @memberof Options#\n * @type {number|number[]|string|string[]|Array|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set every column's width to 100px\n * colWidths: 100,\n *\n * // set every column's width to 100px\n * colWidths: '100px',\n *\n * // set the first (by visual index) column's width to 100\n * // set the second (by visual index) column's width to 120\n * // set the third (by visual index) column's width to `undefined`, so that it defaults to 50px\n * // set any other column's width to the default 50px (note that longer cell values and column names can get cut)\n * colWidths: [100, 120, undefined],\n *\n * // set each column's width individually, using a function\n * colWidths(visualColumnIndex) {\n * return visualColumnIndex * 10;\n * },\n * ```\n */\n colWidths: void 0,\n /**\n * The `commentedCellClassName` option lets you add a CSS class name to cells\n * that have comments.\n *\n * Read more:\n * - [Comments](@/guides/cell-features/comments.md)\n * - [`comments`](#comments)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default 'htCommentCell'\n * @category Core\n *\n * @example\n * ```js\n * // add a `has-comment` CSS class name\n * // to each cell that has a comment\n * commentedCellClassName: 'has-comment',\n * ```\n */\n commentedCellClassName: 'htCommentCell',\n /**\n * @description\n * The `comments` option configures the [`Comments`](@/api/comments.md) plugin.\n *\n * You can set the `comments` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` | - Enable the [`Comments`](@/api/comments.md) plugin - Add comment menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md) |\n * | `false` | Disable the [`Comments`](@/api/comments.md) plugin |\n * | An object | - Enable the [`Comments`](@/api/comments.md) plugin - Add comment menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md) - Configure comment settings |\n *\n * If you set the `comments` option to an object, you can configure the following comment options:\n *\n * | Option | Possible settings | Description |\n * | -------------- | --------------------------- | --------------------------------------------------- |\n * | `displayDelay` | A number (default: `250`) | Display comments after a delay (in milliseconds) |\n * | `readOnly` | `true` \\| `false` (default) | `true`: Make comments read-only |\n * | `style` | An object | Set comment boxes' `width` and `height` (in pixels) |\n *\n * Read more:\n * - [Comments](@/guides/cell-features/comments.md)\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n * - [`width`](#width)\n * - [`height`](#height)\n * - [`readOnly`](#readOnly)\n * - [`commentedCellClassName`](#commentedCellClassName)\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n * @category Comments\n *\n * @example\n * ```js\n * // enable the `Comments` plugin\n * comments: true,\n *\n * // enable the `Comments` plugin\n * // and configure its settings\n * comments: {\n * // display all comments with a 1-second delay\n * displayDelay: 1000,\n * // make all comments read-only\n * readOnly: true,\n * // set the default size of all comment boxes\n * style: {\n * width: 300,\n * height: 100\n * }\n * }\n * ```\n */\n comments: false,\n /**\n * @description\n * The `contextMenu` option configures the [`ContextMenu`](@/api/contextMenu.md) plugin.\n *\n * You can set the `contextMenu` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`ContextMenu`](@/api/contextMenu.md) plugin |\n * | `true` | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin - Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |\n * | An array | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin - Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |\n * | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin - Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration) |\n *\n * Read more:\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n * - [Context menu: Context menu with default options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options)\n * - [Context menu: Context menu with specific options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options)\n * - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration)\n * - [Plugins: `ContextMenu`](@/api/contextMenu.md)\n *\n * @memberof Options#\n * @type {boolean|string[]|object}\n * @default undefined\n * @category ContextMenu\n *\n * @example\n * ```js\n * // enable the `ContextMenu` plugin\n * // use the default context menu options\n * contextMenu: true,\n *\n * // enable the `ContextMenu` plugin\n * // and modify individual context menu options\n * contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo'],\n *\n * // enable the `ContextMenu` plugin\n * // and apply a custom context menu configuration\n * contextMenu: {\n * items: {\n * 'option1': {\n * name: 'option1'\n * },\n * 'option2': {\n * name: 'option2',\n * submenu: {\n * items: [\n * {\n * key: 'option2:suboption1',\n * name: 'option2:suboption1',\n * callback: function(key, options) {\n * ...\n * }\n * },\n * ...\n * ]\n * }\n * }\n * }\n * },\n * ```\n */\n contextMenu: void 0,\n /**\n * @description\n * The `copyable` option determines whether a cell's value can be copied to the clipboard or not.\n *\n * You can set the `copyable` option to one of the following:\n *\n * | Setting | Description |\n * | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | - On pressing **Ctrl**/**Cmd** + **C**, add the cell's value to the clipboard |\n * | `false` (default for the [`password`](@/guides/cell-types/password-cell-type.md) [cell type](#type)) | - On pressing **Ctrl**/**Cmd** + **C**, add an empty string (`\"\"`) to the clipboard |\n *\n * Read more:\n * - [Clipboard](@/guides/cell-features/clipboard.md)\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [Password cell type](@/guides/cell-types/password-cell-type.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // enable copying for each cell of the entire grid\n * copyable: true,\n *\n * // enable copying for individual columns\n * columns: [\n * {\n * // enable copying for each cell of this column\n * copyable: true\n * },\n * {\n * // disable copying for each cell of this column\n * copyable: false\n * }\n * ]\n *\n * // enable copying for specific cells\n * cells: [\n * {\n * cell: 0,\n * row: 0,\n * // disable copying for cell (0, 0)\n * copyable: false,\n * }\n * ],\n * ```\n */\n copyable: true,\n /**\n * The `copyPaste` option configures the [`CopyPaste`](@/api/copyPaste.md) plugin.\n *\n * You can set the `copyPaste` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | Enable the [`CopyPaste`](@/api/copyPaste.md) plugin with the default configuration |\n * | `false` | Disable the [`CopyPaste`](@/api/copyPaste.md) plugin |\n * | An object | - Enable the [`CopyPaste`](@/api/copyPaste.md) plugin - Modify the [`CopyPaste`](@/api/copyPaste.md) plugin options |\n *\n * ##### copyPaste: Additional options\n *\n * If you set the `copyPaste` option to an object, you can set the following `CopyPaste` plugin options:\n *\n * | Option | Possible settings | Description |\n * | ------------------------ | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `columnsLimit` | A number (default: `Infinity`) | The maximum number of columns that can be copied |\n * | `rowsLimit` | A number (default: `Infinity`) | The maximum number of columns that can be copied |\n * | `pasteMode` | `'overwrite'` \\| `'shift_down'` \\| `'shift_right'` | When pasting: `'overwrite'`: overwrite the currently-selected cells `'shift_down'`: move the currently-selected cells down `'shift_right'`: move the currently-selected cells to the right |\n * | `copyColumnHeaders` | Boolean (default: `false`) | `true`: add a context menu option for copying cells along with their nearest column headers |\n * | `copyColumnGroupHeaders` | Boolean (default: `false`) | `true`: add a context menu option for copying cells along with all their related columns headers |\n * | `copyColumnHeadersOnly` | Boolean (default: `false`) | `true`: add a context menu option for copying column headers nearest to the selected cells (without copying cells) |\n * | `uiContainer` | An HTML element | The UI container for the secondary focusable element |\n *\n * Read more:\n * - [Plugins: `CopyPaste`](@/api/copyPaste.md)\n * - [Guides: Clipboard](@/guides/cell-features/clipboard.md)\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default true\n * @category CopyPaste\n *\n * @example\n * ```js\n * // enable the plugin with the default configuration\n * copyPaste: true // set by default\n *\n * // disable the plugin\n * copyPaste: false,\n *\n * // enable the plugin with a custom configuration\n * copyPaste: {\n * // set a maximum number of columns that can be copied\n * columnsLimit: 25,\n *\n * // set a maximum number of rows that can be copied\n * rowsLimit: 50,\n *\n * // set the paste behavior\n * pasteMode: 'shift_down',\n *\n * // add the option to copy cells along with their nearest column headers\n * copyColumnHeaders: true,\n *\n * // add the option to copy cells along with all their related columns headers\n * copyColumnGroupHeaders: true,\n *\n * // add the option to copy just column headers (without copying cells)\n * copyColumnHeadersOnly: true,\n *\n * // set a UI container\n * uiContainer: document.body,\n * },\n * ```\n */\n copyPaste: true,\n /**\n * The `correctFormat` option configures whether incorrectly-formatted times and dates are amended or not.\n *\n * When the user enters dates and times, Handsontable can automatically adjust their format\n * to match the [`dateFormat`](#dateFormat) and [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings.\n *\n * You can set the `correctFormat` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `false` (default) | Don't correct the format of the entered date or time (treat the entered date or time as invalid) |\n * | `true` | Correct the format of the entered date or time to match the [`dateFormat`](#dateFormat) or [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings |\n *\n * Read more:\n * - [Date cell type](@/guides/cell-types/date-cell-type.md)\n * - [Time cell type](@/guides/cell-types/time-cell-type.md)\n * - [`dateFormat`](#dateFormat)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `date`\n * type: 'date',\n * // for every `date` cell of this column, set the date format to `YYYY-MM-DD`\n * dateFormat: 'YYYY-MM-DD',\n * // enforce the `YYYY-MM-DD` date format\n * correctFormat: true\n * },\n *\n * {\n * // set the `type` of each cell in this column to `time`\n * type: 'time',\n * // for every `time` cell of this column, set the time format to `h:mm:ss a`\n * timeFormat: 'h:mm:ss a',\n * // enforce the `h:mm:ss a` time format\n * correctFormat: true\n * },\n * ],\n * ```\n */\n correctFormat: false,\n /**\n * The `currentColClassName` option lets you add a CSS class name\n * to each cell of the currently-visible, currently-selected columns.\n *\n * Read more:\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // add a `your-class-name` CSS class name\n * // to each cell of the currently-visible, currently-selected columns\n * currentColClassName: 'your-class-name',\n * ```\n */\n currentColClassName: void 0,\n /**\n * The `currentHeaderClassName` option lets you add a CSS class name\n * to every currently-visible, currently-selected header.\n *\n * Read more:\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default 'ht__highlight'\n * @category Core\n *\n * @example\n * ```js\n * // add an `ht__highlight` CSS class name\n * // to every currently-visible, currently-selected header\n * currentHeaderClassName: 'ht__highlight',\n * ```\n */\n currentHeaderClassName: 'ht__highlight',\n /**\n * The `currentRowClassName` option lets you add a CSS class name\n * to each cell of the currently-visible, currently-selected rows.\n *\n * Read more:\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // add a `your-class-name` CSS class name\n * // to each cell of the currently-visible, currently-selected rows\n * currentRowClassName: 'your-class-name',\n * ```\n */\n currentRowClassName: void 0,\n /**\n * @description\n * The `customBorders` option configures the [`CustomBorders`](@/api/customBorders.md) plugin.\n *\n * To enable the [`CustomBorders`](@/api/customBorders.md) plugin\n * (and add its menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md)),\n * set the `customBorders` option to `true`.\n *\n * To enable the [`CustomBorders`](@/api/customBorders.md) plugin\n * and add a predefined border around a particular cell,\n * set the `customBorders` option to an array of objects.\n * Each object represents a border configuration for one cell, and has the following properties:\n *\n * | Property | Sub-properties | Types | Description |\n * | -------- | ------------------ | ---------------------------------- | ----------------------------------------------------------------- |\n * | `row` | - | `row`: Number | The cell's row coordinate. |\n * | `col` | - | `col`: Number | The cell's column coordinate. |\n * | `start` | `width` `color` | `width`: Number `color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `start` sets the width (`width`) and color (`color`) of the left-hand border.
If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `start` sets the width (`width`) and color (`color`) of the right-hand border. |\n * | `end` | `width` `color` | `width`: Number `color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `end` sets the width (`width`) and color (`color`) of the right-hand border.
If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `end` sets the width (`width`) and color (`color`) of the left-hand border. |\n * | `top` | `width` `color` | `width`: Number `color`: String | Sets the width (`width`) and color (`color`) of the top border. |\n * | `bottom` | `width` `color` | `width`: Number `color`: String | Sets the width (`width`) and color (`color`) of the bottom border. |\n *\n * To enable the [`CustomBorders`](@/api/customBorders.md) plugin\n * and add a predefined border around a range of cells,\n * set the `customBorders` option to an array of objects.\n * Each object represents a border configuration for a single range of cells, and has the following properties:\n *\n * | Property | Sub-properties | Types | Description |\n * | -------- | -------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n * | `range` | `from` {`row`, `col`} `to` {`row`, `col`} | `from`: Object `to`: Object `row`: Number `col`: Number | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): - `from` selects the range's top-left corner. - `to` selects the range's bottom-right corner.
If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: - `from` selects the range's top-right corner. - `to` selects the range's bottom-left corner. |\n * | `start` | `width` `color` | `width`: Number `color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `start` sets the width (`width`) and color (`color`) of the left-hand border.
If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `start` sets the width (`width`) and color (`color`) of the right-hand border. |\n * | `end` | `width` `color` | `width`: Number `color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `end` sets the width (`width`) and color (`color`) of the right-hand border.
If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `end` sets the width (`width`) and color (`color`) of the left-hand border. |\n * | `top` | `width` `color` | `width`: Number `color`: String | Sets the width (`width`) and color (`color`) of the top border. |\n * | `bottom` | `width` `color` | `width`: Number `color`: String | Sets the width (`width`) and color (`color`) of the bottom border. |\n *\n * Read more:\n * - [Formatting cells: Custom cell borders](@/guides/cell-features/formatting-cells.md#custom-cell-borders)\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n * - [Plugins: `CustomBorders`](@/api/customBorders.md)\n * - [Layout direction](@/guides/internationalization/layout-direction.md)\n * - [`layoutDirection`](#layoutDirection)\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n * @category CustomBorders\n *\n * @example\n * ```js\n * // enable the `CustomBorders` plugin\n * customBorders: true,\n *\n * // enable the `CustomBorders` plugin\n * // and add a predefined border for a particular cell\n * customBorders: [\n * // add an object with a border configuration for one cell\n * {\n * // set the cell's row coordinate\n * row: 2,\n * // set the cell's column coordinate\n * col: 2,\n * // set the left/right border's width and color\n * start: {\n * width: 2,\n * color: 'red'\n * },\n * // set the right/left border's width and color\n * end: {\n * width: 1,\n * color: 'green'\n * },\n * // set the top border's width and color\n * top: '',\n * // set the bottom border's width and color\n * bottom: ''\n * }\n * ],\n *\n * // enable the `CustomBorders` plugin\n * // and add a predefined border for a range of cells\n * customBorders: [\n * // add an object with a border configuration for one range of cells\n * {\n * // select a range of cells\n * range: {\n * // set the range's top-left corner\n * from: {\n * row: 1,\n * col: 1\n * },\n * // set the range's bottom-right corner\n * to: {\n * row: 3,\n * col: 4\n * }\n * },\n * // set the left/right border's width and color\n * start: {\n * width: 2,\n * color: 'red'\n * },\n * // set the right/left border's width and color\n * end: {},\n * // set the top border's width and color\n * top: {},\n * // set the bottom border's width and color\n * bottom: {}\n * }\n * ],\n * ```\n */\n customBorders: false,\n /**\n * @description\n * The `data` option sets the initial [data](@/guides/getting-started/binding-to-data.md) of your Handsontable instance.\n *\n * Handsontable's data is bound to your source data by reference (i.e. when you edit Handsontable's data, your source data alters as well).\n *\n * You can set the `data` option:\n * - Either to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).\n * - Or to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects).\n *\n * If you don't set the `data` option (or set it to `null`), Handsontable renders as an empty 5x5 grid by default.\n *\n * Read more:\n * - [Binding to data](@/guides/getting-started/binding-to-data.md)\n * - [`dataSchema`](#dataSchema)\n * - [`startRows`](#startRows)\n * - [`startCols`](#startCols)\n *\n * @memberof Options#\n * @type {Array[]|object[]}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // as an array of arrays\n * data: [\n * ['A', 'B', 'C'],\n * ['D', 'E', 'F'],\n * ['G', 'H', 'J']\n * ]\n *\n * // as an array of objects\n * data: [\n * {id: 1, name: 'Ted Right'},\n * {id: 2, name: 'Frank Honest'},\n * {id: 3, name: 'Joan Well'},\n * {id: 4, name: 'Gail Polite'},\n * {id: 5, name: 'Michael Fair'},\n * ]\n * ```\n */\n data: void 0,\n /**\n * @description\n * When the [`data`](#data) option is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects)\n * (or is empty), the `dataSchema` option defines the structure of new rows.\n *\n * Using the `dataSchema` option, you can start out with an empty grid.\n *\n * You can set the `dataSchema` option to one of the following:\n * - An object\n * - A function\n *\n * Read more:\n * - [Binding to data: Array of objects with custom data schema](@/guides/getting-started/binding-to-data.md#array-of-objects-with-custom-data-schema)\n * - [Binding to data: Function data source and schema](@/guides/getting-started/binding-to-data.md#function-data-source-and-schema)\n * - [`data`](#data)\n *\n * @memberof Options#\n * @type {object|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // with `dataSchema`, you can start with an empty grid\n * data: null,\n * dataSchema: {id: null, name: {first: null, last: null}, address: null},\n * colHeaders: ['ID', 'First Name', 'Last Name', 'Address'],\n * columns: [\n * {data: 'id'},\n * {data: 'name.first'},\n * {data: 'name.last'},\n * {data: 'address'}\n * ],\n * startRows: 5,\n * minSpareRows: 1\n * ```\n */\n dataSchema: void 0,\n /**\n * The `dateFormat` option configures the date format accepted by [`date`](@/guides/cell-types/date-cell-type.md) cells.\n *\n * You can set the `dateFormat` option to a string with a proper date format. The default value is: `'DD/MM/YYYY'`.\n *\n * To automatically correct dates whose format doesn't match the `dateFormat` setting, use the [`correctFormat`](#correctFormat) option.\n *\n * Read more:\n * - [Date cell type](@/guides/cell-types/date-cell-type.md)\n * - [`correctFormat`](#correctFormat)\n * - [`defaultDate`](#defaultDate)\n *\n * @memberof Options#\n * @type {string}\n * @default 'DD/MM/YYYY'\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `date`\n * type: 'date',\n * // for every `date` cell of this column, set the date format to `YYYY-MM-DD`\n * dateFormat: 'YYYY-MM-DD',\n * },\n * ],\n * ```\n */\n dateFormat: 'DD/MM/YYYY',\n /**\n * The `datePickerConfig` option configures the `date` [cell editor](@/guides/cell-functions/cell-editor.md)'s date picker, which uses an external dependency: [Pikaday](https://github.com/Pikaday/Pikaday/tree/1.8.2).\n *\n * You can set the `datePickerConfig` option to an object with any of the available [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration),\n * except for the following, which are always overwritten by the `date` [cell editor](@/guides/cell-functions/cell-editor.md):\n * - `bound`\n * - `container`\n * - `field`\n * - `trigger`\n *\n * If the `datePickerConfig` option is not defined, the `date` [cell editor](@/guides/cell-functions/cell-editor.md) overwrites the following [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration) as well:\n *\n * | Pikaday option | Handsontable's setting |\n * | -------------------- | ---------------------- |\n * | `format` | `'DD/MM/YYYY'` |\n * | `reposition` | `false` |\n *\n * Read more:\n * - [`editor`](#editor)\n * - [`dateFormat`](#dateFormat)\n * - [Cell editor](@/guides/cell-functions/cell-editor.md)\n * - [All Pikaday options →](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration)\n *\n * @memberof Options#\n * @type {object}\n * @default undefined\n * @category Core\n */\n datePickerConfig: void 0,\n /**\n * The `defaultDate` option configures the date displayed\n * in empty [`date`](@/guides/cell-types/date-cell-type.md) cells.\n *\n * You can set the `defaultDate` option to a string.\n *\n * Read more:\n * - [Date cell type](@/guides/cell-types/date-cell-type.md)\n * - [`dateFormat`](#dateFormat)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `date`\n * type: 'date',\n * // in every empty `date` cell of this column, display `2015-02-02`\n * defaultDate: '2015-02-02'\n * }\n * ],\n * ```\n */\n defaultDate: void 0,\n /**\n * @description\n * The `disableVisualSelection` option configures how\n * [selection](@/guides/cell-features/selection.md) is shown.\n *\n * You can set the `disableVisualSelection` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | --------------------------------------------------------------------------------------------------- |\n * | `false` (default) | - Show single-cell selection - Show range selection - Show header selection |\n * | `true` | - Don't show single-cell selection - Don't show range selection - Don't show header selection |\n * | `'current'` | - Don't show single-cell selection - Show range selection - Show header selection |\n * | `'area'` | - Show single-cell selection - Don't show range selection - Show header selection |\n * | `'header'` | - Show single-cell selection - Show range selection - Don't show header selection |\n * | An array | A combination of `'current'`, `'area'`, and/or `'header'` |\n *\n * Read more:\n * - [Selection](@/guides/cell-features/selection.md)\n *\n * @memberof Options#\n * @type {boolean|string|string[]}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // don't show single-cell selection\n * // don't show range selection\n * // don't show header selection\n * disableVisualSelection: true,\n *\n * // don't show single-cell selection\n * // show range selection\n * // show header selection\n * disableVisualSelection: 'current',\n *\n * // don't show single-cell selection\n * // don't show range selection\n * // show header selection\n * disableVisualSelection: ['current', 'area'],\n * ```\n */\n disableVisualSelection: false,\n /**\n * @description\n * The `dragToScroll` option configures the [`DragToScroll`](@/api/dragToScroll.md) plugin.\n *\n * You can set the `dragToScroll` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | --------------------------------------------------------------------------- |\n * | `true` (default) | When selection reaches the edge of the grid's viewport, scroll the viewport |\n * | `false` | Don't scroll the viewport |\n *\n * Read more:\n * - [Plugins: `DragToScroll`](@/api/dragToScroll.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category DragToScroll\n *\n * @example\n * ```js\n * // when selection reaches the edge of the grid's viewport, scroll the viewport\n * dragToScroll: true,\n * ```\n */\n dragToScroll: true,\n /**\n * The `dropdownMenu` option configures the [`DropdownMenu`](@/api/dropdownMenu.md) plugin.\n *\n * You can set the `dropdownMenu` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin |\n * | `true` | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin - Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |\n * | An array | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin - Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |\n * | An object | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin - Apply a custom dropdown menu configuration |\n *\n * Read more:\n * - [Context menu](@/guides/accessories-and-menus/context-menu.md)\n * - [Plugins: `DropdownMenu`](@/api/dropdownMenu.md)\n *\n * @memberof Options#\n * @type {boolean|object|string[]}\n * @default undefined\n * @category DropdownMenu\n *\n * @example\n * ```js\n * // enable the `DropdownMenu` plugin\n * // use the default context menu options\n * dropdownMenu: true,\n *\n * // enable the `DropdownMenu` plugin\n * // and modify individual context menu options\n * dropdownMenu: ['row_above', 'row_below', '---------', 'undo', 'redo'],\n *\n * // enable the `DropdownMenu` plugin\n * // and apply a custom dropdown menu configuration\n * dropdownMenu: {\n * items: {\n * 'option1': {\n * name: 'option1'\n * },\n * 'option2': {\n * name: 'option2',\n * submenu: {\n * items: [\n * {\n * key: 'option2:suboption1',\n * name: 'option2:suboption1',\n * callback(key, options) {\n * ...\n * }\n * },\n * ...\n * ]\n * }\n * }\n * }\n * },\n * ```\n */\n dropdownMenu: void 0,\n /**\n * The `editor` option sets a [cell editor](@/guides/cell-functions/cell-editor.md) for a cell.\n *\n * You can set the `editor` option to one of the following [cell editor aliases](@/guides/cell-functions/cell-editor.md):\n *\n * | Alias | Cell editor function |\n * | ------------------- | -------------------------------------------------------------------------- |\n * | A custom alias | Your [custom cell editor](@/guides/cell-functions/cell-editor.md) function |\n * | `'autocomplete'` | `AutocompleteEditor` |\n * | `'base'` | `BaseEditor` |\n * | `'checkbox'` | `CheckboxEditor` |\n * | `'date'` | `DateEditor` |\n * | `'dropdown'` | `DropdownEditor` |\n * | `'handsontable'` | `HandsontableEditor` |\n * | `'numeric'` | `NumericEditor` |\n * | `'password'` | `PasswordEditor` |\n * | `'select'` | `SelectEditor` |\n * | `'text'` | `TextEditor` |\n * | `'time'` | `TimeEditor` |\n *\n * To disable editing cells through cell editors,\n * set the `editor` option to `false`.\n * You'll still be able to change cells' content through Handsontable's API\n * or through plugins (e.g. [`CopyPaste`](@/api/copyPaste.md)), though.\n *\n * To set the [`editor`](#editor), [`renderer`](#renderer), and [`validator`](#validator)\n * options all at once, use the [`type`](#type) option.\n *\n * Read more:\n * - [Cell editor](@/guides/cell-functions/cell-editor.md)\n * - [Cell type](@/guides/cell-types/cell-type.md)\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [`type`](#type)\n *\n * @memberof Options#\n * @type {string|Function|boolean}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // use the `numeric` editor for each cell of the entire grid\n * editor: 'numeric',\n *\n * // apply the `editor` option to individual columns\n * columns: [\n * {\n * // use the `autocomplete` editor for each cell of this column\n * editor: 'autocomplete'\n * },\n * {\n * // disable editing cells through cell editors for each cell of this column\n * editor: false\n * }\n * ]\n * ```\n */\n editor: void 0,\n /**\n * The `enterBeginsEditing` option configures the action of the **Enter** key.\n *\n * You can set the `enterBeginsEditing` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | - On pressing **Enter** once, enter the editing mode of the active cell - On pressing **Enter** twice, move to another cell, as configured by the [`enterMoves`](#enterMoves) setting |\n * | `false` | - On pressing **Enter** once, move to another cell, as configured by the [`enterMoves`](#enterMoves) setting |\n *\n * Read more:\n * - [`enterMoves`](#enterMoves)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // press Enter once to start editing\n * // press Enter twice to move to another cell\n * enterBeginsEditing: true,\n *\n * // press Enter once to move to another cell\n * enterBeginsEditing: false,\n * ```\n */\n enterBeginsEditing: true,\n /**\n * The `enterMoves` option configures the action of the **Enter** key.\n *\n * If the [`enterBeginsEditing`](#enterBeginsEditing) option is set to `true`,\n * the `enterMoves` setting applies to the **second** pressing of the **Enter** key.\n *\n * If the [`enterBeginsEditing`](#enterBeginsEditing) option is set to `false`,\n * the `enterMoves` setting applies to the **first** pressing of the **Enter** key.\n *\n * You can set the `enterMoves` option to an object with the following properties\n * (or to a function that returns such an object):\n *\n * | Property | Type | Description |\n * | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `col` | Number | - On pressing **Enter**, move selection `col` columns right - On pressing **Shift** + **Enter**, move selection `col` columns left |\n * | `row` | Number | - On pressing **Enter**, move selection `row` rows down - On pressing **Shift** + **Enter**, move selection `row` rows up |\n *\n * Read more:\n * - [`enterBeginsEditing`](#enterBeginsEditing)\n *\n * @memberof Options#\n * @type {object|Function}\n * @default {col: 0, row: 1}\n * @category Core\n *\n * @example\n * ```js\n * // on pressing Enter, move selection 1 column right and 1 row down\n * // on pressing Shift+Enter, move selection 1 column left and 1 row up\n * enterMoves: {col: 1, row: 1},\n *\n * // the same setting, as a function\n * // `event` is a DOM Event object received on pressing Enter\n * // you can use it to check whether the user pressed Enter or Shift+Enter\n * enterMoves(event) {\n * return {col: 1, row: 1};\n * },\n * ```\n */\n enterMoves: {\n col: 0,\n row: 1\n },\n /**\n * The `fillHandle` option configures the [Autofill](@/api/autofill.md) plugin.\n *\n * You can set the `fillHandle` option to one the following:\n *\n * | Setting | Description |\n * | -------------- | -------------------------------------------------------------------------- |\n * | `true` | - Enable autofill in all directions - Add the fill handle |\n * | `false` | Disable autofill |\n * | `'vertical'` | - Enable vertical autofill - Add the fill handle |\n * | `'horizontal'` | - Enable horizontal autofill - Add the fill handle |\n * | An object | - Enable autofill - Add the fill handle - Configure autofill options |\n *\n * If you set the `fillHandle` option to an object, you can configure the following autofill options:\n *\n * | Option | Possible settings | Description |\n * | --------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------- |\n * | `autoInsertRow` | `true` (default) \\| `false` | `true`: When you reach the grid's bottom, add new rows `false`: When you reach the grid's bottom, stop |\n * | `direction` | `'vertical'` \\| `'horizontal'` | `'vertical'`: Enable vertical autofill `'horizontal'`: Enable horizontal autofill |\n *\n * Read more:\n * - [AutoFill values](@/guides/cell-features/autofill-values.md)\n *\n * @memberof Options#\n * @type {boolean|string|object}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // enable autofill in all directions\n * // with `autoInsertRow` enabled\n * fillHandle: true,\n *\n * // enable vertical autofill\n * // with `autoInsertRow` enabled\n * fillHandle: 'vertical',\n *\n * // enable horizontal autofill\n * // with `autoInsertRow` enabled\n * fillHandle: 'horizontal',\n *\n * // enable autofill in all directions\n * // with `autoInsertRow` disabled\n * fillHandle: {\n * autoInsertRow: false,\n * },\n *\n * // enable vertical autofill\n * // with `autoInsertRow` disabled\n * fillHandle: {\n * autoInsertRow: false,\n * direction: 'vertical'\n * },\n * ```\n */\n fillHandle: {\n autoInsertRow: false\n },\n /**\n * The `filter` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'\n * lists are updated by the end user's input.\n *\n * You can set the `filter` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | --------------------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | When the end user types into the input area, only options matching the input are displayed |\n * | `false` | When the end user types into the input area, all options are displayed (options matching the input are put in bold |\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [`source`](#source)\n * - [`filteringCaseSensitive`](#filteringCaseSensitive)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * columns: [{\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // set options available in every `autocomplete` cell of this column\n * source: ['A', 'B', 'C'],\n * // when the end user types in `A`, display only the A option\n * // when the end user types in `B`, display only the B option\n * // when the end user types in `C`, display only the C option\n * filter: true\n * }],\n * ```\n */\n filter: true,\n /**\n * The `filteringCaseSensitive` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'\n * input is case-sensitive.\n *\n * You can set the `filteringCaseSensitive` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | -------------------------------------------------------------------------------------------------- |\n * | `false` (default) | [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells' input is not case-sensitive |\n * | `true` | [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells' input is case-sensitive |\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [`source`](#source)\n * - [`filter`](#filter)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * source: [ ... ],\n * // match case while searching autocomplete options\n * filteringCaseSensitive: true\n * }\n * ],\n * ```\n */\n filteringCaseSensitive: false,\n /**\n * The `filters` option configures the [`Filters`](@/api/filters.md) plugin.\n *\n * You can set the `filters` option to one of the following:\n *\n * | Setting | Description |\n * | ------- | ------------------------------------------------ |\n * | `false` | Disable the [`Filters`](@/api/filters.md) plugin |\n * | `true` | Enable the [`Filters`](@/api/filters.md) plugin |\n *\n * Read more:\n * - [Column filter](@/guides/columns/column-filter.md)\n * - [Plugins: `Filters`](@/api/filters.md)\n * - [`dropdownMenu`](#dropdownMenu)\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @category Filters\n *\n * @example\n * ```js\n * // enable the `Filters` plugin\n * filters: true,\n * ```\n */\n filters: void 0,\n /**\n * `fixedColumnsLeft` is a legacy option.\n *\n * If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default), `fixedColumnsLeft` acts like the [`fixedColumnsStart`](#fixedColumnsStart) option.\n *\n * If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is RTL, using `fixedColumnsLeft` throws an error.\n *\n * Use [`fixedColumnsStart`](#fixedColumnsStart), which works in any layout direction.\n *\n * Read more:\n * - [`fixedColumnsStart`](#fixedcolumnsstart)\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // freeze the first 3 columns from the left\n * fixedColumnsLeft: 3,\n * ```\n */\n fixedColumnsLeft: 0,\n /**\n * If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default), the `fixedColumnsStart` option sets the number of [frozen columns](@/guides/columns/column-freezing.md) at the left-hand edge of the grid.\n *\n * If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is RTL, the `fixedColumnsStart` option sets the number of [frozen columns](@/guides/columns/column-freezing.md) at the right-hand edge of the grid.\n *\n * Read more:\n * - [Column freezing](@/guides/columns/column-freezing.md)\n * - [Layout direction](@/guides/internationalization/layout-direction.md)\n * - [`fixedColumnsLeft`](#fixedcolumnsleft)\n * - [`layoutDirection`](#layoutDirection)\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // when `layoutDirection` is set to `inherit` (default)\n * // freeze the first 3 columns from the left or from the right\n * // depending on your HTML document's `dir` attribute\n * layoutDirection: 'inherit',\n * fixedColumnsStart: 3,\n *\n * // when `layoutDirection` is set to `rtl`\n * // freeze the first 3 columns from the right\n * // regardless of your HTML document's `dir` attribute\n * layoutDirection: 'rtl',\n * fixedColumnsStart: 3,\n *\n * // when `layoutDirection` is set to `ltr`\n * // freeze the first 3 columns from the left\n * // regardless of your HTML document's `dir` attribute\n * layoutDirection: 'ltr',\n * fixedColumnsStart: 3,\n * ```\n */\n fixedColumnsStart: 0,\n /**\n * The `fixedRowsBottom` option sets the number of [frozen rows](@/guides/rows/row-freezing.md)\n * at the bottom of the grid.\n *\n * Read more:\n * - [Row freezing](@/guides/rows/row-freezing.md)\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // freeze the bottom 3 rows\n * fixedRowsBottom: 3,\n * ```\n */\n fixedRowsBottom: 0,\n /**\n * The `fixedRowsTop` option sets the number of [frozen rows](@/guides/rows/row-freezing.md) at the top of the grid.\n *\n * Read more:\n * - [Row freezing](@/guides/rows/row-freezing.md)\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // freeze the top 3 rows\n * fixedRowsTop: 3,\n * ```\n */\n fixedRowsTop: 0,\n /**\n * The `formulas` option configures the [`Formulas`](@/api/formulas.md) plugin.\n *\n * The [`Formulas`](@/api/formulas.md) plugin uses the [HyperFormula](https://handsontable.github.io/hyperformula/) calculation engine.\n * To install [HyperFormula](https://handsontable.github.io/hyperformula/), read the following:\n * - [Formula calculation: Initialization methods](@/guides/formulas/formula-calculation.md#initialization-methods)\n *\n * You can set the `formulas` option to an object with the following properties:\n *\n * | Property | Possible values |\n * | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `engine` | `HyperFormula` \\| A [HyperFormula](https://handsontable.github.io/hyperformula/) instance \\| A [HyperFormula configuration](https://handsontable.github.io/hyperformula/api/interfaces/configparams.html) object |\n * | `sheetId` | A number |\n * | `sheetName` | A string |\n *\n * Read more:\n * - [Plugins: `Formulas`](@/api/formulas.md)\n * - [Formula calculation](@/guides/formulas/formula-calculation.md)\n * - [HyperFormula documentation: Client-side installation](https://handsontable.github.io/hyperformula/guide/client-side-installation)\n * - [HyperFormula documentation: Configuration options](https://handsontable.github.io/hyperformula/api/interfaces/configparams.html)\n *\n * @memberof Options#\n * @type {object}\n * @default undefined\n * @category Formulas\n *\n * @example\n * ```js\n * // either add the `HyperFormula` class\n * formulas: {\n * // set `engine` to `HyperFormula`\n * engine: HyperFormula,\n * sheetId: 1,\n * sheetName: 'Sheet 1'\n * }\n *\n * // or, add a HyperFormula instance\n * // initialized with the `'internal-use-in-handsontable'` license key\n * const hyperformulaInstance = HyperFormula.buildEmpty({\n * licenseKey: 'internal-use-in-handsontable',\n * });\n *\n * formulas: {\n * // set `engine` to a HyperFormula instance\n * engine: hyperFormulaInstance,\n * sheetId: 1,\n * sheetName: 'Sheet 1'\n * }\n *\n * // or, add a HyperFormula configuration object\n * formulas: {\n * // set `engine` to a HyperFormula configuration object\n * engine: {\n * hyperformula: HyperFormula // or `engine: hyperFormulaInstance`\n * leapYear1900: false, // this option comes from HyperFormula\n * // add more HyperFormula configuration options\n * },\n * sheetId: 1,\n * sheetName: 'Sheet 1'\n * }\n *\n * // use the same HyperFormula instance in multiple Handsontable instances\n *\n * // a Handsontable instance `hot1`\n * formulas: {\n * engine: HyperFormula,\n * sheetId: 1,\n * sheetName: 'Sheet 1'\n * }\n *\n * // a Handsontable instance `hot2`\n * formulas: {\n * engine: hot1.getPlugin('formulas').engine,\n * sheetId: 1,\n * sheetName: 'Sheet 1'\n * }\n * ```\n */\n formulas: void 0,\n /**\n * The `fragmentSelection` option configures text selection settings.\n *\n * You can set the `fragmentSelection` option to one of the following:\n *\n * | Setting | Decription |\n * | ----------------- | ------------------------------------------------- |\n * | `false` (default) | Disable text selection |\n * | `true` | Enable text selection in multiple cells at a time |\n * | `'cell'` | Enable text selection in one cell at a time |\n *\n * @memberof Options#\n * @type {boolean|string}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // enable text selection in multiple cells at a time\n * fragmentSelection: true,\n *\n * // enable text selection in one cell a time\n * fragmentSelection: 'cell',\n * ```\n */\n fragmentSelection: false,\n /**\n * The `height` option configures the height of your grid.\n *\n * You can set `height` option to one of the following:\n *\n * | Setting | Example |\n * | -------------------------------------------------------------------------- | -------------------------- |\n * | A number of pixels | `height: 500` |\n * | A string with a [CSS unit](https://www.w3schools.com/cssref/css_units.asp) | `height: '75vw'` |\n * | A function that returns a valid number or string | `height() { return 500; }` |\n *\n * Read more:\n * - [Grid size](@/guides/getting-started/grid-size.md)\n *\n * @memberof Options#\n * @type {number|string|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the grid's height to 500px\n * height: 500,\n *\n * // set the grid's height to 75vh\n * height: '75vh',\n *\n * // set the grid's height to 500px, using a function\n * height() {\n * return 500;\n * },\n * ```\n */\n height: void 0,\n /**\n * The `hiddenColumns` option configures the [`HiddenColumns`](@/api/hiddenColumns.md) plugin.\n *\n * You can set the `hiddenColumns` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | -------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin |\n * | `true` | Enable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin with the default plugin options |\n * | An object | - Enable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin - Modify the plugin options |\n *\n * If you set the `hiddenColumns` to an object, you can set the following [`HiddenColumns`](@/api/hiddenColumns.md) plugin options:\n *\n * | Property | Possible values | Description |\n * | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `columns` | An array of indexes | An array of indexes of columns that are hidden at initialization |\n * | `copyPasteEnabled` | `true` \\| `false` | `true`: when copying or pasting data, take hidden columns into account `false`: when copying or pasting data, don't take hidden columns into account |\n * | `indicators` | `true` \\| `false` | `true`: display UI markers to indicate the presence of hidden columns `false`: display UI markers |\n *\n * Read more:\n * - [Plugins: `HiddenColumns`](@/api/hiddenColumns.md)\n * - [Column hiding](@/guides/columns/column-hiding.md)\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n * @category HiddenColumns\n *\n * @example\n * ```js\n * // enable the `HiddenColumns` plugin\n * hiddenColumns: true,\n *\n * // enable `HiddenColumns` plugin, and modify the plugin options\n * hiddenColumns: {\n * // set columns that are hidden by default\n * columns: [5, 10, 15],\n * // when copying or pasting data, take hidden columns into account\n * copyPasteEnabled: true,\n * // show where hidden columns are\n * indicators: true\n * }\n * ```\n */\n hiddenColumns: void 0,\n /**\n * The `hiddenRows` option configures the [`HiddenRows`](@/api/hiddenRows.md) plugin.\n *\n * You can set the `hiddenRows` option to one of the following:\n *\n * | Setting | Description |\n * | --------- | -------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`HiddenRows`](@/api/hiddenRows.md) plugin |\n * | `true` | Enable the [`HiddenRows`](@/api/hiddenRows.md) plugin with the default plugin options |\n * | An object | - Enable the [`HiddenRows`](@/api/hiddenRows.md) plugin - Modify the plugin options |\n *\n * If you set the `hiddenRows` to an object, you can set the following [`HiddenRows`](@/api/hiddenRows.md) plugin options:\n *\n * | Property | Possible values | Description |\n * | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `rows ` | An array of indexes | An array of indexes of rows that are hidden at initialization |\n * | `copyPasteEnabled` | `true` \\| `false` | `true`: when copying or pasting data, take hidden rows into account `false`: when copying or pasting data, don't take hidden rows into account |\n * | `indicators` | `true` \\| `false` | `true`: display UI markers to indicate the presence of hidden rows `false`: display UI markers |\n *\n * Read more:\n * - [Plugins: `HiddenRows`](@/api/hiddenRows.md)\n * - [Row hiding](@/guides/rows/row-hiding.md)\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n * @category HiddenRows\n *\n * @example\n * ```js\n * // enable the `HiddenRows` plugin\n * hiddenRows: true,\n *\n * // enable `HiddenRows` plugin, and modify the plugin options\n * hiddenRows: {\n * // set rows that are hidden by default\n * rows: [5, 10, 15],\n * // when copying or pasting data, take hidden rows into account\n * copyPasteEnabled: true,\n * // show where hidden rows are\n * indicators: true\n * }\n * ```\n */\n hiddenRows: void 0,\n /**\n * The `invalidCellClassName` option lets you add a CSS class name to cells\n * that were marked as `invalid` by the [cell validator](@/guides/cell-functions/cell-validator.md).\n *\n * Read more:\n * - [Cell validator](@/guides/cell-functions/cell-validator.md)\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default 'htInvalid'\n * @category Core\n *\n * @example\n * ```js\n * // add a `highlight-error` CSS class name\n * // to every `invalid` cell`\n * invalidCellClassName: 'highlight-error',\n * ```\n */\n invalidCellClassName: 'htInvalid',\n /**\n * The `isEmptyCol` option lets you define your own custom method\n * for checking if a column at a given visual index is empty.\n *\n * The `isEmptyCol` setting overwrites the built-in [`isEmptyCol`](@/api/core.md#isEmptyCol) method.\n *\n * @memberof Options#\n * @type {Function}\n * @param {number} col Visual column index.\n * @returns {boolean}\n * @category Core\n *\n * @example\n * ```js\n * // overwrite the built-in `isEmptyCol` method\n * isEmptyCol(visualColumnIndex) {\n * // your custom method\n * ...\n * },\n * ```\n */\n isEmptyCol: function isEmptyCol(col) {\n var row;\n var rowLen;\n var value;\n for (row = 0, rowLen = this.countRows(); row < rowLen; row++) {\n value = this.getDataAtCell(row, col);\n if (isEmpty(value) === false) {\n return false;\n }\n }\n return true;\n },\n /**\n * The `isEmptyRow` option lets you define your own custom method\n * for checking if a row at a given visual index is empty.\n *\n * The `isEmptyRow` setting overwrites the built-in [`isEmptyRow`](@/api/core.md#isEmptyRow) method.\n *\n * @memberof Options#\n * @type {Function}\n * @param {number} row Visual row index.\n * @returns {boolean}\n * @category Core\n *\n * @example\n * ```js\n * // overwrite the built-in `isEmptyRow` method\n * isEmptyRow(visualRowIndex) {\n * // your custom method\n * ...\n * },\n * ```\n */\n isEmptyRow: function isEmptyRow(row) {\n var col;\n var colLen;\n var value;\n var meta;\n for (col = 0, colLen = this.countCols(); col < colLen; col++) {\n value = this.getDataAtCell(row, col);\n if (isEmpty(value) === false) {\n if (_typeof(value) === 'object') {\n meta = this.getCellMeta(row, col);\n return isObjectEqual(this.getSchema()[meta.prop], value);\n }\n return false;\n }\n }\n return true;\n },\n /**\n * @description\n * The `label` option configures [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cells` labels.\n *\n * You can set the `label` option to an object with the following properties:\n *\n * | Property | Possible values | Description |\n * | ----------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `position` | `'after'` (default) \\| `'before'` | `'after'`: place the label to the right of the checkbox `'before'`: place the label to the left of the checkbox |\n * | `value` | A string \\| A function | The label's text |\n * | `separated` | `false` (default) \\| `true` | `false`: don't separate the label from the checkbox `true`: separate the label from the checkbox |\n * | `property` | A string | - A [`data`](#data) object property name that's used as the label's text - Works only when the [`data`](#data) option is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects) |\n *\n * Read more:\n * - [Checkbox cell type: Checkbox labels](@/guides/cell-types/checkbox-cell-type.md#checkbox-labels)\n *\n * @memberof Options#\n * @type {object}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [{\n * type: 'checkbox',\n * // add 'My label:' after the checkbox\n * label: { position: 'after', value: 'My label: ', separated: true }\n * }],\n * ```\n */\n label: void 0,\n /**\n * The `language` option configures Handsontable's [language](@/guides/internationalization/language.md) settings.\n *\n * You can set the `language` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------- | --------------------------- |\n * | `'en-US'` (default) | English - United States |\n * | `'ar-AR'` | Arabic - Global.
To properly render this language, set the [layout direction](@/guides/internationalization/layout-direction.md) to RTL. |\n * | `'cs-CZ'` | Czech - Czech Republic |\n * | `'de-CH'` | German - Switzerland |\n * | `'de-DE'` | German - Germany |\n * | `'es-MX'` | Spanish - Mexico |\n * | `'fr-FR'` | French - France |\n * | `'it-IT'` | Italian - Italy |\n * | `'ja-JP'` | Japanese - Japan |\n * | `'ko-KR'` | Korean - Korea |\n * | `'lv-LV'` | Latvian - Latvia |\n * | `'nb-NO'` | Norwegian (Bokmål) - Norway |\n * | `'nl-NL'` | Dutch - Netherlands |\n * | `'pl-PL'` | Polish - Poland |\n * | `'pt-BR'` | Portuguese - Brazil |\n * | `'ru-RU'` | Russian - Russia |\n * | `'sr-SP'` | Serbian (Latin) - Serbia |\n * | `'zh-CN'` | Chinese - China |\n * | `'zh-TW'` | Chinese - Taiwan |\n *\n * Read more:\n * - [Language](@/guides/internationalization/language.md)\n * - [`locale`](#locale)\n * - [`layoutDirection`](#layoutdirection)\n *\n * @memberof Options#\n * @type {string}\n * @default 'en-US'\n * @category Core\n *\n * @example\n * ```js\n * // set Handsontable's language to Polish\n * language: 'pl-PL',\n * ```\n */\n language: 'en-US',\n /**\n * The `layoutDirection` option configures whether Handsontable renders from the left to the right, or from the right to the left.\n *\n * You can set the layout direction only at Handsontable's [initialization](@/guides/getting-started/installation.md#initialize-handsontable). Any change of the `layoutDirection` option after the initialization (e.g. using the [`updateSettings()`](@/api/core.md#updatesettings) method) is ignored.\n *\n * You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#set-grid-options).\n * You can't set it for individual columns, rows, or cells.\n *\n * You can set the `layoutDirection` option to one of the following strings:\n *\n * | Setting | Description |\n * | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `inherit` (default) | Set Handsontable's layout direction automatically, based on the value of your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute |\n * | `rtl` | Render Handsontable from the right to the left, even when your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute is set to `ltr` |\n * | `ltr` | Render Handsontable from the left to the right, even when your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute is set to `rtl` |\n *\n * Read more:\n * - [Layout direction](@/guides/internationalization/layout-direction.md)\n * - [Language](@/guides/internationalization/language.md)\n * - [`language`](#language)\n * - [`locale`](#locale)\n * - [`fixedColumnsStart`](#fixedcolumnsstart)\n * - [`customBorders`](#customBorders)\n *\n * @memberof Options#\n * @type {string}\n * @default 'inherit'\n * @category Core\n *\n * @example\n * ```js\n * // inherit Handsontable's layout direction\n * // from the value of your HTML document's `dir` attribute\n * layoutDirection: 'inherit',\n *\n * // render Handsontable from the right to the left\n * // regardless of your HTML document's `dir`\n * layoutDirection: 'rtl',\n *\n * // render Handsontable from the left to the right\n * // regardless of your HTML document's `dir`\n * layoutDirection: 'ltr',\n * ```\n */\n layoutDirection: 'inherit',\n /**\n * The `licenseKey` option sets your Handsontable license key.\n *\n * You can set the `licenseKey` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |\n * | A string with your [commercial license key](@/guides/getting-started/license-key.md#commercial-license) | For [commercial use](@/guides/technical-specification/software-license.md#commercial-use) |\n * | `'non-commercial-and-evaluation'` | For [non-commercial use](@/guides/technical-specification/software-license.md#non-commercial-use) |\n *\n * Read more:\n * - [License key](@/guides/getting-started/license-key.md)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // for commercial use\n * licenseKey: 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx', // your commercial license key\n *\n * // for non-commercial use\n * licenseKey: 'non-commercial-and-evaluation',\n * ```\n */\n licenseKey: void 0,\n /**\n * The `locale` option configures Handsontable's [locale](@/guides/internationalization/locale.md) settings.\n *\n * You can set the `locale` option to any valid and canonicalized Unicode BCP 47 locale tag,\n * both for the [entire grid](@/guides/internationalization/locale.md#set-the-grid-s-locale),\n * and for [individual columns](@/guides/internationalization/locale.md#set-a-column-s-locale).\n *\n * Read more:\n * - [Locale](@/guides/internationalization/locale.md)\n * - [`language`](#language)\n * - [`layoutDirection`](#layoutdirection)\n *\n * @memberof Options#\n * @type {string}\n * @default 'en-US'\n * @category Core\n *\n * @example\n * ```js\n * // set the entire grid's locale to Polish\n * locale: 'pl-PL',\n *\n * // set individual columns' locales\n * columns: [\n * {\n * // set the first column's locale to Polish\n * locale: 'pl-PL',\n * },\n * {\n * // set the second column's locale to German\n * locale: 'de-DE',\n * },\n * ],\n * ```\n */\n locale: 'en-US',\n /**\n * The `manualColumnFreeze` option configures the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin.\n *\n * You can set the `manualColumnFreeze` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | ---------------------------------------------------------------------- |\n * | `true` | Enable the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin |\n * | `false` | Disable the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin |\n *\n * Read more:\n * - [Column freezing](@/guides/columns/column-freezing.md#user-triggered-freeze)\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @category ManualColumnFreeze\n *\n * @example\n * ```js\n * // enable the `ManualColumnFreeze` plugin\n * manualColumnFreeze: true,\n * ```\n */\n manualColumnFreeze: void 0,\n /**\n * The `manualColumnMove` option configures the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin.\n *\n * You can set the `manualColumnMove` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | ------------------------------------------------------------------------------------------------------------------ |\n * | `true` | Enable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin |\n * | `false` | Disable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin |\n * | An array | - Enable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin - Move individual columns at initialization |\n *\n * Read more:\n * - [Column moving](@/guides/columns/column-moving.md)\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n * @category ManualColumnMove\n *\n * @example\n * ```js\n * // enable the `ManualColumnMove` plugin\n * manualColumnMove: true,\n *\n * // enable the `ManualColumnMove` plugin\n * // at initialization, move column 0 to 1\n * // at initialization, move column 1 to 4\n * // at initialization, move column 2 to 6\n * manualColumnMove: [1, 4, 6],\n * ```\n */\n manualColumnMove: void 0,\n /**\n * @description\n * The `manualColumnResize` option configures the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin.\n *\n * You can set the `manualColumnResize` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | --------------------------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin |\n * | `false` | Disable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin |\n * | An array | - Enable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin - Set initial widths of individual columns |\n *\n * Read more:\n * - [Column width: Column stretching](@/guides/columns/column-width.md#column-stretching)\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n * @category ManualColumnResize\n *\n * @example\n * ```js\n * // enable the `manualColumnResize` plugin\n * manualColumnResize: true,\n *\n * // enable the `manualColumnResize` plugin\n * // set the initial width of column 0 to 40 pixels\n * // set the initial width of column 1 to 50 pixels\n * // set the initial width of column 2 to 60 pixels\n * manualColumnResize: [40, 50, 60],\n * ```\n */\n manualColumnResize: void 0,\n /**\n * @description\n * The `manualRowMove` option configures the [`ManualRowMove`](@/api/manualRowMove.md) plugin.\n *\n * You can set the `manualRowMove` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | --------------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`ManualRowMove`](@/api/manualRowMove.md) plugin |\n * | `false` | Disable the [`ManualRowMove`](@/api/manualRowMove.md) plugin |\n * | An array | - Enable the [`ManualRowMove`](@/api/manualRowMove.md) plugin - Move individual rows at initialization |\n *\n * Read more:\n * - [Row moving](@/guides/rows/row-moving.md)\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n * @category ManualRowMove\n *\n * @example\n * ```js\n * // enable the `ManualRowMove` plugin\n * manualRowMove: true,\n *\n * // enable the `ManualRowMove` plugin\n * // at initialization, move row 0 to 1\n * // at initialization, move row 1 to 4\n * // at initialization, move row 2 to 6\n * manualColumnMove: [1, 4, 6],\n * ```\n */\n manualRowMove: void 0,\n /**\n * @description\n * The `manualRowResize` option configures the [`ManualRowResize`](@/api/manualRowResize.md) plugin.\n *\n * You can set the `manualRowResize` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | ------------------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`ManualRowResize`](@/api/manualRowResize.md) plugin |\n * | `false` | Disable the [`ManualRowResize`](@/api/manualRowResize.md) plugin |\n * | An array | - Enable the [`ManualRowResize`](@/api/manualRowResize.md) plugin - Set initial heights of individual rows |\n *\n * Read more:\n * - [Row height: Adjust the row height manually](@/guides/rows/row-height.md#adjust-the-row-height-manually)\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n * @category ManualRowResize\n *\n * @example\n * ```js\n * // enable the `ManualRowResize` plugin\n * manualRowResize: true,\n *\n * // enable the `ManualRowResize` plugin\n * // set the initial height of row 0 to 40 pixels\n * // set the initial height of row 1 to 50 pixels\n * // set the initial height of row 2 to 60 pixels\n * manualRowResize: [40, 50, 60],\n * ```\n */\n manualRowResize: void 0,\n /**\n * The `maxCols` option sets a maximum number of columns.\n *\n * The `maxCols` option is used:\n * - At initialization: if the `maxCols` value is lower than the initial number of columns,\n * Handsontable trims columns from the right.\n * - At runtime: for example, when inserting columns.\n *\n * @memberof Options#\n * @type {number}\n * @default Infinity\n * @category Core\n *\n * @example\n * ```js\n * // set the maximum number of columns to 300\n * maxCols: 300,\n * ```\n */\n maxCols: Infinity,\n /**\n * The `maxRows` option sets a maximum number of rows.\n *\n * The `maxRows` option is used:\n * - At initialization: if the `maxRows` value is lower than the initial number of rows,\n * Handsontable trims rows from the bottom.\n * - At runtime: for example, when inserting rows.\n *\n * @memberof Options#\n * @type {number}\n * @default Infinity\n * @category Core\n *\n * @example\n * ```js\n * // set the maximum number of rows to 300\n * maxRows: 300,\n * ```\n */\n maxRows: Infinity,\n /**\n * @description\n * The `mergeCells` option configures the [`MergeCells`](@/api/mergeCells.md) plugin.\n *\n * You can set the `mergeCells` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------- | --------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`MergeCells`](@/api/mergeCells.md) plugin |\n * | `false` | Disable the [`MergeCells`](@/api/mergeCells.md) plugin |\n * | An array of objects | - Enable the [`MergeCells`](@/api/mergeCells.md) plugin - Merge specific cells at initialization |\n *\n * To merge specific cells at Handsontable's initialization,\n * set the `mergeCells` option to an array of objects, with the following properties:\n *\n * | Property | Description |\n * | --------- | ---------------------------------------------------------- |\n * | `row` | The row index of the merged section's beginning |\n * | `col` | The column index of the merged section's beginning |\n * | `rowspan` | The width (as a number of rows) of the merged section |\n * | `colspan` | The height (as a number of columns ) of the merged section |\n *\n * Read more:\n * - [Merge cells](@/guides/cell-features/merge-cells.md)\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n * @category MergeCells\n *\n * @example\n * ```js\n * // enable the `MergeCells` plugin\n * mergeCells: true,\n *\n * // enable the `MergeCells` plugin\n * // and merge specific cells at initialization\n * mergeCells: [\n * // merge cells from cell (1,1) to cell (3,3)\n * {row: 1, col: 1, rowspan: 3, colspan: 3},\n * // merge cells from cell (3,4) to cell (2,2)\n * {row: 3, col: 4, rowspan: 2, colspan: 2},\n * // merge cells from cell (5,6) to cell (3,3)\n * {row: 5, col: 6, rowspan: 3, colspan: 3}\n * ],\n * ```\n */\n mergeCells: false,\n /**\n * The `minCols` option sets a minimum number of columns.\n *\n * The `minCols` option is used:\n * - At initialization: if the `minCols` value is higher than the initial number of columns,\n * Handsontable adds empty columns to the right.\n * - At runtime: for example, when removing columns.\n *\n * The `minCols` option works only when your [`data`](#data) is an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).\n * When your [`data`](#data) is an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects),\n * you can only have as many columns as defined in:\n * - The first data row\n * - The [`dataSchema`](#dataSchema) option\n * - The [`columns`](#columns) option\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // set the minimum number of columns to 10\n * minCols: 10,\n * ```\n */\n minCols: 0,\n /**\n * The `minRows` option sets a minimum number of rows.\n *\n * The `minRows` option is used:\n * - At initialization: if the `minRows` value is higher than the initial number of rows,\n * Handsontable adds empty rows at the bottom.\n * - At runtime: for example, when removing rows.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // set the minimum number of rows to 10\n * minRows: 10,\n * ```\n */\n minRows: 0,\n /**\n * The `minSpareCols` option sets a minimum number of empty columns\n * at the grid's right-hand end.\n *\n * If there already are other empty columns at the grid's right-hand end,\n * they are counted into the `minSpareCols` value.\n *\n * The total number of columns can't exceed the [`maxCols`](#maxCols) value.\n *\n * The `minSpareCols` option works only when your [`data`](#data) is an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).\n * When your [`data`](#data) is an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects),\n * you can only have as many columns as defined in:\n * - The first data row\n * - The [`dataSchema`](#dataSchema) option\n * - The [`columns`](#columns) option\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // at Handsontable's initialization, add at least 3 empty columns on the right\n * minSpareCols: 3,\n * ```\n */\n minSpareCols: 0,\n /**\n * The `minSpareRows` option sets a minimum number of empty rows\n * at the bottom of the grid.\n *\n * If there already are other empty rows at the bottom,\n * they are counted into the `minSpareRows` value.\n *\n * The total number of rows can't exceed the [`maxRows`](#maxRows) value.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n * @category Core\n *\n * @example\n * ```js\n * // at Handsontable's initialization, add at least 3 empty rows at the bottom\n * minSpareRows: 3,\n * ```\n */\n minSpareRows: 0,\n /**\n * @description\n * The `multiColumnSorting` option configures the [`MultiColumnSorting`](@/api/columnSorting.md) plugin.\n *\n * You can set the `multiColumnSorting` option to one of the following:\n *\n * | Setting | Description |\n * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `true` | Enable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin with the default configuration |\n * | `false` | Disable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin |\n * | An object | - Enable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin - Modify the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin options |\n *\n * If you set the `multiColumnSorting` option to an object,\n * you can set the following [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin options:\n *\n * | Option | Possible settings |\n * | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n * | `indicator` | `true`: Display the arrow icon in the column header, to indicate a sortable column `false`: Don't display the arrow icon in the column header |\n * | `headerAction` | `true`: Enable clicking on the column header to sort the column `false`: Disable clicking on the column header to sort the column |\n * | `sortEmptyCells` | `true`: Sort empty cells as well `false`: Place empty cells at the end |\n * | `compareFunctionFactory` | A [custom compare function](@/guides/rows/rows-sorting.md#add-a-custom-comparator) |\n *\n * If you set the `multiColumnSorting` option to an object,\n * you can also sort individual columns at Handsontable's initialization.\n * In the `multiColumnSorting` object, add an object named `initialConfig`,\n * with the following properties:\n *\n * | Option | Possible settings | Description |\n * | ----------- | ------------------- | ---------------------------------------------------------------- |\n * | `column` | A number | The index of the column that you want to sort at initialization |\n * | `sortOrder` | `'asc'` \\| `'desc'` | The sorting order: `'asc'`: ascending `'desc'`: descending |\n *\n * Read more:\n * - [Rows sorting](@/guides/rows/rows-sorting.md)\n * - [`columnSorting`](#columnSorting)\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n * @category MultiColumnSorting\n *\n * @example\n * ```js\n * // enable the `MultiColumnSorting` plugin\n * multiColumnSorting: true\n *\n * // enable the `MultiColumnSorting` plugin with custom configuration\n * multiColumnSorting: {\n * // sort empty cells as well\n * sortEmptyCells: true,\n * // display the arrow icon in the column header\n * indicator: true,\n * // disable clicking on the column header to sort the column\n * headerAction: false,\n * // add a custom compare function\n * compareFunctionFactory(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }\n *\n * // enable the `MultiColumnSorting` plugin\n * multiColumnSorting: {\n * // at initialization, sort column 1 in ascending order\n * initialConfig: {\n * column: 1,\n * sortOrder: 'asc'\n * },\n * // at initialization, sort column 2 in descending order\n * initialConfig: {\n * column: 2,\n * sortOrder: 'desc'\n * }\n * }\n * ```\n */\n multiColumnSorting: void 0,\n /**\n * @description\n * The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.\n *\n * You can set the `nestedHeaders` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n * | `false` (default) | Disable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin |\n * | `true` | - Enable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin - Don't configure any nested headers |\n * | Array of arrays | - Enable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin - Configure headers that are nested on Handsontable's initialization |\n *\n * If you set the `nestedHeaders` option to an array of arrays, each array configures one set of nested headers.\n *\n * Each array element configures one header, and can be one of the following:\n *\n * | Array element | Description |\n * | ------------- | -------------------------------------------------------------------------------------------- |\n * | A string | The header's label |\n * | An object | Properties: `label` (string): the header's label `colspan` (integer): the column width |\n *\n * Read more:\n * - [Plugins: `NestedHeaders`](@/api/nestedHeaders.md)\n * - [Column groups: Nested headers](@/guides/columns/column-groups.md#nested-headers)\n *\n * @memberof Options#\n * @type {boolean|Array[]}\n * @default undefined\n * @category NestedHeaders\n *\n * @example\n * ```js\n * nestedHeaders: [\n * ['A', {label: 'B', colspan: 8}, 'C'],\n * ['D', {label: 'E', colspan: 4}, {label: 'F', colspan: 4}, 'G'],\n * ['H', 'I', 'J', 'K', 'L', 'M', 'N', 'R', 'S', 'T']\n * ],\n * ```\n */\n nestedHeaders: void 0,\n /**\n * @description\n * The `nestedRows` option configures the [`NestedRows`](@/api/nestedRows.md) plugin.\n *\n * You can set the `nestedRows` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ------------------------------------------------------ |\n * | `false` (default) | Disable the [`NestedRows`](@/api/nestedRows.md) plugin |\n * | `true` | Enable the [`NestedRows`](@/api/nestedRows.md) plugin |\n *\n * Read more:\n * - [Plugins: `NestedRows`](@/api/nestedRows.md)\n *\n * @example\n * ```js\n * // enable the `NestedRows` plugin\n * nestedRows: true,\n * ```\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category NestedRows\n */\n nestedRows: void 0,\n /**\n * The `noWordWrapClassName` option lets you add a CSS class name\n * to each cell that has the [`wordWrap`](#wordWrap) option set to `false`.\n *\n * Read more:\n * - [`wordWrap`](#wordWrap)\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default 'htNoWrap'\n * @category Core\n *\n * @example\n * ```js\n * // add an `is-noWrapCell` CSS class name\n * // to each cell that doesn't wrap content\n * noWordWrapClassName: 'is-noWrapCell',\n * ```\n */\n noWordWrapClassName: 'htNoWrap',\n /**\n * The `numericFormat` option configures the number format and the currency format\n * of [`numeric`](@/guides/cell-types/numeric-cell-type.md) cells` displayed output\n * in the numeric cell renderer.\n *\n * You can set the `numericFormat` option to an object with the following properties:\n *\n * | Property | Possible values | Description |\n * | ----------- | ----------------------------------------------------------------------------- | --------------- |\n * | `pattern` | All [`numbro.js` number formats](https://numbrojs.com/format.html#numbers) | Number format |\n * | `culture` | All [`numbro.js` currency formats](https://numbrojs.com/format.html#currency) | Currency format |\n *\n * The `numericFormat` option as no effect on the numeric cell editor.\n *\n * In the source data, numeric data is stored as JavaScript numbers.\n *\n * Read more:\n * - [Numeric cell type](@/guides/cell-types/numeric-cell-type.md)\n * - [Third-party licenses](@/guides/technical-specification/third-party-licenses.md)\n *\n * @memberof Options#\n * @since 0.35.0\n * @type {object}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `numeric`\n * type: 'numeric',\n * // set the `numericFormat` option for every `numeric` cell of this column\n * numericFormat: {\n * // set the number format\n * pattern: '0,00',\n * // set the currency format\n * culture: 'en-US'\n * }\n * }\n * ],\n * ```\n */\n numericFormat: void 0,\n /**\n * If the `observeDOMVisibility` option is set to `true`,\n * Handsontable rerenders every time it detects that the grid was made visible in the DOM.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // don't rerender the grid on visibility changes\n * observeDOMVisibility: false,\n * ```\n */\n observeDOMVisibility: true,\n /**\n * The `outsideClickDeselects` option determines what happens to the current [selection](@/guides/cell-features/selection.md)\n * when you click outside of the grid.\n *\n * You can set the `outsideClickDeselects` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | -------------------------------------------------------------------------------------------------------- |\n * | `true` (default) | On a mouse click outside of the grid, clear the current [selection](@/guides/cell-features/selection.md) |\n * | `false` | On a mouse click outside of the grid, keep the current [selection](@/guides/cell-features/selection.md) |\n * | A function | A function that takes the click event target and returns a boolean |\n *\n * @memberof Options#\n * @type {boolean|Function}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // on a mouse click outside of the grid, clear the current selection\n * outsideClickDeselects: true,\n *\n * // on a mouse click outside of the grid, keep the current selection\n * outsideClickDeselects: false,\n *\n * // take the click event target and return `false`\n * outsideClickDeselects(event) {\n * return false;\n * }\n *\n * // take the click event target and return `true`\n * outsideClickDeselects(event) {\n * return false;\n * }\n * ```\n */\n outsideClickDeselects: true,\n /**\n * @description\n * The `persistentState` option configures the [`PersistentState`](@/api/persistentState.md) plugin.\n *\n * You can set the `persistentState` to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ---------------------------------------------------------------- |\n * | `false` (default) | Disable the [`PersistentState`](@/api/persistentState.md) plugin |\n * | `true` | Enable the [`PersistentState`](@/api/persistentState.md) plugin |\n *\n * Read more:\n * - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#save-data-locally)\n * - [Plugins: `PersistentState`](@/api/persistentState.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category PersistentState\n *\n * @example\n * ```js\n * // enable the `PersistentState` plugin\n * persistentState: true,\n * ```\n */\n persistentState: void 0,\n /**\n * The `placeholder` option lets you display placeholder text in every empty cell.\n *\n * You can set the `placeholder` option to one of the following:\n *\n * | Setting | Example | Description |\n * | ------------------ | -------------- | --------------------------------------------------------------------- |\n * | A non-empty string | `'Empty cell'` | Display `Empty cell` text in empty cells |\n * | A non-string value | `000` | Display `000` text in empty cells (non-string values get stringified) |\n *\n * Read more:\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // display 'Empty cell' text\n * // in every empty cell of the entire grid\n * placeholder: 'Empty cell',\n *\n * // or\n * columns: [\n * {\n * data: 'date',\n * dateFormat: 'DD/MM/YYYY',\n * // display 'Empty date cell' text\n * // in every empty cell of the `date` column\n * placeholder: 'Empty date cell'\n * }\n * ],\n * ```\n */\n placeholder: void 0,\n /**\n * The `placeholderCellClassName` option lets you add a CSS class name to cells\n * that contain [`placeholder`](#placeholder) text.\n *\n * Read more:\n * - [Cell validator](@/guides/cell-functions/cell-validator.md)\n * - [`placeholder`](#placeholder)\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`TableClassName`](#TableClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string}\n * @default 'htPlaceholder'\n * @category Core\n *\n * @example\n * ```js\n * // add a `has-placeholder` CSS class name\n * // to each cell that contains `placeholder` text\n * placeholderCellClassName: 'has-placeholder',\n * ```\n */\n placeholderCellClassName: 'htPlaceholder',\n /**\n * The `preventOverflow` option configures preventing Handsontable\n * from overflowing outside of its parent element.\n *\n * You can set the `preventOverflow` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | -------------------------------- |\n * | `false` (default) | Don't prevent overflowing |\n * | `'horizontal'` | Prevent horizontal overflowing |\n * | `'vertical'` | Prevent vertical overflowing |\n *\n * @memberof Options#\n * @type {string|boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // prevent horizontal overflowing\n * preventOverflow: 'horizontal',\n * ```\n */\n preventOverflow: false,\n /**\n * The `preventWheel` option configures preventing the `wheel` event's default action\n * on overlays.\n *\n * You can set the `preventWheel` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ------------------------------------------------ |\n * | `false` (default) | Don't prevent the `wheel` event's default action |\n * | `true` | Prevent the `wheel` event's default action |\n *\n * @memberof Options#\n * @private\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // don't prevent the `wheel` event's default action\n * preventWheel: false,\n * ```\n */\n preventWheel: false,\n /**\n * @description\n * The `readOnly` option determines whether a cell, column or comment is editable or not.\n *\n * You can set the `readOnly` option to one of the following:\n *\n * | Setting | Decription |\n * | ----------------- | ------------------------------------------------------------------------------------------------------------------------- |\n * | `false` (default) | Set as editable |\n * | `true` | - Set as read-only - Add the [`readOnlyCellClassName`](#readOnlyCellClassName) CSS class name (by default: `htDimmed`) |\n *\n * `readOnly` cells can't be changed by the [`populateFromArray()`](@/api/core.md#populatefromarray) method.\n *\n * Read more:\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * // set as read-only\n * readOnly: true,\n * ```\n */\n readOnly: false,\n /**\n * The `readOnlyCellClassName` option lets you add a CSS class name to [read-only](#readOnly) cells.\n *\n * Read more:\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`TableClassName`](#TableClassName)\n *\n * @memberof Options#\n * @type {string}\n * @default 'htDimmed'\n * @category Core\n *\n * @example\n * ```js\n * // add a `is-readOnly` CSS class name\n * // to every read-only cell\n * readOnlyCellClassName: 'is-readOnly',\n * ```\n */\n readOnlyCellClassName: 'htDimmed',\n /**\n * The `renderAllRows` option configures Handsontable's [row virtualization](@/guides/rows/row-virtualization.md).\n *\n * You can set the `renderAllRows` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | -------------------------------------------------------------------------------------------------- |\n * | `false` (default) | Enable [row virtualization](@/guides/rows/row-virtualization.md) |\n * | `true` | Disable [row virtualization](@/guides/rows/row-virtualization.md) (render all rows of the grid) |\n *\n * Read more:\n * - [Row virtualization](@/guides/rows/row-virtualization.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // disable row virtualization\n * renderAllRows: true,\n * ```\n */\n renderAllRows: void 0,\n /**\n * @description\n * The `renderer` option sets a [cell renderer](@/guides/cell-functions/cell-renderer.md) for a cell.\n *\n * You can set the `renderer` option to one of the following:\n * - A custom renderer function\n * - One of the following [cell renderer aliases](@/guides/cell-functions/cell-renderer.md):\n *\n * | Alias | Cell renderer function |\n * | ------------------- | ------------------------------------------------------------------------------ |\n * | A custom alias | Your [custom cell renderer](@/guides/cell-functions/cell-renderer.md) function |\n * | `'autocomplete'` | `AutocompleteRenderer` |\n * | `'base'` | `BaseRenderer` |\n * | `'checkbox'` | `CheckboxRenderer` |\n * | `'date'` | `DateRenderer` |\n * | `'dropdown'` | `DropdownRenderer` |\n * | `'html'` | `HtmlRenderer` |\n * | `'numeric'` | `NumericRenderer` |\n * | `'password'` | `PasswordRenderer` |\n * | `'text'` | `TextRenderer` |\n * | `'time'` | `TimeRenderer` |\n *\n * To set the [`renderer`](#renderer), [`editor`](#editor), and [`validator`](#validator)\n * options all at once, use the [`type`](#type) option.\n *\n * Read more:\n * - [Cell renderer](@/guides/cell-functions/cell-renderer.md)\n * - [Cell type](@/guides/cell-types/cell-type.md)\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [`type`](#type)\n *\n * @memberof Options#\n * @type {string|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // use the `numeric` renderer for each cell of the entire grid\n * renderer: `'numeric'`,\n *\n * // add a custom renderer function\n * renderer(hotInstance, td, row, column, prop, value, cellProperties) {\n * // your custom renderer's logic\n * ...\n * }\n *\n * // apply the `renderer` option to individual columns\n * columns: [\n * {\n * // use the `autocomplete` renderer for each cell of this column\n * renderer: 'autocomplete'\n * },\n * {\n * // use the `myCustomRenderer` renderer for each cell of this column\n * renderer: 'myCustomRenderer'\n * }\n * ]\n * ```\n */\n renderer: void 0,\n /**\n * The `rowHeaders` option configures your grid's row headers.\n *\n * You can set the `rowHeaders` option to one of the following:\n *\n * | Setting | Description |\n * | ---------- | ----------------------------------------------------------------- |\n * | `true` | Enable the default row headers ('1', '2', '3', ...) |\n * | `false` | Disable row headers |\n * | An array | Define your own row headers (e.g. `['One', 'Two', 'Three', ...]`) |\n * | A function | Define your own row headers, using a function |\n *\n * Read more:\n * - [Row header](@/guides/rows/row-header.md)\n *\n * @memberof Options#\n * @type {boolean|string[]|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // enable the default row headers\n * rowHeaders: true,\n *\n * // set your own row headers\n * rowHeaders: ['One', 'Two', 'Three'],\n *\n * // set your own row headers, using a function\n * rowHeaders: function(visualRowIndex) {\n * return `${visualRowIndex}: AB`;\n * },\n * ```\n */\n rowHeaders: void 0,\n /**\n * @description\n * The `rowHeaderWidth` option configures the width of row headers.\n *\n * You can set the `rowHeaderWidth` option to one of the following:\n *\n * | Setting | Description |\n * | -------- | ----------------------------------------------- |\n * | A number | Set the same width for every row header |\n * | An array | Set different widths for individual row headers |\n *\n * @memberof Options#\n * @type {number|number[]}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the same width for every row header\n * rowHeaderWidth: 25,\n *\n * // set different widths for individual row headers\n * rowHeaderWidth: [25, 30, 55],\n * ```\n */\n rowHeaderWidth: void 0,\n /**\n * The `rowHeights` option sets rows' heights, in pixels.\n *\n * In the rendering process, the default row height is 23 px (22 px + 1 px of the row's bottom border).\n * You can change it to equal or greater than 23px, by setting the `rowHeights` option to one of the following:\n *\n * | Setting | Description | Example |\n * | ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |\n * | A number | Set the same height for every row | `rowHeights: 100` |\n * | A string | Set the same height for every row | `rowHeights: '100px'` |\n * | An array | Set heights separately for each row | `rowHeights: [100, 120, undefined]` |\n * | A function | Set row heights dynamically, on each render | `rowHeights(visualRowIndex) { return visualRowIndex * 10; }` |\n * | `undefined` | Used by the [modifyRowHeight](@/api/hooks.md#modifyRowHeight) hook, to detect row height changes | `rowHeights: undefined` |\n *\n * The `rowHeights` option also sets the minimum row height that can be set\n * via the {@link ManualRowResize} and {@link AutoRowSize} plugins (if they are enabled).\n *\n * Read more:\n * - [Row height](@/guides/rows/row-height.md)\n *\n * @memberof Options#\n * @type {number|number[]|string|string[]|Array|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set every row's height to 100px\n * rowHeights: 100,\n *\n * // set every row's height to 100px\n * rowHeights: '100px',\n *\n * // set the first (by visual index) row's height to 100\n * // set the second (by visual index) row's height to 120\n * // set the third (by visual index) row's height to `undefined`\n * // set any other row's height to the default 23px\n * rowHeights: [100, 120, undefined],\n *\n * // set each row's height individually, using a function\n * rowHeights(visualRowIndex) {\n * return visualRowIndex * 10;\n * },\n * ```\n */\n rowHeights: void 0,\n /**\n * @description\n * The `search` option configures the [`Search`](@/api/search.md) plugin.\n *\n * You can set the `search` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ------------------------------------------------------------------------------------ |\n * | `false` (default) | Disable the [`Search`](@/api/search.md) plugin |\n * | `true` | Enable the [`Search`](@/api/search.md) plugin with the default configuration |\n * | An object | - Enable the [`Search`](@/api/search.md) plugin - Apply your custom configuration |\n *\n * If you set the `search` option to an object, you can configure the following search options:\n *\n * | Option | Possible settings | Description |\n * | ------------------- | ----------------- | ---------------------------------------------------------------------------------------------------- |\n * | `searchResultClass` | A string | Add a custom CSS class name to search results |\n * | `queryMethod` | A function | Add a [custom query method](@/guides/accessories-and-menus/searching-values.md#custom-query-method) |\n * | `callback` | A function | Add a [custom callback function](@/guides/accessories-and-menus/searching-values.md#custom-callback) |\n *\n * Read more:\n * - [Searching values](@/guides/accessories-and-menus/searching-values.md)\n * - [Searching values: Custom query method](@/guides/accessories-and-menus/searching-values.md#custom-query-method)\n * - [Searching values: Custom callback](@/guides/accessories-and-menus/searching-values.md#custom-callback)\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default false\n * @category Search\n *\n * @example\n * ```js\n * // enable the `Search` plugin with the default configuration\n * search: true,\n *\n * // enable the `Search` plugin with a custom configuration\n * search: {\n * // add a `customClass` CSS class name to search results\n * searchResultClass: 'customClass',\n * // add a custom query method\n * queryMethod(queryStr, value) {\n * ...\n * },\n * // add a custom callback function\n * callback(instance, row, column, value, result) {\n * ...\n * }\n * }\n * ```\n */\n search: false,\n /**\n * @description\n * The `selectionMode` option configures how [selection](@/guides/cell-features/selection.md) works.\n *\n * You can set the `selectionMode` option to one of the following:\n *\n * | Setting | Description |\n * | ------------ | ------------------------------------------------------------ |\n * | `'single'` | Allow the user to select only one cell at a time. |\n * | `'range'` | Allow the user to select one range of cells at a time. |\n * | `'multiple'` | Allow the user to select multiple ranges of cells at a time. |\n *\n * Read more:\n * - [Selection: Selecting ranges](@/guides/cell-features/selection.md#select-ranges)\n *\n * @memberof Options#\n * @type {string}\n * @default 'multiple'\n * @category Core\n *\n * @example\n * ```js\n * // you can only select one cell at at a time\n * selectionMode: 'single',\n *\n * // you can select one range of cells at a time\n * selectionMode: 'range',\n *\n * // you can select multiple ranges of cells at a time\n * selectionMode: 'multiple',\n * ```\n */\n selectionMode: 'multiple',\n /**\n * The `selectOptions` option configures options that the end user can choose from in [`select`](@/guides/cell-types/select-cell-type.md) cells.\n *\n * You can set the `selectOptions` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------------------- | ----------------------------------------------------------------------------- |\n * | An array of strings | Each string is one option's value and label |\n * | An object with key-string pairs | - Each key is one option's value - The key's string is that option's label |\n * | A function | A function that returns an object with key-string pairs |\n *\n * Read more:\n * - [Select cell type](@/guides/cell-types/select-cell-type.md)\n *\n * @memberof Options#\n * @type {string[]|object|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `select`\n * type: 'select',\n * // set the first option's value and label to `A`\n * // set the second option's value and label to `B`\n * // set the third option's value and label to `C`\n * selectOptions: ['A', 'B', 'C'],\n * },\n * {\n * // set the `type` of each cell in this column to `select`\n * type: 'select',\n * selectOptions: {\n * // set the first option's value to `value1` and label to `Label 1`\n * value1: 'Label 1',\n * // set the second option's value to `value2` and label to `Label 2`\n * value2: 'Label 2',\n * // set the third option's value to `value3` and label to `Label 3`\n * value3: 'Label 3',\n * },\n * },\n * {\n * // set the `type` of each cell in this column to `select`\n * type: 'select',\n * // set `selectOption` to a function that returns available options as an object\n * selectOptions(visualRow, visualColumn, prop) {\n * return {\n * value1: 'Label 1',\n * value2: 'Label 2',\n * value3: 'Label 3',\n * };\n * },\n * ],\n * ```\n */\n selectOptions: void 0,\n /**\n * @description\n * The `skipColumnOnPaste` option determines whether you can paste data into a given column.\n *\n * You can only apply the `skipColumnOnPaste` option to an entire column, using the [`columns`](#columns) option.\n *\n * You can set the `skipColumnOnPaste` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ----------------------------------------------------------------------------------------------------- |\n * | `false` (default) | Enable pasting data into this column |\n * | `true` | - Disable pasting data into this column - On pasting, paste data into the next column to the right |\n *\n * Read more:\n * - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // disable pasting data into this column\n * skipColumnOnPaste: true\n * }\n * ],\n * ```\n */\n skipColumnOnPaste: false,\n /**\n * @description\n *\n * The `skipRowOnPaste` option determines whether you can paste data into a given row.\n *\n * You can only apply the `skipRowOnPaste` option to an entire row, using the [`cells`](#cells) option.\n *\n * You can set the `skipRowOnPaste` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ----------------------------------------------------------------------------------- |\n * | `false` (default) | Enable pasting data into this row |\n * | `true` | - Disable pasting data into this row - On pasting, paste data into the row below |\n *\n * Read more:\n * - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * cells(row, column) {\n * const cellProperties = {};\n *\n * // disable pasting data into row 1\n * if (row === 1) {\n * cellProperties.skipRowOnPaste = true;\n * }\n *\n * return cellProperties;\n * }\n * ```\n */\n skipRowOnPaste: false,\n /**\n * The `sortByRelevance` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'\n * lists are sorted in the same order as provided in the [`source`](#source) option.\n *\n * You can set the `sortByRelevance` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ---------------------------------------------------------------------------- |\n * | `true` (default) | Sort options in the same order as provided in the [`source`](#source) option |\n * | `false` | Sort options alphabetically |\n *\n * Read more:\n * - [`source`](#source)\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * columns: [{\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // set options available in every `autocomplete` cell of this column\n * source: ['D', 'C', 'B', 'A'],\n * // sort the `autocomplete` option in this order: D, C, B, A\n * sortByRelevance: true\n * }],\n * ```\n */\n sortByRelevance: true,\n /**\n * The `source` option sets options available in [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)\n * and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) cells.\n *\n * You can set the `source` option to one of the following:\n *\n * - An array\n * - A function\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)\n * - [`strict`](#strict)\n * - [`allowHtml`](#allowHtml)\n * - [`filter`](#filter)\n * - [`sortByRelevance`](#sortByRelevance)\n *\n * @memberof Options#\n * @type {Array|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set `source` to an array\n * columns: [{\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // set options available in every `autocomplete` cell of this column\n * source: ['A', 'B', 'C', 'D']\n * }],\n *\n * // set `source` to a function\n * columns: [{\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // for every `autocomplete` cell in this column, fetch data from an external source\n * source(query, callback) {\n * fetch('https://example.com/query?q=' + query, function(response) {\n * callback(response.items);\n * })\n * }\n * }],\n * ```\n */\n source: void 0,\n /**\n * @description\n * If the [`data`](#data) option is not set, the `startCols` option sets the initial number of empty columns.\n *\n * The `startCols` option works only in Handsontable's constructor.\n *\n * @memberof Options#\n * @type {number}\n * @default 5\n * @category Core\n *\n * @example\n * ```js\n * // start with 15 empty columns\n * startCols: 15,\n * ```\n */\n startCols: 5,\n /**\n * @description\n * If the [`data`](#data) option is not set, the `startRows` option sets the initial number of empty rows.\n *\n * The `startRows` option works only in Handsontable's constructor.\n *\n * @memberof Options#\n * @type {number}\n * @default 5\n * @category Core\n *\n * @example\n * ```js\n * // start with 15 empty rows\n * startRows: 15,\n * ```\n */\n startRows: 5,\n /**\n * @description\n * The `stretchH` option determines what happens when the declared grid width\n * is different from the calculated sum of all column widths.\n *\n * You can set the `stretchH` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------ | ----------------------------------------------------------------- |\n * | `'none'` (default) | Don't fit the grid to the container (disable column stretching) |\n * | `'last'` | Fit the grid to the container, by stretching only the last column |\n * | `'all'` | Fit the grid to the container, by stretching all columns evenly |\n *\n * Read more:\n * - [Column width: Column stretching](@/guides/columns/column-width.md#column-stretching)\n *\n * @memberof Options#\n * @type {string}\n * @default 'none'\n * @category Core\n *\n * @example\n * ```js\n * // fit the grid to the container\n * // by stretching all columns evenly\n * stretchH: 'all',\n * ```\n */\n stretchH: 'none',\n /**\n * The `strict` option configures the behavior of [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells.\n *\n * You can set the `strict` option to one of the following:\n *\n * | Setting | Mode | Description |\n * | ------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |\n * | `true` | [Strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode) | The end user: - Can only choose one of suggested values - Can't enter a custom value |\n * | `false` | [Flexible mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-flexible-mode) | The end user: - Can choose one of suggested values - Can enter a custom value |\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [`source`](#source)\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `autocomplete`\n * type: 'autocomplete',\n * // set options available in every `autocomplete` cell of this column\n * source: ['A', 'B', 'C'],\n * // values entered must match `A`, `B`, or `C`\n * strict: true\n * },\n * ],\n * ```\n */\n strict: void 0,\n /**\n * The `tableClassName` option lets you add CSS class names\n * to every Handsontable instance inside the `container` element.\n *\n * You can set the `tableClassName` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------- | ------------------------------------------------------------------------------------------ |\n * | A string | Add a single CSS class name to every Handsontable instance inside the `container` element |\n * | An array of strings | Add multiple CSS class names to every Handsontable instance inside the `container` element |\n *\n * Read more:\n * - [`currentRowClassName`](#currentRowClassName)\n * - [`currentColClassName`](#currentColClassName)\n * - [`currentHeaderClassName`](#currentHeaderClassName)\n * - [`activeHeaderClassName`](#activeHeaderClassName)\n * - [`invalidCellClassName`](#invalidCellClassName)\n * - [`placeholderCellClassName`](#placeholderCellClassName)\n * - [`readOnlyCellClassName`](#readOnlyCellClassName)\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n * - [`commentedCellClassName`](#commentedCellClassName)\n * - [`className`](#className)\n *\n * @memberof Options#\n * @type {string|string[]}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // add a `your-class-name` CSS class name\n * // to every Handsontable instance inside the `container` element\n * tableClassName: 'your-class-name',\n *\n * // add `first-class-name` and `second-class-name` CSS class names\n * // to every Handsontable instance inside the `container` element\n * tableClassName: ['first-class-name', 'second-class-name'],\n * ```\n */\n tableClassName: void 0,\n /**\n * The `tabMoves` option configures the action of the **Tab** key.\n *\n * You can set the `tabMoves` option to an object with the following properties\n * (or to a function that returns such an object):\n *\n * | Property | Type | Description |\n * | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | `row` | Number | - On pressing **Tab**, move selection `row` rows down - On pressing **Shift** + **Tab**, move selection `row` rows up |\n * | `col` | Number | - On pressing **Tab**, move selection `col` columns right - On pressing **Shift** + **Tab**, move selection `col` columns left |\n *\n * @memberof Options#\n * @type {object|Function}\n * @default {row: 0, col: 1}\n * @category Core\n *\n * @example\n * ```js\n * // on pressing Tab, move selection 2 rows down and 2 columns right\n * // on pressing Shift+Tab, move selection 2 rows up and 2 columns left\n * tabMoves: {row: 2, col: 2},\n *\n * // the same setting, as a function\n * // `event` is a DOM Event object received on pressing Tab\n * // you can use it to check whether the user pressed Tab or Shift+Tab\n * tabMoves(event) {\n * return {row: 2, col: 2};\n * },\n * ```\n */\n tabMoves: {\n row: 0,\n col: 1\n },\n /**\n * @description\n * The `title` option configures [column header](@/guides/columns/column-header.md) names.\n *\n * You can set the `title` option to a string.\n *\n * Read more:\n * - [Column header](@/guides/columns/column-header.md)\n * - [`columns`](#columns)\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the first column header name to `First name`\n * title: 'First name',\n * type: 'text',\n * },\n * {\n * // set the second column header name to `Last name`\n * title: 'Last name',\n * type: 'text',\n * }\n * ],\n * ```\n */\n title: void 0,\n /**\n * The `trimDropdown` option configures the width of the [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)\n * and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) lists.\n *\n * You can set the `trimDropdown` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ------------------------------------------------------------------------------- |\n * | `true` (default) | Make the dropdown/autocomplete list's width the same as the edited cell's width |\n * | `false` | Scale the dropdown/autocomplete list's width to the list's content |\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * // for each cell of this column\n * // make the `autocomplete` list's width the same as the edited cell's width\n * trimDropdown: true,\n * },\n * {\n * type: 'dropdown',\n * // for each cell of this column\n * // scale the `dropdown` list's width to the list's content\n * trimDropdown: false,\n * }\n * ],\n * ```\n */\n trimDropdown: true,\n /**\n * @description\n * The `trimRows` option configures the [`TrimRows`](@/api/trimRows.md) plugin.\n *\n * You can set the `trimRows` option to one of the following:\n *\n * | Setting | Description |\n * | -------------------------------- | --------------------------------------------------------------------------------------------- |\n * | `false` | Disable the [`TrimRows`](@/api/trimRows.md) plugin |\n * | `true` | Enable the [`TrimRows`](@/api/trimRows.md) plugin |\n * | An array of physical row indexes | - Enable the [`TrimRows`](@/api/trimRows.md) plugin - Trim selected rows at initialization |\n *\n * Read more:\n * - [Plugins: `TrimRows`](@/api/trimRows.md)\n * - [Row trimming](@/guides/rows/row-trimming.md)\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n * @category TrimRows\n *\n * @example\n * ```js\n * // enable the `TrimRows` plugin\n * trimRows: true,\n *\n * // enable the `TrimRows` plugin\n * // at Handsontable's initialization, trim rows 5, 10, and 15\n * trimRows: [5, 10, 15],\n * ```\n */\n trimRows: void 0,\n /**\n * The `trimWhitespace` option configures automatic whitespace removal. This option\n * affects the cell renderer and the cell editor.\n *\n * You can set the `trimWhitespace` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | --------------------------------------------------------------- |\n * | `true` (default) | Remove whitespace at the beginning and at the end of each cell |\n * | `false` | Don't remove whitespace |\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // don't remove whitespace\n * // from any cell of this column\n * trimWhitespace: false\n * }\n * ]\n * ```\n */\n trimWhitespace: true,\n /**\n * @description\n * The `type` option lets you set the [`renderer`](#renderer), [`editor`](#editor), and [`validator`](#validator)\n * options all at once, by selecting a [cell type](@/guides/cell-types/cell-type.md).\n *\n * You can set the `type` option to one of the following:\n *\n * | Cell type | Renderer, editor & validator |\n * | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | A [custom cell type](@/guides/cell-types/cell-type.md) | Renderer: your [custom cell renderer](@/guides/cell-functions/cell-renderer.md) Editor: your [custom cell editor](@/guides/cell-functions/cell-editor.md) Validator: your [custom cell validator](@/guides/cell-functions/cell-validator.md) |\n * | [`'autocomplete'`](@/guides/cell-types/autocomplete-cell-type.md) | Renderer: `AutocompleteRenderer` Editor: `AutocompleteEditor` Validator: `AutocompleteValidator` |\n * | [`'checkbox'`](@/guides/cell-types/checkbox-cell-type.md) | Renderer: `CheckboxRenderer` Editor: `CheckboxEditor` Validator: - |\n * | [`'date'`](@/guides/cell-types/date-cell-type.md) | Renderer: `DateRenderer` Editor: `DateEditor` Validator: `DateValidator` |\n * | [`'dropdown'`](@/guides/cell-types/dropdown-cell-type.md) | Renderer: `DropdownRenderer` Editor: `DropdownEditor` Validator: `DropdownValidator` |\n * | [`'handsontable'`](@/guides/cell-types/handsontable-cell-type.md) | Renderer: `AutocompleteRenderer` Editor: `HandsontableEditor` Validator: - |\n * | [`'numeric'`](@/guides/cell-types/numeric-cell-type.md) | Renderer: `NumericRenderer` Editor: `NumericEditor` Validator: `NumericValidator` |\n * | [`'password'`](@/guides/cell-types/password-cell-type.md) | Renderer: `PasswordRenderer` Editor: `PasswordEditor` Validator: - |\n * | `'text'` | Renderer: `TextRenderer` Editor: `TextEditor` Validator: - |\n * | [`'time`'](@/guides/cell-types/time-cell-type.md) | Renderer: `TimeRenderer` Editor: `TimeEditor` Validator: `TimeValidator` |\n *\n * Read more:\n * - [Cell type](@/guides/cell-types/cell-type.md)\n * - [Cell renderer](@/guides/cell-functions/cell-renderer.md)\n * - [Cell editor](@/guides/cell-functions/cell-editor.md)\n * - [Cell validator](@/guides/cell-functions/cell-validator.md)\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [`renderer`](#renderer)\n * - [`editor`](#editor)\n * - [`validator`](#validator)\n *\n * @memberof Options#\n * @type {string}\n * @default 'text'\n * @category Core\n *\n * @example\n * ```js\n * // set the `numeric` cell type for each cell of the entire grid\n * type: `'numeric'`,\n *\n * // apply the `type` option to individual columns\n * columns: [\n * {\n * // set the `autocomplete` cell type for each cell of this column\n * type: 'autocomplete'\n * },\n * {\n * // set the `myCustomCellType` cell type for each cell of this column\n * type: 'myCustomCellType'\n * }\n * ]\n * ```\n */\n type: 'text',\n /**\n * The `uncheckedTemplate` option lets you configure what value\n * an unchecked [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell has.\n *\n * You can set the `uncheckedTemplate` option to one of the following:\n *\n * | Setting | Description |\n * | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n * | `false` (default) | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is unchecked, the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns `false` |\n * | A string | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is unchecked, the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns a string of your choice |\n *\n * Read more:\n * - [Checkbox cell type: Checkbox template](@/guides/cell-types/checkbox-cell-type.md#checkbox-template)\n * - [`getDataAtCell()`](@/api/core.md#getDataAtCell)\n * - [`checkedTemplate`](#checkedTemplate)\n *\n * @memberof Options#\n * @type {boolean|string|number}\n * @default false\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set the `type` of each cell in this column to `checkbox`\n * // when unchecked, the cell's value is `false`\n * // when checked, the cell's value is `true`\n * type: 'checkbox',\n * },\n * {\n * // set the `type` of each cell in this column to `checkbox`\n * // when unchecked, the cell's value is `'No'`\n * // when checked, the cell's value is `'Yes'`\n * type: 'checkbox',\n * uncheckedTemplate: 'No'\n * checkedTemplate: 'Yes',\n * }\n * ],\n * ```\n */\n uncheckedTemplate: void 0,\n /**\n * The `undo` option configures the [`UndoRedo`](@/api/undoRedo.md) plugin.\n *\n * You can set the `undo` option to one of the following:\n *\n * | Setting | Description |\n * | ------- | -------------------------------------------------- |\n * | `true` | Enable the [`UndoRedo`](@/api/undoRedo.md) plugin |\n * | `false` | Disable the [`UndoRedo`](@/api/undoRedo.md) plugin |\n *\n * By default, the `undo` option is set to `undefined`,\n * but the [`UndoRedo`](@/api/undoRedo.md) plugin acts as enabled.\n * To disable the [`UndoRedo`](@/api/undoRedo.md) plugin completely,\n * set the `undo` option to `false`.\n *\n * Read more:\n * - [Undo and redo](@/guides/accessories-and-menus/undo-redo.md)\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @category UndoRedo\n *\n * @example\n * ```js\n * // enable the `UndoRedo` plugin\n * undo: true,\n * ```\n */\n undo: void 0,\n /**\n * @description\n * The `validator` option sets a [cell validator](@/guides/cell-functions/cell-validator.md) for a cell.\n *\n * You can set the `validator` option to one of the following:\n *\n * | Setting | Description |\n * | -------------------- | -------------------------------------------------------------------------------- |\n * | A string | A [cell validator alias](@/guides/cell-functions/cell-validator.md) |\n * | A function | Your [custom cell validator function](@/guides/cell-functions/cell-validator.md) |\n * | A regular expression | A regular expression used for cell validation |\n *\n * By setting the `validator` option to a string,\n * you can use one of the following [cell validator aliases](@/guides/cell-functions/cell-validator.md):\n *\n * | Alias | Cell validator function |\n * | ------------------- | ----------------------------------------------------------------------- |\n * | A custom alias | Your [custom cell validator](@/guides/cell-functions/cell-validator.md) |\n * | `'autocomplete'` | `AutocompleteValidator` |\n * | `'date'` | `DateValidator` |\n * | `'dropdown'` | `DropdownValidator` |\n * | `'numeric'` | `NumericValidator` |\n * | `'time'` | `TimeValidator` |\n *\n * To set the [`editor`](#editor), [`renderer`](#renderer), and [`validator`](#validator)\n * options all at once, use the [`type`](#type) option.\n *\n * Read more:\n * - [Cell validator](@/guides/cell-functions/cell-validator.md)\n * - [Cell type](@/guides/cell-types/cell-type.md)\n * - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)\n * - [`type`](#type)\n *\n * @memberof Options#\n * @type {Function|RegExp|string}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * // use a built-in `numeric` cell validator\n * validator: 'numeric'\n * },\n * {\n * // validate against a regular expression\n * validator: /^[0-9]$/\n * },\n * {\n * // add a custom cell validator function\n * validator(value, callback) {\n * ...\n * }\n * },\n * ],\n * ```\n */\n validator: void 0,\n /**\n * @description\n * The `viewportColumnRenderingOffset` option configures the number of columns\n * to be rendered outside of the grid's viewport.\n *\n * You can set the `viewportColumnRenderingOffset` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------ | ------------------------------------------------------- |\n * | `auto` (default) | Use the offset calculated automatically by Handsontable |\n * | A number | Set the offset manually |\n *\n * Read more:\n * - [Performance: Define the number of pre-rendered rows and columns](@/guides/optimization/performance.md#define-the-number-of-pre-rendered-rows-and-columns)\n *\n * @memberof Options#\n * @type {number|string}\n * @default 'auto'\n * @category Core\n *\n * @example\n * ```js\n * // render 70 columns outside of the grid's viewport\n * viewportColumnRenderingOffset: 70,\n * ```\n */\n viewportColumnRenderingOffset: 'auto',\n /**\n * @description\n * The `viewportRowRenderingOffset` option configures the number of rows\n * to be rendered outside of the grid's viewport.\n *\n * You can set the `viewportRowRenderingOffset` option to one of the following:\n *\n * | Setting | Description |\n * | ------------------ | ------------------------------------------------------- |\n * | `auto` (default) | Use the offset calculated automatically by Handsontable |\n * | A number | Set the offset manually |\n *\n * Read more:\n * - [Performance: Define the number of pre-rendered rows and columns](@/guides/optimization/performance.md#define-the-number-of-pre-rendered-rows-and-columns)\n * - [Column virtualization](@/guides/columns/column-virtualization.md)\n *\n * @memberof Options#\n * @type {number|string}\n * @default 'auto'\n * @category Core\n *\n * @example\n * ```js\n * // render 70 rows outside of the grid's viewport\n * viewportRowRenderingOffset: 70,\n * ```\n */\n viewportRowRenderingOffset: 'auto',\n /**\n * The `visibleRows` option sets the height of the [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)\n * and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) lists.\n *\n * When the number of list options exceeds the `visibleRows` number, a scrollbar appears.\n *\n * Read more:\n * - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)\n * - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)\n *\n * @memberof Options#\n * @type {number}\n * @default 10\n * @category Core\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * // set the `autocomplete` list's height to 15 options\n * // for each cell of this column\n * visibleRows: 15,\n * },\n * {\n * type: 'dropdown',\n * // set the `dropdown` list's height to 5 options\n * // for each cell of this column\n * visibleRows: 5,\n * }\n * ],\n * ```\n */\n visibleRows: 10,\n /**\n * The `width` option configures the width of your grid.\n *\n * You can set the `width` option to one of the following:\n *\n * | Setting | Example |\n * | -------------------------------------------------------------------------- | ------------------------- |\n * | A number of pixels | `width: 500` |\n * | A string with a [CSS unit](https://www.w3schools.com/cssref/css_units.asp) | `width: '75vw'` |\n * | A function that returns a valid number or string | `width() { return 500; }` |\n *\n * Read more:\n * - [Grid size](@/guides/getting-started/grid-size.md)\n *\n * @memberof Options#\n * @type {number|string|Function}\n * @default undefined\n * @category Core\n *\n * @example\n * ```js\n * // set the grid's width to 500px\n * width: 500,\n *\n * // set the grid's width to 75vw\n * width: '75vw',\n *\n * // set the grid's width to 500px, using a function\n * width() {\n * return 500;\n * },\n * ```\n */\n width: void 0,\n /**\n * The `wordWrap` option configures whether content that exceeds a column's width is wrapped or not.\n *\n * You can set the `wordWrap` option to one of the following:\n *\n * | Setting | Description |\n * | ---------------- | ------------------------------------------------------- |\n * | `true` (default) | If content exceeds the column's width, wrap the content |\n * | `false` | Don't wrap content |\n *\n * To style cells that don't wrap content, use the [`noWordWrapClassName`](#noWordWrapClassName) option.\n *\n * Read more:\n * - [`noWordWrapClassName`](#noWordWrapClassName)\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n * @category Core\n *\n * @example\n * ```js\n * // set column width for every column of the entire grid\n * colWidths: 100,\n *\n * columns: [\n * {\n * // don't wrap content in this column\n * wordWrap: false,\n * },\n * {\n * // if content exceeds this column's width, wrap the content\n * wordWrap: true,\n * }\n * ],\n * ```\n */\n wordWrap: true\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n };\n});","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptor.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.object.get-own-property-descriptors.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { extendByMetaType } from \"../utils.mjs\";\nimport metaSchemaFactory from \"../metaSchema.mjs\";\n/**\n * @typedef {Options} TableMeta\n */\n/**\n * @returns {TableMeta} Returns an empty object. The holder for global meta object.\n */\nfunction createTableMetaEmptyClass() {\n return /*#__PURE__*/_createClass(function TableMeta() {\n _classCallCheck(this, TableMeta);\n });\n}\n\n/**\n * The global meta object is a root of all default settings, which are recognizable by Handsontable.\n * Other layers are inherited from this object. Adding, removing, or changing property in that\n * object has a direct reflection to all layers such as: TableMeta, ColumnMeta, or CellMeta layers.\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\nvar GlobalMeta = /*#__PURE__*/function () {\n function GlobalMeta(hot) {\n _classCallCheck(this, GlobalMeta);\n /**\n * An alias for the constructor. Necessary for inheritance for creating new layers.\n *\n * @type {TableMeta}\n */\n this.metaCtor = createTableMetaEmptyClass();\n /**\n * Main object (prototype of the internal TableMeta class), holder for all default settings.\n *\n * @type {object}\n */\n this.meta = this.metaCtor.prototype;\n extend(this.meta, metaSchemaFactory());\n this.meta.instance = hot;\n }\n\n /**\n * Gets constructor of the global meta object. Necessary for inheritance for creating the next meta layers.\n *\n * @returns {Function}\n */\n _createClass(GlobalMeta, [{\n key: \"getMetaConstructor\",\n value: function getMetaConstructor() {\n return this.metaCtor;\n }\n\n /**\n * Gets settings object for this layer.\n *\n * @returns {object}\n */\n }, {\n key: \"getMeta\",\n value: function getMeta() {\n return this.meta;\n }\n\n /**\n * Updates global settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateMeta\",\n value: function updateMeta(settings) {\n var _settings$type;\n extend(this.meta, settings);\n extendByMetaType(this.meta, _objectSpread(_objectSpread({}, settings), {}, {\n type: (_settings$type = settings.type) !== null && _settings$type !== void 0 ? _settings$type : this.meta.type\n }), settings);\n }\n }]);\n return GlobalMeta;\n}();\nexport { GlobalMeta as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { extendByMetaType } from \"../utils.mjs\";\n/**\n * The table meta object is a layer that keeps all settings of the Handsontable that was passed in\n * the constructor. That layer contains all default settings inherited from the GlobalMeta layer\n * merged with settings passed by the developer. Adding, removing, or changing property in that\n * object has no direct reflection on any other layers.\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\nvar TableMeta = /*#__PURE__*/function () {\n function TableMeta(globalMeta) {\n _classCallCheck(this, TableMeta);\n var MetaCtor = globalMeta.getMetaConstructor();\n\n /**\n * Main object (instance of the internal TableMeta class from GlobalMeta), holder for all settings defined in the table scope.\n *\n * @type {TableMeta}\n */\n this.meta = new MetaCtor();\n }\n\n /**\n * Gets settings object for this layer.\n *\n * @returns {TableMeta}\n */\n _createClass(TableMeta, [{\n key: \"getMeta\",\n value: function getMeta() {\n return this.meta;\n }\n\n /**\n * Updates table settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateMeta\",\n value: function updateMeta(settings) {\n extend(this.meta, settings);\n extendByMetaType(this.meta, settings, settings);\n }\n }]);\n return TableMeta;\n}();\nexport { TableMeta as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { arrayFilter } from \"../../helpers/array.mjs\";\nimport { assert, isUnsignedNumber, isNullish } from \"./utils.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @class LazyFactoryMap\n *\n * The LazyFactoryMap object holds key-value pairs in the structure similar to the\n * regular Map. Once created, items can be moved around a grid depending on the operations\n * performed on that grid - adding or removing rows. The collection requires \"key\"\n * to be a zero-based index.\n *\n * It's essential to notice that the \"key\" index under which the item was created\n * is volatile. After altering the grid, the \"key\" index can change.\n *\n * Having created N items with corresponding example data where the data has 10\n * holes (`undefined` values) within (that's why internal storage index counts from 10).\n * +------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/12 | 3/13 | 4/14 | Keys (volatile zero-based index / internal storage index)\n * +------+------+------+------+------+.\n * │ │ │ │ │\n * +------+------+------+------+------+.\n * | AAA | BBB | CCC | DDD | EEE | Data\n * +------+------+------+------+------+.\n *\n * Map.obtain(0) // returns \"AAA\"\n * map.obtain(2) // returns \"CCC\".\n *\n * After inserting 2 new rows, keys that hold the data positioned after the place\n * where the new rows are added are upshifted by 2.\n * │\n * │ Insert 2 rows\n * \\│/\n * +------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/12 | 3/13 | 4/14 | Keys before\n * +------+------+------+------+------+.\n *\n * / 2 new rows \\\n * +------+------+------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/15 | 3/16 | 4/12 | 5/13 | 6/14 | Keys after\n * +------+------+------+------+------+------+------+.\n * │ │ │ │ │ │ │\n * │ │ └──────┼──────┼──────┼┐ │\n * │ │ └──────┼──────┼┼────┼┐\n * │ │ ┌─────────────┘ ││ ││\n * │ │ │ ┌─────────────┘│ ││\n * │ │ │ │ ┌───────┼────┘│\n * │ │ │ │ │ │ │\n * +------+------+------+------+------+------+------+.\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n *\n * Now at index 2 and 3 we have access to new items.\n *\n * map.obtain(2) // returns new value \"FFF\" for newly created row.\n * map.obtain(4) // index shifted by 2 has access to the old \"CCC\" value, as before inserting.\n *\n * after removing 4 rows, keys that hold the data positioned after the place where the\n * rows are removed are downshifted by 4.\n * │\n * │ Remove 4 rows\n * ├───────────────────────────┐\n * \\│/ │\n * +------+------+------+------+------+------+------+\n * | 0/10 | 1/11 | 2/15 | 3/16 | 4/12 | 5/13 | 6/14 | Keys after\n * +------+------+------+------+------+------+------+\n * │ │ │ │ │ │ │\n * │ │ └──────┼──────┼──────┼┐ │\n * │ │ └──────┼──────┼┼────┼┐\n * │ │ ┌─────────────┘ ││ ││\n * │ │ │ ┌─────────────┘│ ││\n * │ │ │ │ ┌───────┼────┘│\n * │ │ │ │ │ │ │\n * +------+------+------+------+------+------+------+\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n *\n * +------+------+------+\n * | 0/10 | 1/13 | 2/14 | Keys after\n * +------+------+------+\n * │ │ │\n * │ │ └─────────────┐\n * │ └────────────┐ │\n * │ │ │\n * │ │ │\n * │ │ │\n * │ │ │\n * +------+------+------+------+------+------+------+\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n * /│\\ /│\\ /│\\ /│\\\n * └──┬──┘ └──┬──┘\n * This data is marked as \"hole\" which\n * means that can be replaced by new item\n * when that will be created.\n *\n * map.obtain(2) // returns the value (\"EEE\") as it should. Access to the value is\n * // changed (the key was downshifted). However, the internal index has not changed,\n * // which means that the data does not need to be changed (spliced) too.\n *\n * After previous remove operation which creates some \"holes\" obtaining new\n * items replaces that \"holes\" as follows:\n *\n * // Obtains new item\n * map.obtain(90) // Returns \"NEW\" value\n *\n * +------+------+------+...+------+\n * | 0/10 | 1/13 | 2/14 | | 90/0 | Keys after\n * +------+------+------+...+------+\n * │ │ │ │\n * │ │ └──────────┼────────────┐\n * │ └─────────────────┼─────┐ │\n * └──────────┐ │ │ │\n * │ │ │ │\n * ┌──────────┼──────────────┘ │ │\n * │ │ │ │\n * +------+...+------+------+------+------+------+-----+\n * | NEW | | AAA | BBB | CCC | DDD | EEE | FFF | Data\n * +------+...+------+------+------+------+------+-----+\n * /│\\\n * │\n * The first \"hole\" (at index 0) item is permanently removed and replaced by a new item.\n * The hole index is taken from the hole collection which act as FIFO (First In First Out).\n */\n/* eslint-enable jsdoc/require-description-complete-sentence */\nvar LazyFactoryMap = /*#__PURE__*/function (_Symbol$iterator) {\n function LazyFactoryMap(valueFactory) {\n _classCallCheck(this, LazyFactoryMap);\n this.valueFactory = valueFactory;\n /**\n * An array which contains data.\n *\n * @type {Array}\n */\n this.data = [];\n /**\n * An array of indexes where the key of the array is mapped to the value which points to the\n * specific position of the data array.\n *\n * @type {number[]}\n */\n this.index = [];\n /**\n * The collection of indexes that points to the data items which can be replaced by obtaining new\n * ones. The \"holes\" are an intended effect of deleting entries.\n *\n * The idea of \"holes\" generally allows us to not modify the \"data\" structure while removing\n * items from the collection.\n *\n * @type {Set}\n */\n this.holes = new Set();\n }\n\n /**\n * Gets or if data not exist creates and returns new data.\n *\n * @param {number} key The item key as zero-based index.\n * @returns {*}\n */\n _createClass(LazyFactoryMap, [{\n key: \"obtain\",\n value: function obtain(key) {\n assert(function () {\n return isUnsignedNumber(key);\n }, 'Expecting an unsigned number.');\n var dataIndex = this._getStorageIndexByKey(key);\n var result;\n if (dataIndex >= 0) {\n result = this.data[dataIndex];\n if (result === void 0) {\n result = this.valueFactory(key);\n this.data[dataIndex] = result;\n }\n } else {\n result = this.valueFactory(key);\n if (this.holes.size > 0) {\n var reuseIndex = this.holes.values().next().value; // Gets first item from the collection\n\n this.holes.delete(reuseIndex);\n this.data[reuseIndex] = result;\n this.index[key] = reuseIndex;\n } else {\n this.data.push(result);\n this.index[key] = this.data.length - 1;\n }\n }\n return result;\n }\n\n /**\n * Inserts an empty data to the map. This method creates an empty space for obtaining\n * new data.\n *\n * @param {number} key The key as volatile zero-based index at which to begin inserting space for new data.\n * @param {number} [amount=1] Ammount of data to insert.\n */\n }, {\n key: \"insert\",\n value: function insert(key) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n assert(function () {\n return isUnsignedNumber(key) || isNullish(key);\n }, 'Expecting an unsigned number or null/undefined argument.');\n var newIndexes = [];\n var dataLength = this.data.length;\n for (var i = 0; i < amount; i++) {\n newIndexes.push(dataLength + i);\n this.data.push(void 0);\n }\n var insertionIndex = isNullish(key) ? this.index.length : key;\n this.index = [].concat(_toConsumableArray(this.index.slice(0, insertionIndex)), newIndexes, _toConsumableArray(this.index.slice(insertionIndex)));\n }\n\n /**\n * Removes (soft remove) data from \"index\" and according to the amount of data.\n *\n * @param {number} key The key as volatile zero-based index at which to begin removing the data.\n * @param {number} [amount=1] Ammount data to remove.\n */\n }, {\n key: \"remove\",\n value: function remove(key) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n assert(function () {\n return isUnsignedNumber(key) || isNullish(key);\n }, 'Expecting an unsigned number or null/undefined argument.');\n var removed = this.index.splice(isNullish(key) ? this.index.length - amount : key, amount);\n for (var i = 0; i < removed.length; i++) {\n var removedIndex = removed[i];\n if (typeof removedIndex === 'number') {\n this.holes.add(removedIndex);\n }\n }\n }\n\n /**\n * Returns the size of the data which this map holds.\n *\n * @returns {number}\n */\n }, {\n key: \"size\",\n value: function size() {\n return this.data.length - this.holes.size;\n }\n\n /**\n * Returns a new Iterator object that contains the values for each item in the LazyMap object.\n *\n * @returns {Iterator}\n */\n }, {\n key: \"values\",\n value: function values() {\n var _this = this;\n return arrayFilter(this.data, function (_, index) {\n return !_this.holes.has(index);\n })[Symbol.iterator]();\n }\n\n /**\n * Returns a new Iterator object that contains an array of `[index, value]` for each item in the LazyMap object.\n *\n * @returns {Iterator}\n */\n }, {\n key: \"entries\",\n value: function entries() {\n var validEntries = [];\n for (var i = 0; i < this.data.length; i++) {\n var keyIndex = this._getKeyByStorageIndex(i);\n if (keyIndex !== -1) {\n validEntries.push([keyIndex, this.data[i]]);\n }\n }\n var dataIndex = 0;\n return {\n next: function next() {\n if (dataIndex < validEntries.length) {\n var value = validEntries[dataIndex];\n dataIndex += 1;\n return {\n value: value,\n done: false\n };\n }\n return {\n done: true\n };\n }\n };\n }\n\n /**\n * Clears the map.\n */\n }, {\n key: \"clear\",\n value: function clear() {\n this.data = [];\n this.index = [];\n this.holes.clear();\n }\n\n /**\n * Gets storage index calculated from the key associated with the specified value.\n *\n * @param {number} key Volatile zero-based index.\n * @returns {number} Returns index 0-N or -1 if no storage index found.\n */\n }, {\n key: \"_getStorageIndexByKey\",\n value: function _getStorageIndexByKey(key) {\n return this.index.length > key ? this.index[key] : -1;\n }\n\n /**\n * Gets the key associated with the specified value calculated from storage index.\n *\n * @param {number} dataIndex Zero-based storage index.\n * @returns {number} Returns index 0-N or -1 if no key found.\n */\n }, {\n key: \"_getKeyByStorageIndex\",\n value: function _getKeyByStorageIndex(dataIndex) {\n return this.index.indexOf(dataIndex);\n }\n\n /**\n * Makes this object iterable.\n *\n * @returns {Iterator}\n */\n }, {\n key: _Symbol$iterator,\n value: function value() {\n return this.entries();\n }\n }]);\n return LazyFactoryMap;\n}(Symbol.iterator);\nexport { LazyFactoryMap as default };","import \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { columnFactory, extendByMetaType } from \"../utils.mjs\";\nimport LazyFactoryMap from \"../lazyFactoryMap.mjs\";\n/**\n * List of props which have to be cleared in the column meta-layer. That props have a\n * different meaning when using in column meta.\n *\n * @type {string[]}\n */\nvar COLUMNS_PROPS_CONFLICTS = ['data', 'width'];\n\n/**\n * The column meta object is a root of all settings defined in the column property of the Handsontable\n * settings. Each column in the Handsontable is associated with a unique meta object which is managed by\n * this layer. Adding, removing, or changing property in that object has a direct reflection only for\n * the CellMeta layer. The reflection will be visible only if the property doesn't exist in the lower\n * layers (prototype lookup).\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\nvar ColumnMeta = /*#__PURE__*/function () {\n function ColumnMeta(globalMeta) {\n var _this = this;\n _classCallCheck(this, ColumnMeta);\n /**\n * Reference to the GlobalMeta layer. While creating new column meta objects, all new objects\n * inherit properties from the GlobalMeta layer.\n *\n * @type {GlobalMeta}\n */\n this.globalMeta = globalMeta;\n /**\n * The LazyFactoryMap structure, holder for column meta objects where each column meta is\n * stored under the physical column index.\n *\n * @type {LazyFactoryMap}\n */\n this.metas = new LazyFactoryMap(function () {\n return _this._createMeta();\n });\n }\n\n /**\n * Updates column meta object by merging settings with the current state.\n *\n * @param {number} physicalColumn The physical column index which points what column meta object is updated.\n * @param {object} settings An object to merge with.\n */\n _createClass(ColumnMeta, [{\n key: \"updateMeta\",\n value: function updateMeta(physicalColumn, settings) {\n var meta = this.getMeta(physicalColumn);\n extend(meta, settings);\n extendByMetaType(meta, settings);\n }\n\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} amount An amount of columns to add.\n */\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn, amount) {\n this.metas.insert(physicalColumn, amount);\n }\n\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} amount An amount columns to remove.\n */\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn, amount) {\n this.metas.remove(physicalColumn, amount);\n }\n\n /**\n * Gets settings object for this layer.\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n }, {\n key: \"getMeta\",\n value: function getMeta(physicalColumn) {\n return this.metas.obtain(physicalColumn);\n }\n\n /**\n * Gets constructor of the column meta object. Necessary for inheritance - creating the next meta layers.\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {Function}\n */\n }, {\n key: \"getMetaConstructor\",\n value: function getMetaConstructor(physicalColumn) {\n return this.metas.obtain(physicalColumn).constructor;\n }\n\n /**\n * Clears all saved column meta objects.\n */\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.metas.clear();\n }\n\n /**\n * Creates and returns new column meta object with properties inherited from the global meta layer.\n *\n * @private\n * @returns {object}\n */\n }, {\n key: \"_createMeta\",\n value: function _createMeta() {\n return columnFactory(this.globalMeta.getMetaConstructor(), COLUMNS_PROPS_CONFLICTS).prototype;\n }\n }]);\n return ColumnMeta;\n}();\nexport { ColumnMeta as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { extendByMetaType, assert, isUnsignedNumber } from \"../utils.mjs\";\nimport LazyFactoryMap from \"../lazyFactoryMap.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * @class CellMeta\n *\n * The cell meta object is a root of all settings defined for the specific cell rendered by the\n * Handsontable. Each cell meta inherits settings from higher layers. When a property doesn't\n * exist in that layer, it is looked up through a prototype to the highest layer. Starting\n * from CellMeta -> ColumnMeta and ending to GlobalMeta, which stores default settings. Adding,\n * removing, or changing property in that object has no direct reflection on any other layers.\n *\n * +-------------+\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+\n * │\n * │\n * \\│/\n * +-------------+\n * │ CellMeta │\n * │ (instance) │\n * +-------------+\n */\n/* eslint-enable jsdoc/require-description-complete-sentence */\nvar CellMeta = /*#__PURE__*/function () {\n function CellMeta(columnMeta) {\n var _this = this;\n _classCallCheck(this, CellMeta);\n /**\n * Reference to the ColumnMeta layer. While creating new cell meta objects, all new objects\n * inherit properties from the ColumnMeta layer.\n *\n * @type {ColumnMeta}\n */\n this.columnMeta = columnMeta;\n /**\n * Holder for cell meta objects, organized as a grid of LazyFactoryMap of LazyFactoryMaps.\n * The access to the cell meta object is done through access to the row defined by the physical\n * row index and then by accessing the second LazyFactory Map under the physical column index.\n *\n * @type {LazyFactoryMap>}\n */\n this.metas = new LazyFactoryMap(function () {\n return _this._createRow();\n });\n }\n\n /**\n * Updates cell meta object by merging settings with the current state.\n *\n * @param {number} physicalRow The physical row index which points what cell meta object is updated.\n * @param {number} physicalColumn The physical column index which points what cell meta object is updated.\n * @param {object} settings An object to merge with.\n */\n _createClass(CellMeta, [{\n key: \"updateMeta\",\n value: function updateMeta(physicalRow, physicalColumn, settings) {\n var meta = this.getMeta(physicalRow, physicalColumn);\n extend(meta, settings);\n extendByMetaType(meta, settings);\n }\n\n /**\n * Creates one or more rows at specific position.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is added.\n * @param {number} amount An amount of rows to add.\n */\n }, {\n key: \"createRow\",\n value: function createRow(physicalRow, amount) {\n this.metas.insert(physicalRow, amount);\n }\n\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} amount An amount of columns to add.\n */\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn, amount) {\n for (var i = 0; i < this.metas.size(); i++) {\n this.metas.obtain(i).insert(physicalColumn, amount);\n }\n }\n\n /**\n * Removes one or more rows from the collection.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is removed.\n * @param {number} amount An amount of rows to remove.\n */\n }, {\n key: \"removeRow\",\n value: function removeRow(physicalRow, amount) {\n this.metas.remove(physicalRow, amount);\n }\n\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} amount An amount of columns to remove.\n */\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn, amount) {\n for (var i = 0; i < this.metas.size(); i++) {\n this.metas.obtain(i).remove(physicalColumn, amount);\n }\n }\n\n /**\n * Gets settings object for this layer.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} [key] If the key exists its value will be returned, otherwise the whole cell meta object.\n * @returns {object}\n */\n }, {\n key: \"getMeta\",\n value: function getMeta(physicalRow, physicalColumn, key) {\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n if (key === void 0) {\n return cellMeta;\n }\n return cellMeta[key];\n }\n\n /**\n * Sets settings object for this layer defined by \"key\" property.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to set.\n * @param {*} value Value to save.\n */\n }, {\n key: \"setMeta\",\n value: function setMeta(physicalRow, physicalColumn, key, value) {\n var _cellMeta$_automatica;\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n (_cellMeta$_automatica = cellMeta._automaticallyAssignedMetaProps) === null || _cellMeta$_automatica === void 0 ? void 0 : _cellMeta$_automatica.delete(key);\n cellMeta[key] = value;\n }\n\n /**\n * Removes a property defined by the \"key\" argument from the cell meta object.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to remove.\n */\n }, {\n key: \"removeMeta\",\n value: function removeMeta(physicalRow, physicalColumn, key) {\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n delete cellMeta[key];\n }\n\n /**\n * Returns all cell meta objects that were created during the Handsontable operation. As cell meta\n * objects are created lazy, the length of the returned collection depends on how and when the\n * table has asked for access to that meta objects.\n *\n * @returns {object[]}\n */\n }, {\n key: \"getMetas\",\n value: function getMetas() {\n var metas = [];\n var rows = Array.from(this.metas.values());\n for (var row = 0; row < rows.length; row++) {\n metas.push.apply(metas, _toConsumableArray(rows[row].values()));\n }\n return metas;\n }\n\n /**\n * Returns all cell meta objects that were created during the Handsontable operation but for\n * specific row index.\n *\n * @param {number} physicalRow The physical row index.\n * @returns {object[]}\n */\n }, {\n key: \"getMetasAtRow\",\n value: function getMetasAtRow(physicalRow) {\n assert(function () {\n return isUnsignedNumber(physicalRow);\n }, 'Expecting an unsigned number.');\n var rowsMeta = new Map(this.metas);\n return rowsMeta.has(physicalRow) ? Array.from(rowsMeta.get(physicalRow).values()) : [];\n }\n\n /**\n * Clears all saved cell meta objects.\n */\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.metas.clear();\n }\n\n /**\n * Creates and returns new structure for cell meta objects stored in columnar axis.\n *\n * @private\n * @returns {object}\n */\n }, {\n key: \"_createRow\",\n value: function _createRow() {\n var _this2 = this;\n return new LazyFactoryMap(function (physicalColumn) {\n return _this2._createMeta(physicalColumn);\n });\n }\n\n /**\n * Creates and returns new cell meta object with properties inherited from the column meta layer.\n *\n * @private\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n }, {\n key: \"_createMeta\",\n value: function _createMeta(physicalColumn) {\n var ColumnMeta = this.columnMeta.getMetaConstructor(physicalColumn);\n return new ColumnMeta();\n }\n }]);\n return CellMeta;\n}();\nexport { CellMeta as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport GlobalMeta from \"./metaLayers/globalMeta.mjs\";\nimport TableMeta from \"./metaLayers/tableMeta.mjs\";\nimport ColumnMeta from \"./metaLayers/columnMeta.mjs\";\nimport CellMeta from \"./metaLayers/cellMeta.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\n/**\n * With the Meta Manager class, it can be possible to manage with meta objects for different layers in\n * one place. All coordinates used to fetch, updating, removing, or creating rows or columns have to\n * be passed as physical values.\n *\n * The diagram of the meta layers:\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n *\n * A more detailed description of the specific layers can be found in the \"metaLayers/\" modules description.\n */\nvar MetaManager = /*#__PURE__*/function () {\n function MetaManager(hot) {\n var _this = this;\n var customSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var metaMods = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _classCallCheck(this, MetaManager);\n /**\n * @type {Handsontable}\n */\n this.hot = hot;\n /**\n * @type {GlobalMeta}\n */\n this.globalMeta = new GlobalMeta(hot);\n /**\n * @type {TableMeta}\n */\n this.tableMeta = new TableMeta(this.globalMeta);\n /**\n * @type {ColumnMeta}\n */\n this.columnMeta = new ColumnMeta(this.globalMeta);\n /**\n * @type {CellMeta}\n */\n this.cellMeta = new CellMeta(this.columnMeta);\n metaMods.forEach(function (ModifierClass) {\n return new ModifierClass(_this);\n });\n this.globalMeta.updateMeta(customSettings);\n }\n\n /**\n * Gets the global meta object that is a root of all default settings, which are recognizable by Handsontable.\n * Other layers inherites all properties from this. Adding, removing, or changing property in that\n * object has a direct reflection to all layers.\n *\n * @returns {object}\n */\n _createClass(MetaManager, [{\n key: \"getGlobalMeta\",\n value: function getGlobalMeta() {\n return this.globalMeta.getMeta();\n }\n\n /**\n * Updates global settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateGlobalMeta\",\n value: function updateGlobalMeta(settings) {\n this.globalMeta.updateMeta(settings);\n }\n\n /**\n * Gets settings object that was passed in the Handsontable constructor. That layer contains all\n * default settings inherited from the GlobalMeta layer merged with settings passed by the developer.\n * Adding, removing, or changing property in that object has no direct reflection on any other layers.\n *\n * @returns {TableMeta}\n */\n }, {\n key: \"getTableMeta\",\n value: function getTableMeta() {\n return this.tableMeta.getMeta();\n }\n\n /**\n * Updates table settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateTableMeta\",\n value: function updateTableMeta(settings) {\n this.tableMeta.updateMeta(settings);\n }\n\n /**\n * Gets column meta object that is a root of all settings defined in the column property of the Handsontable\n * settings. Each column in the Handsontable is associated with a unique meta object which identified by\n * the physical column index. Adding, removing, or changing property in that object has a direct reflection\n * only for the CellMeta layer. The reflection will be visible only if the property doesn't exist in the lower\n * layers (prototype lookup).\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n }, {\n key: \"getColumnMeta\",\n value: function getColumnMeta(physicalColumn) {\n return this.columnMeta.getMeta(physicalColumn);\n }\n\n /**\n * Updates column meta object by merging settings with the current state.\n *\n * @param {number} physicalColumn The physical column index which points what column meta object is updated.\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateColumnMeta\",\n value: function updateColumnMeta(physicalColumn, settings) {\n this.columnMeta.updateMeta(physicalColumn, settings);\n }\n\n /**\n * Gets the cell meta object that is a root of all settings defined for the specific cell rendered by\n * the Handsontable. Each cell meta inherits settings from higher layers. When a property doesn't\n * exist in that layer, it is looked up through a prototype to the highest layer. Starting\n * from CellMeta -> ColumnMeta and ending to GlobalMeta, which stores default settings. Adding,\n * removing, or changing property in that object has no direct reflection on any other layers.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {object} options Additional options that are used to extend the cell meta object.\n * @param {number} options.visualRow The visual row index of the currently requested cell meta object.\n * @param {number} options.visualColumn The visual column index of the currently requested cell meta object.\n * @returns {object}\n */\n }, {\n key: \"getCellMeta\",\n value: function getCellMeta(physicalRow, physicalColumn, _ref) {\n var visualRow = _ref.visualRow,\n visualColumn = _ref.visualColumn;\n var cellMeta = this.cellMeta.getMeta(physicalRow, physicalColumn);\n cellMeta.visualRow = visualRow;\n cellMeta.visualCol = visualColumn;\n cellMeta.row = physicalRow;\n cellMeta.col = physicalColumn;\n this.runLocalHooks('afterGetCellMeta', cellMeta);\n return cellMeta;\n }\n\n /**\n * Gets a value (defined by the `key` property) from the cell meta object.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key Defines the value that will be returned from the cell meta object.\n * @returns {*}\n */\n }, {\n key: \"getCellMetaKeyValue\",\n value: function getCellMetaKeyValue(physicalRow, physicalColumn, key) {\n if (typeof key !== 'string') {\n throw new Error('The passed cell meta object key is not a string');\n }\n return this.cellMeta.getMeta(physicalRow, physicalColumn, key);\n }\n\n /**\n * Sets settings object for cell meta object defined by \"key\" property.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to set.\n * @param {*} value Value to save.\n */\n }, {\n key: \"setCellMeta\",\n value: function setCellMeta(physicalRow, physicalColumn, key, value) {\n this.cellMeta.setMeta(physicalRow, physicalColumn, key, value);\n }\n\n /**\n * Updates cell meta object by merging settings with the current state.\n *\n * @param {number} physicalRow The physical row index which points what cell meta object is updated.\n * @param {number} physicalColumn The physical column index which points what cell meta object is updated.\n * @param {object} settings An object to merge with.\n */\n }, {\n key: \"updateCellMeta\",\n value: function updateCellMeta(physicalRow, physicalColumn, settings) {\n this.cellMeta.updateMeta(physicalRow, physicalColumn, settings);\n }\n\n /**\n * Removes a property defined by the \"key\" argument from the cell meta object.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to remove.\n */\n }, {\n key: \"removeCellMeta\",\n value: function removeCellMeta(physicalRow, physicalColumn, key) {\n this.cellMeta.removeMeta(physicalRow, physicalColumn, key);\n }\n\n /**\n * Returns all cell meta objects that were created during the Handsontable operation. As cell meta\n * objects are created lazy, the length of the returned collection depends on how and when the\n * table has asked for access to that meta objects.\n *\n * @returns {object[]}\n */\n }, {\n key: \"getCellsMeta\",\n value: function getCellsMeta() {\n return this.cellMeta.getMetas();\n }\n\n /**\n * Returns all cell meta objects that were created during the Handsontable operation but for\n * specyfic row index.\n *\n * @param {number} physicalRow The physical row index.\n * @returns {object[]}\n */\n }, {\n key: \"getCellsMetaAtRow\",\n value: function getCellsMetaAtRow(physicalRow) {\n return this.cellMeta.getMetasAtRow(physicalRow);\n }\n\n /**\n * Creates one or more rows at specific position.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is added.\n * @param {number} [amount=1] An amount of rows to add.\n */\n }, {\n key: \"createRow\",\n value: function createRow(physicalRow) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.createRow(physicalRow, amount);\n }\n\n /**\n * Removes one or more rows from the collection.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is removed.\n * @param {number} [amount=1] An amount rows to remove.\n */\n }, {\n key: \"removeRow\",\n value: function removeRow(physicalRow) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.removeRow(physicalRow, amount);\n }\n\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} [amount=1] An amount of columns to add.\n */\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.createColumn(physicalColumn, amount);\n this.columnMeta.createColumn(physicalColumn, amount);\n }\n\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} [amount=1] An amount of columns to remove.\n */\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.removeColumn(physicalColumn, amount);\n this.columnMeta.removeColumn(physicalColumn, amount);\n }\n\n /**\n * Clears all saved cell meta objects. It keeps column meta, table meta, and global meta intact.\n */\n }, {\n key: \"clearCellsCache\",\n value: function clearCellsCache() {\n this.cellMeta.clearCache();\n }\n\n /**\n * Clears all saved cell and columns meta objects.\n */\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.cellMeta.clearCache();\n this.columnMeta.clearCache();\n }\n }]);\n return MetaManager;\n}();\nexport { MetaManager as default };\nmixin(MetaManager, localHooks);","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport Hooks from \"../../../pluginHooks.mjs\";\nimport { hasOwnProperty } from \"../../../helpers/object.mjs\";\nimport { isFunction } from \"../../../helpers/function.mjs\";\n/**\n * @class DynamicCellMetaMod\n *\n * The `DynamicCellMetaMod` modifier allows for extending cell meta objects\n * (returned by `getCellMeta()` from `MetaManager`)\n * by user-specific properties.\n *\n * The user-specific properties can be added and changed dynamically,\n * either by Handsontable's hooks (`beforeGetCellMeta` and`afterGetCellMeta`),\n * or by Handsontable's `cells` option.\n *\n * The `getCellMeta()` method is used widely throughout the source code.\n * To boost the method's execution time,\n * the logic is triggered only once per one Handsontable slow render cycle.\n */\nexport var DynamicCellMetaMod = /*#__PURE__*/function () {\n function DynamicCellMetaMod(metaManager) {\n var _this = this;\n _classCallCheck(this, DynamicCellMetaMod);\n /**\n * @type {MetaManager}\n */\n this.metaManager = metaManager;\n /**\n * @type {Map}\n */\n this.metaSyncMemo = new Map();\n metaManager.addLocalHook('afterGetCellMeta', function (cellMeta) {\n return _this.extendCellMeta(cellMeta);\n });\n Hooks.getSingleton().add('beforeRender', function (forceFullRender) {\n if (forceFullRender) {\n _this.metaSyncMemo.clear();\n }\n }, this.metaManager.hot);\n }\n\n /**\n * Extends the cell meta object by user-specific properties.\n *\n * The cell meta object can be extended dynamically,\n * either by Handsontable's hooks (`beforeGetCellMeta` and`afterGetCellMeta`),\n * or by Handsontable's `cells` option.\n *\n * To boost performance, the extending process is triggered only once per one slow Handsontable render cycle.\n *\n * @param {object} cellMeta The cell meta object.\n */\n _createClass(DynamicCellMetaMod, [{\n key: \"extendCellMeta\",\n value: function extendCellMeta(cellMeta) {\n var _this$metaSyncMemo$ge;\n var physicalRow = cellMeta.row,\n physicalColumn = cellMeta.col;\n if ((_this$metaSyncMemo$ge = this.metaSyncMemo.get(physicalRow)) !== null && _this$metaSyncMemo$ge !== void 0 && _this$metaSyncMemo$ge.has(physicalColumn)) {\n return;\n }\n var visualRow = cellMeta.visualRow,\n visualCol = cellMeta.visualCol;\n var hot = this.metaManager.hot;\n var prop = hot.colToProp(visualCol);\n cellMeta.prop = prop;\n hot.runHooks('beforeGetCellMeta', visualRow, visualCol, cellMeta);\n\n // extend a `type` value, added or changed in the `beforeGetCellMeta` hook\n var cellType = hasOwnProperty(cellMeta, 'type') ? cellMeta.type : null;\n var cellSettings = isFunction(cellMeta.cells) ? cellMeta.cells(physicalRow, physicalColumn, prop) : null;\n if (cellType) {\n if (cellSettings) {\n var _cellSettings$type;\n cellSettings.type = (_cellSettings$type = cellSettings.type) !== null && _cellSettings$type !== void 0 ? _cellSettings$type : cellType;\n } else {\n cellSettings = {\n type: cellType\n };\n }\n }\n if (cellSettings) {\n this.metaManager.updateCellMeta(physicalRow, physicalColumn, cellSettings);\n }\n hot.runHooks('afterGetCellMeta', visualRow, visualCol, cellMeta);\n if (!this.metaSyncMemo.has(physicalRow)) {\n this.metaSyncMemo.set(physicalRow, new Set());\n }\n this.metaSyncMemo.get(physicalRow).add(physicalColumn);\n }\n }]);\n return DynamicCellMetaMod;\n}();","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * @class ExtendMetaPropertiesMod\n */\nexport var ExtendMetaPropertiesMod = /*#__PURE__*/function () {\n function ExtendMetaPropertiesMod(metaManager) {\n _classCallCheck(this, ExtendMetaPropertiesMod);\n /**\n * @type {MetaManager}\n */\n this.metaManager = metaManager;\n /**\n * @type {Set}\n */\n this.usageTracker = new Set();\n /**\n * @type {Map}\n */\n this.propDescriptors = new Map([['fixedColumnsLeft', {\n target: 'fixedColumnsStart',\n onChange: function onChange(propName) {\n var isRtl = this.metaManager.hot.isRtl();\n if (isRtl && propName === 'fixedColumnsLeft') {\n throw new Error('The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.');\n }\n if (this.usageTracker.has('fixedColumnsLeft') && this.usageTracker.has('fixedColumnsStart')) {\n throw new Error('The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. ' + 'Please use only the option `fixedColumnsStart`.');\n }\n }\n }], ['layoutDirection', {\n onChange: function onChange(propName, value, isInitialChange) {\n if (!isInitialChange) {\n throw new Error(\"The `\".concat(propName, \"` option can not be updated after the Handsontable is initialized.\"));\n }\n }\n }]]);\n this.extendMetaProps();\n }\n\n /**\n * Extends the meta options based on the object descriptors from the `propDescriptors` list.\n */\n _createClass(ExtendMetaPropertiesMod, [{\n key: \"extendMetaProps\",\n value: function extendMetaProps() {\n var _this = this;\n this.propDescriptors.forEach(function (descriptor, alias) {\n var target = descriptor.target,\n _descriptor$onChange = descriptor.onChange,\n onChange = _descriptor$onChange === void 0 ? function () {} : _descriptor$onChange;\n var hasTarget = typeof target === 'string';\n var targetProp = hasTarget ? target : alias;\n var origProp = \"_\".concat(targetProp);\n _this.metaManager.globalMeta.meta[origProp] = _this.metaManager.globalMeta.meta[targetProp];\n _this.installPropWatcher(alias, origProp, onChange);\n if (hasTarget) {\n _this.installPropWatcher(target, origProp, onChange);\n }\n });\n }\n\n /**\n * Installs the property watcher to the `propName` option and forwards getter and setter to\n * the new one.\n *\n * @param {string} propName The property to watch.\n * @param {string} origProp The property from/to the value is forwarded.\n * @param {Function} onChange The callback.\n */\n }, {\n key: \"installPropWatcher\",\n value: function installPropWatcher(propName, origProp, onChange) {\n var self = this;\n Object.defineProperty(this.metaManager.globalMeta.meta, propName, {\n get: function get() {\n return this[origProp];\n },\n set: function set(value) {\n var isInitialChange = !self.usageTracker.has(propName);\n self.usageTracker.add(propName);\n onChange.call(self, propName, value, isInitialChange);\n this[origProp] = value;\n },\n enumerable: true,\n configurable: true\n });\n }\n }]);\n return ExtendMetaPropertiesMod;\n}();","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.array.index-of.js\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n/**\n * SheetClip - Spreadsheet Clipboard Parser.\n * version 0.2\n *\n * This tiny library transforms JavaScript arrays to strings that are pasteable by LibreOffice, OpenOffice,\n * Google Docs and Microsoft Excel.\n *\n * Copyright 2012, Marcin Warpechowski\n * Licensed under the MIT license.\n * http://github.com/warpech/sheetclip/\n */\n\nvar regUniversalNewLine = /^(\\r\\n|\\n\\r|\\r|\\n)/;\nvar regNextCellNoQuotes = /^[^\\t\\r\\n]+/;\nvar regNextEmptyCell = /^\\t/;\n\n/**\n * Decode spreadsheet string into array.\n *\n * @param {string} str The string to parse.\n * @returns {Array}\n */\nexport function parse(str) {\n var arr = [['']];\n if (str.length === 0) {\n return arr;\n }\n var column = 0;\n var row = 0;\n var lastLength;\n while (str.length > 0) {\n if (lastLength === str.length) {\n // In the case If in last cycle we didn't match anything, we have to leave the infinite loop\n break;\n }\n lastLength = str.length;\n if (str.match(regNextEmptyCell)) {\n str = str.replace(regNextEmptyCell, '');\n column += 1;\n arr[row][column] = '';\n } else if (str.match(regUniversalNewLine)) {\n str = str.replace(regUniversalNewLine, '');\n column = 0;\n row += 1;\n arr[row] = [''];\n } else {\n var nextCell = '';\n if (str.startsWith('\"')) {\n var quoteNo = 0;\n var isStillCell = true;\n while (isStillCell) {\n var nextChar = str.slice(0, 1);\n if (nextChar === '\"') {\n quoteNo += 1;\n }\n nextCell += nextChar;\n str = str.slice(1);\n if (str.length === 0 || str.match(/^[\\t\\r\\n]/) && quoteNo % 2 === 0) {\n isStillCell = false;\n }\n }\n nextCell = nextCell.replace(/^\"/, '').replace(/\"$/, '').replace(/[\"]*/g, function (match) {\n return new Array(Math.floor(match.length / 2)).fill('\"').join('');\n });\n } else {\n var matchedText = str.match(regNextCellNoQuotes);\n nextCell = matchedText ? matchedText[0] : '';\n str = str.slice(nextCell.length);\n }\n arr[row][column] = nextCell;\n }\n }\n return arr;\n}\n\n/**\n * Encode array into valid spreadsheet string.\n *\n * @param {Array} arr An array of arrays to stringify.\n * @returns {string}\n */\nexport function stringify(arr) {\n var r;\n var rLen;\n var c;\n var cLen;\n var str = '';\n var val;\n for (r = 0, rLen = arr.length; r < rLen; r += 1) {\n cLen = arr[r].length;\n for (c = 0; c < cLen; c += 1) {\n if (c > 0) {\n str += '\\t';\n }\n val = arr[r][c];\n if (typeof val === 'string') {\n if (val.indexOf('\\n') > -1) {\n str += \"\\\"\".concat(val.replace(/\"/g, '\"\"'), \"\\\"\");\n } else {\n str += val;\n }\n } else if (val === null || val === void 0) {\n // void 0 resolves to undefined\n str += '';\n } else {\n str += val;\n }\n }\n if (r !== rLen - 1) {\n str += '\\n';\n }\n }\n return str;\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.symbol.to-primitive.js\";\nimport \"core-js/modules/es.date.to-primitive.js\";\nimport \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { stringify } from \"../3rdparty/SheetClip/index.mjs\";\nimport { countFirstRowKeys as _countFirstRowKeys } from \"../helpers/data.mjs\";\nimport { createObjectPropListener, deepClone, deepExtend, deepObjectSize, duckSchema, hasOwnProperty, isObject, objectEach } from \"../helpers/object.mjs\";\nimport { extendArray, to2dArray } from \"../helpers/array.mjs\";\nimport { rangeEach } from \"../helpers/number.mjs\";\nimport { isDefined } from \"../helpers/mixed.mjs\";\n/*\nThis class contains open-source contributions covered by the MIT license.\n\n1) In the `createRow` method: Row creation using functional `dataSchema` value\n2) In the `set` method: Data setting using functional `prop` value\n3) in the `get` method: Data getting using functional `prop` value\n\nThe remaining part of this code comment contains the full license text of these contributions.\n\n======\n\nThe MIT License\n\nCopyright 2013 Nicholas Bollweg\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/**\n * Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names.\n *\n * @todo Refactor arguments of methods getRange, getText to be numbers (not objects).\n * @todo Remove priv, GridSettings from object constructor.\n *\n * @class DataMap\n * @private\n */\nvar DataMap = /*#__PURE__*/function () {\n /**\n * @param {object} instance Instance of Handsontable.\n * @param {Array} data Array of arrays or array of objects containing data.\n * @param {MetaManager} metaManager The meta manager instance.\n */\n function DataMap(instance, data, metaManager) {\n _classCallCheck(this, DataMap);\n /**\n * Instance of {@link Handsontable}.\n *\n * @private\n * @type {Handsontable}\n */\n this.instance = instance;\n /**\n * Instance of {@link MetaManager}.\n *\n * @private\n * @type {MetaManager}\n */\n this.metaManager = metaManager;\n /**\n * Instance of {@link TableMeta}.\n *\n * @private\n * @type {TableMeta}\n */\n this.tableMeta = metaManager.getTableMeta();\n /**\n * Reference to the original dataset.\n *\n * @type {*}\n */\n this.dataSource = data;\n /**\n * Generated schema based on the first row from the source data.\n *\n * @type {object}\n */\n this.duckSchema = this.createDuckSchema();\n /**\n * Cached array of properties to columns.\n *\n * @type {Array}\n */\n this.colToPropCache = void 0;\n /**\n * Cached map of properties to columns.\n *\n * @type {Map}\n */\n this.propToColCache = void 0;\n this.createMap();\n }\n\n /**\n * Generates cache for property to and from column addressation.\n */\n _createClass(DataMap, [{\n key: \"createMap\",\n value: function createMap() {\n var schema = this.getSchema();\n if (typeof schema === 'undefined') {\n throw new Error('trying to create `columns` definition but you didn\\'t provide `schema` nor `data`');\n }\n var columns = this.tableMeta.columns;\n var i;\n this.colToPropCache = [];\n this.propToColCache = new Map();\n if (columns) {\n var columnsLen = 0;\n var filteredIndex = 0;\n var columnsAsFunc = false;\n if (typeof columns === 'function') {\n var schemaLen = deepObjectSize(schema);\n columnsLen = schemaLen > 0 ? schemaLen : this.countFirstRowKeys();\n columnsAsFunc = true;\n } else {\n var maxCols = this.tableMeta.maxCols;\n columnsLen = Math.min(maxCols, columns.length);\n }\n for (i = 0; i < columnsLen; i++) {\n var column = columnsAsFunc ? columns(i) : columns[i];\n if (isObject(column)) {\n if (typeof column.data !== 'undefined') {\n var index = columnsAsFunc ? filteredIndex : i;\n this.colToPropCache[index] = column.data;\n this.propToColCache.set(column.data, index);\n }\n filteredIndex += 1;\n }\n }\n } else {\n this.recursiveDuckColumns(schema);\n }\n }\n\n /**\n * Get the amount of physical columns in the first data row.\n *\n * @returns {number} Amount of physical columns in the first data row.\n */\n }, {\n key: \"countFirstRowKeys\",\n value: function countFirstRowKeys() {\n return _countFirstRowKeys(this.dataSource);\n }\n\n /**\n * Generates columns' translation cache.\n *\n * @param {object} schema An object to generate schema from.\n * @param {number} lastCol The column index.\n * @param {number} parent The property cache for recursive calls.\n * @returns {number}\n */\n }, {\n key: \"recursiveDuckColumns\",\n value: function recursiveDuckColumns(schema, lastCol, parent) {\n var _this = this;\n var lastColumn = lastCol;\n var propertyParent = parent;\n var prop;\n if (typeof lastColumn === 'undefined') {\n lastColumn = 0;\n propertyParent = '';\n }\n if (_typeof(schema) === 'object' && !Array.isArray(schema)) {\n objectEach(schema, function (value, key) {\n if (value === null) {\n prop = propertyParent + key;\n _this.colToPropCache.push(prop);\n _this.propToColCache.set(prop, lastColumn);\n lastColumn += 1;\n } else {\n lastColumn = _this.recursiveDuckColumns(value, lastColumn, \"\".concat(key, \".\"));\n }\n });\n }\n return lastColumn;\n }\n\n /**\n * Returns property name that corresponds with the given column index.\n *\n * @param {string|number} column Visual column index or another passed argument.\n * @returns {string|number} Column property, physical column index or passed argument.\n */\n }, {\n key: \"colToProp\",\n value: function colToProp(column) {\n // TODO: Should it work? Please, look at the test:\n // \"it should return the provided property name, when the user passes a property name as a column number\".\n if (Number.isInteger(column) === false) {\n return column;\n }\n var physicalColumn = this.instance.toPhysicalColumn(column);\n\n // Out of range, not visible column index.\n if (physicalColumn === null) {\n return column;\n }\n\n // Cached property.\n if (this.colToPropCache && isDefined(this.colToPropCache[physicalColumn])) {\n return this.colToPropCache[physicalColumn];\n }\n return physicalColumn;\n }\n\n /**\n * Translates property into visual column index.\n *\n * @param {string|number} prop Column property which may be also a physical column index.\n * @returns {string|number} Visual column index or passed argument.\n */\n }, {\n key: \"propToCol\",\n value: function propToCol(prop) {\n var cachedPhysicalIndex = this.propToColCache.get(prop);\n if (isDefined(cachedPhysicalIndex)) {\n return this.instance.toVisualColumn(cachedPhysicalIndex);\n }\n\n // Property may be a physical column index.\n var visualColumn = this.instance.toVisualColumn(prop);\n if (visualColumn === null) {\n return prop;\n }\n return visualColumn;\n }\n\n /**\n * Returns data's schema.\n *\n * @returns {object}\n */\n }, {\n key: \"getSchema\",\n value: function getSchema() {\n var schema = this.tableMeta.dataSchema;\n if (schema) {\n if (typeof schema === 'function') {\n return schema();\n }\n return schema;\n }\n return this.duckSchema;\n }\n\n /**\n * Creates the duck schema based on the current dataset.\n *\n * @returns {Array|object}\n */\n }, {\n key: \"createDuckSchema\",\n value: function createDuckSchema() {\n return this.dataSource && this.dataSource[0] ? duckSchema(this.dataSource[0]) : {};\n }\n\n /**\n * Refresh the data schema.\n */\n }, {\n key: \"refreshDuckSchema\",\n value: function refreshDuckSchema() {\n this.duckSchema = this.createDuckSchema();\n }\n\n /**\n * Creates row at the bottom of the data array.\n *\n * @param {number} [index] Physical index of the row before which the new row will be inserted.\n * @param {number} [amount=1] An amount of rows to add.\n * @param {object} [options] Additional options for created rows.\n * @param {string} [options.source] Source of method call.\n * @param {'above'|'below'} [options.mode] Sets where the row is inserted: above or below the passed index.\n * @fires Hooks#afterCreateRow\n * @returns {number} Returns number of created rows.\n */\n }, {\n key: \"createRow\",\n value: function createRow(index) {\n var _this2 = this;\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n source = _ref.source,\n _ref$mode = _ref.mode,\n mode = _ref$mode === void 0 ? 'above' : _ref$mode;\n var sourceRowsCount = this.instance.countSourceRows();\n var physicalRowIndex = sourceRowsCount;\n var numberOfCreatedRows = 0;\n var rowIndex = index;\n if (typeof rowIndex !== 'number' || rowIndex >= sourceRowsCount) {\n rowIndex = sourceRowsCount;\n }\n if (rowIndex < this.instance.countRows()) {\n physicalRowIndex = this.instance.toPhysicalRow(rowIndex);\n }\n var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);\n if (continueProcess === false || physicalRowIndex === null) {\n return {\n delta: 0\n };\n }\n var maxRows = this.tableMeta.maxRows;\n var columnCount = this.getSchema().length;\n var rowsToAdd = [];\n var _loop = function _loop() {\n var row = null;\n if (_this2.instance.dataType === 'array') {\n if (_this2.tableMeta.dataSchema) {\n // Clone template array\n row = deepClone(_this2.getSchema());\n } else {\n row = [];\n /* eslint-disable no-loop-func */\n rangeEach(columnCount - 1, function () {\n return row.push(null);\n });\n }\n } else if (_this2.instance.dataType === 'function') {\n row = _this2.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);\n } else {\n row = {};\n deepExtend(row, _this2.getSchema());\n }\n rowsToAdd.push(row);\n numberOfCreatedRows += 1;\n };\n while (numberOfCreatedRows < amount && sourceRowsCount + numberOfCreatedRows < maxRows) {\n _loop();\n }\n this.instance.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);\n if (mode === 'below') {\n physicalRowIndex = Math.min(physicalRowIndex + 1, sourceRowsCount);\n }\n this.spliceData(physicalRowIndex, 0, rowsToAdd);\n var newVisualRowIndex = this.instance.toVisualRow(physicalRowIndex);\n\n // In case the created rows are the only ones in the table, the column index mappers need to be rebuilt based on\n // the number of columns created in the row or the schema.\n if (this.instance.countSourceRows() === rowsToAdd.length) {\n this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount());\n }\n if (numberOfCreatedRows > 0) {\n if (index === void 0 || index === null) {\n // Creates the meta rows at the end of the rows collection without shifting the cells\n // that were defined out of the range of the dataset.\n this.metaManager.createRow(null, numberOfCreatedRows);\n } else if (source !== 'auto') {\n this.metaManager.createRow(physicalRowIndex, amount);\n }\n }\n this.instance.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return {\n delta: numberOfCreatedRows,\n startPhysicalIndex: physicalRowIndex\n };\n }\n\n /**\n * Creates column at the right of the data array.\n *\n * @param {number} [index] Visual index of the column before which the new column will be inserted.\n * @param {number} [amount=1] An amount of columns to add.\n * @param {object} [options] Additional options for created columns.\n * @param {string} [options.source] Source of method call.\n * @param {'start'|'end'} [options.mode] Sets where the column is inserted: at the start (left in [LTR](@/api/options.md#layoutdirection), right in [RTL](@/api/options.md#layoutdirection)) or at the end (right in LTR, left in LTR)\n * the passed index.\n * @fires Hooks#afterCreateCol\n * @returns {number} Returns number of created columns.\n */\n }, {\n key: \"createCol\",\n value: function createCol(index) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n source = _ref2.source,\n _ref2$mode = _ref2.mode,\n mode = _ref2$mode === void 0 ? 'start' : _ref2$mode;\n if (!this.instance.isColumnModificationAllowed()) {\n throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \\'columns\\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');\n }\n var dataSource = this.dataSource;\n var maxCols = this.tableMeta.maxCols;\n var countSourceCols = this.instance.countSourceCols();\n var columnIndex = index;\n if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {\n columnIndex = countSourceCols;\n }\n var continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);\n if (continueProcess === false) {\n return {\n delta: 0\n };\n }\n var physicalColumnIndex = countSourceCols;\n if (columnIndex < this.instance.countCols()) {\n physicalColumnIndex = this.instance.toPhysicalColumn(columnIndex);\n }\n var numberOfSourceRows = this.instance.countSourceRows();\n var nrOfColumns = this.instance.countCols();\n var numberOfCreatedCols = 0;\n var currentIndex = physicalColumnIndex;\n if (mode === 'end') {\n currentIndex = Math.min(currentIndex + 1, countSourceCols);\n }\n var startPhysicalIndex = currentIndex;\n while (numberOfCreatedCols < amount && nrOfColumns < maxCols) {\n if (typeof columnIndex !== 'number' || columnIndex >= nrOfColumns) {\n if (numberOfSourceRows > 0) {\n for (var row = 0; row < numberOfSourceRows; row += 1) {\n if (typeof dataSource[row] === 'undefined') {\n dataSource[row] = [];\n }\n dataSource[row].push(null);\n }\n } else {\n dataSource.push([null]);\n }\n } else {\n for (var _row = 0; _row < numberOfSourceRows; _row++) {\n dataSource[_row].splice(currentIndex, 0, null);\n }\n }\n numberOfCreatedCols += 1;\n currentIndex += 1;\n nrOfColumns += 1;\n }\n this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);\n if (numberOfCreatedCols > 0) {\n if (index === void 0 || index === null) {\n // Creates the meta columns at the end of the columns collection without shifting the cells\n // that were defined out of the range of the dataset.\n this.metaManager.createColumn(null, numberOfCreatedCols);\n } else if (source !== 'auto') {\n this.metaManager.createColumn(startPhysicalIndex, amount);\n }\n }\n var newVisualColumnIndex = this.instance.toVisualColumn(startPhysicalIndex);\n this.instance.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n this.refreshDuckSchema();\n return {\n delta: numberOfCreatedCols,\n startPhysicalIndex: startPhysicalIndex\n };\n }\n\n /**\n * Removes row from the data array.\n *\n * @fires Hooks#beforeRemoveRow\n * @fires Hooks#afterRemoveRow\n * @param {number} [index] Visual index of the row to be removed. If not provided, the last row will be removed.\n * @param {number} [amount=1] Amount of the rows to be removed. If not provided, one row will be removed.\n * @param {string} [source] Source of method call.\n * @returns {boolean} Returns `false` when action was cancelled, otherwise `true`.\n */\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n var _this3 = this;\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n var rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.\n var removedPhysicalIndexes = this.visualRowsToPhysical(rowIndex, amount);\n var sourceRowsLength = this.instance.countSourceRows();\n rowIndex = (sourceRowsLength + rowIndex) % sourceRowsLength;\n\n // It handle also callback from the `NestedRows` plugin. Removing parent node has effect in removing children nodes.\n var actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', rowIndex, removedPhysicalIndexes.length, removedPhysicalIndexes, source);\n if (actionWasNotCancelled === false) {\n return false;\n }\n\n // List of removed indexes might be changed in the `beforeRemoveRow` hook. There may be new values.\n var numberOfRemovedIndexes = removedPhysicalIndexes.length;\n this.filterData(rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes);\n\n // TODO: Function `removeRow` should validate fully, probably above.\n if (rowIndex < this.instance.countRows()) {\n this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);\n var customDefinedColumns = isDefined(this.tableMeta.columns) || isDefined(this.tableMeta.dataSchema);\n\n // All rows have been removed. There shouldn't be any columns.\n if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {\n this.instance.columnIndexMapper.setIndexesSequence([]);\n }\n }\n var descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort(function (a, b) {\n return b - a;\n });\n descendingPhysicalRows.forEach(function (rowPhysicalIndex) {\n _this3.metaManager.removeRow(rowPhysicalIndex, 1);\n });\n this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return true;\n }\n\n /**\n * Removes column from the data array.\n *\n * @fires Hooks#beforeRemoveCol\n * @fires Hooks#afterRemoveCol\n * @param {number} [index] Visual index of the column to be removed. If not provided, the last column will be removed.\n * @param {number} [amount=1] Amount of the columns to be removed. If not provided, one column will be removed.\n * @param {string} [source] Source of method call.\n * @returns {boolean} Returns `false` when action was cancelled, otherwise `true`.\n */\n }, {\n key: \"removeCol\",\n value: function removeCol(index) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n if (this.instance.dataType === 'object' || this.tableMeta.columns) {\n throw new Error('cannot remove column with object data source or columns option specified');\n }\n var columnIndex = typeof index !== 'number' ? -amount : index;\n columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();\n var removedPhysicalIndexes = this.visualColumnsToPhysical(columnIndex, amount);\n var descendingPhysicalColumns = removedPhysicalIndexes.slice(0).sort(function (a, b) {\n return b - a;\n });\n var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);\n if (actionWasNotCancelled === false) {\n return false;\n }\n var isTableUniform = true;\n var removedColumnsCount = descendingPhysicalColumns.length;\n var data = this.dataSource;\n for (var c = 0; c < removedColumnsCount; c++) {\n if (isTableUniform && removedPhysicalIndexes[0] !== removedPhysicalIndexes[c] - c) {\n isTableUniform = false;\n }\n }\n if (isTableUniform) {\n for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {\n data[r].splice(removedPhysicalIndexes[0], amount);\n if (r === 0) {\n this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);\n }\n }\n } else {\n for (var _r = 0, _rlen = this.instance.countSourceRows(); _r < _rlen; _r++) {\n for (var _c = 0; _c < removedColumnsCount; _c++) {\n data[_r].splice(descendingPhysicalColumns[_c], 1);\n if (_r === 0) {\n this.metaManager.removeColumn(descendingPhysicalColumns[_c], 1);\n }\n }\n }\n }\n\n // TODO: Function `removeCol` should validate fully, probably above.\n if (columnIndex < this.instance.countCols()) {\n this.instance.columnIndexMapper.removeIndexes(removedPhysicalIndexes);\n\n // All columns have been removed. There shouldn't be any rows.\n if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {\n this.instance.rowIndexMapper.setIndexesSequence([]);\n }\n }\n this.instance.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);\n this.instance.forceFullRender = true; // used when data was changed\n this.refreshDuckSchema();\n return true;\n }\n\n /**\n * Add/Removes data from the column.\n *\n * @param {number} col Physical index of column in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {Array} [elements] The new columns to add.\n * @returns {Array} Returns removed portion of columns.\n */\n }, {\n key: \"spliceCol\",\n value: function spliceCol(col, index, amount) {\n var colData = this.instance.getDataAtCol(col);\n var removed = colData.slice(index, index + amount);\n var after = colData.slice(index + amount);\n for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n elements[_key - 3] = arguments[_key];\n }\n extendArray(elements, after);\n var i = 0;\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n i += 1;\n }\n to2dArray(elements);\n this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol');\n return removed;\n }\n\n /**\n * Add/Removes data from the row.\n *\n * @param {number} row Physical index of row in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {Array} [elements] The new rows to add.\n * @returns {Array} Returns removed portion of rows.\n */\n }, {\n key: \"spliceRow\",\n value: function spliceRow(row, index, amount) {\n var rowData = this.instance.getSourceDataAtRow(row);\n var removed = rowData.slice(index, index + amount);\n var after = rowData.slice(index + amount);\n for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n elements[_key2 - 3] = arguments[_key2];\n }\n extendArray(elements, after);\n var i = 0;\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n i += 1;\n }\n this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow');\n return removed;\n }\n\n /**\n * Add/remove row(s) to/from the data source.\n *\n * @param {number} index Physical index of the element to add/remove.\n * @param {number} deleteCount Number of rows to remove.\n * @param {Array