ag-grid-community 33.2.2 → 33.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,4 @@
1
- var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of __getOwnPropNames(t))!__hasOwnProp.call(e,o)&&o!==i&&__defProp(e,o,{get:()=>t[o],enumerable:!(s=__getOwnPropDesc(t,o))||s.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ALWAYS_SYNC_GLOBAL_EVENTS,AbstractClientSideNodeManager:()=>AbstractClientSideNodeManager,AgAbstractInputField:()=>AgAbstractInputField,AgAbstractLabel:()=>AgAbstractLabel,AgCheckbox:()=>AgCheckbox,AgCheckboxSelector:()=>AgCheckboxSelector,AgColumn:()=>AgColumn,AgColumnGroup:()=>AgColumnGroup,AgInputDateField:()=>AgInputDateField,AgInputNumberField:()=>AgInputNumberField,AgInputNumberFieldSelector:()=>AgInputNumberFieldSelector,AgInputTextArea:()=>AgInputTextArea,AgInputTextField:()=>AgInputTextField,AgInputTextFieldSelector:()=>AgInputTextFieldSelector,AgPickerField:()=>AgPickerField,AgPromise:()=>AgPromise,AgProvidedColumnGroup:()=>AgProvidedColumnGroup,AgRadioButton:()=>AgRadioButton,AgSelect:()=>AgSelect,AgSelectSelector:()=>AgSelectSelector,AgToggleButton:()=>AgToggleButton,AgToggleButtonSelector:()=>AgToggleButtonSelector,AlignedGridsModule:()=>AlignedGridsModule,AllCommunityModule:()=>AllCommunityModule,AutoScrollService:()=>AutoScrollService,BaseColsService:()=>BaseColsService,BaseComponentWrapper:()=>BaseComponentWrapper,BaseCreator:()=>BaseCreator,BaseGridSerializingSession:()=>BaseGridSerializingSession,BaseSelectionService:()=>BaseSelectionService,BeanStub:()=>BeanStub,CellApiModule:()=>CellApiModule,CellRangeType:()=>CellRangeType,CellSpanModule:()=>CellSpanModule,CellStyleModule:()=>CellStyleModule,ChangedPath:()=>ChangedPath,CheckboxEditorModule:()=>CheckboxEditorModule,ClientSideRowModelApiModule:()=>ClientSideRowModelApiModule,ClientSideRowModelModule:()=>ClientSideRowModelModule,ColumnApiModule:()=>ColumnApiModule,ColumnAutoSizeModule:()=>ColumnAutoSizeModule,ColumnHoverModule:()=>ColumnHoverModule,ColumnKeyCreator:()=>ColumnKeyCreator,Component:()=>Component,CssClassManager:()=>CssClassManager,CsvExportModule:()=>CsvExportModule,CustomEditorModule:()=>CustomEditorModule,CustomFilterModule:()=>CustomFilterModule,DateEditorModule:()=>DateEditorModule,DateFilterModule:()=>DateFilterModule,DragAndDropModule:()=>DragAndDropModule,DragSourceType:()=>DragSourceType,EventApiModule:()=>EventApiModule,ExternalFilterModule:()=>ExternalFilterModule,FakeHScrollComp:()=>FakeHScrollComp,FakeVScrollComp:()=>FakeVScrollComp,FilterWrapperComp:()=>FilterWrapperComp,GROUP_AUTO_COLUMN_ID:()=>GROUP_AUTO_COLUMN_ID,GridBodyCtrl:()=>GridBodyCtrl,GridCoreCreator:()=>GridCoreCreator,GridCtrl:()=>GridCtrl,GridHeaderCtrl:()=>GridHeaderCtrl,GridStateModule:()=>GridStateModule,GroupInstanceIdCreator:()=>GroupInstanceIdCreator,HeaderRowContainerCtrl:()=>HeaderRowContainerCtrl,HighlightChangesModule:()=>HighlightChangesModule,InfiniteRowModelModule:()=>InfiniteRowModelModule,KeyCode:()=>KeyCode,LargeTextEditorModule:()=>LargeTextEditorModule,LocalEventService:()=>LocalEventService,LocaleModule:()=>LocaleModule,LocaleService:()=>LocaleService,ManagedFocusFeature:()=>ManagedFocusFeature,ModuleRegistry:()=>ModuleRegistry,NumberEditorModule:()=>NumberEditorModule,NumberFilterModule:()=>NumberFilterModule,PaginationModule:()=>PaginationModule,PinnedRowModule:()=>PinnedRowModule,PopupComponent:()=>PopupComponent,PositionableFeature:()=>PositionableFeature,ProvidedFilter:()=>ProvidedFilter,QuickFilterModule:()=>QuickFilterModule,ROW_NUMBERS_COLUMN_ID:()=>ROW_NUMBERS_COLUMN_ID,RefPlaceholder:()=>RefPlaceholder,RenderApiModule:()=>RenderApiModule,RowApiModule:()=>RowApiModule,RowAutoHeightModule:()=>RowAutoHeightModule,RowContainerCtrl:()=>RowContainerCtrl,RowDragModule:()=>RowDragModule,RowNode:()=>RowNode,RowSelectionModule:()=>RowSelectionModule,RowStyleModule:()=>RowStyleModule,SELECTION_COLUMN_ID:()=>SELECTION_COLUMN_ID,ScrollApiModule:()=>ScrollApiModule,SelectEditorModule:()=>SelectEditorModule,ServerSideTransactionResultStatus:()=>ServerSideTransactionResultStatus,TabGuardClassNames:()=>TabGuardClassNames,TabGuardComp:()=>TabGuardComp,TabGuardCtrl:()=>TabGuardCtrl,TabGuardFeature:()=>TabGuardFeature,TextEditorModule:()=>TextEditorModule,TextFilterModule:()=>TextFilterModule,TooltipFeature:()=>TooltipFeature,TooltipModule:()=>TooltipModule,TouchListener:()=>TouchListener,UndoRedoEditModule:()=>UndoRedoEditModule,ValidationModule:()=>ValidationModule,ValueCacheModule:()=>ValueCacheModule,VanillaFrameworkOverrides:()=>VanillaFrameworkOverrides,_ALL_EVENTS:()=>_ALL_EVENTS,_ALL_GRID_OPTIONS:()=>_ALL_GRID_OPTIONS,_BOOLEAN_MIXED_GRID_OPTIONS:()=>_BOOLEAN_MIXED_GRID_OPTIONS,_ColumnFilterModule:()=>ColumnFilterModule,_ColumnGroupModule:()=>ColumnGroupModule,_ColumnMoveModule:()=>ColumnMoveModule,_CsrmSsrmSharedApiModule:()=>CsrmSsrmSharedApiModule,_DragModule:()=>DragModule,_EditCoreModule:()=>EditCoreModule,_EmptyArray:()=>_EmptyArray,_EmptyBean:()=>EmptyBean,_FOCUS_MANAGED_CLASS:()=>FOCUS_MANAGED_CLASS,_FilterCoreModule:()=>FilterCoreModule,_FilterValueModule:()=>FilterValueModule,_HeaderComp:()=>HeaderComp,_HorizontalResizeModule:()=>HorizontalResizeModule,_KeyboardNavigationModule:()=>KeyboardNavigationModule,_PUBLIC_EVENTS:()=>_PUBLIC_EVENTS,_PopupModule:()=>PopupModule,_ROW_ID_PREFIX_ROW_GROUP:()=>ROW_ID_PREFIX_ROW_GROUP,_SharedDragAndDropModule:()=>SharedDragAndDropModule,_SharedExportModule:()=>SharedExportModule,_SharedMenuModule:()=>SharedMenuModule,_SharedRowSelectionModule:()=>SharedRowSelectionModule,_SortModule:()=>SortModule,_SsrmInfiniteSharedApiModule:()=>SsrmInfiniteSharedApiModule,_addColumnDefaultAndTypes:()=>_addColumnDefaultAndTypes,_addFocusableContainerListener:()=>_addFocusableContainerListener,_addGridCommonParams:()=>_addGridCommonParams,_anchorElementToMouseMoveEvent:()=>_anchorElementToMouseMoveEvent,_applyColumnState:()=>_applyColumnState,_areCellsEqual:()=>_areCellsEqual,_areColIdsEqual:()=>_areColIdsEqual,_areEqual:()=>_areEqual,_asThemeImpl:()=>_asThemeImpl,_batchCall:()=>_batchCall,_canSkipShowingRowGroup:()=>_canSkipShowingRowGroup,_clearElement:()=>_clearElement,_columnsMatch:()=>_columnsMatch,_combineAttributesAndGridOptions:()=>_combineAttributesAndGridOptions,_convertColumnEventSourceType:()=>_convertColumnEventSourceType,_createCellId:()=>_createCellId,_createColumnTree:()=>_createColumnTree,_createElement:()=>_createElement,_createGlobalRowEvent:()=>_createGlobalRowEvent,_createIcon:()=>_createIcon,_createIconNoSpan:()=>_createIconNoSpan,_debounce:()=>_debounce,_defaultComparator:()=>_defaultComparator,_destroyColumnTree:()=>_destroyColumnTree,_doOnce:()=>_doOnce,_downloadFile:()=>_downloadFile,_errMsg:()=>_errMsg,_error:()=>_error,_escapeString:()=>_escapeString,_exists:()=>_exists,_findFocusableElements:()=>_findFocusableElements,_findNextFocusableElement:()=>_findNextFocusableElement,_findTabbableParent:()=>_findTabbableParent,_flatten:()=>_flatten,_focusGridInnerElement:()=>_focusGridInnerElement,_focusInto:()=>_focusInto,_focusNextGridCoreContainer:()=>_focusNextGridCoreContainer,_formatNumberCommas:()=>_formatNumberCommas,_fuzzySuggestions:()=>_fuzzySuggestions,_getAbsoluteHeight:()=>_getAbsoluteHeight,_getAbsoluteWidth:()=>_getAbsoluteWidth,_getActiveDomElement:()=>_getActiveDomElement,_getAriaPosInSet:()=>_getAriaPosInSet,_getCallbackForEvent:()=>_getCallbackForEvent,_getCellByPosition:()=>_getCellByPosition,_getCellCtrlForEventTarget:()=>_getCellCtrlForEventTarget,_getCellPositionForEvent:()=>_getCellPositionForEvent,_getCellRendererDetails:()=>_getCellRendererDetails,_getCheckboxLocation:()=>_getCheckboxLocation,_getCheckboxes:()=>_getCheckboxes,_getClientSideRowModel:()=>_getClientSideRowModel,_getColumnState:()=>_getColumnState,_getColumnsFromTree:()=>_getColumnsFromTree,_getDefaultFloatingFilterType:()=>_getDefaultFloatingFilterType,_getDocument:()=>_getDocument,_getEditorRendererDetails:()=>_getEditorRendererDetails,_getFillHandle:()=>_getFillHandle,_getFilterDetails:()=>_getFilterDetails,_getFloatingFilterCompDetails:()=>_getFloatingFilterCompDetails,_getFloatingFiltersHeight:()=>getFloatingFiltersHeight,_getGlobalGridOption:()=>_getGlobalGridOption,_getGrandTotalRow:()=>_getGrandTotalRow,_getGridRegisteredModules:()=>_getGridRegisteredModules,_getGroupAggFiltering:()=>_getGroupAggFiltering,_getGroupSelection:()=>_getGroupSelection,_getGroupSelectsDescendants:()=>_getGroupSelectsDescendants,_getGroupTotalRowCallback:()=>_getGroupTotalRowCallback,_getGroupingApproach:()=>_getGroupingApproach,_getHeaderCheckbox:()=>_getHeaderCheckbox,_getHeaderClassesFromColDef:()=>_getHeaderClassesFromColDef,_getHeaderRowCount:()=>getHeaderRowCount,_getInnerCellRendererDetails:()=>_getInnerCellRendererDetails,_getInnerHeight:()=>_getInnerHeight,_getInnerWidth:()=>_getInnerWidth,_getIsRowSelectable:()=>_getIsRowSelectable,_getLocaleTextFunc:()=>_getLocaleTextFunc,_getMaxConcurrentDatasourceRequests:()=>_getMaxConcurrentDatasourceRequests,_getNormalisedMousePosition:()=>_getNormalisedMousePosition,_getPageBody:()=>_getPageBody,_getRootNode:()=>_getRootNode,_getRowAbove:()=>_getRowAbove,_getRowBelow:()=>_getRowBelow,_getRowContainerClass:()=>_getRowContainerClass,_getRowContainerOptions:()=>_getRowContainerOptions,_getRowHeightAsNumber:()=>_getRowHeightAsNumber,_getRowHeightForNode:()=>_getRowHeightForNode,_getRowIdCallback:()=>_getRowIdCallback,_getRowNode:()=>_getRowNode,_getRowSelectionMode:()=>_getRowSelectionMode,_getRowSpanContainerClass:()=>_getRowSpanContainerClass,_getRowViewportClass:()=>_getRowViewportClass,_getServerSideRowModel:()=>_getServerSideRowModel,_getShouldDisplayTooltip:()=>_getShouldDisplayTooltip,_getSuppressMultiRanges:()=>_getSuppressMultiRanges,_getToolPanelClassesFromColDef:()=>_getToolPanelClassesFromColDef,_isAnimateRows:()=>_isAnimateRows,_isCellSelectionEnabled:()=>_isCellSelectionEnabled,_isClientSideRowModel:()=>_isClientSideRowModel,_isColumnMenuAnchoringEnabled:()=>_isColumnMenuAnchoringEnabled,_isColumnsSortingCoupledToGroup:()=>_isColumnsSortingCoupledToGroup,_isDomLayout:()=>_isDomLayout,_isElementInEventPath:()=>_isElementInEventPath,_isEventFromPrintableCharacter:()=>_isEventFromPrintableCharacter,_isGetRowHeightFunction:()=>_isGetRowHeightFunction,_isGroupMultiAutoColumn:()=>_isGroupMultiAutoColumn,_isGroupRowsSticky:()=>_isGroupRowsSticky,_isGroupUseEntireRow:()=>_isGroupUseEntireRow,_isIOSUserAgent:()=>_isIOSUserAgent,_isKeyboardMode:()=>_isKeyboardMode,_isLegacyMenuEnabled:()=>_isLegacyMenuEnabled,_isMultiRowSelection:()=>_isMultiRowSelection,_isNodeOrElement:()=>_isNodeOrElement,_isNothingFocused:()=>_isNothingFocused,_isPromise:()=>_isPromise,_isRowBefore:()=>_isRowBefore,_isRowSelection:()=>_isRowSelection,_isSameRow:()=>_isSameRow,_isServerSideRowModel:()=>_isServerSideRowModel,_isShowTooltipWhenTruncated:()=>_isShowTooltipWhenTruncated,_isStopPropagationForAgGrid:()=>_isStopPropagationForAgGrid,_isUsingNewCellSelectionAPI:()=>_isUsingNewCellSelectionAPI,_isUsingNewRowSelectionAPI:()=>_isUsingNewRowSelectionAPI,_isVisible:()=>_isVisible,_jsonEquals:()=>_jsonEquals,_last:()=>_last,_loadTemplate:()=>_loadTemplate,_makeNull:()=>_makeNull,_mergeDeep:()=>_mergeDeep,_missing:()=>_missing,_observeResize:()=>_observeResize,_parseDateTimeFromString:()=>_parseDateTimeFromString,_preInitErrMsg:()=>_preInitErrMsg,_preserveRangesWhile:()=>_preserveRangesWhile,_processOnChange:()=>_processOnChange,_radioCssClass:()=>_radioCssClass,_removeAriaExpanded:()=>_removeAriaExpanded,_removeAriaSort:()=>_removeAriaSort,_removeFromArray:()=>_removeFromArray,_removeFromParent:()=>_removeFromParent,_requestAnimationFrame:()=>_requestAnimationFrame,_resetColumnState:()=>_resetColumnState,_selectAllCells:()=>_selectAllCells,_serialiseDate:()=>_serialiseDate,_setAriaActiveDescendant:()=>_setAriaActiveDescendant,_setAriaChecked:()=>_setAriaChecked,_setAriaColCount:()=>_setAriaColCount,_setAriaColIndex:()=>_setAriaColIndex,_setAriaColSpan:()=>_setAriaColSpan,_setAriaControls:()=>_setAriaControls,_setAriaDescribedBy:()=>_setAriaDescribedBy,_setAriaDisabled:()=>_setAriaDisabled,_setAriaExpanded:()=>_setAriaExpanded,_setAriaHasPopup:()=>_setAriaHasPopup,_setAriaHidden:()=>_setAriaHidden,_setAriaLabel:()=>_setAriaLabel,_setAriaLabelledBy:()=>_setAriaLabelledBy,_setAriaLevel:()=>_setAriaLevel,_setAriaPosInSet:()=>_setAriaPosInSet,_setAriaRole:()=>_setAriaRole,_setAriaRowCount:()=>_setAriaRowCount,_setAriaRowIndex:()=>_setAriaRowIndex,_setAriaSelected:()=>_setAriaSelected,_setAriaSetSize:()=>_setAriaSetSize,_setAriaSort:()=>_setAriaSort,_setColMenuVisible:()=>_setColMenuVisible,_setDisabled:()=>_setDisabled,_setDisplayed:()=>_setDisplayed,_setFixedWidth:()=>_setFixedWidth,_setUmd:()=>_setUmd,_setVisible:()=>_setVisible,_shouldDisplayTooltip:()=>_shouldDisplayTooltip,_shouldUpdateColVisibilityAfterGroup:()=>_shouldUpdateColVisibilityAfterGroup,_stopPropagationForAgGrid:()=>_stopPropagationForAgGrid,_toStringOrNull:()=>_toStringOrNull,_unwrapUserComp:()=>_unwrapUserComp,_updateColsMap:()=>_updateColsMap,_updateColumnState:()=>_updateColumnState,_waitUntil:()=>_waitUntil,_warn:()=>_warn,_warnOnce:()=>_warnOnce,buttonStyleAlpine:()=>buttonStyleAlpine,buttonStyleBalham:()=>buttonStyleBalham,buttonStyleBase:()=>buttonStyleBase,buttonStyleQuartz:()=>buttonStyleQuartz,checkboxStyleDefault:()=>checkboxStyleDefault,colorSchemeDark:()=>colorSchemeDark,colorSchemeDarkBlue:()=>colorSchemeDarkBlue,colorSchemeDarkWarm:()=>colorSchemeDarkWarm,colorSchemeLight:()=>colorSchemeLight,colorSchemeLightCold:()=>colorSchemeLightCold,colorSchemeLightWarm:()=>colorSchemeLightWarm,colorSchemeVariable:()=>colorSchemeVariable,columnDropStyleBordered:()=>columnDropStyleBordered,columnDropStylePlain:()=>columnDropStylePlain,createGrid:()=>createGrid,createPart:()=>createPart,createTheme:()=>createTheme,iconOverrides:()=>iconOverrides,iconSetAlpine:()=>iconSetAlpine,iconSetMaterial:()=>iconSetMaterial,iconSetQuartz:()=>iconSetQuartz,iconSetQuartzBold:()=>iconSetQuartzBold,iconSetQuartzLight:()=>iconSetQuartzLight,iconSetQuartzRegular:()=>iconSetQuartzRegular,inputStyleBase:()=>inputStyleBase,inputStyleBordered:()=>inputStyleBordered,inputStyleUnderlined:()=>inputStyleUnderlined,isColumn:()=>isColumn,isColumnGroup:()=>isColumnGroup2,isColumnGroupAutoCol:()=>isColumnGroupAutoCol,isColumnSelectionCol:()=>isColumnSelectionCol,isProvidedColumnGroup:()=>isProvidedColumnGroup,isRowNumberCol:()=>isRowNumberCol,provideGlobalGridOptions:()=>provideGlobalGridOptions,styleMaterial:()=>styleMaterial,tabStyleAlpine:()=>tabStyleAlpine,tabStyleBase:()=>tabStyleBase,tabStyleMaterial:()=>tabStyleMaterial,tabStyleQuartz:()=>tabStyleQuartz,tabStyleRolodex:()=>tabStyleRolodex,themeAlpine:()=>themeAlpine,themeBalham:()=>themeBalham,themeMaterial:()=>themeMaterial,themeQuartz:()=>themeQuartz}),module.exports=__toCommonJS(main_exports);var LocalEventService=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function defaultLocaleTextFunc(e,t){return t}function _getLocaleTextFunc(e){return e?.getLocaleTextFunc()??defaultLocaleTextFunc}function _toggleAriaAttribute(e,t,i){i==null||typeof i=="string"&&i==""?_removeAriaAttribute(e,t):_setAriaAttribute(e,t,i)}function _setAriaAttribute(e,t,i){e.setAttribute(_ariaAttributeName(t),i.toString())}function _removeAriaAttribute(e,t){e.removeAttribute(_ariaAttributeName(t))}function _ariaAttributeName(e){return`aria-${e}`}function _setAriaRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function _getAriaSortState(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function _getAriaPosInSet(e){return parseInt(e.getAttribute("aria-posinset"),10)}function _getAriaLabel(e){return e.getAttribute("aria-label")}function _setAriaLabel(e,t){_toggleAriaAttribute(e,"label",t)}function _setAriaLabelledBy(e,t){_toggleAriaAttribute(e,"labelledby",t)}function _setAriaDescribedBy(e,t){_toggleAriaAttribute(e,"describedby",t)}function _setAriaLive(e,t){_toggleAriaAttribute(e,"live",t)}function _setAriaAtomic(e,t){_toggleAriaAttribute(e,"atomic",t)}function _setAriaRelevant(e,t){_toggleAriaAttribute(e,"relevant",t)}function _setAriaLevel(e,t){_toggleAriaAttribute(e,"level",t)}function _setAriaDisabled(e,t){_toggleAriaAttribute(e,"disabled",t)}function _setAriaHidden(e,t){_toggleAriaAttribute(e,"hidden",t)}function _setAriaActiveDescendant(e,t){_toggleAriaAttribute(e,"activedescendant",t)}function _setAriaExpanded(e,t){_setAriaAttribute(e,"expanded",t)}function _removeAriaExpanded(e){_removeAriaAttribute(e,"expanded")}function _setAriaSetSize(e,t){_setAriaAttribute(e,"setsize",t)}function _setAriaPosInSet(e,t){_setAriaAttribute(e,"posinset",t)}function _setAriaMultiSelectable(e,t){_setAriaAttribute(e,"multiselectable",t)}function _setAriaRowCount(e,t){_setAriaAttribute(e,"rowcount",t)}function _setAriaRowIndex(e,t){_setAriaAttribute(e,"rowindex",t)}function _setAriaRowSpan(e,t){_setAriaAttribute(e,"rowspan",t)}function _setAriaColCount(e,t){_setAriaAttribute(e,"colcount",t)}function _setAriaColIndex(e,t){_setAriaAttribute(e,"colindex",t)}function _setAriaColSpan(e,t){_setAriaAttribute(e,"colspan",t)}function _setAriaSort(e,t){_setAriaAttribute(e,"sort",t)}function _removeAriaSort(e){_removeAriaAttribute(e,"sort")}function _setAriaSelected(e,t){_toggleAriaAttribute(e,"selected",t)}function _setAriaChecked(e,t){_setAriaAttribute(e,"checked",t===void 0?"mixed":t)}function _setAriaControls(e,t){_toggleAriaAttribute(e,"controls",t.id),_setAriaLabelledBy(t,e.id)}function _setAriaHasPopup(e,t){_toggleAriaAttribute(e,"haspopup",t===!1?null:t)}function _getAriaCheckboxStateName(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var isSafari,isChrome,isFirefox,isMacOs,isIOS,invisibleScrollbar,browserScrollbarWidth,maxDivHeight;function _isBrowserSafari(){return isSafari===void 0&&(isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),isSafari}function _isBrowserChrome(){if(isChrome===void 0){const e=window;isChrome=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return isChrome}function _isBrowserFirefox(){return isFirefox===void 0&&(isFirefox=/(firefox)/i.test(navigator.userAgent)),isFirefox}function _isMacOsUserAgent(){return isMacOs===void 0&&(isMacOs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),isMacOs}function _isIOSUserAgent(){return isIOS===void 0&&(isIOS=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),isIOS}function _getTabIndex(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!_isBrowserFirefox())?null:t.toString()}function _getMaxDivHeight(){if(maxDivHeight!==void 0)return maxDivHeight;if(!document.body)return-1;let e=1e6;const t=_isBrowserFirefox()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),maxDivHeight=e,e}function _getScrollbarWidth(){return browserScrollbarWidth==null&&initScrollbarWidthAndVisibility(),browserScrollbarWidth}function initScrollbarWidthAndVisibility(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(browserScrollbarWidth=i,invisibleScrollbar=i===0)}function _isInvisibleScrollbar(){return invisibleScrollbar==null&&initScrollbarWidthAndVisibility(),invisibleScrollbar}var rtlNegativeScroll;function _radioCssClass(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea, [href]",FOCUSABLE_EXCLUDE="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _isFocusableFormField(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,FOCUSABLE_EXCLUDE),n=_isVisible(e);return s&&!o&&n}function _setDisplayed(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||_setAriaHidden(e,!t)}function _setVisible(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||_setAriaHidden(e,!t)}function _setDisabled(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);const o=e.querySelectorAll("input")??[];for(const n of o)s(n)}function _isElementChildOfClass(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function _getElementSize(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function _getInnerHeight(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function _getInnerWidth(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function _getAbsoluteHeight(e){const{height:t,marginBottom:i,marginTop:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getAbsoluteWidth(e){const{width:t,marginLeft:i,marginRight:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getElementRectWithOffset(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=_getElementSize(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function _isRtlNegativeScroll(){if(typeof rtlNegativeScroll=="boolean")return rtlNegativeScroll;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="10px",e.style.height="5px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 20px">
2
- <span style="display: inline-block; width: 1px"></span>
3
- <span style="display: inline-block; width: 1px"></span>
4
- </div>`,document.body.appendChild(e),e.scrollLeft=1,rtlNegativeScroll=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),rtlNegativeScroll}function _getScrollLeft(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),_isBrowserChrome()&&!_isRtlNegativeScroll()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function _setScrollLeft(e,t,i){i&&(_isRtlNegativeScroll()?t*=-1:(_isBrowserSafari()||_isBrowserChrome())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function _clearElement(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function _removeFromParent(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!_isInDOM(e)||window.getComputedStyle(e).visibility!=="visible")}function _loadTemplate(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function _ensureDomOrder(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _setDomChildOrder(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function _camelCaseToHyphenated(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function _addStylesToElement(e,t){if(t)for(const i of Object.keys(t)){const s=t[i];if(!i||!i.length||s==null)continue;const o=_camelCaseToHyphenated(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function _isHorizontalScrollShowing(e){return e.clientWidth<e.scrollWidth}function _isVerticalScrollShowing(e){return e.clientHeight<e.scrollHeight}function _setElementWidth(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_setFixedWidth(e,t)}function _setFixedWidth(e,t){t=_formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function _setFixedHeight(e,t){t=_formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function _formatSize(e){return typeof e=="number"?`${e}px`:e}function _isNodeOrElement(e){return e instanceof Node||e instanceof HTMLElement}function _addOrRemoveAttribute(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function _observeResize(e,t,i){const o=_getWindow(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function _getTextSelectionRanges(e){const t=_getRootNode(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function _preserveRangesWhile(e,t){if(!e.gos.get("enableCellTextSelection")||!_isBrowserFirefox()&&!_isBrowserSafari())return t();const{selection:s,ranges:o}=_getTextSelectionRanges(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}function _requestAnimationFrame(e,t){const i=_getWindow(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var DataRefAttribute="data-ref",whitespaceNode;function getWhitespaceNode(){return whitespaceNode??(whitespaceNode=document.createTextNode(" ")),whitespaceNode.cloneNode()}function _createElement(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(DataRefAttribute,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(getWhitespaceNode()),l=!1),a.append(_createElement(d)),a.appendChild(getWhitespaceNode())))}return a}function _makeNull(e){return e==null||e===""?null:e}function _exists(e){return e!=null&&e!==""}function _missing(e){return!_exists(e)}function _toStringOrNull(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _jsonEquals(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function _defaultComparator(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var BASE_URL="https://www.ag-grid.com",doOnceFlags={};function _doOnce(e,t){doOnceFlags[t]||(e(),doOnceFlags[t]=!0)}function _logIfDebug(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function _warnOnce(e,...t){_doOnce(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function _errorOnce(e,...t){_doOnce(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var batchedCallsSetTimeout={pending:!1,funcs:[]},batchedCallsRaf={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",i){const s=t==="raf"?batchedCallsRaf:batchedCallsSetTimeout;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?_requestAnimationFrame(i,o):window.setTimeout(o,0)}function _debounce(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function _throttle(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function _waitUntil(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&_warnOnce(s))};a(),r||(n=window.setInterval(a,10))}var VERSION="33.2.2",MAX_URL_LENGTH=2e3,MIN_PARAM_LENGTH=100,VERSION_PARAM_NAME="_version_",validation=null,suppressAllLogging=!1,baseDocLink=`${BASE_URL}/javascript-data-grid`;function provideValidationServiceLogger(e){validation=e}function setValidationDocLink(e){baseDocLink=e}function getErrorParts(e,t,i){return validation?.getConsoleMessage(e,t)??[minifiedLog(e,t,i)]}function getMsgOrDefault(e,t,i,s){suppressAllLogging||e(`error #${t}`,...getErrorParts(t,i,s))}function stringifyObject(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function stringifyValue(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=stringifyObject(e)),t}function toStringWithNullUndefined(e){return e===void 0?"undefined":e===null?"null":e}function getParamsUrl(e,t){return`${e}?${t.toString()}`}function truncateUrl(e,t,i){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=getParamsUrl(e,t);for(const[n,r]of s){if(n===VERSION_PARAM_NAME)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>MIN_PARAM_LENGTH?r.slice(0,r.length-d)+l:r.slice(0,MIN_PARAM_LENGTH)+l;t.set(n,c),o=getParamsUrl(e,t)}return o}function getErrorLink(e,t){const i=new URLSearchParams;if(i.append(VERSION_PARAM_NAME,VERSION),t)for(const n of Object.keys(t))i.append(n,stringifyValue(t[n]));const s=`${baseDocLink}/errors/${e}`,o=getParamsUrl(s,i);return o.length<=MAX_URL_LENGTH?o:truncateUrl(s,i,MAX_URL_LENGTH)}var minifiedLog=(e,t,i)=>{const s=getErrorLink(e,t);return`${i?i+`
1
+ var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of __getOwnPropNames(t))!__hasOwnProp.call(e,o)&&o!==i&&__defProp(e,o,{get:()=>t[o],enumerable:!(s=__getOwnPropDesc(t,o))||s.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ALWAYS_SYNC_GLOBAL_EVENTS,AbstractClientSideNodeManager:()=>AbstractClientSideNodeManager,AgAbstractInputField:()=>AgAbstractInputField,AgAbstractLabel:()=>AgAbstractLabel,AgCheckbox:()=>AgCheckbox,AgCheckboxSelector:()=>AgCheckboxSelector,AgColumn:()=>AgColumn,AgColumnGroup:()=>AgColumnGroup,AgInputDateField:()=>AgInputDateField,AgInputNumberField:()=>AgInputNumberField,AgInputNumberFieldSelector:()=>AgInputNumberFieldSelector,AgInputTextArea:()=>AgInputTextArea,AgInputTextField:()=>AgInputTextField,AgInputTextFieldSelector:()=>AgInputTextFieldSelector,AgPickerField:()=>AgPickerField,AgPromise:()=>AgPromise,AgProvidedColumnGroup:()=>AgProvidedColumnGroup,AgRadioButton:()=>AgRadioButton,AgSelect:()=>AgSelect,AgSelectSelector:()=>AgSelectSelector,AgToggleButton:()=>AgToggleButton,AgToggleButtonSelector:()=>AgToggleButtonSelector,AlignedGridsModule:()=>AlignedGridsModule,AllCommunityModule:()=>AllCommunityModule,AutoScrollService:()=>AutoScrollService,BaseColsService:()=>BaseColsService,BaseComponentWrapper:()=>BaseComponentWrapper,BaseCreator:()=>BaseCreator,BaseGridSerializingSession:()=>BaseGridSerializingSession,BaseSelectionService:()=>BaseSelectionService,BeanStub:()=>BeanStub,CellApiModule:()=>CellApiModule,CellRangeType:()=>CellRangeType,CellSpanModule:()=>CellSpanModule,CellStyleModule:()=>CellStyleModule,ChangedPath:()=>ChangedPath,CheckboxEditorModule:()=>CheckboxEditorModule,ClientSideRowModelApiModule:()=>ClientSideRowModelApiModule,ClientSideRowModelModule:()=>ClientSideRowModelModule,ColumnApiModule:()=>ColumnApiModule,ColumnAutoSizeModule:()=>ColumnAutoSizeModule,ColumnHoverModule:()=>ColumnHoverModule,ColumnKeyCreator:()=>ColumnKeyCreator,Component:()=>Component,CssClassManager:()=>CssClassManager,CsvExportModule:()=>CsvExportModule,CustomEditorModule:()=>CustomEditorModule,CustomFilterModule:()=>CustomFilterModule,DateEditorModule:()=>DateEditorModule,DateFilterModule:()=>DateFilterModule,DragAndDropModule:()=>DragAndDropModule,DragSourceType:()=>DragSourceType,EventApiModule:()=>EventApiModule,ExternalFilterModule:()=>ExternalFilterModule,FakeHScrollComp:()=>FakeHScrollComp,FakeVScrollComp:()=>FakeVScrollComp,FilterWrapperComp:()=>FilterWrapperComp,GROUP_AUTO_COLUMN_ID:()=>GROUP_AUTO_COLUMN_ID,GridBodyCtrl:()=>GridBodyCtrl,GridCoreCreator:()=>GridCoreCreator,GridCtrl:()=>GridCtrl,GridHeaderCtrl:()=>GridHeaderCtrl,GridStateModule:()=>GridStateModule,GroupInstanceIdCreator:()=>GroupInstanceIdCreator,HeaderRowContainerCtrl:()=>HeaderRowContainerCtrl,HighlightChangesModule:()=>HighlightChangesModule,InfiniteRowModelModule:()=>InfiniteRowModelModule,KeyCode:()=>KeyCode,LargeTextEditorModule:()=>LargeTextEditorModule,LocalEventService:()=>LocalEventService,LocaleModule:()=>LocaleModule,LocaleService:()=>LocaleService,ManagedFocusFeature:()=>ManagedFocusFeature,ModuleRegistry:()=>ModuleRegistry,NumberEditorModule:()=>NumberEditorModule,NumberFilterModule:()=>NumberFilterModule,PaginationModule:()=>PaginationModule,PinnedRowModule:()=>PinnedRowModule,PopupComponent:()=>PopupComponent,PositionableFeature:()=>PositionableFeature,ProvidedFilter:()=>ProvidedFilter,QuickFilterModule:()=>QuickFilterModule,ROW_NUMBERS_COLUMN_ID:()=>ROW_NUMBERS_COLUMN_ID,RefPlaceholder:()=>RefPlaceholder,RenderApiModule:()=>RenderApiModule,RowApiModule:()=>RowApiModule,RowAutoHeightModule:()=>RowAutoHeightModule,RowContainerCtrl:()=>RowContainerCtrl,RowDragModule:()=>RowDragModule,RowNode:()=>RowNode,RowSelectionModule:()=>RowSelectionModule,RowStyleModule:()=>RowStyleModule,SELECTION_COLUMN_ID:()=>SELECTION_COLUMN_ID,ScrollApiModule:()=>ScrollApiModule,SelectEditorModule:()=>SelectEditorModule,ServerSideTransactionResultStatus:()=>ServerSideTransactionResultStatus,TabGuardClassNames:()=>TabGuardClassNames,TabGuardComp:()=>TabGuardComp,TabGuardCtrl:()=>TabGuardCtrl,TabGuardFeature:()=>TabGuardFeature,TextEditorModule:()=>TextEditorModule,TextFilterModule:()=>TextFilterModule,TooltipFeature:()=>TooltipFeature,TooltipModule:()=>TooltipModule,TouchListener:()=>TouchListener,UndoRedoEditModule:()=>UndoRedoEditModule,ValidationModule:()=>ValidationModule,ValueCacheModule:()=>ValueCacheModule,VanillaFrameworkOverrides:()=>VanillaFrameworkOverrides,_ALL_EVENTS:()=>_ALL_EVENTS,_ALL_GRID_OPTIONS:()=>_ALL_GRID_OPTIONS,_BOOLEAN_MIXED_GRID_OPTIONS:()=>_BOOLEAN_MIXED_GRID_OPTIONS,_ColumnFilterModule:()=>ColumnFilterModule,_ColumnGroupModule:()=>ColumnGroupModule,_ColumnMoveModule:()=>ColumnMoveModule,_CsrmSsrmSharedApiModule:()=>CsrmSsrmSharedApiModule,_DragModule:()=>DragModule,_EditCoreModule:()=>EditCoreModule,_EmptyArray:()=>_EmptyArray,_EmptyBean:()=>EmptyBean,_FOCUS_MANAGED_CLASS:()=>FOCUS_MANAGED_CLASS,_FilterCoreModule:()=>FilterCoreModule,_FilterValueModule:()=>FilterValueModule,_HeaderComp:()=>HeaderComp,_HorizontalResizeModule:()=>HorizontalResizeModule,_KeyboardNavigationModule:()=>KeyboardNavigationModule,_PUBLIC_EVENTS:()=>_PUBLIC_EVENTS,_PopupModule:()=>PopupModule,_ROW_ID_PREFIX_ROW_GROUP:()=>ROW_ID_PREFIX_ROW_GROUP,_SharedDragAndDropModule:()=>SharedDragAndDropModule,_SharedExportModule:()=>SharedExportModule,_SharedMenuModule:()=>SharedMenuModule,_SharedRowSelectionModule:()=>SharedRowSelectionModule,_SortModule:()=>SortModule,_SsrmInfiniteSharedApiModule:()=>SsrmInfiniteSharedApiModule,_addColumnDefaultAndTypes:()=>_addColumnDefaultAndTypes,_addFocusableContainerListener:()=>_addFocusableContainerListener,_addGridCommonParams:()=>_addGridCommonParams,_anchorElementToMouseMoveEvent:()=>_anchorElementToMouseMoveEvent,_applyColumnState:()=>_applyColumnState,_areCellsEqual:()=>_areCellsEqual,_areColIdsEqual:()=>_areColIdsEqual,_areEqual:()=>_areEqual,_asThemeImpl:()=>_asThemeImpl,_batchCall:()=>_batchCall,_canSkipShowingRowGroup:()=>_canSkipShowingRowGroup,_clearElement:()=>_clearElement,_columnsMatch:()=>_columnsMatch,_combineAttributesAndGridOptions:()=>_combineAttributesAndGridOptions,_convertColumnEventSourceType:()=>_convertColumnEventSourceType,_createCellId:()=>_createCellId,_createColumnTree:()=>_createColumnTree,_createElement:()=>_createElement,_createGlobalRowEvent:()=>_createGlobalRowEvent,_createIcon:()=>_createIcon,_createIconNoSpan:()=>_createIconNoSpan,_debounce:()=>_debounce,_defaultComparator:()=>_defaultComparator,_destroyColumnTree:()=>_destroyColumnTree,_doOnce:()=>_doOnce,_downloadFile:()=>_downloadFile,_errMsg:()=>_errMsg,_error:()=>_error,_escapeString:()=>_escapeString,_exists:()=>_exists,_findFocusableElements:()=>_findFocusableElements,_findNextFocusableElement:()=>_findNextFocusableElement,_findTabbableParent:()=>_findTabbableParent,_flatten:()=>_flatten,_focusGridInnerElement:()=>_focusGridInnerElement,_focusInto:()=>_focusInto,_focusNextGridCoreContainer:()=>_focusNextGridCoreContainer,_formatNumberCommas:()=>_formatNumberCommas,_fuzzySuggestions:()=>_fuzzySuggestions,_getAbsoluteHeight:()=>_getAbsoluteHeight,_getAbsoluteWidth:()=>_getAbsoluteWidth,_getActiveDomElement:()=>_getActiveDomElement,_getAriaPosInSet:()=>_getAriaPosInSet,_getCallbackForEvent:()=>_getCallbackForEvent,_getCellByPosition:()=>_getCellByPosition,_getCellCtrlForEventTarget:()=>_getCellCtrlForEventTarget,_getCellPositionForEvent:()=>_getCellPositionForEvent,_getCellRendererDetails:()=>_getCellRendererDetails,_getCheckboxLocation:()=>_getCheckboxLocation,_getCheckboxes:()=>_getCheckboxes,_getClientSideRowModel:()=>_getClientSideRowModel,_getColumnState:()=>_getColumnState,_getColumnsFromTree:()=>_getColumnsFromTree,_getDefaultFloatingFilterType:()=>_getDefaultFloatingFilterType,_getDocument:()=>_getDocument,_getEditorRendererDetails:()=>_getEditorRendererDetails,_getFillHandle:()=>_getFillHandle,_getFilterDetails:()=>_getFilterDetails,_getFloatingFilterCompDetails:()=>_getFloatingFilterCompDetails,_getFloatingFiltersHeight:()=>getFloatingFiltersHeight,_getGlobalGridOption:()=>_getGlobalGridOption,_getGrandTotalRow:()=>_getGrandTotalRow,_getGridRegisteredModules:()=>_getGridRegisteredModules,_getGroupAggFiltering:()=>_getGroupAggFiltering,_getGroupSelection:()=>_getGroupSelection,_getGroupSelectsDescendants:()=>_getGroupSelectsDescendants,_getGroupTotalRowCallback:()=>_getGroupTotalRowCallback,_getGroupingApproach:()=>_getGroupingApproach,_getHeaderCheckbox:()=>_getHeaderCheckbox,_getHeaderClassesFromColDef:()=>_getHeaderClassesFromColDef,_getHeaderRowCount:()=>getHeaderRowCount,_getInnerCellRendererDetails:()=>_getInnerCellRendererDetails,_getInnerHeight:()=>_getInnerHeight,_getInnerWidth:()=>_getInnerWidth,_getIsRowSelectable:()=>_getIsRowSelectable,_getLocaleTextFunc:()=>_getLocaleTextFunc,_getMaxConcurrentDatasourceRequests:()=>_getMaxConcurrentDatasourceRequests,_getNormalisedMousePosition:()=>_getNormalisedMousePosition,_getPageBody:()=>_getPageBody,_getRootNode:()=>_getRootNode,_getRowAbove:()=>_getRowAbove,_getRowBelow:()=>_getRowBelow,_getRowContainerClass:()=>_getRowContainerClass,_getRowContainerOptions:()=>_getRowContainerOptions,_getRowHeightAsNumber:()=>_getRowHeightAsNumber,_getRowHeightForNode:()=>_getRowHeightForNode,_getRowIdCallback:()=>_getRowIdCallback,_getRowNode:()=>_getRowNode,_getRowSelectionMode:()=>_getRowSelectionMode,_getRowSpanContainerClass:()=>_getRowSpanContainerClass,_getRowViewportClass:()=>_getRowViewportClass,_getServerSideRowModel:()=>_getServerSideRowModel,_getShouldDisplayTooltip:()=>_getShouldDisplayTooltip,_getSuppressMultiRanges:()=>_getSuppressMultiRanges,_getToolPanelClassesFromColDef:()=>_getToolPanelClassesFromColDef,_isAnimateRows:()=>_isAnimateRows,_isCellSelectionEnabled:()=>_isCellSelectionEnabled,_isClientSideRowModel:()=>_isClientSideRowModel,_isColumnMenuAnchoringEnabled:()=>_isColumnMenuAnchoringEnabled,_isColumnsSortingCoupledToGroup:()=>_isColumnsSortingCoupledToGroup,_isDomLayout:()=>_isDomLayout,_isElementInEventPath:()=>_isElementInEventPath,_isEventFromPrintableCharacter:()=>_isEventFromPrintableCharacter,_isGetRowHeightFunction:()=>_isGetRowHeightFunction,_isGroupMultiAutoColumn:()=>_isGroupMultiAutoColumn,_isGroupRowsSticky:()=>_isGroupRowsSticky,_isGroupUseEntireRow:()=>_isGroupUseEntireRow,_isIOSUserAgent:()=>_isIOSUserAgent,_isKeyboardMode:()=>_isKeyboardMode,_isLegacyMenuEnabled:()=>_isLegacyMenuEnabled,_isMultiRowSelection:()=>_isMultiRowSelection,_isNodeOrElement:()=>_isNodeOrElement,_isNothingFocused:()=>_isNothingFocused,_isPromise:()=>_isPromise,_isRowBefore:()=>_isRowBefore,_isRowSelection:()=>_isRowSelection,_isSameRow:()=>_isSameRow,_isServerSideRowModel:()=>_isServerSideRowModel,_isShowTooltipWhenTruncated:()=>_isShowTooltipWhenTruncated,_isStopPropagationForAgGrid:()=>_isStopPropagationForAgGrid,_isUsingNewCellSelectionAPI:()=>_isUsingNewCellSelectionAPI,_isUsingNewRowSelectionAPI:()=>_isUsingNewRowSelectionAPI,_isVisible:()=>_isVisible,_jsonEquals:()=>_jsonEquals,_last:()=>_last,_loadTemplate:()=>_loadTemplate,_makeNull:()=>_makeNull,_mergeDeep:()=>_mergeDeep,_missing:()=>_missing,_observeResize:()=>_observeResize,_parseDateTimeFromString:()=>_parseDateTimeFromString,_preInitErrMsg:()=>_preInitErrMsg,_preserveRangesWhile:()=>_preserveRangesWhile,_processOnChange:()=>_processOnChange,_radioCssClass:()=>_radioCssClass,_removeAriaExpanded:()=>_removeAriaExpanded,_removeAriaSort:()=>_removeAriaSort,_removeFromArray:()=>_removeFromArray,_removeFromParent:()=>_removeFromParent,_requestAnimationFrame:()=>_requestAnimationFrame,_resetColumnState:()=>_resetColumnState,_selectAllCells:()=>_selectAllCells,_serialiseDate:()=>_serialiseDate,_setAriaActiveDescendant:()=>_setAriaActiveDescendant,_setAriaChecked:()=>_setAriaChecked,_setAriaColCount:()=>_setAriaColCount,_setAriaColIndex:()=>_setAriaColIndex,_setAriaColSpan:()=>_setAriaColSpan,_setAriaControls:()=>_setAriaControls,_setAriaDescribedBy:()=>_setAriaDescribedBy,_setAriaDisabled:()=>_setAriaDisabled,_setAriaExpanded:()=>_setAriaExpanded,_setAriaHasPopup:()=>_setAriaHasPopup,_setAriaHidden:()=>_setAriaHidden,_setAriaLabel:()=>_setAriaLabel,_setAriaLabelledBy:()=>_setAriaLabelledBy,_setAriaLevel:()=>_setAriaLevel,_setAriaPosInSet:()=>_setAriaPosInSet,_setAriaRole:()=>_setAriaRole,_setAriaRowCount:()=>_setAriaRowCount,_setAriaRowIndex:()=>_setAriaRowIndex,_setAriaSelected:()=>_setAriaSelected,_setAriaSetSize:()=>_setAriaSetSize,_setAriaSort:()=>_setAriaSort,_setColMenuVisible:()=>_setColMenuVisible,_setDisabled:()=>_setDisabled,_setDisplayed:()=>_setDisplayed,_setFixedWidth:()=>_setFixedWidth,_setUmd:()=>_setUmd,_setVisible:()=>_setVisible,_shouldDisplayTooltip:()=>_shouldDisplayTooltip,_shouldUpdateColVisibilityAfterGroup:()=>_shouldUpdateColVisibilityAfterGroup,_stopPropagationForAgGrid:()=>_stopPropagationForAgGrid,_toStringOrNull:()=>_toStringOrNull,_unwrapUserComp:()=>_unwrapUserComp,_updateColsMap:()=>_updateColsMap,_updateColumnState:()=>_updateColumnState,_waitUntil:()=>_waitUntil,_warn:()=>_warn,_warnOnce:()=>_warnOnce,buttonStyleAlpine:()=>buttonStyleAlpine,buttonStyleBalham:()=>buttonStyleBalham,buttonStyleBase:()=>buttonStyleBase,buttonStyleQuartz:()=>buttonStyleQuartz,checkboxStyleDefault:()=>checkboxStyleDefault,colorSchemeDark:()=>colorSchemeDark,colorSchemeDarkBlue:()=>colorSchemeDarkBlue,colorSchemeDarkWarm:()=>colorSchemeDarkWarm,colorSchemeLight:()=>colorSchemeLight,colorSchemeLightCold:()=>colorSchemeLightCold,colorSchemeLightWarm:()=>colorSchemeLightWarm,colorSchemeVariable:()=>colorSchemeVariable,columnDropStyleBordered:()=>columnDropStyleBordered,columnDropStylePlain:()=>columnDropStylePlain,createGrid:()=>createGrid,createPart:()=>createPart,createTheme:()=>createTheme,iconOverrides:()=>iconOverrides,iconSetAlpine:()=>iconSetAlpine,iconSetMaterial:()=>iconSetMaterial,iconSetQuartz:()=>iconSetQuartz,iconSetQuartzBold:()=>iconSetQuartzBold,iconSetQuartzLight:()=>iconSetQuartzLight,iconSetQuartzRegular:()=>iconSetQuartzRegular,inputStyleBase:()=>inputStyleBase,inputStyleBordered:()=>inputStyleBordered,inputStyleUnderlined:()=>inputStyleUnderlined,isColumn:()=>isColumn,isColumnGroup:()=>isColumnGroup2,isColumnGroupAutoCol:()=>isColumnGroupAutoCol,isColumnSelectionCol:()=>isColumnSelectionCol,isProvidedColumnGroup:()=>isProvidedColumnGroup,isRowNumberCol:()=>isRowNumberCol,provideGlobalGridOptions:()=>provideGlobalGridOptions,styleMaterial:()=>styleMaterial,tabStyleAlpine:()=>tabStyleAlpine,tabStyleBase:()=>tabStyleBase,tabStyleMaterial:()=>tabStyleMaterial,tabStyleQuartz:()=>tabStyleQuartz,tabStyleRolodex:()=>tabStyleRolodex,themeAlpine:()=>themeAlpine,themeBalham:()=>themeBalham,themeMaterial:()=>themeMaterial,themeQuartz:()=>themeQuartz}),module.exports=__toCommonJS(main_exports);var LocalEventService=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function defaultLocaleTextFunc(e,t){return t}function _getLocaleTextFunc(e){return e?.getLocaleTextFunc()??defaultLocaleTextFunc}function _toggleAriaAttribute(e,t,i){i==null||typeof i=="string"&&i==""?_removeAriaAttribute(e,t):_setAriaAttribute(e,t,i)}function _setAriaAttribute(e,t,i){e.setAttribute(_ariaAttributeName(t),i.toString())}function _removeAriaAttribute(e,t){e.removeAttribute(_ariaAttributeName(t))}function _ariaAttributeName(e){return`aria-${e}`}function _setAriaRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function _getAriaSortState(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function _getAriaPosInSet(e){return parseInt(e.getAttribute("aria-posinset"),10)}function _getAriaLabel(e){return e.getAttribute("aria-label")}function _setAriaLabel(e,t){_toggleAriaAttribute(e,"label",t)}function _setAriaLabelledBy(e,t){_toggleAriaAttribute(e,"labelledby",t)}function _setAriaDescribedBy(e,t){_toggleAriaAttribute(e,"describedby",t)}function _setAriaLive(e,t){_toggleAriaAttribute(e,"live",t)}function _setAriaAtomic(e,t){_toggleAriaAttribute(e,"atomic",t)}function _setAriaRelevant(e,t){_toggleAriaAttribute(e,"relevant",t)}function _setAriaLevel(e,t){_toggleAriaAttribute(e,"level",t)}function _setAriaDisabled(e,t){_toggleAriaAttribute(e,"disabled",t)}function _setAriaHidden(e,t){_toggleAriaAttribute(e,"hidden",t)}function _setAriaActiveDescendant(e,t){_toggleAriaAttribute(e,"activedescendant",t)}function _setAriaExpanded(e,t){_setAriaAttribute(e,"expanded",t)}function _removeAriaExpanded(e){_removeAriaAttribute(e,"expanded")}function _setAriaSetSize(e,t){_setAriaAttribute(e,"setsize",t)}function _setAriaPosInSet(e,t){_setAriaAttribute(e,"posinset",t)}function _setAriaMultiSelectable(e,t){_setAriaAttribute(e,"multiselectable",t)}function _setAriaRowCount(e,t){_setAriaAttribute(e,"rowcount",t)}function _setAriaRowIndex(e,t){_setAriaAttribute(e,"rowindex",t)}function _setAriaRowSpan(e,t){_setAriaAttribute(e,"rowspan",t)}function _setAriaColCount(e,t){_setAriaAttribute(e,"colcount",t)}function _setAriaColIndex(e,t){_setAriaAttribute(e,"colindex",t)}function _setAriaColSpan(e,t){_setAriaAttribute(e,"colspan",t)}function _setAriaSort(e,t){_setAriaAttribute(e,"sort",t)}function _removeAriaSort(e){_removeAriaAttribute(e,"sort")}function _setAriaSelected(e,t){_toggleAriaAttribute(e,"selected",t)}function _setAriaChecked(e,t){_setAriaAttribute(e,"checked",t===void 0?"mixed":t)}function _setAriaControls(e,t){_toggleAriaAttribute(e,"controls",t.id),_setAriaLabelledBy(t,e.id)}function _setAriaHasPopup(e,t){_toggleAriaAttribute(e,"haspopup",t===!1?null:t)}function _getAriaCheckboxStateName(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var isSafari,isFirefox,isMacOs,isIOS,invisibleScrollbar,browserScrollbarWidth,maxDivHeight;function _isBrowserSafari(){return isSafari===void 0&&(isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),isSafari}function _isBrowserFirefox(){return isFirefox===void 0&&(isFirefox=/(firefox)/i.test(navigator.userAgent)),isFirefox}function _isMacOsUserAgent(){return isMacOs===void 0&&(isMacOs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),isMacOs}function _isIOSUserAgent(){return isIOS===void 0&&(isIOS=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),isIOS}function _getTabIndex(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!_isBrowserFirefox())?null:t.toString()}function _getMaxDivHeight(){if(maxDivHeight!==void 0)return maxDivHeight;if(!document.body)return-1;let e=1e6;const t=_isBrowserFirefox()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),maxDivHeight=e,e}function _getScrollbarWidth(){return browserScrollbarWidth==null&&initScrollbarWidthAndVisibility(),browserScrollbarWidth}function initScrollbarWidthAndVisibility(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(browserScrollbarWidth=i,invisibleScrollbar=i===0)}function _isInvisibleScrollbar(){return invisibleScrollbar==null&&initScrollbarWidthAndVisibility(),invisibleScrollbar}function _radioCssClass(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea, [href]",FOCUSABLE_EXCLUDE="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _isFocusableFormField(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,FOCUSABLE_EXCLUDE),n=_isVisible(e);return s&&!o&&n}function _setDisplayed(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||_setAriaHidden(e,!t)}function _setVisible(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||_setAriaHidden(e,!t)}function _setDisabled(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);const o=e.querySelectorAll("input")??[];for(const n of o)s(n)}function _isElementChildOfClass(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function _getElementSize(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function _getInnerHeight(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function _getInnerWidth(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function _getAbsoluteHeight(e){const{height:t,marginBottom:i,marginTop:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getAbsoluteWidth(e){const{width:t,marginLeft:i,marginRight:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getElementRectWithOffset(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=_getElementSize(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function _getScrollLeft(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function _setScrollLeft(e,t,i){i&&(t*=-1),e.scrollLeft=t}function _clearElement(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function _removeFromParent(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!_isInDOM(e)||window.getComputedStyle(e).visibility!=="visible")}function _loadTemplate(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function _ensureDomOrder(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _setDomChildOrder(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function _camelCaseToHyphenated(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function _addStylesToElement(e,t){if(t)for(const i of Object.keys(t)){const s=t[i];if(!i||!i.length||s==null)continue;const o=_camelCaseToHyphenated(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function _isHorizontalScrollShowing(e){return e.clientWidth<e.scrollWidth}function _isVerticalScrollShowing(e){return e.clientHeight<e.scrollHeight}function _setElementWidth(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_setFixedWidth(e,t)}function _setFixedWidth(e,t){t=_formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function _setFixedHeight(e,t){t=_formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function _formatSize(e){return typeof e=="number"?`${e}px`:e}function _isNodeOrElement(e){return e instanceof Node||e instanceof HTMLElement}function _addOrRemoveAttribute(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function _observeResize(e,t,i){const o=_getWindow(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function _getTextSelectionRanges(e){const t=_getRootNode(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function _preserveRangesWhile(e,t){if(!e.gos.get("enableCellTextSelection")||!_isBrowserFirefox()&&!_isBrowserSafari())return t();const{selection:s,ranges:o}=_getTextSelectionRanges(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}function _requestAnimationFrame(e,t){const i=_getWindow(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var DataRefAttribute="data-ref",whitespaceNode;function getWhitespaceNode(){return whitespaceNode??(whitespaceNode=document.createTextNode(" ")),whitespaceNode.cloneNode()}function _createElement(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(DataRefAttribute,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(getWhitespaceNode()),l=!1),a.append(_createElement(d)),a.appendChild(getWhitespaceNode())))}return a}function _makeNull(e){return e==null||e===""?null:e}function _exists(e){return e!=null&&e!==""}function _missing(e){return!_exists(e)}function _toStringOrNull(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _jsonEquals(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function _defaultComparator(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var BASE_URL="https://www.ag-grid.com",doOnceFlags={};function _doOnce(e,t){doOnceFlags[t]||(e(),doOnceFlags[t]=!0)}function _logIfDebug(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function _warnOnce(e,...t){_doOnce(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function _errorOnce(e,...t){_doOnce(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var batchedCallsSetTimeout={pending:!1,funcs:[]},batchedCallsRaf={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",i){const s=t==="raf"?batchedCallsRaf:batchedCallsSetTimeout;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?_requestAnimationFrame(i,o):window.setTimeout(o,0)}function _debounce(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function _throttle(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function _waitUntil(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&_warnOnce(s))};a(),r||(n=window.setInterval(a,10))}var VERSION="33.2.4",MAX_URL_LENGTH=2e3,MIN_PARAM_LENGTH=100,VERSION_PARAM_NAME="_version_",validation=null,suppressAllLogging=!1,baseDocLink=`${BASE_URL}/javascript-data-grid`;function provideValidationServiceLogger(e){validation=e}function setValidationDocLink(e){baseDocLink=e}function getErrorParts(e,t,i){return validation?.getConsoleMessage(e,t)??[minifiedLog(e,t,i)]}function getMsgOrDefault(e,t,i,s){suppressAllLogging||e(`error #${t}`,...getErrorParts(t,i,s))}function stringifyObject(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function stringifyValue(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=stringifyObject(e)),t}function toStringWithNullUndefined(e){return e===void 0?"undefined":e===null?"null":e}function getParamsUrl(e,t){return`${e}?${t.toString()}`}function truncateUrl(e,t,i){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=getParamsUrl(e,t);for(const[n,r]of s){if(n===VERSION_PARAM_NAME)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>MIN_PARAM_LENGTH?r.slice(0,r.length-d)+l:r.slice(0,MIN_PARAM_LENGTH)+l;t.set(n,c),o=getParamsUrl(e,t)}return o}function getErrorLink(e,t){const i=new URLSearchParams;if(i.append(VERSION_PARAM_NAME,VERSION),t)for(const n of Object.keys(t))i.append(n,stringifyValue(t[n]));const s=`${baseDocLink}/errors/${e}`,o=getParamsUrl(s,i);return o.length<=MAX_URL_LENGTH?o:truncateUrl(s,i,MAX_URL_LENGTH)}var minifiedLog=(e,t,i)=>{const s=getErrorLink(e,t);return`${i?i+`
5
2
  `:""}Visit ${s}${i?"":`
6
3
  Alternatively register the ValidationModule to see the full message in the console.`}`};function _warn(...e){getMsgOrDefault(_warnOnce,e[0],e[1])}function _error(...e){getMsgOrDefault(_errorOnce,e[0],e[1])}function _logPreInitErr(e,t,i){getMsgOrDefault(_errorOnce,e,t,i)}function getErrMsg(e,t){const i=t[0];return`error #${i} `+getErrorParts(i,t[1],e).join(" ")}function _errMsg(...e){return getErrMsg(void 0,e)}function _preInitErrMsg(...e){return getErrMsg(`
7
4
  `,e)}function isRowModelType(e,t){return e.get("rowModelType")===t}function _isClientSideRowModel(e,t){return isRowModelType(e,"clientSide")}function _isServerSideRowModel(e,t){return isRowModelType(e,"serverSide")}function _isDomLayout(e,t){return e.get("domLayout")===t}function _isRowSelection(e){return _getRowSelectionMode(e)!==void 0}function _isGetRowHeightFunction(e){return typeof e.get("getRowHeight")=="function"}function _shouldMaintainColumnOrder(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function _getRowHeightForNode(e,t,i=!1,s){const{gos:o,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),_isGetRowHeightFunction(o)){if(i)return{height:s,estimated:!0};const l={node:t,data:t.data},d=o.getCallback("getRowHeight")(l);if(isNumeric(d))return d===0&&_warn(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&o.get("masterDetail"))return getMasterDetailRowHeight(o);const r=o.get("rowHeight");return{height:r&&isNumeric(r)?r:s,estimated:!1}}function getMasterDetailRowHeight(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return isNumeric(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function _getRowHeightAsNumber(e){const{environment:t,gos:i}=e,s=i.get("rowHeight");if(!s||_missing(s))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(_warn(24),t.getDefaultRowHeight())}function isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function _getDomData(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function _setDomData(e,t,i,s){const o=e.getDomDataKey();let n=t[o];_missing(n)&&(n={},t[o]=n),n[i]=s}function _getDocument(e){const{gos:t,eGridDiv:i}=e;let s=null;const o=t.get("getDocument");return o&&_exists(o)?s=o():i&&(s=i.ownerDocument),s&&_exists(s)?s:document}function _getWindow(e){return _getDocument(e).defaultView||window}function _getRootNode(e){return e.eGridDiv.getRootNode()}function _getActiveDomElement(e){return _getRootNode(e).activeElement}function _getPageBody(e){let t=null,i=null;try{t=_getDocument(e).fullscreenElement}catch{}finally{t||(t=_getRootNode(e));const s=t.querySelector("body");s?i=s:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function _getBodyWidth(e){return _getPageBody(e)?.clientWidth??(window.innerHeight||-1)}function _getBodyHeight(e){return _getPageBody(e)?.clientHeight??(window.innerHeight||-1)}function _anchorElementToMouseMoveEvent(e,t,i){const o=e.getBoundingClientRect().height,n=_getBodyWidth(i)-2,r=_getBodyHeight(i)-2;if(!e.offsetParent)return;const l=_getElementRectWithOffset(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-o/2,h=c-l.left-10;const g=_getDocument(i),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,m=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function _isNothingFocused(e){const t=_getDocument(e),i=_getActiveDomElement(e);return i===null||i===t.body}function _isAnimateRows(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function _isGroupRowsSticky(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||_isDomLayout(e,"print"))}function _isColumnsSortingCoupledToGroup(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function _getGroupAggFiltering(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function _getGrandTotalRow(e){return e.get("grandTotalRow")}function _getGroupTotalRowCallback(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function _isGroupMultiAutoColumn(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function _isGroupUseEntireRow(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function _getRowIdCallback(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(_warn(25,{id:s}),s=String(s)),s}}function _canSkipShowingRowGroup(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function _getMaxConcurrentDatasourceRequests(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function _shouldUpdateColVisibilityAfterGroup(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const s=e.get("suppressRowGroupHidesColumns");if(t&&s===!0)return!1;const o=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&o===!0)}function _getCheckboxes(e){return e?.checkboxes??!0}function _getHeaderCheckbox(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function _getCheckboxLocation(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function _getHideDisabledCheckboxes(e){return e?.hideDisabledCheckboxes??!1}function _isUsingNewRowSelectionAPI(e){return typeof e.get("rowSelection")!="string"}function _isUsingNewCellSelectionAPI(e){return e.get("cellSelection")!==void 0}function _getSuppressMultiRanges(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function _isCellSelectionEnabled(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function _getFillHandle(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function _getEnableClickSelection(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function _getEnableSelection(e){const t=_getEnableClickSelection(e);return t===!0||t==="enableSelection"}function _getEnableDeselection(e){const t=_getEnableClickSelection(e);return t===!0||t==="enableDeselection"}function _getIsRowSelectable(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function _getRowSelectionMode(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function _isMultiRowSelection(e){return _getRowSelectionMode(e)==="multiRow"}function _getEnableSelectionWithoutKeys(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function _getGroupSelection(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function _getSelectAll(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function _getGroupSelectsDescendants(e){const t=_getGroupSelection(e);return t==="descendants"||t==="filteredDescendants"}function _getMasterSelects(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function _isSetFilterByDefault(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function _isLegacyMenuEnabled(e){return e.get("columnMenu")==="legacy"}function _isColumnMenuAnchoringEnabled(e){return!_isLegacyMenuEnabled(e)}function _getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function _combineAttributesAndGridOptions(e,t,i){typeof e!="object"&&(e={});const s={...e};return i.forEach(o=>{const n=t[o];typeof n<"u"&&(s[o]=n)}),s}function _processOnChange(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function _addGridCommonParams(e,t){return e.addGridCommonParams(t)}function _getGroupingApproach(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var AG_GRID_STOP_PROPAGATION="__ag_Grid_Stop_Propagation",PASSIVE_EVENTS=["touchstart","touchend","touchmove","touchcancel","scroll"],NON_PASSIVE_EVENTS=["wheel"],supports={};function _stopPropagationForAgGrid(e){e[AG_GRID_STOP_PROPAGATION]=!0}function _isStopPropagationForAgGrid(e){return e[AG_GRID_STOP_PROPAGATION]===!0}var _isEventSupported=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof supports[i]=="boolean")return supports[i];const s=document.createElement(e[i]||"div");return i="on"+i,supports[i]=i in s}})();function _getCtrlForEventTarget(e,t,i){let s=t;for(;s;){const o=_getDomData(e,s,i);if(o)return o;s=s.parentElement}return null}function _isElementInEventPath(e,t){return!t||!e?!1:_getEventPath(t).indexOf(e)>=0}function _createEventPath(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function _getEventPath(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():_createEventPath(t)}function _addSafePassiveEventListener(e,t,i,s){const o=getPassiveStateForEvent(i);let n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,i,s,n)}var getPassiveStateForEvent=e=>{const t=PASSIVE_EVENTS.includes(e),i=NON_PASSIVE_EVENTS.includes(e);if(t)return!0;if(i)return!1},BeanStub=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new LocalEventService),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService?.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s of Object.keys(t)){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let s;return isAgEventEmitter(e)?(e.__addEventListener(t,i),s=()=>(e.__removeEventListener(t,i),null)):(e instanceof HTMLElement?_addSafePassiveEventListener(this.beans.frameworkOverrides,e,t,i):e.addEventListener(t,i),s=()=>(e.removeEventListener(t,i),null)),this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const s=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}getLocaleTextFunc(){return _getLocaleTextFunc(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function isAgEventEmitter(e){return e.__addEventListener!==void 0}var SKIP_JS_BUILTINS=new Set(["__proto__","constructor","prototype"]);function _iterateObject(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const i of Object.keys(e))t(i,e[i])}}function _mergeDeep(e,t,i=!0,s=!1){_exists(t)&&_iterateObject(t,(o,n)=>{if(SKIP_JS_BUILTINS.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),_isNonNullObject(n)&&_isNonNullObject(r)&&!Array.isArray(r)?_mergeDeep(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function _getValueUsingField(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function _isNonNullObject(e){return typeof e=="object"&&e!==null}var reUnescapedHtml=/[&<>"']/g,HTML_ESCAPES={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function _escapeString(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(reUnescapedHtml,s=>HTML_ESCAPES[s])}var COL_DEF_DEFAULTS={resizable:!0,sortable:!0},instanceIdSequence=0;function getNextColInstanceId(){return instanceIdSequence++}function isColumn(e){return e instanceof AgColumn}var AgColumn=class extends BeanStub{constructor(e,t,i,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.isColumn=!0,this.instanceId=getNextColInstanceId(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new LocalEventService,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=_escapeString(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:s}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=_exists(t)&&t.indexOf(".")>=0&&!s,this.tooltipFieldContainsDots=_exists(i)&&i.indexOf(".")>=0&&!s}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=e.width,s=e.initialWidth;return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??COL_DEF_DEFAULTS[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}createColumnEvent(e,t){return _addGridCommonParams(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return _missing(this.sort)}isSorting(){return _exists(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return _warn(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(_missing(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(_missing(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,i){const s=this.createColumnEvent(e,t);i&&_mergeDeep(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function isProvidedColumnGroup(e){return e instanceof AgProvidedColumnGroup}var AgProvidedColumnGroup=class extends BeanStub{constructor(e,t,i,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=getNextColInstanceId(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{isColumn(t)?e.push(t):isProvidedColumnGroup(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const a=s[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{isProvidedColumnGroup(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},DefaultColumnTypes={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},ColumnKeyCreator=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=_toStringOrNull(e);let i=0;for(;;){let s=e??t;if(s?i!==0&&(s+="_"+i):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},_EmptyArray=Object.freeze([]);function _last(e){if(e?.length)return e[e.length-1]}function _areEqual(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function _forAll(e,t){if(e)for(const i of e)t(i)}function _removeFromArray(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function _moveInArray(e,t,i){for(let s=0;s<t.length;s++)_removeFromArray(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(i,0,t[s])}function _flatten(e){return[].concat.apply([],e)}var GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",SELECTION_COLUMN_ID="ag-Grid-SelectionColumn",ROW_NUMBERS_COLUMN_ID="ag-Grid-RowNumbersColumn";function _getColumnsFromTree(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];isColumn(n)?t.push(n):isProvidedColumnGroup(n)&&i(n.getChildren())}};return i(e),t}function getWidthOfColsInList(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function _destroyColumnTree(e,t,i){const s={};if(!t)return;depthFirstOriginalTreeSearch(null,t,n=>{s[n.getInstanceId()]=n}),i&&depthFirstOriginalTreeSearch(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(o)}function isColumnGroupAutoCol(e){return e.getId().startsWith(GROUP_AUTO_COLUMN_ID)}function isColumnSelectionCol(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(SELECTION_COLUMN_ID)??!1}function isRowNumberCol(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(ROW_NUMBERS_COLUMN_ID)??!1}function convertColumnTypes(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function _areColIdsEqual(e,t){return _areEqual(e,t,(i,s)=>i.getColId()===s.getColId())}function _updateColsMap(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function _convertColumnEventSourceType(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function _columnsMatch(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}var getValueFactory=(e,t)=>(i,s)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(o.value1=e[i],n=!0),_exists(s)&&e[s]!==void 0&&(o.value2=e[s],n=!0)),!n&&t&&(t[i]!==void 0&&(o.value1=t[i]),_exists(s)&&t[s]!==void 0&&(o.value2=t[s])),o};function _createColumnTree(e,t=null,i,s,o){const n=new ColumnKeyCreator,{existingCols:r,existingGroups:a,existingColKeys:l}=extractExistingTreeData(s);n.addExistingKeys(l);const d=_recursivelyCreateColumns(e,t,0,i,r,n,a,o),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return depthFirstOriginalTreeSearch(null,h,(p,f)=>{isProvidedColumnGroup(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDept:u}}function extractExistingTreeData(e){const t=[],i=[],s=[];return e&&depthFirstOriginalTreeSearch(null,e,o=>{if(isProvidedColumnGroup(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}function _recursivelyCreateColumns(e,t,i,s,o,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&isColumnGroup(u)?d[c]=l.createProvidedColumnGroup(s,u,i,o,n,r,a):d[c]=createColumn(e,s,u,o,n,a)}return d}function createColumn(e,t,i,s,o,n){const r=findExistingColumn(i,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=_addColumnDefaultAndTypes(e,i,a.getColId());a.setColDef(l,i,n),_updateColumnState(e,a,l,n)}else{const l=o.getUniqueKey(i.colId,i.field),d=_addColumnDefaultAndTypes(e,i,l);a=new AgColumn(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function updateSomeColumnState(e,t,i,s,o,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,a),l&&(l.updateColSort(t,s,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function _updateColumnState(e,t,i,s){updateSomeColumnState(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);const o=t.getFlex();if(!(o!=null&&o>0))if(i.width!=null)t.setActualWidth(i.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}function _addColumnDefaultAndTypes(e,t,i,s){const{gos:o,dataTypeSvc:n,validation:r}=e,a={},l=o.get("defaultColDef");_mergeDeep(a,l,!1,!0);const d=updateColDefAndGetColumnType(e,a,t,i);d&&assignColumnTypes(e,d,a),_mergeDeep(a,t,!1,!0);const c=o.get("autoGroupColumnDef"),u=_isColumnsSortingCoupledToGroup(o);return t.rowGroup&&c&&u&&_mergeDeep(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(a),r?.validateColDef(a,i,s),a}function updateColDefAndGetColumnType(e,t,i,s){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,s),n=i.type??o??t.type;return t.type=n,n?convertColumnTypes(n):void 0}function assignColumnTypes(e,t,i){if(!t.length)return;const s=Object.assign({},DefaultColumnTypes),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in s?_warn(34,{key:n}):(r.type&&_warn(35),s[n]=r)}t.forEach(n=>{const r=s[n.trim()];r?_mergeDeep(i,r,!1,!0):_warn(36,{t:n})})}function isColumnGroup(e){return e.children!==void 0}function depthFirstOriginalTreeSearch(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];isProvidedColumnGroup(o)&&depthFirstOriginalTreeSearch(o,o.getChildren(),i),i(o,e)}}function placeLockedColumns(e,t){const i=[],s=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?i.push(r):s.push(r)}),t.get("enableRtl")?[...o,...s,...i]:[...i,...s,...o]}function doesMovePassMarryChildren(e,t){let i=!0;return depthFirstOriginalTreeSearch(null,t,s=>{if(!isProvidedColumnGroup(s))return;const o=s,n=o.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=o.getLeafColumns().length-1;c>u&&(i=!1)}),i}function getCommonValue(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}function dispatchColumnPinnedEvent(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=getCommonValue(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:s,source:i})}function dispatchColumnVisibleEvent(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=getCommonValue(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:s,source:i})}function dispatchColumnChangedEvent(e,t,i,s){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:s})}function dispatchColumnResizedEvent(e,t,i,s,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:i,source:s})}function _applyColumnState(e,t,i){const{colModel:s,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=s.getColDefCols()||[];if(!f?.length)return!1;if(t?.state&&!t.state.forEach)return _warn(32),!1;const m=(b,y,S,x,F)=>{if(!b)return;const R=getValueFactory(y,t.defaultState),E=R("flex").value1;if(updateSomeColumnState(e,b,R("hide").value1,R("sort").value1,R("sortIndex").value1,R("pinned").value1,E,i),E==null){const D=R("width").value1;if(D!=null){const A=b.getColDef().minWidth??u.getDefaultColumnMinWidth();A!=null&&D>=A&&b.setActualWidth(D,i)}}F||!b.isPrimary()||(h?.syncColumnWithState(b,i,R),o?.syncColumnWithState(b,i,R,S),n?.syncColumnWithState(b,i,R,x))},C=(b,y,S)=>{const x=_compareColumnStatesAndDispatchEvents(e,i),F=y.slice(),R={},E={},D=[],A=[],T=[];let M=0;const G=o?.columns.slice()??[],W=n?.columns.slice()??[];b.forEach(P=>{const L=P.colId;if(L.startsWith(GROUP_AUTO_COLUMN_ID)){D.push(P),T.push(P);return}if(isColumnSelectionCol(L)){A.push(P),T.push(P);return}const k=S(L);k?(m(k,P,R,E,!1),_removeFromArray(F,k)):(T.push(P),M+=1)});const B=P=>m(P,null,R,E,!1);F.forEach(B),o?.sortColumns(comparatorByIndex.bind(o,R,G)),n?.sortColumns(comparatorByIndex.bind(n,E,W)),s.refreshCols(!1);const V=(P,L,H=[])=>{L.forEach(k=>{const N=P(k.colId);_removeFromArray(H,N),m(N,k,null,null,!0)}),H.forEach(B)};return V(P=>r?.getColumn(P)??null,D,r?.getColumns()?.slice()),V(P=>a?.getColumn(P)??null,A,a?.getColumns()?.slice()),orderLiveColsLikeState(t,s,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),x(),{unmatchedAndAutoStates:T,unmatchedCount:M}};l?.start();let{unmatchedAndAutoStates:w,unmatchedCount:v}=C(t.state||[],f,b=>s.getColDefCol(b));if(w.length>0||_exists(t.defaultState)){const b=c?.getPivotResultCols()?.list??[];v=C(w,b,y=>c?.getPivotResultCol(y)??null).unmatchedCount}return l?.finish(),v===0}function _resetColumnState(e,t){const{colModel:i,autoColSvc:s,selectionColSvc:o}=e,n=i.getColDefCols();if(!n?.length)return;const r=i.getColDefColTree(),a=_getColumnsFromTree(r),l=[];let d=1e3,c=1e3;const u=m=>{const C=getColumnStateFromColDef(m);_missing(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=d++),_missing(C.pivotIndex)&&C.pivot&&(C.pivotIndex=c++),l.push(C)};s?.getColumns()?.forEach(u),o?.getColumns()?.forEach(u),a?.forEach(u),_applyColumnState(e,{state:l},t);const h=s?.getColumns()??[],f=[...o?.getColumns()??[],...h,...n].map(m=>({colId:m.colId}));_applyColumnState(e,{state:f,applyOrder:!0},t)}function _compareColumnStatesAndDispatchEvents(e,t){const{rowGroupColsSvc:i,pivotColsSvc:s,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:i?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},d=_getColumnState(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(S,x,F,R)=>{const E=x.map(R),D=F.map(R);if(_areEqual(E,D))return;const T=new Set(x);F.forEach(G=>{T.delete(G)||T.add(G)});const M=[...T];a.dispatchEvent({type:S,columns:M,column:M.length===1?M[0]:null,source:t})},h=S=>{const x=[];return n.forAllCols(F=>{const R=c[F.getColId()];R&&S(R,F)&&x.push(F)}),x},g=S=>S.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const f=h((S,x)=>{const F=S.aggFunc!=null,R=F!=x.isValueActive(),E=F&&S.aggFunc!=x.getAggFunc();return R||E});f.length>0&&dispatchColumnChangedEvent(a,"columnValueChanged",f,t),dispatchColumnResizedEvent(a,h((S,x)=>S.width!=x.getActualWidth()),!0,t),dispatchColumnPinnedEvent(a,h((S,x)=>S.pinned!=x.getPinned()),t),dispatchColumnVisibleEvent(a,h((S,x)=>S.hide==x.isVisible()),t);const b=h((S,x)=>S.sort!=x.getSort()||S.sortIndex!=x.getSortIndex());b.length>0&&r?.dispatchSortChangedEvents(t,b);const y=_getColumnState(e);normaliseColumnMovedEventForColumnState(d,y,t,n,a)}}function _getColumnState(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:s}=e,o=t.getColDefCols();if(_missing(o)||!t.isAlive())return[];const n=i?.columns,r=s?.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),a}function getColumnStateFromColDef(e){const t=(p,f)=>p??f??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let d=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function orderLiveColsLikeState(e,t,i){if(!e.applyOrder||!e.state)return;const s=[];e.state.forEach(o=>{o.colId!=null&&s.push(o.colId)}),sortColsLikeKeys(t.cols,s,t,i)}function sortColsLikeKeys(e,t,i,s){if(e==null)return;let o=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(o.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith(GROUP_AUTO_COLUMN_ID)?o.splice(r++,0,a):o.push(a)}),o=placeLockedColumns(o,s),!doesMovePassMarryChildren(o,i.getColTree())){_warn(39);return}e.list=o}function normaliseColumnMovedEventForColumnState(e,t,i,s,o){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const h=a&&a[u];if(h&&h.colId!==c.colId){const g=s.getCol(h.colId);g&&d.push(g)}}),d.length&&o.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var comparatorByIndex=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,a=n!=null;if(r&&a)return o-n;if(r)return-1;if(a)return 1;const l=t.indexOf(i),d=t.indexOf(s),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},ColumnModel=class extends BeanStub{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(_convertColumnEventSourceType(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),_convertColumnEventSourceType(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?_compareColumnStatesAndDispatchEvents(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=_createColumnTree(t,this.colDefs,!0,h,e);_destroyColumnTree(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDept,m=_getColumnsFromTree(p),C={};m.forEach(w=>C[w.getId()]=w),this.colDefCols={tree:p,treeDepth:f,list:m,map:C},o?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([i,s,o],h);const g=_shouldMaintainColumnOrder(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),a?.refresh(),n?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(h),d.clear(),c.clear(),!_areEqual(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)}),i.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;const{map:s,list:o,tree:n,treeDepth:r}=i??t;return this.cols={list:o.slice(),map:{...s},tree:n.slice(),treeDepth:r},i&&(i.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(s=>{const o=isColumnGroupAutoCol(s);if(e){const n=t?.includes(s);return o||n}else return o||s.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){_applyColumnState(this.beans,{state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>i.has(d)))return;const o=new Map(e.list.map(d=>[d,!0])),n=t.filter(d=>o.has(d)),r=new Map(n.map(d=>[d,!0])),a=e.list.filter(d=>!r.has(d)),l=n.slice();a.forEach(d=>{let c=d.getOriginalParent();if(!c){l.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(f=>{const m=l.indexOf(f)>=0,C=u.indexOf(f)<0;m&&C&&u.push(f)}),c=c.getOriginalParent();if(!u.length){l.push(d);return}const h=u.map(p=>l.indexOf(p)),g=Math.max(...h);l.splice(g+1,0,d)}),e.list=l}positionLockedCols(e){e.list=placeLockedColumns(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:i,eventSvc:s}=this.beans;i.refresh(t),s.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=_convertColumnEventSourceType(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){_destroyColumnTree(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:i,selectionColSvc:s}=this.beans;_forAll(this.colDefCols?.list,e),_forAll(i?.columns?.list,e),_forAll(s?.columns?.list,e),_forAll(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(_columnsMatch(s[o],e))return s[o];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},BaseColsService=class extends BeanStub{constructor(){super(...arguments),this.dispatchColumnChangedEvent=dispatchColumnChangedEvent,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,i,s,o,n,r){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,_exists(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const h=l.get(c);if(h===void 0){l.set(c,0);return}s&&h!==u||l.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;n(c,u,r)}),o&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,i,[...l.keys()],r)}updateColList(e=[],t,i,s,o,n,r){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(l.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const h=t.indexOf(u);if(h<0)return;for(let g=h+1;g<t.length;g++)l.add(t[g]);_removeFromArray(t,u)}o(u,i,r),a=!0}}),!a)return;this.updateIndexMap(),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r);const d=Array.from(l);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const i=this.columns,s=[],o=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(g=>{const p=t.indexOf(g)<0,f=g.getColDef(),m=l(f),C=d(f),w=r(f),v=a(f);let b;m!==void 0?b=m:w!==void 0?w===null?b=!1:b=w>=0:p?C!==void 0?b=C:v!==void 0?b=v!=null&&v>=0:b=!1:b=i.indexOf(g)>=0,b&&((p?w!=null||v!=null:w!=null)?s.push(g):o.push(g))});const u=g=>{const p=r(g.getColDef()),f=a(g.getColDef());return p??f};s.sort((g,p)=>{const f=u(g),m=u(p);return f===m?0:f<m?-1:1});const h=[].concat(s);return i.forEach(g=>{o.indexOf(g)>=0&&h.push(g)}),o.forEach(g=>{h.indexOf(g)<0&&h.push(g)}),i.forEach(g=>{h.indexOf(g)<0&&n(g,!1,e)}),h.forEach(g=>{i.indexOf(g)<0&&n(g,!0,e)}),this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const i=this.columns,s=this.colModel.getColDefCols();if(!i.length||!s)return e;const o=Object.keys(t),n=new Set(o),r=new Set(o),a=new Set(i.map(v=>{const b=v.getColId();return r.delete(b),b}).concat(o)),l=[],d={};let c=0;for(let v=0;v<s.length;v++){const b=s[v].getColId();a.has(b)&&(l.push(b),d[b]=c++)}let u=1e3,h=!1,g=0;const p=this.columnOrdering.enableProp,f=this.columnOrdering.initialEnableProp,m=this.columnOrdering.indexProp,C=this.columnOrdering.initialIndexProp,w=v=>{const b=d[v];for(let y=g;y<b;y++){const S=l[y];r.has(S)&&(t[S][m]=u++,r.delete(S))}g=b};return i.forEach(v=>{const b=v.getColId();if(n.has(b))w(b),t[b][m]=u++;else{const y=v.getColDef();(y[m]===null||y[m]===void 0&&y[C]==null)&&(h||(y[p]||y[p]===void 0&&y[f]?w(b):(r.forEach(F=>{t[F][m]=u+d[F]}),u+=l.length,h=!0)),e[b]||(e[b]={colId:b}),e[b][m]=u++)}}),e}},GroupInstanceIdCreator=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},EmptyBean=class extends BeanStub{};function setupCompBean(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var CssClassManager=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},compIdSequence=0,RefPlaceholder=null,Component=class extends BeanStub{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=compIdSequence++,this.cssClassManager=new CssClassManager(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(DataRefAttribute):null}applyElementsToComponent(e,t,i,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===RefPlaceholder)this[t]=s??e;else{const n=i&&i[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const s of e.childNodes??[])i.push(s);i.forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,n=>{const r=n.getGui();if(r)for(const a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)})}createComponentFromElement(e,t,i){const s=e.nodeName,o=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null;let a=null;if(r){const l=i&&o?i[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,o,i,a),a}swapComponentForNode(e,t,i){const s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(i=>i.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let s;typeof e=="string"||e==null?s=_loadTemplate(e):s=_createElement(e),this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let o=0;o<t.length;o++){const n=t[o];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return e==null?null:(i||(i=this.eGui),_isNodeOrElement(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;_setVisible(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:i}=t;_setDisplayed(this.eGui,e,{skipAriaHidden:i});const s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};function _isPromise(e){return typeof e.then=="function"}var AgPromise=class O{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return t.length?new O(i=>{let s=t.length;const o=new Array(s);t.forEach((n,r)=>{n.then(a=>{o[r]=a,s--,s===0&&i(o)})})}):O.resolve()}static resolve(t=null){return new O(i=>i(t))}then(t){return new O(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){}};function doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}function _getUserCompKeys(e,t,i,s){const{name:o}=i;let n,r,a,l,d,c;if(t){const u=t,h=u[o+"Selector"],g=h?h(s):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[o])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var UserComponentFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,s=!1){return this.getCompDetails(this.gridOptions,e,t,i,s)}getCompDetails(e,t,i,s,o=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=_getUserCompKeys(this.beans.frameworkOverrides,e,t,s),g;const p=w=>{const v=this.registry.getUserComponent(n,w);v&&(l=v.componentFromFramework?void 0:v.component,d=v.componentFromFramework?v.component:void 0,g=v.params)};if(a!=null&&p(a),l==null&&d==null&&i!=null&&p(i),l&&r&&!doesImplementIComponent(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:w}=this.beans;o&&(a!==i||!i)?a?w?.isProvidedUserComp(a)||_error(50,{compName:a}):i?w||_error(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):_error(216,{name:n}):i&&!w&&_error(146,{comp:i});return}const f=this.mergeParams(e,t,s,c,g),m=l==null,C=l??d;return{componentFromFramework:m,componentClass:C,params:f,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(C,m,f,t)}}newAgStackInstance(e,t,i,s){const o=!t;let n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);const r=n.init?.(i);return r==null?AgPromise.resolve(n):r.then(()=>n)}mergeParams(e,t,i,s=null,o){const n={...i,...o},r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){const l=a(i);_mergeDeep(n,l)}else typeof a=="object"&&_mergeDeep(n,a);return _mergeDeep(n,s),n}},DateComponent={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},DragAndDropImageComponent={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},HeaderComponent={name:"headerComponent",optionalMethods:["refresh"]},InnerHeaderComponent={name:"innerHeaderComponent"},InnerHeaderGroupComponent={name:"innerHeaderGroupComponent"},HeaderGroupComponent={name:"headerGroupComponent"},InnerCellRendererComponent={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},CellRendererComponent={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},EditorRendererComponent={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},LoadingCellRendererComponent={name:"loadingCellRenderer",cellRenderer:!0},CellEditorComponent={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},LoadingOverlayComponent={name:"loadingOverlayComponent",optionalMethods:["refresh"]},NoRowsOverlayComponent={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},TooltipComponent={name:"tooltipComponent"},FilterComponent={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},FloatingFilterComponent={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},FullWidth={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},FullWidthLoading={name:"loadingCellRenderer",cellRenderer:!0},FullWidthGroup={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},FullWidthDetail={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function _getDragAndDropImageCompDetails(e,t){return e.getCompDetailsFromGridOptions(DragAndDropImageComponent,"agDragAndDropImage",t,!0)}function _getInnerCellRendererDetails(e,t,i){return e.getCompDetails(t,InnerCellRendererComponent,void 0,i)}function _getHeaderCompDetails(e,t,i){return e.getCompDetails(t,HeaderComponent,"agColumnHeader",i)}function _getInnerHeaderCompDetails(e,t,i){return e.getCompDetails(t,InnerHeaderComponent,void 0,i)}function _getHeaderGroupCompDetails(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,HeaderGroupComponent,"agColumnGroupHeader",t)}function _getInnerHeaderGroupCompDetails(e,t,i){return e.getCompDetails(t,InnerHeaderGroupComponent,void 0,i)}function _getFullWidthCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidth,void 0,t,!0)}function _getFullWidthLoadingCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthLoading,"agLoadingCellRenderer",t,!0)}function _getFullWidthGroupCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthGroup,"agGroupRowRenderer",t,!0)}function _getFullWidthDetailCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthDetail,"agDetailCellRenderer",t,!0)}function _getCellRendererDetails(e,t,i){return e.getCompDetails(t,CellRendererComponent,void 0,i)}function _getEditorRendererDetails(e,t,i){return e.getCompDetails(t,EditorRendererComponent,void 0,i)}function _getLoadingCellRendererDetails(e,t,i){return e.getCompDetails(t,LoadingCellRendererComponent,"agSkeletonCellRenderer",i,!0)}function _getCellEditorDetails(e,t,i){return e.getCompDetails(t,CellEditorComponent,"agCellEditor",i,!0)}function _getFilterDetails(e,t,i,s){return e.getCompDetails(t,FilterComponent,s,i,!0)}function _getDateCompDetails(e,t,i){return e.getCompDetails(t,DateComponent,"agDateInput",i,!0)}function _getLoadingOverlayCompDetails(e,t){return e.getCompDetailsFromGridOptions(LoadingOverlayComponent,"agLoadingOverlay",t,!0)}function _getNoRowsOverlayCompDetails(e,t){return e.getCompDetailsFromGridOptions(NoRowsOverlayComponent,"agNoRowsOverlay",t,!0)}function _getTooltipCompDetails(e,t){return e.getCompDetails(t.colDef,TooltipComponent,"agTooltipComponent",t,!0)}function _getFloatingFilterCompDetails(e,t,i,s){return e.getCompDetails(t,FloatingFilterComponent,s,i)}function _getFilterCompKeys(e,t){return _getUserCompKeys(e,t,FilterComponent)}function _mergeFilterParamsWithApplicationProvidedParams(e,t,i){return e.mergeParams(t,FilterComponent,i)}function _unwrapUserComp(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var allRegisteredModules=new Set,globalModulesMap={},gridModulesMap={},currentModuleVersion,areGridScopedModules=!1,isUmd=!1;function isValidModuleVersion(e){const[t,i]=e.version.split(".")||[],[s,o]=currentModuleVersion.split(".")||[];return t===s&&i===o}function runVersionChecks(e){currentModuleVersion||(currentModuleVersion=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;if(e.version?isValidModuleVersion(e)||_errorOnce(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${currentModuleVersion}.`)):_errorOnce(t(`'${e.moduleName}' is incompatible.`)),e.validate){const i=e.validate();i.isValid||_errorOnce(`${i.message}`)}}function _registerModule(e,t){runVersionChecks(e);const i=e.rowModels??["all"];allRegisteredModules.add(e);let s;t!==void 0?(areGridScopedModules=!0,gridModulesMap[t]===void 0&&(gridModulesMap[t]={}),s=gridModulesMap[t]):s=globalModulesMap,i.forEach(o=>{s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(o=>_registerModule(o,t))}function _unRegisterGridModules(e){delete gridModulesMap[e]}function _isModuleRegistered(e,t,i){const s=o=>!!globalModulesMap[o]?.[e]||!!gridModulesMap[t]?.[o]?.[e];return s(i)||s("all")}function _areModulesGridScoped(){return areGridScopedModules}function _getRegisteredModules(e,t){const i=gridModulesMap[e]??{};return[...Object.values(globalModulesMap.all??{}),...Object.values(i.all??{}),...Object.values(globalModulesMap[t]??{}),...Object.values(i[t]??{})]}function _getAllRegisteredModules(){return new Set(allRegisteredModules)}function _getGridRegisteredModules(e,t){const i=gridModulesMap[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function _isUmd(){return isUmd}function _setUmd(){isUmd=!0}var ModuleRegistry=class{static register(e){_registerModule(e,void 0)}static registerModules(e){e.forEach(t=>_registerModule(t,void 0))}},GenericContext=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}),e.derivedBeans?.forEach(t=>{const{beanName:i,bean:s}=t(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(i=>{i.preWireBeans?.(this.beans),i.wireBeans?.(this.beans)}),e.forEach(i=>i.preConstruct?.()),t&&e.forEach(t),e.forEach(i=>i.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Context=class extends GenericContext{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),_unRegisterGridModules(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},CSS_FIRST_COLUMN="ag-column-first",CSS_LAST_COLUMN="ag-column-last";function _getHeaderClassesFromColDef(e,t,i,s){return _missing(e)?[]:getColumnClassesFromCollDef(e.headerClass,e,t,i,s)}function _getToolPanelClassesFromColDef(e,t,i,s){return _missing(e)?[]:getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s)}function refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass(CSS_FIRST_COLUMN,i.isColAtEdge(t,"first")),e.addOrRemoveCssClass(CSS_LAST_COLUMN,i.isColAtEdge(t,"last"))}function getClassParams(e,t,i,s){return _addGridCommonParams(t,{colDef:e,column:i,columnGroup:s})}function getColumnClassesFromCollDef(e,t,i,s,o){if(_missing(e))return[];let n;if(typeof e=="function"){const r=getClassParams(t,i,s,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var KeyCode={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},keyboardModeActive=!1,instanceCount=0;function addKeyboardModeEvents(e){instanceCount>0||(e.addEventListener("keydown",toggleKeyboardMode),e.addEventListener("mousedown",toggleKeyboardMode))}function removeKeyboardModeEvents(e){instanceCount>0||(e.removeEventListener("keydown",toggleKeyboardMode),e.removeEventListener("mousedown",toggleKeyboardMode))}function toggleKeyboardMode(e){const t=keyboardModeActive,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(keyboardModeActive=i)}function _registerKeyboardFocusEvents(e){const t=_getDocument(e);return addKeyboardModeEvents(t),instanceCount++,()=>{instanceCount--,removeKeyboardModeEvents(t)}}function _isKeyboardMode(){return keyboardModeActive}function _addFocusableContainerListener(e,t,i){t.addManagedElementListeners(i,{keydown:s=>{if(!s.defaultPrevented&&s.key===KeyCode.TAB){const o=s.shiftKey;_findNextFocusableElement(e,i,!1,o)||_focusNextGridCoreContainer(e,o)&&s.preventDefault()}}})}function _findFocusableElements(e,t,i=!1){const s=FOCUSABLE_SELECTOR;let o=FOCUSABLE_EXCLUDE;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>_isVisible(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function _focusInto(e,t=!1,i=!1,s=!1){const o=_findFocusableElements(e,s?".ag-tab-guard":null,i),n=t?_last(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function _findNextFocusableElement(e,t,i,s){const o=_findFocusableElements(t,i?':not([tabindex="-1"])':null),n=_getActiveDomElement(e);let r;i?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);const a=r+(s?-1:1);return a<0||a>=o.length?null:o[a]}function _findTabbableParent(e,t=5){let i=0;for(;e&&_getTabIndex(e)===null&&++i<=t;)e=e.parentElement;return _getTabIndex(e)===null?null:e}function _focusGridInnerElement(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function _isHeaderFocusSuppressed(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function _isCellFocusSuppressed(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function _focusNextGridCoreContainer(e,t,i=!1){const s=e.ctrlsSvc.get("gridCtrl");return!i&&s.focusNextInnerContainer(t)?!0:((i||!t&&!s.isDetailGrid())&&s.forceFocusOutOfContainer(t),!1)}function _isDeleteKey(e,t=!1){return e===KeyCode.DELETE?!0:!t&&e===KeyCode.BACKSPACE?_isMacOsUserAgent():!1}var CellKeyboardListenerFeature=class extends BeanStub{constructor(e,t,i,s){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=s,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case KeyCode.ENTER:this.onEnterKeyDown(e);break;case KeyCode.F2:this.onF2KeyDown(e);break;case KeyCode.ESCAPE:this.onEscapeKeyDown(e);break;case KeyCode.TAB:this.onTabKeyDown(e);break;case KeyCode.BACKSPACE:case KeyCode.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case KeyCode.DOWN:case KeyCode.UP:case KeyCode.RIGHT:case KeyCode.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const s=t.extendLatestRangeInDirection(e);s&&i?.ensureCellVisible(s)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:s,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:a}=s;if(!i.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),_isDeleteKey(e,n.get("enableCellEditingOnBackspace"))){if(r&&_isCellSelectionEnabled(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const{column:l}=i,d=this.beans.valueSvc.getDeleteValue(l,o);o.setDataValue(l,d,"cellClear")}}else s.editSvc?.startRowOrCellEdit(i,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(i.gos.get("enterNavigatesVertically")){const s=e.shiftKey?KeyCode.UP:KeyCode.DOWN;i.navigation?.navigateToNextCell(null,s,t.cellPosition,!1)}else i.editSvc?.startRowOrCellEdit(t,KeyCode.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing||i.editSvc?.startRowOrCellEdit(t,KeyCode.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing&&i.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const s=e.key;s===KeyCode.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,s,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&_isRowSelection(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},CellMouseListenerFeature=class extends BeanStub{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!_isStopPropagationForAgGrid(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:i,gos:s,editSvc:o}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.cellPosition)>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(r)})},0),(s.get("singleClickEdit")||a.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&o?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:s}=this,{eventSvc:o,frameworkOverrides:n,gos:r,editSvc:a}=i,l=t.getColDef(),d=s.createEvent(e,"cellDoubleClicked");o.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&a?.startRowOrCellEdit(s,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;const h=l&&!l.isEmpty(),g=this.containsWidget(o),{cellPosition:p}=n,f=isRowNumberCol(p.column);if(d&&f&&!d.handleMouseDownOnCell(p,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!s||!h){const C=u.get("enableCellTextSelection")&&e.defaultPrevented,w=(_isBrowserSafari()||C)&&!n.editing&&!_isFocusableFormField(o)&&!g;n.focusCell(w)}if(s&&h&&!c.isCellFocused(p)){e.preventDefault();const m=c.getFocusedCell();if(m){const{column:C,rowIndex:w,rowPinned:v}=m,y=r.rowRenderer.getRowByPosition({rowIndex:w,rowPinned:v})?.getCellCtrl(C);y?.editing&&y.stopEditing(),c.setFocusedCell({column:C,rowIndex:w,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(f&&e.preventDefault(),s)l.extendLatestRangeToCell(p);else{const m=t||i;l.setRangeToCell(p,m)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return _isElementChildOfClass(e,"ag-selection-checkbox",3)||_isElementChildOfClass(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},CellPositionFeature=class extends BeanStub{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();_areEqual(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,i=e.getColSpan(t),s=[];if(i===1)s.push(e);else{let o=e;const n=e.getPinned();for(let r=0;o&&r<i&&(s.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||_missing(o)||n!==o.getPinned()));r++);}return s}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=_last(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,i=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const s=t.bodyWidth;return i+s+(e||0)}return i+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=_getRowHeightAsNumber(this.beans)*this.rowSpan;this.eContent.style.height=`${i}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},CSS_CELL="ag-cell",CSS_AUTO_HEIGHT="ag-cell-auto-height",CSS_NORMAL_HEIGHT="ag-cell-normal-height",CSS_CELL_FOCUS="ag-cell-focus",CSS_CELL_FIRST_RIGHT_PINNED="ag-cell-first-right-pinned",CSS_CELL_LAST_LEFT_PINNED="ag-cell-last-left-pinned",CSS_CELL_NOT_INLINE_EDITING="ag-cell-not-inline-editing",CSS_CELL_WRAP_TEXT="ag-cell-wrap-text",DOM_DATA_KEY_CELL_CTRL="cellCtrl";function _getCellCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,DOM_DATA_KEY_CELL_CTRL)}var instanceIdSequence2=0,CellCtrl=class extends BeanStub{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=s,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=i;const{colId:o,colIdSanitised:n}=e;this.instanceId=o+"-"+instanceIdSequence2++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new CellPositionFeature(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new CellMouseListenerFeature(this,e,this.column),this.keyboardListener=new CellKeyboardListenerFeature(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&_isCellSelectionEnabled(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGui=t,this.printLayout=o,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){const{beans:i,column:s,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=i,a=this.getValueToDisplay();let l;const d=o.stub&&o.groupData?.[s.getId()]==null,c=s.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||isRowNumberCol(s)?l=_getCellRendererDetails(r,c,u):l=_getLoadingCellRendererDetails(r,c,u)}if(!l&&!d&&i.findSvc?.isMatch(o,s)){const u=this.createCellRendererParams();l=_getCellRendererDetails(r,{...s.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(l,a,e),!t&&n&&_requestAnimationFrame(i,()=>n?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,s=_getCheckboxLocation(t),o=isColumnSelectionCol(this.column);return i==="custom"&&s!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&_getCheckboxes(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||o}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:s,comp:o,eGui:n,beans:{valueSvc:r,gos:a}}=this;return _addGridCommonParams(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(i,s),setValue:d=>r.setValue(s,i,d),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:o.getParentOfValue(),registerRowDragger:(d,c,u,h)=>this.registerRowDragger(d,c,h),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),i=e!=null&&!!e.newData,s=e!=null&&!!e.suppressFlash,o=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||o||i,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(i,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;_setDomData(this.beans.gos,t,DOM_DATA_KEY_CELL_CTRL,this),e.addDestroyFunc(()=>_setDomData(this.beans.gos,t,DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){const{rowNode:i,column:s,value:o,beans:n}=this;return _addGridCommonParams(n.gos,{type:t,node:i,data:i.data,value:o,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:e,rowIndex:i.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;refreshFirstAndLastStyles(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);_setAriaColIndex(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const i=this.comp.getFocusableElement();this.isCellFocused()&&i.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(isRowNumberCol(this.column)&&(e=!0),_addOrRemoveAttribute(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(_isCellFocusSuppressed(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const i=this.isCellFocused();if(this.comp.addOrRemoveCssClass(CSS_CELL_FOCUS,i),i&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){const n=_findFocusableElements(o,null,!0);n.length&&(o=n[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const s=t.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),i&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:_makeNull(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(CSS_CELL,!0),e.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(CSS_AUTO_HEIGHT,t),e.addOrRemoveCssClass(CSS_NORMAL_HEIGHT,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{s.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(_getActiveDomElement(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){const s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},GRID_DOM_KEY="__ag_grid_instance";function _stampTopLevelGridCompWithGridInstance(e,t){t[GRID_DOM_KEY]=e.gridInstanceId}function _isEventFromThisGrid(e,t){return _isElementInThisGrid(e,t.target)}function _isElementInThisGrid(e,t){let i=t;for(;i;){const s=i[GRID_DOM_KEY];if(_exists(s))return s===e.gridInstanceId;i=i.parentElement}return!1}function _getCellPositionForEvent(e,t){return _getCellCtrlForEventTarget(e,t.target)?.getFocusedCellPosition()??null}function _getNormalisedMousePosition(e,t){const i=_isDomLayout(e.gos,"normal"),s=t;let o,n;if(s.clientX!=null||s.clientY!=null?(o=s.clientX,n=s.clientY):(o=s.x,n=s.y),i){const r=e.ctrlsSvc.getScrollFeature(),a=r.getVScrollPosition(),l=r.getHScrollPosition();o+=l.left,n+=a.top}return{x:o,y:n}}var DragSourceType=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(DragSourceType||{}),DragAndDropService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragSvc.addDragSource(i)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:i}=this,s=t.find(o=>o.dragSource===e);s&&(i.removeDragSource(s.params),_removeFromArray(t,s))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:i}=this;e.forEach(s=>t.removeDragSource(s.params)),e.length=0,i.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const i=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const o=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,o),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,i,s,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,i,s,t),n&&l){const{comp:c,promise:u}=l;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(h=>{h&&h.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const c=this.createDropTargetEvent(n,e,i,s,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;const o=(a,l)=>{for(const d of l){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=a.clientX>=h&&a.clientX<g,C=a.clientY>=p&&a.clientY<f;if(!m||!C)return!1}return!0};for(const a of i)if(o(e,a)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const o=_getRootNode(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of o)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,i,s,o){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,i,s){const{lastDropTarget:o}=this;if(!o)return;if(o.onDragLeave){const r=this.createDropTargetEvent(o,e,t,i,s);o.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const i=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:s}=e;return i.contains(s)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,i=e.clientX;return t===i?null:t>i?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,i=e.clientY;return t===i?null:t>i?"up":"down"}createDropTargetEvent(e,t,i,s,o){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _addGridCommonParams(d,{event:t,x:c,y:u,vDirection:s,hDirection:i,dragSource:l,fromNudge:o,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&_anchorElementToMouseMoveEvent(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const i=t.getGui();this.dragAndDropImageParent?.removeChild(i),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:i}=this;if(!e)return;const s=_getDragAndDropImageCompDetails(i,_addGridCommonParams(t,{dragSource:e}));if(!s)return;const o=s.newAgStackInstance();this.dragAndDropImageComp={promise:o},o.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:i}=this;if(!t)return;const s=e.getGui();s.style.setProperty("position","absolute"),s.style.setProperty("z-index","9999"),_stampTopLevelGridCompWithGridInstance(this.gos,s),i.applyThemeClasses(s),e.setIcon(null,!1);let{dragItemName:o}=t;typeof o=="function"&&(o=o()),e.setLabel(o||""),s.style.top="20px",s.style.left="20px";const n=_getPageBody(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(s):_warn(54)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}},AutoScrollService=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function _createCellId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}function _areCellsEqual(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&s&&o}function _isRowBefore(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(_exists(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function _isSameRow(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function _getFirstRow(e){let t=0,i;const{pinnedRowModel:s,rowModel:o,pageBounds:n}=e;return s?.getPinnedTopRowCount()?i="top":o.getRowCount()?(i=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function _getLastRow(e){let t,i=null;const{pinnedRowModel:s,pageBounds:o}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?(i=null,t=o.getLastRow()):r&&(i="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function _getRowNode(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function _getCellByPosition(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;const s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function _getRowAbove(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(i===0)return s==="top"?null:s==="bottom"&&r.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=s?void 0:r.getRow(i);return getNextStickyPosition(e,a,!0)??{rowIndex:i-1,rowPinned:s}}function _getRowBelow(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(isLastRowInContainer(e,t))return s==="bottom"?null:s==="top"&&r.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=s?void 0:r.getRow(i);return getNextStickyPosition(e,a)??{rowIndex:i+1,rowPinned:s}}function getNextStickyPosition(e,t,i){const{gos:s,rowRenderer:o}=e;if(!t?.sticky||!_isGroupRowsSticky(s))return;const n=i?o.getStickyTopRowCtrls():o.getStickyBottomRowCtrls();let r;for(let a=0;a<n.length;a++)if(n[a].rowNode.rowIndex===t.rowIndex){r=n[a+(i?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function isLastRowInContainer(e,t){const{rowPinned:i,rowIndex:s}=t,{pinnedRowModel:o,pageBounds:n}=e;return i==="top"?(o?.getPinnedTopRowCount()??0)-1<=s:i==="bottom"?(o?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}var RowDragFeature=class extends BeanStub{constructor(e){super(),this.eContainer=e}postConstruct(){const{rowModel:e,gos:t,ctrlsSvc:i}=this.beans;_isClientSideRowModel(t,e)&&(this.clientSideRowModel=e),i.whenReady(this,s=>{const o=s.gridBodyCtrl;this.autoScrollService=new AutoScrollService({scrollContainer:o.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>o.scrollFeature.getVScrollPosition().top,setVerticalPosition:n=>o.scrollFeature.setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:i}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||i?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.beans.selectionSvc?.getSelectedNodes()??[]].sort((o,n)=>o.rowIndex==null||n.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(n));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=_getNormalisedMousePosition(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:i,gos:s}=this.beans,o=this.isFromThisGrid(e),n=s.get("rowDragManaged"),r=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(s.get("suppressMoveWhenRowDragging")||!o?i.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(_last(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,i=t.getLastHighlightedRowNode(),s=i&&i.highlighted==="Below",o=_getNormalisedMousePosition(this.beans,e).y,n=e.dragItem.rowNodes;let r=s?1:0;if(this.isFromThisGrid(e))n.forEach(a=>{a.rowTop<o&&(r-=1)}),this.moveRows(n,o,r);else{const a=_getRowIdCallback(this.gos);let l=t.getRowIndexAtPixel(o)+1;t.getHighlightPosition(o)==="Above"&&l--,t.updateRowData({add:n.filter(d=>!t.getRowNode(a?.({data:d.data,level:0,rowPinned:d.rowPinned})??d.data.id)).map(d=>d.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){const s=this.beans.focusSvc,o=s.getFocusedCell(),n=o&&_getCellByPosition(this.beans,o);this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(n?n.focusCell():s.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){_warn(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){_warn(56);return}let i={getContainer:e.getContainer};e.fromGrid?i=e:(e.onDragEnter&&(i.onDragEnter=o=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}),e.onDragLeave&&(i.onDragLeave=o=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}),e.onDragging&&(i.onDragging=o=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}),e.onDragStop&&(i.onDragStop=o=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}),e.onDragCancel&&(i.onDragCancel=o=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",o))}));const s={isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),n=this.onDragStop.bind(this),r=this.onDragCancel.bind(this);let a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{i(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:i,onDragLeave:e.onDragLeave?l=>{s(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:s,onDragging:e.onDragging?l=>{o(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:o,onDragStop:e.onDragStop?l=>{n(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:n,onDragCancel:e.onDragCancel?l=>{r(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:r,fromGrid:!0}:a={getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:n,onDragCancel:r,fromGrid:!0},a}draggingToRowDragEvent(e,t){const i=this.beans,{pageBounds:s,rowModel:o,gos:n}=i,r=_getNormalisedMousePosition(i,t).y,a=r>s.getCurrentPageHeight();let l=-1,d;return a||(l=o.getRowIndexAtPixel(r),d=o.getRow(l)),_addGridCommonParams(n,{type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:d,y:r,vDirection:t.vDirection})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}};function _areEventsNear(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i}var DragService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,i=t.find(s=>s.dragSource===e);i&&(this.removeListener(i),_removeFromArray(t,i))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");s&&!r&&(n=a=>{_isFocusableFormField(a.target)||(o&&a.stopPropagation(),this.onTouchStart(e,a))},i.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!s})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=l=>this.onTouchMove(l,e.eElement),o=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:_getRootNode(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:s,options:{passive:!0}},{target:r,type:"touchend",listener:o,options:{passive:!0}},{target:r,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=d=>this.onMouseMove(d,e.eElement),o=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===KeyCode.ESCAPE&&this.cancelDrag(e.eElement)},a=_getRootNode(this.beans),l=[{target:a,type:"mousemove",listener:s},{target:a,type:"mouseup",listener:o},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.addEventListener(s,o,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.removeEventListener(s,o,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=_exists(i)?i:4;return _areEventsNear(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){_isBrowserSafari()&&_getDocument(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,i=t.get("enableCellTextSelection"),s=e.type==="mousemove",o=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return i&&s&&e.cancelable&&_isEventFromThisGrid(t,e)&&!o(e)}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function createUniqueColumnGroupId(e,t){return e+"_"+t}function isColumnGroup2(e){return e instanceof AgColumnGroup}var AgColumnGroup=class extends BeanStub{constructor(e,t,i,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return createUniqueColumnGroupId(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{isColumnGroup2(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=_last(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{isColumn(t)?e.push(t):isColumnGroup2(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{isColumn(t)?e.push(t):isColumnGroup2(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(isColumnGroup2(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},ROW_ID_PREFIX_ROW_GROUP="row-group-",ROW_ID_PREFIX_TOP_PINNED="t-",ROW_ID_PREFIX_BOTTOM_PINNED="b-",OBJECT_ID_SEQUENCE=0,RowNode=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=OBJECT_ID_SEQUENCE++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,selectionSvc:s,eventSvc:o}=this.beans,n=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),s?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),o.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(_error(13),null):this.rowPinned==="top"?ROW_ID_PREFIX_TOP_PINNED+this.rowIndex:this.rowPinned==="bottom"?ROW_ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:i}=this.beans,s=i?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,s));const n=this.createDataChangedEvent(e,o,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=_getRowIdCallback(this.beans.gos);if(t)if(this.data){const i=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(ROW_ID_PREFIX_ROW_GROUP)&&_error(14,{groupPrefix:ROW_ID_PREFIX_ROW_GROUP})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:s,valueSvc:o,gos:n,selectionSvc:r}=this.beans,a=typeof e!="string"?e:s.getCol(e)??s.getColDefCol(e);if(!a)return!1;const l=o.getValueForDisplay(a,this);if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:i}),!1}const d=o.setValue(this,a,t,i);return this.dispatchCellChangedEvent(a,t,l),r?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new LocalEventService),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new LocalEventService),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const i=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(_warn(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function _createGlobalRowEvent(e,t,i){return _addGridCommonParams(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var FilterWrapperElement={tag:"div",cls:"ag-filter"},FilterWrapperComp=class extends Component{constructor(e,t){super(FilterWrapperElement),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??AgPromise.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(s=>{const o=s.getGui();_exists(o)||_warn(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(_clearElement(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},RESIZE_CONTAINER_STYLE="ag-resizer-wrapper",makeDiv=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),RESIZE_TEMPLATE={tag:"div",cls:RESIZE_CONTAINER_STYLE,children:[makeDiv("eTopLeft","topLeft"),makeDiv("eTop","top"),makeDiv("eTopRight","topRight"),makeDiv("eRight","right"),makeDiv("eBottomRight","bottomRight"),makeDiv("eBottom","bottom"),makeDiv("eBottomLeft","bottomLeft"),makeDiv("eLeft","left")]},PositionableFeature=class extends BeanStub{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=_isVisible(this.element);if(c){const u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){const g=u.offsetWidth-this.element.offsetWidth;d=parseInt(h.minWidth,10)-g}if(h.minHeight!=null){const g=u.offsetHeight-this.element.offsetHeight;l=parseInt(h.minHeight,10)-g}}if(this.minHeight=o||l,this.minWidth=i||d,s&&this.setWidth(s),n&&this.setHeight(n),(!s||!n)&&this.refreshSize(),e)this.center();else if(r||a)this.offsetElement(r,a);else if(c&&t){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){const g=parseFloat(u.style.top),p=parseFloat(u.style.left);h?this.offsetElement(isNaN(p)?0:p,isNaN(g)?0:g):this.setPosition(p,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const s=!!e[t],o=this.getResizerElement(t),n={dragStartPixels:0,eElement:o,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_setFixedHeight(i,e),e=_getAbsoluteHeight(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?_setFixedHeight(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:o.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-s.bottom}}return i+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_setFixedWidth(t,e),e=_getAbsoluteWidth(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?_setFixedWidth(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=_observeResize(this.beans,this.popupSvc?.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:s,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!i,!!o,r)?0:r,d=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,i,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:i?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,i=0,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+i||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(_createElement(RESIZE_TEMPLATE)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${RESIZE_CONTAINER_STYLE}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const o=e[s],n=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(o);l.minHeight&&(r=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else r=o.offsetHeight,a=o.offsetWidth;t+=r,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||s,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),u=this.position.x,h=this.position.y;let g=0,p=0;if(a&&d){const f=r?-1:1,m=this.getWidth(),C=m+d*f;let w=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(w=!0,g=0)),w||this.setWidth(C)}if(l&&c){const f=s?-1:1,m=this.getHeight(),C=m+c*f;let w=!1;s?(p=m-C,(h+p<=0||C<=this.minHeight)&&(w=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(w=!0),w||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},FOCUS_MANAGED_CLASS="ag-focus-managed",ManagedFocusFeature=class extends BeanStub{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const s=_findNextFocusableElement(this.beans,this.eFocusable,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add(FOCUS_MANAGED_CLASS),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||_isStopPropagationForAgGrid(t))return;const{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){_stopPropagationForAgGrid(t);return}t.key===KeyCode.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},FILTER_LOCALE_TEXT={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function getDebounceMs(e,t){const{debounceMs:i}=e;return isUseApplyButton(e)?(i!=null&&_warn(71),0):i??t}function isUseApplyButton(e){return(e.buttons?.indexOf("apply")??-1)>=0}var ProvidedFilter=class extends Component{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=RefPlaceholder,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new PositionableFeature(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const i={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=isUseApplyButton(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:i,readOnly:s}=t??{},{buttons:o,readOnly:n}=e;if(s===n&&_jsonEquals(i,o))return;const r=o&&o.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(_clearElement(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=_createElement({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&_removeFromParent(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=p=>this.onBtApply(!1,!1,p);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=p=>{this.onBtCancel(p)};break;default:_warn(75);return}const g=_loadTemplate(`<button
@@ -9,7 +6,7 @@ var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescri
9
6
  data-ref="${d}FilterButton"
10
7
  class="ag-button ag-standard-button ag-filter-apply-panel-button"
11
8
  >${u}
12
- </button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:c})),a.append(g)};o.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=getDebounceMs(this.params,this.defaultDebounceMs),t=_debounce(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const i=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:s}=this.params;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,i=t&&t.key;let s;(i==="Enter"||i==="Space")&&(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const i=this.isModelValid(this.getModelFromUi()),s=this.queryForHtmlElement('[data-ref="applyFilterButton"]');s&&_setDisabled(s,!i)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,FILTER_LOCALE_TEXT[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function _getDefaultFloatingFilterType(e,t,i){if(t==null)return null;let s=null;const{compName:o,jsComp:n,fwComp:r}=_getFilterCompKeys(e,t);return o?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:n==null&&r==null&&t.filter===!0&&(s=i()),s}var LayoutCssClasses={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},LayoutFeature=class extends BeanStub{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?LayoutCssClasses.AUTO_HEIGHT:t.print?LayoutCssClasses.PRINT:LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(i,t)}},VIEWPORT="Viewport",FAKE_V_SCROLLBAR="fakeVScrollComp",HORIZONTAL_SOURCES=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],SCROLL_DEBOUNCE_TIMEOUT=100,SCROLL_END_TIMEOUT=150,GridBodyScrollFeature=class extends BeanStub{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=_debounce(this,()=>this.lastScrollSource[1]=null,SCROLL_END_TIMEOUT),this.resetLastVScrollDebounced=_debounce(this,()=>this.lastScrollSource[0]=null,SCROLL_END_TIMEOUT)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,i=>{this.centerRowsCtrl=i.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,VIEWPORT)});for(const e of HORIZONTAL_SOURCES){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?_debounce(this,this.onVScroll.bind(this,VIEWPORT),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,VIEWPORT),s=t?_debounce(this,this.onVScroll.bind(this,FAKE_V_SCROLLBAR),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,FAKE_V_SCROLLBAR);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...HORIZONTAL_SOURCES,VIEWPORT]){if(this.lastScrollSource[1]===t)continue;const i=this.getViewportForSource(t);_setScrollLeft(i,e,this.enableRtl)}}getViewportForSource(e){return e===VIEWPORT?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const s=_getScrollLeft(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===VIEWPORT?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===VIEWPORT?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},SCROLL_END_TIMEOUT)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!_isIOSUserAgent()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=_getInnerHeight(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl&&_isRtlNegativeScroll()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(VIEWPORT)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl&&_isRtlNegativeScroll()?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),_setScrollLeft(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:i,lastScrollTop:s}=this;return{top:s,bottom:s+i}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,s=i.getRowCount();let o=-1;for(let n=0;n<s;n++){const r=i.getRow(n);if(typeof e=="function"){if(r&&e(r)){o=n;break}}else if(e===r||e===r.data){o=n;break}}o>=0&&this.ensureIndexVisible(o,t)}ensureIndexVisible(e,t){if(_isDomLayout(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){_warn(88,{index:e});return}const{frameworkOverrides:o,pageBounds:n,rowContainerHeight:r,rowRenderer:a}=this.beans;o.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e);let c,u,h=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:g,stickyBottomHeight:p}=l,f=d.rowTop,m=d.rowHeight,C=n.getPixelOffset(),w=d.rowTop-C,v=w+d.rowHeight,b=this.getVScrollPosition(),y=r.divStretchOffset,S=b.top+y,x=b.bottom+y,F=x-S,R=r.getScrollPositionForPixel(w),E=r.getScrollPositionForPixel(v-F),D=Math.min((R+E)/2,w),A=S+g>w,T=x-p<v;let M=null;t==="top"?M=R-g:t==="bottom"?M=E+p:t==="middle"?M=D:A?M=R-g:T&&(M=E+p),M!==null&&(this.setVerticalScrollPosition(M),a.redraw({afterScroll:!0})),c=f!==d.rowTop||m!==d.rowHeight,u=g!==l.stickyTopHeight||p!==l.stickyBottomHeight,h++}while((c||u)&&h<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:s}=this.beans,o=i.getCol(e);if(!o||o.isPinned()||!this.visibleCols.isColDisplayed(o))return;const n=this.getPositionedHorizontalScroll(o,t);s.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?i:s)||o,l=r?s:i;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:a?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>o:i<o,a=n?i<s:t>s;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleCols.bodyWidth,s=e.getActualWidth(),o=e.getLeft(),n=t?-1:1,r=t?i-o:o,a=r+s*n,l=r+s/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,s=e+t;return{start:i,end:s,width:e}}},CenterWidthFeature=class extends BeanStub{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=_isDomLayout(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,s=t.bodyWidth,o=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=s+o+n:(r=s,this.addSpacer&&(this.gos.get("enableRtl")?o:n)===0&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},ViewportSizeFeature=class extends BeanStub{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this,s=()=>{_requestAnimationFrame(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(s),i.registerBodyViewportResizeListener(s)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerHeight(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function processClassRules(e,t,i,s,o,n){if(i==null&&t==null)return;const r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(i){const d=Object.keys(i);for(let c=0;c<d.length;c++){const u=d[c],h=i[u];let g;typeof h=="string"?g=e?e.evaluate(h,s):!0:typeof h=="function"&&(g=h(s)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>l(d,c=>{r[c]||(a[c]=!0)})),n&&Object.keys(a).forEach(n),Object.keys(r).forEach(o)}function calculateRowLevel(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var RowStyleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,s=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},o=i.get("rowClass");o&&s(o);const n=i.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);s(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:s,expressionSvc:o}=this.beans,n=_addGridCommonParams(s,{data:e.data,node:e,rowIndex:e.rowIndex});processClassRules(o,void 0,s.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),s=t.getCallback("getRowStyle");let o;if(s){const n={data:e.data,node:e,rowIndex:e.rowIndex};o=s(n)}if(o||i)return Object.assign({},i,o)}},instanceIdSequence3=0,DOM_DATA_KEY_ROW_CTRL="renderedRow",RowCtrl=class extends BeanStub{constructor(e,t,i,s,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=s,this.printLayout=o,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+instanceIdSequence3++,this.rowId=_escapeString(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=_escapeString(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,s){const{context:o,focusSvc:n}=this.beans;s=setupCompBean(this,o,s);const r={rowComp:e,element:t,containerType:i,compBean:s};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.editing&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(i=>i.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),_isRowSelection(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(o=>i.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&_setAriaExpanded(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,this),e.compBean.addDestroyFunc(()=>_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=_escapeString(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(_batchCall(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(_batchCall(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==i),this.destroyBean(i,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:s}}=this,o=!!e||!s.isPinningLeft(),n=!!t,r=!!i||!s.isPinningRight();return o&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.colModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&_isGroupUseEntireRow(this.gos,s);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;if(!i?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(i.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new CellCtrl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){const s={list:[],map:{}},o=(d,c,u)=>{u!=null?s.list.splice(u,0,c):s.list.push(c),s.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&o(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(s.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,i)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=s.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);o(d,c,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==i){const d=l.column.getInstanceId();if(!s.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=s.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);o(d,u,g)}}}return s}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;const s=t?.getCellSpan(i.column,this.rowNode);if(s){if(s.firstNode!==this.rowNode||!s.doesSpanContain(i))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){const{column:o}=e;if(o.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:n}=e,{visibleCols:r}=this.beans,a=e.isCellFocused();return n||a?!(r.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||_isDomLayout(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=_exists(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,s=i.isPinningLeft(),o=i.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&i&&s&&o}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(i=>i.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(i=>{this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const i=e==="Above",s=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",s)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:_makeNull(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:i,column:s}=t;if(!(i.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??s};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),i=t?t.element:null,s=i===e.target,o=_getActiveDomElement(this.beans);let n=!1;i&&o&&(n=i.contains(o)&&o.classList.contains("ag-cell"));let r=null;!s&&!n&&(r=_findNextFocusableElement(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&s||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>_isVisible(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(i=>{_addOrRemoveAttribute(i.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let s;if(this.fullWidthGui)s=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?s=n==="right"?this.rightGui?.element:this.leftGui?.element:s=this.centerGui?.element}s&&(s.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};return e.list.forEach(s=>{s!==t&&(i.list.push(s),i.map[s.column.getInstanceId()]=s)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return _addGridCommonParams(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){_isStopPropagationForAgGrid(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);if(!(!t||!i))return{rowGui:t,column:i}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=_isElementChildOfClass(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:i,focusSvc:s}=this.beans;i?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:n,column:r}=o,a=n.element,l=e.target;let d=e.defaultPrevented||_isBrowserSafari();a&&a.contains(l)&&_isFocusableFormField(l)&&(d=!1),s.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(_isStopPropagationForAgGrid(e)||this.lastMouseDownOnDragger)return;const{eventSvc:i,selectionSvc:s}=this.beans;i.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:i,rowNode:s}=this,o=_addGridCommonParams(i,{fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{i.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return _getFullWidthDetailCellRendererDetails(n,o);case"FullWidthGroup":return o.value=s.groupValue,o.valueFormatted=s.rowGroupColumn?this.beans.valueSvc.formatValue(s.rowGroupColumn,s,o.value):o.value,_getFullWidthGroupCellRendererDetails(n,o);case"FullWidthLoading":return _getFullWidthLoadingCellRendererDetails(n,o);default:return _getFullWidthCellRendererDetails(n,o)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",s){const{rowDragSvc:o,context:n}=this.beans;if(!o||!this.isFullWidth())return;const r=o.createRowDragComp(()=>i,this.rowNode,void 0,e,t,s);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass(t,!0),s.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:s,beans:o}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(s.rowIndex%2===0?"ag-row-even":"ag-row-odd"),s.isRowPinned()&&n.push("ag-row-pinned"),s.isSelected()&&n.push("ag-row-selected"),s.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),s.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(n,s),s.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=o;return r&&(r.processClassesFromGridOptions(n,s),r.preProcessRowClassRules(n,s)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:s,beans:o,gos:n}=this;i.addManagedListeners(t,{mouseenter:()=>s.dispatchRowEvent("mouseEnter"),mouseleave:()=>s.dispatchRowEvent("mouseLeave")}),i.addManagedListeners(s,{mouseEnter:()=>{!o.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(i=>i.element);for(const i of t)i.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,s=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),s)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),o=_isGetRowHeightFunction(this.gos)?_getRowHeightForNode(this.beans,this.rowNode).height:void 0,n=o?`${Math.min(i,o)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&_isAnimateRows(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(_getActiveDomElement(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(i=>i.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,i=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);i!==this.rowFocused&&(this.rowFocused=i,this.setFocusedClasses()),!i&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){if(!this.printLayout&&_exists(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let i;if(t.sticky)i=t.stickyRowTop;else{const s=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(s);i=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return i+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let i=null;return this.getAllCellCtrls().forEach(s=>{s.column==e&&(i=s)}),i!=null||t||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(e)>=0&&(i=s)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,o=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.addOrRemoveCssClass("ag-row-even",s),n.rowComp.addOrRemoveCssClass("ag-row-odd",!s),_setAriaRowIndex(n.element,o)})}};function _isEventFromPrintableCharacter(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function _isUserSuppressingKeyboardEvent(e,t,i,s,o){const n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_addGridCommonParams(e,{event:t,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(n&&n(r))}function _selectAllCells(e){const{pinnedRowModel:t,rowModel:i}=e,[s,o]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=s?null:"top";let r,a;o?(r=null,a=i.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var A_KEYCODE=65,C_KEYCODE=67,V_KEYCODE=86,D_KEYCODE=68,Z_KEYCODE=90,Y_KEYCODE=89;function _normaliseQwertyAzerty(e){const{keyCode:t}=e;let i;switch(t){case A_KEYCODE:i=KeyCode.A;break;case C_KEYCODE:i=KeyCode.C;break;case V_KEYCODE:i=KeyCode.V;break;case D_KEYCODE:i=KeyCode.D;break;case Z_KEYCODE:i=KeyCode.Z;break;case Y_KEYCODE:i=KeyCode.Y;break;default:i=e.code}return i}var RowContainerEventsFeature=class extends BeanStub{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",_isEventSupported("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:s})})}processMouseEvent(e,t){if(!_isEventFromThisGrid(this.gos,t)||_isStopPropagationForAgGrid(t))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,s,i)):(i&&i.onMouseEvent(e,t),s&&s.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:_getCellCtrlForEventTarget(t,e),rowCtrl:_getCtrlForEventTarget(t,e,DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){const{rowNode:s,column:o,editing:n}=e;!_isUserSuppressingKeyboardEvent(this.gos,i,s,o,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.editing),_isEventFromPrintableCharacter(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:s}=e,{focusSvc:o,navigation:n}=this.beans,r=o.getFocusedCell(),a=r&&r.column;if(!_isUserSuppressingKeyboardEvent(this.gos,i,s,a,!1)){const d=i.key;if(t==="keydown")switch(d){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:n?.handlePageScrollingKey(i,!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case KeyCode.UP:case KeyCode.DOWN:e.onKeyboardNavigate(i);break;case KeyCode.TAB:e.onTabKeyDown(i);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!_isEventFromThisGrid(this.gos,e))return;const i=_normaliseQwertyAzerty(e),{clipboardSvc:s,undoRedo:o}=this.beans;if(i===KeyCode.A)return this.onCtrlAndA(e);if(i===KeyCode.C)return this.onCtrlAndC(s,e);if(i===KeyCode.D)return this.onCtrlAndD(s,e);if(i===KeyCode.V)return this.onCtrlAndV(s,e);if(i===KeyCode.X)return this.onCtrlAndX(s,e);if(i===KeyCode.Y)return this.onCtrlAndY(o);if(i===KeyCode.Z)return this.onCtrlAndZ(o,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:s},gos:o}=this;i&&_isCellSelectionEnabled(o)&&t.isRowsToRender()?_selectAllCells(this.beans):s&&s?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:_getSelectAll(o)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},SetHeightFeature=class extends BeanStub{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},getTopRowCtrls=e=>e.topRowCtrls,getStickyTopRowCtrls=e=>e.getStickyTopRowCtrls(),getStickyBottomRowCtrls=e=>e.getStickyBottomRowCtrls(),getBottomRowCtrls=e=>e.bottomRowCtrls,getCentreRowCtrls=e=>e.allRowCtrls,getSpannedTopRowCtrls=e=>e.getCtrls("top"),getSpannedCenterRowCtrls=e=>e.getCtrls("center"),getSpannedBottomRowCtrls=e=>e.getCtrls("bottom"),ContainerCssClasses={center:{type:"center",name:"center-cols",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:getCentreRowCtrls},topCenter:{type:"center",name:"floating-top",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:getTopRowCtrls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:getStickyTopRowCtrls},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:getStickyTopRowCtrls},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:getStickyTopRowCtrls},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:getStickyTopRowCtrls},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:getStickyBottomRowCtrls},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:getStickyBottomRowCtrls},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:getStickyBottomRowCtrls},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:getStickyBottomRowCtrls},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:getBottomRowCtrls}};function _getRowViewportClass(e){return`ag-${_getRowContainerOptions(e).name}-viewport`}function _getRowContainerClass(e){const t=_getRowContainerOptions(e);return t.container??`ag-${t.name}-container`}function _getRowSpanContainerClass(e){return`ag-${_getRowContainerOptions(e).name}-spanned-cells-container`}function _getRowContainerOptions(e){return ContainerCssClasses[e]}var allTopNoFW=["topCenter","topLeft","topRight"],allBottomNoFW=["bottomCenter","bottomLeft","bottomRight"],allMiddleNoFW=["center","left","right"],allMiddle=["center","left","right","fullWidth"],allCenter=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],allLeft=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],allRight=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],allStickyTopNoFW=["stickyTopCenter","stickyTopLeft","stickyTopRight"],allStickyBottomNoFW=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],allStickyContainers=[...allStickyTopNoFW,"stickyTopFullWidth",...allStickyBottomNoFW,"stickyBottomFullWidth"],allNoFW=[...allTopNoFW,...allBottomNoFW,...allMiddleNoFW,...allStickyTopNoFW,...allStickyBottomNoFW],RowContainerCtrl=class extends BeanStub{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=_getRowContainerOptions(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new ViewportSizeFeature(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,i,s){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=s,this.createManagedBean(new RowContainerEventsFeature(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(allLeft,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(allRight,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(allMiddle,()=>this.createManagedBean(new SetHeightFeature(this.eContainer,this.name==="center"?s:void 0))),n&&this.forContainers(allNoFW,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(allCenter,()=>this.createManagedBean(new CenterWidthFeature(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(allStickyContainers.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const i=this.gos.get("ensureDomOrder"),s=_isDomLayout(this.gos,"print");this.comp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=i=>{e.dragging&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return _getInnerWidth(this.eViewport)}getCenterViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=_observeResize(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return _isInDOM(this.eViewport)}getViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||_isHorizontalScrollShowing(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){_setScrollLeft(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const i=_isDomLayout(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},CSS_CLASS_FORCE_VERTICAL_SCROLL="ag-force-vertical-scroll",CSS_CLASS_CELL_SELECTABLE="ag-selectable",CSS_CLASS_COLUMN_MOVING="ag-column-moving",GridBodyCtrl=class extends BeanStub{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${_getRowViewportClass("center")}`),this.eFullWidthContainer=i.querySelector(`.${_getRowContainerClass("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${_getRowContainerClass("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${_getRowContainerClass("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new LayoutFeature(this.comp)),this.scrollFeature=this.createManagedBean(new GridBodyScrollFeature(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const i=t&&e.getScrollbarWidth()||0,s=_isInvisibleScrollbar()?16:0,o=`calc(100% + ${i+s}px)`;_requestAnimationFrame(this.beans,()=>this.comp.setBodyViewportWidth(o)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let i=this.gos.get("treeData");if(!i){const s=t.isPivotMode();i=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:i=>{const{target:s}=i,o=_isElementChildOfClass(s,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:i=>{const{target:s,relatedTarget:o}=i,n=t.contains(o),r=_isElementChildOfClass(o,"ag-root",t);_isElementChildOfClass(s,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(CSS_CLASS_COLUMN_MOVING,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(CSS_CLASS_CELL_SELECTABLE,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,i=t.isLastRowIndexKnown()?t.getRowCount():-1,s=i===-1?-1:e+i;this.comp.setRowCount(s)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?CSS_CLASS_FORCE_VERTICAL_SCROLL:null,i=_isDomLayout(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&_isVerticalScrollShowing(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const s=()=>{const o=i&&_isAnimateRows(this.gos)&&!e.stretching,n=o?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,o)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({gridStylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,s())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,i=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:i}),t?.mockBodyContextMenu(this,i),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&_isEventFromThisGrid(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e,o=s||Math.abs(t)>Math.abs(i),n=e.target;o?(this.eStickyTopFullWidthContainer.contains(n)||this.eStickyBottomFullWidthContainer.contains(n))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,i=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(i<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,s=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=s+n;i.setStickyBottomBottom(`${r}px`)}},AbstractFakeScrollComp=class extends Component{constructor(e,t){super(),this.direction=t,this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",_isMacOsUserAgent()||_isIOSUserAgent())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=_isInvisibleScrollbar(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),_requestAnimationFrame(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;_waitUntil(()=>_isVisible(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},FakeHScrollElement={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},FakeHScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeHScrollElement,"horizontal"),this.eLeftSpacer=RefPlaceholder,this.eRightSpacer=RefPlaceholder,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new CenterWidthFeature(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,s=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=s),_setFixedWidth(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(o+=s),_setFixedWidth(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:s===0&&t?16:s,r=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),_setFixedHeight(this.getGui(),n),_setFixedHeight(this.eViewport,n),_setFixedHeight(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return _getScrollLeft(this.eViewport,this.enableRtl)}setScrollPosition(e){_isVisible(this.eViewport)||this.attemptSettingScrollPosition(e),_setScrollLeft(this.eViewport,e,this.enableRtl)}},FakeHScrollSelector={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:FakeHScrollComp},FakeVScrollElement={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},FakeVScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeVScrollElement,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new SetHeightFeature(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,s=t&&e.getScrollbarWidth()||0,o=s===0&&i?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),_setFixedWidth(this.getGui(),o),_setFixedWidth(this.eViewport,o),_setFixedWidth(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const i=e.getGridBodyCtrl().eBodyViewport,s=this.getScrollPosition(),o=i.scrollTop;s!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!_isVisible(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},FakeVScrollSelector={selector:"AG-FAKE-VERTICAL-SCROLL",component:FakeVScrollComp};function getHeaderRowCount(e){return e.cols?e.cols.treeDepth+1:-1}function getFocusHeaderRowCount(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function getGroupRowsHeight(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const s of i){if(!s)continue;const o=s.getGroupRowCount()||0;for(let n=0;n<o;n++){const r=s.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=getColumnGroupHeaderRowHeight(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function getColumnGroupHeaderRowHeight(e,t){let s=e.colModel.isPivotMode()?getPivotGroupHeaderHeight(e):getGroupHeaderHeight(e);const o=t.getHeaderCellCtrls();for(const n of o){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>s&&r.isAutoHeaderHeight()&&(s=a)}return s}function getColumnHeaderRowHeight(e){let i=e.colModel.isPivotMode()?getPivotHeaderHeight(e):getHeaderHeight(e);return e.colModel.forAllCols(s=>{const o=s.getAutoHeaderHeight();o!=null&&o>i&&s.isAutoHeaderHeight()&&(i=o)}),i}function getHeaderHeight(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function getFloatingFiltersHeight(e){return e.gos.get("floatingFiltersHeight")??getHeaderHeight(e)}function getGroupHeaderHeight(e){return e.gos.get("groupHeaderHeight")??getHeaderHeight(e)}function getPivotHeaderHeight(e){return e.gos.get("pivotHeaderHeight")??getHeaderHeight(e)}function getPivotGroupHeaderHeight(e){return e.gos.get("pivotGroupHeaderHeight")??getGroupHeaderHeight(e)}var GridHeaderCtrl=class extends BeanStub{setComp(e,t,i){this.comp=e,this.eGui=t;const{beans:s}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=s;o&&this.createManagedBean(new ManagedFocusFeature(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>_requestAnimationFrame(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=getGroupRowsHeight(e).reduce((n,r)=>n+r,0),s=getColumnHeaderRowHeight(e);if(e.filterManager?.hasFloatingFilters()&&(t+=getFloatingFiltersHeight(e)),t+=i,t+=s,this.headerHeight===t)return;this.headerHeight=t;const o=`${t+1}px`;this.comp.setHeightAndMinHeight(o),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(s=>s.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,s=i!==t?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(s,!0,e)||!i&&r.focusOverlay(!1)||_focusNextGridCoreContainer(o,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case KeyCode.LEFT:t="LEFT";case KeyCode.RIGHT:{_exists(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case KeyCode.UP:t="UP";case KeyCode.DOWN:{_exists(t)||(t="DOWN"),i.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:s}=this;!t&&i.contains(_getActiveDomElement(s))||i.contains(t)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:s,ctrlsSvc:o}=this.beans;if(!e&&!i||!s?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===o.getHeaderRowContainerCtrl()?.eViewport)&&s.showHeaderContextMenu(void 0,e,i)}},AbstractHeaderCellComp=class extends Component{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},HeaderCellElement={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},HeaderCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderCellElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((o,n)=>{n!=null&&n!=""?e.setAttribute(o,n):e.removeAttribute(o)})("col-id",this.ctrl.column.getColId());const i={setWidth:o=>e.style.width=o,addOrRemoveCssClass:(o,n)=>this.addOrRemoveCssClass(o,n),setUserStyles:o=>_addStylesToElement(e,o),setAriaSort:o=>o?_setAriaSort(e,o):_removeAriaSort(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const s=this.ctrl.getSelectAllGui();s&&this.eResize.insertAdjacentElement("afterend",s)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},HeaderGroupCellCompElement={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},HeaderGroupCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderGroupCellCompElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder}postConstruct(){const e=this.getGui(),t=(s,o)=>o!=null?e.setAttribute(s,o):e.removeAttribute(s);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const i={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setUserStyles:s=>_addStylesToElement(e,s),setHeaderWrapperHidden:s=>{s?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:s=>{s!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${s}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",s!=null)},setResizableDisplayed:s=>_setDisplayed(this.eResize,s),setWidth:s=>e.style.width=s,setAriaExpanded:s=>t("aria-expanded",s),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),s=e.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:i}=this;t?i.style.setProperty(e,t):i.style.removeProperty(e)}},HeaderFilterCellCompElement={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},HeaderFilterCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderFilterCellCompElement,e),this.eFloatingFilterBody=RefPlaceholder,this.eButtonWrapper=RefPlaceholder,this.eButtonShowMainFilter=RefPlaceholder}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setUserStyles:i=>_addStylesToElement(e,i),addOrRemoveBodyCssClass:(i,s)=>this.eFloatingFilterBody.classList.toggle(i,s),setButtonWrapperDisplayed:i=>_setDisplayed(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},HeaderRowComp=class extends Component{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){_setAriaRowIndex(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(s=>{const o=s.instanceId;let n=i[o];delete i[o],n==null&&(n=this.createHeaderComp(s),this.getGui().appendChild(n.getGui())),this.headerComps[o]=n}),Object.values(i).forEach(s=>{this.getGui().removeChild(s.getGui()),this.destroyBean(s)}),t){const s=Object.values(this.headerComps);s.sort((n,r)=>{const a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const o=s.map(n=>n.getGui());_setDomChildOrder(this.getGui(),o)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new HeaderGroupCellComp(e);break;case"filter":t=new HeaderFilterCellComp(e);break;default:t=new HeaderCellComp(e);break}return this.createBean(t),t.setParentComponent(this),t}},SetLeftFeature=class extends BeanStub{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=s,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?_last(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),s=_exists(this.columnOrGroup.getOldLeft());t?.isActive()&&s&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),i=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===i&&this.setLeft(i)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:i,visibleCols:s}=this.beans;if(!_isDomLayout(i,"print")||e.getPinned()==="left")return t;const n=s.getColsLeftWidth();if(e.getPinned()==="right"){const r=s.bodyWidth;return n+r+t}return n+t}setLeft(e){if(_exists(e)&&(this.eCell.style.left=`${e}px`),isColumnGroup2(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&_setAriaColSpan(this.ariaEl,t.length)}}},instanceIdSequence4=0,DOM_DATA_KEY_HEADER_CTRL="headerCtrl",AbstractHeaderCellCtrl=class extends BeanStub{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+instanceIdSequence4++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,s=i.getDefinition(),o=s&&s.suppressHeaderKeyboardEvent;if(!_exists(o))return!1;const n=_addGridCommonParams(this.gos,{colDef:s,column:i,headerRowIndex:t,event:e});return!!o(n)}getWrapperHasFocus(){return _getActiveDomElement(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const s=this.getHeaderClassParams();i=t(s)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:s}=e,{beans:o}=this,n=u=>{if(!this.isAlive()||!s.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=_getElementSize(this.eGui),m=h+g+p+f,w=t.offsetHeight+m;if(u<5){const v=_getDocument(o),b=!v||!v.contains(t),y=w==0;if(b||y){_batchCall(()=>n(u+1),"raf",o);return}}this.setColHeaderHeight(this.column,w)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=_observeResize(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),s.addDestroyFunc(()=>c()),s.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:s}=this;!e||!t||!s||(refreshFirstAndLastStyles(e,t,i.visibleCols),_setAriaColIndex(s,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_isHeaderFocusSuppressed(this.beans);this.eGui&&_addOrRemoveAttribute(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=_getActiveDomElement(this.beans),i=e.key===KeyCode.LEFT||e.key===KeyCode.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i))return;const o=e.key===KeyCode.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:i}=this;let s=e.key===KeyCode.LEFT!==t.get("enableRtl");const o=i.getPinned(),n=t.get("enableRtl");return o&&n!==(o==="right")&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=DOM_DATA_KEY_HEADER_CTRL,{eGui:i,gos:s}=this;_setDomData(s,i,t,this),e.addDestroyFunc(()=>_setDomData(s,i,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const s=e??t,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),o?.isHeaderContextMenuEnabled(i)&&o.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},HeaderCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,i,s,o){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=setupCompBean(this,d,o);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,i,e,this)):_setDisplayed(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new SetLeftFeature(r,t,a)),h.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return _addGridCommonParams(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return _getHeaderCompDetails(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:i,gos:s}=this.beans;return _addGridCommonParams(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||_isLegacyMenuEnabled(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===KeyCode.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===KeyCode.ENTER&&this.onEnterKeyDown(e),e.key===KeyCode.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();isHeaderComp(i)&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),_isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=_getHeaderClassesFromColDef(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(o=>{s.has(o)?s.delete(o):this.comp.addOrRemoveCssClass(o,!0)}),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this,o=getGroupRowsHeight(this.beans),n=o.reduce((c,u)=>c+=u,0)===0;if(i.addOrRemoveCssClass("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",r>0);const l=getColumnHeaderRowHeight(s);if(r===0){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let c=0;c<r;c++)d+=o[o.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(_getAriaSortState(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!_isLegacyMenuEnabled(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(_getActiveDomElement(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>t==="filter"?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return isHeaderComp(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function isHeaderComp(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var instanceIdSequence5=0,HeaderRowCtrl=class extends BeanStub{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=instanceIdSequence5++,this.allCtrls=[];const s=i=="group"?"ag-header-row-column-group":i=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}postConstruct(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=setupCompBean(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],i=getGroupRowsHeight(this.beans),s=getColumnHeaderRowHeight(this.beans);t.push(...i),t.push(s),e?.hasFloatingFilters()&&t.push(getFloatingFiltersHeight(this.beans));let o=0;for(let r=0;r<this.rowIndex;r++)o+=t[r];const n=t[this.rowIndex];return{topOffset:o,rowHeight:n}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const i=s=>{const{focusSvc:o,visibleCols:n}=this.beans;return o.isHeaderWrapperFocused(s)?n.isVisible(s.column):!1};if(e)for(const[s,o]of e)i(o)?this.ctrlsById.set(s,o):this.destroyBean(o);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const s=e.getUniqueId();let o;if(i&&(o=i.get(s),i.delete(s)),o&&o.column!=e&&(this.destroyBean(o),o=void 0),o==null)switch(this.type){case"filter":{o=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":o=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:o=this.createBean(new HeaderCellCtrl(e,this));break}t.set(s,o)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:i}=this.beans;return["left",null,"right"].forEach(s=>{const o=i.getHeadersToRender(s,t);e=e.concat(o)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const i=this.allCtrls.find(o=>o.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},HeaderRowContainerCtrl=class extends BeanStub{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:i,ctrlsSvc:s,colModel:o,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;s.register(l,this),o.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:i,filterManager:s}=this.beans;let o=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const c=getHeaderRowCount(i)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const h=this.createBean(new HeaderRowCtrl(o++,this.pinned,"group"));this.groupsRowCtrls.push(h)}},a=()=>{const c=o++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new HeaderRowCtrl(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=o++;if(this.filtersRowCtrl){const h=this.filtersRowCtrl.rowIndex!==u;(!e||h)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new HeaderRowCtrl(u,this.pinned,"filter")))};r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(s=>s.column===e);if(isColumn(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const s=t(this.groupsRowCtrls[i]);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const o=this.getAllCtrls()[e];return o?o.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const i=e?.createBodyDropTarget(this.pinned,t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){if(!t)return;const{column:i}=t;i.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new CenterWidthFeature(e=>this.comp.setCenterWidth(`${e}px`),!0))}},MenuService=class extends BeanStub{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:i}=this.beans,s=t&&_isLegacyMenuEnabled(this.gos)?t:i;this.showColumnMenuCommon(s,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(_isLegacyMenuEnabled(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&isColumn(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(_isIOSUserAgent()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return _isLegacyMenuEnabled(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,s){const{positionBy:o,onClosedCallback:n}=t,r=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,i,n,s)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,i,n,s)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),_requestAnimationFrame(a,()=>{const d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(s),i,n,!0)})}}};function _setColMenuVisible(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}var OverlayComponent=class extends Component{constructor(){super()}},LoadingOverlayElement={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},LoadingOverlayComponent2=class extends OverlayComponent{init(){const e=_makeNull(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??LoadingOverlayElement),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},NoRowsOverlayElement={tag:"span",cls:"ag-overlay-no-rows-center"},NoRowsOverlayComponent2=class extends OverlayComponent{init(){const e=_makeNull(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??NoRowsOverlayElement),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function _createIcon(e,t,i){const s=_createIconNoSpan(e,t,i);if(s){const{className:n}=s;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return s}const o=_createElement({tag:"span"});return o.appendChild(s),o}function _createIconNoSpan(e,t,i){let s=null;e==="smallDown"?_warn(262):e==="smallLeft"?_warn(263):e==="smallRight"&&_warn(264);const o=i&&i.getColDef().icons;if(o&&(s=o[e]),t.gos&&!s){const n=t.gos.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else{_warn(38,{iconName:e});return}if(typeof n=="string")return _loadTemplate(n);if(_isNodeOrElement(n))return n;_warn(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),_createElement({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var dragAndDropImageComponentCSS=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",DragAndDropElement={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},DragAndDropImageComponent2=class extends Component{constructor(){super(),this.dragSource=null,this.eIcon=RefPlaceholder,this.eLabel=RefPlaceholder,this.eGhost=RefPlaceholder,this.registerCSS(dragAndDropImageComponentCSS)}postConstruct(){const e=t=>_createIcon(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(DragAndDropElement),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:i,dragSource:s,dropIconMap:o,gos:n}=this;_clearElement(i);let r=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),r=o[e],i.classList.toggle("ag-shake-left-to-right",t),!(r===o.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&i.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},agAbstractLabelCSS=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",AgAbstractLabel=class extends Component{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(agAbstractLabelCSS)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;_clearElement(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(_setDisplayed(t,!1),_setAriaRole(t,"presentation")):(_setDisplayed(t,!0),_setAriaRole(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(_setElementWidth(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return _setDisabled(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},AgAbstractField=class extends AgAbstractLabel{constructor(e,t,i,s){super(e,t,i),this.className=s}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||_getAriaLabel(e)!==null?_setAriaLabelledBy(e,""):_setAriaLabelledBy(e,t??"")}setAriaLabel(e){return _setAriaLabel(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _setFixedWidth(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function buildTemplate(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var AgAbstractInputField=class extends AgAbstractField{constructor(e,t,i="text",s="input"){super(e,e?.template??buildTemplate(s),[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eInput=RefPlaceholder}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:i,className:s}=this;e.classList.add(`${s}-label`),t.classList.add(`${s}-input-wrapper`),i.classList.add(`${s}-input`),this.addCssClass("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:n}=this.config;o!=null&&this.setInputName(o),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([i])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return _addOrRemoveAttribute(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return _setAriaLabel(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _setDisabled(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)_addOrRemoveAttribute(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";_addOrRemoveAttribute(this.eInput,"autocomplete",t)}return this}},AgCheckbox=class extends AgAbstractInputField{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},AgCheckboxSelector={selector:"AG-CHECKBOX",component:AgCheckbox},checkboxCellRendererCSS=".ag-checkbox-cell{height:100%}",CheckboxCellRendererElement={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxCellRenderer=class extends Component{constructor(){super(CheckboxCellRendererElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder,this.registerCSS(checkboxCellRendererCSS)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,s=t.getInputElement();s.setAttribute("tabindex","-1"),_setAriaLive(s,"polite"),this.addManagedListeners(s,{click:o=>{if(_stopPropagationForAgGrid(o),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:o=>{_stopPropagationForAgGrid(o)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(o.key===KeyCode.SPACE&&!t.isDisabled()){e.eGridCell===_getActiveDomElement(i)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:s,column:o,node:n}=e;if(n.group&&o)if(typeof s=="boolean")t=s;else{const u=o.getColId();u.startsWith(GROUP_AUTO_COLUMN_ID)?t=s==null||s===""?void 0:s==="true":n.aggData&&n.aggData[u]!==void 0?t=s??void 0:i=!1}else t=s??void 0;const{eCheckbox:r}=this;if(!i){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!o?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=_getAriaCheckboxStateName(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:i}=this,{column:s,node:o,value:n}=i,r={column:s,colDef:s.getColDef(),data:o.data,node:o,rowIndex:o.rowIndex,rowPinned:o.rowPinned,value:n};t.dispatchEvent({type:"cellEditingStarted",...r});const a=o.setDataValue(s,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...r,oldValue:n,newValue:e,valueChanged:a}),a||this.updateCheckbox(i)}},ROOT_NODE_ID="ROOT_NODE_ID",AbstractClientSideNodeManager=class extends BeanStub{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=ROOT_NODE_ID,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,i)=>this.createRowNode(t,i))??[]}setImmutableRowData(e,t){const i=_getRowIdCallback(this.gos),s=!this.gos.get("suppressMaintainUnsortedOrder"),o=e.changedRowNodes,n=new Set,r=this.rootNode,a=r.allLeafChildren,l=a.length;let d=!1,c=!1,u=!1,h=!1;for(let p=0,f=-1,m=t.length;p<m;p++){const C=t[p];let w=this.getRowNode(i({data:C,level:0}));if(!w)d=!0,w=this.createRowNode(C,-1),o.add(w);else{if(s){const v=w.sourceRowIndex;h||(h=v<=f||d),f=v}w.data!==C&&(u=!0,w.updateData(C),o.update(w))}n.add(w)}const g=[];for(let p=0;p<l;p++){const f=a[p];n.has(f)||(c=!0,f.isSelected()&&g.push(f),this.rowNodeDeleted(f),o.remove(f))}if(d||c||h){const p=new Array(n.size);let f=0;if(!s)for(let C=0;C<l;++C){const w=a[C];n.delete(w)&&(w.sourceRowIndex=f,p[f++]=w)}for(const C of n)C.sourceRowIndex=f,p[f++]=C;r.allLeafChildren=p;const m=r.sibling;m&&(m.allLeafChildren=p),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=h)}(d||c||h||u)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,i=this.allNodesMap;i[t]===e&&delete i[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const i={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},s=[],o=_getRowIdCallback(this.gos);return this.executeRemove(o,e,i,s),this.executeUpdate(o,e,i,s),this.executeAdd(e,i),this.deselectNodes(s),i}executeAdd(e,t){const i=e.add;if(!i?.length)return;let s=this.rootNode.allLeafChildren,o=s.length;if(typeof e.addIndex=="number"&&(o=this.sanitizeAddIndex(e.addIndex),o>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<s.length;u++)if(s[u]?.rowIndex==o-1){o=u+1;break}}const n=i.length,r=t.changedRowNodes,a=new Array(n);for(let c=0;c<n;c++){const u=this.createRowNode(i[c],o+c);r.add(u),a[c]=u}const l=this.rootNode;if(o<s.length){const c=s.slice(0,o),u=s.slice(o,s.length),h=c.length+a.length;for(let g=0,p=u.length;g<p;++g)u[g].sourceRowIndex=h+g;s=[...c,...a,...u],t.rowsInserted=!0}else s=s.concat(a);l.allLeafChildren=s;const d=l.sibling;d&&(d.allLeafChildren=s),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){const{remove:n}=t;if(!n?.length)return;const r={};n.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&o.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],s.remove.push(c),i.remove(c))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!r[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){const{update:n}=t;n?.length&&n.forEach(r=>{const a=this.lookupRowNode(e,r);a&&(a.updateData(r),!a.selectable&&a.isSelected()&&o.push(a),s.update.push(a),i.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",i=this.beans.selectionSvc,s=e.length>0;s&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),s&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const i=new RowNode(this.beans);return i.parent=this.rootNode,i.level=0,i.group=!1,i.expanded=!1,i.sourceRowIndex=t,i.setDataAndId(e,String(this.nextId)),this.allNodesMap[i.id]&&_warn(2,{nodeId:i.id}),this.allNodesMap[i.id]=i,this.nextId++,i}lookupRowNode(e,t){let i;if(e){const s=e({data:t,level:0});if(i=this.allNodesMap[s],!i)return _error(4,{id:s}),null}else if(i=this.rootNode?.allLeafChildren?.find(s=>s.data===t),!i)return _error(5,{data:t}),null;return i||null}},ServerSideTransactionResultStatus=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(ServerSideTransactionResultStatus||{}),CheckboxSelectionComponentElement={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxSelectionComponent=class extends Component{constructor(){super(CheckboxSelectionComponentElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,s=t.isSelected(),o=_getAriaCheckboxStateName(e,s),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);i.setValue(s,!0),i.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:_stopPropagationForAgGrid,click:s=>{_stopPropagationForAgGrid(s),this.beans.selectionSvc?.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{const n=typeof s=="object"?_getHideDisabledCheckboxes(s):void 0,r=typeof o=="object"?_getHideDisabledCheckboxes(o):void 0;n!==r&&this.onSelectableChanged()}),_getIsRowSelectable(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:s}=this;let o=t.selectable;const n=this.getIsVisible();if(o)if(typeof n=="function"){const l=i?.callbackParams;if(!e)o=n({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);o=n({...l,...d})}}else o=n??!1;const r=s.get("rowSelection");if(r&&typeof r!="string"?!_getHideDisabledCheckboxes(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(i?.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?_getCheckboxes(t):this.column?.getColDef()?.checkboxSelection}},RowRangeSelectionContext=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=t[0].id===this.rootId,s=t.findIndex(o=>o.id===e.id);if(s>-1){const o=t.slice(0,s),n=t.slice(s+1);return this.setEndRange(e),i?{keep:o,discard:n}:{keep:n,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&o.push(n)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const s=this.rowModel.getNodesInRangeForSelection(i,e);if(!s)return this.setRoot(e),{keep:[e],discard:[]};if(s.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}},SelectAllFeature=class extends BeanStub{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(_getActiveDomElement(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new AgCheckbox);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),_setAriaRole(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const o=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;o(i)!==o(s)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,s=t.getSelectAllState(e);i.setValue(s);const o=t.hasNodesToSelect(e);i.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:o}=this,r=s.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",o?`${a} (${r})`:null),s.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return _isMultiRowSelection(this.gos)?!0:(_warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return _isClientSideRowModel(t)||_isServerSideRowModel(t)?!0:(_warn(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const s={source:i,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(s):o.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,s=t.get("rowSelection"),o=e.getColDef(),{headerCheckboxSelection:n}=o;let r=!1;const a=typeof s=="object";if(a){const d=isColumnSelectionCol(e),c=isColumnGroupAutoCol(e);(_getCheckboxLocation(s)==="autoGroupColumn"&&c||d&&i.selectionColSvc?.isSelectionColumnEnabled())&&(r=_getHeaderCheckbox(s))}else typeof n=="function"?r=n(_addGridCommonParams(t,{column:e,colDef:o})):r=!!n;const l=a?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=_getSelectAll(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}},BaseSelectionService=class extends BeanStub{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new RowRangeSelectionContext(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=_getIsRowSelectable(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=_getIsRowSelectable(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new CheckboxSelectionComponent}createSelectAllFeature(e){return new SelectAllFeature(e)}isMultiSelect(){return _isMultiRowSelection(this.gos)}onRowCtrlSelected(e,t,i){const s=!!e.rowNode.isSelected();e.forEachGui(i,o=>{o.rowComp.addOrRemoveCssClass("ag-row-selected",s);const n=o.element;_setAriaSelected(n,s),n.contains(_getActiveDomElement(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!_isRowSelection(this.gos)}updateRowSelectable(e,t){const i=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(_getGroupSelectsDescendants(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];let n=o.isSelected();if(!o.selectable){const r=this.calculateSelectedFromChildren(o);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,s="api"){const o=!e.selectable&&t,n=e.__selected===t;if(o||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;return r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({..._createGlobalRowEvent(e,this.gos,"rowSelected"),event:i||null,source:s}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const s=isColumnSelectionCol(e)&&_getCheckboxes(i);return e.isColumnFunc(t,s)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,s){const{gos:o,selectionCtx:n}=this,r=e.isSelected(),a=_getGroupSelectsDescendants(o),l=_getEnableSelection(o),d=_getEnableDeselection(o),c=this.isMultiSelect(),u=s==="rowClicked";if(u&&a&&e.group||u&&!(l||d))return null;if(t&&i&&c){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else{if(i)return n.setRoot(e),u&&r&&!d?null:{node:e,newValue:!r,clearSelection:!c};{n.setRoot(e);const h=_getEnableSelectionWithoutKeys(o),g=_getGroupSelection(o)==="filteredDescendants",p=u&&(!h||!l);if(g&&r===void 0&&_isClientSideRowModel(o))return{node:e,newValue:!1,clearSelection:!c||p};if(u){const f=r?!h:l;return f===r&&!p||f&&!l||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p}}return{node:e,newValue:!r,clearSelection:!c||p}}}}},AgRadioButton=class extends AgCheckbox{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},agToggleButtonCSS='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}',AgToggleButton=class extends AgCheckbox{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(agToggleButtonCSS)}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},AgToggleButtonSelector={selector:"AG-TOGGLE-BUTTON",component:AgToggleButton},AgInputTextField=class extends AgAbstractInputField{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=_exists(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{_isEventFromPrintableCharacter(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{const s=i.clipboardData?.getData("text");s&&s.split("").some(o=>!e.test(o))&&i.preventDefault()}})}},AgInputTextFieldSelector={selector:"AG-INPUT-TEXT-FIELD",component:AgInputTextField},AgInputTextArea=class extends AgAbstractInputField{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},AgInputTextAreaSelector={selector:"AG-INPUT-TEXT-AREA",component:AgInputTextArea},AgInputNumberField=class extends AgInputTextField{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:s,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof s=="number"&&this.setMax(s),typeof o=="number"&&this.setStep(o)}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e),{min:i,max:s}=this;return i!=null&&t<i?e=i.toString():s!=null&&t>s&&(e=s.toString()),e}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const o=parseFloat(e).toFixed(i);return parseFloat(o).toString()}const s=String(e).split(".");if(s.length>1){if(s[1].length<=i)return e;if(i>0)return`${s[0]}.${s[1].slice(0,i)}`}return s[0]}setMin(e){return this.min===e?this:(this.min=e,_addOrRemoveAttribute(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,_addOrRemoveAttribute(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(_exists(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);const o=this.normalizeValue(i);s=i!=o}if(s)return t(i)}return e(i)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},AgInputNumberFieldSelector={selector:"AG-INPUT-NUMBER-FIELD",component:AgInputNumberField};function _padStartWidthZeros(e,t){return e.toString().padStart(t,"0")}function _serialiseDate(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>_padStartWidthZeros(o,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>_padStartWidthZeros(o,2)).join(":")),s}var calculateOrdinal=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function _dateToFormattedString(e,t="YYYY-MM-DD"){const i=_padStartWidthZeros(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>_padStartWidthZeros(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${calculateOrdinal(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${calculateOrdinal(e.getDate())}`,DD:()=>_padStartWidthZeros(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${calculateOrdinal(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(n).join("|"),"g");return t.replace(r,a=>a in n?n[a]():a)}function _parseDateTimeFromString(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(u=>parseInt(u,10));if(s.filter(u=>!isNaN(u)).length!==3)return null;const[o,n,r]=s,a=new Date(o,n-1,r);if(a.getFullYear()!==o||a.getMonth()!==n-1||a.getDate()!==r)return null;if(!i||i==="00:00:00")return a;const[l,d,c]=i.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var AgInputDateField=class extends AgInputTextField{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=_isBrowserSafari();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?_serialiseDate(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,_addOrRemoveAttribute(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?_serialiseDate(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,_addOrRemoveAttribute(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return _parseDateTimeFromString(this.getValue())??void 0}setDate(e,t){this.setValue(_serialiseDate(e??null,!1),t)}},AgInputDateFieldSelector={selector:"AG-INPUT-DATE-FIELD",component:AgInputDateField},SHOW_QUICK_TOOLTIP_DIFF=1e3,FADE_OUT_TOOLTIP_TIMEOUT=1e3,INTERACTIVE_HIDE_DELAY=100,lastTooltipHideTime,isLocked=!1,TooltipStateManager=class extends BeanStub{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!_isIOSUserAgent()&&(isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,i=this.tooltipCtrl.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||isLocked)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-lastTooltipHideTime<SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!_exists(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const i=t.getRowNode?.(),s=_addGridCommonParams(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:i,data:i?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);_getTooltipCompDetails(this.userCompFactory,s)?.newAgStackInstance().then(o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),lastTooltipHideTime=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(_getDocument(this.beans),{keydown:r=>{s.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=_getActiveDomElement(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=this.tooltipTrigger===0?FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},INTERACTIVE_HIDE_DELAY)}unlockService(){isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function _isShowTooltipWhenTruncated(e){return e.get("tooltipShowMode")==="whenTruncated"}function _getShouldDisplayTooltip(e,t){return _isShowTooltipWhenTruncated(e)?_shouldDisplayTooltip(t):void 0}function _shouldDisplayTooltip(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var TooltipFeature=class extends BeanStub{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new TooltipStateManager(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},AgList=class extends Component{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case KeyCode.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}break;case KeyCode.DOWN:case KeyCode.UP:e.preventDefault(),this.navigate(t);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===KeyCode.DOWN;let i;const{itemEls:s,highlightedEl:o}=this;if(!o)i=s[t?0:s.length-1];else{let r=s.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),s.length-1),i=s[r]}this.highlightItem(i)}navigateToPage(e){const{itemEls:t,highlightedEl:i}=this;if(!i||t.length===0)return;const s=t.indexOf(i),o=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===KeyCode.PAGE_HOME?a=0:e===KeyCode.PAGE_END?a=o:e===KeyCode.PAGE_DOWN?a=Math.min(s+r,o):e===KeyCode.PAGE_UP&&(a=Math.max(s-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{_removeFromParent(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();_setAriaRole(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,i)=>{_setAriaPosInSet(t,i+1),_setAriaSetSize(t,e.length)})}renderOption(e,t){const i=_getDocument(this.beans),s=i.createElement("div");_setAriaRole(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const o=i.createElement("span");s.appendChild(o),o.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListeners(s,{mouseover:()=>this.highlightItem(s),mousedown:n=>{n.preventDefault(),n.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(s=>s.value===e);if(i!==-1){const s=this.options[i];this.value=s.value,this.displayValue=s.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!_isVisible(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),_setAriaSelected(e,!0);const t=this.getGui(),{scrollTop:i,clientHeight:s}=t,{offsetTop:o,offsetHeight:n}=e;(o+n>i+s||o<i)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!_isVisible(e)||(e.classList.remove(this.activeClass),_setAriaSelected(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},agPickerFieldCSS=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",AgPickerFieldElement={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},AgPickerField=class extends AgAbstractField{constructor(e){if(super(e,e?.template||AgPickerFieldElement,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eDisplayField=RefPlaceholder,this.eIcon=RefPlaceholder,this.registerCSS(agPickerFieldCSS),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),o!=null&&this.setPickerMinWidth(o),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:s}=this.config;if(i){const o=_createIconNoSpan(i,this.beans);o&&this.eIcon.appendChild(o)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),_setAriaExpanded(e,!1),this.ariaRole&&_setAriaRole(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case KeyCode.UP:case KeyCode.DOWN:case KeyCode.ENTER:case KeyCode.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case KeyCode.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:o=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=_isNothingFocused(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=_formatSize(_getAbsoluteWidth(c)),a&&(e.style.maxWidth=a)):_setElementWidth(e,a??_getAbsoluteWidth(c));const p=n??`${_getInnerHeight(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:s},eWrapper:o,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:o,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();_setAriaExpanded(t,e);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},agSelectCSS=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",AgSelect=class extends AgPickerField{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(agSelectCSS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:_shouldDisplayTooltip(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new AgList("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),_setAriaControls(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:s=>{s?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===KeyCode.TAB&&this.hidePicker(),t){case KeyCode.ENTER:case KeyCode.UP:case KeyCode.DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case KeyCode.ESCAPE:super.onKeyDown(e);break;case KeyCode.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,i){const{listComponent:s,config:{placeholder:o},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!s)return this;if(i||s.setValue(e,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return l==null&&o&&(l=o),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AgSelectSelector={selector:"AG-SELECT",component:AgSelect},TabGuardClassNames={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},TabGuardCtrl=class extends BeanStub{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new ManagedFocusFeature(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():_findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=_getDocument(this.beans),i=_findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let o,n;e?(o=0,n=s):(o=s+1,n=i.length);const r=i.slice(o,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{const c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=_findFocusableElements(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return _findNextFocusableElement(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},TabGuardFeature=class extends BeanStub{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,o=[t,i],n={setTabIndex:m=>{o.forEach(C=>m!=null?C.setAttribute("tabindex",m):C.removeAttribute("tabindex"))}};this.addTabGuards(t,i);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new TabGuardCtrl({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=_getDocument(this.beans).createElement("div"),i=e==="top"?TabGuardClassNames.TAB_GUARD_TOP:TabGuardClassNames.TAB_GUARD_BOTTOM;return t.classList.add(TabGuardClassNames.TAB_GUARD,i),_setAriaRole(t,"presentation"),t}addTabGuards(e,t){const i=this.eFocusableElement;i.insertAdjacentElement("afterbegin",e),i.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];_clearElement(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){_isNodeOrElement(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_removeFromParent(e),_removeFromParent(t),super.destroy()}},TabGuardComp=class extends Component{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new TabGuardFeature(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},PopupComponent=class extends Component{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},TouchListener=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new LocalEventService,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchmove",s,{passive:!0}),e.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",i,{passive:!0}),e.removeEventListener("touchmove",s,{passive:!0}),e.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;const s={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!_areEventsNear(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const i={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(i),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},CellRangeType=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(CellRangeType||{}),VanillaFrameworkOverrides=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${BASE_URL}/${this.frameworkName}-data-grid`,setValidationDocLink(this.baseDocLink)}setInterval(e,t){return new AgPromise(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){let o={};if(typeof s=="object"?o=s:typeof s=="boolean"&&(o={capture:s}),o.passive==null){const n=getPassiveStateForEvent(t);n!=null&&(o.passive=n)}e.addEventListener(t,i,o)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function createGridApi(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var orderedCoreBeans=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],beanNamePosition=Object.fromEntries(orderedCoreBeans.map((e,t)=>[e,t]));function gridBeanInitComparator(e,t){const i=(e.beanName?beanNamePosition[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?beanNamePosition[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-s}function gridBeanDestroyComparator(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var PinnedLeftElement={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},PinnedRightElement={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},CenterElement={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},HeaderRowContainerComp=class extends Component{constructor(e){super(),this.eCenterContainer=RefPlaceholder,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:i=>this.setDisplayed(i),setCtrls:i=>this.setCtrls(i),setCenterWidth:i=>this.eCenterContainer.style.width=i,setViewportScrollLeft:i=>this.getGui().scrollLeft=i,setPinnedContainerWidth:i=>{const s=this.getGui();s.style.width=i,s.style.maxWidth=i,s.style.minWidth=i}};this.createManagedBean(new HeaderRowContainerCtrl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",i=e?PinnedLeftElement:t?PinnedRightElement:CenterElement;this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==RefPlaceholder?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let i;const s=o=>{const n=o.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&_ensureDomOrder(this.eRowContainer,n,i),i=n};e.forEach(o=>{const n=o.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new HeaderRowComp(o));this.headerRowComps[n]=a,this.rowCompsList.push(a),s(a)}),Object.values(t).forEach(o=>this.destroyRowComp(o))}},GridHeaderElement={tag:"div",cls:"ag-header",role:"presentation"},GridHeaderComp=class extends Component{constructor(){super(GridHeaderElement)}postConstruct(){const e={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setHeightAndMinHeight:s=>{this.getGui().style.height=s,this.getGui().style.minHeight=s}};this.createManagedBean(new GridHeaderCtrl).setComp(e,this.getGui(),this.getFocusableElement());const i=s=>{this.createManagedBean(s),this.appendChild(s)};i(new HeaderRowContainerComp("left")),i(new HeaderRowContainerComp(null)),i(new HeaderRowContainerComp("right"))}},GridHeaderSelector={selector:"AG-HEADER-ROOT",component:GridHeaderComp},CellComp=class extends Component{constructor(e,t,i,s,o){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=s;const n=_createElement({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=_createElement({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssClassManager=new CssClassManager(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>_addStylesToElement(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,n,r,this.eCellWrapper,i,o,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&this.eCellWrapper==null;s&&(this.eCellWrapper=_createElement({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const o=!i&&this.eCellWrapper!=null;o&&(_removeFromParent(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!i);const n=!e&&i,r=n&&this.eCellValue==null;r&&(this.eCellValue=_createElement({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!n&&this.eCellValue!=null;a&&(_removeFromParent(this.eCellValue),this.eCellValue=void 0);const l=s||o||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:s,includeDndSource:o,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),i)};s&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),o&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const s=this.editorVersion,o=e.newAgStackInstance(),{params:n}=e;o.then(a=>this.afterCellEditorCreated(s,a,n,t,i)),_missing(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();_clearElement(t);const i=e!=null?_escapeString(e,!0):null;i!=null&&(t.textContent=i)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),_removeFromParent(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(_getActiveDomElement(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),_removeFromParent(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:i}=e,s=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const r=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,i);r?.then(a)},{animationFrameSvc:o}=this.beans;o?.active&&this.firstRender?o.createTask(s,this.rowNode.rowIndex,"p2",e.componentFromFramework):s()}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const o=i.getGui();if(this.cellRendererGui=o,o!=null){const n=this.getParentOfValue();_clearElement(n),n.appendChild(o)}}afterCellEditorCreated(e,t,i,s,o){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){_warn(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=s||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:i}=this;i.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),i.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),i.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(_getActiveDomElement(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),_clearElement(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:s,editSvc:o,popupSvc:n,localeSvc:r}=this.beans;i.get("editType")==="fullRow"&&_warn(98);const a=this.cellEditor;this.cellEditorPopupWrapper=s.createBean(o.createPopupEditorWrapper(e));const l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);const d=i.get("stopEditingWhenCellsLoseFocus"),c=t??a.getPopupPosition?.()??"over",u=i.get("enableRtl"),h={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},g=n.positionPopupByComponent.bind(n,h),p=_getLocaleTextFunc(r),f=n.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:g,ariaLabel:p("ariaLabelCellEditor","Cell Editor")});f&&(this.hideEditorPopup=f.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},RowComp=class extends Component{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const s=_createElement({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(s,i),this.setTemplateFromElement(s);const o=s.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(r,a)=>this.addOrRemoveCssClass(r,a),setUserStyles:r=>_addStylesToElement(s,r),setTop:r=>o.top=r,setTransform:r=>o.transform=r,setRowIndex:r=>s.setAttribute("row-index",r),setRowId:r=>s.setAttribute("row-id",r),setRowBusinessKey:r=>s.setAttribute("row-business-key",r),refreshFullWidth:r=>this.fullWidthCellRenderer?.refresh?.(r())??!1};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){const i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{const s=this.rowCtrl.getInitialRowTop(t);s&&e.style.setProperty("top",s)}}showFullWidth(e){const t=s=>{if(this.isAlive()){const o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s)}else this.beans.context.destroyBean(s)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const s=i.instanceId;this.cellComps.has(s)?t.delete(s):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const i of e){const s=this.cellComps.get(i.instanceId);s&&t.push(s.getGui())}_setDomChildOrder(this.getGui(),t)}newCellComp(e){const t=new CellComp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const i=t.cellCtrl.instanceId;if(this.cellComps.get(i)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(i)}}};function getElementParams(e,t,i){const s=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,o={tag:"div",ref:"eContainer",cls:_getRowContainerClass(e),role:"rowgroup"};if(t.type==="center"||s){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${_getRowSpanContainerClass(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${_getRowViewportClass(e)}`,role:"presentation",children:[o,s?n:null]}}return o}var RowContainerComp=class extends Component{constructor(e){super(),this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.eSpannedContainer=RefPlaceholder,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=_getRowContainerOptions(this.name)}postConstruct(){this.setTemplate(getElementParams(this.name,this.options,this.beans));const e={setHorizontalScroll:i=>this.eViewport.scrollLeft=i,setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setSpannedRowCtrls:i=>this.setRowCtrls(i,!0),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>{this.eContainer.style.width=i,this.eSpannedContainer&&(this.eSpannedContainer.style.width=i)},setOffsetTop:i=>{const s=`translateY(${i})`;this.eContainer.style.transform=s,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=s)}};this.createManagedBean(new RowContainerCtrl(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:i,options:s}=this,o=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new RowComp(l,i,s.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),o),this.addRowNodes(a,o)}addRowNodes(e,t){const{domOrder:i}=this;for(const[s,o]of e){const n=s.getGui();i?this.ensureDomOrder(n,t):o&&t.appendChild(n)}}removeOldRows(e,t){for(const i of e)t.removeChild(i.getGui()),i.destroy()}ensureDomOrder(e,t){_ensureDomOrder(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},RowContainerSelector={selector:"AG-ROW-CONTAINER",component:RowContainerComp};function makeRowContainers(e,t){return t.map(i=>{const s=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[s]={name:i},{tag:"ag-row-container",ref:s,attrs:{name:i}}})}function getGridBodyTemplate(e){const t={},i={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:makeRowContainers(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:makeRowContainers(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:makeRowContainers(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:makeRowContainers(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:makeRowContainers(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var GridBodyComp=class extends Component{constructor(){super(...arguments),this.eGridRoot=RefPlaceholder,this.eBodyViewport=RefPlaceholder,this.eStickyTop=RefPlaceholder,this.eStickyBottom=RefPlaceholder,this.eTop=RefPlaceholder,this.eBottom=RefPlaceholder,this.eBody=RefPlaceholder}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:s,elementParams:o}=getGridBodyTemplate(!!i);this.setTemplate(o,[...i?[i]:[],FakeHScrollSelector,FakeVScrollSelector,GridHeaderSelector,RowContainerSelector],s);const n=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>_setAriaColCount(this.getGui(),a),setRowCount:a=>_setAriaRowCount(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(LayoutCssClasses.AUTO_HEIGHT,l.autoHeight),c.toggle(LayoutCssClasses.NORMAL,l.normal),c.toggle(LayoutCssClasses.PRINT,l.print);this.addOrRemoveCssClass(LayoutCssClasses.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(LayoutCssClasses.NORMAL,l.normal),this.addOrRemoveCssClass(LayoutCssClasses.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL,l),registerBodyViewportResizeListener:a=>{const l=_observeResize(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>_setAriaRole(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new GridBodyCtrl),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&_isCellSelectionEnabled(this.gos)||_isMultiRowSelection(this.gos))&&_setAriaMultiSelectable(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}},GridBodySelector={selector:"AG-GRID-BODY",component:GridBodyComp},GridCtrl=class extends BeanStub{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:s,ctrlsSvc:o}=this.beans;s?.registerGridDropTarget(()=>this.eGui,this),_stampTopLevelGridCompWithGridInstance(this.gos,t),this.createManagedBean(new LayoutFeature(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=_observeResize(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),o.register("gridCtrl",this)}isDetailGrid(){return _findTabbableParent(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;if(s===0){if(i>0){const{visibleCols:o,focusSvc:n}=this.beans,r=o.allCols,a=_last(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),{focusSvc:s,visibleCols:o}=this.beans,n=o.allCols;if(e){if(i.length>1)return this.focusContainer(_last(i),e);const r=_last(n);if(s.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||_isHeaderFocusSuppressed(this.beans)){if(s.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<i.length;r++)if(_focusInto(i[r].getGui(),e))return!0;return!1}return s.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(t,e);if(s===-1||i<0||i>=t.length)return;const o=t[i];o.setAllowFocus?.(!0),setTimeout(()=>{o.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!_isCellFocusSuppressed(e)||!_isHeaderFocusSuppressed(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=_getActiveDomElement(this.beans),s=e.findIndex(n=>n.getGui().contains(i)),o=s+(t?-1:1);return{indexWithFocus:s,nextIndex:o}}focusContainer(e,t){e.setAllowFocus?.(!0);const i=_focusInto(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},GridComp=class extends TabGuardComp{constructor(e){super(),this.gridBody=RefPlaceholder,this.sideBar=RefPlaceholder,this.pagination=RefPlaceholder,this.rootWrapperBody=RefPlaceholder,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new GridCtrl),i=t.getOptionalSelectors(),s=this.createTemplate(i),o=[GridBodySelector,...Object.values(i).filter(n=>!!n)];this.setTemplate(s,o),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),_logIfDebug(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=LayoutCssClasses,{autoHeight:r,normal:a,print:l}=t;i.toggle(s,r),i.toggle(o,a),i.toggle(n,l),this.addOrRemoveCssClass(s,r),this.addOrRemoveCssClass(o,a),this.addOrRemoveCssClass(n,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,i=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,s=e.statusBarSelector?{tag:"ag-status-bar"}:null,o=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},i]},s,n,o]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>_isVisible(t.getGui()))}},mod=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},gridApiFunctionsMap={dispatchEvent:"CommunityCore",...mod("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...mod("GridState",{getState:0}),...mod("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...mod("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...mod("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...mod("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...mod("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...mod("ValueCache",{expireValueCache:0}),...mod("CellApi",{getCellValue:0}),...mod("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...mod("Sort",{onSortChanged:0}),...mod("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...mod("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...mod("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...mod("HighlightChanges",{flashCells:0}),...mod("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...mod("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...mod("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...mod("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...mod("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...mod("ColumnResize",{setColumnWidths:0}),...mod("ColumnHover",{isColumnHovered:0}),...mod("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...mod("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...mod("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...mod("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...mod("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...mod("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...mod("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...mod("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...mod("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...mod("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...mod("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...mod("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...mod("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...mod("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...mod("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...mod("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...mod("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...mod("ContextMenu",{showContextMenu:0}),...mod("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...mod("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...mod("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...mod("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...mod("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...mod("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...mod("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...mod("StatusBar",{getStatusPanel:0})},defaultFns={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},dispatchEvent=(e,t)=>e.eventSvc.dispatchEvent(t),GridApiClass=class{};Reflect.defineProperty(GridApiClass,"name",{value:"GridApi"});var ApiFunctionService=class extends BeanStub{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new GridApiClass,this.fns={...defaultFns,dispatchEvent},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(gridApiFunctionsMap))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:s}=this;i!==defaultFns&&(i[e]=s?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:s}}=this;return s?s(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:s}=this;if(!t)_warn(26,{fnName:e,preDestroyLink:s});else{const o=gridApiFunctionsMap[e];i.assertModuleRegistered(o,`api.${e}`)&&_warn(27,{fnName:e,module:o})}}destroy(){super.destroy(),this.fns=defaultFns,this.beans=null}};function getGridId(e){return e.context.getGridId()}function destroy(e){e.gridDestroySvc.destroy()}function isDestroyed(e){return e.gridDestroySvc.destroyCalled}function getGridOption(e,t){return e.gos.get(t)}function setGridOption(e,t,i){updateGridOptions(e,{[t]:i})}function updateGridOptions(e,t){e.gos.updateGridOptions({options:t})}var DndSourceElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},DndSourceComp=class extends Component{constructor(e,t,i){super(DndSourceElement),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(_createIconNoSpan("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:s,gos:o}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(s,0,0),n){const a=_addGridCommonParams(o,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function addRowDropZone(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function removeRowDropZone(e,t){const i=e.dragAndDrop?.findExternalZone(t);i&&e.dragAndDrop?.removeDropTarget(i)}function getRowDropZoneParams(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}var HorizontalResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},RowDragElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},RowDragComp=class extends Component{constructor(e,t,i,s,o,n){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,rowNode:t,column:i,gos:s}=this;if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(RowDragElement),this.getGui().appendChild(_createIconNoSpan("rowDrag",e,null)),this.addDragSource()),!this.suppressVisibilityChange){const o=s.get("rowDragManaged")?new ManagedVisibilityStrategy(this,t,i):new NonManagedVisibilityStrategy(this,t,i);this.createManagedBean(o,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const i=this.beans.selectionSvc?.getSelectedNodes()??[];return i.indexOf(e)!==-1?i:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:s=>{s?.preventDefault()}})[0]);const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{const s=this.getDragItem(),o=s.rowNodes?.length||1,n=this.getRowDragText(this.column);return n?n(s,o):o===1?this.cellValueFn():`${o} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},VisibilityStrategy=class extends BeanStub{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1;const{column:o,rowNode:n,parent:r}=this;o&&(i=o.isRowDrag(n)||r.isCustomGui(),s=typeof o.getColDef().rowDrag=="function"),s?(r.setDisplayed(!0,t),r.setVisible(i,t)):(r.setDisplayed(i,t),r.setVisible(!0,t))}}},NonManagedVisibilityStrategy=class extends VisibilityStrategy{postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},ManagedVisibilityStrategy=class extends VisibilityStrategy{postConstruct(){const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventSvc,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const{rowDragSvc:e,dragAndDrop:t,gos:i}=this.beans,s=e.rowDragFeature,o=s&&s.shouldPreventRowMove(),n=i.get("suppressRowDrag"),r=t.hasExternalDropZones(),a=o&&!r||n;this.setDisplayedOrVisible(a)}},RowDragService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const i=t.createManagedBean(new RowDragFeature(e)),s=this.beans.dragAndDrop;s.addDropTarget(i),t.addDestroyFunc(()=>s.removeDropTarget(i)),this.rowDragFeature=i}createRowDragComp(e,t,i,s,o,n){return new RowDragComp(e,t,i,s,o,n)}createRowDragCompForRow(e,t){if(_isCellSelectionEnabled(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,s,o,n){const r=this.gos;return r.get("rowDragManaged")&&(!_isClientSideRowModel(r)||r.get("pagination"))?void 0:this.createRowDragComp(i,e,t,s,o,n)}},DragModule={moduleName:"Drag",version:VERSION,beans:[DragService]},DragAndDropModule={moduleName:"DragAndDrop",version:VERSION,dynamicBeans:{dndSourceComp:DndSourceComp},icons:{rowDrag:"grip"}},SharedDragAndDropModule={moduleName:"SharedDragAndDrop",version:VERSION,beans:[DragAndDropService],dependsOn:[DragModule],userComponents:{agDragAndDropImage:DragAndDropImageComponent2},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},RowDragModule={moduleName:"RowDrag",version:VERSION,beans:[RowDragService],apiFunctions:{addRowDropZone,removeRowDropZone,getRowDropZoneParams},dependsOn:[SharedDragAndDropModule]},HorizontalResizeModule={moduleName:"HorizontalResize",version:VERSION,beans:[HorizontalResizeService],dependsOn:[DragModule]},columnMovingCSS=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",ColumnAnimationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:i,executeLaterFuncs:s}=this;if(i.length===0&&s.length===0){e(),t();return}const o=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),o(i)},0),window.setTimeout(()=>{t(),o(s)},200)})}};function moveColumnByIndex(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function moveColumns(e,t,i){e.colMoves?.moveColumns(t,i,"api")}var BodyDropPivotTarget=class extends BeanStub{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function sortColsLikeCols(e,t){!t||t.length<=1||t.filter(s=>e.indexOf(s)<0).length>0||t.sort((s,o)=>{const n=e.indexOf(s),r=e.indexOf(o);return n-r})}function getBestColumnMoveIndexFromXPosition(e){const{isFromHeader:t,fromLeft:i,xPosition:s,fromEnter:o,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const y=[];u.forEach(S=>{let x=null,F=S.getParent();for(;F!=null&&F.getDisplayedLeafColumns().length===1;)x=F,F=F.getParent();x!=null?(!!x.getColGroupDef()?.marryChildren?x.getProvidedColumnGroup().getLeafColumns():x.getLeafColumns()).forEach(D=>{y.includes(D)||y.push(D)}):y.includes(S)||y.push(S)}),u=y}const h=u.slice();sortColsLikeCols(l.getCols(),h);const g=calculateValidMoves({movingCols:h,draggingRight:i,xPosition:s,pinned:r,gos:a,colModel:l,visibleCols:c}),p=calculateOldIndex(h,l);if(g.length===0)return;const f=g[0];let m=p!==null&&!o;if(t&&(m=p!==null),m&&!n&&(!i&&f>=p||i&&f<=p))return;const C=c.allCols,w=[];let v=null;for(let y=0;y<g.length;y++){const S=g[y],x=d.getProposedColumnOrder(h,S);if(!d.doesOrderPassRules(x))continue;const F=x.filter(E=>C.includes(E));if(v===null)v=F;else if(!_areEqual(F,v))break;const R=groupFragCount(x);w.push({move:S,fragCount:R})}if(w.length===0)return;w.sort((y,S)=>y.fragCount-S.fragCount);const b=w[0].move;if(!(b>l.getCols().length-u.length))return{columns:u,toIndex:b}}function attemptMoveColumns(e){const{columns:t,toIndex:i}=getBestColumnMoveIndexFromXPosition(e)||{},{finished:s,colMoves:o}=e;return!t||i==null?null:(o.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i})}function calculateOldIndex(e,t){const i=t.getCols(),s=e.map(l=>i.indexOf(l)).sort((l,d)=>l-d),o=s[0];return _last(s)-o!==s.length-1?null:o}function groupFragCount(e){function t(s){const o=[];let n=s.getOriginalParent();for(;n!=null;)o.push(n),n=n.getOriginalParent();return o}let i=0;for(let s=0;s<e.length-1;s++){let o=t(e[s]),n=t(e[s+1]);[o,n]=o.length>n.length?[o,n]:[n,o],o.forEach(r=>{n.indexOf(r)===-1&&i++})}return i}function getDisplayedColumns(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:o,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(v=>v.getColDef().suppressMovable))return[];const d=getDisplayedColumns(a,o),c=r.getCols(),u=d.filter(v=>t.includes(v)),h=d.filter(v=>!t.includes(v)),g=c.filter(v=>!t.includes(v));let p=0,f=s;if(i){let v=0;u.forEach(b=>v+=b.getActualWidth()),f-=v}if(f>0){for(let v=0;v<h.length;v++){const b=h[v];if(f-=b.getActualWidth(),f<0)break;p++}i&&p++}let m;if(p>0){const v=h[p-1];m=g.indexOf(v)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);const C=[m],w=(v,b)=>v-b;if(i){let v=m+1;const b=c.length-1;for(;v<=b;)C.push(v),v++;C.sort(w)}else{let v=m;const b=c.length-1;let y=c[v];for(;v<=b&&d.indexOf(y)<0;)v++,C.push(v),y=c[v];v=m-1;const S=0;for(;v>=S;)C.push(v),v--;C.sort(w).reverse()}return C}function normaliseX(e){const{pinned:t,fromKeyboard:i,gos:s,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=e;let a=o.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(i&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=o.get("center").getCenterViewportScrollLeft()),l):0}function setColumnsMoving(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var MOVE_FAIL_THRESHOLD=7,SCROLL_MOVE_WIDTH=100,SCROLL_GAP_NEEDED_BEFORE_MOVE=SCROLL_MOVE_WIDTH/2,SCROLL_ACCELERATION_RATE=5,SCROLL_TIME_INTERVAL=100,MoveColumnFeature=class extends BeanStub{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!_exists(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,i=t?.dragItem.columns??[];for(const s of i){const o=s.getPinned();if(s.getColDef().lockPinned){if(o==e)return"move";continue}if(o===e||!e)return"move";if(!o&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const o=t.visibleState,n=(i||[]).filter(r=>o[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){const{gos:o,ctrlsSvc:n}=this.beans,r=o.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&_missing(e.hDirection))return;const a=normaliseX({x:e.x,pinned:this.pinned,gos:o,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,s):this.handleColumnDragWhileAllowingMovement(e,t,i,a,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;const s=e.filter(o=>!o.getColDef().lockVisible);this.beans.colModel.setColsVisible(s,t,i)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:i}=e;this.beans.colMoves.moveColumns(t,i,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,s,o){const n=this.getAllMovingColumns(e,!0);if(o){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:i,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,o){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:s,fromLeft:r,fromEnter:t,fakeEvent:i}),d=attemptMoveColumns({...l,finished:o});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let s=null;t?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns;const o=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return s?s.filter(o):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:o,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:o,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:i,colModel:s}=this.beans,o=i.get("enableRtl"),n=s.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,a=null,l=null;for(const c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,o),r!=null){const u=r+a;if(r<=t&&u>=t){l=c;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=_last(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,o),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==o?d=0:d=1,setColumnHighlighted(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:s}=this.beans,o=i.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,o);if(!n||!r||a==null)return;const l=s.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==o,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,o);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){const s=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=findFirstAndLastMovingColumns(e);if(!o||!n||s.column||!t)return{firstMovingCol:o,...s};const a=this.getPinDirection()==="left";return{firstMovingCol:o,position:a?1:0,column:a!==i?o:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,i){const{gos:s,ctrlsSvc:o}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return normaliseX({x:i?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsSvc:o})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>MOVE_FAIL_THRESHOLD;return t&&i||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:o,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:s,fakeEvent:o}),{columns:a,toIndex:l}=getBestColumnMoveIndexFromXPosition(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(setColumnHighlighted(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();let o,n;this.gos.get("enableRtl")?(o=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,n=e>s-SCROLL_GAP_NEEDED_BEFORE_MOVE):(n=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,o=e>s-SCROLL_GAP_NEEDED_BEFORE_MOVE),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),SCROLL_TIME_INTERVAL),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*SCROLL_ACCELERATION_RATE,e>SCROLL_MOVE_WIDTH&&(e=SCROLL_MOVE_WIDTH);let t=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:s,dragAndDrop:o,gos:n}=this.beans;if(this.failedMoveAttempts<=MOVE_FAIL_THRESHOLD+1||!s)return;if(o.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const s=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!s.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(s,t,"uiColumnDragged"),i&&n.nudge(),s.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function setColumnHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function findFirstAndLastMovingColumns(e){const t=e.length;let i,s;for(let o=0;o<t;o++){if(!i){const n=e[o];n.getLeft()!=null&&(i=n)}if(!s){const n=e[t-1-o];n.getLeft()!=null&&(s=n)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}var BodyDropTarget=class extends BeanStub{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,s=>{let o;const n=s.gridBodyCtrl.eBodyViewport;switch(i){case"left":o=[[n,s.left.eContainer],[s.bottomLeft.eContainer],[s.topLeft.eContainer]];break;case"right":o=[[n,s.right.eContainer],[s.bottomRight.eContainer],[s.topRight.eContainer]];break;default:o=[[n,s.center.eViewport],[s.bottomCenter.eViewport],[s.topCenter.eViewport]];break}this.eSecondaryContainers=o}),this.moveColumnFeature=this.createManagedBean(new MoveColumnFeature(i)),this.bodyDropPivotTarget=this.createManagedBean(new BodyDropPivotTarget(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},ColumnMoveService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const s=this.beans.colModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const{colModel:o,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=o.getCols();if(!l)return;if(t>l.length-e.length){_warn(30,{toIndex:t});return}n?.start();const d=o.getColsForKeys(e);this.doesMovePassRules(d,t)&&(_moveInArray(o.getCols(),d,t),r.refresh(i),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:s,source:i})),n?.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(!doesMovePassMarryChildren(e,t.getColTree())||!(o=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=i.get("enableRtl");let a=r?1:-1,l=!0;return o.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const s=this.beans.colModel.getCols().slice();return _moveInArray(s,e,t),s}createBodyDropTarget(e,t){return new BodyDropTarget(e,t)}moveHeader(e,t,i,s,o){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=isColumnGroup2(i),g=h?c.width:i.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=normaliseX({x:p?u-20:u+g+20,pinned:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;attemptMoveColumns({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:s,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let C;if(h){const w=i.getDisplayedLeafColumns();C=p?w[0]:_last(w)}else C=i;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&m){let w;if(h){const v=i.getGroupId(),b=i.getLeafColumns();if(!b.length)return;const y=b[0].getParent();if(!y)return;w=findGroupWidthId(y,v)}else w=i;w&&d.focusHeaderPosition({headerPosition:{...m,column:w}})}}setDragSourceForHeader(e,t,i){const{gos:s,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans;let a=!s.get("suppressDragLeaveHidesColumns");const l=isColumnGroup2(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>createDragItemForGroup(t,r.allCols):()=>createDragItem(t),dragItemName:i,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),setColumnsMoving(d,!0)},onDragStopped:()=>setColumnsMoving(d,!1),onDragCancelled:()=>setColumnsMoving(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));o.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];o.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function createDragItemForGroup(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),s={};i.forEach(a=>s[a.getId()]=a.isVisible());const o=[];t.forEach(a=>{i.indexOf(a)>=0&&(o.push(a),_removeFromArray(i,a))}),i.forEach(a=>o.push(a));const n=[],r=e.getLeafColumns();for(const a of o)r.indexOf(a)!==-1&&n.push(a);return{columns:o,columnsInSplit:n,visibleState:s}}var ColumnMoveModule={moduleName:"ColumnMove",version:VERSION,beans:[ColumnMoveService,ColumnAnimationService],apiFunctions:{moveColumnByIndex,moveColumns},dependsOn:[SharedDragAndDropModule],css:[columnMovingCSS]},AutoWidthCalculator=class extends BeanStub{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||s.push(i),this.getPreferredWidthForElements(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=document.createElement("form");i.style.position="fixed";const s=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,i)),s.appendChild(i);const o=i.offsetWidth;return s.removeChild(i),t=t??this.gos.get("autoSizePadding"),o+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(i=>{const s=i.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(a=>i.classList.contains(a))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const d=r.classList[l];d!="ag-row-position-absolute"&&o.add(d)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}},AutoWidthModule={moduleName:"AutoWidth",version:VERSION,beans:[AutoWidthCalculator]};function setColumnWidths(e,t,i=!0,s="api"){e.colResize?.setColumnWidths(t,!1,i,s)}var GroupResizeFeature=class extends BeanStub{constructor(e,t,i,s){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,s=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const s=this.normaliseDragChange(t),o=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(o,i,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),i=(l,d)=>l.map(c=>c.getActualWidth()/d),s=this.getColumnsToResize(),o=t(s),n=i(s,o),r={columnsToResize:s,resizeStartWidth:o,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=r.groupAfterColumns=l.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=i(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(s,e,t,i)}resizeColumns(e,t,i,s=!0){const{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:o,ratios:r,width:t}),a){const u=t-n;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},ResizeFeature=class extends BeanStub{constructor(e,t,i,s,o){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=o}postConstruct(){const e=[];let t,i;const s=()=>{if(_setDisplayed(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),i&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},o=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==i)&&(t=r,i=a,o(),s())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(t),a=o+r,l=[{key:i,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=_getInnerWidth(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-s)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},ColumnResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,s){const o=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{const d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(o.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;o.push({width:g,ratios:[1],columns:[u]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(c=>checkMinAndMaxWidthsForSet(c)))){if(i){const c=t&&t.length>0?t[0].columns:null;dispatchColumnResizedEvent(this.eventSvc,c,i,s)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let m=!0,C=0;for(;m;){if(C++,C>1e3){_error(31);break}m=!1;const w=[];let v=0,b=u;h.forEach((S,x)=>{if(f[S.getId()])b-=p[S.getId()];else{w.push(S);const R=g[x];v+=R}});const y=1/v;w.forEach((S,x)=>{const F=x===w.length-1;let R;F?R=b:(R=Math.round(g[x]*u*y),b-=R);const E=S.getMinWidth(),D=S.getMaxWidth();R<E?(R=E,f[S.getId()]=!0,m=!0):D>0&&R>D&&(R=D,f[S.getId()]=!0,m=!0),p[S.getId()]=R})}h.forEach(w=>{const v=p[w.getId()];w.getActualWidth()!==v&&(w.setActualWidth(v,s),n.push(w))})});const a=n.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(s),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(l);(a||i)&&dispatchColumnResizedEvent(this.eventSvc,d,i,s,l)}resizeHeader(e,t,i){if(!e.isResizable())return;const s=e.getActualWidth(),o=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(s+t,o),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,s,o){return new ResizeFeature(e,t,i,s,o)}createGroupResizeFeature(e,t,i,s){return new GroupResizeFeature(e,t,i,s)}};function checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,n=!0;t.forEach(l=>{const d=l.getMinWidth();s+=d||0;const c=l.getMaxWidth();c>0?o+=c:n=!1});const r=i>=s,a=!n||i<=o;return r&&a}var ColumnResizeModule={moduleName:"ColumnResize",version:VERSION,beans:[ColumnResizeService],apiFunctions:{setColumnWidths},dependsOn:[HorizontalResizeModule,AutoWidthModule]},GroupWidthFeature=class extends BeanStub{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},HeaderGroupCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,i,s,o){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,o=setupCompBean(this,a,o),this.setGui(t,o),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.setupAutoHeight({wrapperElement:s,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(o,g,t),c?.createRangeHighlightFeature(o,n,e),o.createManagedBean(new SetLeftFeature(n,t,r)),o.createManagedBean(new GroupWidthFeature(e,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),o.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,g),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return _addGridCommonParams(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=_last(t)===e;if(!i&&!s)return;const o=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),d=o===1,c=o===0;i&&(l?a=d:r=c),s&&(l?r=c:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const s=i.getInitialValues(t);i.resizeColumns(s,s.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:i}=this.beans,s=_addGridCommonParams(i,{displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}}),o=_getHeaderGroupCompDetails(t,s);o&&this.comp.setUserCompDetails(o)}addHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=_getHeaderClassesFromColDef(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(o=>o.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text")),i.forEach(s=>this.comp.addOrRemoveCssClass(s,!0))}setupMovingCss(e){const{column:t}=this,s=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());s.forEach(n=>{e.addManagedListeners(n,{movingChanged:o})}),o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===KeyCode.ENTER){const i=this.column,s=!i.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function setColumnGroupOpened(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")}function getColumnGroup(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null}function getProvidedColumnGroup(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function getDisplayNameForColumnGroup(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function getColumnGroupState(e){return e.colGroupSvc?.getColumnGroupState()??[]}function setColumnGroupState(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function resetColumnGroupState(e){e.colGroupSvc?.resetColumnGroupState("api")}function getLeftDisplayedColumnGroups(e){return e.visibleCols.treeLeft}function getCenterDisplayedColumnGroups(e){return e.visibleCols.treeCenter}function getRightDisplayedColumnGroups(e){return e.visibleCols.treeRight}function getAllDisplayedColumnGroups(e){return e.visibleCols.getAllTrees()}function _removeAllFromUnorderedArray(e,t){for(let i=0;i<t.length;i++){const s=e.indexOf(t[i]);s>=0&&(e[s]=e[e.length-1],e.pop())}}var VisibleColsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:i,colGroupSvc:s,colViewport:o}=this.beans;t||this.buildTrees(i,s),s?.updateOpenClosedVisibility();const n=pickDisplayedCols(this.treeLeft);this.leftCols=n,this.centerCols=pickDisplayedCols(this.treeCenter);const r=pickDisplayedCols(this.treeRight);this.rightCols=r,this.joinColsAriaOrder(i),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),o.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(i,n,r,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=getWidthOfColsInList(this.centerCols),t=getWidthOfColsInList(this.leftCols),i=getWidthOfColsInList(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,i,s){let o,n;this.gos.get("enableRtl")?(o=t?t[0]:null,n=i?_last(i):null):(o=t?_last(t):null,n=i?i[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===o,s),r.setFirstRightPinned(r===n,s)})}buildTrees(e,t){const i=e.getColsToShow(),s=i.filter(l=>l.getPinned()=="left"),o=i.filter(l=>l.getPinned()=="right"),n=i.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new GroupInstanceIdCreator,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:o,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),i=[],s=[],o=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?i.push(n):o.push(n):s.push(n)}this.ariaOrderColumns=i.concat(s).concat(o)}getAriaColIndex(e){let t;return isColumnGroup2(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{isColumnGroup2(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const s=t.getCols().slice(0),o=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(o){let r=getWidthOfColsInList(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}_removeAllFromUnorderedArray(s,n)}),s.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,i,s){const o=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;i?(u=!1,c.forEach(h=>{i(h)&&(u=!0)})):u=!0,u&&(o.length===0&&n&&(s&&s(a))&&o.push(n),o.push(a)),n=a}return o}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,i=t.indexOf(e);return i>0?t[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};depthFirstAllColumnTreeSearch(this.treeCenter,!1,e),depthFirstAllColumnTreeSearch(this.treeLeft,!1,e),depthFirstAllColumnTreeSearch(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]];if(s.length)return e?_last(s):s[0]}return null}getColAfter(e){const t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return getWidthOfColsInList(this.leftCols)}getDisplayedColumnsRightWidth(){return getWidthOfColsInList(this.rightCols)}isColAtEdge(e,t){const i=this.allCols;if(!i.length)return!1;const s=t==="first";let o;if(isColumnGroup2(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=s?n[0]:_last(n)}else o=e;return(s?i[0]:_last(i))===o}};function depthFirstAllColumnTreeSearch(e,t,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];if(isColumnGroup2(o)){const n=t?o.getDisplayedChildren():o.getChildren();depthFirstAllColumnTreeSearch(n,t,i)}i(o)}}function pickDisplayedCols(e){const t=[];return depthFirstAllColumnTreeSearch(e,!0,i=>{isColumn(i)&&t.push(i)}),t}var ColumnGroupService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return depthFirstOriginalTreeSearch(null,t,i=>{isProvidedColumnGroup(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const i=[];depthFirstOriginalTreeSearch(null,t,s=>{if(isProvidedColumnGroup(s)){const o=s.getColGroupDef(),n={groupId:s.getGroupId(),open:o?o.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){const{colModel:i,colAnimation:s,visibleCols:o,eventSvc:n}=this.beans;if(!i.getColTree().length)return;s?.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),o.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),s?.finish()}setColumnGroupOpened(e,t,i){let s;isProvidedColumnGroup(e)?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){let t=null;return depthFirstOriginalTreeSearch(null,this.beans.colModel.getColTree(),i=>{isProvidedColumnGroup(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?_last(s):s[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](o);if(!r)return null;const a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),s,o;for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();depthFirstAllColumnTreeSearch(e,!1,t=>{isColumnGroup2(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(isColumnGroup2(e))return e;const i=this.beans.visibleCols.getAllTrees(),s=typeof t=="number";let o=null;return depthFirstAllColumnTreeSearch(i,!1,n=>{if(isColumnGroup2(n)){const r=n;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(o=r)}}),o}createColumnGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],m=(isColumnGroup2(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let w=g;w<h;w++)a.push(d[w]);return}const C=this.createColumnGroup(m,i,r,s,n);for(let w=g;w<h;w++)C.addChild(d[w]);l.push(C)};for(let h=1;h<d.length;h++){const g=d[h],f=(isColumnGroup2(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c],w=(isColumnGroup2(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,i,s,o,n,r){const a=o.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new AgProvidedColumnGroup(l,a,!1,i);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=_recursivelyCreateColumns(this.beans,l.children,i+1,e,s,o,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,i,s){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(isProvidedColumnGroup(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,i,s);a.setChildren(l),o.push(a)}else{let a,l;for(let d=i-1;d>=t;d--){const c=s.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),h=new AgProvidedColumnGroup(u,c,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(o.push(a),e.some(c=>isProvidedColumnGroup(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}o.push(r)}}return o}findDepth(e){let t=0,i=e;for(;i&&i[0]&&isProvidedColumnGroup(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let s=0;s<e.length;s++){const o=e[s];if(isProvidedColumnGroup(o)){const n=o,r=this.findMaxDepth(n.getChildren(),t+1);i<r&&(i=r)}}return i}balanceTreeForAutoCols(e,t){const i=[];return e.forEach(s=>{let o=s;for(let n=t-1;n>=0;n--){const r=new AgProvidedColumnGroup(null,`FAKE_PATH_${s.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([o]),o.originalParent=r,o=r}t===0&&(s.originalParent=null),i.push(o)}),i}createMergedColGroupDef(e,t){const i={},{gos:s,validation:o}=this.beans;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,e),o?.validateColDef(i,t),i}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const o=t[s];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:s,group:o}}}createColumnGroup(e,t,i,s,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=createUniqueColumnGroupId(n,r);let l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),_exists(l)?l.reset():(l=new AgColumnGroup(e,n,r,s),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(o=>{if(isColumnGroup2(o)){const n=o;t[o.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.parent=t,isColumnGroup2(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}},ColumnGroupModule={moduleName:"ColumnGroup",version:VERSION,dynamicBeans:{headerGroupCellCtrl:HeaderGroupCellCtrl},beans:[ColumnGroupService],apiFunctions:{getAllDisplayedColumnGroups,getCenterDisplayedColumnGroups,getColumnGroup,getColumnGroupState,getDisplayNameForColumnGroup,getLeftDisplayedColumnGroups,getProvidedColumnGroup,getRightDisplayedColumnGroups,resetColumnGroupState,setColumnGroupOpened,setColumnGroupState}},CheckboxCellRendererModule={moduleName:"CheckboxCellRenderer",version:VERSION,userComponents:{agCheckboxCellRenderer:CheckboxCellRenderer}};function getColumnDef(e,t){const i=e.colModel.getColDefCol(t);return i?i.getColDef():null}function getColumnDefs(e){return e.colModel.getColumnDefs()}function getDisplayNameForColumn(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function getColumn(e,t){return e.colModel.getColDefCol(t)}function getColumns(e){return e.colModel.getColDefCols()}function applyColumnState(e,t){return _applyColumnState(e,t,"api")}function getColumnState(e){return _getColumnState(e)}function resetColumnState(e){_resetColumnState(e,"api")}function isPinning(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function isPinningLeft(e){return e.visibleCols.isPinningLeft()}function isPinningRight(e){return e.visibleCols.isPinningRight()}function getDisplayedColAfter(e,t){return e.visibleCols.getColAfter(t)}function getDisplayedColBefore(e,t){return e.visibleCols.getColBefore(t)}function setColumnsVisible(e,t,i){e.colModel.setColsVisible(t,i,"api")}function setColumnsPinned(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function getAllGridColumns(e){return e.colModel.getCols()}function getDisplayedLeftColumns(e){return e.visibleCols.leftCols}function getDisplayedCenterColumns(e){return e.visibleCols.centerCols}function getDisplayedRightColumns(e){return e.visibleCols.rightCols}function getAllDisplayedColumns(e){return e.visibleCols.allCols}function getAllDisplayedVirtualColumns(e){return e.colViewport.getViewportColumns()}function _deepCloneDefinition(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||SKIP_JS_BUILTINS.has(o))return;const n=i[o];typeof n=="object"&&n!==null&&n.constructor===Object?s[o]=_deepCloneDefinition(n):s[o]=n}),s}var ColumnDefFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,s){const o=e.slice();t?o.sort((a,l)=>i.indexOf(a)-i.indexOf(l)):i&&o.sort((a,l)=>s.indexOf(a)-s.indexOf(l));const n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,n,r)}buildColumnDefs(e,t=[],i=[]){const s=[],o={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,i);let a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=o[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],o[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&s.push(l)}),s}createDefFromGroup(e){const t=_deepCloneDefinition(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=_deepCloneDefinition(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},ColumnFlexService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth;if(!i)return[];const{visibleCols:s}=this.beans,o=s.centerCols;let n=-1;if(e.resizingCols){const p=new Set(e.resizingCols);for(let f=o.length-1;f>=0;f--)if(p.has(o[f])){n=f;break}}let r=!1;const a=o.map((p,f)=>{const m=p.getFlex(),C=m!=null&&m>0&&f>n;return r||(r=C),{col:p,isFlex:C,flex:Math.max(0,m??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((p,f)=>p+f.flex,0),c=i;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,l-=1},h=p=>p.frozenSize!=null;for(const p of a)p.isFlex||u(p,p.initialSize);for(;l>0;){const p=Math.round(d<1?c*d:c);let f,m=0,C=0;for(const b of a){if(h(b))continue;f=b,C+=p*(b.flex/d);const y=C-m,S=Math.round(y);b.targetSize=S,m+=S}f&&(f.targetSize+=p-m);let w=0;for(const b of a){if(h(b))continue;const y=b.targetSize,S=Math.min(Math.max(y,b.min),b.max);w+=S-y,b.violationType=S===y?void 0:S<y?"max":"min",b.targetSize=S}const v=w===0?"all":w>0?"min":"max";for(const b of a)h(b)||(v==="all"||b.violationType===v)&&u(b,b.targetSize)}e.skipSetLeft||s.setLeftValues(t),e.updateBodyWidths&&s.updateBodyWidths();const g=a.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=a.filter(m=>m.initialSize!==m.frozenSize).map(m=>m.col),f=a.filter(m=>m.flex).map(m=>m.col);dispatchColumnResizedEvent(this.eventSvc,p,!0,t,f)}return g}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},DataTypeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const i={};this.formatValueFuncs=i;const s=r=>a=>{const{column:l,node:d,value:c}=a;let u=l.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(const r of Object.keys(e)){const a=e[r],l={...a,groupSafeValueFormatter:createGroupSafeValueFormatter(a,this.gos)};t[r]=l,i[r]=s(l)}const o=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(const r of Object.keys(o)){const a=o[r],l=this.processDataTypeDefinition(a,o,[r],e);l&&(t[r]=l,a.dataTypeMatcher&&(n[r]=a.dataTypeMatcher),i[r]=s(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{const a=n[r];a&&delete n[r],n[r]=a??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,i,s){let o;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[n];const a=t[n];if(r&&a&&(r=a),!validateDataTypeDefinition(e,r,n))return;o=mergeDataTypeDefinitions(r,e)}else{if(i.includes(n)){_warn(44);return}const r=t[n];if(!validateDataTypeDefinition(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...i,n],s);if(!a)return;o=mergeDataTypeDefinitions(a,e)}return{...o,groupSafeValueFormatter:createGroupSafeValueFormatter(o,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t;const{field:o}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(o,i):!1),!s){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[s];if(!n){_warn(47,{cellDataType:s});return}return e.cellDataType=s,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,n,i),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!_isClientSideRowModel(i))return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(doColDefPropsPreventInference(t,s))return!1;const o=t.type===null?e.type:t.type;if(o){const n=i.get("columnTypes")??{};if(convertColumnTypes(o).some(a=>{const l=n[a.trim()];return l&&doColDefPropsPreventInference(l,s)}))return!1}return!doColDefPropsPreventInference(e,s)}inferCellDataType(e,t){if(!e)return;let i;const s=this.getInitialData();if(s){const o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=_getValueUsingField(s,e,o)}else this.initWaitForRowData(t);if(i!=null)return Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](i))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:s}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[o]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const s={},o={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=getUpdatedColumnState(a,r);c.rowGroup&&c.rowGroupIndex==null&&(s[n]=c),c.pivot&&c.pivotIndex==null&&(o[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&_applyColumnState(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},{rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;return s?.restoreColumnOrder(i,e),o?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=_addColumnDefaultAndTypes(this.beans,i,e.getColId());return e.setColDef(s,i,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return i?i(t):!0}validateColDef(e){const t=i=>_warn(48,{property:i});if(e.cellDataType==="object"){const{object:i}=this.dataTypeDefinitions;e.valueFormatter===i.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,s){const o=this.formatValueFuncs[t];switch(i.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===KeyCode.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=o;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=o;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{const a=this.colModel.getColDefCol(s),l=a?.getColDef();if(!a||!l)return 0;const d=n==null?"":o({column:a,node:null,value:n}),c=r==null?"":o({column:a,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=o;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,i,o)}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>i.newValue?.trim?.()===""?null:Number(i.newValue),valueFormatter:i=>i.value==null?"":typeof i.value!="number"||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>typeof i=="number"},text:{baseDataType:"text",valueParser:i=>i.newValue===""?null:_toStringOrNull(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>i.newValue==null?i.newValue:i.newValue?.trim?.()===""?null:String(i.newValue).toLowerCase()==="true",valueFormatter:i=>i.value==null?"":String(i.value),dataTypeMatcher:i=>typeof i=="boolean"},date:{baseDataType:"date",valueParser:i=>_parseDateTimeFromString(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):_serialiseDate(i.value,!1)??"",dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>_parseDateTimeFromString(i)??void 0,dateFormatter:i=>_serialiseDate(i??null,!1)??void 0,valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>typeof i=="string"&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>_toStringOrNull(i.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function mergeDataTypeDefinitions(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...convertColumnTypes(e.columnTypes),...convertColumnTypes(t.columnTypes)]),i}function validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(_warn(46),!1):!0:(_warn(45,{parentCellDataType:i}),!1)}function createGroupSafeValueFormatter(e,t){if(e.valueFormatter)return i=>{if(i.node?.group){const s=(i.colDef.pivotValueColumn??i.column).getAggFunc();if(s){if(s==="first"||s==="last")return e.valueFormatter(i);if(e.baseDataType==="number"&&s!=="count"){if(typeof i.value=="number")return e.valueFormatter(i);if(typeof i.value=="object"){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter({...i,value:i.value.toNumber()});if("value"in i.value)return e.valueFormatter({...i,value:i.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const o=e[i];return o===null?(t[i]=!1,!1):s===void 0?!!o:o===s}function doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>doesColDefPropPreventInference(e,t,i,s))}function getUpdatedColumnState(e,t){const i=getColumnStateFromColDef(e);return t.forEach(s=>{delete i[s],s==="rowGroup"?delete i.rowGroupIndex:s==="pivot"&&delete i.pivotIndex}),i}var DataTypeModule={moduleName:"DataType",version:VERSION,beans:[DataTypeService],dependsOn:[CheckboxCellRendererModule]},ColumnFlexModule={moduleName:"ColumnFlex",version:VERSION,beans:[ColumnFlexService]},ColumnApiModule={moduleName:"ColumnApi",version:VERSION,beans:[ColumnDefFactory],apiFunctions:{getColumnDef,getDisplayNameForColumn,getColumn,getColumns,applyColumnState,getColumnState,resetColumnState,isPinning,isPinningLeft,isPinningRight,getDisplayedColAfter,getDisplayedColBefore,setColumnsVisible,setColumnsPinned,getAllGridColumns,getDisplayedLeftColumns,getDisplayedCenterColumns,getDisplayedRightColumns,getAllDisplayedColumns,getAllDisplayedVirtualColumns,getColumnDefs}};function _camelCaseToHumanText(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var ColumnNameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:o}=this.beans;return i&&o?o.getHeaderName(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?.getColGroupDef();return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const n=e.headerValueGetter;if(n){const r=_addGridCommonParams(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return _camelCaseToHumanText(e.field)}return""}},ColumnViewportService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){const{visibleCols:s}=this,o=s.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!o)){if(this.scrollWidth=e,this.scrollPosition=t,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=s.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||isAnyParentAutoHeaderHeight(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200,n=t<s&&i<s,r=t>o&&i>o;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return _exists(r)&&r>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this,o=s.centerCols;return s.getColsForRow(e,o,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:i,treeLeft:s,treeRight:o,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(i).forEach(l=>e[l.getId()]=!0);const a=(l,d,c)=>{let u=!1;for(let h=0;h<l.length;h++){const g=l[h];let p=!1;if(isColumn(g))p=e[g.getId()]===!0;else{const m=g.getDisplayedChildren();m&&(p=a(m,d,c+1))}p&&(u=!0,d[c]||(d[c]=[]),d[c].push(g))}return u};a(s,this.rowsOfHeadersToRenderLeft,0),a(o,this.rowsOfHeadersToRenderRight,0),a(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var AgComponentUtils=class extends BeanStub{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(o){const n=t(o),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=_loadTemplate("<span>"+n+"</span>");return}if(n==null){this.eGui=_createElement({tag:"span"});return}this.eGui=n}}return i}},CellRendererFunctionModule={moduleName:"CellRendererFunction",version:VERSION,beans:[AgComponentUtils]},Registry=class extends BeanStub{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:s,selectors:o}=e;if(i){const n=(r,a,l)=>{this.agGridDefaults[r]=a,l&&(this.agGridDefaultParams[r]=l)};for(const r of Object.keys(i)){const a=i[r];typeof a=="object"?n(r,a.classImp,a.params):n(r,a)}}if(s)for(const n of Object.keys(s))this.dynamicBeans[n]=s[n];if(o?.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const i=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:s}=this.beans,o=s.frameworkComponent(t,this.gos.get("components"));if(o!=null)return i(o,!0);const n=this.jsComps[t];if(n){const a=s.isFrameworkComponent(n);return i(n,a)}const r=this.agGridDefaults[t];return r?i(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...i){const s=this.dynamicBeans[e];if(s==null){if(t)throw new Error(_errMsg(256));return}return new s(...i)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},NUM_CTRLS=23,CtrlsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===NUM_CTRLS&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},coreCSS=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',IS_SSR=typeof window!="object"||!window?.document?.fonts?.forEach,injectionsByContainer=new WeakMap,_injectGlobalCSS=(e,t,i,s,o,n)=>{if(IS_SSR||FORCE_LEGACY_THEMES)return;s&&(e=`@layer ${CSS.escape(s)} { ${e} }`);let r=injectionsByContainer.get(t);if(r||(r=[],injectionsByContainer.set(t,r)),r.find(c=>c.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=i,a.textContent=e;const l={css:e,el:a,priority:o};let d;for(const c of r){if(c.priority>o)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);const c=r.indexOf(d);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},_injectCoreAndModuleCSS=(e,t,i)=>{_injectGlobalCSS(coreCSS,e,"core",t,0,i),Array.from(_getAllRegisteredModules()).sort((s,o)=>s.moduleName.localeCompare(o.moduleName)).forEach(s=>s.css?.forEach(o=>_injectGlobalCSS(o,e,`module-${s.moduleName}`,t,0,i)))},gridsUsingThemingAPI=new Set,_registerGridUsingThemingAPI=e=>{gridsUsingThemingAPI.add(e)},_unregisterGridUsingThemingAPI=e=>{if(gridsUsingThemingAPI.delete(e),gridsUsingThemingAPI.size===0){injectionsByContainer=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},createPart=e=>new PartImpl(e),defaultModeName="$default",partCounter=0,PartImpl=class{constructor({feature:e,params:t,modeParams:i={},css:s,cssImports:o}){this.feature=e,this.css=s,this.cssImports=o,this.modeParams={[defaultModeName]:{...i[defaultModeName]??{},...t??{}},...i}}use(e,t,i){let s=this._inject;if(s==null){let{css:o}=this;if(o){const n=`ag-theme-${this.feature??"part"}-${++partCounter}`;typeof o=="function"&&(o=o()),o=`:where(.${n}) {
9
+ </button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:c})),a.append(g)};o.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=getDebounceMs(this.params,this.defaultDebounceMs),t=_debounce(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const i=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:s}=this.params;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,i=t&&t.key;let s;(i==="Enter"||i==="Space")&&(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const i=this.isModelValid(this.getModelFromUi()),s=this.queryForHtmlElement('[data-ref="applyFilterButton"]');s&&_setDisabled(s,!i)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,FILTER_LOCALE_TEXT[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function _getDefaultFloatingFilterType(e,t,i){if(t==null)return null;let s=null;const{compName:o,jsComp:n,fwComp:r}=_getFilterCompKeys(e,t);return o?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:n==null&&r==null&&t.filter===!0&&(s=i()),s}var LayoutCssClasses={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},LayoutFeature=class extends BeanStub{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?LayoutCssClasses.AUTO_HEIGHT:t.print?LayoutCssClasses.PRINT:LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(i,t)}},VIEWPORT="Viewport",FAKE_V_SCROLLBAR="fakeVScrollComp",HORIZONTAL_SOURCES=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],SCROLL_DEBOUNCE_TIMEOUT=100,SCROLL_END_TIMEOUT=150,GridBodyScrollFeature=class extends BeanStub{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=_debounce(this,()=>this.lastScrollSource[1]=null,SCROLL_END_TIMEOUT),this.resetLastVScrollDebounced=_debounce(this,()=>this.lastScrollSource[0]=null,SCROLL_END_TIMEOUT)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,i=>{this.centerRowsCtrl=i.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,VIEWPORT)});for(const e of HORIZONTAL_SOURCES){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?_debounce(this,this.onVScroll.bind(this,VIEWPORT),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,VIEWPORT),s=t?_debounce(this,this.onVScroll.bind(this,FAKE_V_SCROLLBAR),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,FAKE_V_SCROLLBAR);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...HORIZONTAL_SOURCES,VIEWPORT]){if(this.lastScrollSource[1]===t)continue;const i=this.getViewportForSource(t);_setScrollLeft(i,e,this.enableRtl)}}getViewportForSource(e){return e===VIEWPORT?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const s=_getScrollLeft(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===VIEWPORT?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===VIEWPORT?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},SCROLL_END_TIMEOUT)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!_isIOSUserAgent()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=_getInnerHeight(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(VIEWPORT)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),_setScrollLeft(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:i,lastScrollTop:s}=this;return{top:s,bottom:s+i}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,s=i.getRowCount();let o=-1;for(let n=0;n<s;n++){const r=i.getRow(n);if(typeof e=="function"){if(r&&e(r)){o=n;break}}else if(e===r||e===r.data){o=n;break}}o>=0&&this.ensureIndexVisible(o,t)}ensureIndexVisible(e,t){if(_isDomLayout(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){_warn(88,{index:e});return}const{frameworkOverrides:o,pageBounds:n,rowContainerHeight:r,rowRenderer:a}=this.beans;o.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e);let c,u,h=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:g,stickyBottomHeight:p}=l,f=d.rowTop,m=d.rowHeight,C=n.getPixelOffset(),w=d.rowTop-C,v=w+d.rowHeight,b=this.getVScrollPosition(),y=r.divStretchOffset,S=b.top+y,x=b.bottom+y,F=x-S,R=r.getScrollPositionForPixel(w),E=r.getScrollPositionForPixel(v-F),D=Math.min((R+E)/2,w),A=S+g>w,T=x-p<v;let M=null;t==="top"?M=R-g:t==="bottom"?M=E+p:t==="middle"?M=D:A?M=R-g:T&&(M=E+p),M!==null&&(this.setVerticalScrollPosition(M),a.redraw({afterScroll:!0})),c=f!==d.rowTop||m!==d.rowHeight,u=g!==l.stickyTopHeight||p!==l.stickyBottomHeight,h++}while((c||u)&&h<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:s}=this.beans,o=i.getCol(e);if(!o||o.isPinned()||!this.visibleCols.isColDisplayed(o))return;const n=this.getPositionedHorizontalScroll(o,t);s.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?i:s)||o,l=r?s:i;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:a?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>o:i<o,a=n?i<s:t>s;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleCols.bodyWidth,s=e.getActualWidth(),o=e.getLeft(),n=t?-1:1,r=t?i-o:o,a=r+s*n,l=r+s/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,s=e+t;return{start:i,end:s,width:e}}},CenterWidthFeature=class extends BeanStub{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=_isDomLayout(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,s=t.bodyWidth,o=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=s+o+n:(r=s,this.addSpacer&&(this.gos.get("enableRtl")?o:n)===0&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},ViewportSizeFeature=class extends BeanStub{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this,s=()=>{_requestAnimationFrame(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(s),i.registerBodyViewportResizeListener(s)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerHeight(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function processClassRules(e,t,i,s,o,n){if(i==null&&t==null)return;const r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(i){const d=Object.keys(i);for(let c=0;c<d.length;c++){const u=d[c],h=i[u];let g;typeof h=="string"?g=e?e.evaluate(h,s):!0:typeof h=="function"&&(g=h(s)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>l(d,c=>{r[c]||(a[c]=!0)})),n&&Object.keys(a).forEach(n),Object.keys(r).forEach(o)}function calculateRowLevel(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var RowStyleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,s=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},o=i.get("rowClass");o&&s(o);const n=i.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);s(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:s,expressionSvc:o}=this.beans,n=_addGridCommonParams(s,{data:e.data,node:e,rowIndex:e.rowIndex});processClassRules(o,void 0,s.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),s=t.getCallback("getRowStyle");let o;if(s){const n={data:e.data,node:e,rowIndex:e.rowIndex};o=s(n)}if(o||i)return Object.assign({},i,o)}},instanceIdSequence3=0,DOM_DATA_KEY_ROW_CTRL="renderedRow",RowCtrl=class extends BeanStub{constructor(e,t,i,s,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=s,this.printLayout=o,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+instanceIdSequence3++,this.rowId=_escapeString(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=_escapeString(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,s){const{context:o,focusSvc:n}=this.beans;s=setupCompBean(this,o,s);const r={rowComp:e,element:t,containerType:i,compBean:s};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.editing&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(i=>i.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),_isRowSelection(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(o=>i.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&_setAriaExpanded(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,this),e.compBean.addDestroyFunc(()=>_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=_escapeString(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(_batchCall(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(_batchCall(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==i),this.destroyBean(i,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:s}}=this,o=!!e||!s.isPinningLeft(),n=!!t,r=!!i||!s.isPinningRight();return o&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.colModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&_isGroupUseEntireRow(this.gos,s);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;if(!i?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(i.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new CellCtrl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){const s={list:[],map:{}},o=(d,c,u)=>{u!=null?s.list.splice(u,0,c):s.list.push(c),s.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&o(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(s.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,i)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=s.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);o(d,c,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==i){const d=l.column.getInstanceId();if(!s.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=s.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);o(d,u,g)}}}return s}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;const s=t?.getCellSpan(i.column,this.rowNode);if(s){if(s.firstNode!==this.rowNode||!s.doesSpanContain(i))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){const{column:o}=e;if(o.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:n}=e,{visibleCols:r}=this.beans,a=e.isCellFocused();return n||a?!(r.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||_isDomLayout(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=_exists(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,s=i.isPinningLeft(),o=i.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&i&&s&&o}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(i=>i.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(i=>{this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const i=e==="Above",s=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",s)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:_makeNull(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:i,column:s}=t;if(!(i.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??s};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),i=t?t.element:null,s=i===e.target,o=_getActiveDomElement(this.beans);let n=!1;i&&o&&(n=i.contains(o)&&o.classList.contains("ag-cell"));let r=null;!s&&!n&&(r=_findNextFocusableElement(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&s||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>_isVisible(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(i=>{_addOrRemoveAttribute(i.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let s;if(this.fullWidthGui)s=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?s=n==="right"?this.rightGui?.element:this.leftGui?.element:s=this.centerGui?.element}s&&(s.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};return e.list.forEach(s=>{s!==t&&(i.list.push(s),i.map[s.column.getInstanceId()]=s)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return _addGridCommonParams(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){_isStopPropagationForAgGrid(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);if(!(!t||!i))return{rowGui:t,column:i}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=_isElementChildOfClass(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:i,focusSvc:s}=this.beans;i?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:n,column:r}=o,a=n.element,l=e.target;let d=e.defaultPrevented||_isBrowserSafari();a&&a.contains(l)&&_isFocusableFormField(l)&&(d=!1),s.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(_isStopPropagationForAgGrid(e)||this.lastMouseDownOnDragger)return;const{eventSvc:i,selectionSvc:s}=this.beans;i.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:i,rowNode:s}=this,o=_addGridCommonParams(i,{fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{i.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return _getFullWidthDetailCellRendererDetails(n,o);case"FullWidthGroup":return o.value=s.groupValue,o.valueFormatted=s.rowGroupColumn?this.beans.valueSvc.formatValue(s.rowGroupColumn,s,o.value):o.value,_getFullWidthGroupCellRendererDetails(n,o);case"FullWidthLoading":return _getFullWidthLoadingCellRendererDetails(n,o);default:return _getFullWidthCellRendererDetails(n,o)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",s){const{rowDragSvc:o,context:n}=this.beans;if(!o||!this.isFullWidth())return;const r=o.createRowDragComp(()=>i,this.rowNode,void 0,e,t,s);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass(t,!0),s.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:s,beans:o}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(s.rowIndex%2===0?"ag-row-even":"ag-row-odd"),s.isRowPinned()&&n.push("ag-row-pinned"),s.isSelected()&&n.push("ag-row-selected"),s.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),s.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(n,s),s.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=o;return r&&(r.processClassesFromGridOptions(n,s),r.preProcessRowClassRules(n,s)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:s,beans:o,gos:n}=this;i.addManagedListeners(t,{mouseenter:()=>s.dispatchRowEvent("mouseEnter"),mouseleave:()=>s.dispatchRowEvent("mouseLeave")}),i.addManagedListeners(s,{mouseEnter:()=>{!o.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(i=>i.element);for(const i of t)i.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,s=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),s)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),o=_isGetRowHeightFunction(this.gos)?_getRowHeightForNode(this.beans,this.rowNode).height:void 0,n=o?`${Math.min(i,o)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&_isAnimateRows(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(_getActiveDomElement(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(i=>i.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,i=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);i!==this.rowFocused&&(this.rowFocused=i,this.setFocusedClasses()),!i&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){if(!this.printLayout&&_exists(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let i;if(t.sticky)i=t.stickyRowTop;else{const s=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(s);i=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return i+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let i=null;return this.getAllCellCtrls().forEach(s=>{s.column==e&&(i=s)}),i!=null||t||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(e)>=0&&(i=s)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,o=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.addOrRemoveCssClass("ag-row-even",s),n.rowComp.addOrRemoveCssClass("ag-row-odd",!s),_setAriaRowIndex(n.element,o)})}};function _isEventFromPrintableCharacter(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function _isUserSuppressingKeyboardEvent(e,t,i,s,o){const n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_addGridCommonParams(e,{event:t,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(n&&n(r))}function _selectAllCells(e){const{pinnedRowModel:t,rowModel:i}=e,[s,o]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=s?null:"top";let r,a;o?(r=null,a=i.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var A_KEYCODE=65,C_KEYCODE=67,V_KEYCODE=86,D_KEYCODE=68,Z_KEYCODE=90,Y_KEYCODE=89;function _normaliseQwertyAzerty(e){const{keyCode:t}=e;let i;switch(t){case A_KEYCODE:i=KeyCode.A;break;case C_KEYCODE:i=KeyCode.C;break;case V_KEYCODE:i=KeyCode.V;break;case D_KEYCODE:i=KeyCode.D;break;case Z_KEYCODE:i=KeyCode.Z;break;case Y_KEYCODE:i=KeyCode.Y;break;default:i=e.code}return i}var RowContainerEventsFeature=class extends BeanStub{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",_isEventSupported("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:s})})}processMouseEvent(e,t){if(!_isEventFromThisGrid(this.gos,t)||_isStopPropagationForAgGrid(t))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,s,i)):(i&&i.onMouseEvent(e,t),s&&s.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:_getCellCtrlForEventTarget(t,e),rowCtrl:_getCtrlForEventTarget(t,e,DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){const{rowNode:s,column:o,editing:n}=e;!_isUserSuppressingKeyboardEvent(this.gos,i,s,o,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.editing),_isEventFromPrintableCharacter(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:s}=e,{focusSvc:o,navigation:n}=this.beans,r=o.getFocusedCell(),a=r&&r.column;if(!_isUserSuppressingKeyboardEvent(this.gos,i,s,a,!1)){const d=i.key;if(t==="keydown")switch(d){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:n?.handlePageScrollingKey(i,!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case KeyCode.UP:case KeyCode.DOWN:e.onKeyboardNavigate(i);break;case KeyCode.TAB:e.onTabKeyDown(i);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!_isEventFromThisGrid(this.gos,e))return;const i=_normaliseQwertyAzerty(e),{clipboardSvc:s,undoRedo:o}=this.beans;if(i===KeyCode.A)return this.onCtrlAndA(e);if(i===KeyCode.C)return this.onCtrlAndC(s,e);if(i===KeyCode.D)return this.onCtrlAndD(s,e);if(i===KeyCode.V)return this.onCtrlAndV(s,e);if(i===KeyCode.X)return this.onCtrlAndX(s,e);if(i===KeyCode.Y)return this.onCtrlAndY(o);if(i===KeyCode.Z)return this.onCtrlAndZ(o,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:s},gos:o}=this;i&&_isCellSelectionEnabled(o)&&t.isRowsToRender()?_selectAllCells(this.beans):s&&s?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:_getSelectAll(o)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},SetHeightFeature=class extends BeanStub{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},getTopRowCtrls=e=>e.topRowCtrls,getStickyTopRowCtrls=e=>e.getStickyTopRowCtrls(),getStickyBottomRowCtrls=e=>e.getStickyBottomRowCtrls(),getBottomRowCtrls=e=>e.bottomRowCtrls,getCentreRowCtrls=e=>e.allRowCtrls,getSpannedTopRowCtrls=e=>e.getCtrls("top"),getSpannedCenterRowCtrls=e=>e.getCtrls("center"),getSpannedBottomRowCtrls=e=>e.getCtrls("bottom"),ContainerCssClasses={center:{type:"center",name:"center-cols",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:getCentreRowCtrls},topCenter:{type:"center",name:"floating-top",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:getTopRowCtrls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:getStickyTopRowCtrls},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:getStickyTopRowCtrls},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:getStickyTopRowCtrls},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:getStickyTopRowCtrls},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:getStickyBottomRowCtrls},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:getStickyBottomRowCtrls},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:getStickyBottomRowCtrls},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:getStickyBottomRowCtrls},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:getBottomRowCtrls}};function _getRowViewportClass(e){return`ag-${_getRowContainerOptions(e).name}-viewport`}function _getRowContainerClass(e){const t=_getRowContainerOptions(e);return t.container??`ag-${t.name}-container`}function _getRowSpanContainerClass(e){return`ag-${_getRowContainerOptions(e).name}-spanned-cells-container`}function _getRowContainerOptions(e){return ContainerCssClasses[e]}var allTopNoFW=["topCenter","topLeft","topRight"],allBottomNoFW=["bottomCenter","bottomLeft","bottomRight"],allMiddleNoFW=["center","left","right"],allMiddle=["center","left","right","fullWidth"],allCenter=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],allLeft=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],allRight=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],allStickyTopNoFW=["stickyTopCenter","stickyTopLeft","stickyTopRight"],allStickyBottomNoFW=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],allStickyContainers=[...allStickyTopNoFW,"stickyTopFullWidth",...allStickyBottomNoFW,"stickyBottomFullWidth"],allNoFW=[...allTopNoFW,...allBottomNoFW,...allMiddleNoFW,...allStickyTopNoFW,...allStickyBottomNoFW],RowContainerCtrl=class extends BeanStub{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=_getRowContainerOptions(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new ViewportSizeFeature(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,i,s){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=s,this.createManagedBean(new RowContainerEventsFeature(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(allLeft,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(allRight,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(allMiddle,()=>this.createManagedBean(new SetHeightFeature(this.eContainer,this.name==="center"?s:void 0))),n&&this.forContainers(allNoFW,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(allCenter,()=>this.createManagedBean(new CenterWidthFeature(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(allStickyContainers.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const i=this.gos.get("ensureDomOrder"),s=_isDomLayout(this.gos,"print");this.comp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=i=>{e.dragging&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return _getInnerWidth(this.eViewport)}getCenterViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=_observeResize(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return _isInDOM(this.eViewport)}getViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||_isHorizontalScrollShowing(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){_setScrollLeft(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const i=_isDomLayout(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},CSS_CLASS_FORCE_VERTICAL_SCROLL="ag-force-vertical-scroll",CSS_CLASS_CELL_SELECTABLE="ag-selectable",CSS_CLASS_COLUMN_MOVING="ag-column-moving",GridBodyCtrl=class extends BeanStub{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${_getRowViewportClass("center")}`),this.eFullWidthContainer=i.querySelector(`.${_getRowContainerClass("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${_getRowContainerClass("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${_getRowContainerClass("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new LayoutFeature(this.comp)),this.scrollFeature=this.createManagedBean(new GridBodyScrollFeature(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const i=t&&e.getScrollbarWidth()||0,s=_isInvisibleScrollbar()?16:0,o=`calc(100% + ${i+s}px)`;_requestAnimationFrame(this.beans,()=>this.comp.setBodyViewportWidth(o)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let i=this.gos.get("treeData");if(!i){const s=t.isPivotMode();i=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:i=>{const{target:s}=i,o=_isElementChildOfClass(s,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:i=>{const{target:s,relatedTarget:o}=i,n=t.contains(o),r=_isElementChildOfClass(o,"ag-root",t);_isElementChildOfClass(s,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(CSS_CLASS_COLUMN_MOVING,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(CSS_CLASS_CELL_SELECTABLE,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,i=t.isLastRowIndexKnown()?t.getRowCount():-1,s=i===-1?-1:e+i;this.comp.setRowCount(s)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?CSS_CLASS_FORCE_VERTICAL_SCROLL:null,i=_isDomLayout(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&_isVerticalScrollShowing(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const s=()=>{const o=i&&_isAnimateRows(this.gos)&&!e.stretching,n=o?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,o)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({gridStylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,s())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,i=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:i}),t?.mockBodyContextMenu(this,i),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&_isEventFromThisGrid(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e,o=s||Math.abs(t)>Math.abs(i),n=e.target;o?(this.eStickyTopFullWidthContainer.contains(n)||this.eStickyBottomFullWidthContainer.contains(n))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,i=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(i<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,s=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=s+n;i.setStickyBottomBottom(`${r}px`)}},AbstractFakeScrollComp=class extends Component{constructor(e,t){super(),this.direction=t,this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",_isMacOsUserAgent()||_isIOSUserAgent())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=_isInvisibleScrollbar(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),_requestAnimationFrame(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;_waitUntil(()=>_isVisible(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},FakeHScrollElement={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},FakeHScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeHScrollElement,"horizontal"),this.eLeftSpacer=RefPlaceholder,this.eRightSpacer=RefPlaceholder,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new CenterWidthFeature(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,s=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=s),_setFixedWidth(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(o+=s),_setFixedWidth(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:s===0&&t?16:s,r=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),_setFixedHeight(this.getGui(),n),_setFixedHeight(this.eViewport,n),_setFixedHeight(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return _getScrollLeft(this.eViewport,this.enableRtl)}setScrollPosition(e){_isVisible(this.eViewport)||this.attemptSettingScrollPosition(e),_setScrollLeft(this.eViewport,e,this.enableRtl)}},FakeHScrollSelector={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:FakeHScrollComp},FakeVScrollElement={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},FakeVScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeVScrollElement,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new SetHeightFeature(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,s=t&&e.getScrollbarWidth()||0,o=s===0&&i?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),_setFixedWidth(this.getGui(),o),_setFixedWidth(this.eViewport,o),_setFixedWidth(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const i=e.getGridBodyCtrl().eBodyViewport,s=this.getScrollPosition(),o=i.scrollTop;s!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!_isVisible(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},FakeVScrollSelector={selector:"AG-FAKE-VERTICAL-SCROLL",component:FakeVScrollComp};function getHeaderRowCount(e){return e.cols?e.cols.treeDepth+1:-1}function getFocusHeaderRowCount(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function getGroupRowsHeight(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const s of i){if(!s)continue;const o=s.getGroupRowCount()||0;for(let n=0;n<o;n++){const r=s.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=getColumnGroupHeaderRowHeight(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function getColumnGroupHeaderRowHeight(e,t){let s=e.colModel.isPivotMode()?getPivotGroupHeaderHeight(e):getGroupHeaderHeight(e);const o=t.getHeaderCellCtrls();for(const n of o){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>s&&r.isAutoHeaderHeight()&&(s=a)}return s}function getColumnHeaderRowHeight(e){let i=e.colModel.isPivotMode()?getPivotHeaderHeight(e):getHeaderHeight(e);return e.colModel.forAllCols(s=>{const o=s.getAutoHeaderHeight();o!=null&&o>i&&s.isAutoHeaderHeight()&&(i=o)}),i}function getHeaderHeight(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function getFloatingFiltersHeight(e){return e.gos.get("floatingFiltersHeight")??getHeaderHeight(e)}function getGroupHeaderHeight(e){return e.gos.get("groupHeaderHeight")??getHeaderHeight(e)}function getPivotHeaderHeight(e){return e.gos.get("pivotHeaderHeight")??getHeaderHeight(e)}function getPivotGroupHeaderHeight(e){return e.gos.get("pivotGroupHeaderHeight")??getGroupHeaderHeight(e)}var GridHeaderCtrl=class extends BeanStub{setComp(e,t,i){this.comp=e,this.eGui=t;const{beans:s}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=s;o&&this.createManagedBean(new ManagedFocusFeature(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>_requestAnimationFrame(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=getGroupRowsHeight(e).reduce((n,r)=>n+r,0),s=getColumnHeaderRowHeight(e);if(e.filterManager?.hasFloatingFilters()&&(t+=getFloatingFiltersHeight(e)),t+=i,t+=s,this.headerHeight===t)return;this.headerHeight=t;const o=`${t+1}px`;this.comp.setHeightAndMinHeight(o),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(s=>s.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,s=i!==t?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(s,!0,e)||!i&&r.focusOverlay(!1)||_focusNextGridCoreContainer(o,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case KeyCode.LEFT:t="LEFT";case KeyCode.RIGHT:{_exists(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case KeyCode.UP:t="UP";case KeyCode.DOWN:{_exists(t)||(t="DOWN"),i.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:s}=this;!t&&i.contains(_getActiveDomElement(s))||i.contains(t)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:s,ctrlsSvc:o}=this.beans;if(!e&&!i||!s?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===o.getHeaderRowContainerCtrl()?.eViewport)&&s.showHeaderContextMenu(void 0,e,i)}},AbstractHeaderCellComp=class extends Component{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},HeaderCellElement={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},HeaderCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderCellElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((o,n)=>{n!=null&&n!=""?e.setAttribute(o,n):e.removeAttribute(o)})("col-id",this.ctrl.column.getColId());const i={setWidth:o=>e.style.width=o,addOrRemoveCssClass:(o,n)=>this.addOrRemoveCssClass(o,n),setUserStyles:o=>_addStylesToElement(e,o),setAriaSort:o=>o?_setAriaSort(e,o):_removeAriaSort(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const s=this.ctrl.getSelectAllGui();s&&this.eResize.insertAdjacentElement("afterend",s)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},HeaderGroupCellCompElement={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},HeaderGroupCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderGroupCellCompElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder}postConstruct(){const e=this.getGui(),t=(s,o)=>o!=null?e.setAttribute(s,o):e.removeAttribute(s);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const i={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setUserStyles:s=>_addStylesToElement(e,s),setHeaderWrapperHidden:s=>{s?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:s=>{s!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${s}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",s!=null)},setResizableDisplayed:s=>_setDisplayed(this.eResize,s),setWidth:s=>e.style.width=s,setAriaExpanded:s=>t("aria-expanded",s),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),s=e.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:i}=this;t?i.style.setProperty(e,t):i.style.removeProperty(e)}},HeaderFilterCellCompElement={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},HeaderFilterCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderFilterCellCompElement,e),this.eFloatingFilterBody=RefPlaceholder,this.eButtonWrapper=RefPlaceholder,this.eButtonShowMainFilter=RefPlaceholder}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setUserStyles:i=>_addStylesToElement(e,i),addOrRemoveBodyCssClass:(i,s)=>this.eFloatingFilterBody.classList.toggle(i,s),setButtonWrapperDisplayed:i=>_setDisplayed(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},HeaderRowComp=class extends Component{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){_setAriaRowIndex(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(s=>{const o=s.instanceId;let n=i[o];delete i[o],n==null&&(n=this.createHeaderComp(s),this.getGui().appendChild(n.getGui())),this.headerComps[o]=n}),Object.values(i).forEach(s=>{this.getGui().removeChild(s.getGui()),this.destroyBean(s)}),t){const s=Object.values(this.headerComps);s.sort((n,r)=>{const a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const o=s.map(n=>n.getGui());_setDomChildOrder(this.getGui(),o)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new HeaderGroupCellComp(e);break;case"filter":t=new HeaderFilterCellComp(e);break;default:t=new HeaderCellComp(e);break}return this.createBean(t),t.setParentComponent(this),t}},SetLeftFeature=class extends BeanStub{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=s,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?_last(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),s=_exists(this.columnOrGroup.getOldLeft());t?.isActive()&&s&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),i=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===i&&this.setLeft(i)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:i,visibleCols:s}=this.beans;if(!_isDomLayout(i,"print")||e.getPinned()==="left")return t;const n=s.getColsLeftWidth();if(e.getPinned()==="right"){const r=s.bodyWidth;return n+r+t}return n+t}setLeft(e){if(_exists(e)&&(this.eCell.style.left=`${e}px`),isColumnGroup2(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&_setAriaColSpan(this.ariaEl,t.length)}}},instanceIdSequence4=0,DOM_DATA_KEY_HEADER_CTRL="headerCtrl",AbstractHeaderCellCtrl=class extends BeanStub{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+instanceIdSequence4++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,s=i.getDefinition(),o=s&&s.suppressHeaderKeyboardEvent;if(!_exists(o))return!1;const n=_addGridCommonParams(this.gos,{colDef:s,column:i,headerRowIndex:t,event:e});return!!o(n)}getWrapperHasFocus(){return _getActiveDomElement(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const s=this.getHeaderClassParams();i=t(s)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:s}=e,{beans:o}=this,n=u=>{if(!this.isAlive()||!s.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=_getElementSize(this.eGui),m=h+g+p+f,w=t.offsetHeight+m;if(u<5){const v=_getDocument(o),b=!v||!v.contains(t),y=w==0;if(b||y){_batchCall(()=>n(u+1),"raf",o);return}}this.setColHeaderHeight(this.column,w)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=_observeResize(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),s.addDestroyFunc(()=>c()),s.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:s}=this;!e||!t||!s||(refreshFirstAndLastStyles(e,t,i.visibleCols),_setAriaColIndex(s,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_isHeaderFocusSuppressed(this.beans);this.eGui&&_addOrRemoveAttribute(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=_getActiveDomElement(this.beans),i=e.key===KeyCode.LEFT||e.key===KeyCode.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i))return;const o=e.key===KeyCode.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:i}=this;let s=e.key===KeyCode.LEFT!==t.get("enableRtl");const o=i.getPinned(),n=t.get("enableRtl");return o&&n!==(o==="right")&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=DOM_DATA_KEY_HEADER_CTRL,{eGui:i,gos:s}=this;_setDomData(s,i,t,this),e.addDestroyFunc(()=>_setDomData(s,i,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const s=e??t,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),o?.isHeaderContextMenuEnabled(i)&&o.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},HeaderCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,i,s,o){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=setupCompBean(this,d,o);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,i,e,this)):_setDisplayed(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new SetLeftFeature(r,t,a)),h.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return _addGridCommonParams(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return _getHeaderCompDetails(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:i,gos:s}=this.beans;return _addGridCommonParams(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||_isLegacyMenuEnabled(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===KeyCode.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===KeyCode.ENTER&&this.onEnterKeyDown(e),e.key===KeyCode.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();isHeaderComp(i)&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),_isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=_getHeaderClassesFromColDef(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(o=>{s.has(o)?s.delete(o):this.comp.addOrRemoveCssClass(o,!0)}),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this,o=getGroupRowsHeight(this.beans),n=o.reduce((c,u)=>c+=u,0)===0;if(i.addOrRemoveCssClass("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",r>0);const l=getColumnHeaderRowHeight(s);if(r===0){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let c=0;c<r;c++)d+=o[o.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(_getAriaSortState(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!_isLegacyMenuEnabled(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(_getActiveDomElement(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>t==="filter"?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return isHeaderComp(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function isHeaderComp(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var instanceIdSequence5=0,HeaderRowCtrl=class extends BeanStub{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=instanceIdSequence5++,this.allCtrls=[];const s=i=="group"?"ag-header-row-column-group":i=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}postConstruct(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=setupCompBean(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],i=getGroupRowsHeight(this.beans),s=getColumnHeaderRowHeight(this.beans);t.push(...i),t.push(s),e?.hasFloatingFilters()&&t.push(getFloatingFiltersHeight(this.beans));let o=0;for(let r=0;r<this.rowIndex;r++)o+=t[r];const n=t[this.rowIndex];return{topOffset:o,rowHeight:n}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const i=s=>{const{focusSvc:o,visibleCols:n}=this.beans;return o.isHeaderWrapperFocused(s)?n.isVisible(s.column):!1};if(e)for(const[s,o]of e)i(o)?this.ctrlsById.set(s,o):this.destroyBean(o);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const s=e.getUniqueId();let o;if(i&&(o=i.get(s),i.delete(s)),o&&o.column!=e&&(this.destroyBean(o),o=void 0),o==null)switch(this.type){case"filter":{o=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":o=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:o=this.createBean(new HeaderCellCtrl(e,this));break}t.set(s,o)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:i}=this.beans;return["left",null,"right"].forEach(s=>{const o=i.getHeadersToRender(s,t);e=e.concat(o)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const i=this.allCtrls.find(o=>o.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},HeaderRowContainerCtrl=class extends BeanStub{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:i,ctrlsSvc:s,colModel:o,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;s.register(l,this),o.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:i,filterManager:s}=this.beans;let o=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const c=getHeaderRowCount(i)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const h=this.createBean(new HeaderRowCtrl(o++,this.pinned,"group"));this.groupsRowCtrls.push(h)}},a=()=>{const c=o++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new HeaderRowCtrl(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=o++;if(this.filtersRowCtrl){const h=this.filtersRowCtrl.rowIndex!==u;(!e||h)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new HeaderRowCtrl(u,this.pinned,"filter")))};r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(s=>s.column===e);if(isColumn(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const s=t(this.groupsRowCtrls[i]);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const o=this.getAllCtrls()[e];return o?o.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const i=e?.createBodyDropTarget(this.pinned,t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){if(!t)return;const{column:i}=t;i.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new CenterWidthFeature(e=>this.comp.setCenterWidth(`${e}px`),!0))}},MenuService=class extends BeanStub{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:i}=this.beans,s=t&&_isLegacyMenuEnabled(this.gos)?t:i;this.showColumnMenuCommon(s,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(_isLegacyMenuEnabled(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&isColumn(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(_isIOSUserAgent()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return _isLegacyMenuEnabled(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,s){const{positionBy:o,onClosedCallback:n}=t,r=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,i,n,s)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,i,n,s)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),_requestAnimationFrame(a,()=>{const d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(s),i,n,!0)})}}};function _setColMenuVisible(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}var OverlayComponent=class extends Component{constructor(){super()}},LoadingOverlayElement={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},LoadingOverlayComponent2=class extends OverlayComponent{init(){const e=_makeNull(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??LoadingOverlayElement),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},NoRowsOverlayElement={tag:"span",cls:"ag-overlay-no-rows-center"},NoRowsOverlayComponent2=class extends OverlayComponent{init(){const e=_makeNull(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??NoRowsOverlayElement),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function _createIcon(e,t,i){const s=_createIconNoSpan(e,t,i);if(s){const{className:n}=s;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return s}const o=_createElement({tag:"span"});return o.appendChild(s),o}function _createIconNoSpan(e,t,i){let s=null;e==="smallDown"?_warn(262):e==="smallLeft"?_warn(263):e==="smallRight"&&_warn(264);const o=i&&i.getColDef().icons;if(o&&(s=o[e]),t.gos&&!s){const n=t.gos.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else{_warn(38,{iconName:e});return}if(typeof n=="string")return _loadTemplate(n);if(_isNodeOrElement(n))return n;_warn(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),_createElement({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var dragAndDropImageComponentCSS=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",DragAndDropElement={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},DragAndDropImageComponent2=class extends Component{constructor(){super(),this.dragSource=null,this.eIcon=RefPlaceholder,this.eLabel=RefPlaceholder,this.eGhost=RefPlaceholder,this.registerCSS(dragAndDropImageComponentCSS)}postConstruct(){const e=t=>_createIcon(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(DragAndDropElement),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:i,dragSource:s,dropIconMap:o,gos:n}=this;_clearElement(i);let r=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),r=o[e],i.classList.toggle("ag-shake-left-to-right",t),!(r===o.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&i.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},agAbstractLabelCSS=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",AgAbstractLabel=class extends Component{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(agAbstractLabelCSS)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;_clearElement(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(_setDisplayed(t,!1),_setAriaRole(t,"presentation")):(_setDisplayed(t,!0),_setAriaRole(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(_setElementWidth(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return _setDisabled(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},AgAbstractField=class extends AgAbstractLabel{constructor(e,t,i,s){super(e,t,i),this.className=s}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||_getAriaLabel(e)!==null?_setAriaLabelledBy(e,""):_setAriaLabelledBy(e,t??"")}setAriaLabel(e){return _setAriaLabel(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _setFixedWidth(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function buildTemplate(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var AgAbstractInputField=class extends AgAbstractField{constructor(e,t,i="text",s="input"){super(e,e?.template??buildTemplate(s),[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eInput=RefPlaceholder}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:i,className:s}=this;e.classList.add(`${s}-label`),t.classList.add(`${s}-input-wrapper`),i.classList.add(`${s}-input`),this.addCssClass("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:n}=this.config;o!=null&&this.setInputName(o),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([i])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return _addOrRemoveAttribute(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return _setAriaLabel(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _setDisabled(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)_addOrRemoveAttribute(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";_addOrRemoveAttribute(this.eInput,"autocomplete",t)}return this}},AgCheckbox=class extends AgAbstractInputField{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},AgCheckboxSelector={selector:"AG-CHECKBOX",component:AgCheckbox},checkboxCellRendererCSS=".ag-checkbox-cell{height:100%}",CheckboxCellRendererElement={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxCellRenderer=class extends Component{constructor(){super(CheckboxCellRendererElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder,this.registerCSS(checkboxCellRendererCSS)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,s=t.getInputElement();s.setAttribute("tabindex","-1"),_setAriaLive(s,"polite"),this.addManagedListeners(s,{click:o=>{if(_stopPropagationForAgGrid(o),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:o=>{_stopPropagationForAgGrid(o)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(o.key===KeyCode.SPACE&&!t.isDisabled()){e.eGridCell===_getActiveDomElement(i)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:s,column:o,node:n}=e;if(n.group&&o)if(typeof s=="boolean")t=s;else{const u=o.getColId();u.startsWith(GROUP_AUTO_COLUMN_ID)?t=s==null||s===""?void 0:s==="true":n.aggData&&n.aggData[u]!==void 0?t=s??void 0:i=!1}else t=s??void 0;const{eCheckbox:r}=this;if(!i){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!o?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=_getAriaCheckboxStateName(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:i}=this,{column:s,node:o,value:n}=i,r={column:s,colDef:s.getColDef(),data:o.data,node:o,rowIndex:o.rowIndex,rowPinned:o.rowPinned,value:n};t.dispatchEvent({type:"cellEditingStarted",...r});const a=o.setDataValue(s,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...r,oldValue:n,newValue:e,valueChanged:a}),a||this.updateCheckbox(i)}},ROOT_NODE_ID="ROOT_NODE_ID",AbstractClientSideNodeManager=class extends BeanStub{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=ROOT_NODE_ID,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,i)=>this.createRowNode(t,i))??[]}setImmutableRowData(e,t){const i=_getRowIdCallback(this.gos),s=!this.gos.get("suppressMaintainUnsortedOrder"),o=e.changedRowNodes,n=new Set,r=this.rootNode,a=r.allLeafChildren,l=a.length;let d=!1,c=!1,u=!1,h=!1;for(let p=0,f=-1,m=t.length;p<m;p++){const C=t[p];let w=this.getRowNode(i({data:C,level:0}));if(!w)d=!0,w=this.createRowNode(C,-1),o.add(w);else{if(s){const v=w.sourceRowIndex;h||(h=v<=f||d),f=v}w.data!==C&&(u=!0,w.updateData(C),o.update(w))}n.add(w)}const g=[];for(let p=0;p<l;p++){const f=a[p];n.has(f)||(c=!0,f.isSelected()&&g.push(f),this.rowNodeDeleted(f),o.remove(f))}if(d||c||h){const p=new Array(n.size);let f=0;if(!s)for(let C=0;C<l;++C){const w=a[C];n.delete(w)&&(w.sourceRowIndex=f,p[f++]=w)}for(const C of n)C.sourceRowIndex=f,p[f++]=C;r.allLeafChildren=p;const m=r.sibling;m&&(m.allLeafChildren=p),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=h)}(d||c||h||u)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,i=this.allNodesMap;i[t]===e&&delete i[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const i={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},s=[],o=_getRowIdCallback(this.gos);return this.executeRemove(o,e,i,s),this.executeUpdate(o,e,i,s),this.executeAdd(e,i),this.deselectNodes(s),i}executeAdd(e,t){const i=e.add;if(!i?.length)return;let s=this.rootNode.allLeafChildren,o=s.length;if(typeof e.addIndex=="number"&&(o=this.sanitizeAddIndex(e.addIndex),o>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<s.length;u++)if(s[u]?.rowIndex==o-1){o=u+1;break}}const n=i.length,r=t.changedRowNodes,a=new Array(n);for(let c=0;c<n;c++){const u=this.createRowNode(i[c],o+c);r.add(u),a[c]=u}const l=this.rootNode;if(o<s.length){const c=s.slice(0,o),u=s.slice(o,s.length),h=c.length+a.length;for(let g=0,p=u.length;g<p;++g)u[g].sourceRowIndex=h+g;s=[...c,...a,...u],t.rowsInserted=!0}else s=s.concat(a);l.allLeafChildren=s;const d=l.sibling;d&&(d.allLeafChildren=s),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){const{remove:n}=t;if(!n?.length)return;const r={};n.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&o.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],s.remove.push(c),i.remove(c))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!r[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){const{update:n}=t;n?.length&&n.forEach(r=>{const a=this.lookupRowNode(e,r);a&&(a.updateData(r),!a.selectable&&a.isSelected()&&o.push(a),s.update.push(a),i.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",i=this.beans.selectionSvc,s=e.length>0;s&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),s&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const i=new RowNode(this.beans);return i.parent=this.rootNode,i.level=0,i.group=!1,i.expanded=!1,i.sourceRowIndex=t,i.setDataAndId(e,String(this.nextId)),this.allNodesMap[i.id]&&_warn(2,{nodeId:i.id}),this.allNodesMap[i.id]=i,this.nextId++,i}lookupRowNode(e,t){let i;if(e){const s=e({data:t,level:0});if(i=this.allNodesMap[s],!i)return _error(4,{id:s}),null}else if(i=this.rootNode?.allLeafChildren?.find(s=>s.data===t),!i)return _error(5,{data:t}),null;return i||null}},ServerSideTransactionResultStatus=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(ServerSideTransactionResultStatus||{}),CheckboxSelectionComponentElement={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxSelectionComponent=class extends Component{constructor(){super(CheckboxSelectionComponentElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,s=t.isSelected(),o=_getAriaCheckboxStateName(e,s),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);i.setValue(s,!0),i.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:_stopPropagationForAgGrid,click:s=>{_stopPropagationForAgGrid(s),this.beans.selectionSvc?.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{const n=typeof s=="object"?_getHideDisabledCheckboxes(s):void 0,r=typeof o=="object"?_getHideDisabledCheckboxes(o):void 0;n!==r&&this.onSelectableChanged()}),_getIsRowSelectable(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:s}=this;let o=t.selectable;const n=this.getIsVisible();if(o)if(typeof n=="function"){const l=i?.callbackParams;if(!e)o=n({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);o=n({...l,...d})}}else o=n??!1;const r=s.get("rowSelection");if(r&&typeof r!="string"?!_getHideDisabledCheckboxes(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(i?.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?_getCheckboxes(t):this.column?.getColDef()?.checkboxSelection}},RowRangeSelectionContext=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=t[0].id===this.rootId,s=t.findIndex(o=>o.id===e.id);if(s>-1){const o=t.slice(0,s),n=t.slice(s+1);return this.setEndRange(e),i?{keep:o,discard:n}:{keep:n,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&o.push(n)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const s=this.rowModel.getNodesInRangeForSelection(i,e);if(!s)return this.setRoot(e),{keep:[e],discard:[]};if(s.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}},SelectAllFeature=class extends BeanStub{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(_getActiveDomElement(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new AgCheckbox);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),_setAriaRole(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const o=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;o(i)!==o(s)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,s=t.getSelectAllState(e);i.setValue(s);const o=t.hasNodesToSelect(e);i.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:o}=this,r=s.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",o?`${a} (${r})`:null),s.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return _isMultiRowSelection(this.gos)?!0:(_warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return _isClientSideRowModel(t)||_isServerSideRowModel(t)?!0:(_warn(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const s={source:i,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(s):o.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,s=t.get("rowSelection"),o=e.getColDef(),{headerCheckboxSelection:n}=o;let r=!1;const a=typeof s=="object";if(a){const d=isColumnSelectionCol(e),c=isColumnGroupAutoCol(e);(_getCheckboxLocation(s)==="autoGroupColumn"&&c||d&&i.selectionColSvc?.isSelectionColumnEnabled())&&(r=_getHeaderCheckbox(s))}else typeof n=="function"?r=n(_addGridCommonParams(t,{column:e,colDef:o})):r=!!n;const l=a?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=_getSelectAll(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}},BaseSelectionService=class extends BeanStub{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new RowRangeSelectionContext(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=_getIsRowSelectable(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=_getIsRowSelectable(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new CheckboxSelectionComponent}createSelectAllFeature(e){return new SelectAllFeature(e)}isMultiSelect(){return _isMultiRowSelection(this.gos)}onRowCtrlSelected(e,t,i){const s=!!e.rowNode.isSelected();e.forEachGui(i,o=>{o.rowComp.addOrRemoveCssClass("ag-row-selected",s);const n=o.element;_setAriaSelected(n,s),n.contains(_getActiveDomElement(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!_isRowSelection(this.gos)}updateRowSelectable(e,t){const i=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(_getGroupSelectsDescendants(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];let n=o.isSelected();if(!o.selectable){const r=this.calculateSelectedFromChildren(o);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,s="api"){const o=!e.selectable&&t,n=e.__selected===t;if(o||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;return r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({..._createGlobalRowEvent(e,this.gos,"rowSelected"),event:i||null,source:s}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const s=isColumnSelectionCol(e)&&_getCheckboxes(i);return e.isColumnFunc(t,s)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,s){const{gos:o,selectionCtx:n}=this,r=e.isSelected(),a=_getGroupSelectsDescendants(o),l=_getEnableSelection(o),d=_getEnableDeselection(o),c=this.isMultiSelect(),u=s==="rowClicked";if(u&&a&&e.group||u&&!(l||d))return null;if(t&&i&&c){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else{if(i)return n.setRoot(e),u&&r&&!d?null:{node:e,newValue:!r,clearSelection:!c};{n.setRoot(e);const h=_getEnableSelectionWithoutKeys(o),g=_getGroupSelection(o)==="filteredDescendants",p=u&&(!h||!l);if(g&&r===void 0&&_isClientSideRowModel(o))return{node:e,newValue:!1,clearSelection:!c||p};if(u){const f=r?!h:l;return f===r&&!p||f&&!l||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p}}return{node:e,newValue:!r,clearSelection:!c||p}}}}},AgRadioButton=class extends AgCheckbox{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},agToggleButtonCSS='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}',AgToggleButton=class extends AgCheckbox{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(agToggleButtonCSS)}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},AgToggleButtonSelector={selector:"AG-TOGGLE-BUTTON",component:AgToggleButton},AgInputTextField=class extends AgAbstractInputField{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=_exists(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{_isEventFromPrintableCharacter(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{const s=i.clipboardData?.getData("text");s&&s.split("").some(o=>!e.test(o))&&i.preventDefault()}})}},AgInputTextFieldSelector={selector:"AG-INPUT-TEXT-FIELD",component:AgInputTextField},AgInputTextArea=class extends AgAbstractInputField{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},AgInputTextAreaSelector={selector:"AG-INPUT-TEXT-AREA",component:AgInputTextArea},AgInputNumberField=class extends AgInputTextField{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:s,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof s=="number"&&this.setMax(s),typeof o=="number"&&this.setStep(o)}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e),{min:i,max:s}=this;return i!=null&&t<i?e=i.toString():s!=null&&t>s&&(e=s.toString()),e}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const o=parseFloat(e).toFixed(i);return parseFloat(o).toString()}const s=String(e).split(".");if(s.length>1){if(s[1].length<=i)return e;if(i>0)return`${s[0]}.${s[1].slice(0,i)}`}return s[0]}setMin(e){return this.min===e?this:(this.min=e,_addOrRemoveAttribute(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,_addOrRemoveAttribute(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(_exists(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);const o=this.normalizeValue(i);s=i!=o}if(s)return t(i)}return e(i)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},AgInputNumberFieldSelector={selector:"AG-INPUT-NUMBER-FIELD",component:AgInputNumberField};function _padStartWidthZeros(e,t){return e.toString().padStart(t,"0")}function _serialiseDate(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>_padStartWidthZeros(o,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>_padStartWidthZeros(o,2)).join(":")),s}var calculateOrdinal=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function _dateToFormattedString(e,t="YYYY-MM-DD"){const i=_padStartWidthZeros(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>_padStartWidthZeros(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${calculateOrdinal(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${calculateOrdinal(e.getDate())}`,DD:()=>_padStartWidthZeros(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${calculateOrdinal(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(n).join("|"),"g");return t.replace(r,a=>a in n?n[a]():a)}function _parseDateTimeFromString(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(u=>parseInt(u,10));if(s.filter(u=>!isNaN(u)).length!==3)return null;const[o,n,r]=s,a=new Date(o,n-1,r);if(a.getFullYear()!==o||a.getMonth()!==n-1||a.getDate()!==r)return null;if(!i||i==="00:00:00")return a;const[l,d,c]=i.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var AgInputDateField=class extends AgInputTextField{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=_isBrowserSafari();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?_serialiseDate(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,_addOrRemoveAttribute(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?_serialiseDate(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,_addOrRemoveAttribute(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return _parseDateTimeFromString(this.getValue())??void 0}setDate(e,t){this.setValue(_serialiseDate(e??null,!1),t)}},AgInputDateFieldSelector={selector:"AG-INPUT-DATE-FIELD",component:AgInputDateField},SHOW_QUICK_TOOLTIP_DIFF=1e3,FADE_OUT_TOOLTIP_TIMEOUT=1e3,INTERACTIVE_HIDE_DELAY=100,lastTooltipHideTime,isLocked=!1,TooltipStateManager=class extends BeanStub{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!_isIOSUserAgent()&&(isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,i=this.tooltipCtrl.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||isLocked)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-lastTooltipHideTime<SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!_exists(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const i=t.getRowNode?.(),s=_addGridCommonParams(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:i,data:i?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);_getTooltipCompDetails(this.userCompFactory,s)?.newAgStackInstance().then(o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),lastTooltipHideTime=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(_getDocument(this.beans),{keydown:r=>{s.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=_getActiveDomElement(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=this.tooltipTrigger===0?FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},INTERACTIVE_HIDE_DELAY)}unlockService(){isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function _isShowTooltipWhenTruncated(e){return e.get("tooltipShowMode")==="whenTruncated"}function _getShouldDisplayTooltip(e,t){return _isShowTooltipWhenTruncated(e)?_shouldDisplayTooltip(t):void 0}function _shouldDisplayTooltip(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var TooltipFeature=class extends BeanStub{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new TooltipStateManager(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},AgList=class extends Component{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case KeyCode.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}break;case KeyCode.DOWN:case KeyCode.UP:e.preventDefault(),this.navigate(t);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===KeyCode.DOWN;let i;const{itemEls:s,highlightedEl:o}=this;if(!o)i=s[t?0:s.length-1];else{let r=s.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),s.length-1),i=s[r]}this.highlightItem(i)}navigateToPage(e){const{itemEls:t,highlightedEl:i}=this;if(!i||t.length===0)return;const s=t.indexOf(i),o=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===KeyCode.PAGE_HOME?a=0:e===KeyCode.PAGE_END?a=o:e===KeyCode.PAGE_DOWN?a=Math.min(s+r,o):e===KeyCode.PAGE_UP&&(a=Math.max(s-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{_removeFromParent(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();_setAriaRole(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,i)=>{_setAriaPosInSet(t,i+1),_setAriaSetSize(t,e.length)})}renderOption(e,t){const i=_getDocument(this.beans),s=i.createElement("div");_setAriaRole(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const o=i.createElement("span");s.appendChild(o),o.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListeners(s,{mouseover:()=>this.highlightItem(s),mousedown:n=>{n.preventDefault(),n.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(s=>s.value===e);if(i!==-1){const s=this.options[i];this.value=s.value,this.displayValue=s.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!_isVisible(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),_setAriaSelected(e,!0);const t=this.getGui(),{scrollTop:i,clientHeight:s}=t,{offsetTop:o,offsetHeight:n}=e;(o+n>i+s||o<i)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!_isVisible(e)||(e.classList.remove(this.activeClass),_setAriaSelected(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},agPickerFieldCSS=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",AgPickerFieldElement={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},AgPickerField=class extends AgAbstractField{constructor(e){if(super(e,e?.template||AgPickerFieldElement,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eDisplayField=RefPlaceholder,this.eIcon=RefPlaceholder,this.registerCSS(agPickerFieldCSS),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),o!=null&&this.setPickerMinWidth(o),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:s}=this.config;if(i){const o=_createIconNoSpan(i,this.beans);o&&this.eIcon.appendChild(o)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),_setAriaExpanded(e,!1),this.ariaRole&&_setAriaRole(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case KeyCode.UP:case KeyCode.DOWN:case KeyCode.ENTER:case KeyCode.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case KeyCode.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:o=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=_isNothingFocused(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=_formatSize(_getAbsoluteWidth(c)),a&&(e.style.maxWidth=a)):_setElementWidth(e,a??_getAbsoluteWidth(c));const p=n??`${_getInnerHeight(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:s},eWrapper:o,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:o,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();_setAriaExpanded(t,e);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},agSelectCSS=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",AgSelect=class extends AgPickerField{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(agSelectCSS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:_shouldDisplayTooltip(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new AgList("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),_setAriaControls(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:s=>{s?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===KeyCode.TAB&&this.hidePicker(),t){case KeyCode.ENTER:case KeyCode.UP:case KeyCode.DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case KeyCode.ESCAPE:super.onKeyDown(e);break;case KeyCode.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,i){const{listComponent:s,config:{placeholder:o},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!s)return this;if(i||s.setValue(e,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return l==null&&o&&(l=o),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AgSelectSelector={selector:"AG-SELECT",component:AgSelect},TabGuardClassNames={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},TabGuardCtrl=class extends BeanStub{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new ManagedFocusFeature(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():_findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=_getDocument(this.beans),i=_findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let o,n;e?(o=0,n=s):(o=s+1,n=i.length);const r=i.slice(o,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{const c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=_findFocusableElements(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return _findNextFocusableElement(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},TabGuardFeature=class extends BeanStub{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,o=[t,i],n={setTabIndex:m=>{o.forEach(C=>m!=null?C.setAttribute("tabindex",m):C.removeAttribute("tabindex"))}};this.addTabGuards(t,i);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new TabGuardCtrl({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=_getDocument(this.beans).createElement("div"),i=e==="top"?TabGuardClassNames.TAB_GUARD_TOP:TabGuardClassNames.TAB_GUARD_BOTTOM;return t.classList.add(TabGuardClassNames.TAB_GUARD,i),_setAriaRole(t,"presentation"),t}addTabGuards(e,t){const i=this.eFocusableElement;i.insertAdjacentElement("afterbegin",e),i.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];_clearElement(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){_isNodeOrElement(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_removeFromParent(e),_removeFromParent(t),super.destroy()}},TabGuardComp=class extends Component{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new TabGuardFeature(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},PopupComponent=class extends Component{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},TouchListener=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new LocalEventService,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchmove",s,{passive:!0}),e.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",i,{passive:!0}),e.removeEventListener("touchmove",s,{passive:!0}),e.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;const s={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!_areEventsNear(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const i={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(i),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},CellRangeType=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(CellRangeType||{}),VanillaFrameworkOverrides=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${BASE_URL}/${this.frameworkName}-data-grid`,setValidationDocLink(this.baseDocLink)}setInterval(e,t){return new AgPromise(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){let o={};if(typeof s=="object"?o=s:typeof s=="boolean"&&(o={capture:s}),o.passive==null){const n=getPassiveStateForEvent(t);n!=null&&(o.passive=n)}e.addEventListener(t,i,o)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function createGridApi(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var orderedCoreBeans=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],beanNamePosition=Object.fromEntries(orderedCoreBeans.map((e,t)=>[e,t]));function gridBeanInitComparator(e,t){const i=(e.beanName?beanNamePosition[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?beanNamePosition[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-s}function gridBeanDestroyComparator(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var PinnedLeftElement={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},PinnedRightElement={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},CenterElement={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},HeaderRowContainerComp=class extends Component{constructor(e){super(),this.eCenterContainer=RefPlaceholder,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:i=>this.setDisplayed(i),setCtrls:i=>this.setCtrls(i),setCenterWidth:i=>this.eCenterContainer.style.width=i,setViewportScrollLeft:i=>this.getGui().scrollLeft=i,setPinnedContainerWidth:i=>{const s=this.getGui();s.style.width=i,s.style.maxWidth=i,s.style.minWidth=i}};this.createManagedBean(new HeaderRowContainerCtrl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",i=e?PinnedLeftElement:t?PinnedRightElement:CenterElement;this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==RefPlaceholder?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let i;const s=o=>{const n=o.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&_ensureDomOrder(this.eRowContainer,n,i),i=n};e.forEach(o=>{const n=o.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new HeaderRowComp(o));this.headerRowComps[n]=a,this.rowCompsList.push(a),s(a)}),Object.values(t).forEach(o=>this.destroyRowComp(o))}},GridHeaderElement={tag:"div",cls:"ag-header",role:"presentation"},GridHeaderComp=class extends Component{constructor(){super(GridHeaderElement)}postConstruct(){const e={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setHeightAndMinHeight:s=>{this.getGui().style.height=s,this.getGui().style.minHeight=s}};this.createManagedBean(new GridHeaderCtrl).setComp(e,this.getGui(),this.getFocusableElement());const i=s=>{this.createManagedBean(s),this.appendChild(s)};i(new HeaderRowContainerComp("left")),i(new HeaderRowContainerComp(null)),i(new HeaderRowContainerComp("right"))}},GridHeaderSelector={selector:"AG-HEADER-ROOT",component:GridHeaderComp},CellComp=class extends Component{constructor(e,t,i,s,o){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=s;const n=_createElement({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=_createElement({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssClassManager=new CssClassManager(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>_addStylesToElement(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,n,r,this.eCellWrapper,i,o,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&this.eCellWrapper==null;s&&(this.eCellWrapper=_createElement({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const o=!i&&this.eCellWrapper!=null;o&&(_removeFromParent(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!i);const n=!e&&i,r=n&&this.eCellValue==null;r&&(this.eCellValue=_createElement({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!n&&this.eCellValue!=null;a&&(_removeFromParent(this.eCellValue),this.eCellValue=void 0);const l=s||o||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:s,includeDndSource:o,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),i)};s&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),o&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const s=this.editorVersion,o=e.newAgStackInstance(),{params:n}=e;o.then(a=>this.afterCellEditorCreated(s,a,n,t,i)),_missing(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();_clearElement(t);const i=e!=null?_escapeString(e,!0):null;i!=null&&(t.textContent=i)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),_removeFromParent(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(_getActiveDomElement(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),_removeFromParent(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:i}=e,s=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const r=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,i);r?.then(a)},{animationFrameSvc:o}=this.beans;o?.active&&this.firstRender?o.createTask(s,this.rowNode.rowIndex,"p2",e.componentFromFramework):s()}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const o=i.getGui();if(this.cellRendererGui=o,o!=null){const n=this.getParentOfValue();_clearElement(n),n.appendChild(o)}}afterCellEditorCreated(e,t,i,s,o){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){_warn(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=s||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:i}=this;i.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),i.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),i.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(_getActiveDomElement(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),_clearElement(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:s,editSvc:o,popupSvc:n,localeSvc:r}=this.beans;i.get("editType")==="fullRow"&&_warn(98);const a=this.cellEditor;this.cellEditorPopupWrapper=s.createBean(o.createPopupEditorWrapper(e));const l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);const d=i.get("stopEditingWhenCellsLoseFocus"),c=t??a.getPopupPosition?.()??"over",u=i.get("enableRtl"),h={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},g=n.positionPopupByComponent.bind(n,h),p=_getLocaleTextFunc(r),f=n.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:g,ariaLabel:p("ariaLabelCellEditor","Cell Editor")});f&&(this.hideEditorPopup=f.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},RowComp=class extends Component{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const s=_createElement({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(s,i),this.setTemplateFromElement(s);const o=s.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(r,a)=>this.addOrRemoveCssClass(r,a),setUserStyles:r=>_addStylesToElement(s,r),setTop:r=>o.top=r,setTransform:r=>o.transform=r,setRowIndex:r=>s.setAttribute("row-index",r),setRowId:r=>s.setAttribute("row-id",r),setRowBusinessKey:r=>s.setAttribute("row-business-key",r),refreshFullWidth:r=>this.fullWidthCellRenderer?.refresh?.(r())??!1};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){const i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{const s=this.rowCtrl.getInitialRowTop(t);s&&e.style.setProperty("top",s)}}showFullWidth(e){const t=s=>{if(this.isAlive()){const o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s)}else this.beans.context.destroyBean(s)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const s=i.instanceId;this.cellComps.has(s)?t.delete(s):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const i of e){const s=this.cellComps.get(i.instanceId);s&&t.push(s.getGui())}_setDomChildOrder(this.getGui(),t)}newCellComp(e){const t=new CellComp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const i=t.cellCtrl.instanceId;if(this.cellComps.get(i)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(i)}}};function getElementParams(e,t,i){const s=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,o={tag:"div",ref:"eContainer",cls:_getRowContainerClass(e),role:"rowgroup"};if(t.type==="center"||s){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${_getRowSpanContainerClass(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${_getRowViewportClass(e)}`,role:"presentation",children:[o,s?n:null]}}return o}var RowContainerComp=class extends Component{constructor(e){super(),this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.eSpannedContainer=RefPlaceholder,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=_getRowContainerOptions(this.name)}postConstruct(){this.setTemplate(getElementParams(this.name,this.options,this.beans));const e={setHorizontalScroll:i=>this.eViewport.scrollLeft=i,setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setSpannedRowCtrls:i=>this.setRowCtrls(i,!0),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>{this.eContainer.style.width=i,this.eSpannedContainer&&(this.eSpannedContainer.style.width=i)},setOffsetTop:i=>{const s=`translateY(${i})`;this.eContainer.style.transform=s,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=s)}};this.createManagedBean(new RowContainerCtrl(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:i,options:s}=this,o=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new RowComp(l,i,s.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),o),this.addRowNodes(a,o)}addRowNodes(e,t){const{domOrder:i}=this;for(const[s,o]of e){const n=s.getGui();i?this.ensureDomOrder(n,t):o&&t.appendChild(n)}}removeOldRows(e,t){for(const i of e)t.removeChild(i.getGui()),i.destroy()}ensureDomOrder(e,t){_ensureDomOrder(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},RowContainerSelector={selector:"AG-ROW-CONTAINER",component:RowContainerComp};function makeRowContainers(e,t){return t.map(i=>{const s=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[s]={name:i},{tag:"ag-row-container",ref:s,attrs:{name:i}}})}function getGridBodyTemplate(e){const t={},i={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:makeRowContainers(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:makeRowContainers(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:makeRowContainers(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:makeRowContainers(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:makeRowContainers(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var GridBodyComp=class extends Component{constructor(){super(...arguments),this.eGridRoot=RefPlaceholder,this.eBodyViewport=RefPlaceholder,this.eStickyTop=RefPlaceholder,this.eStickyBottom=RefPlaceholder,this.eTop=RefPlaceholder,this.eBottom=RefPlaceholder,this.eBody=RefPlaceholder}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:s,elementParams:o}=getGridBodyTemplate(!!i);this.setTemplate(o,[...i?[i]:[],FakeHScrollSelector,FakeVScrollSelector,GridHeaderSelector,RowContainerSelector],s);const n=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>_setAriaColCount(this.getGui(),a),setRowCount:a=>_setAriaRowCount(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(LayoutCssClasses.AUTO_HEIGHT,l.autoHeight),c.toggle(LayoutCssClasses.NORMAL,l.normal),c.toggle(LayoutCssClasses.PRINT,l.print);this.addOrRemoveCssClass(LayoutCssClasses.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(LayoutCssClasses.NORMAL,l.normal),this.addOrRemoveCssClass(LayoutCssClasses.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL,l),registerBodyViewportResizeListener:a=>{const l=_observeResize(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>_setAriaRole(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new GridBodyCtrl),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&_isCellSelectionEnabled(this.gos)||_isMultiRowSelection(this.gos))&&_setAriaMultiSelectable(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}},GridBodySelector={selector:"AG-GRID-BODY",component:GridBodyComp},GridCtrl=class extends BeanStub{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:s,ctrlsSvc:o}=this.beans;s?.registerGridDropTarget(()=>this.eGui,this),_stampTopLevelGridCompWithGridInstance(this.gos,t),this.createManagedBean(new LayoutFeature(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=_observeResize(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),o.register("gridCtrl",this)}isDetailGrid(){return _findTabbableParent(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;if(s===0){if(i>0){const{visibleCols:o,focusSvc:n}=this.beans,r=o.allCols,a=_last(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),{focusSvc:s,visibleCols:o}=this.beans,n=o.allCols;if(e){if(i.length>1)return this.focusContainer(_last(i),e);const r=_last(n);if(s.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||_isHeaderFocusSuppressed(this.beans)){if(s.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<i.length;r++)if(_focusInto(i[r].getGui(),e))return!0;return!1}return s.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(t,e);if(s===-1||i<0||i>=t.length)return;const o=t[i];o.setAllowFocus?.(!0),setTimeout(()=>{o.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!_isCellFocusSuppressed(e)||!_isHeaderFocusSuppressed(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=_getActiveDomElement(this.beans),s=e.findIndex(n=>n.getGui().contains(i)),o=s+(t?-1:1);return{indexWithFocus:s,nextIndex:o}}focusContainer(e,t){e.setAllowFocus?.(!0);const i=_focusInto(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},GridComp=class extends TabGuardComp{constructor(e){super(),this.gridBody=RefPlaceholder,this.sideBar=RefPlaceholder,this.pagination=RefPlaceholder,this.rootWrapperBody=RefPlaceholder,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new GridCtrl),i=t.getOptionalSelectors(),s=this.createTemplate(i),o=[GridBodySelector,...Object.values(i).filter(n=>!!n)];this.setTemplate(s,o),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),_logIfDebug(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=LayoutCssClasses,{autoHeight:r,normal:a,print:l}=t;i.toggle(s,r),i.toggle(o,a),i.toggle(n,l),this.addOrRemoveCssClass(s,r),this.addOrRemoveCssClass(o,a),this.addOrRemoveCssClass(n,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,i=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,s=e.statusBarSelector?{tag:"ag-status-bar"}:null,o=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},i]},s,n,o]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>_isVisible(t.getGui()))}},mod=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},gridApiFunctionsMap={dispatchEvent:"CommunityCore",...mod("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...mod("GridState",{getState:0}),...mod("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...mod("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...mod("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...mod("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...mod("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...mod("ValueCache",{expireValueCache:0}),...mod("CellApi",{getCellValue:0}),...mod("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...mod("Sort",{onSortChanged:0}),...mod("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...mod("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...mod("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...mod("HighlightChanges",{flashCells:0}),...mod("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...mod("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...mod("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...mod("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...mod("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...mod("ColumnResize",{setColumnWidths:0}),...mod("ColumnHover",{isColumnHovered:0}),...mod("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...mod("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...mod("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...mod("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...mod("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...mod("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...mod("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...mod("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...mod("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...mod("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...mod("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...mod("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...mod("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...mod("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...mod("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...mod("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...mod("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...mod("ContextMenu",{showContextMenu:0}),...mod("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...mod("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...mod("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...mod("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...mod("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...mod("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...mod("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...mod("StatusBar",{getStatusPanel:0})},defaultFns={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},dispatchEvent=(e,t)=>e.eventSvc.dispatchEvent(t),GridApiClass=class{};Reflect.defineProperty(GridApiClass,"name",{value:"GridApi"});var ApiFunctionService=class extends BeanStub{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new GridApiClass,this.fns={...defaultFns,dispatchEvent},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(gridApiFunctionsMap))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:s}=this;i!==defaultFns&&(i[e]=s?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:s}}=this;return s?s(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:s}=this;if(!t)_warn(26,{fnName:e,preDestroyLink:s});else{const o=gridApiFunctionsMap[e];i.assertModuleRegistered(o,`api.${e}`)&&_warn(27,{fnName:e,module:o})}}destroy(){super.destroy(),this.fns=defaultFns,this.beans=null}};function getGridId(e){return e.context.getGridId()}function destroy(e){e.gridDestroySvc.destroy()}function isDestroyed(e){return e.gridDestroySvc.destroyCalled}function getGridOption(e,t){return e.gos.get(t)}function setGridOption(e,t,i){updateGridOptions(e,{[t]:i})}function updateGridOptions(e,t){e.gos.updateGridOptions({options:t})}var DndSourceElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},DndSourceComp=class extends Component{constructor(e,t,i){super(DndSourceElement),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(_createIconNoSpan("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:s,gos:o}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(s,0,0),n){const a=_addGridCommonParams(o,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function addRowDropZone(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function removeRowDropZone(e,t){const i=e.dragAndDrop?.findExternalZone(t);i&&e.dragAndDrop?.removeDropTarget(i)}function getRowDropZoneParams(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}var HorizontalResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},RowDragElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},RowDragComp=class extends Component{constructor(e,t,i,s,o,n){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,rowNode:t,column:i,gos:s}=this;if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(RowDragElement),this.getGui().appendChild(_createIconNoSpan("rowDrag",e,null)),this.addDragSource()),!this.suppressVisibilityChange){const o=s.get("rowDragManaged")?new ManagedVisibilityStrategy(this,t,i):new NonManagedVisibilityStrategy(this,t,i);this.createManagedBean(o,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const i=this.beans.selectionSvc?.getSelectedNodes()??[];return i.indexOf(e)!==-1?i:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:s=>{s?.preventDefault()}})[0]);const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{const s=this.getDragItem(),o=s.rowNodes?.length||1,n=this.getRowDragText(this.column);return n?n(s,o):o===1?this.cellValueFn():`${o} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},VisibilityStrategy=class extends BeanStub{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1;const{column:o,rowNode:n,parent:r}=this;o&&(i=o.isRowDrag(n)||r.isCustomGui(),s=typeof o.getColDef().rowDrag=="function"),s?(r.setDisplayed(!0,t),r.setVisible(i,t)):(r.setDisplayed(i,t),r.setVisible(!0,t))}}},NonManagedVisibilityStrategy=class extends VisibilityStrategy{postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},ManagedVisibilityStrategy=class extends VisibilityStrategy{postConstruct(){const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventSvc,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const{rowDragSvc:e,dragAndDrop:t,gos:i}=this.beans,s=e.rowDragFeature,o=s&&s.shouldPreventRowMove(),n=i.get("suppressRowDrag"),r=t.hasExternalDropZones(),a=o&&!r||n;this.setDisplayedOrVisible(a)}},RowDragService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const i=t.createManagedBean(new RowDragFeature(e)),s=this.beans.dragAndDrop;s.addDropTarget(i),t.addDestroyFunc(()=>s.removeDropTarget(i)),this.rowDragFeature=i}createRowDragComp(e,t,i,s,o,n){return new RowDragComp(e,t,i,s,o,n)}createRowDragCompForRow(e,t){if(_isCellSelectionEnabled(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,s,o,n){const r=this.gos;return r.get("rowDragManaged")&&(!_isClientSideRowModel(r)||r.get("pagination"))?void 0:this.createRowDragComp(i,e,t,s,o,n)}},DragModule={moduleName:"Drag",version:VERSION,beans:[DragService]},DragAndDropModule={moduleName:"DragAndDrop",version:VERSION,dynamicBeans:{dndSourceComp:DndSourceComp},icons:{rowDrag:"grip"}},SharedDragAndDropModule={moduleName:"SharedDragAndDrop",version:VERSION,beans:[DragAndDropService],dependsOn:[DragModule],userComponents:{agDragAndDropImage:DragAndDropImageComponent2},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},RowDragModule={moduleName:"RowDrag",version:VERSION,beans:[RowDragService],apiFunctions:{addRowDropZone,removeRowDropZone,getRowDropZoneParams},dependsOn:[SharedDragAndDropModule]},HorizontalResizeModule={moduleName:"HorizontalResize",version:VERSION,beans:[HorizontalResizeService],dependsOn:[DragModule]},columnMovingCSS=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",ColumnAnimationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:i,executeLaterFuncs:s}=this;if(i.length===0&&s.length===0){e(),t();return}const o=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),o(i)},0),window.setTimeout(()=>{t(),o(s)},200)})}};function moveColumnByIndex(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function moveColumns(e,t,i){e.colMoves?.moveColumns(t,i,"api")}var BodyDropPivotTarget=class extends BeanStub{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function sortColsLikeCols(e,t){!t||t.length<=1||t.filter(s=>e.indexOf(s)<0).length>0||t.sort((s,o)=>{const n=e.indexOf(s),r=e.indexOf(o);return n-r})}function getBestColumnMoveIndexFromXPosition(e){const{isFromHeader:t,fromLeft:i,xPosition:s,fromEnter:o,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const y=[];u.forEach(S=>{let x=null,F=S.getParent();for(;F!=null&&F.getDisplayedLeafColumns().length===1;)x=F,F=F.getParent();x!=null?(!!x.getColGroupDef()?.marryChildren?x.getProvidedColumnGroup().getLeafColumns():x.getLeafColumns()).forEach(D=>{y.includes(D)||y.push(D)}):y.includes(S)||y.push(S)}),u=y}const h=u.slice();sortColsLikeCols(l.getCols(),h);const g=calculateValidMoves({movingCols:h,draggingRight:i,xPosition:s,pinned:r,gos:a,colModel:l,visibleCols:c}),p=calculateOldIndex(h,l);if(g.length===0)return;const f=g[0];let m=p!==null&&!o;if(t&&(m=p!==null),m&&!n&&(!i&&f>=p||i&&f<=p))return;const C=c.allCols,w=[];let v=null;for(let y=0;y<g.length;y++){const S=g[y],x=d.getProposedColumnOrder(h,S);if(!d.doesOrderPassRules(x))continue;const F=x.filter(E=>C.includes(E));if(v===null)v=F;else if(!_areEqual(F,v))break;const R=groupFragCount(x);w.push({move:S,fragCount:R})}if(w.length===0)return;w.sort((y,S)=>y.fragCount-S.fragCount);const b=w[0].move;if(!(b>l.getCols().length-u.length))return{columns:u,toIndex:b}}function attemptMoveColumns(e){const{columns:t,toIndex:i}=getBestColumnMoveIndexFromXPosition(e)||{},{finished:s,colMoves:o}=e;return!t||i==null?null:(o.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i})}function calculateOldIndex(e,t){const i=t.getCols(),s=e.map(l=>i.indexOf(l)).sort((l,d)=>l-d),o=s[0];return _last(s)-o!==s.length-1?null:o}function groupFragCount(e){function t(s){const o=[];let n=s.getOriginalParent();for(;n!=null;)o.push(n),n=n.getOriginalParent();return o}let i=0;for(let s=0;s<e.length-1;s++){let o=t(e[s]),n=t(e[s+1]);[o,n]=o.length>n.length?[o,n]:[n,o],o.forEach(r=>{n.indexOf(r)===-1&&i++})}return i}function getDisplayedColumns(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:o,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(v=>v.getColDef().suppressMovable))return[];const d=getDisplayedColumns(a,o),c=r.getCols(),u=d.filter(v=>t.includes(v)),h=d.filter(v=>!t.includes(v)),g=c.filter(v=>!t.includes(v));let p=0,f=s;if(i){let v=0;u.forEach(b=>v+=b.getActualWidth()),f-=v}if(f>0){for(let v=0;v<h.length;v++){const b=h[v];if(f-=b.getActualWidth(),f<0)break;p++}i&&p++}let m;if(p>0){const v=h[p-1];m=g.indexOf(v)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);const C=[m],w=(v,b)=>v-b;if(i){let v=m+1;const b=c.length-1;for(;v<=b;)C.push(v),v++;C.sort(w)}else{let v=m;const b=c.length-1;let y=c[v];for(;v<=b&&d.indexOf(y)<0;)v++,C.push(v),y=c[v];v=m-1;const S=0;for(;v>=S;)C.push(v),v--;C.sort(w).reverse()}return C}function normaliseX(e){const{pinned:t,fromKeyboard:i,gos:s,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=e;let a=o.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(i&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=o.get("center").getCenterViewportScrollLeft()),l):0}function setColumnsMoving(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var MOVE_FAIL_THRESHOLD=7,SCROLL_MOVE_WIDTH=100,SCROLL_GAP_NEEDED_BEFORE_MOVE=SCROLL_MOVE_WIDTH/2,SCROLL_ACCELERATION_RATE=5,SCROLL_TIME_INTERVAL=100,MoveColumnFeature=class extends BeanStub{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!_exists(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,i=t?.dragItem.columns??[];for(const s of i){const o=s.getPinned();if(s.getColDef().lockPinned){if(o==e)return"move";continue}if(o===e||!e)return"move";if(!o&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const o=t.visibleState,n=(i||[]).filter(r=>o[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){const{gos:o,ctrlsSvc:n}=this.beans,r=o.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&_missing(e.hDirection))return;const a=normaliseX({x:e.x,pinned:this.pinned,gos:o,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,s):this.handleColumnDragWhileAllowingMovement(e,t,i,a,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;const s=e.filter(o=>!o.getColDef().lockVisible);this.beans.colModel.setColsVisible(s,t,i)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:i}=e;this.beans.colMoves.moveColumns(t,i,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,s,o){const n=this.getAllMovingColumns(e,!0);if(o){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:i,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,o){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:s,fromLeft:r,fromEnter:t,fakeEvent:i}),d=attemptMoveColumns({...l,finished:o});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let s=null;t?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns;const o=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return s?s.filter(o):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:o,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:o,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:i,colModel:s}=this.beans,o=i.get("enableRtl"),n=s.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,a=null,l=null;for(const c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,o),r!=null){const u=r+a;if(r<=t&&u>=t){l=c;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=_last(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,o),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==o?d=0:d=1,setColumnHighlighted(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:s}=this.beans,o=i.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,o);if(!n||!r||a==null)return;const l=s.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==o,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=l[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,o);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){const s=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=findFirstAndLastMovingColumns(e);if(!o||!n||s.column||!t)return{firstMovingCol:o,...s};const a=this.getPinDirection()==="left";return{firstMovingCol:o,position:a?1:0,column:a!==i?o:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,i){const{gos:s,ctrlsSvc:o}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return normaliseX({x:i?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsSvc:o})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>MOVE_FAIL_THRESHOLD;return t&&i||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:o,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:s,fakeEvent:o}),{columns:a,toIndex:l}=getBestColumnMoveIndexFromXPosition(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(setColumnHighlighted(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();let o,n;this.gos.get("enableRtl")?(o=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,n=e>s-SCROLL_GAP_NEEDED_BEFORE_MOVE):(n=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,o=e>s-SCROLL_GAP_NEEDED_BEFORE_MOVE),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),SCROLL_TIME_INTERVAL),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*SCROLL_ACCELERATION_RATE,e>SCROLL_MOVE_WIDTH&&(e=SCROLL_MOVE_WIDTH);let t=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:s,dragAndDrop:o,gos:n}=this.beans;if(this.failedMoveAttempts<=MOVE_FAIL_THRESHOLD+1||!s)return;if(o.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const s=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!s.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(s,t,"uiColumnDragged"),i&&n.nudge(),s.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function setColumnHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function findFirstAndLastMovingColumns(e){const t=e.length;let i,s;for(let o=0;o<t;o++){if(!i){const n=e[o];n.getLeft()!=null&&(i=n)}if(!s){const n=e[t-1-o];n.getLeft()!=null&&(s=n)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}var BodyDropTarget=class extends BeanStub{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,s=>{let o;const n=s.gridBodyCtrl.eBodyViewport;switch(i){case"left":o=[[n,s.left.eContainer],[s.bottomLeft.eContainer],[s.topLeft.eContainer]];break;case"right":o=[[n,s.right.eContainer],[s.bottomRight.eContainer],[s.topRight.eContainer]];break;default:o=[[n,s.center.eViewport],[s.bottomCenter.eViewport],[s.topCenter.eViewport]];break}this.eSecondaryContainers=o}),this.moveColumnFeature=this.createManagedBean(new MoveColumnFeature(i)),this.bodyDropPivotTarget=this.createManagedBean(new BodyDropPivotTarget(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},ColumnMoveService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const s=this.beans.colModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const{colModel:o,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=o.getCols();if(!l)return;if(t>l.length-e.length){_warn(30,{toIndex:t});return}n?.start();const d=o.getColsForKeys(e);this.doesMovePassRules(d,t)&&(_moveInArray(o.getCols(),d,t),r.refresh(i),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:s,source:i})),n?.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(!doesMovePassMarryChildren(e,t.getColTree())||!(o=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=i.get("enableRtl");let a=r?1:-1,l=!0;return o.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const s=this.beans.colModel.getCols().slice();return _moveInArray(s,e,t),s}createBodyDropTarget(e,t){return new BodyDropTarget(e,t)}moveHeader(e,t,i,s,o){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=isColumnGroup2(i),g=h?c.width:i.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=normaliseX({x:p?u-20:u+g+20,pinned:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;attemptMoveColumns({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:s,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let C;if(h){const w=i.getDisplayedLeafColumns();C=p?w[0]:_last(w)}else C=i;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&m){let w;if(h){const v=i.getGroupId(),b=i.getLeafColumns();if(!b.length)return;const y=b[0].getParent();if(!y)return;w=findGroupWidthId(y,v)}else w=i;w&&d.focusHeaderPosition({headerPosition:{...m,column:w}})}}setDragSourceForHeader(e,t,i){const{gos:s,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans;let a=!s.get("suppressDragLeaveHidesColumns");const l=isColumnGroup2(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>createDragItemForGroup(t,r.allCols):()=>createDragItem(t),dragItemName:i,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),setColumnsMoving(d,!0)},onDragStopped:()=>setColumnsMoving(d,!1),onDragCancelled:()=>setColumnsMoving(d,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:p}=h??{},f=l?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));o.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];o.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function createDragItemForGroup(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),s={};i.forEach(a=>s[a.getId()]=a.isVisible());const o=[];t.forEach(a=>{i.indexOf(a)>=0&&(o.push(a),_removeFromArray(i,a))}),i.forEach(a=>o.push(a));const n=[],r=e.getLeafColumns();for(const a of o)r.indexOf(a)!==-1&&n.push(a);return{columns:o,columnsInSplit:n,visibleState:s}}var ColumnMoveModule={moduleName:"ColumnMove",version:VERSION,beans:[ColumnMoveService,ColumnAnimationService],apiFunctions:{moveColumnByIndex,moveColumns},dependsOn:[SharedDragAndDropModule],css:[columnMovingCSS]},AutoWidthCalculator=class extends BeanStub{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||s.push(i),this.getPreferredWidthForElements(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=document.createElement("form");i.style.position="fixed";const s=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,i)),s.appendChild(i);const o=i.offsetWidth;return s.removeChild(i),t=t??this.gos.get("autoSizePadding"),o+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(i=>{const s=i.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(a=>i.classList.contains(a))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const d=r.classList[l];d!="ag-row-position-absolute"&&o.add(d)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}},AutoWidthModule={moduleName:"AutoWidth",version:VERSION,beans:[AutoWidthCalculator]};function setColumnWidths(e,t,i=!0,s="api"){e.colResize?.setColumnWidths(t,!1,i,s)}var GroupResizeFeature=class extends BeanStub{constructor(e,t,i,s){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,s=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const s=this.normaliseDragChange(t),o=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(o,i,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),i=(l,d)=>l.map(c=>c.getActualWidth()/d),s=this.getColumnsToResize(),o=t(s),n=i(s,o),r={columnsToResize:s,resizeStartWidth:o,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=r.groupAfterColumns=l.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=i(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(s,e,t,i)}resizeColumns(e,t,i,s=!0){const{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:o,ratios:r,width:t}),a){const u=t-n;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},ResizeFeature=class extends BeanStub{constructor(e,t,i,s,o){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=o}postConstruct(){const e=[];let t,i;const s=()=>{if(_setDisplayed(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),i&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},o=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==i)&&(t=r,i=a,o(),s())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(t),a=o+r,l=[{key:i,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=_getInnerWidth(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-s)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},ColumnResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,s){const o=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{const d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(o.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;o.push({width:g,ratios:[1],columns:[u]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(c=>checkMinAndMaxWidthsForSet(c)))){if(i){const c=t&&t.length>0?t[0].columns:null;dispatchColumnResizedEvent(this.eventSvc,c,i,s)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let m=!0,C=0;for(;m;){if(C++,C>1e3){_error(31);break}m=!1;const w=[];let v=0,b=u;h.forEach((S,x)=>{if(f[S.getId()])b-=p[S.getId()];else{w.push(S);const R=g[x];v+=R}});const y=1/v;w.forEach((S,x)=>{const F=x===w.length-1;let R;F?R=b:(R=Math.round(g[x]*u*y),b-=R);const E=S.getMinWidth(),D=S.getMaxWidth();R<E?(R=E,f[S.getId()]=!0,m=!0):D>0&&R>D&&(R=D,f[S.getId()]=!0,m=!0),p[S.getId()]=R})}h.forEach(w=>{const v=p[w.getId()];w.getActualWidth()!==v&&(w.setActualWidth(v,s),n.push(w))})});const a=n.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(s),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(l);(a||i)&&dispatchColumnResizedEvent(this.eventSvc,d,i,s,l)}resizeHeader(e,t,i){if(!e.isResizable())return;const s=e.getActualWidth(),o=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(s+t,o),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,s,o){return new ResizeFeature(e,t,i,s,o)}createGroupResizeFeature(e,t,i,s){return new GroupResizeFeature(e,t,i,s)}};function checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,n=!0;t.forEach(l=>{const d=l.getMinWidth();s+=d||0;const c=l.getMaxWidth();c>0?o+=c:n=!1});const r=i>=s,a=!n||i<=o;return r&&a}var ColumnResizeModule={moduleName:"ColumnResize",version:VERSION,beans:[ColumnResizeService],apiFunctions:{setColumnWidths},dependsOn:[HorizontalResizeModule,AutoWidthModule]},GroupWidthFeature=class extends BeanStub{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},HeaderGroupCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,i,s,o){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,o=setupCompBean(this,a,o),this.setGui(t,o),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.setupAutoHeight({wrapperElement:s,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(o,g,t),c?.createRangeHighlightFeature(o,n,e),o.createManagedBean(new SetLeftFeature(n,t,r)),o.createManagedBean(new GroupWidthFeature(e,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),o.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,g),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return _addGridCommonParams(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=_last(t)===e;if(!i&&!s)return;const o=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),d=o===1,c=o===0;i&&(l?a=d:r=c),s&&(l?r=c:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const s=i.getInitialValues(t);i.resizeColumns(s,s.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:i}=this.beans,s=_addGridCommonParams(i,{displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}}),o=_getHeaderGroupCompDetails(t,s);o&&this.comp.setUserCompDetails(o)}addHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=_getHeaderClassesFromColDef(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(o=>o.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text")),i.forEach(s=>this.comp.addOrRemoveCssClass(s,!0))}setupMovingCss(e){const{column:t}=this,s=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());s.forEach(n=>{e.addManagedListeners(n,{movingChanged:o})}),o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===KeyCode.ENTER){const i=this.column,s=!i.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function setColumnGroupOpened(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")}function getColumnGroup(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null}function getProvidedColumnGroup(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function getDisplayNameForColumnGroup(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function getColumnGroupState(e){return e.colGroupSvc?.getColumnGroupState()??[]}function setColumnGroupState(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function resetColumnGroupState(e){e.colGroupSvc?.resetColumnGroupState("api")}function getLeftDisplayedColumnGroups(e){return e.visibleCols.treeLeft}function getCenterDisplayedColumnGroups(e){return e.visibleCols.treeCenter}function getRightDisplayedColumnGroups(e){return e.visibleCols.treeRight}function getAllDisplayedColumnGroups(e){return e.visibleCols.getAllTrees()}function _removeAllFromUnorderedArray(e,t){for(let i=0;i<t.length;i++){const s=e.indexOf(t[i]);s>=0&&(e[s]=e[e.length-1],e.pop())}}var VisibleColsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:i,colGroupSvc:s,colViewport:o}=this.beans;t||this.buildTrees(i,s),s?.updateOpenClosedVisibility();const n=pickDisplayedCols(this.treeLeft);this.leftCols=n,this.centerCols=pickDisplayedCols(this.treeCenter);const r=pickDisplayedCols(this.treeRight);this.rightCols=r,this.joinColsAriaOrder(i),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),o.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(i,n,r,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=getWidthOfColsInList(this.centerCols),t=getWidthOfColsInList(this.leftCols),i=getWidthOfColsInList(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,i,s){let o,n;this.gos.get("enableRtl")?(o=t?t[0]:null,n=i?_last(i):null):(o=t?_last(t):null,n=i?i[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===o,s),r.setFirstRightPinned(r===n,s)})}buildTrees(e,t){const i=e.getColsToShow(),s=i.filter(l=>l.getPinned()=="left"),o=i.filter(l=>l.getPinned()=="right"),n=i.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new GroupInstanceIdCreator,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:o,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),i=[],s=[],o=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?i.push(n):o.push(n):s.push(n)}this.ariaOrderColumns=i.concat(s).concat(o)}getAriaColIndex(e){let t;return isColumnGroup2(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{isColumnGroup2(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const s=t.getCols().slice(0),o=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(o){let r=getWidthOfColsInList(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}_removeAllFromUnorderedArray(s,n)}),s.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,i,s){const o=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;i?(u=!1,c.forEach(h=>{i(h)&&(u=!0)})):u=!0,u&&(o.length===0&&n&&(s&&s(a))&&o.push(n),o.push(a)),n=a}return o}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,i=t.indexOf(e);return i>0?t[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};depthFirstAllColumnTreeSearch(this.treeCenter,!1,e),depthFirstAllColumnTreeSearch(this.treeLeft,!1,e),depthFirstAllColumnTreeSearch(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]];if(s.length)return e?_last(s):s[0]}return null}getColAfter(e){const t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return getWidthOfColsInList(this.leftCols)}getDisplayedColumnsRightWidth(){return getWidthOfColsInList(this.rightCols)}isColAtEdge(e,t){const i=this.allCols;if(!i.length)return!1;const s=t==="first";let o;if(isColumnGroup2(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=s?n[0]:_last(n)}else o=e;return(s?i[0]:_last(i))===o}};function depthFirstAllColumnTreeSearch(e,t,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];if(isColumnGroup2(o)){const n=t?o.getDisplayedChildren():o.getChildren();depthFirstAllColumnTreeSearch(n,t,i)}i(o)}}function pickDisplayedCols(e){const t=[];return depthFirstAllColumnTreeSearch(e,!0,i=>{isColumn(i)&&t.push(i)}),t}var ColumnGroupService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return depthFirstOriginalTreeSearch(null,t,i=>{isProvidedColumnGroup(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const i=[];depthFirstOriginalTreeSearch(null,t,s=>{if(isProvidedColumnGroup(s)){const o=s.getColGroupDef(),n={groupId:s.getGroupId(),open:o?o.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){const{colModel:i,colAnimation:s,visibleCols:o,eventSvc:n}=this.beans;if(!i.getColTree().length)return;s?.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),o.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),s?.finish()}setColumnGroupOpened(e,t,i){let s;isProvidedColumnGroup(e)?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){let t=null;return depthFirstOriginalTreeSearch(null,this.beans.colModel.getColTree(),i=>{isProvidedColumnGroup(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?_last(s):s[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](o);if(!r)return null;const a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),s,o;for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();depthFirstAllColumnTreeSearch(e,!1,t=>{isColumnGroup2(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(isColumnGroup2(e))return e;const i=this.beans.visibleCols.getAllTrees(),s=typeof t=="number";let o=null;return depthFirstAllColumnTreeSearch(i,!1,n=>{if(isColumnGroup2(n)){const r=n;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(o=r)}}),o}createColumnGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],m=(isColumnGroup2(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let w=g;w<h;w++)a.push(d[w]);return}const C=this.createColumnGroup(m,i,r,s,n);for(let w=g;w<h;w++)C.addChild(d[w]);l.push(C)};for(let h=1;h<d.length;h++){const g=d[h],f=(isColumnGroup2(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c],w=(isColumnGroup2(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,i,s,o,n,r){const a=o.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new AgProvidedColumnGroup(l,a,!1,i);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=_recursivelyCreateColumns(this.beans,l.children,i+1,e,s,o,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,i,s){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(isProvidedColumnGroup(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,i,s);a.setChildren(l),o.push(a)}else{let a,l;for(let d=i-1;d>=t;d--){const c=s.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),h=new AgProvidedColumnGroup(u,c,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(o.push(a),e.some(c=>isProvidedColumnGroup(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}o.push(r)}}return o}findDepth(e){let t=0,i=e;for(;i&&i[0]&&isProvidedColumnGroup(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let s=0;s<e.length;s++){const o=e[s];if(isProvidedColumnGroup(o)){const n=o,r=this.findMaxDepth(n.getChildren(),t+1);i<r&&(i=r)}}return i}balanceTreeForAutoCols(e,t){const i=[];return e.forEach(s=>{let o=s;for(let n=t-1;n>=0;n--){const r=new AgProvidedColumnGroup(null,`FAKE_PATH_${s.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([o]),o.originalParent=r,o=r}t===0&&(s.originalParent=null),i.push(o)}),i}createMergedColGroupDef(e,t){const i={},{gos:s,validation:o}=this.beans;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,e),o?.validateColDef(i,t),i}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const o=t[s];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:s,group:o}}}createColumnGroup(e,t,i,s,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=createUniqueColumnGroupId(n,r);let l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),_exists(l)?l.reset():(l=new AgColumnGroup(e,n,r,s),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(o=>{if(isColumnGroup2(o)){const n=o;t[o.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.parent=t,isColumnGroup2(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}},ColumnGroupModule={moduleName:"ColumnGroup",version:VERSION,dynamicBeans:{headerGroupCellCtrl:HeaderGroupCellCtrl},beans:[ColumnGroupService],apiFunctions:{getAllDisplayedColumnGroups,getCenterDisplayedColumnGroups,getColumnGroup,getColumnGroupState,getDisplayNameForColumnGroup,getLeftDisplayedColumnGroups,getProvidedColumnGroup,getRightDisplayedColumnGroups,resetColumnGroupState,setColumnGroupOpened,setColumnGroupState}},CheckboxCellRendererModule={moduleName:"CheckboxCellRenderer",version:VERSION,userComponents:{agCheckboxCellRenderer:CheckboxCellRenderer}};function getColumnDef(e,t){const i=e.colModel.getColDefCol(t);return i?i.getColDef():null}function getColumnDefs(e){return e.colModel.getColumnDefs()}function getDisplayNameForColumn(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function getColumn(e,t){return e.colModel.getColDefCol(t)}function getColumns(e){return e.colModel.getColDefCols()}function applyColumnState(e,t){return _applyColumnState(e,t,"api")}function getColumnState(e){return _getColumnState(e)}function resetColumnState(e){_resetColumnState(e,"api")}function isPinning(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function isPinningLeft(e){return e.visibleCols.isPinningLeft()}function isPinningRight(e){return e.visibleCols.isPinningRight()}function getDisplayedColAfter(e,t){return e.visibleCols.getColAfter(t)}function getDisplayedColBefore(e,t){return e.visibleCols.getColBefore(t)}function setColumnsVisible(e,t,i){e.colModel.setColsVisible(t,i,"api")}function setColumnsPinned(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function getAllGridColumns(e){return e.colModel.getCols()}function getDisplayedLeftColumns(e){return e.visibleCols.leftCols}function getDisplayedCenterColumns(e){return e.visibleCols.centerCols}function getDisplayedRightColumns(e){return e.visibleCols.rightCols}function getAllDisplayedColumns(e){return e.visibleCols.allCols}function getAllDisplayedVirtualColumns(e){return e.colViewport.getViewportColumns()}function _deepCloneDefinition(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||SKIP_JS_BUILTINS.has(o))return;const n=i[o];typeof n=="object"&&n!==null&&n.constructor===Object?s[o]=_deepCloneDefinition(n):s[o]=n}),s}var ColumnDefFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,s){const o=e.slice();t?o.sort((a,l)=>i.indexOf(a)-i.indexOf(l)):i&&o.sort((a,l)=>s.indexOf(a)-s.indexOf(l));const n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,n,r)}buildColumnDefs(e,t=[],i=[]){const s=[],o={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,i);let a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=o[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],o[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&s.push(l)}),s}createDefFromGroup(e){const t=_deepCloneDefinition(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=_deepCloneDefinition(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},ColumnFlexService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth;if(!i)return[];const{visibleCols:s}=this.beans,o=s.centerCols;let n=-1;if(e.resizingCols){const p=new Set(e.resizingCols);for(let f=o.length-1;f>=0;f--)if(p.has(o[f])){n=f;break}}let r=!1;const a=o.map((p,f)=>{const m=p.getFlex(),C=m!=null&&m>0&&f>n;return r||(r=C),{col:p,isFlex:C,flex:Math.max(0,m??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((p,f)=>p+f.flex,0),c=i;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,l-=1},h=p=>p.frozenSize!=null;for(const p of a)p.isFlex||u(p,p.initialSize);for(;l>0;){const p=Math.round(d<1?c*d:c);let f,m=0,C=0;for(const b of a){if(h(b))continue;f=b,C+=p*(b.flex/d);const y=C-m,S=Math.round(y);b.targetSize=S,m+=S}f&&(f.targetSize+=p-m);let w=0;for(const b of a){if(h(b))continue;const y=b.targetSize,S=Math.min(Math.max(y,b.min),b.max);w+=S-y,b.violationType=S===y?void 0:S<y?"max":"min",b.targetSize=S}const v=w===0?"all":w>0?"min":"max";for(const b of a)h(b)||(v==="all"||b.violationType===v)&&u(b,b.targetSize)}e.skipSetLeft||s.setLeftValues(t),e.updateBodyWidths&&s.updateBodyWidths();const g=a.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=a.filter(m=>m.initialSize!==m.frozenSize).map(m=>m.col),f=a.filter(m=>m.flex).map(m=>m.col);dispatchColumnResizedEvent(this.eventSvc,p,!0,t,f)}return g}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},DataTypeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const i={};this.formatValueFuncs=i;const s=r=>a=>{const{column:l,node:d,value:c}=a;let u=l.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(const r of Object.keys(e)){const a=e[r],l={...a,groupSafeValueFormatter:createGroupSafeValueFormatter(a,this.gos)};t[r]=l,i[r]=s(l)}const o=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(const r of Object.keys(o)){const a=o[r],l=this.processDataTypeDefinition(a,o,[r],e);l&&(t[r]=l,a.dataTypeMatcher&&(n[r]=a.dataTypeMatcher),i[r]=s(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{const a=n[r];a&&delete n[r],n[r]=a??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,i,s){let o;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[n];const a=t[n];if(r&&a&&(r=a),!validateDataTypeDefinition(e,r,n))return;o=mergeDataTypeDefinitions(r,e)}else{if(i.includes(n)){_warn(44);return}const r=t[n];if(!validateDataTypeDefinition(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...i,n],s);if(!a)return;o=mergeDataTypeDefinitions(a,e)}return{...o,groupSafeValueFormatter:createGroupSafeValueFormatter(o,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t;const{field:o}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(o,i):!1),!s){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[s];if(!n){_warn(47,{cellDataType:s});return}return e.cellDataType=s,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,n,i),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!_isClientSideRowModel(i))return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(doColDefPropsPreventInference(t,s))return!1;const o=t.type===null?e.type:t.type;if(o){const n=i.get("columnTypes")??{};if(convertColumnTypes(o).some(a=>{const l=n[a.trim()];return l&&doColDefPropsPreventInference(l,s)}))return!1}return!doColDefPropsPreventInference(e,s)}inferCellDataType(e,t){if(!e)return;let i;const s=this.getInitialData();if(s){const o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=_getValueUsingField(s,e,o)}else this.initWaitForRowData(t);if(i!=null)return Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](i))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:s}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[o]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const s={},o={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=getUpdatedColumnState(a,r);c.rowGroup&&c.rowGroupIndex==null&&(s[n]=c),c.pivot&&c.pivotIndex==null&&(o[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&_applyColumnState(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},{rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;return s?.restoreColumnOrder(i,e),o?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=_addColumnDefaultAndTypes(this.beans,i,e.getColId());return e.setColDef(s,i,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return i?i(t):!0}validateColDef(e){const t=i=>_warn(48,{property:i});if(e.cellDataType==="object"){const{object:i}=this.dataTypeDefinitions;e.valueFormatter===i.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,s){const o=this.formatValueFuncs[t];switch(i.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===KeyCode.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=o;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=o;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{const a=this.colModel.getColDefCol(s),l=a?.getColDef();if(!a||!l)return 0;const d=n==null?"":o({column:a,node:null,value:n}),c=r==null?"":o({column:a,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=o;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,i,o)}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>i.newValue?.trim?.()===""?null:Number(i.newValue),valueFormatter:i=>i.value==null?"":typeof i.value!="number"||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>typeof i=="number"},text:{baseDataType:"text",valueParser:i=>i.newValue===""?null:_toStringOrNull(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>i.newValue==null?i.newValue:i.newValue?.trim?.()===""?null:String(i.newValue).toLowerCase()==="true",valueFormatter:i=>i.value==null?"":String(i.value),dataTypeMatcher:i=>typeof i=="boolean"},date:{baseDataType:"date",valueParser:i=>_parseDateTimeFromString(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):_serialiseDate(i.value,!1)??"",dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>_parseDateTimeFromString(i)??void 0,dateFormatter:i=>_serialiseDate(i??null,!1)??void 0,valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>typeof i=="string"&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>_toStringOrNull(i.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function mergeDataTypeDefinitions(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...convertColumnTypes(e.columnTypes),...convertColumnTypes(t.columnTypes)]),i}function validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(_warn(46),!1):!0:(_warn(45,{parentCellDataType:i}),!1)}function createGroupSafeValueFormatter(e,t){if(e.valueFormatter)return i=>{if(i.node?.group){const s=(i.colDef.pivotValueColumn??i.column).getAggFunc();if(s){if(s==="first"||s==="last")return e.valueFormatter(i);if(e.baseDataType==="number"&&s!=="count"){if(typeof i.value=="number")return e.valueFormatter(i);if(typeof i.value=="object"){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter({...i,value:i.value.toNumber()});if("value"in i.value)return e.valueFormatter({...i,value:i.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const o=e[i];return o===null?(t[i]=!1,!1):s===void 0?!!o:o===s}function doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>doesColDefPropPreventInference(e,t,i,s))}function getUpdatedColumnState(e,t){const i=getColumnStateFromColDef(e);return t.forEach(s=>{delete i[s],s==="rowGroup"?delete i.rowGroupIndex:s==="pivot"&&delete i.pivotIndex}),i}var DataTypeModule={moduleName:"DataType",version:VERSION,beans:[DataTypeService],dependsOn:[CheckboxCellRendererModule]},ColumnFlexModule={moduleName:"ColumnFlex",version:VERSION,beans:[ColumnFlexService]},ColumnApiModule={moduleName:"ColumnApi",version:VERSION,beans:[ColumnDefFactory],apiFunctions:{getColumnDef,getDisplayNameForColumn,getColumn,getColumns,applyColumnState,getColumnState,resetColumnState,isPinning,isPinningLeft,isPinningRight,getDisplayedColAfter,getDisplayedColBefore,setColumnsVisible,setColumnsPinned,getAllGridColumns,getDisplayedLeftColumns,getDisplayedCenterColumns,getDisplayedRightColumns,getAllDisplayedColumns,getAllDisplayedVirtualColumns,getColumnDefs}};function _camelCaseToHumanText(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var ColumnNameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:o}=this.beans;return i&&o?o.getHeaderName(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?.getColGroupDef();return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const n=e.headerValueGetter;if(n){const r=_addGridCommonParams(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return _camelCaseToHumanText(e.field)}return""}},ColumnViewportService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){const{visibleCols:s}=this,o=s.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!o)){if(this.scrollWidth=e,this.scrollPosition=t,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=s.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||isAnyParentAutoHeaderHeight(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200,n=t<s&&i<s,r=t>o&&i>o;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return _exists(r)&&r>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this,o=s.centerCols;return s.getColsForRow(e,o,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:i,treeLeft:s,treeRight:o,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(i).forEach(l=>e[l.getId()]=!0);const a=(l,d,c)=>{let u=!1;for(let h=0;h<l.length;h++){const g=l[h];let p=!1;if(isColumn(g))p=e[g.getId()]===!0;else{const m=g.getDisplayedChildren();m&&(p=a(m,d,c+1))}p&&(u=!0,d[c]||(d[c]=[]),d[c].push(g))}return u};a(s,this.rowsOfHeadersToRenderLeft,0),a(o,this.rowsOfHeadersToRenderRight,0),a(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var AgComponentUtils=class extends BeanStub{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(o){const n=t(o),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=_loadTemplate("<span>"+n+"</span>");return}if(n==null){this.eGui=_createElement({tag:"span"});return}this.eGui=n}}return i}},CellRendererFunctionModule={moduleName:"CellRendererFunction",version:VERSION,beans:[AgComponentUtils]},Registry=class extends BeanStub{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:s,selectors:o}=e;if(i){const n=(r,a,l)=>{this.agGridDefaults[r]=a,l&&(this.agGridDefaultParams[r]=l)};for(const r of Object.keys(i)){const a=i[r];typeof a=="object"?n(r,a.classImp,a.params):n(r,a)}}if(s)for(const n of Object.keys(s))this.dynamicBeans[n]=s[n];if(o?.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const i=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:s}=this.beans,o=s.frameworkComponent(t,this.gos.get("components"));if(o!=null)return i(o,!0);const n=this.jsComps[t];if(n){const a=s.isFrameworkComponent(n);return i(n,a)}const r=this.agGridDefaults[t];return r?i(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...i){const s=this.dynamicBeans[e];if(s==null){if(t)throw new Error(_errMsg(256));return}return new s(...i)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},NUM_CTRLS=23,CtrlsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===NUM_CTRLS&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},coreCSS=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',IS_SSR=typeof window!="object"||!window?.document?.fonts?.forEach,injectionsByContainer=new WeakMap,_injectGlobalCSS=(e,t,i,s,o,n)=>{if(IS_SSR||FORCE_LEGACY_THEMES)return;s&&(e=`@layer ${CSS.escape(s)} { ${e} }`);let r=injectionsByContainer.get(t);if(r||(r=[],injectionsByContainer.set(t,r)),r.find(c=>c.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=i,a.textContent=e;const l={css:e,el:a,priority:o};let d;for(const c of r){if(c.priority>o)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);const c=r.indexOf(d);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},_injectCoreAndModuleCSS=(e,t,i)=>{_injectGlobalCSS(coreCSS,e,"core",t,0,i),Array.from(_getAllRegisteredModules()).sort((s,o)=>s.moduleName.localeCompare(o.moduleName)).forEach(s=>s.css?.forEach(o=>_injectGlobalCSS(o,e,`module-${s.moduleName}`,t,0,i)))},gridsUsingThemingAPI=new Set,_registerGridUsingThemingAPI=e=>{gridsUsingThemingAPI.add(e)},_unregisterGridUsingThemingAPI=e=>{if(gridsUsingThemingAPI.delete(e),gridsUsingThemingAPI.size===0){injectionsByContainer=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},createPart=e=>new PartImpl(e),defaultModeName="$default",partCounter=0,PartImpl=class{constructor({feature:e,params:t,modeParams:i={},css:s,cssImports:o}){this.feature=e,this.css=s,this.cssImports=o,this.modeParams={[defaultModeName]:{...i[defaultModeName]??{},...t??{}},...i}}use(e,t,i){let s=this._inject;if(s==null){let{css:o}=this;if(o){const n=`ag-theme-${this.feature??"part"}-${++partCounter}`;typeof o=="function"&&(o=o()),o=`:where(.${n}) {
13
10
  ${o}
14
11
  }
15
12
  `;for(const r of this.cssImports??[])o=`@import url(${JSON.stringify(r)});
@@ -25,7 +22,7 @@ ${n}}
25
22
  `,this._paramsCssCache=s=a}return s.replaceAll(i,`:where(.${t})`)}},deduplicatePartsByFeature=e=>{const t=new Map;for(const s of e)t.set(s.feature,s);const i=[];for(const s of e)(!s.feature||t.get(s.feature)===s)&&i.push(s);return i},getGoogleFontsUsed=e=>{const t=new Set,i=n=>{if(Array.isArray(n))n.forEach(i);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(i),Array.from(t).sort()},uninstalledLegacyCSS=!1,uninstallLegacyCSS=()=>{if(!uninstalledLegacyCSS){uninstalledLegacyCSS=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},googleFontsLoaded=new Set,loadGoogleFont=async(e,t)=>{googleFontsLoaded.add(e);const i=`@import url('https://${googleFontsDomain}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
26
23
  `;_injectGlobalCSS(i,document.head,`googleFont:${e}`,void 0,0,t)},googleFontsDomain="fonts.googleapis.com",checkboxStyleDefaultCSS='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',makeCheckboxStyleDefaultTreeShakeable=()=>createPart({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.3),checkboxCheckedBackgroundColor:accentColor,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:backgroundColor,checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:backgroundColor,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:checkboxStyleDefaultCSS}),checkboxStyleDefault=makeCheckboxStyleDefaultTreeShakeable(),makeColorSchemeLightTreeShakeable=()=>createPart({feature:"colorScheme",params:defaultLightColorSchemeParams}),colorSchemeLight=makeColorSchemeLightTreeShakeable(),makeColorSchemeLightWarmTreeShakeable=()=>createPart({feature:"colorScheme",params:{...defaultLightColorSchemeParams,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),colorSchemeLightWarm=makeColorSchemeLightWarmTreeShakeable(),makeColorSchemeLightColdTreeShakeable=()=>createPart({feature:"colorScheme",params:{...defaultLightColorSchemeParams,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),colorSchemeLightCold=makeColorSchemeLightColdTreeShakeable(),darkParams=()=>({...defaultLightColorSchemeParams,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:foregroundBackgroundMix(.05),rowHoverColor:accentMix(.15),selectedRowBackgroundColor:accentMix(.2),menuBackgroundColor:foregroundBackgroundMix(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:backgroundColor,findActiveMatchColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.4),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.4)}),makeColorSchemeDarkTreeShakeable=()=>createPart({feature:"colorScheme",params:darkParams()}),colorSchemeDark=makeColorSchemeDarkTreeShakeable(),makeColorSchemeDarkWarmTreeShakeable=()=>createPart({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),darkBlueParams=()=>({...darkParams(),backgroundColor:"#1f2836"}),colorSchemeDarkWarm=makeColorSchemeDarkWarmTreeShakeable(),makeColorSchemeDarkBlueTreeShakeable=()=>createPart({feature:"colorScheme",params:darkBlueParams()}),colorSchemeDarkBlue=makeColorSchemeDarkBlueTreeShakeable(),makeColorSchemeVariableTreeShakeable=()=>createPart({feature:"colorScheme",params:defaultLightColorSchemeParams,modeParams:{light:defaultLightColorSchemeParams,dark:darkParams(),"dark-blue":darkBlueParams()}}),colorSchemeVariable=makeColorSchemeVariableTreeShakeable(),iconSetBalhamCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,iconSetBalham=createPart({feature:"iconSet",css:iconSetBalhamCSS}),iconSetAlpineCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,iconSetAlpine=createPart({feature:"iconSet",css:iconSetAlpineCSS}),iconSetMaterialCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`,iconSetMaterial=createPart({feature:"iconSet",css:iconSetMaterialCSS}),iconOverrides=e=>{const t=[];if(e.type==="image"){const{icons:i,mask:s}=e;for(const o of Object.keys(i)){const n=imageValueToCss(i[o]);s?t.push(`.ag-icon-${o}::before { mask-image: ${n}; }`):t.push(`.ag-icon-${o}::before { background-image: ${n}; ${unsetMaskIcon} }`)}}if(e.type==="font"){const{family:i,weight:s,color:o,icons:n}=e;let r=unsetMaskIcon;i&&(r+=` font-family: ${fontFamilyValueToCss(i)};`),s&&(r+=` font-weight: ${fontWeightValueToCss(s)};`),o&&(r+=` color: ${colorValueToCss(o)};`);for(const a of Object.keys(n))t.push(`.ag-icon-${a}::before { content: ${JSON.stringify(n[a])}; ${r} }`)}return createPart({css:t.join(`;
27
24
  `),cssImports:e.cssImports})},unsetMaskIcon="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",iconNameToSvgFragment={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},iconNameToFullSvg={"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>'},getQuartzIconsCss=(e={})=>{let t="";for(const i of[...Object.keys(iconNameToSvgFragment),...Object.keys(iconNameToFullSvg)]){const s=quartzIconSvg(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
28
- `}return t},quartzIconSvg=(e,t=1.5)=>{const i=iconNameToFullSvg[e];if(i)return i;const s=iconNameToSvgFragment[e];if(!s)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+s+"</svg>"},iconSetQuartz=(e={})=>createPart({feature:"iconSet",css:()=>getQuartzIconsCss(e)}),iconSetQuartzLight=iconSetQuartz({strokeWidth:1}),iconSetQuartzRegular=iconSetQuartz(),iconSetQuartzBold=iconSetQuartz({strokeWidth:2}),inputStyleBaseCSS=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',inputStyleBorderedCSS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",inputStyleUnderlinedCSS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){border-left:none;border-right:none;border-top:none}",baseParams2={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}},makeInputStyleBaseTreeShakeable=()=>createPart({feature:"inputStyle",params:baseParams2,css:inputStyleBaseCSS}),inputStyleBase=makeInputStyleBaseTreeShakeable(),makeInputStyleBorderedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams2,inputBackgroundColor:backgroundColor,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:accentColor},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:foregroundBackgroundMix(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>inputStyleBaseCSS+inputStyleBorderedCSS}),inputStyleBordered=makeInputStyleBorderedTreeShakeable(),makeInputStyleUnderlinedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams2,inputBackgroundColor:"transparent",inputBorder:{width:2,color:foregroundMix(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>inputStyleBaseCSS+inputStyleUnderlinedCSS}),inputStyleUnderlined=makeInputStyleUnderlinedTreeShakeable(),tabStyleBaseCSS='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',tabStyleRolodexCSS=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",baseParams3={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},makeTabStyleBaseTreeShakeable=()=>createPart({feature:"tabStyle",params:baseParams3,css:tabStyleBaseCSS}),tabStyleBase=makeTabStyleBaseTreeShakeable(),makeTabStyleQuartzTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBorder:!0,tabBarBackgroundColor:foregroundMix(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:tabStyleBaseCSS}),tabStyleQuartz=makeTabStyleQuartzTreeShakeable(),makeTabStyleMaterialTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:tabStyleBaseCSS}),tabStyleMaterial=makeTabStyleMaterialTreeShakeable(),makeTabStyleAlpineTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:accentColor,tabSelectedTextColor:accentColor,tabSelectedUnderlineColor:accentColor,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:tabStyleBaseCSS}),tabStyleAlpine=makeTabStyleAlpineTreeShakeable(),makeTabStyleRolodexTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:()=>tabStyleBaseCSS+tabStyleRolodexCSS}),tabStyleRolodex=makeTabStyleRolodexTreeShakeable(),materialAdjustmentsCSS=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-header-row,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:1px solid var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-primary-color)}",makeThemeQuartzTreeShakeable=()=>createTheme().withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetQuartzRegular).withPart(tabStyleQuartz).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),themeQuartz=makeThemeQuartzTreeShakeable(),makeThemeAlpineTreeShakeable=()=>createTheme().withPart(buttonStyleAlpine).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetAlpine).withPart(tabStyleAlpine).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:accentMix(.3),inputFocusBorder:{color:accentMix(.4)},focusShadow:{radius:2,spread:1.6,color:accentMix(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:foregroundBackgroundMix(.45),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.45),checkboxIndeterminateBorderColor:foregroundBackgroundMix(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:accentColor,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:accentColor,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:accentColor,iconButtonHoverColor:accentColor,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.45)}),themeAlpine=makeThemeAlpineTreeShakeable(),makeThemeBalhamTreeShakeable=()=>createTheme().withPart(buttonStyleBalham).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetBalham).withPart(tabStyleRolodex).withPart(inputStyleBordered).withPart(columnDropStylePlain).withParams({accentColor:"#0091ea",borderColor:foregroundMix(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxCheckedBackgroundColor:backgroundColor,checkboxCheckedBorderColor:accentColor,checkboxCheckedShapeColor:accentColor,checkboxIndeterminateBackgroundColor:backgroundColor,checkboxIndeterminateBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateShapeColor:foregroundBackgroundMix(.5),focusShadow:{radius:2,spread:1,color:accentColor},headerTextColor:foregroundMix(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:backgroundColor,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:foregroundMix(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:foregroundColor}),themeBalham=makeThemeBalhamTreeShakeable(),makeStyleMaterialTreeShakeable=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:backgroundColor,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:foregroundMix(.08),columnHoverColor:foregroundMix(.08),headerCellHoverBackgroundColor:foregroundMix(.05),statusBarLabelColor:foregroundMix(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:foregroundColor,advancedFilterBuilderButtonBarBorder:!1},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:foregroundColor,checkboxIndeterminateBackgroundColor:foregroundColor,toggleButtonOffBackgroundColor:foregroundColor,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.5),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),selectedRowBackgroundColor:"#bb86fc33"};return createPart({feature:"styleMaterial",css:materialAdjustmentsCSS,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},styleMaterial=makeStyleMaterialTreeShakeable(),makeThemeMaterialTreeShakeable=()=>createTheme().withPart(buttonStyleBase).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetMaterial).withPart(tabStyleMaterial).withPart(inputStyleUnderlined).withPart(columnDropStylePlain).withPart(styleMaterial).withParams({rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:foregroundMix(.16)},fontFamily:[{googleFont:"Roboto"},"-apple-system","BlinkMacSystemFont","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),themeMaterial=makeThemeMaterialTreeShakeable(),CELL_HORIZONTAL_PADDING={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},INDENTATION_LEVEL={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},ROW_GROUP_INDENT_SIZE={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},ROW_HEIGHT={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},HEADER_HEIGHT={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},LIST_ITEM_HEIGHT={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},ROW_BORDER_WIDTH={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},paramsId=0,Environment=class extends BeanStub{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++paramsId}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:i}=e;this.eGridDiv=t,this.eStyleContainer=i.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=i.themeCssLayer,this.styleNonce=i.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(ROW_HEIGHT),this.getSizeEl(HEADER_HEIGHT),this.getSizeEl(LIST_ITEM_HEIGHT),this.getSizeEl(ROW_BORDER_WIDTH),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>_unregisterGridUsingThemingAPI(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(ROW_HEIGHT)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(HEADER_HEIGHT)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(CELL_HORIZONTAL_PADDING)}getDefaultIndentation(){return this.getCSSVariablePixelValue(INDENTATION_LEVEL)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(ROW_GROUP_INDENT_SIZE)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),i=this.getDefaultRowGroupIndentSize();return e-1+i*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(LIST_ITEM_HEIGHT)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ROW_BORDER_WIDTH)}applyThemeClasses(e){const{gridTheme:t}=this;let i="";if(t)i=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let s=this.eGridDiv;for(;s;){let o=!1;for(const n of Array.from(s.classList))n.startsWith("ag-theme-")&&(o=!0,i=i?`${i} ${n}`:n);o&&this.mutationObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),s=s.parentElement}}for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(i){const s=e.className;e.className=s+(s?" ":"")+i}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const s=`${i}px`;return t!=s?(e.style.setProperty("--ag-line-height",s),i):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?_injectGlobalCSS(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const i=t.offsetWidth;return i===NO_VALUE_SENTINEL?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=_createElement({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const i=this.getMeasurementContainer();t=_createElement({tag:"div"});const{border:s,noWarn:o}=e;s?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${NO_VALUE_SENTINEL}px)`)):t.style.width=`var(${e.cssName}, ${NO_VALUE_SENTINEL}px)`,i.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!o&&_warn(9,{variable:e});const r=_observeResize(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(ROW_BORDER_WIDTH);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:i,gridTheme:s}=this,o=e.get("theme");let n;if(o==="legacy")n=void 0;else{const r=o??themeQuartz;r instanceof ThemeImpl?n=r:_error(240,{theme:r})}if(n!==s){if(n){_registerGridUsingThemingAPI(this),_injectCoreAndModuleCSS(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of i)_injectGlobalCSS(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=_createElement({tag:"style"});const a=this.gos.get("styleNonce");a&&r.setAttribute("nonce",a),t.appendChild(r)}IS_SSR||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&_error(o?106:239)}},NO_VALUE_SENTINEL=15538,EventService=class extends BeanStub{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new LocalEventService}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(_addGridCommonParams(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(_addGridCommonParams(this.gos,e))}};function isAnyChildSpanningHeaderHeight(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function getHeaderIndexToFocus(e,t){let i;if(isColumnGroup2(e)&&isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let o=i;for(;o!==s;)t++,o=o.getParent()}return{column:i||e,headerRowIndex:t}}var HeaderNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=_getDocument(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:s,colGroupSvc:o,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(i=s.getCol(e),i||(i=o?.getColumnGroup(e)??null)):i=e,!i)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=_last(a||[]).type==="filter",d=getFocusHeaderRowCount(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:i}}navigateVertically(e,t,i){const s=this.beans.focusSvc;if(t||(t=s.focusedHeader),!t)return!1;const{headerRowIndex:o}=t,n=t.column,r=getFocusHeaderRowCount(this.beans),a=e==="UP",l=this.getHeaderRowType(o);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?getColumnVisibleParent(l,n,o):getColumnVisibleChild(l,n,o),h=!1;return d<0&&(d=0,c=n,h=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!c?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:i})}navigateHorizontally(e,t=!1,i){const{focusSvc:s,gos:o}=this.beans,n=s.focusedHeader;let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==o.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=o.getCallback("tabToNextHeader");if(t&&l){const d=s.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){const{headerRowIndex:c}=s.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?s.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let o=null,n;const r=this.beans;if(t==="Before"?s>0&&(n=s-1,this.currentHeaderRowWithoutSpan-=1,o=this.findColAtEdgeForHeaderRow(n,"end")):(n=s+1,this.currentHeaderRowWithoutSpan<getFocusHeaderRowCount(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,o=this.findColAtEdgeForHeaderRow(n,"start")),!o)return!1;const{column:a,headerRowIndex:l}=getHeaderIndexToFocus(o.column,o?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(isColumnGroup2(e)){const s=e.getDisplayedLeafColumns();i=t==="Before"?_last(s):s[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){let i,s;const{colGroupSvc:o,visibleCols:n}=this.beans;if(isColumnGroup2(e.column)?i=o?.getGroupAtDirection(e.column,t)??void 0:(s=`getCol${t}`,i=n[s](e.column)),!i)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const d=[i];for(;i.getParent();)i=i.getParent(),d.push(i);i=d[Math.max(0,d.length-1-r)]}const{column:a,headerRowIndex:l}=getHeaderIndexToFocus(i,r);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:i,ctrlsSvc:s,colGroupSvc:o}=this.beans,n=i.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;const l=s.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(l=="group"){const d=o?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:r}}};function getColumnVisibleParent(e,t,i){const s=e==="filter",o=e==="column";let n=s?t:t.getParent(),r=i-1,a=r;if(o&&isAnyChildSpanningHeaderHeight(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;a=r,r<0&&(n=t,r=i,a=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:a}}function getColumnVisibleChild(e,t,i,s="After"){let o=t,n=i+1;const r=n;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=s==="After"?a[0]:_last(a),d=[];let c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(o=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const h=d[u];if(!h.isPadding()){o=h;break}n++}else o=_last(d),o||(o=l)}return{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var FocusService=class extends BeanStub{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(_registerKeyboardFocusEvents(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCell||!this.doesRowOrCellHaveBrowserFocus()?null:this.focusedCell}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(_getActiveDomElement(this.beans),DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=_getActiveDomElement(this.beans);return this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_CELL_CTRL)?!0:this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_ROW_CTRL)}isDomDataPresentInHierarchy(e,t){let i=e;for(;i;){if(_getDomData(this.gos,i,t))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:s}=e,o={rowIndex:t,rowPinned:i,column:s,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:_makeNull(s),column:r},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:o,preventScrollOnBrowserFocus:n})}isCellFocused(e){return this.focusedCell==null?!1:_areCellsEqual(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i,pinned:s}}=e,{column:o,headerRowIndex:n}=this.focusedHeader;return t===o&&i===n&&s==o.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_isHeaderFocusSuppressed(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:o,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(s){const l=this.focusedHeader,d=getFocusHeaderRowCount(this.beans);if(i){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&o){const u={key:o.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:o};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:o,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(_isHeaderFocusSuppressed(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:s,event:o}=e,n=this.focusedHeader,r=getFocusHeaderRowCount(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:n,headerPosition:i,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:s,event:o})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:n}=e,a=t({backwards:i==="Before",previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:n});return a===!0?s:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:o,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,i);const h=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&h&&(o!=null||s)&&(c.currentHeaderRowWithoutSpan=o??-1),h}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const i=getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:i,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=getFocusHeaderRowCount(this.beans)-1,i=_last(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===_makeNull(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&_focusInto(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:s}=e;if(this.overlays?.isExclusive())return i&&this.focusOverlay(t);if(_isCellFocusSuppressed(this.beans))return t&&!_isHeaderFocusSuppressed(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:_focusNextGridCoreContainer(this.beans,t);const o=t?_getLastRow(this.beans):_getFirstRow(this.beans);if(o){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=o,l=_getRowNode(this.beans,o);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return!s||s.key===KeyCode.TAB?c=d?KeyCode.LEFT:KeyCode.RIGHT:c=s.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(o,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:_makeNull(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:getFocusHeaderRowCount(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},ScrollVisibleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:_getScrollbarWidth();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},GridDestroyService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},ALWAYS_SYNC_GLOBAL_EVENTS=new Set(["gridPreDestroyed","fillStart","pasteStart"]),GRID_OPTION_DEFAULTS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},changeSetId=0,gridInstanceSequence=0,GridOptionsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=gridInstanceSequence++,this.propEventSvc=new LocalEventService,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const s=ALWAYS_SYNC_GLOBAL_EVENTS.has(t);if(s&&!e||!s&&e)return;const o=_getCallbackForEvent(t),n=this.gridOptions[o];typeof n=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{n(i)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??GRID_OPTION_DEFAULTS[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return _exists(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addGridCommonParams(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const s={id:changeSetId++,properties:[]},o=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=e[a];r?.warnOnInitialPropertyUpdate(i,a);const d=t||typeof l=="object"&&i==="api",c=n[a];if(d||c!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:s,source:i};o.push(u)}}r?.processGridOptions(this.gridOptions),s.properties=o.map(a=>a.type),o.forEach(a=>{_logIfDebug(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(s=>this.isModuleRegistered(s)):this.isModuleRegistered(e);return i||_error(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:_areModulesGridScoped(),rowModelType:this.get("rowModelType"),isUmd:_isUmd()}}isModuleRegistered(e){return _isModuleRegistered(e,this.gridId,this.get("rowModelType"))}};function getHeaderCompElementParams(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var HeaderCompElement=getHeaderCompElementParams(!0),HeaderCompElementNoSort=getHeaderCompElementParams(!1),HeaderComp=class extends Component{constructor(){super(...arguments),this.eFilter=RefPlaceholder,this.eFilterButton=RefPlaceholder,this.eSortIndicator=RefPlaceholder,this.eMenu=RefPlaceholder,this.eLabel=RefPlaceholder,this.eText=RefPlaceholder,this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};_mergeDeep(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const i=e.template;return i?i?.trim?i.trim():i:t?HeaderCompElement:HeaderCompElementNoSort}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:s,userCompFactory:o}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),i?.setupForHeader(this),this.setMenu(),this.setupSort(),s?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=_getInnerHeaderCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderComponent=s,this.eText.appendChild(s.getGui())):this.destroyBean(s))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;if(this.currentDisplayName=t,i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const s=_escapeString(t,!0);this.eText.textContent=s}addInIcon(e,t,i){if(t==null)return;const s=_createIconNoSpan(e,this.beans,i);s&&t.appendChild(s)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){_removeFromParent(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,s=_isLegacyMenuEnabled(e);this.addInIcon(s?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!s);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:s,eMenu:o,eFilterButton:n}=this,r=t.column,a=_isLegacyMenuEnabled(i);if(e&&!a){if(s.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:s,eSortOrder:o,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;s.attachCustomElements(o,n,r,a,l)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,i,s){if(!e)return _removeFromParent(t),!1;const o=this.params.column;return this.addInIcon(s,t,o),this.addManagedListeners(o,{filterChanged:i}),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();_setDisplayed(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},HeaderGroupCompElement={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},HeaderGroupComp=class extends Component{constructor(){super(HeaderGroupCompElement),this.agOpened=RefPlaceholder,this.agClosed=RefPlaceholder,this.agLabel=RefPlaceholder,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&_warn(89)}workOutInnerHeaderGroupComponent(e,t){const i=_getInnerHeaderGroupCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderGroupComponent=s,this.agLabel.appendChild(s.getGui())):this.destroyBean(s))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i},beans:s}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(_isStopPropagationForAgGrid(l))return;const d=!i.isExpanded();s.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(s,t,o),this.addTouchAndClickListeners(s,e,o);const n=l=>{_stopPropagationForAgGrid(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,i){e.touchSvc?.setupForHeaderGroup(this,t,i),this.addManagedElementListeners(t,{click:i})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const s=i.isExpanded();_setDisplayed(e,s),_setDisplayed(t,!s)}else _setDisplayed(e,!1),_setDisplayed(t,!1)}addInIcon(e,t){const i=_createIconNoSpan(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;_setDisplayed(t,!1),_setDisplayed(i,!1);return}}setupLabel(e){const{displayName:t,columnGroup:i}=e,s=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(_exists(t)&&!s){const o=_escapeString(t,!0);this.agLabel.textContent=o}this.addOrRemoveCssClass("ag-sticky-label",!i.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},ColumnHeaderCompModule={moduleName:"ColumnHeaderComp",version:VERSION,userComponents:{agColumnHeader:HeaderComp},icons:{menu:"menu",menuAlt:"menu-alt"}},ColumnGroupHeaderCompModule={moduleName:"ColumnGroupHeaderComp",version:VERSION,userComponents:{agColumnGroupHeader:HeaderGroupComp},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},AnimationFrameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&_warn(92)}createTask(e,t,i,s){this.verify();let o=i;s&&this.batchFrameworkComps&&(o="f1");const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[o],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:s,destroyTasks:o,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=i.list,c=s.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let m;if(l.length)this.sortTaskList(t),m=l.pop().task;else if(d.length)this.sortTaskList(i),m=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(s),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(o.length)m=o.pop();else break;m()}h=Date.now()-u}l.length||d.length||c.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);_requestAnimationFrame(this.beans,e)}isQueueEmpty(){return!this.ticking}},AnimationFrameModule={moduleName:"AnimationFrame",version:VERSION,beans:[AnimationFrameService]},TouchService=class extends BeanStub{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!_isIOSUserAgent())return;const t=(i,s,o)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(o?.target??null);r?.column&&r.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!_isIOSUserAgent()||_isEventSupported("dblclick"))return!1;const s=Date.now(),o=s-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=s,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:o,eFilterButton:n}=e,r=new TouchListener(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&_exists(o),d=l?new TouchListener(o,!0):r;if(s.enableMenu){const c=l?"tap":"longTap",u=h=>s.showColumnMenuAfterMouseClick(h.touchStart);e.addManagedListeners(d,{[c]:u})}if(s.enableSorting){const c=u=>{const h=u.touchStart.target;a&&(o?.contains(h)||n?.contains(h))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(r,{tap:c})}if(s.enableFilterButton&&n){const c=new TouchListener(n,!0);e.addManagedListeners(c,{tap:()=>s.showFilter(n)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>r.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,i){const s=new TouchListener(t,!0);e.addManagedListeners(s,{tap:i}),e.addDestroyFunc(()=>s.destroy())}mockContextMenu(e,t,i){if(!_isIOSUserAgent())return;const s=new TouchListener(t),o=n=>{_isEventFromThisGrid(this.gos,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}},TouchModule={moduleName:"Touch",version:VERSION,beans:[TouchService]},CellNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===KeyCode.UP,s=e===KeyCode.DOWN,o=e===KeyCode.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(i||s)r=i?a.getFirstRow():a.getLastRow(),n=t.column;else{const c=l.get("enableRtl");r=t.rowIndex,n=(o!==c?d.allCols:[...d.allCols].reverse()).find(h=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:h}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case KeyCode.UP:i=this.getCellAbove(i);break;case KeyCode.DOWN:i=this.getCellBelow(i);break;case KeyCode.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case KeyCode.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,_warn(8,{key:e});break}i?s=this.isCellGoodToFocusOn(i):s=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:s,rowModel:o}=this.beans;switch(e.rowPinned){case"top":i=s?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=s?.getPinnedBottomRow(e.rowIndex);break;default:i=o.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,i=_getRowBelow(this.beans,t);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,i=_getRowAbove(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,s=t.allCols;let o=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=s[0];const a=_getRowBelow(this.beans,e);if(_missing(a)||!a.rowPinned&&!(i?.isRowInPage(a.rowIndex)??!0))return null;o=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:o,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:s}=t,o=i.allCols;let n=e.rowIndex,r=e.rowPinned,a=i.getColBefore(e.column);if(!a){a=_last(o);const l=_getRowAbove(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_missing(l)||!l.rowPinned&&!(s?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const s=e.createColumnFunctionCallbackParams(t);return i(s)}return!1}};function getFocusedCell(e){return e.focusSvc.getFocusedCell()}function clearFocusedCell(e){return e.focusSvc.clearFocusedCell()}function setFocusedCell(e,t,i,s){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})}function tabToNextCell(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function tabToPreviousCell(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function setFocusedHeader(e,t,i=!1){const s=e.headerNavigation?.getHeaderPositionForColumn(t,i);s&&e.focusSvc.focusHeaderPosition({headerPosition:s})}var NavigationService=class extends BeanStub{constructor(){super(),this.beanName="navigation",this.onPageDown=_throttle(this.onPageDown,100),this.onPageUp=_throttle(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=_getCellPositionForEvent(this.gos,e);let a=!1;switch(i){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(i),a=!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:case KeyCode.UP:case KeyCode.DOWN:if(!r)return!1;o&&!s&&!n&&(this.onCtrlUpDownLeftRight(i,r),a=!0);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:!o&&!s&&(a=this.handlePageUpDown(i,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===KeyCode.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:i,scrollColumn:s,focusIndex:o,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;_exists(s)&&!s.isPinned()&&r.ensureColumnVisible(s),_exists(t)&&r.ensureIndexVisible(t,i),e.isAsync||r.ensureIndexVisible(o);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:o,column:n,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:o,rowPinned:null,column:n})}onPageDown(e){const t=this.beans,i=getVScroll(t),s=this.getViewportHeight(),{pageBounds:o,rowModel:n,rowAutoHeight:r}=t,a=o.getPixelOffset(),l=i.top+s,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=getVScroll(t),{pageBounds:s,rowModel:o,rowAutoHeight:n}=t,r=s.getPixelOffset(),a=i.top,l=o.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:s,rowModel:o}=this.beans,n=this.getViewportHeight(),r=s.getFirstRow(),a=s.getLastRow(),l=s.getPixelOffset(),d=o.getRow(e.rowIndex),c=i?d?.rowHeight-n-l:n-l,u=d?.rowTop+c;let h=o.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const p=i?-1:1;t=h=e.rowIndex+p}let g;i?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,s=this.getViewportHeight(),{pageBounds:o,rowModel:n}=this.beans,r=o.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const d=n.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>s)break;a+=c}l+=i}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=getVScroll(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let s=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(s-=i),s}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,o=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})}onHomeOrEndKey(e){const t=e===KeyCode.PAGE_HOME,{visibleCols:i,pageBounds:s,rowModel:o}=this.beans,n=i.allCols,r=t?s.getFirstRow():s.getLastRow(),a=o.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t),o=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=o;if(s!==!1){s?t.preventDefault():s===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||_isHeaderFocusSuppressed(o)?_focusNextGridCoreContainer(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof CellCtrl&&e.focusCell(!0),(!i&&a.focusOverlay(!1)||_focusNextGridCoreContainer(o,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:s,rowRenderer:o}=i,n=s.getFocusedCell();if(!n)return!1;let r=_getCellByPosition(i,n);return!r&&(r=o.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,i){let s=e.editing;if(!s&&e instanceof CellCtrl){const r=e.rowCtrl;r&&(s=r.editing)}let o;return s?this.gos.get("editType")==="fullRow"?o=this.moveToNextEditingRow(e,t,i):o=this.moveToNextEditingCell(e,t,i):o=this.moveToNextCellNotEditing(e,t,i),o===null?o:o||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,i=null){const s=e.cellPosition;e.eGui.focus(),e.stopEditing();const o=this.findNextCellToFocusOn(s,t,!0);return o===!1?null:o==null?!1:(this.beans.editSvc?.startEditing(o,null,!0,i),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const s=e.cellPosition,o=this.findNextCellToFocusOn(s,t,!0);if(o===!1)return null;if(o==null)return!1;const n=o.cellPosition,r=this.isCellEditable(s),a=this.isCellEditable(n),l=n&&s.rowIndex===n.rowIndex&&s.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!l){const u=e.rowCtrl;d?.stopRowEditing(u);const h=o.rowCtrl;c?.startEditing(h,void 0,void 0,i)}return a?(d?.setFocusInOnEditor(o),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t,i){const s=this.beans.visibleCols.allCols;let o;if(e instanceof RowCtrl){if(o={...e.getRowPosition(),column:t?s[0]:_last(s)},this.gos.get("embedFullWidthRows")&&i){const r=e.findFullWidthInfoForEvent(i);r&&(o.column=r.column)}}else o=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(o,t,!1);if(n===!1)return null;if(n instanceof CellCtrl)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return _exists(n)}findNextCellToFocusOn(e,t,i){let s=e;const o=this.beans,{cellNavigation:n,gos:r,focusSvc:a,rowRenderer:l,rangeSvc:d}=o;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=n.getNextTabbedCell(s,t);const c=r.getCallback("tabToNextCell");if(_exists(c)){const p=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(p===!0)s=e;else{if(p===!1)return!1;s={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const g=getFocusHeaderRowCount(o);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}const u=r.get("editType")==="fullRow";if(i&&!u&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const h=_getCellByPosition(o,s);if(!h){const g=l.getRowByPosition(s);if(!g||!g.isFullWidth()||i)continue;return{...g.getRowPosition(),column:s?.column}}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(s),d?.setRangeToCell(s),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:s}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):s.getRow(e)}navigateToNextCell(e,t,i,s){let o=i,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;o&&(o===i||!this.isValidNavigateCell(o));)d.get("enableRtl")?t===KeyCode.LEFT&&(o=this.getLastCellOfColSpan(o)):t===KeyCode.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),n=_missing(o);if(n&&e&&e.key===KeyCode.UP&&(o={rowIndex:-1,rowPinned:null,column:i.column}),s){const u=d.getCallback("navigateToNextCell");if(_exists(u)){const g=u({key:t,previousCellPosition:i,nextCellPosition:o||null,event:e});_exists(g)?o={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:o=null}}if(!o)return;if(o.rowIndex<0){const u=getFocusHeaderRowCount(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+o.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(o);c?this.focusPosition(c):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=_getCellByPosition(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:s,focusSvc:o,eventSvc:n}=this.beans,r=i.allCols,a=s.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=o.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?_last(r):r[0])};this.focusPosition(d);const c=t??(l!=null&&_isRowBefore(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:i}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),i?.setRangeToCell(e)}isValidNavigateCell(e){return!!_getRowNode(this.beans,e)}getLastCellOfColSpan(e){const t=_getCellByPosition(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:_last(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=_isGroupRowsSticky(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),s=t&&i?.sticky,{scrollFeature:o}=this.gridBodyCon;!s&&_missing(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}};function getVScroll(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var KeyboardNavigationModule={moduleName:"KeyboardNavigation",version:VERSION,beans:[NavigationService,CellNavigationService,HeaderNavigationService],apiFunctions:{getFocusedCell,clearFocusedCell,setFocusedCell,setFocusedHeader,tabToNextCell,tabToPreviousCell}},PageBoundsListener=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},PageBoundsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,s=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:s}}calculateBounds(e,t){const{rowModel:i}=this.beans,s=i.getRowBounds(e);s&&(s.rowIndex=e),this.topRowBounds=s;const o=i.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},pinnedColumnModuleCSS=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",SetPinnedWidthFeature=class extends BeanStub{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(_setDisplayed(i,t),_setFixedWidth(i,e))}},PinnedColumnService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,s=_isDomLayout(e,"print"),o=s?0:t.getColsLeftWidth(),n=s?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerWidth(e);if(t<=50)return;const i=this.getPinnedColumnsOverflowingViewport(t-50),s=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:n}=i;let r=o;!r.length&&!n||(s&&(r=s({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!isRowNumberCol(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new SetPinnedWidthFeature(e,t)}setColsPinned(e,t,i){const{colModel:s,colAnimation:o,visibleCols:n,gos:r}=this.beans;if(!s.cols||!e?.length)return;if(_isDomLayout(r,"print")){_warn(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=s.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(i),dispatchColumnPinnedEvent(this.eventSvc,l,i)),o?.finish()}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const i=e.pinned==="left",s=e.pinned==="right";e.hidden=!0;const o=()=>{const n=i?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&i||!l&&s)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:s,rightWidth:o}=this,n=_getInnerWidth(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(s+o+e>n)if(n>s+o)e=n-s-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,s=t+i;let o=!1;if(s<e)return{columns:[],hasLockedPinned:o};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const c=0,u=[];let h=s-c-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:o}}},PinnedColumnModule={moduleName:"PinnedColumn",version:VERSION,beans:[PinnedColumnService],css:[pinnedColumnModuleCSS]},AriaAnnouncementService=class extends BeanStub{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=_debounce(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=_getDocument(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),_setAriaLive(i,"polite"),_setAriaRelevant(i,"additions text"),_setAriaAtomic(i,!0),e.eGridDiv.appendChild(i)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(_clearElement(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},AriaModule={moduleName:"Aria",version:VERSION,beans:[AriaAnnouncementService]};function showLoadingOverlay(e){e.overlays?.showLoadingOverlay()}function showNoRowsOverlay(e){e.overlays?.showNoRowsOverlay()}function hideOverlay(e){e.overlays?.hideOverlay()}var overlayWrapperComponentCSS=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",OverlayWrapperElement={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},OverlayWrapperComponent=class extends Component{constructor(){super(OverlayWrapperElement),this.eOverlayWrapper=RefPlaceholder,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(overlayWrapperComponentCSS)}handleKeyDown(e){if(e.key!==KeyCode.TAB||e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.beans;if(_findNextFocusableElement(t,this.eOverlayWrapper,!1,e.shiftKey))return;let s=!1;e.shiftKey?s=t.focusSvc.focusGridView({column:_last(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=_focusNextGridCoreContainer(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=LayoutCssClasses;i.toggle(s,t.autoHeight),i.toggle(o,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new LayoutFeature(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.isGridFocused()){const o=_getActiveDomElement(this.beans);o&&!_isNothingFocused(this.beans)&&(this.elToFocusAfter=o)}e.then(o=>{if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}if(this.activePromise=null,!!o){if(this.activeOverlay!==o&&(this.eOverlayWrapper.appendChild(o.getGui()),this.activeOverlay=o,s)){const n=o;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,({currentValue:r})=>{n.refresh?.(_addGridCommonParams(this.gos,{...r??{}}))})}i&&this.isGridFocused()&&_focusInto(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),_clearElement(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=_getActiveDomElement(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},OverlayWrapperSelector={selector:"AG-OVERLAY-WRAPPER",component:OverlayWrapperComponent},OverlayService=class extends BeanStub{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=_isClientSideRowModel(this.gos),this.isServerSide=!this.isClientSide&&_isServerSideRowModel(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){_warn(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return OverlayWrapperSelector}getOverlayWrapperCompClass(){return OverlayWrapperComponent}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:i,beans:{gos:s,colModel:o,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!s.get("suppressLoadingOverlay")&&(r=!s.get("columnDefs")||!o.ready||!s.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!s.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!i&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(_getLoadingOverlayCompDetails(this.beans.userCompFactory,_addGridCommonParams(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(_getNoRowsOverlayCompDetails(this.beans.userCompFactory,_addGridCommonParams(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){const s=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(s,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},OverlayModule={moduleName:"Overlay",version:VERSION,userComponents:{agLoadingOverlay:LoadingOverlayComponent2,agNoRowsOverlay:NoRowsOverlayComponent2},apiFunctions:{showLoadingOverlay,showNoRowsOverlay,hideOverlay},beans:[OverlayService]},RowContainerHeightService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=_getMaxDivHeight(),_logIfDebug(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;_logIfDebug(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},ROW_ANIMATION_TIMEOUT=400,RowRenderer=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},i=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},s=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{_isCellSelectionEnabled(this.gos)?i():s()}),_isCellSelectionEnabled(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",s=>this.onSuppressCellFocusChanged(s.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:s,previousValue:o})=>{(!o&&s||o&&!s)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const s=i.getShowRowGroupCols();s.length&&this.refreshCells({columns:s,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const s=this.gridBodyCtrl;s.setStickyTopHeight(0),s.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=_isDomLayout(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new RowCtrlCache(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellRendered(e,t){const i=this.rowCtrlsByRowIndex[e];return t?i&&i.isFullWidth()||this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})?!0:!!i?.getCellCtrl(t):!!i}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellRendered(e.rowIndex,t)||this.redraw()}this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(i=>t.onFlashCells(i,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const i=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},s=()=>{i(l=>l.onLeftChanged())},o=()=>{i(l=>l.onWidthChanged())},n=()=>{i(l=>l.onFirstRightPinnedChanged())},r=()=>{i(l=>l.onLastLeftPinnedChanged())},a=()=>{i(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",s),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",s),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=_isDomLayout(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const s=i.getCellCtrl(e,!0)?.eGui;s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:i,beans:s,printLayout:o}=this,n=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));i?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&i.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in n?(e[l]=n[a.id],delete n[a.id]):e[l]=new RowCtrl(a,s,!1,!1,o)});const r=(t==="top"?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=r}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const i=s=>{const o=s[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),s[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&_isAnimateRows(this.gos),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n}=this;if(n){n.checkStickyRows();const r=n.extraTopHeight+n.extraBottomHeight;r&&this.updateContainerHeights(r)}this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let i=this.pageBounds.getCurrentPageHeight();i===0&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(_errMsg(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:getFocusHeaderRowCount(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.onCellFocusChanged(_addGridCommonParams(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let s=e;for(s.rowPinned==null&&t&&i&&!t.isRowInPage(s.rowIndex)&&(s={rowPinned:null,rowIndex:i.getFirstRow()});s;){if(s.rowPinned==null&&i)if(s.rowIndex<i.getFirstRow()){if(s=_getRowAbove(this.beans,{rowPinned:null,rowIndex:0}),!s)return null}else s.rowIndex>i.getLastRow()&&(s={rowPinned:null,rowIndex:i.getLastRow()});const o=this.getRowByPosition(s);if(o?.isAlive())return{...o.getRowPosition(),column:e.column};s=_getRowAbove(this.beans,s)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const o=t[s].getAllCellCtrls(),n=o.length;for(let r=0;r<n;r++)e.push(o[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...i,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=mapRowNodes(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(s=>{const o=s.rowNode;return isRowInMap(o,t)})}getCellCtrls(e,t){let i;_exists(t)&&(i={},t.forEach(o=>{const n=this.colModel.getCol(o);_exists(n)&&(i[n.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(n=>{const r=n.column.getId();i&&!i[r]||s.push(n)})}),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex)){const s=i.rowNode;t[s.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(i=>{const s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:s}=e;let o;const n=this.stickyRowFeature;n&&(o=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(s&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,s),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(s&&!l),o!=null)){const c=t?.getFocusCellToUseAfterRefresh();o!=null&&c==null&&(i?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(n=>i[n]=!0);const o=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const i=this.beans.pagination,s=this.beans.focusSvc?.getFocusedCell()?.rowIndex;s!=null&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&(!i||i.isRowInPage(s))&&t.push(s);const o=r=>{const a=r.rowNode.rowIndex;a==null||a===s||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))o(r);if(e)for(const r of Object.values(e))o(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);const o=[];if(s.forEach(n=>{const r=this.createOrUpdateRowCtrl(n,e,t,i);_exists(r)&&o.push(r)}),e){const{animationFrameSvc:n}=this.beans;n?.active&&i&&!this.printLayout?n.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),i=e.isPinningRight();(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.rowNode.rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const s=i.rowNode;return!(t!=null&&!isRowInMap(s,t))})}createOrUpdateRowCtrl(e,t,i,s){let o,n=this.rowCtrlsByRowIndex[e];if(n||(o=this.rowModel.getRow(e),_exists(o)&&_exists(t)&&t[o.id]&&o.alreadyRendered&&(n=t[o.id],t[o.id]=null)),!n)if(o||(o=this.rowModel.getRow(e)),_exists(o))n=this.createRowCon(o,i,s);else return;return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const i=[];if(e){for(const s of Object.values(e))if(s){if(this.cachedRowCtrls&&s.isCacheable()){this.cachedRowCtrls.addRow(s);continue}if(s.destroyFirstPass(!t),t){const o=s.instanceId;this.zombieRowCtrls[o]=s,i.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[o]})}else s.destroySecondPass()}}t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>i.forEach(s=>s()),ROW_ANIMATION_TIMEOUT))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=_getRowHeightAsNumber(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let s,o;if(!i.isRowsToRender())s=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),s=t.getFirstRow(),o=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const b=t.getPixelOffset(),{pageFirstPixel:y,pageLastPixel:S}=t.getCurrentPagePixelRange(),x=e.divStretchOffset,F=u.getVScrollPosition(),R=F.top,E=F.bottom;h?(p=y+x,f=S+x):(p=Math.max(R+b-c,y)+x,f=Math.min(E+b+c,S)+x),this.firstVisibleVPixel=Math.max(R+b,y)+x,this.lastVisibleVPixel=Math.min(E+b,S)+x,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f);const w=t.getFirstRow(),v=t.getLastRow();m<w&&(m=w),C>v&&(C=v),s=m,o=C}const n=_isDomLayout(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&o-s>a&&(o=s+a);const l=s!==this.firstRenderedRow,d=o!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=s,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:s,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,_requestAnimationFrame(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(r||s)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),s||r||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const s=e.rowNode,o=this.focusSvc.isRowFocused(s.rowIndex,s.rowPinned),n=e.editing,r=s.detail;return o||n||r?!!this.isRowPresent(s):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const s=this.cachedRowCtrls?.getRow(e)??null;if(s)return s;const o=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new RowCtrl(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(s=>s.rowNode),t=this.getStickyTopRowCtrls().map(s=>s.rowNode),i=this.getStickyBottomRowCtrls().map(s=>s.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}},RowCtrlCache=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],_removeFromArray(this.entriesList,i)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],_removeFromArray(this.entriesList,e)}getEntries(){return this.entriesList}};function mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(i=>{const s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;break}}),t}function isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var RowNodeSorter=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(e))}doFullSort(e,t){const i=e.map((s,o)=>({currentPos:o,rowNode:s}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(s=>s.rowNode)}compareRowNodes(e,t,i){const s=t.rowNode,o=i.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",d=this.getValue(s,a.column),c=this.getValue(o,a.column);let u;const h=this.getComparator(a,s);if(h?u=h(d,c,s,o,l):u=_defaultComparator(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(s!=null)return s;if(!i.getColDef().showRowGroup)return;const o=!t.group&&i.getColDef().field;if(!o)return;const n=this.beans.colModel.getColDefCol(o);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:i,colModel:s,showRowGroupCols:o,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return i.getValue(t,e,!1);if(e.rowGroupColumn===t){if(_isGroupUseEntireRow(n,s.isPivotActive())){const d=e.allLeafChildren?.[0];return d?i.getValue(t,d,!1):void 0}const l=o?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return i.getValue(t,e,!1)}};function onSortChanged(e){e.sortSvc?.onSortChanged("api")}var makeIconParams=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),SortIndicatorElement={tag:"span",cls:"ag-sort-indicator-container",children:[makeIconParams("Order","order"),makeIconParams("Asc","ascending-icon"),makeIconParams("Desc","descending-icon"),makeIconParams("Mixed","mixed-icon"),makeIconParams("None","none-icon")]},SortIndicatorComp=class extends Component{constructor(e){super(),this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,e||this.setTemplate(SortIndicatorElement)}attachCustomElements(e,t,i,s,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=o}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const s=_createIconNoSpan(e,this.beans,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:i,column:s,gos:o,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(s);if(e&&_setDisplayed(e,r==="asc",{skipAriaHidden:!0}),t&&_setDisplayed(t,r==="desc",{skipAriaHidden:!0}),i){const a=!s.getColDef().unSortIcon&&!o.get("unSortIcon"),l=r==null;_setDisplayed(i,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const s=t.getColDef().showRowGroup;_isColumnsSortingCoupledToGroup(i)&&s&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const s=t.sortSvc.getDisplaySortForColumn(i)==="mixed";_setDisplayed(e,s,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const s=i.getColumnsWithSortingOrdered(),o=i.getDisplaySortIndexForColumn(t)??-1,n=s.some(a=>i.getDisplaySortIndexForColumn(a)??-1>=1),r=o>=0&&n;_setDisplayed(e,r,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():_clearElement(e)}},SortIndicatorSelector={selector:"AG-SORT-INDICATOR",component:SortIndicatorComp},DEFAULT_SORTING_ORDER=["asc","desc",null],SortService=class extends BeanStub{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}progressSortFromEvent(e,t){const s=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,s,"uiColumnSorted")}setSortForColumn(e,t,i,s){t!=="asc"&&t!=="desc"&&(t=null);const{gos:o,showRowGroupCols:n}=this.beans,r=_isColumnsSortingCoupledToGroup(o);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,s));const l=(i||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),d=[];if(!l){const c=this.clearSortBarTheseColumns(a,s);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(s,d)}updateSortIndex(e){const{gos:t,colModel:i,showRowGroupCols:s}=this.beans,o=_isColumnsSortingCoupledToGroup(t),n=s?.getShowRowGroupCol(e.getId()),r=o&&n||e,a=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>o&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.beans.colModel.forAllCols(s=>{e.includes(s)||(s.getSort()&&i.push(s),this.setColSort(s,void 0,t))}),i}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??DEFAULT_SORTING_ORDER,i=t.indexOf(e.getSort()),s=i<0,o=i==t.length-1;return s||o?t[0]:t[i+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:s}=this.beans;let o=[];if(t.forAllCols(d=>{d.getSort()&&o.push(d)}),t.isPivotMode()){const d=_isColumnsSortingCoupledToGroup(e);o=o.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=s?.columns.filter(d=>!!d.getSort())??[],r={};o.forEach((d,c)=>r[d.getId()]=c),o.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const a=_isColumnsSortingCoupledToGroup(e)&&!!n.length;a&&(o=[...new Set(o.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return o.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{const c=i.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=_isColumnsSortingCoupledToGroup(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=s[0].getSort();return s.every(r=>r.getSort()==o)?o:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,i){let s=0;e.addManagedListeners(t,{movingChanged:()=>{s=Date.now()}}),i&&e.addManagedElementListeners(i,{click:n=>{const r=t.isMoving(),l=Date.now()-s<50;r||l||this.progressSortFromEvent(t,n)}});const o=()=>{const n=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",n==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",n==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnRowGroupChanged:o})}initCol(e){const{sort:t,initialSort:i,sortIndex:s,initialSortIndex:o}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(i==="asc"||i==="desc")&&(e.sort=i),s!==void 0?s!==null&&(e.sortIndex=s):o!==null&&(e.sortIndex=o)}updateColSort(e,t,i){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,i):this.setColSort(e,void 0,i))}setColSort(e,t,i){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new SortIndicatorComp(e)}getSortIndicatorSelector(){return SortIndicatorSelector}},SortModule={moduleName:"Sort",version:VERSION,beans:[SortService,RowNodeSorter],apiFunctions:{onSortChanged},userComponents:{agSortIndicator:SortIndicatorComp},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},SyncService=class extends BeanStub{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),_logIfDebug(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,_convertColumnEventSourceType(e.source))}}};function expireValueCache(e){e.valueCache?.expire()}function getCellValue(e,t){const{colKey:i,rowNode:s,useFormatter:o}=t,n=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(_missing(n))return null;const r=e.valueSvc.getValueForDisplay(n,s);return o?e.valueSvc.formatValue(n,s,r)??_escapeString(r,!0):r}var ChangedPath=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:i,children:s}=e;if(s)for(let o=0;o<s.length;++o)this.depthFirstSearchChangedPath(s[o],t);t(i)}depthFirstSearchEverything(e,t,i){const s=e.childrenAfterGroup;if(s)for(let o=0,n=s.length;o<n;++o){const r=s[o];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const s={rowNode:t,children:null};this.mapToItems[t.id]=s,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const o=this.mapToItems[i.id],n=this.mapToItems[i.parent.id];n.children||(n.children=[]),n.children.push(o),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>i[o.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>!i[o.getId()])}},SOURCE_PASTE="paste",ChangeDetectionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;_isClientSideRowModel(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:i}=this.beans;if(e.source===SOURCE_PASTE||t.get("suppressChangeDetection"))return;const s=e.node,o=[s],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!s.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new ChangedPath(a,r);l.addParentNode(s.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{o.push(d),d.sibling&&o.push(d.sibling)})}i.refreshCells({rowNodes:o})}},ExpressionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);_error(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return _error(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),s=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=s,s}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},ValueCache=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){if(this.active){const s=this.cacheVersion;e.__cacheVersion!==s&&(e.__cacheVersion=s,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},ValueCacheModule={moduleName:"ValueCache",version:VERSION,beans:[ValueCache],apiFunctions:{expireValueCache}},ExpressionModule={moduleName:"Expression",version:VERSION,beans:[ExpressionService]},ChangeDetectionModule={moduleName:"ChangeDetection",version:VERSION,beans:[ChangeDetectionService]},CellApiModule={moduleName:"CellApi",version:VERSION,apiFunctions:{getCellValue}},ValueService=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=_isServerSideRowModel(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const i=e.getColDef().showRowGroup;if(i!=null){if(typeof i=="string"){const l=this.getDisplayedNode(t,e,!0);if(l)return this.getValue(e,l)}const a=this.getValue(e,t);if(a==null){const l=this.getDisplayedNode(t,e);if(l)return this.getValue(e,l)}return a}const s=t.leafGroup&&this.colModel.isPivotMode(),o=t.group&&t.expanded&&!t.footer&&!s,n=this.gos.get("groupSuppressBlankHeader")||!t.sibling,r=o&&!n;return this.getValue(e,t,r)}getValue(e,t,i=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),o=s.field,n=e.getColId(),r=t.data;let a;const l=s.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;const d=t.groupData&&t.groupData[n]!==void 0,c=!i&&t.aggData&&t.aggData[n]!==void 0,u=this.isSsrm&&i&&!!e.getColDef().aggFunc,h=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&c?a=t.aggData[n]:this.isTreeData&&s.valueGetter?a=this.executeValueGetter(s.valueGetter,r,e,t):this.isTreeData&&o&&r?a=_getValueUsingField(r,o,e.isFieldContainsDots()):d?a=t.groupData[n]:c?a=t.aggData[n]:s.valueGetter?a=this.executeValueGetter(s.valueGetter,r,e,t):h?a=_getValueUsingField(r,t.field,e.isFieldContainsDots()):o&&r&&!u&&(a=_getValueUsingField(r,o,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const g=a.substring(1);a=this.executeValueGetter(g,r,e,t)}return a}parseValue(e,t,i,s){const o=e.getColDef(),n=o.valueParser;if(_exists(n)){const r=_addGridCommonParams(this.gos,{node:t,data:t?.data,oldValue:s,newValue:i,colDef:o,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return _exists(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,i,s,o=!0){let n=null,r;const a=e.getColDef();if(s?r=s:o&&(r=a.valueFormatter),r){const l=_addGridCommonParams(this.gos,{value:i,node:t,data:t?t.data:null,colDef:a,column:e});typeof r=="function"?n=r(l):n=this.expressionSvc?this.expressionSvc.evaluate(r,l):null}else if(a.refData)return a.refData[i]||"";return n==null&&Array.isArray(i)&&(n=i.join(", ")),n}getDisplayedNode(e,t,i=!1){const s=this.gos,o=s.get("groupHideOpenParents"),n=s.get("showOpenedGroup")&&!i;if(!o&&!n)return;const r=t.colDef.showRowGroup;if(r===!0)return e.group?void 0:e.parent??void 0;let a=e;for(;a&&a.rowGroupColumn?.getId()!=r;){const l=a===a.parent?.childrenAfterSort?.[0];if(!n&&!l)return;a=a.parent}if(a!==e)return a??void 0}setValue(e,t,i,s){const o=this.colModel.getColDefCol(t);if(!e||!o)return!1;_missing(e.data)&&(e.data={});const{field:n,valueSetter:r}=o.getColDef();if(_missing(n)&&_missing(r))return _warn(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(o,i))return _warn(135),!1;const a=_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:this.getValue(o,e),newValue:i,colDef:o.getColDef(),column:o});a.newValue=i;let l;if(_exists(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,i,o.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(o,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:s}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let o=!1;if(!s)o=e[t]===i,o||(e[t]=i);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(o=r[a]===i,o||(r[a]=i)):r=r[a]}}return!o}executeValueGetterWithValueCache(e,t,i,s){const o=i.getColId(),n=this.valueCache.getValue(s,o);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,i,s);return this.valueCache.setValue(s,o,r),r}executeValueGetterWithoutValueCache(e,t,i,s){const o=_addGridCommonParams(this.gos,{data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let n;return typeof e=="function"?n=e(o):n=this.expressionSvc?.evaluate(e,o),n}getValueCallback(e,t){const i=this.colModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let o=i;if(s){const n=_addGridCommonParams(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});o=s(n)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&_warn(121)),o}},CommunityCoreModule={moduleName:"CommunityCore",version:VERSION,beans:[GridDestroyService,ApiFunctionService,Registry,UserComponentFactory,RowContainerHeightService,VisibleColsService,EventService,GridOptionsService,ColumnModel,PageBoundsService,PageBoundsListener,RowRenderer,ValueService,FocusService,Environment,ScrollVisibleService,CtrlsService,SyncService,ColumnNameService,ColumnViewportService],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId,destroy,isDestroyed,getGridOption,setGridOption,updateGridOptions},dependsOn:[DataTypeModule,ColumnMoveModule,ColumnResizeModule,SortModule,ColumnHeaderCompModule,ColumnGroupModule,ColumnGroupHeaderCompModule,OverlayModule,ChangeDetectionModule,AnimationFrameModule,KeyboardNavigationModule,PinnedColumnModule,AriaModule,TouchModule,CellRendererFunctionModule,ColumnFlexModule,ExpressionModule]},_GlobalGridOptions=class I{static applyGlobalGridOptions(t){if(!I.gridOptions)return{...t};let i={};return _mergeDeep(i,I.gridOptions,!0,!0),I.mergeStrategy==="deep"?_mergeDeep(i,t,!0,!0):i={...i,...t},I.gridOptions.context&&(i.context=I.gridOptions.context),t.context&&(I.mergeStrategy==="deep"&&i.context&&_mergeDeep(t.context,i.context,!0,!0),i.context=t.context),i}};_GlobalGridOptions.gridOptions=void 0,_GlobalGridOptions.mergeStrategy="shallow";var GlobalGridOptions=_GlobalGridOptions;function provideGlobalGridOptions(e,t="shallow"){GlobalGridOptions.gridOptions=e,GlobalGridOptions.mergeStrategy=t}function _getGlobalGridOption(e){return GlobalGridOptions.gridOptions?.[e]}function createGrid(e,t,i){if(!t)return _error(11),{};const s=i;let o;if(!s?.setThemeOnGridDiv){const r=_createElement({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,o=()=>e.remove()}return new GridCoreCreator().create(e,t,r=>{const a=new GridComp(e);r.createBean(a)},void 0,i,o)}var nextGridId=1,GridCoreCreator=class{create(e,t,i,s,o,n){const r=GlobalGridOptions.applyGlobalGridOptions(t),a=r.gridId??String(nextGridId++),l=r.rowModelType??"clientSide",d=this.getRegisteredModules(o,a,l),c=this.createBeansList(l,d,a),u=this.createProvidedBeans(e,r,o);if(!c)return;const h={providedBeanInstances:u,beanClasses:c,gridId:a,beanInitComparator:gridBeanInitComparator,beanDestroyComparator:gridBeanDestroyComparator,derivedBeans:[createGridApi],destroyCallback:n},g=new Context(h);return this.registerModuleFeatures(g,d),i(g),g.getBean("syncSvc").start(),s&&s(g),g.getBean("gridApi")}getRegisteredModules(e,t,i){return _registerModule(CommunityCoreModule,void 0),e?.modules?.forEach(s=>_registerModule(s,t)),_getRegisteredModules(t,i)}registerModuleFeatures(e,t){const i=e.getBean("registry"),s=e.getBean("apiFunctionSvc");t.forEach(o=>{i.registerModule(o);const n=o.apiFunctions;n&&Object.keys(n).forEach(a=>{s?.addFunction(a,n[a])})})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;_missing(s)&&(s=new VanillaFrameworkOverrides);const o={gridOptions:t,eGridDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!o){_logPreInitErr(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!_isModuleRegistered(o,i,e)){_logPreInitErr(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:o,gridScoped:_areModulesGridScoped(),gridId:i,rowModelType:e},`Missing module ${o}Module for rowModelType ${e}.
25
+ `}return t},quartzIconSvg=(e,t=1.5)=>{const i=iconNameToFullSvg[e];if(i)return i;const s=iconNameToSvgFragment[e];if(!s)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+s+"</svg>"},iconSetQuartz=(e={})=>createPart({feature:"iconSet",css:()=>getQuartzIconsCss(e)}),iconSetQuartzLight=iconSetQuartz({strokeWidth:1}),iconSetQuartzRegular=iconSetQuartz(),iconSetQuartzBold=iconSetQuartz({strokeWidth:2}),inputStyleBaseCSS=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',inputStyleBorderedCSS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",inputStyleUnderlinedCSS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){border-left:none;border-right:none;border-top:none}",baseParams2={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}},makeInputStyleBaseTreeShakeable=()=>createPart({feature:"inputStyle",params:baseParams2,css:inputStyleBaseCSS}),inputStyleBase=makeInputStyleBaseTreeShakeable(),makeInputStyleBorderedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams2,inputBackgroundColor:backgroundColor,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:accentColor},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:foregroundBackgroundMix(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>inputStyleBaseCSS+inputStyleBorderedCSS}),inputStyleBordered=makeInputStyleBorderedTreeShakeable(),makeInputStyleUnderlinedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams2,inputBackgroundColor:"transparent",inputBorder:{width:2,color:foregroundMix(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>inputStyleBaseCSS+inputStyleUnderlinedCSS}),inputStyleUnderlined=makeInputStyleUnderlinedTreeShakeable(),tabStyleBaseCSS='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',tabStyleRolodexCSS=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",baseParams3={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},makeTabStyleBaseTreeShakeable=()=>createPart({feature:"tabStyle",params:baseParams3,css:tabStyleBaseCSS}),tabStyleBase=makeTabStyleBaseTreeShakeable(),makeTabStyleQuartzTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBorder:!0,tabBarBackgroundColor:foregroundMix(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:tabStyleBaseCSS}),tabStyleQuartz=makeTabStyleQuartzTreeShakeable(),makeTabStyleMaterialTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:tabStyleBaseCSS}),tabStyleMaterial=makeTabStyleMaterialTreeShakeable(),makeTabStyleAlpineTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:accentColor,tabSelectedTextColor:accentColor,tabSelectedUnderlineColor:accentColor,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:tabStyleBaseCSS}),tabStyleAlpine=makeTabStyleAlpineTreeShakeable(),makeTabStyleRolodexTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams3,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:()=>tabStyleBaseCSS+tabStyleRolodexCSS}),tabStyleRolodex=makeTabStyleRolodexTreeShakeable(),materialAdjustmentsCSS=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-header-row,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:1px solid var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-primary-color)}",makeThemeQuartzTreeShakeable=()=>createTheme().withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetQuartzRegular).withPart(tabStyleQuartz).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),themeQuartz=makeThemeQuartzTreeShakeable(),makeThemeAlpineTreeShakeable=()=>createTheme().withPart(buttonStyleAlpine).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetAlpine).withPart(tabStyleAlpine).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:accentMix(.3),inputFocusBorder:{color:accentMix(.4)},focusShadow:{radius:2,spread:1.6,color:accentMix(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:foregroundBackgroundMix(.45),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.45),checkboxIndeterminateBorderColor:foregroundBackgroundMix(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:accentColor,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:accentColor,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:accentColor,iconButtonHoverColor:accentColor,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.45)}),themeAlpine=makeThemeAlpineTreeShakeable(),makeThemeBalhamTreeShakeable=()=>createTheme().withPart(buttonStyleBalham).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetBalham).withPart(tabStyleRolodex).withPart(inputStyleBordered).withPart(columnDropStylePlain).withParams({accentColor:"#0091ea",borderColor:foregroundMix(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxCheckedBackgroundColor:backgroundColor,checkboxCheckedBorderColor:accentColor,checkboxCheckedShapeColor:accentColor,checkboxIndeterminateBackgroundColor:backgroundColor,checkboxIndeterminateBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateShapeColor:foregroundBackgroundMix(.5),focusShadow:{radius:2,spread:1,color:accentColor},headerTextColor:foregroundMix(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:backgroundColor,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:foregroundMix(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:foregroundColor}),themeBalham=makeThemeBalhamTreeShakeable(),makeStyleMaterialTreeShakeable=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:backgroundColor,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:foregroundMix(.08),columnHoverColor:foregroundMix(.08),headerCellHoverBackgroundColor:foregroundMix(.05),statusBarLabelColor:foregroundMix(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:foregroundColor,advancedFilterBuilderButtonBarBorder:!1},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:foregroundColor,checkboxIndeterminateBackgroundColor:foregroundColor,toggleButtonOffBackgroundColor:foregroundColor,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.5),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),selectedRowBackgroundColor:"#bb86fc33"};return createPart({feature:"styleMaterial",css:materialAdjustmentsCSS,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},styleMaterial=makeStyleMaterialTreeShakeable(),makeThemeMaterialTreeShakeable=()=>createTheme().withPart(buttonStyleBase).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetMaterial).withPart(tabStyleMaterial).withPart(inputStyleUnderlined).withPart(columnDropStylePlain).withPart(styleMaterial).withParams({rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:foregroundMix(.16)},fontFamily:[{googleFont:"Roboto"},"-apple-system","BlinkMacSystemFont","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),themeMaterial=makeThemeMaterialTreeShakeable(),CELL_HORIZONTAL_PADDING={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},INDENTATION_LEVEL={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},ROW_GROUP_INDENT_SIZE={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},ROW_HEIGHT={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},HEADER_HEIGHT={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},LIST_ITEM_HEIGHT={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},ROW_BORDER_WIDTH={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},paramsId=0,Environment=class extends BeanStub{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++paramsId}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:i}=e;this.eGridDiv=t,this.eStyleContainer=i.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=i.themeCssLayer,this.styleNonce=i.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(ROW_HEIGHT),this.getSizeEl(HEADER_HEIGHT),this.getSizeEl(LIST_ITEM_HEIGHT),this.getSizeEl(ROW_BORDER_WIDTH),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>_unregisterGridUsingThemingAPI(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(ROW_HEIGHT)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(HEADER_HEIGHT)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(CELL_HORIZONTAL_PADDING)}getDefaultIndentation(){return this.getCSSVariablePixelValue(INDENTATION_LEVEL)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(ROW_GROUP_INDENT_SIZE)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),i=this.getDefaultRowGroupIndentSize();return e-1+i*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(LIST_ITEM_HEIGHT)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ROW_BORDER_WIDTH)}applyThemeClasses(e){const{gridTheme:t}=this;let i="";if(t)i=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let s=this.eGridDiv;for(;s;){let o=!1;for(const n of Array.from(s.classList))n.startsWith("ag-theme-")&&(o=!0,i=i?`${i} ${n}`:n);o&&this.mutationObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),s=s.parentElement}}for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(i){const s=e.className;e.className=s+(s?" ":"")+i}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const s=`${i}px`;return t!=s?(e.style.setProperty("--ag-line-height",s),i):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?_injectGlobalCSS(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const i=t.offsetWidth;return i===NO_VALUE_SENTINEL?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=_createElement({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const i=this.getMeasurementContainer();t=_createElement({tag:"div"});const{border:s,noWarn:o}=e;s?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${NO_VALUE_SENTINEL}px)`)):t.style.width=`var(${e.cssName}, ${NO_VALUE_SENTINEL}px)`,i.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!o&&_warn(9,{variable:e});const r=_observeResize(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(ROW_BORDER_WIDTH);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:i,gridTheme:s}=this,o=e.get("theme");let n;if(o==="legacy")n=void 0;else{const r=o??themeQuartz;r instanceof ThemeImpl?n=r:_error(240,{theme:r})}if(n!==s){if(n){_registerGridUsingThemingAPI(this),_injectCoreAndModuleCSS(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of i)_injectGlobalCSS(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=_createElement({tag:"style"});const a=this.gos.get("styleNonce");a&&r.setAttribute("nonce",a),t.appendChild(r)}IS_SSR||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&_error(o?106:239)}},NO_VALUE_SENTINEL=15538,EventService=class extends BeanStub{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new LocalEventService}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(_addGridCommonParams(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(_addGridCommonParams(this.gos,e))}};function isAnyChildSpanningHeaderHeight(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function getHeaderIndexToFocus(e,t){let i;if(isColumnGroup2(e)&&isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let o=i;for(;o!==s;)t++,o=o.getParent()}return{column:i||e,headerRowIndex:t}}var HeaderNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=_getDocument(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:s,colGroupSvc:o,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(i=s.getCol(e),i||(i=o?.getColumnGroup(e)??null)):i=e,!i)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=_last(a||[]).type==="filter",d=getFocusHeaderRowCount(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:i}}navigateVertically(e,t,i){const s=this.beans.focusSvc;if(t||(t=s.focusedHeader),!t)return!1;const{headerRowIndex:o}=t,n=t.column,r=getFocusHeaderRowCount(this.beans),a=e==="UP",l=this.getHeaderRowType(o);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?getColumnVisibleParent(l,n,o):getColumnVisibleChild(l,n,o),h=!1;return d<0&&(d=0,c=n,h=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!c?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:i})}navigateHorizontally(e,t=!1,i){const{focusSvc:s,gos:o}=this.beans,n=s.focusedHeader;let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==o.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=o.getCallback("tabToNextHeader");if(t&&l){const d=s.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){const{headerRowIndex:c}=s.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?s.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let o=null,n;const r=this.beans;if(t==="Before"?s>0&&(n=s-1,this.currentHeaderRowWithoutSpan-=1,o=this.findColAtEdgeForHeaderRow(n,"end")):(n=s+1,this.currentHeaderRowWithoutSpan<getFocusHeaderRowCount(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,o=this.findColAtEdgeForHeaderRow(n,"start")),!o)return!1;const{column:a,headerRowIndex:l}=getHeaderIndexToFocus(o.column,o?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(isColumnGroup2(e)){const s=e.getDisplayedLeafColumns();i=t==="Before"?_last(s):s[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){let i,s;const{colGroupSvc:o,visibleCols:n}=this.beans;if(isColumnGroup2(e.column)?i=o?.getGroupAtDirection(e.column,t)??void 0:(s=`getCol${t}`,i=n[s](e.column)),!i)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const d=[i];for(;i.getParent();)i=i.getParent(),d.push(i);i=d[Math.max(0,d.length-1-r)]}const{column:a,headerRowIndex:l}=getHeaderIndexToFocus(i,r);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:i,ctrlsSvc:s,colGroupSvc:o}=this.beans,n=i.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;const l=s.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(l=="group"){const d=o?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:r}}};function getColumnVisibleParent(e,t,i){const s=e==="filter",o=e==="column";let n=s?t:t.getParent(),r=i-1,a=r;if(o&&isAnyChildSpanningHeaderHeight(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;a=r,r<0&&(n=t,r=i,a=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:a}}function getColumnVisibleChild(e,t,i,s="After"){let o=t,n=i+1;const r=n;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=s==="After"?a[0]:_last(a),d=[];let c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(o=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const h=d[u];if(!h.isPadding()){o=h;break}n++}else o=_last(d),o||(o=l)}return{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var FocusService=class extends BeanStub{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(_registerKeyboardFocusEvents(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(_getActiveDomElement(this.beans),DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=_getActiveDomElement(this.beans);return this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_CELL_CTRL)?!0:this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_ROW_CTRL)}isDomDataPresentInHierarchy(e,t){let i=e;for(;i;){if(_getDomData(this.gos,i,t))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:s}=e,o={rowIndex:t,rowPinned:i,column:s,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:_makeNull(s),column:r},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:o,preventScrollOnBrowserFocus:n})}isCellFocused(e){return this.focusedCell==null?!1:_areCellsEqual(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i,pinned:s}}=e,{column:o,headerRowIndex:n}=this.focusedHeader;return t===o&&i===n&&s==o.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_isHeaderFocusSuppressed(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:o,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(s){const l=this.focusedHeader,d=getFocusHeaderRowCount(this.beans);if(i){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&o){const u={key:o.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:o};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:o,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(_isHeaderFocusSuppressed(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:s,event:o}=e,n=this.focusedHeader,r=getFocusHeaderRowCount(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:n,headerPosition:i,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:s,event:o})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:n}=e,a=t({backwards:i==="Before",previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:n});return a===!0?s:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:o,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,i);const h=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&h&&(o!=null||s)&&(c.currentHeaderRowWithoutSpan=o??-1),h}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const i=getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:i,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=getFocusHeaderRowCount(this.beans)-1,i=_last(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===_makeNull(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&_focusInto(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:s}=e;if(this.overlays?.isExclusive())return i&&this.focusOverlay(t);if(_isCellFocusSuppressed(this.beans))return t&&!_isHeaderFocusSuppressed(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:_focusNextGridCoreContainer(this.beans,t);const o=t?_getLastRow(this.beans):_getFirstRow(this.beans);if(o){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=o,l=_getRowNode(this.beans,o);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return!s||s.key===KeyCode.TAB?c=d?KeyCode.LEFT:KeyCode.RIGHT:c=s.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(o,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:_makeNull(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:getFocusHeaderRowCount(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},ScrollVisibleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:_getScrollbarWidth();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},GridDestroyService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},ALWAYS_SYNC_GLOBAL_EVENTS=new Set(["gridPreDestroyed","fillStart","pasteStart"]),GRID_OPTION_DEFAULTS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},changeSetId=0,gridInstanceSequence=0,GridOptionsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=gridInstanceSequence++,this.propEventSvc=new LocalEventService,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const s=ALWAYS_SYNC_GLOBAL_EVENTS.has(t);if(s&&!e||!s&&e)return;const o=_getCallbackForEvent(t),n=this.gridOptions[o];typeof n=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{n(i)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??GRID_OPTION_DEFAULTS[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return _exists(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addGridCommonParams(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const s={id:changeSetId++,properties:[]},o=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=e[a];r?.warnOnInitialPropertyUpdate(i,a);const d=t||typeof l=="object"&&i==="api",c=n[a];if(d||c!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:s,source:i};o.push(u)}}r?.processGridOptions(this.gridOptions),s.properties=o.map(a=>a.type),o.forEach(a=>{_logIfDebug(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(s=>this.isModuleRegistered(s)):this.isModuleRegistered(e);return i||_error(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:_areModulesGridScoped(),rowModelType:this.get("rowModelType"),isUmd:_isUmd()}}isModuleRegistered(e){return _isModuleRegistered(e,this.gridId,this.get("rowModelType"))}};function getHeaderCompElementParams(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var HeaderCompElement=getHeaderCompElementParams(!0),HeaderCompElementNoSort=getHeaderCompElementParams(!1),HeaderComp=class extends Component{constructor(){super(...arguments),this.eFilter=RefPlaceholder,this.eFilterButton=RefPlaceholder,this.eSortIndicator=RefPlaceholder,this.eMenu=RefPlaceholder,this.eLabel=RefPlaceholder,this.eText=RefPlaceholder,this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};_mergeDeep(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const i=e.template;return i?i?.trim?i.trim():i:t?HeaderCompElement:HeaderCompElementNoSort}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:s,userCompFactory:o}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),i?.setupForHeader(this),this.setMenu(),this.setupSort(),s?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=_getInnerHeaderCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderComponent=s,this.eText.appendChild(s.getGui())):this.destroyBean(s))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;if(this.currentDisplayName=t,i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const s=_escapeString(t,!0);this.eText.textContent=s}addInIcon(e,t,i){if(t==null)return;const s=_createIconNoSpan(e,this.beans,i);s&&t.appendChild(s)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){_removeFromParent(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,s=_isLegacyMenuEnabled(e);this.addInIcon(s?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!s);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:s,eMenu:o,eFilterButton:n}=this,r=t.column,a=_isLegacyMenuEnabled(i);if(e&&!a){if(s.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:s,eSortOrder:o,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;s.attachCustomElements(o,n,r,a,l)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,i,s){if(!e)return _removeFromParent(t),!1;const o=this.params.column;return this.addInIcon(s,t,o),this.addManagedListeners(o,{filterChanged:i}),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();_setDisplayed(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},HeaderGroupCompElement={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},HeaderGroupComp=class extends Component{constructor(){super(HeaderGroupCompElement),this.agOpened=RefPlaceholder,this.agClosed=RefPlaceholder,this.agLabel=RefPlaceholder,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&_warn(89)}workOutInnerHeaderGroupComponent(e,t){const i=_getInnerHeaderGroupCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderGroupComponent=s,this.agLabel.appendChild(s.getGui())):this.destroyBean(s))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i},beans:s}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(_isStopPropagationForAgGrid(l))return;const d=!i.isExpanded();s.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(s,t,o),this.addTouchAndClickListeners(s,e,o);const n=l=>{_stopPropagationForAgGrid(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,i){e.touchSvc?.setupForHeaderGroup(this,t,i),this.addManagedElementListeners(t,{click:i})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const s=i.isExpanded();_setDisplayed(e,s),_setDisplayed(t,!s)}else _setDisplayed(e,!1),_setDisplayed(t,!1)}addInIcon(e,t){const i=_createIconNoSpan(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;_setDisplayed(t,!1),_setDisplayed(i,!1);return}}setupLabel(e){const{displayName:t,columnGroup:i}=e,s=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(_exists(t)&&!s){const o=_escapeString(t,!0);this.agLabel.textContent=o}this.addOrRemoveCssClass("ag-sticky-label",!i.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},ColumnHeaderCompModule={moduleName:"ColumnHeaderComp",version:VERSION,userComponents:{agColumnHeader:HeaderComp},icons:{menu:"menu",menuAlt:"menu-alt"}},ColumnGroupHeaderCompModule={moduleName:"ColumnGroupHeaderComp",version:VERSION,userComponents:{agColumnGroupHeader:HeaderGroupComp},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},AnimationFrameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&_warn(92)}createTask(e,t,i,s){this.verify();let o=i;s&&this.batchFrameworkComps&&(o="f1");const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[o],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:s,destroyTasks:o,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=i.list,c=s.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let m;if(l.length)this.sortTaskList(t),m=l.pop().task;else if(d.length)this.sortTaskList(i),m=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(s),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(o.length)m=o.pop();else break;m()}h=Date.now()-u}l.length||d.length||c.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);_requestAnimationFrame(this.beans,e)}isQueueEmpty(){return!this.ticking}},AnimationFrameModule={moduleName:"AnimationFrame",version:VERSION,beans:[AnimationFrameService]},TouchService=class extends BeanStub{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!_isIOSUserAgent())return;const t=(i,s,o)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(o?.target??null);r?.column&&r.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!_isIOSUserAgent()||_isEventSupported("dblclick"))return!1;const s=Date.now(),o=s-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=s,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:o,eFilterButton:n}=e,r=new TouchListener(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&_exists(o),d=l?new TouchListener(o,!0):r;if(s.enableMenu){const c=l?"tap":"longTap",u=h=>s.showColumnMenuAfterMouseClick(h.touchStart);e.addManagedListeners(d,{[c]:u})}if(s.enableSorting){const c=u=>{const h=u.touchStart.target;a&&(o?.contains(h)||n?.contains(h))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(r,{tap:c})}if(s.enableFilterButton&&n){const c=new TouchListener(n,!0);e.addManagedListeners(c,{tap:()=>s.showFilter(n)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>r.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,i){const s=new TouchListener(t,!0);e.addManagedListeners(s,{tap:i}),e.addDestroyFunc(()=>s.destroy())}mockContextMenu(e,t,i){if(!_isIOSUserAgent())return;const s=new TouchListener(t),o=n=>{_isEventFromThisGrid(this.gos,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}},TouchModule={moduleName:"Touch",version:VERSION,beans:[TouchService]},CellNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===KeyCode.UP,s=e===KeyCode.DOWN,o=e===KeyCode.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(i||s)r=i?a.getFirstRow():a.getLastRow(),n=t.column;else{const c=l.get("enableRtl");r=t.rowIndex,n=(o!==c?d.allCols:[...d.allCols].reverse()).find(h=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:h}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case KeyCode.UP:i=this.getCellAbove(i);break;case KeyCode.DOWN:i=this.getCellBelow(i);break;case KeyCode.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case KeyCode.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,_warn(8,{key:e});break}i?s=this.isCellGoodToFocusOn(i):s=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:s,rowModel:o}=this.beans;switch(e.rowPinned){case"top":i=s?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=s?.getPinnedBottomRow(e.rowIndex);break;default:i=o.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,i=_getRowBelow(this.beans,t);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,i=_getRowAbove(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,s=t.allCols;let o=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=s[0];const a=_getRowBelow(this.beans,e);if(_missing(a)||!a.rowPinned&&!(i?.isRowInPage(a.rowIndex)??!0))return null;o=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:o,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:s}=t,o=i.allCols;let n=e.rowIndex,r=e.rowPinned,a=i.getColBefore(e.column);if(!a){a=_last(o);const l=_getRowAbove(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_missing(l)||!l.rowPinned&&!(s?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const s=e.createColumnFunctionCallbackParams(t);return i(s)}return!1}};function getFocusedCell(e){return e.focusSvc.getFocusedCell()}function clearFocusedCell(e){return e.focusSvc.clearFocusedCell()}function setFocusedCell(e,t,i,s){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})}function tabToNextCell(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function tabToPreviousCell(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function setFocusedHeader(e,t,i=!1){const s=e.headerNavigation?.getHeaderPositionForColumn(t,i);s&&e.focusSvc.focusHeaderPosition({headerPosition:s})}var NavigationService=class extends BeanStub{constructor(){super(),this.beanName="navigation",this.onPageDown=_throttle(this.onPageDown,100),this.onPageUp=_throttle(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=_getCellPositionForEvent(this.gos,e);let a=!1;switch(i){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(i),a=!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:case KeyCode.UP:case KeyCode.DOWN:if(!r)return!1;o&&!s&&!n&&(this.onCtrlUpDownLeftRight(i,r),a=!0);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:!o&&!s&&(a=this.handlePageUpDown(i,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===KeyCode.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:i,scrollColumn:s,focusIndex:o,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;_exists(s)&&!s.isPinned()&&r.ensureColumnVisible(s),_exists(t)&&r.ensureIndexVisible(t,i),e.isAsync||r.ensureIndexVisible(o);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:o,column:n,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:o,rowPinned:null,column:n})}onPageDown(e){const t=this.beans,i=getVScroll(t),s=this.getViewportHeight(),{pageBounds:o,rowModel:n,rowAutoHeight:r}=t,a=o.getPixelOffset(),l=i.top+s,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=getVScroll(t),{pageBounds:s,rowModel:o,rowAutoHeight:n}=t,r=s.getPixelOffset(),a=i.top,l=o.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:s,rowModel:o}=this.beans,n=this.getViewportHeight(),r=s.getFirstRow(),a=s.getLastRow(),l=s.getPixelOffset(),d=o.getRow(e.rowIndex),c=i?d?.rowHeight-n-l:n-l,u=d?.rowTop+c;let h=o.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const p=i?-1:1;t=h=e.rowIndex+p}let g;i?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,s=this.getViewportHeight(),{pageBounds:o,rowModel:n}=this.beans,r=o.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const d=n.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>s)break;a+=c}l+=i}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=getVScroll(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let s=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(s-=i),s}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,o=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})}onHomeOrEndKey(e){const t=e===KeyCode.PAGE_HOME,{visibleCols:i,pageBounds:s,rowModel:o}=this.beans,n=i.allCols,r=t?s.getFirstRow():s.getLastRow(),a=o.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t),o=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=o;if(s!==!1){s?t.preventDefault():s===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||_isHeaderFocusSuppressed(o)?_focusNextGridCoreContainer(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof CellCtrl&&e.focusCell(!0),(!i&&a.focusOverlay(!1)||_focusNextGridCoreContainer(o,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:s,rowRenderer:o}=i,n=s.getFocusedCell();if(!n)return!1;let r=_getCellByPosition(i,n);return!r&&(r=o.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,i){let s=e.editing;if(!s&&e instanceof CellCtrl){const r=e.rowCtrl;r&&(s=r.editing)}let o;return s?this.gos.get("editType")==="fullRow"?o=this.moveToNextEditingRow(e,t,i):o=this.moveToNextEditingCell(e,t,i):o=this.moveToNextCellNotEditing(e,t,i),o===null?o:o||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,i=null){const s=e.cellPosition;e.eGui.focus(),e.stopEditing();const o=this.findNextCellToFocusOn(s,t,!0);return o===!1?null:o==null?!1:(this.beans.editSvc?.startEditing(o,null,!0,i),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const s=e.cellPosition,o=this.findNextCellToFocusOn(s,t,!0);if(o===!1)return null;if(o==null)return!1;const n=o.cellPosition,r=this.isCellEditable(s),a=this.isCellEditable(n),l=n&&s.rowIndex===n.rowIndex&&s.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!l){const u=e.rowCtrl;d?.stopRowEditing(u);const h=o.rowCtrl;c?.startEditing(h,void 0,void 0,i)}return a?(d?.setFocusInOnEditor(o),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t,i){const s=this.beans.visibleCols.allCols;let o;if(e instanceof RowCtrl){if(o={...e.getRowPosition(),column:t?s[0]:_last(s)},this.gos.get("embedFullWidthRows")&&i){const r=e.findFullWidthInfoForEvent(i);r&&(o.column=r.column)}}else o=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(o,t,!1);if(n===!1)return null;if(n instanceof CellCtrl)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return _exists(n)}findNextCellToFocusOn(e,t,i){let s=e;const o=this.beans,{cellNavigation:n,gos:r,focusSvc:a,rowRenderer:l,rangeSvc:d}=o;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=n.getNextTabbedCell(s,t);const c=r.getCallback("tabToNextCell");if(_exists(c)){const p=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(p===!0)s=e;else{if(p===!1)return!1;s={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const g=getFocusHeaderRowCount(o);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}const u=r.get("editType")==="fullRow";if(i&&!u&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const h=_getCellByPosition(o,s);if(!h){const g=l.getRowByPosition(s);if(!g||!g.isFullWidth()||i)continue;return{...g.getRowPosition(),column:s?.column}}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(s),d?.setRangeToCell(s),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:s}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):s.getRow(e)}navigateToNextCell(e,t,i,s){let o=i,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;o&&(o===i||!this.isValidNavigateCell(o));)d.get("enableRtl")?t===KeyCode.LEFT&&(o=this.getLastCellOfColSpan(o)):t===KeyCode.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),n=_missing(o);if(n&&e&&e.key===KeyCode.UP&&(o={rowIndex:-1,rowPinned:null,column:i.column}),s){const u=d.getCallback("navigateToNextCell");if(_exists(u)){const g=u({key:t,previousCellPosition:i,nextCellPosition:o||null,event:e});_exists(g)?o={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:o=null}}if(!o)return;if(o.rowIndex<0){const u=getFocusHeaderRowCount(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+o.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(o);c?this.focusPosition(c):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=_getCellByPosition(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:s,focusSvc:o,eventSvc:n}=this.beans,r=i.allCols,a=s.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=o.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?_last(r):r[0])};this.focusPosition(d);const c=t??(l!=null&&_isRowBefore(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:i}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),i?.setRangeToCell(e)}isValidNavigateCell(e){return!!_getRowNode(this.beans,e)}getLastCellOfColSpan(e){const t=_getCellByPosition(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:_last(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=_isGroupRowsSticky(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),s=t&&i?.sticky,{scrollFeature:o}=this.gridBodyCon;!s&&_missing(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}};function getVScroll(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var KeyboardNavigationModule={moduleName:"KeyboardNavigation",version:VERSION,beans:[NavigationService,CellNavigationService,HeaderNavigationService],apiFunctions:{getFocusedCell,clearFocusedCell,setFocusedCell,setFocusedHeader,tabToNextCell,tabToPreviousCell}},PageBoundsListener=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},PageBoundsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,s=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:s}}calculateBounds(e,t){const{rowModel:i}=this.beans,s=i.getRowBounds(e);s&&(s.rowIndex=e),this.topRowBounds=s;const o=i.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},pinnedColumnModuleCSS=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",SetPinnedWidthFeature=class extends BeanStub{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(_setDisplayed(i,t),_setFixedWidth(i,e))}},PinnedColumnService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,s=_isDomLayout(e,"print"),o=s?0:t.getColsLeftWidth(),n=s?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerWidth(e);if(t<=50)return;const i=this.getPinnedColumnsOverflowingViewport(t-50),s=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:n}=i;let r=o;!r.length&&!n||(s&&(r=s({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!isRowNumberCol(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new SetPinnedWidthFeature(e,t)}setColsPinned(e,t,i){const{colModel:s,colAnimation:o,visibleCols:n,gos:r}=this.beans;if(!s.cols||!e?.length)return;if(_isDomLayout(r,"print")){_warn(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=s.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(i),dispatchColumnPinnedEvent(this.eventSvc,l,i)),o?.finish()}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const i=e.pinned==="left",s=e.pinned==="right";e.hidden=!0;const o=()=>{const n=i?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&i||!l&&s)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:s,rightWidth:o}=this,n=_getInnerWidth(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(s+o+e>n)if(n>s+o)e=n-s-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,s=t+i;let o=!1;if(s<e)return{columns:[],hasLockedPinned:o};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const c=0,u=[];let h=s-c-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:o}}},PinnedColumnModule={moduleName:"PinnedColumn",version:VERSION,beans:[PinnedColumnService],css:[pinnedColumnModuleCSS]},AriaAnnouncementService=class extends BeanStub{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=_debounce(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=_getDocument(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),_setAriaLive(i,"polite"),_setAriaRelevant(i,"additions text"),_setAriaAtomic(i,!0),e.eGridDiv.appendChild(i)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(_clearElement(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},AriaModule={moduleName:"Aria",version:VERSION,beans:[AriaAnnouncementService]};function showLoadingOverlay(e){e.overlays?.showLoadingOverlay()}function showNoRowsOverlay(e){e.overlays?.showNoRowsOverlay()}function hideOverlay(e){e.overlays?.hideOverlay()}var overlayWrapperComponentCSS=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",OverlayWrapperElement={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},OverlayWrapperComponent=class extends Component{constructor(){super(OverlayWrapperElement),this.eOverlayWrapper=RefPlaceholder,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(overlayWrapperComponentCSS)}handleKeyDown(e){if(e.key!==KeyCode.TAB||e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.beans;if(_findNextFocusableElement(t,this.eOverlayWrapper,!1,e.shiftKey))return;let s=!1;e.shiftKey?s=t.focusSvc.focusGridView({column:_last(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=_focusNextGridCoreContainer(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=LayoutCssClasses;i.toggle(s,t.autoHeight),i.toggle(o,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new LayoutFeature(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.isGridFocused()){const o=_getActiveDomElement(this.beans);o&&!_isNothingFocused(this.beans)&&(this.elToFocusAfter=o)}e.then(o=>{if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}if(this.activePromise=null,!!o){if(this.activeOverlay!==o&&(this.eOverlayWrapper.appendChild(o.getGui()),this.activeOverlay=o,s)){const n=o;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,({currentValue:r})=>{n.refresh?.(_addGridCommonParams(this.gos,{...r??{}}))})}i&&this.isGridFocused()&&_focusInto(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),_clearElement(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=_getActiveDomElement(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},OverlayWrapperSelector={selector:"AG-OVERLAY-WRAPPER",component:OverlayWrapperComponent},OverlayService=class extends BeanStub{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=_isClientSideRowModel(this.gos),this.isServerSide=!this.isClientSide&&_isServerSideRowModel(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){_warn(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return OverlayWrapperSelector}getOverlayWrapperCompClass(){return OverlayWrapperComponent}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:i,beans:{gos:s,colModel:o,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!s.get("suppressLoadingOverlay")&&(r=!s.get("columnDefs")||!o.ready||!s.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!s.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!i&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(_getLoadingOverlayCompDetails(this.beans.userCompFactory,_addGridCommonParams(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(_getNoRowsOverlayCompDetails(this.beans.userCompFactory,_addGridCommonParams(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){const s=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(s,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},OverlayModule={moduleName:"Overlay",version:VERSION,userComponents:{agLoadingOverlay:LoadingOverlayComponent2,agNoRowsOverlay:NoRowsOverlayComponent2},apiFunctions:{showLoadingOverlay,showNoRowsOverlay,hideOverlay},beans:[OverlayService]},RowContainerHeightService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=_getMaxDivHeight(),_logIfDebug(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;_logIfDebug(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},ROW_ANIMATION_TIMEOUT=400,RowRenderer=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},i=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},s=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{_isCellSelectionEnabled(this.gos)?i():s()}),_isCellSelectionEnabled(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",s=>this.onSuppressCellFocusChanged(s.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:s,previousValue:o})=>{(!o&&s||o&&!s)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const s=i.getShowRowGroupCols();s.length&&this.refreshCells({columns:s,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const s=this.gridBodyCtrl;s.setStickyTopHeight(0),s.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=_isDomLayout(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new RowCtrlCache(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellBeingRendered(e,t){const i=this.rowCtrlsByRowIndex[e];return!t||!i?!!i:i.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(i=>t.onFlashCells(i,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const i=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},s=()=>{i(l=>l.onLeftChanged())},o=()=>{i(l=>l.onWidthChanged())},n=()=>{i(l=>l.onFirstRightPinnedChanged())},r=()=>{i(l=>l.onLastLeftPinnedChanged())},a=()=>{i(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",s),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",s),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=_isDomLayout(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const s=i.getCellCtrl(e,!0)?.eGui;s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:i,beans:s,printLayout:o}=this,n=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));i?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&i.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in n?(e[l]=n[a.id],delete n[a.id]):e[l]=new RowCtrl(a,s,!1,!1,o)});const r=(t==="top"?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=r}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const i=s=>{const o=s[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),s[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&_isAnimateRows(this.gos),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n}=this;if(n){n.checkStickyRows();const r=n.extraTopHeight+n.extraBottomHeight;r&&this.updateContainerHeights(r)}this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let i=this.pageBounds.getCurrentPageHeight();i===0&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(_errMsg(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:getFocusHeaderRowCount(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_addGridCommonParams(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let s=e;for(s.rowPinned==null&&t&&i&&!t.isRowInPage(s.rowIndex)&&(s={rowPinned:null,rowIndex:i.getFirstRow()});s;){if(s.rowPinned==null&&i)if(s.rowIndex<i.getFirstRow()){if(s=_getRowAbove(this.beans,{rowPinned:null,rowIndex:0}),!s)return null}else s.rowIndex>i.getLastRow()&&(s={rowPinned:null,rowIndex:i.getLastRow()});const o=this.getRowByPosition(s);if(o?.isAlive())return{...o.getRowPosition(),column:e.column};s=_getRowAbove(this.beans,s)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const o=t[s].getAllCellCtrls(),n=o.length;for(let r=0;r<n;r++)e.push(o[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...i,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=mapRowNodes(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(s=>{const o=s.rowNode;return isRowInMap(o,t)})}getCellCtrls(e,t){let i;_exists(t)&&(i={},t.forEach(o=>{const n=this.colModel.getCol(o);_exists(n)&&(i[n.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(n=>{const r=n.column.getId();i&&!i[r]||s.push(n)})}),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex)){const s=i.rowNode;t[s.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(i=>{const s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:s}=e;let o;const n=this.stickyRowFeature;n&&(o=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(s&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,s),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(s&&!l),o!=null)){const c=t?.getFocusCellToUseAfterRefresh();o!=null&&c==null&&(i?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(n=>i[n]=!0);const o=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const i=this.beans.pagination,s=this.beans.focusSvc?.getFocusedCell()?.rowIndex;s!=null&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&(!i||i.isRowInPage(s))&&t.push(s);const o=r=>{const a=r.rowNode.rowIndex;a==null||a===s||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))o(r);if(e)for(const r of Object.values(e))o(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);const o=[];if(s.forEach(n=>{const r=this.createOrUpdateRowCtrl(n,e,t,i);_exists(r)&&o.push(r)}),e){const{animationFrameSvc:n}=this.beans;n?.active&&i&&!this.printLayout?n.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),i=e.isPinningRight();(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.rowNode.rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const s=i.rowNode;return!(t!=null&&!isRowInMap(s,t))})}createOrUpdateRowCtrl(e,t,i,s){let o,n=this.rowCtrlsByRowIndex[e];if(n||(o=this.rowModel.getRow(e),_exists(o)&&_exists(t)&&t[o.id]&&o.alreadyRendered&&(n=t[o.id],t[o.id]=null)),!n)if(o||(o=this.rowModel.getRow(e)),_exists(o))n=this.createRowCon(o,i,s);else return;return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const i=[];if(e){for(const s of Object.values(e))if(s){if(this.cachedRowCtrls&&s.isCacheable()){this.cachedRowCtrls.addRow(s);continue}if(s.destroyFirstPass(!t),t){const o=s.instanceId;this.zombieRowCtrls[o]=s,i.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[o]})}else s.destroySecondPass()}}t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>i.forEach(s=>s()),ROW_ANIMATION_TIMEOUT))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=_getRowHeightAsNumber(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let s,o;if(!i.isRowsToRender())s=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),s=t.getFirstRow(),o=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const b=t.getPixelOffset(),{pageFirstPixel:y,pageLastPixel:S}=t.getCurrentPagePixelRange(),x=e.divStretchOffset,F=u.getVScrollPosition(),R=F.top,E=F.bottom;h?(p=y+x,f=S+x):(p=Math.max(R+b-c,y)+x,f=Math.min(E+b+c,S)+x),this.firstVisibleVPixel=Math.max(R+b,y)+x,this.lastVisibleVPixel=Math.min(E+b,S)+x,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f);const w=t.getFirstRow(),v=t.getLastRow();m<w&&(m=w),C>v&&(C=v),s=m,o=C}const n=_isDomLayout(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&o-s>a&&(o=s+a);const l=s!==this.firstRenderedRow,d=o!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=s,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:s,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,_requestAnimationFrame(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(r||s)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),s||r||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const s=e.rowNode,o=this.focusSvc.isRowFocused(s.rowIndex,s.rowPinned),n=e.editing,r=s.detail;return o||n||r?!!this.isRowPresent(s):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const s=this.cachedRowCtrls?.getRow(e)??null;if(s)return s;const o=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new RowCtrl(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(s=>s.rowNode),t=this.getStickyTopRowCtrls().map(s=>s.rowNode),i=this.getStickyBottomRowCtrls().map(s=>s.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}},RowCtrlCache=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],_removeFromArray(this.entriesList,i)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],_removeFromArray(this.entriesList,e)}getEntries(){return this.entriesList}};function mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(i=>{const s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;break}}),t}function isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var RowNodeSorter=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(e))}doFullSort(e,t){const i=e.map((s,o)=>({currentPos:o,rowNode:s}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(s=>s.rowNode)}compareRowNodes(e,t,i){const s=t.rowNode,o=i.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",d=this.getValue(s,a.column),c=this.getValue(o,a.column);let u;const h=this.getComparator(a,s);if(h?u=h(d,c,s,o,l):u=_defaultComparator(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(s!=null)return s;if(!i.getColDef().showRowGroup)return;const o=!t.group&&i.getColDef().field;if(!o)return;const n=this.beans.colModel.getColDefCol(o);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:i,colModel:s,showRowGroupCols:o,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return i.getValue(t,e,!1);if(e.rowGroupColumn===t){if(_isGroupUseEntireRow(n,s.isPivotActive())){const d=e.allLeafChildren?.[0];return d?i.getValue(t,d,!1):void 0}const l=o?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return i.getValue(t,e,!1)}};function onSortChanged(e){e.sortSvc?.onSortChanged("api")}var makeIconParams=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),SortIndicatorElement={tag:"span",cls:"ag-sort-indicator-container",children:[makeIconParams("Order","order"),makeIconParams("Asc","ascending-icon"),makeIconParams("Desc","descending-icon"),makeIconParams("Mixed","mixed-icon"),makeIconParams("None","none-icon")]},SortIndicatorComp=class extends Component{constructor(e){super(),this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,e||this.setTemplate(SortIndicatorElement)}attachCustomElements(e,t,i,s,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=o}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const s=_createIconNoSpan(e,this.beans,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:i,column:s,gos:o,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(s);if(e&&_setDisplayed(e,r==="asc",{skipAriaHidden:!0}),t&&_setDisplayed(t,r==="desc",{skipAriaHidden:!0}),i){const a=!s.getColDef().unSortIcon&&!o.get("unSortIcon"),l=r==null;_setDisplayed(i,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const s=t.getColDef().showRowGroup;_isColumnsSortingCoupledToGroup(i)&&s&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const s=t.sortSvc.getDisplaySortForColumn(i)==="mixed";_setDisplayed(e,s,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const s=i.getColumnsWithSortingOrdered(),o=i.getDisplaySortIndexForColumn(t)??-1,n=s.some(a=>i.getDisplaySortIndexForColumn(a)??-1>=1),r=o>=0&&n;_setDisplayed(e,r,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():_clearElement(e)}},SortIndicatorSelector={selector:"AG-SORT-INDICATOR",component:SortIndicatorComp},DEFAULT_SORTING_ORDER=["asc","desc",null],SortService=class extends BeanStub{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}progressSortFromEvent(e,t){const s=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,s,"uiColumnSorted")}setSortForColumn(e,t,i,s){t!=="asc"&&t!=="desc"&&(t=null);const{gos:o,showRowGroupCols:n}=this.beans,r=_isColumnsSortingCoupledToGroup(o);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,s));const l=(i||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),d=[];if(!l){const c=this.clearSortBarTheseColumns(a,s);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(s,d)}updateSortIndex(e){const{gos:t,colModel:i,showRowGroupCols:s}=this.beans,o=_isColumnsSortingCoupledToGroup(t),n=s?.getShowRowGroupCol(e.getId()),r=o&&n||e,a=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>o&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.beans.colModel.forAllCols(s=>{e.includes(s)||(s.getSort()&&i.push(s),this.setColSort(s,void 0,t))}),i}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??DEFAULT_SORTING_ORDER,i=t.indexOf(e.getSort()),s=i<0,o=i==t.length-1;return s||o?t[0]:t[i+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:s}=this.beans;let o=[];if(t.forAllCols(d=>{d.getSort()&&o.push(d)}),t.isPivotMode()){const d=_isColumnsSortingCoupledToGroup(e);o=o.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=s?.columns.filter(d=>!!d.getSort())??[],r={};o.forEach((d,c)=>r[d.getId()]=c),o.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const a=_isColumnsSortingCoupledToGroup(e)&&!!n.length;a&&(o=[...new Set(o.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return o.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{const c=i.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=_isColumnsSortingCoupledToGroup(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=s[0].getSort();return s.every(r=>r.getSort()==o)?o:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,i){let s=0;e.addManagedListeners(t,{movingChanged:()=>{s=Date.now()}}),i&&e.addManagedElementListeners(i,{click:n=>{const r=t.isMoving(),l=Date.now()-s<50;r||l||this.progressSortFromEvent(t,n)}});const o=()=>{const n=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",n==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",n==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnRowGroupChanged:o})}initCol(e){const{sort:t,initialSort:i,sortIndex:s,initialSortIndex:o}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(i==="asc"||i==="desc")&&(e.sort=i),s!==void 0?s!==null&&(e.sortIndex=s):o!==null&&(e.sortIndex=o)}updateColSort(e,t,i){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,i):this.setColSort(e,void 0,i))}setColSort(e,t,i){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new SortIndicatorComp(e)}getSortIndicatorSelector(){return SortIndicatorSelector}},SortModule={moduleName:"Sort",version:VERSION,beans:[SortService,RowNodeSorter],apiFunctions:{onSortChanged},userComponents:{agSortIndicator:SortIndicatorComp},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},SyncService=class extends BeanStub{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),_logIfDebug(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,_convertColumnEventSourceType(e.source))}}};function expireValueCache(e){e.valueCache?.expire()}function getCellValue(e,t){const{colKey:i,rowNode:s,useFormatter:o}=t,n=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(_missing(n))return null;const r=e.valueSvc.getValueForDisplay(n,s);return o?e.valueSvc.formatValue(n,s,r)??_escapeString(r,!0):r}var ChangedPath=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:i,children:s}=e;if(s)for(let o=0;o<s.length;++o)this.depthFirstSearchChangedPath(s[o],t);t(i)}depthFirstSearchEverything(e,t,i){const s=e.childrenAfterGroup;if(s)for(let o=0,n=s.length;o<n;++o){const r=s[o];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const s={rowNode:t,children:null};this.mapToItems[t.id]=s,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const o=this.mapToItems[i.id],n=this.mapToItems[i.parent.id];n.children||(n.children=[]),n.children.push(o),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>i[o.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>!i[o.getId()])}},SOURCE_PASTE="paste",ChangeDetectionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;_isClientSideRowModel(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:i}=this.beans;if(e.source===SOURCE_PASTE||t.get("suppressChangeDetection"))return;const s=e.node,o=[s],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!s.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new ChangedPath(a,r);l.addParentNode(s.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{o.push(d),d.sibling&&o.push(d.sibling)})}i.refreshCells({rowNodes:o})}},ExpressionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);_error(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return _error(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),s=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=s,s}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},ValueCache=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){if(this.active){const s=this.cacheVersion;e.__cacheVersion!==s&&(e.__cacheVersion=s,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},ValueCacheModule={moduleName:"ValueCache",version:VERSION,beans:[ValueCache],apiFunctions:{expireValueCache}},ExpressionModule={moduleName:"Expression",version:VERSION,beans:[ExpressionService]},ChangeDetectionModule={moduleName:"ChangeDetection",version:VERSION,beans:[ChangeDetectionService]},CellApiModule={moduleName:"CellApi",version:VERSION,apiFunctions:{getCellValue}},ValueService=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=_isServerSideRowModel(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const i=e.getColDef().showRowGroup;if(i!=null){if(typeof i=="string"){const l=this.getDisplayedNode(t,e,!0);if(l)return this.getValue(e,l)}const a=this.getValue(e,t);if(a==null){const l=this.getDisplayedNode(t,e);if(l)return this.getValue(e,l)}return a}const s=t.leafGroup&&this.colModel.isPivotMode(),o=t.group&&t.expanded&&!t.footer&&!s,n=this.gos.get("groupSuppressBlankHeader")||!t.sibling,r=o&&!n;return this.getValue(e,t,r)}getValue(e,t,i=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),o=s.field,n=e.getColId(),r=t.data;let a;const l=s.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;const d=t.groupData&&t.groupData[n]!==void 0,c=!i&&t.aggData&&t.aggData[n]!==void 0,u=this.isSsrm&&i&&!!e.getColDef().aggFunc,h=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&c?a=t.aggData[n]:this.isTreeData&&s.valueGetter?a=this.executeValueGetter(s.valueGetter,r,e,t):this.isTreeData&&o&&r?a=_getValueUsingField(r,o,e.isFieldContainsDots()):d?a=t.groupData[n]:c?a=t.aggData[n]:s.valueGetter?a=this.executeValueGetter(s.valueGetter,r,e,t):h?a=_getValueUsingField(r,t.field,e.isFieldContainsDots()):o&&r&&!u&&(a=_getValueUsingField(r,o,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const g=a.substring(1);a=this.executeValueGetter(g,r,e,t)}return a}parseValue(e,t,i,s){const o=e.getColDef(),n=o.valueParser;if(_exists(n)){const r=_addGridCommonParams(this.gos,{node:t,data:t?.data,oldValue:s,newValue:i,colDef:o,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return _exists(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,i,s,o=!0){let n=null,r;const a=e.getColDef();if(s?r=s:o&&(r=a.valueFormatter),r){const l=_addGridCommonParams(this.gos,{value:i,node:t,data:t?t.data:null,colDef:a,column:e});typeof r=="function"?n=r(l):n=this.expressionSvc?this.expressionSvc.evaluate(r,l):null}else if(a.refData)return a.refData[i]||"";return n==null&&Array.isArray(i)&&(n=i.join(", ")),n}getDisplayedNode(e,t,i=!1){const s=this.gos,o=s.get("groupHideOpenParents"),n=s.get("showOpenedGroup")&&!i;if(!o&&!n)return;const r=t.colDef.showRowGroup;if(r===!0)return e.group?void 0:e.parent??void 0;let a=e;for(;a&&a.rowGroupColumn?.getId()!=r;){const l=a===a.parent?.childrenAfterSort?.[0];if(!n&&!l)return;a=a.parent}if(a!==e)return a??void 0}setValue(e,t,i,s){const o=this.colModel.getColDefCol(t);if(!e||!o)return!1;_missing(e.data)&&(e.data={});const{field:n,valueSetter:r}=o.getColDef();if(_missing(n)&&_missing(r))return _warn(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(o,i))return _warn(135),!1;const a=_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:this.getValue(o,e),newValue:i,colDef:o.getColDef(),column:o});a.newValue=i;let l;if(_exists(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,i,o.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(o,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:s}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let o=!1;if(!s)o=e[t]===i,o||(e[t]=i);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(o=r[a]===i,o||(r[a]=i)):r=r[a]}}return!o}executeValueGetterWithValueCache(e,t,i,s){const o=i.getColId(),n=this.valueCache.getValue(s,o);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,i,s);return this.valueCache.setValue(s,o,r),r}executeValueGetterWithoutValueCache(e,t,i,s){const o=_addGridCommonParams(this.gos,{data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let n;return typeof e=="function"?n=e(o):n=this.expressionSvc?.evaluate(e,o),n}getValueCallback(e,t){const i=this.colModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let o=i;if(s){const n=_addGridCommonParams(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});o=s(n)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&_warn(121)),o}},CommunityCoreModule={moduleName:"CommunityCore",version:VERSION,beans:[GridDestroyService,ApiFunctionService,Registry,UserComponentFactory,RowContainerHeightService,VisibleColsService,EventService,GridOptionsService,ColumnModel,PageBoundsService,PageBoundsListener,RowRenderer,ValueService,FocusService,Environment,ScrollVisibleService,CtrlsService,SyncService,ColumnNameService,ColumnViewportService],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId,destroy,isDestroyed,getGridOption,setGridOption,updateGridOptions},dependsOn:[DataTypeModule,ColumnMoveModule,ColumnResizeModule,SortModule,ColumnHeaderCompModule,ColumnGroupModule,ColumnGroupHeaderCompModule,OverlayModule,ChangeDetectionModule,AnimationFrameModule,KeyboardNavigationModule,PinnedColumnModule,AriaModule,TouchModule,CellRendererFunctionModule,ColumnFlexModule,ExpressionModule]},_GlobalGridOptions=class I{static applyGlobalGridOptions(t){if(!I.gridOptions)return{...t};let i={};return _mergeDeep(i,I.gridOptions,!0,!0),I.mergeStrategy==="deep"?_mergeDeep(i,t,!0,!0):i={...i,...t},I.gridOptions.context&&(i.context=I.gridOptions.context),t.context&&(I.mergeStrategy==="deep"&&i.context&&_mergeDeep(t.context,i.context,!0,!0),i.context=t.context),i}};_GlobalGridOptions.gridOptions=void 0,_GlobalGridOptions.mergeStrategy="shallow";var GlobalGridOptions=_GlobalGridOptions;function provideGlobalGridOptions(e,t="shallow"){GlobalGridOptions.gridOptions=e,GlobalGridOptions.mergeStrategy=t}function _getGlobalGridOption(e){return GlobalGridOptions.gridOptions?.[e]}function createGrid(e,t,i){if(!t)return _error(11),{};const s=i;let o;if(!s?.setThemeOnGridDiv){const r=_createElement({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,o=()=>e.remove()}return new GridCoreCreator().create(e,t,r=>{const a=new GridComp(e);r.createBean(a)},void 0,i,o)}var nextGridId=1,GridCoreCreator=class{create(e,t,i,s,o,n){const r=GlobalGridOptions.applyGlobalGridOptions(t),a=r.gridId??String(nextGridId++),l=r.rowModelType??"clientSide",d=this.getRegisteredModules(o,a,l),c=this.createBeansList(l,d,a),u=this.createProvidedBeans(e,r,o);if(!c)return;const h={providedBeanInstances:u,beanClasses:c,gridId:a,beanInitComparator:gridBeanInitComparator,beanDestroyComparator:gridBeanDestroyComparator,derivedBeans:[createGridApi],destroyCallback:n},g=new Context(h);return this.registerModuleFeatures(g,d),i(g),g.getBean("syncSvc").start(),s&&s(g),g.getBean("gridApi")}getRegisteredModules(e,t,i){return _registerModule(CommunityCoreModule,void 0),e?.modules?.forEach(s=>_registerModule(s,t)),_getRegisteredModules(t,i)}registerModuleFeatures(e,t){const i=e.getBean("registry"),s=e.getBean("apiFunctionSvc");t.forEach(o=>{i.registerModule(o);const n=o.apiFunctions;n&&Object.keys(n).forEach(a=>{s?.addFunction(a,n[a])})})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;_missing(s)&&(s=new VanillaFrameworkOverrides);const o={gridOptions:t,eGridDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!o){_logPreInitErr(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!_isModuleRegistered(o,i,e)){_logPreInitErr(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:o,gridScoped:_areModulesGridScoped(),gridId:i,rowModelType:e},`Missing module ${o}Module for rowModelType ${e}.
29
26
  If upgrading from before v33, see ${baseDocLink}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const n=new Set;return t.forEach(r=>r.beans?.forEach(a=>n.add(a))),Array.from(n)}};function _getClientSideRowModel(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function _getInfiniteRowModel(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function _getServerSideRowModel(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var _PUBLIC_EVENTS=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged"],_INTERNAL_EVENTS=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","beforeRefreshModel","rowNodeDataChanged"],_ALL_EVENTS=[..._PUBLIC_EVENTS,..._INTERNAL_EVENTS],LocaleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(s,o,n)=>t({key:s,defaultValue:o,variableValues:n});const i=e.get("localeText");return(s,o,n)=>{let r=i&&i[s];if(r&&n&&n.length){let a=0;for(;!(a>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[a++])}return r??o}}},STRING_GRID_OPTIONS=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],OBJECT_GRID_OPTIONS=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],ARRAY_GRID_OPTIONS=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],_NUMBER_GRID_OPTIONS=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],OTHER_GRID_OPTIONS=["theme","rowSelection"],_BOOLEAN_MIXED_GRID_OPTIONS=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],_BOOLEAN_GRID_OPTIONS=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],_FUNCTION_GRID_OPTIONS=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter"],_ALL_GRID_OPTIONS=[...ARRAY_GRID_OPTIONS,...OBJECT_GRID_OPTIONS,...STRING_GRID_OPTIONS,..._NUMBER_GRID_OPTIONS,..._FUNCTION_GRID_OPTIONS,..._BOOLEAN_GRID_OPTIONS,..._BOOLEAN_MIXED_GRID_OPTIONS,...OTHER_GRID_OPTIONS],BaseComponentWrapper=class{wrap(e,t,i,s){const o=this.createWrapper(e,s);return t?.forEach(n=>{this.createMethod(o,n,!0)}),i?.forEach(n=>{this.createMethod(o,n,!1)}),o}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&_warn(49,{methodName:t}),null)}}},TooltipComponentElement={tag:"div",cls:"ag-tooltip"},TooltipComponent2=class extends PopupComponent{constructor(){super(TooltipComponentElement)}init(e){const{value:t}=e;this.getGui().textContent=_escapeString(t,!0)}};function _fuzzySuggestions(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:o}=e;let n=i.map((l,d)=>({value:l,relevance:hybridFuzzySearch(t,l),idx:d}));if(n.sort((l,d)=>d.relevance-l.relevance),s&&(n=n.filter(l=>l.relevance!==0)),n.length>0&&o&&o>0){const d=n[0].relevance*o;n=n.filter(c=>d-c.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function hybridFuzzySearch(e,t){if(e===t)return 1e3;const i=e.length,s=t.length;if(i===0||s===0)return 0;const o=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r=n.indexOf(o);if(r!==-1)return 980-r*2;if([...o].filter(u=>n.includes(u)).length===0)return 0;let l=Array.from({length:s+1},(u,h)=>h);for(let u=0;u<i;u++){const h=[u+1];for(let g=0;g<s;g++){const p=l[g+1]+1,f=h[g]+1;let m=l[g]+(e[u]!==t[g]?1:0);s>10&&g>s/2&&(m+=1),u>0&&g>0&&e[u-1]===t[g-1]&&(m-=4),h.push(Math.min(p,f,m))}l=h}const d=Math.round(l[s]),c=Math.max(1,1e3-d*30);return Math.max(1,c)}function _formatNumberCommas(e,t){if(typeof e!="number")return"";const i=t(),s=i("thousandSeparator",","),o=i("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${s}`)}var BaseCreator=class extends BeanStub{getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},BaseGridSerializingSession=class{constructor(e){this.groupColumns=[];const{colModel:t,rowGroupColsSvc:i,colNames:s,valueSvc:o,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=s,this.valueSvc=o,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,s,o){const r=(!this.gos.get("groupHideOpenParents")||o.footer)&&this.shouldRenderGroupSummaryCell(o,e,t)?this.createValueForGroupNode(e,o):this.valueSvc.getValueForDisplay(e,o);return this.processCell({accumulatedRowIndex:i,rowNode:o,column:e,value:r,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){if(!(e.group&&!this.gos.get("treeData")))return!1;if(this.groupColumns.indexOf(t)!==-1){if(e.groupData?.[t.getId()]!==void 0||_isServerSideRowModel(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const r=t.getColDef();return r==null||r.showRowGroup===!0||r.showRowGroup===this.rowGroupColsSvc?.columns[0].getId()}}const n=_isGroupUseEntireRow(this.gos,this.colModel.isPivotMode());return i===0&&n}getHeaderName(e,t){return e?e(_addGridCommonParams(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(_addGridCommonParams(this.gos,{column:e,node:t}));const i=this.gos.get("treeData"),s=a=>{if(i)return a.key;const l=a.groupData?.[e.getId()];return!l||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?l:this.valueSvc.formatValue(a.rowGroupColumn,a,l)??l},o=t.footer,n=[s(t)];if(!_isGroupMultiAutoColumn(this.gos))for(;t.parent;)t=t.parent,n.push(s(t));const r=n.reverse().join(" -> ");return o?`Total ${r}`:r}processCell(e){const{accumulatedRowIndex:t,rowNode:i,column:s,value:o,processCellCallback:n,type:r}=e;return n?{value:n(_addGridCommonParams(this.gos,{accumulatedRowIndex:t,column:s,node:i,value:o,type:r,parseValue:a=>this.valueSvc.parseValue(s,i,a,this.valueSvc.getValue(s,i)),formatValue:a=>this.valueSvc.formatValue(s,i,a)??a}))??""}:s.getColDef().useValueFormatterForExport!==!1?{value:o??"",valueFormatted:this.valueSvc.formatValue(s,i,o)}:{value:o??""}}};function _downloadFile(e,t){const i=document.defaultView||window;if(!i){_warn(52);return}const s=document.createElement("a"),o=i.URL.createObjectURL(t);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(o)},0)}var INITIAL_GRID_OPTION_KEYS={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0},clientSide="clientSide",serverSide="serverSide",infinite="infinite",functionRowModels={onGroupExpandedOrCollapsed:[clientSide],refreshClientSideRowModel:[clientSide],isRowDataEmpty:[clientSide],forEachLeafNode:[clientSide],forEachNodeAfterFilter:[clientSide],forEachNodeAfterFilterAndSort:[clientSide],resetRowHeights:[clientSide],applyTransaction:[clientSide],applyTransactionAsync:[clientSide],flushAsyncTransactions:[clientSide],getBestCostNodeSelection:[clientSide],getServerSideSelectionState:[serverSide],setServerSideSelectionState:[serverSide],applyServerSideTransaction:[serverSide],applyServerSideTransactionAsync:[serverSide],applyServerSideRowData:[serverSide],retryServerSideLoads:[serverSide],flushServerSideAsyncTransactions:[serverSide],refreshServerSide:[serverSide],getServerSideGroupLevelState:[serverSide],refreshInfiniteCache:[infinite],purgeInfiniteCache:[infinite],getInfiniteRowCount:[infinite],isLastRowIndexKnown:[infinite,serverSide],expandAll:[clientSide,serverSide],collapseAll:[clientSide,serverSide],onRowHeightChanged:[clientSide,serverSide],setRowCount:[infinite,serverSide],getCacheBlockState:[infinite,serverSide]},deprecatedFunctions={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function validateApiFunction(e,t,i){const s=deprecatedFunctions[e];if(s){const{version:n,new:r,old:a,message:l}=s,d=a??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return _warnOnce(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const o=functionRowModels[e];return o?(...n)=>{const r=i.rowModel.getType();if(!o.includes(r)){_errorOnce(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,n)}:t}var ENTERPRISE_MODULE_NAMES={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},ALL_COLUMN_FILTERS=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],RESOLVABLE_MODULE_NAMES={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:ALL_COLUMN_FILTERS,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...ALL_COLUMN_FILTERS,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...ALL_COLUMN_FILTERS,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},MODULES_FOR_ROW_MODELS={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function resolveModuleNames(e,t){const i=[];return(Array.isArray(e)?e:[e]).forEach(s=>{const o=RESOLVABLE_MODULE_NAMES[s];o?o.forEach(n=>{const r=MODULES_FOR_ROW_MODELS[n];(!r||r===t)&&i.push(n)}):i.push(s)}),i}var USER_COMP_MODULES={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},moduleImportMsg=e=>{const t=e.map(s=>`import { ${convertToUserModuleName(s)} } from '${ENTERPRISE_MODULE_NAMES[s]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(s=>s==="IntegratedCharts"||s==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
30
27
  ${t.join(`
31
28
  `)}