{"version":3,"file":"ag-grid-community-DKRvuJup.js","sources":["../../node_modules/ag-grid-community/dist/package/main.esm.mjs"],"sourcesContent":["// packages/ag-grid-community/src/localEventService.ts\nvar LocalEventService = class {\n constructor() {\n this.allSyncListeners = /* @__PURE__ */ new Map();\n this.allAsyncListeners = /* @__PURE__ */ new Map();\n this.globalSyncListeners = /* @__PURE__ */ new Set();\n this.globalAsyncListeners = /* @__PURE__ */ new Set();\n this.asyncFunctionsQueue = [];\n this.scheduled = false;\n // using an object performs better than a Set for the number of different events we have\n this.firedEvents = {};\n }\n setFrameworkOverrides(frameworkOverrides) {\n this.frameworkOverrides = frameworkOverrides;\n }\n getListeners(eventType, async, autoCreateListenerCollection) {\n const listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n let listeners = listenerMap.get(eventType);\n if (!listeners && autoCreateListenerCollection) {\n listeners = /* @__PURE__ */ new Set();\n listenerMap.set(eventType, listeners);\n }\n return listeners;\n }\n noRegisteredListenersExist() {\n return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 && this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;\n }\n addEventListener(eventType, listener, async = false) {\n this.getListeners(eventType, async, true).add(listener);\n }\n removeEventListener(eventType, listener, async = false) {\n const listeners = this.getListeners(eventType, async, false);\n if (!listeners) {\n return;\n }\n listeners.delete(listener);\n if (listeners.size === 0) {\n const listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n listenerMap.delete(eventType);\n }\n }\n addGlobalListener(listener, async = false) {\n (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);\n }\n removeGlobalListener(listener, async = false) {\n (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);\n }\n dispatchEvent(event) {\n const agEvent = event;\n this.dispatchToListeners(agEvent, true);\n this.dispatchToListeners(agEvent, false);\n this.firedEvents[agEvent.type] = true;\n }\n dispatchEventOnce(event) {\n if (!this.firedEvents[event.type]) {\n this.dispatchEvent(event);\n }\n }\n dispatchToListeners(event, async) {\n const eventType = event.type;\n if (async && \"event\" in event) {\n const browserEvent = event.event;\n if (browserEvent instanceof Event) {\n event.eventPath = browserEvent.composedPath();\n }\n }\n const processEventListeners = (listeners2, originalListeners2) => listeners2.forEach((listener) => {\n if (!originalListeners2.has(listener)) {\n return;\n }\n const callback = this.frameworkOverrides ? () => this.frameworkOverrides.wrapIncoming(() => listener(event)) : () => listener(event);\n if (async) {\n this.dispatchAsync(callback);\n } else {\n callback();\n }\n });\n const originalListeners = this.getListeners(eventType, async, false) ?? /* @__PURE__ */ new Set();\n const listeners = new Set(originalListeners);\n if (listeners.size > 0) {\n processEventListeners(listeners, originalListeners);\n }\n const globalListeners = new Set(\n async ? this.globalAsyncListeners : this.globalSyncListeners\n );\n globalListeners.forEach((listener) => {\n const callback = this.frameworkOverrides ? () => this.frameworkOverrides.wrapIncoming(() => listener(eventType, event)) : () => listener(eventType, event);\n if (async) {\n this.dispatchAsync(callback);\n } else {\n callback();\n }\n });\n }\n // this gets called inside the grid's thread, for each event that it\n // wants to set async. the grid then batches the events into one setTimeout()\n // because setTimeout() is an expensive operation. ideally we would have\n // each event in it's own setTimeout(), but we batch for performance.\n dispatchAsync(func) {\n this.asyncFunctionsQueue.push(func);\n if (!this.scheduled) {\n const flush = () => {\n window.setTimeout(this.flushAsyncQueue.bind(this), 0);\n };\n this.frameworkOverrides ? this.frameworkOverrides.wrapIncoming(flush) : flush();\n this.scheduled = true;\n }\n }\n // this happens in the next VM turn only, and empties the queue of events\n flushAsyncQueue() {\n this.scheduled = false;\n const queueCopy = this.asyncFunctionsQueue.slice();\n this.asyncFunctionsQueue = [];\n queueCopy.forEach((func) => func());\n }\n};\n\n// packages/ag-grid-community/src/misc/locale/localeUtils.ts\nfunction defaultLocaleTextFunc(_key, defaultValue) {\n return defaultValue;\n}\nfunction _getLocaleTextFunc(localeSvc) {\n return localeSvc?.getLocaleTextFunc() ?? defaultLocaleTextFunc;\n}\n\n// packages/ag-grid-community/src/utils/aria.ts\nfunction _toggleAriaAttribute(element, attribute, value) {\n if (value == null || typeof value === \"string\" && value == \"\") {\n _removeAriaAttribute(element, attribute);\n } else {\n _setAriaAttribute(element, attribute, value);\n }\n}\nfunction _setAriaAttribute(element, attribute, value) {\n element.setAttribute(_ariaAttributeName(attribute), value.toString());\n}\nfunction _removeAriaAttribute(element, attribute) {\n element.removeAttribute(_ariaAttributeName(attribute));\n}\nfunction _ariaAttributeName(attribute) {\n return `aria-${attribute}`;\n}\nfunction _setAriaRole(element, role) {\n if (role) {\n element.setAttribute(\"role\", role);\n } else {\n element.removeAttribute(\"role\");\n }\n}\nfunction _getAriaSortState(sortDirection) {\n let sort;\n if (sortDirection === \"asc\") {\n sort = \"ascending\";\n } else if (sortDirection === \"desc\") {\n sort = \"descending\";\n } else if (sortDirection === \"mixed\") {\n sort = \"other\";\n } else {\n sort = \"none\";\n }\n return sort;\n}\nfunction _getAriaPosInSet(element) {\n return parseInt(element.getAttribute(\"aria-posinset\"), 10);\n}\nfunction _getAriaLabel(element) {\n return element.getAttribute(\"aria-label\");\n}\nfunction _setAriaLabel(element, label) {\n _toggleAriaAttribute(element, \"label\", label);\n}\nfunction _setAriaLabelledBy(element, labelledBy) {\n _toggleAriaAttribute(element, \"labelledby\", labelledBy);\n}\nfunction _setAriaDescribedBy(element, describedby) {\n _toggleAriaAttribute(element, \"describedby\", describedby);\n}\nfunction _setAriaLive(element, live) {\n _toggleAriaAttribute(element, \"live\", live);\n}\nfunction _setAriaAtomic(element, atomic) {\n _toggleAriaAttribute(element, \"atomic\", atomic);\n}\nfunction _setAriaRelevant(element, relevant) {\n _toggleAriaAttribute(element, \"relevant\", relevant);\n}\nfunction _setAriaLevel(element, level) {\n _toggleAriaAttribute(element, \"level\", level);\n}\nfunction _setAriaDisabled(element, disabled) {\n _toggleAriaAttribute(element, \"disabled\", disabled);\n}\nfunction _setAriaHidden(element, hidden) {\n _toggleAriaAttribute(element, \"hidden\", hidden);\n}\nfunction _setAriaActiveDescendant(element, descendantId) {\n _toggleAriaAttribute(element, \"activedescendant\", descendantId);\n}\nfunction _setAriaExpanded(element, expanded) {\n _setAriaAttribute(element, \"expanded\", expanded);\n}\nfunction _removeAriaExpanded(element) {\n _removeAriaAttribute(element, \"expanded\");\n}\nfunction _setAriaSetSize(element, setsize) {\n _setAriaAttribute(element, \"setsize\", setsize);\n}\nfunction _setAriaPosInSet(element, position) {\n _setAriaAttribute(element, \"posinset\", position);\n}\nfunction _setAriaMultiSelectable(element, multiSelectable) {\n _setAriaAttribute(element, \"multiselectable\", multiSelectable);\n}\nfunction _setAriaRowCount(element, rowCount) {\n _setAriaAttribute(element, \"rowcount\", rowCount);\n}\nfunction _setAriaRowIndex(element, rowIndex) {\n _setAriaAttribute(element, \"rowindex\", rowIndex);\n}\nfunction _setAriaRowSpan(element, spanCount) {\n _setAriaAttribute(element, \"rowspan\", spanCount);\n}\nfunction _setAriaColCount(element, colCount) {\n _setAriaAttribute(element, \"colcount\", colCount);\n}\nfunction _setAriaColIndex(element, colIndex) {\n _setAriaAttribute(element, \"colindex\", colIndex);\n}\nfunction _setAriaColSpan(element, colSpan) {\n _setAriaAttribute(element, \"colspan\", colSpan);\n}\nfunction _setAriaSort(element, sort) {\n _setAriaAttribute(element, \"sort\", sort);\n}\nfunction _removeAriaSort(element) {\n _removeAriaAttribute(element, \"sort\");\n}\nfunction _setAriaSelected(element, selected) {\n _toggleAriaAttribute(element, \"selected\", selected);\n}\nfunction _setAriaChecked(element, checked) {\n _setAriaAttribute(element, \"checked\", checked === void 0 ? \"mixed\" : checked);\n}\nfunction _setAriaControls(controllerElement, controlledElement) {\n _toggleAriaAttribute(controllerElement, \"controls\", controlledElement.id);\n _setAriaLabelledBy(controlledElement, controllerElement.id);\n}\nfunction _setAriaHasPopup(element, hasPopup) {\n _toggleAriaAttribute(element, \"haspopup\", hasPopup === false ? null : hasPopup);\n}\nfunction _getAriaCheckboxStateName(translate, state) {\n return state === void 0 ? translate(\"ariaIndeterminate\", \"indeterminate\") : state === true ? translate(\"ariaChecked\", \"checked\") : translate(\"ariaUnchecked\", \"unchecked\");\n}\n\n// packages/ag-grid-community/src/utils/browser.ts\nvar isSafari;\nvar isChrome;\nvar isFirefox;\nvar isMacOs;\nvar isIOS;\nvar invisibleScrollbar;\nvar browserScrollbarWidth;\nvar maxDivHeight;\nfunction _isBrowserSafari() {\n if (isSafari === void 0) {\n isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n return isSafari;\n}\nfunction _isBrowserChrome() {\n if (isChrome === void 0) {\n const win = window;\n isChrome = !!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime) || /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);\n }\n return isChrome;\n}\nfunction _isBrowserFirefox() {\n if (isFirefox === void 0) {\n isFirefox = /(firefox)/i.test(navigator.userAgent);\n }\n return isFirefox;\n}\nfunction _isMacOsUserAgent() {\n if (isMacOs === void 0) {\n isMacOs = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n }\n return isMacOs;\n}\nfunction _isIOSUserAgent() {\n if (isIOS === void 0) {\n isIOS = /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\n }\n return isIOS;\n}\nfunction _getTabIndex(el) {\n if (!el) {\n return null;\n }\n const numberTabIndex = el.tabIndex;\n const tabIndex = el.getAttribute(\"tabIndex\");\n if (numberTabIndex === -1 && (tabIndex === null || tabIndex === \"\" && !_isBrowserFirefox())) {\n return null;\n }\n return numberTabIndex.toString();\n}\nfunction _getMaxDivHeight() {\n if (maxDivHeight !== void 0) {\n return maxDivHeight;\n }\n if (!document.body) {\n return -1;\n }\n let res = 1e6;\n const testUpTo = _isBrowserFirefox() ? 6e6 : 1e9;\n const div = document.createElement(\"div\");\n document.body.appendChild(div);\n while (true) {\n const test = res * 2;\n div.style.height = test + \"px\";\n if (test > testUpTo || div.clientHeight !== test) {\n break;\n } else {\n res = test;\n }\n }\n document.body.removeChild(div);\n maxDivHeight = res;\n return res;\n}\nfunction _getScrollbarWidth() {\n if (browserScrollbarWidth == null) {\n initScrollbarWidthAndVisibility();\n }\n return browserScrollbarWidth;\n}\nfunction initScrollbarWidthAndVisibility() {\n const body = document.body;\n const div = document.createElement(\"div\");\n div.style.width = div.style.height = \"100px\";\n div.style.opacity = \"0\";\n div.style.overflow = \"scroll\";\n div.style.msOverflowStyle = \"scrollbar\";\n div.style.position = \"absolute\";\n body.appendChild(div);\n let width = div.offsetWidth - div.clientWidth;\n if (width === 0 && div.clientWidth === 0) {\n width = null;\n }\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n if (width != null) {\n browserScrollbarWidth = width;\n invisibleScrollbar = width === 0;\n }\n}\nfunction _isInvisibleScrollbar() {\n if (invisibleScrollbar == null) {\n initScrollbarWidthAndVisibility();\n }\n return invisibleScrollbar;\n}\n\n// packages/ag-grid-community/src/utils/dom.ts\nvar rtlNegativeScroll;\nfunction _radioCssClass(element, elementClass, otherElementClass) {\n const parent = element.parentElement;\n let sibling = parent && parent.firstChild;\n while (sibling) {\n if (elementClass) {\n sibling.classList.toggle(elementClass, sibling === element);\n }\n if (otherElementClass) {\n sibling.classList.toggle(otherElementClass, sibling !== element);\n }\n sibling = sibling.nextSibling;\n }\n}\nvar FOCUSABLE_SELECTOR = \"[tabindex], input, select, button, textarea, [href]\";\nvar FOCUSABLE_EXCLUDE = \"[disabled], .ag-disabled:not(.ag-button), .ag-disabled *\";\nfunction _isFocusableFormField(element) {\n const matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n const inputSelector = \"input, select, button, textarea\";\n const isFocusable = matches.call(element, inputSelector);\n const isNotFocusable = matches.call(element, FOCUSABLE_EXCLUDE);\n const isElementVisible = _isVisible(element);\n const focusable = isFocusable && !isNotFocusable && isElementVisible;\n return focusable;\n}\nfunction _setDisplayed(element, displayed, options = {}) {\n const { skipAriaHidden } = options;\n element.classList.toggle(\"ag-hidden\", !displayed);\n if (!skipAriaHidden) {\n _setAriaHidden(element, !displayed);\n }\n}\nfunction _setVisible(element, visible, options = {}) {\n const { skipAriaHidden } = options;\n element.classList.toggle(\"ag-invisible\", !visible);\n if (!skipAriaHidden) {\n _setAriaHidden(element, !visible);\n }\n}\nfunction _setDisabled(element, disabled) {\n const attributeName = \"disabled\";\n const addOrRemoveDisabledAttribute = disabled ? (e) => e.setAttribute(attributeName, \"\") : (e) => e.removeAttribute(attributeName);\n addOrRemoveDisabledAttribute(element);\n _nodeListForEach(element.querySelectorAll(\"input\"), (input) => addOrRemoveDisabledAttribute(input));\n}\nfunction _isElementChildOfClass(element, cls, maxNest) {\n let counter = 0;\n while (element) {\n if (element.classList.contains(cls)) {\n return true;\n }\n element = element.parentElement;\n if (typeof maxNest == \"number\") {\n if (++counter > maxNest) {\n break;\n }\n } else if (element === maxNest) {\n break;\n }\n }\n return false;\n}\nfunction _getElementSize(el) {\n const {\n height,\n width,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n boxSizing\n } = window.getComputedStyle(el);\n return {\n height: parseFloat(height || \"0\"),\n width: parseFloat(width || \"0\"),\n borderTopWidth: parseFloat(borderTopWidth || \"0\"),\n borderRightWidth: parseFloat(borderRightWidth || \"0\"),\n borderBottomWidth: parseFloat(borderBottomWidth || \"0\"),\n borderLeftWidth: parseFloat(borderLeftWidth || \"0\"),\n paddingTop: parseFloat(paddingTop || \"0\"),\n paddingRight: parseFloat(paddingRight || \"0\"),\n paddingBottom: parseFloat(paddingBottom || \"0\"),\n paddingLeft: parseFloat(paddingLeft || \"0\"),\n marginTop: parseFloat(marginTop || \"0\"),\n marginRight: parseFloat(marginRight || \"0\"),\n marginBottom: parseFloat(marginBottom || \"0\"),\n marginLeft: parseFloat(marginLeft || \"0\"),\n boxSizing\n };\n}\nfunction _getInnerHeight(el) {\n const size = _getElementSize(el);\n if (size.boxSizing === \"border-box\") {\n return size.height - size.paddingTop - size.paddingBottom;\n }\n return size.height;\n}\nfunction _getInnerWidth(el) {\n const size = _getElementSize(el);\n if (size.boxSizing === \"border-box\") {\n return size.width - size.paddingLeft - size.paddingRight;\n }\n return size.width;\n}\nfunction _getAbsoluteHeight(el) {\n const { height, marginBottom, marginTop } = _getElementSize(el);\n return Math.floor(height + marginBottom + marginTop);\n}\nfunction _getAbsoluteWidth(el) {\n const { width, marginLeft, marginRight } = _getElementSize(el);\n return Math.floor(width + marginLeft + marginRight);\n}\nfunction _getElementRectWithOffset(el) {\n const offsetElementRect = el.getBoundingClientRect();\n const { borderTopWidth, borderLeftWidth, borderRightWidth, borderBottomWidth } = _getElementSize(el);\n return {\n top: offsetElementRect.top + (borderTopWidth || 0),\n left: offsetElementRect.left + (borderLeftWidth || 0),\n right: offsetElementRect.right + (borderRightWidth || 0),\n bottom: offsetElementRect.bottom + (borderBottomWidth || 0)\n };\n}\nfunction _isRtlNegativeScroll() {\n if (typeof rtlNegativeScroll === \"boolean\") {\n return rtlNegativeScroll;\n }\n const template = document.createElement(\"div\");\n template.style.direction = \"rtl\";\n template.style.width = \"1px\";\n template.style.height = \"1px\";\n template.style.position = \"fixed\";\n template.style.top = \"0px\";\n template.style.overflow = \"hidden\";\n template.dir = \"rtl\";\n template.innerHTML = /* html */\n `